/** * Bundled worker code as a string. * This allows us to create a Blob URL at runtime without needing a separate file. */ export declare const WORKER_CODE = "\"use strict\";(()=>{var Li=Object.defineProperty;var Ni=(e,n)=>{for(var i in n)Li(e,i,{get:n[i],enumerable:!0})};var Ke={};Ni(Ke,{Diff:()=>F,FILE_HEADERS_ONLY:()=>kn,INCLUDE_HEADERS:()=>he,OMIT_HEADERS:()=>On,applyPatch:()=>Ge,applyPatches:()=>Ln,arrayDiff:()=>Ye,canonicalize:()=>ne,characterDiff:()=>Se,convertChangesToDMP:()=>Tn,convertChangesToXML:()=>Dn,createPatch:()=>In,createTwoFilesPatch:()=>Je,cssDiff:()=>He,diffArrays:()=>Sn,diffChars:()=>hn,diffCss:()=>Cn,diffJson:()=>bn,diffLines:()=>T,diffSentences:()=>An,diffTrimmedLines:()=>wn,diffWords:()=>vn,diffWordsWithSpace:()=>Te,formatPatch:()=>re,jsonDiff:()=>Be,lineDiff:()=>pe,parsePatch:()=>ie,reversePatch:()=>ze,sentenceDiff:()=>Pe,structuredPatch:()=>me,wordDiff:()=>Oe,wordsWithSpaceDiff:()=>Ie});var F=class{diff(n,i,r={}){let l;typeof r==\"function\"?(l=r,r={}):\"callback\"in r&&(l=r.callback);let t=this.castInput(n,r),o=this.castInput(i,r),u=this.removeEmpty(this.tokenize(t,r)),f=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(u,f,r,l)}diffWithOptionsObj(n,i,r,l){var t;let o=h=>{if(h=this.postProcess(h,r),l){setTimeout(function(){l(h)},0);return}else return h},u=i.length,f=n.length,s=1,p=u+f;r.maxEditLength!=null&&(p=Math.min(p,r.maxEditLength));let c=(t=r.timeout)!==null&&t!==void 0?t:1/0,x=Date.now()+c,v=[{oldPos:-1,lastComponent:void 0}],d=this.extractCommon(v[0],i,n,0,r);if(v[0].oldPos+1>=f&&d+1>=u)return o(this.buildValues(v[0].lastComponent,i,n));let a=-1/0,m=1/0,y=()=>{for(let h=Math.max(a,-s);h<=Math.min(m,s);h+=2){let g,w=v[h-1],C=v[h+1];w&&(v[h-1]=void 0);let E=!1;if(C){let S=C.oldPos-h;E=C&&0<=S&&S=f&&d+1>=u)return o(this.buildValues(g.lastComponent,i,n))||!0;v[h]=g,g.oldPos+1>=f&&(m=Math.min(m,h-1)),d+1>=u&&(a=Math.max(a,h+1))}s++};if(l)(function h(){setTimeout(function(){if(s>p||Date.now()>x)return l(void 0);y()||h()},0)})();else for(;s<=p&&Date.now()<=x;){let h=y();if(h)return h}}addToPath(n,i,r,l,t){let o=n.lastComponent;return o&&!t.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:n.oldPos+l,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:n.oldPos+l,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}}extractCommon(n,i,r,l,t){let o=i.length,u=r.length,f=n.oldPos,s=f-l,p=0;for(;s+1x.length?d:x}),p.value=this.join(c)}else p.value=this.join(i.slice(f,f+p.count));f+=p.count,p.added||(s+=p.count)}}return l}};var be=class extends F{},Se=new be;function hn(e,n,i){return Se.diff(e,n,i)}function Ee(e,n){let i;for(i=0;in.length&&(i=e.length-n.length);let r=n.length;e.length0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o0&&e[o]!=n[t];)t=l[t];e[o]==n[t]&&t++}return t}function mn(e){return e.includes(`\\r\n`)&&!e.startsWith(`\n`)&&!e.match(/[^\\r]\\n/)}function gn(e){return!e.includes(`\\r\n`)&&e.includes(`\n`)}function Le(e,n){let i=[];for(let r of Array.from(n.segment(e))){let l=r.segment;i.length&&/\\s/.test(i[i.length-1])&&/\\s/.test(l)?i[i.length-1]+=l:i.push(l)}return i}function ce(e,n){if(n)return z(e,n)[1];let i;for(i=e.length-1;i>=0&&e[i].match(/\\s/);i--);return e.substring(i+1)}function Y(e,n){if(n)return z(e,n)[0];let i=e.match(/^\\s*/);return i?i[0]:\"\"}function z(e,n){if(!n)return[Y(e),ce(e)];if(n.resolvedOptions().granularity!=\"word\")throw new Error('The segmenter passed must have a granularity of \"word\"');let i=Le(e,n),r=i[0],l=i[i.length-1],t=/\\s/.test(r)?r:\"\",o=/\\s/.test(l)?l:\"\";return[t,o]}var de=\"a-zA-Z0-9_\\\\u{AD}\\\\u{C0}-\\\\u{D6}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}\",Oi=new RegExp(`[${de}]+|\\\\s+|[^${de}]`,\"ug\"),Ne=class extends F{equals(n,i,r){return r.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),n.trim()===i.trim()}tokenize(n,i={}){let r;if(i.intlSegmenter){let o=i.intlSegmenter;if(o.resolvedOptions().granularity!=\"word\")throw new Error('The segmenter passed must have a granularity of \"word\"');r=Le(n,o)}else r=n.match(Oi)||[];let l=[],t=null;return r.forEach(o=>{/\\s/.test(o)?t==null?l.push(o):l.push(l.pop()+o):t!=null&&/\\s/.test(t)?l[l.length-1]==t?l.push(l.pop()+o):l.push(t+o):l.push(o),t=o}),l}join(n){return n.map((i,r)=>r==0?i:i.replace(/^\\s+/,\"\")).join(\"\")}postProcess(n,i){if(!n||i.oneChangePerToken)return n;let r=null,l=null,t=null;return n.forEach(o=>{o.added?l=o:o.removed?t=o:((l||t)&&xn(r,t,l,o,i.intlSegmenter),r=o,l=null,t=null)}),(l||t)&&xn(r,t,l,null,i.intlSegmenter),n}},Oe=new Ne;function vn(e,n,i){return i?.ignoreWhitespace!=null&&!i.ignoreWhitespace?Te(e,n,i):Oe.diff(e,n,i)}function xn(e,n,i,r,l){if(n&&i){let[t,o]=z(n.value,l),[u,f]=z(i.value,l);if(e){let s=Ee(t,u);e.value=se(e.value,u,s),n.value=G(n.value,s),i.value=G(i.value,s)}if(r){let s=Fe(o,f);r.value=ae(r.value,f,s),n.value=ee(n.value,s),i.value=ee(i.value,s)}}else if(i){if(e){let t=Y(i.value,l);i.value=i.value.substring(t.length)}if(r){let t=Y(r.value,l);r.value=r.value.substring(t.length)}}else if(e&&r){let t=Y(r.value,l),[o,u]=z(n.value,l),f=Ee(t,o);n.value=G(n.value,f);let s=Fe(G(t,f),u);n.value=ee(n.value,s),r.value=ae(r.value,t,s),e.value=se(e.value,t,t.slice(0,t.length-s.length))}else if(r){let t=Y(r.value,l),o=ce(n.value,l),u=_e(o,t);n.value=ee(n.value,u)}else if(e){let t=ce(e.value,l),o=Y(n.value,l),u=_e(t,o);n.value=G(n.value,u)}}var ke=class extends F{tokenize(n){let i=new RegExp(`(\\\\r?\\\\n)|[${de}]+|[^\\\\S\\\\n\\\\r]+|[^${de}]`,\"ug\");return n.match(i)||[]}},Ie=new ke;function Te(e,n,i){return Ie.diff(e,n,i)}function yn(e,n){if(typeof e==\"function\")n.callback=e;else if(e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}var De=class extends F{constructor(){super(...arguments),this.tokenize=Re}equals(n,i,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`\n`))&&(n=n.trim()),(!r.newlineIsToken||!i.includes(`\n`))&&(i=i.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`\n`)&&(n=n.slice(0,-1)),i.endsWith(`\n`)&&(i=i.slice(0,-1))),super.equals(n,i,r)}},pe=new De;function T(e,n,i){return pe.diff(e,n,i)}function wn(e,n,i){return i=yn(i,{ignoreWhitespace:!0}),pe.diff(e,n,i)}function Re(e,n){n.stripTrailingCr&&(e=e.replace(/\\r\\n/g,`\n`));let i=[],r=e.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(let l=0;ltypeof o>\"u\"?r:o}=i;return typeof n==\"string\"?n:JSON.stringify(ne(n,null,null,l),null,\" \")}equals(n,i,r){return super.equals(n.replace(/,([\\r\\n])/g,\"$1\"),i.replace(/,([\\r\\n])/g,\"$1\"),r)}},Be=new je;function bn(e,n,i){return Be.diff(e,n,i)}function ne(e,n,i,r,l){n=n||[],i=i||[],r&&(e=r(l===void 0?\"\":l,e));let t;for(t=0;t$e(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map((i,r)=>{var l;return i.startsWith(\"\\\\\")||i.endsWith(\"\\r\")||!((l=n.lines[r+1])===null||l===void 0)&&l.startsWith(\"\\\\\")?i:i+\"\\r\"})}))})}function qe(e){return Array.isArray(e)?e.map(n=>qe(n)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(n=>Object.assign(Object.assign({},n),{lines:n.lines.map(i=>i.endsWith(\"\\r\")?i.substring(0,i.length-1):i)}))})}function En(e){return Array.isArray(e)||(e=[e]),!e.some(n=>n.hunks.some(i=>i.lines.some(r=>!r.startsWith(\"\\\\\")&&r.endsWith(\"\\r\"))))}function Fn(e){return Array.isArray(e)||(e=[e]),e.some(n=>n.hunks.some(i=>i.lines.some(r=>r.endsWith(\"\\r\"))))&&e.every(n=>n.hunks.every(i=>i.lines.every((r,l)=>{var t;return r.startsWith(\"\\\\\")||r.endsWith(\"\\r\")||((t=i.lines[l+1])===null||t===void 0?void 0:t.startsWith(\"\\\\\"))})))}function ie(e){let n=e.split(/\\n/),i=[],r=0;function l(d){return/^diff --git /.test(d)}function t(d){return l(d)||/^Index:\\s/.test(d)||/^diff(?: -r \\w+)+\\s/.test(d)}function o(d){return/^(---|\\+\\+\\+)\\s/.test(d)}function u(d){return/^@@\\s/.test(d)}function f(){var d;let a={};a.hunks=[],i.push(a);let m=!1;for(;r0){let y=a.substring(0,m-1),h=c(a.substring(m));return h===null?null:{oldFileName:y,newFileName:h.fileName}}if(a.startsWith(\"a/\")){let y=[],h=0;for(;h=a.indexOf(\" b/\",h+1),h!==-1;)y.push(h);if(y.length>0){let g=y[Math.floor(y.length/2)];return{oldFileName:a.substring(0,g),newFileName:a.substring(g+1)}}}return null}function p(d){if(d.startsWith('\"')){let a=c(d);if(a)return a.fileName}return d}function c(d){if(!d.startsWith('\"'))return null;let a=\"\",m=1;for(;m=d.length||d[m+1]<\"0\"||d[m+1]>\"7\"||d[m+2]<\"0\"||d[m+2]>\"7\")return null;let y=[parseInt(d.substring(m,m+3),8)];for(m+=3;d[m]===\"\\\\\"&&d[m+1]>=\"0\"&&d[m+1]<=\"7\";){if(m+3>=d.length||d[m+2]<\"0\"||d[m+2]>\"7\"||d[m+3]<\"0\"||d[m+3]>\"7\")return null;y.push(parseInt(d.substring(m+1,m+4),8)),m+=4}a+=new TextDecoder(\"utf-8\").decode(new Uint8Array(y));continue}default:return null}else a+=d[m];m++}return null}function x(d){let a=/^(---|\\+\\+\\+)\\s+/.exec(n[r]);if(a){let m=a[1],y=n[r].substring(3).trim().split(\"\t\",2),h=(y[1]||\"\").trim(),g=y[0];g.startsWith('\"')?g=p(g):g=g.replace(/\\\\\\\\/g,\"\\\\\"),m===\"---\"?(d.oldFileName=g,d.oldHeader=h):(d.newFileName=g,d.newHeader=h),r++}}function v(){var d;let a=r,m=n[r++],y=m.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/),h={oldStart:+y[1],oldLines:typeof y[2]>\"u\"?1:+y[2],newStart:+y[3],newLines:typeof y[4]>\"u\"?1:+y[4],lines:[]};h.oldLines===0&&(h.oldStart+=1),h.newLines===0&&(h.newStart+=1);let g=0,w=0;for(;r1)throw new Error(\"applyPatch only works with a single input.\");return Ti(e,r[0],i)}function Ti(e,n,i={}){(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(mn(e)&&En(n)?n=$e(n):gn(e)&&Fn(n)&&(n=qe(n)));let r=e.split(`\n`),l=n.hunks,t=i.compareLine||((d,a,m,y)=>a===y),o=i.fuzzFactor||0,u=0;if(o<0||!Number.isInteger(o))throw new Error(\"fuzzFactor must be a non-negative integer\");if(!l.length)return e;let f=\"\",s=!1,p=!1;for(let d=0;d0?b[0]:\" \",M=b.length>0?b.substr(1):b;if(S===\"-\")if(t(a+1,r[a],S,M))a++,C=0;else return!m||r[a]==null?null:(g[w]=r[a],c(d,a+1,m-1,y,!1,g,w+1));if(S===\"+\"){if(!h)return null;g[w]=M,w++,C=0,E=!0}if(S===\" \")if(C++,g[w]=r[a],t(a+1,r[a],S,M))w++,h=!0,E=!1,a++;else return E||!m?null:r[a]&&(c(d,a+1,m-1,y+1,!1,g,w+1)||c(d,a+1,m-1,y,!1,g,w+1))||c(d,a,m-1,y+1,!1,g,w)}return w-=C,a-=C,g.length=w,{patchedLines:g,oldLineLastI:a-1}}let x=[],v=0;for(let d=0;dze(i)).reverse();let n=Object.assign(Object.assign({},e),{oldFileName:e.isGit?Nn(e.newFileName):e.newFileName,oldHeader:e.newHeader,newFileName:e.isGit?Nn(e.oldFileName):e.oldFileName,newHeader:e.oldHeader,oldMode:e.newMode,newMode:e.oldMode,isCreate:e.isDelete,isDelete:e.isCreate,hunks:e.hunks.map(i=>({oldLines:i.newLines,oldStart:i.newStart,newLines:i.oldLines,newStart:i.oldStart,lines:i.lines.map(r=>r.startsWith(\"-\")?`+${r.slice(1)}`:r.startsWith(\"+\")?`-${r.slice(1)}`:r)}))});return e.isCopy&&(n.newFileName=\"/dev/null\",n.newHeader=void 0,n.isDelete=!0,delete n.isCreate,delete n.isCopy,delete n.isRename,n.hunks=[]),n}function Di(e){for(let n=0;n\"~\"||e[n]==='\"'||e[n]===\"\\\\\")return!0;return!1}function H(e){if(!Di(e))return e;let n='\"',i=new TextEncoder().encode(e),r=0;for(;r=32&&l<=126?n+=String.fromCharCode(l):n+=\"\\\\\"+l.toString(8).padStart(3,\"0\"),r++}return n+='\"',n}var he={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},kn={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},On={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function me(e,n,i,r,l,t,o){let u;o?typeof o==\"function\"?u={callback:o}:u=o:u={},typeof u.context>\"u\"&&(u.context=4);let f=u.context;if(u.newlineIsToken)throw new Error(\"newlineIsToken may not be used with patch-generation functions, only with diffing functions\");if(u.callback){let{callback:p}=u;T(i,r,Object.assign(Object.assign({},u),{callback:c=>{let x=s(c);p(x)}}))}else return s(T(i,r,u));function s(p){if(!p)return;p.push({value:\"\",lines:[]});function c(h){return h.map(function(g){return\" \"+g})}let x=[],v=0,d=0,a=[],m=1,y=1;for(let h=0;h0?c(C.lines.slice(-f)):[],v-=a.length,d-=a.length)}for(let C of w)a.push((g.added?\"+\":\"-\")+C);g.added?y+=w.length:m+=w.length}else{if(v)if(w.length<=f*2&&h1&&!n.includeFileHeaders&&!e.every(p=>p.isGit))throw new Error(\"Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)\");return e.map(p=>re(p,n)).join(`\n`)}let f=[];if(e.isGit){if(n=he,!e.oldFileName)throw new Error(\"oldFileName must be specified for Git patches\");if(!e.newFileName)throw new Error(\"newFileName must be specified for Git patches\");let p=e.oldFileName,c=e.newFileName;e.isCreate&&p===\"/dev/null\"?p=c.replace(/^b\\//,\"a/\"):e.isDelete&&c===\"/dev/null\"&&(c=p.replace(/^a\\//,\"b/\")),f.push(\"diff --git \"+H(p)+\" \"+H(c)),e.isDelete&&f.push(\"deleted file mode \"+((i=e.oldMode)!==null&&i!==void 0?i:\"100644\")),e.isCreate&&f.push(\"new file mode \"+((r=e.newMode)!==null&&r!==void 0?r:\"100644\")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(f.push(\"old mode \"+e.oldMode),f.push(\"new mode \"+e.newMode)),e.isRename&&(f.push(\"rename from \"+H(((l=e.oldFileName)!==null&&l!==void 0?l:\"\").replace(/^a\\//,\"\"))),f.push(\"rename to \"+H(((t=e.newFileName)!==null&&t!==void 0?t:\"\").replace(/^b\\//,\"\")))),e.isCopy&&(f.push(\"copy from \"+H(((o=e.oldFileName)!==null&&o!==void 0?o:\"\").replace(/^a\\//,\"\"))),f.push(\"copy to \"+H(((u=e.newFileName)!==null&&u!==void 0?u:\"\").replace(/^b\\//,\"\"))))}else n.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&f.push(\"Index: \"+e.oldFileName),n.includeUnderline&&f.push(\"===================================================================\");let s=e.hunks.length>0;n.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||s)&&(f.push(\"--- \"+H(e.oldFileName)+(e.oldHeader?\"\t\"+e.oldHeader:\"\")),f.push(\"+++ \"+H(e.newFileName)+(e.newHeader?\"\t\"+e.newHeader:\"\")));for(let p=0;p{u(f?re(f,o.headerOptions):void 0)}}))}else{let u=me(e,n,i,r,l,t,o);return u?re(u,o?.headerOptions):void 0}}function In(e,n,i,r,l,t){return Je(e,e,n,i,r,l,t)}function Ri(e){let n=e.endsWith(`\n`),i=e.split(`\n`).map(r=>r+`\n`);return n?i.pop():i.push(i.pop().slice(0,-1)),i}function Tn(e){let n=[],i,r;for(let l=0;l\"):r.removed&&n.push(\"\"),n.push(Mi(r.value)),r.added?n.push(\"\"):r.removed&&n.push(\"\")}return n.join(\"\")}function Mi(e){let n=e;return n=n.replace(/&/g,\"&\"),n=n.replace(//g,\">\"),n=n.replace(/\"/g,\""\"),n}function Qn(e){return typeof e>\"u\"||e===null}function Pi(e){return typeof e==\"object\"&&e!==null}function Wi(e){return Array.isArray(e)?e:Qn(e)?[]:[e]}function Hi(e,n){var i,r,l,t;if(n)for(t=Object.keys(n),i=0,r=t.length;iu&&(t=\" ... \",n=r-u+t.length),i-r>u&&(o=\" ...\",i=r+u-o.length),{str:t+e.slice(n,i).replace(/\\t/g,\"\\u2192\")+o,pos:r-n+t.length}}function Xe(e,n){return L.repeat(\" \",n-e.length)+e}function Ji(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!=\"number\"&&(n.indent=1),typeof n.linesBefore!=\"number\"&&(n.linesBefore=3),typeof n.linesAfter!=\"number\"&&(n.linesAfter=2);for(var i=/\\r?\\n|\\r|\\0/g,r=[0],l=[],t,o=-1;t=i.exec(e.buffer);)l.push(t.index),r.push(t.index+t[0].length),e.position<=t.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var u=\"\",f,s,p=Math.min(e.line+n.linesAfter,l.length).toString().length,c=n.maxLength-(n.indent+p+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)s=Qe(e.buffer,r[o-f],l[o-f],e.position-(r[o]-r[o-f]),c),u=L.repeat(\" \",n.indent)+Xe((e.line-f+1).toString(),p)+\" | \"+s.str+`\n`+u;for(s=Qe(e.buffer,r[o],l[o],e.position,c),u+=L.repeat(\" \",n.indent)+Xe((e.line+1).toString(),p)+\" | \"+s.str+`\n`,u+=L.repeat(\"-\",n.indent+p+3+s.pos)+`^\n`,f=1;f<=n.linesAfter&&!(o+f>=l.length);f++)s=Qe(e.buffer,r[o+f],l[o+f],e.position-(r[o]-r[o+f]),c),u+=L.repeat(\" \",n.indent)+Xe((e.line+f+1).toString(),p)+\" | \"+s.str+`\n`;return u.replace(/\\n$/,\"\")}var Ki=Ji,Qi=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],Xi=[\"scalar\",\"sequence\",\"mapping\"];function Vi(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Zi(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(Qi.indexOf(i)===-1)throw new O('Unknown option \"'+i+'\" is met in definition of \"'+e+'\" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Vi(n.styleAliases||null),Xi.indexOf(this.kind)===-1)throw new O('Unknown kind \"'+this.kind+'\" is specified for \"'+e+'\" YAML type.')}var N=Zi;function Rn(e,n){var i=[];return e[n].forEach(function(r){var l=i.length;i.forEach(function(t,o){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(l=o)}),i[l]=r}),i}function er(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function r(l){l.multi?(e.multi[l.kind].push(l),e.multi.fallback.push(l)):e[l.kind][l.tag]=e.fallback[l.tag]=l}for(n=0,i=arguments.length;n=0?\"0b\"+e.toString(2):\"-0b\"+e.toString(2).slice(1)},octal:function(e){return e>=0?\"0o\"+e.toString(8):\"-0o\"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?\"0x\"+e.toString(16).toUpperCase():\"-0x\"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),Ar=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function Cr(e){return!(e===null||!Ar.test(e)||e[e.length-1]===\"_\")}function br(e){var n,i;return n=e.replace(/_/g,\"\").toLowerCase(),i=n[0]===\"-\"?-1:1,\"+-\".indexOf(n[0])>=0&&(n=n.slice(1)),n===\".inf\"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===\".nan\"?NaN:i*parseFloat(n,10)}var Sr=/^[-+]?[0-9]+e/;function Er(e,n){var i;if(isNaN(e))switch(n){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===e)switch(n){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(L.isNegativeZero(e))return\"-0.0\";return i=e.toString(10),Sr.test(i)?i.replace(\"e\",\".e\"):i}function Fr(e){return Object.prototype.toString.call(e)===\"[object Number]\"&&(e%1!==0||L.isNegativeZero(e))}var _r=new N(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:Cr,construct:br,predicate:Fr,represent:Er,defaultStyle:\"lowercase\"}),Lr=or.extend({implicit:[ar,pr,wr,_r]}),Nr=Lr,Vn=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),Zn=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 kr(e){return e===null?!1:Vn.exec(e)!==null||Zn.exec(e)!==null}function Or(e){var n,i,r,l,t,o,u,f=0,s=null,p,c,x;if(n=Vn.exec(e),n===null&&(n=Zn.exec(e)),n===null)throw new Error(\"Date resolve error\");if(i=+n[1],r=+n[2]-1,l=+n[3],!n[4])return new Date(Date.UTC(i,r,l));if(t=+n[4],o=+n[5],u=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+=\"0\";f=+f}return n[9]&&(p=+n[10],c=+(n[11]||0),s=(p*60+c)*6e4,n[9]===\"-\"&&(s=-s)),x=new Date(Date.UTC(i,r,l,t,o,u,f)),s&&x.setTime(x.getTime()-s),x}function Ir(e){return e.toISOString()}var Tr=new N(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:kr,construct:Or,instanceOf:Date,represent:Ir});function Dr(e){return e===\"<<\"||e===null}var Rr=new N(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:Dr}),on=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function Mr(e){if(e===null)return!1;var n,i,r=0,l=e.length,t=on;for(i=0;i64)){if(n<0)return!1;r+=6}return r%8===0}function Pr(e){var n,i,r=e.replace(/[\\r\\n=]/g,\"\"),l=r.length,t=on,o=0,u=[];for(n=0;n>16&255),u.push(o>>8&255),u.push(o&255)),o=o<<6|t.indexOf(r.charAt(n));return i=l%4*6,i===0?(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)):i===18?(u.push(o>>10&255),u.push(o>>2&255)):i===12&&u.push(o>>4&255),new Uint8Array(u)}function Wr(e){var n=\"\",i=0,r,l,t=e.length,o=on;for(r=0;r>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[r];return l=t%3,l===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):l===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):l===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Hr(e){return Object.prototype.toString.call(e)===\"[object Uint8Array]\"}var jr=new N(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:Mr,construct:Pr,predicate:Hr,represent:Wr}),Br=Object.prototype.hasOwnProperty,Ur=Object.prototype.toString;function Yr(e){if(e===null)return!0;var n=[],i,r,l,t,o,u=e;for(i=0,r=u.length;i>10)+55296,(e-65536&1023)+56320)}function oi(e,n,i){n===\"__proto__\"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var ti=new Array(256),ui=new Array(256);for($=0;$<256;$++)ti[$]=Wn($)?1:0,ui[$]=Wn($);var $;function fl(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||ei,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,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.firstTabInLine=-1,this.documents=[]}function fi(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Ki(i),new O(n,i)}function A(e,n){throw fi(e,n)}function ve(e,n){e.onWarning&&e.onWarning.call(null,fi(e,n))}var Hn={YAML:function(n,i,r){var l,t,o;n.version!==null&&A(n,\"duplication of %YAML directive\"),r.length!==1&&A(n,\"YAML directive accepts exactly one argument\"),l=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]),l===null&&A(n,\"ill-formed argument of the YAML directive\"),t=parseInt(l[1],10),o=parseInt(l[2],10),t!==1&&A(n,\"unacceptable YAML version of the document\"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&ve(n,\"unsupported YAML version of the document\")},TAG:function(n,i,r){var l,t;r.length!==2&&A(n,\"TAG directive accepts exactly two arguments\"),l=r[0],t=r[1],ri.test(l)||A(n,\"ill-formed tag handle (first argument) of the TAG directive\"),B.call(n.tagMap,l)&&A(n,'there is a previously declared suffix for \"'+l+'\" tag handle'),li.test(t)||A(n,\"ill-formed tag prefix (second argument) of the TAG directive\");try{t=decodeURIComponent(t)}catch{A(n,\"tag prefix is malformed: \"+t)}n.tagMap[l]=t}};function j(e,n,i,r){var l,t,o,u;if(n1&&(e.result+=L.repeat(`\n`,n-1))}function al(e,n,i){var r,l,t,o,u,f,s,p,c=e.kind,x=e.result,v;if(v=e.input.charCodeAt(e.position),I(v)||K(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(l=e.input.charCodeAt(e.position+1),I(l)||i&&K(l)))return!1;for(e.kind=\"scalar\",e.result=\"\",t=o=e.position,u=!1;v!==0;){if(v===58){if(l=e.input.charCodeAt(e.position+1),I(l)||i&&K(l))break}else if(v===35){if(r=e.input.charCodeAt(e.position-1),I(r))break}else{if(e.position===e.lineStart&&Ae(e)||i&&K(v))break;if(R(v))if(f=e.line,s=e.lineStart,p=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=f,e.lineStart=s,e.lineIndent=p;break}}u&&(j(e,t,o,!1),un(e,e.line-f),t=o=e.position,u=!1),q(v)||(o=e.position+1),v=e.input.charCodeAt(++e.position)}return j(e,t,o,!1),e.result?!0:(e.kind=c,e.result=x,!1)}function sl(e,n){var i,r,l;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,r=l=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(j(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,l=e.position;else return!0;else R(i)?(j(e,r,l,!0),un(e,_(e,!1,n)),r=l=e.position):e.position===e.lineStart&&Ae(e)?A(e,\"unexpected end of the document within a single quoted scalar\"):(e.position++,l=e.position);A(e,\"unexpected end of the stream within a single quoted scalar\")}function cl(e,n){var i,r,l,t,o,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,i=r=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return j(e,i,e.position,!0),e.position++,!0;if(u===92){if(j(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),R(u))_(e,!1,n);else if(u<256&&ti[u])e.result+=ui[u],e.position++;else if((o=ol(u))>0){for(l=o,t=0;l>0;l--)u=e.input.charCodeAt(++e.position),(o=ll(u))>=0?t=(t<<4)+o:A(e,\"expected hexadecimal character\");e.result+=ul(t),e.position++}else A(e,\"unknown escape sequence\");i=r=e.position}else R(u)?(j(e,i,r,!0),un(e,_(e,!1,n)),i=r=e.position):e.position===e.lineStart&&Ae(e)?A(e,\"unexpected end of the document within a double quoted scalar\"):(e.position++,r=e.position)}A(e,\"unexpected end of the stream within a double quoted scalar\")}function dl(e,n){var i=!0,r,l,t,o=e.tag,u,f=e.anchor,s,p,c,x,v,d=Object.create(null),a,m,y,h;if(h=e.input.charCodeAt(e.position),h===91)p=93,v=!1,u=[];else if(h===123)p=125,v=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),h=e.input.charCodeAt(++e.position);h!==0;){if(_(e,!0,n),h=e.input.charCodeAt(e.position),h===p)return e.position++,e.tag=o,e.anchor=f,e.kind=v?\"mapping\":\"sequence\",e.result=u,!0;i?h===44&&A(e,\"expected the node content, but found ','\"):A(e,\"missed comma between flow collection entries\"),m=a=y=null,c=x=!1,h===63&&(s=e.input.charCodeAt(e.position+1),I(s)&&(c=x=!0,e.position++,_(e,!0,n))),r=e.line,l=e.lineStart,t=e.position,X(e,n,ge,!1,!0),m=e.tag,a=e.result,_(e,!0,n),h=e.input.charCodeAt(e.position),(x||e.line===r)&&h===58&&(c=!0,h=e.input.charCodeAt(++e.position),_(e,!0,n),X(e,n,ge,!1,!0),y=e.result),v?Q(e,u,d,m,a,y,r,l,t):c?u.push(Q(e,null,d,m,a,y,r,l,t)):u.push(a),_(e,!0,n),h=e.input.charCodeAt(e.position),h===44?(i=!0,h=e.input.charCodeAt(++e.position)):i=!1}A(e,\"unexpected end of the stream within a flow collection\")}function pl(e,n){var i,r,l=Ve,t=!1,o=!1,u=n,f=0,s=!1,p,c;if(c=e.input.charCodeAt(e.position),c===124)r=!1;else if(c===62)r=!0;else return!1;for(e.kind=\"scalar\",e.result=\"\";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)Ve===l?l=c===43?Mn:el:A(e,\"repeat of a chomping mode identifier\");else if((p=tl(c))>=0)p===0?A(e,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):o?A(e,\"repeat of an indentation width identifier\"):(u=n+p-1,o=!0);else break;if(q(c)){do c=e.input.charCodeAt(++e.position);while(q(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!R(c)&&c!==0)}for(;c!==0;){for(tn(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!o||e.lineIndentu&&(u=e.lineIndent),R(c)){f++;continue}if(e.lineIndentn)&&f!==0)A(e,\"bad indentation of a sequence entry\");else if(e.lineIndentn)&&(m&&(o=e.line,u=e.lineStart,f=e.position),X(e,n,xe,!0,l)&&(m?d=e.result:a=e.result),m||(Q(e,c,x,v,d,a,o,u,f),v=d=a=null),_(e,!0,-1),h=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>n)&&h!==0)A(e,\"bad indentation of a mapping entry\");else if(e.lineIndentn?f=1:e.lineIndent===n?f=0:e.lineIndentn?f=1:e.lineIndent===n?f=0:e.lineIndent tag; it should be \"scalar\", not \"'+e.kind+'\"'),c=0,x=e.implicitTypes.length;c\"),e.result!==null&&d.kind!==e.kind&&A(e,\"unacceptable node kind for !<\"+e.tag+'> tag; it should be \"'+d.kind+'\", not \"'+e.kind+'\"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):A(e,\"cannot resolve a node with !<\"+e.tag+\"> explicit tag\")}return e.listener!==null&&e.listener(\"close\",e),e.tag!==null||e.anchor!==null||p}function vl(e){var n=e.position,i,r,l,t=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(t=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!I(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),l=[],r.length<1&&A(e,\"directive name must not be less than one character in length\");o!==0;){for(;q(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!R(o));break}if(R(o))break;for(i=e.position;o!==0&&!I(o);)o=e.input.charCodeAt(++e.position);l.push(e.input.slice(i,e.position))}o!==0&&tn(e),B.call(Hn,r)?Hn[r](e,r,l):ve(e,'unknown document directive \"'+r+'\"')}if(_(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,_(e,!0,-1)):t&&A(e,\"directives end mark is expected\"),X(e,e.lineIndent-1,xe,!1,!0),_(e,!0,-1),e.checkLineBreaks&&il.test(e.input.slice(n,e.position))&&ve(e,\"non-ASCII line breaks are interpreted as content\"),e.documents.push(e.result),e.position===e.lineStart&&Ae(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position\"u\"&&(i=n,n=null);var r=ai(e,i);if(typeof n!=\"function\")return r;for(var l=0,t=r.length;l=55296&&i<=56319&&n+1=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function vi(e){var n=/^\\n* /;return n.test(e)}var yi=1,rn=2,wi=3,Ai=4,J=5;function Jl(e,n,i,r,l,t,o,u){var f,s=0,p=null,c=!1,x=!1,v=r!==-1,d=-1,a=Gl(le(e,0))&&zl(le(e,e.length-1));if(n||o)for(f=0;f=65536?f+=2:f++){if(s=le(e,f),!fe(s))return J;a=a&&$n(s,p,u),p=s}else{for(f=0;f=65536?f+=2:f++){if(s=le(e,f),s===te)c=!0,v&&(x=x||f-d-1>r&&e[d+1]!==\" \",d=f);else if(!fe(s))return J;a=a&&$n(s,p,u),p=s}x=x||v&&f-d-1>r&&e[d+1]!==\" \"}return!c&&!x?a&&!o&&!l(e)?yi:t===ue?J:rn:i>9&&vi(e)?J:o?t===ue?J:rn:x?Ai:wi}function Kl(e,n,i,r,l){e.dump=(function(){if(n.length===0)return e.quotingType===ue?'\"\"':\"''\";if(!e.noCompatMode&&(Hl.indexOf(n)!==-1||jl.test(n)))return e.quotingType===ue?'\"'+n+'\"':\"'\"+n+\"'\";var t=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t),u=r||e.flowLevel>-1&&i>=e.flowLevel;function f(s){return ql(e,s)}switch(Jl(n,u,e.indent,o,f,e.quotingType,e.forceQuotes&&!r,l)){case yi:return n;case rn:return\"'\"+n.replace(/'/g,\"''\")+\"'\";case wi:return\"|\"+qn(n,e.indent)+Gn(Un(n,t));case Ai:return\">\"+qn(n,e.indent)+Gn(Un(Ql(n,o),t));case J:return'\"'+Xl(n)+'\"';default:throw new O(\"impossible error: invalid scalar style\")}})()}function qn(e,n){var i=vi(e)?String(n):\"\",r=e[e.length-1]===`\n`,l=r&&(e[e.length-2]===`\n`||e===`\n`),t=l?\"+\":r?\"\":\"-\";return i+t+`\n`}function Gn(e){return e[e.length-1]===`\n`?e.slice(0,-1):e}function Ql(e,n){for(var i=/(\\n+)([^\\n]*)/g,r=(function(){var s=e.indexOf(`\n`);return s=s!==-1?s:e.length,i.lastIndex=s,zn(e.slice(0,s),n)})(),l=e[0]===`\n`||e[0]===\" \",t,o;o=i.exec(e);){var u=o[1],f=o[2];t=f[0]===\" \",r+=u+(!l&&!t&&f!==\"\"?`\n`:\"\")+zn(f,n),l=t}return r}function zn(e,n){if(e===\"\"||e[0]===\" \")return e;for(var i=/ [^ ]/g,r,l=0,t,o=0,u=0,f=\"\";r=i.exec(e);)u=r.index,u-l>n&&(t=o>l?o:u,f+=`\n`+e.slice(l,t),l=t+1),o=u;return f+=`\n`,e.length-l>n&&o>l?f+=e.slice(l,o)+`\n`+e.slice(o+1):f+=e.slice(l),f.slice(1)}function Xl(e){for(var n=\"\",i=0,r,l=0;l=65536?l+=2:l++)i=le(e,l),r=k[i],!r&&fe(i)?(n+=e[l],i>=65536&&(n+=e[l+1])):n+=r||Ul(i);return n}function Vl(e,n,i){var r=\"\",l=e.tag,t,o,u;for(t=0,o=i.length;t\"u\"&&P(e,n,null,!1,!1))&&(r!==\"\"&&(r+=\",\"+(e.condenseFlow?\"\":\" \")),r+=e.dump);e.tag=l,e.dump=\"[\"+r+\"]\"}function Jn(e,n,i,r){var l=\"\",t=e.tag,o,u,f;for(o=0,u=i.length;o\"u\"&&P(e,n+1,null,!0,!0,!1,!0))&&((!r||l!==\"\")&&(l+=nn(e,n)),e.dump&&te===e.dump.charCodeAt(0)?l+=\"-\":l+=\"- \",l+=e.dump);e.tag=t,e.dump=l||\"[]\"}function Zl(e,n,i){var r=\"\",l=e.tag,t=Object.keys(i),o,u,f,s,p;for(o=0,u=t.length;o1024&&(p+=\"? \"),p+=e.dump+(e.condenseFlow?'\"':\"\")+\":\"+(e.condenseFlow?\"\":\" \"),P(e,n,s,!1,!1)&&(p+=e.dump,r+=p));e.tag=l,e.dump=\"{\"+r+\"}\"}function eo(e,n,i,r){var l=\"\",t=e.tag,o=Object.keys(i),u,f,s,p,c,x;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==\"function\")o.sort(e.sortKeys);else if(e.sortKeys)throw new O(\"sortKeys must be a boolean or a function\");for(u=0,f=o.length;u1024,c&&(e.dump&&te===e.dump.charCodeAt(0)?x+=\"?\":x+=\"? \"),x+=e.dump,c&&(x+=nn(e,n)),P(e,n+1,p,!0,c)&&(e.dump&&te===e.dump.charCodeAt(0)?x+=\":\":x+=\": \",x+=e.dump,l+=x));e.tag=t,e.dump=l||\"{}\"}function Kn(e,n,i){var r,l,t,o,u,f;for(l=i?e.explicitTypes:e.implicitTypes,t=0,o=l.length;t tag resolver accepts not \"'+f+'\" style');e.dump=r}return!0}return!1}function P(e,n,i,r,l,t,o){e.tag=null,e.dump=i,Kn(e,i,!1)||Kn(e,i,!0);var u=ci.call(e.dump),f=r,s;r&&(r=e.flowLevel<0||e.flowLevel>n);var p=u===\"[object Object]\"||u===\"[object Array]\",c,x;if(p&&(c=e.duplicates.indexOf(i),x=c!==-1),(e.tag!==null&&e.tag!==\"?\"||x||e.indent!==2&&n>0)&&(l=!1),x&&e.usedDuplicates[c])e.dump=\"*ref_\"+c;else{if(p&&x&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),u===\"[object Object]\")r&&Object.keys(e.dump).length!==0?(eo(e,n,e.dump,l),x&&(e.dump=\"&ref_\"+c+e.dump)):(Zl(e,n,e.dump),x&&(e.dump=\"&ref_\"+c+\" \"+e.dump));else if(u===\"[object Array]\")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Jn(e,n-1,e.dump,l):Jn(e,n,e.dump,l),x&&(e.dump=\"&ref_\"+c+e.dump)):(Vl(e,n,e.dump),x&&(e.dump=\"&ref_\"+c+\" \"+e.dump));else if(u===\"[object String]\")e.tag!==\"?\"&&Kl(e,e.dump,n,t,f);else{if(u===\"[object Undefined]\")return!1;if(e.skipInvalid)return!1;throw new O(\"unacceptable kind of an object to dump \"+u)}e.tag!==null&&e.tag!==\"?\"&&(s=encodeURI(e.tag[0]===\"!\"?e.tag.slice(1):e.tag).replace(/!/g,\"%21\"),e.tag[0]===\"!\"?s=\"!\"+s:s.slice(0,18)===\"tag:yaml.org,2002:\"?s=\"!!\"+s.slice(18):s=\"!<\"+s+\">\",e.dump=s+\" \"+e.dump)}return!0}function no(e,n){var i=[],r=[],l,t;for(ln(e,i,r),l=0,t=r.length;l!(c in n)),p=[...f,...s];l.push({value:`{\n`});for(let c=0;c0)if(!w[0].removed&&!w[0].added)w[0].value=g+w[0].value;else{let C=w.find(b=>b.removed),E=w.find(b=>b.added);C&&(C.value=g+C.value),E&&(E.value=g+E.value)}if(d&&w.length>0){let C=w[w.length-1];C.value=C.value.replace(/\\n$/,d+`\n`)}l.push(...w)}}else if(a){let y=W(D(e[x],r),i+1);l.push({removed:!0,value:o+JSON.stringify(x)+\": \"+y+d+`\n`})}else{let y=W(D(n[x],r),i+1);l.push({added:!0,value:o+JSON.stringify(x)+\": \"+y+d+`\n`})}}return l.push({value:t+`}\n`}),l}function po(e,n,i,r=\"json\"){let l=[],t=\" \".repeat(i),o=\" \".repeat(i+1);l.push({value:`[\n`});let u=Math.max(e.length,n.length);for(let f=0;f=e.length){let c=W(D(n[f],r),i+1);l.push({added:!0,value:o+c+p+`\n`})}else if(f>=n.length){let c=W(D(e[f],r),i+1);l.push({removed:!0,value:o+c+p+`\n`})}else{let c=D(e[f],r),x=D(n[f],r);if(c===x){let v=W(c,i+1);l.push({value:o+v+p+`\n`})}else{let v=cn(e[f],n[f],i+1,r);if(v.length>0&&(v[0].value=o+v[0].value),p&&v.length>0){let d=v[v.length-1];d.value=d.value.replace(/\\n$/,p+`\n`)}l.push(...v)}}}return l.push({value:t+`]\n`}),l}function ho(e,n,i,r=\"json\"){let l=W(e,i),t=W(n,i);return T(l,t).map(u=>({value:u.value,added:u.added,removed:u.removed}))}function W(e,n,i=\"json\"){if(n===0)return e;let r=\" \".repeat(n);return e.split(`\n`).map((l,t)=>t===0?l:r+l).join(`\n`)}var Ci=e=>e===\"\"?[]:e.replace(/\\n$/,\"\").split(`\n`),mo=(e,n,i=\"diffChars\")=>{let l=(typeof i==\"string\"?to[i]:i)(e,n),t={left:[],right:[]};return l.forEach(({added:o,removed:u,value:f})=>{if(o)t.right.push({type:1,value:f});else if(u)t.left.push({type:2,value:f});else{let s={type:0,value:f};t.right.push(s),t.left.push(s)}}),t},bi=(e,n,i=!1,r=\"diffChars\",l=0,t=[],o=!1)=>{let u=[];if(typeof e==\"string\"&&typeof n==\"string\")if(r===\"diffJson\")u=ao(e,n);else if(r===\"diffYaml\")try{u=so(e,n)}catch{u=T(e,n,{newlineIsToken:!1})}else u=T(e,n,{newlineIsToken:!1});else u=fo(e,n);let f=l,s=l,p=[],c=0,x=[],v=[],d=(a,m,y,h,g)=>Ci(a).map((C,E)=>{let b={},S={};if(!(v.includes(`${m}-${E}`)||g&&E!==0)){if(y||h){let M=!0;if(h){s+=1,b.lineNumber=s,b.type=2,b.value=C||\" \";let V=u[m+1];if(V?.added){let Z=Ci(V.value)[E];if(Z){let Si=d(Z,m,!0,!1,!0),{value:U,lineNumber:Ei,type:Fi}=Si[0].right;if(v.push(`${m+1}-${E}`),S.lineNumber=Ei,b.value===U)M=!1,S.type=0,b.type=0,S.value=U;else{S.type=Fi;let dn=500,_i=C.length>dn||U.length>dn;if(i||_i)S.value=U;else if(o)b.rawValue=C,b.value=C,S.rawValue=U,S.value=U;else{let pn=mo(C,U,r);S.value=pn.right,b.value=pn.left}}}}}else f+=1,S.lineNumber=f,S.type=1,S.value=C;M&&!g&&(x.includes(c)||x.push(c))}else s+=1,f+=1,b.lineNumber=s,b.type=0,b.value=C,S.lineNumber=f,S.type=0,S.value=C;return(t?.includes(`L-${b.lineNumber}`)||t?.includes(`R-${S.lineNumber}`)&&!x.includes(c))&&x.push(c),g||(c+=1),{right:S,left:b}}}).filter(C=>C!=null);return u.forEach(({added:a,removed:m,value:y},h)=>{p=[...p,...d(y,h,a,m)]}),{lineInformation:p,diffLines:x}};self.onmessage=e=>{let{oldString:n,newString:i,disableWordDiff:r,lineCompareMethod:l,linesOffset:t,showLines:o,deferWordDiff:u}=e.data,f=bi(n,i,r,l,t,o,u);self.postMessage(f)};})();\n/*! Bundled license information:\n\njs-yaml/dist/js-yaml.mjs:\n (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)\n*/\n";