react-diff-viewer-continued 4.1.3 → 4.2.2
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.
- package/.claude/settings.local.json +2 -1
- package/.github/workflows/release.yml +2 -2
- package/CHANGELOG.md +27 -0
- package/lib/cjs/src/compute-hidden-blocks.d.ts +1 -1
- package/lib/cjs/src/compute-lines.d.ts +4 -4
- package/lib/cjs/src/compute-lines.js +18 -23
- package/lib/cjs/src/computeWorker.js +1 -1
- package/lib/cjs/src/index.d.ts +15 -5
- package/lib/cjs/src/index.js +113 -96
- package/lib/cjs/src/styles.d.ts +38 -32
- package/lib/cjs/src/styles.js +3 -7
- package/lib/cjs/src/workerBundle.d.ts +1 -1
- package/lib/cjs/src/workerBundle.js +1 -1
- package/lib/esm/src/compute-lines.js +18 -23
- package/lib/esm/src/computeWorker.js +1 -1
- package/lib/esm/src/index.js +100 -78
- package/lib/esm/src/styles.js +4 -8
- package/lib/esm/src/workerBundle.js +1 -1
- package/package.json +14 -14
- package/scripts/build-worker.js +1 -1
- package/tsconfig.json +3 -4
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Bundled worker code as a string.
|
|
5
5
|
* This allows us to create a Blob URL at runtime without needing a separate file.
|
|
6
6
|
*/
|
|
7
|
-
export const WORKER_CODE = "(()=>{var Si=Object.defineProperty;var bi=(e,n)=>{for(var i in n)Si(e,i,{get:n[i],enumerable:!0})};var $e={};bi($e,{Diff:()=>b,FILE_HEADERS_ONLY:()=>_n,INCLUDE_HEADERS:()=>Ue,OMIT_HEADERS:()=>Ln,applyPatch:()=>je,applyPatches:()=>bn,arrayDiff:()=>Pe,canonicalize:()=>V,characterDiff:()=>ye,convertChangesToDMP:()=>On,convertChangesToXML:()=>In,createPatch:()=>Fn,createTwoFilesPatch:()=>Ye,cssDiff:()=>Ne,diffArrays:()=>wn,diffChars:()=>sn,diffCss:()=>yn,diffJson:()=>An,diffLines:()=>N,diffSentences:()=>vn,diffTrimmedLines:()=>xn,diffWords:()=>mn,diffWordsWithSpace:()=>Le,formatPatch:()=>ee,jsonDiff:()=>Re,lineDiff:()=>ce,parsePatch:()=>Z,reversePatch:()=>Be,sentenceDiff:()=>ke,structuredPatch:()=>ae,wordDiff:()=>be,wordsWithSpaceDiff:()=>_e});var b=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=m=>{if(m=this.postProcess(m,r),l){setTimeout(function(){l(m)},0);return}else return m},u=i.length,f=n.length,c=1,s=u+f;r.maxEditLength!=null&&(s=Math.min(s,r.maxEditLength));let a=(t=r.timeout)!==null&&t!==void 0?t:1/0,p=Date.now()+a,d=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(d[0],i,n,0,r);if(d[0].oldPos+1>=f&&h+1>=u)return o(this.buildValues(d[0].lastComponent,i,n));let g=-1/0,y=1/0,w=()=>{for(let m=Math.max(g,-c);m<=Math.min(y,c);m+=2){let x,A=d[m-1],C=d[m+1];A&&(d[m-1]=void 0);let F=!1;if(C){let S=C.oldPos-m;F=C&&0<=S&&S<u}let E=A&&A.oldPos+1<f;if(!F&&!E){d[m]=void 0;continue}if(!E||F&&A.oldPos<C.oldPos?x=this.addToPath(C,!0,!1,0,r):x=this.addToPath(A,!1,!0,1,r),h=this.extractCommon(x,i,n,m,r),x.oldPos+1>=f&&h+1>=u)return o(this.buildValues(x.lastComponent,i,n))||!0;d[m]=x,x.oldPos+1>=f&&(y=Math.min(y,m-1)),h+1>=u&&(g=Math.max(g,m+1))}c++};if(l)(function m(){setTimeout(function(){if(c>s||Date.now()>p)return l(void 0);w()||m()},0)})();else for(;c<=s&&Date.now()<=p;){let m=w();if(m)return m}}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,c=f-l,s=0;for(;c+1<o&&f+1<u&&this.equals(r[f+1],i[c+1],t);)c++,f++,s++,t.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return s&&!t.oneChangePerToken&&(n.lastComponent={count:s,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=f,c}equals(n,i,r){return r.comparator?r.comparator(n,i):n===i||!!r.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){let i=[];for(let r=0;r<n.length;r++)n[r]&&i.push(n[r]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join(\"\")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,r){let l=[],t;for(;n;)l.push(n),t=n.previousComponent,delete n.previousComponent,n=t;l.reverse();let o=l.length,u=0,f=0,c=0;for(;u<o;u++){let s=l[u];if(s.removed)s.value=this.join(r.slice(c,c+s.count)),c+=s.count;else{if(!s.added&&this.useLongestToken){let a=i.slice(f,f+s.count);a=a.map(function(p,d){let h=r[c+d];return h.length>p.length?h:p}),s.value=this.join(a)}else s.value=this.join(i.slice(f,f+s.count));f+=s.count,s.added||(c+=s.count)}}return l}};var ve=class extends b{},ye=new ve;function sn(e,n,i){return ye.diff(e,n,i)}function Ae(e,n){let i;for(i=0;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function we(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return\"\";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function te(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function ue(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function q(e,n){return te(e,n,\"\")}function X(e,n){return ue(e,n,\"\")}function Ce(e,n){return n.slice(0,_i(e,n))}function _i(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let r=n.length;e.length<n.length&&(r=e.length);let l=Array(r),t=0;l[0]=0;for(let o=1;o<r;o++){for(n[o]==n[t]?l[o]=l[t]:l[o]=t;t>0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o<e.length;o++){for(;t>0&&e[o]!=n[t];)t=l[t];e[o]==n[t]&&t++}return t}function pn(e){return e.includes(`\\r\n`)&&!e.startsWith(`\n`)&&!e.match(/[^\\r]\\n/)}function dn(e){return!e.includes(`\\r\n`)&&e.includes(`\n`)}function z(e){let n;for(n=e.length-1;n>=0&&e[n].match(/\\s/);n--);return e.substring(n+1)}function M(e){let n=e.match(/^\\s*/);return n?n[0]:\"\"}var fe=\"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}\",Li=new RegExp(`[${fe}]+|\\\\s+|[^${fe}]`,\"ug\"),Ee=class extends b{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=[];for(let u of Array.from(o.segment(n))){let f=u.segment;r.length&&/\\s/.test(r[r.length-1])&&/\\s/.test(f)?r[r.length-1]+=f:r.push(f)}}else r=n.match(Li)||[];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)&&hn(r,t,l,o),r=o,l=null,t=null)}),(l||t)&&hn(r,t,l,null),n}},be=new Ee;function mn(e,n,i){return i?.ignoreWhitespace!=null&&!i.ignoreWhitespace?Le(e,n,i):be.diff(e,n,i)}function hn(e,n,i,r){if(n&&i){let l=M(n.value),t=z(n.value),o=M(i.value),u=z(i.value);if(e){let f=Ae(l,o);e.value=ue(e.value,o,f),n.value=q(n.value,f),i.value=q(i.value,f)}if(r){let f=we(t,u);r.value=te(r.value,u,f),n.value=X(n.value,f),i.value=X(i.value,f)}}else if(i){if(e){let l=M(i.value);i.value=i.value.substring(l.length)}if(r){let l=M(r.value);r.value=r.value.substring(l.length)}}else if(e&&r){let l=M(r.value),t=M(n.value),o=z(n.value),u=Ae(l,t);n.value=q(n.value,u);let f=we(q(l,u),o);n.value=X(n.value,f),r.value=te(r.value,l,f),e.value=ue(e.value,l,l.slice(0,l.length-f.length))}else if(r){let l=M(r.value),t=z(n.value),o=Ce(t,l);n.value=X(n.value,o)}else if(e){let l=z(e.value),t=M(n.value),o=Ce(l,t);n.value=q(n.value,o)}}var Se=class extends b{tokenize(n){let i=new RegExp(`(\\\\r?\\\\n)|[${fe}]+|[^\\\\S\\\\n\\\\r]+|[^${fe}]`,\"ug\");return n.match(i)||[]}},_e=new Se;function Le(e,n,i){return _e.diff(e,n,i)}function gn(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 Fe=class extends b{constructor(){super(...arguments),this.tokenize=Oe}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)}},ce=new Fe;function N(e,n,i){return ce.diff(e,n,i)}function xn(e,n,i){return i=gn(i,{ignoreWhitespace:!0}),ce.diff(e,n,i)}function Oe(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;l<r.length;l++){let t=r[l];l%2&&!n.newlineIsToken?i[i.length-1]+=t:i.push(t)}return i}function Fi(e){return e==\".\"||e==\"!\"||e==\"?\"}var Ie=class extends b{tokenize(n){var i;let r=[],l=0;for(let t=0;t<n.length;t++){if(t==n.length-1){r.push(n.slice(l));break}if(Fi(n[t])&&n[t+1].match(/\\s/)){for(r.push(n.slice(l,t+1)),t=l=t+1;!((i=n[t+1])===null||i===void 0)&&i.match(/\\s/);)t++;r.push(n.slice(l,t+1)),l=t+1}}return r}},ke=new Ie;function vn(e,n,i){return ke.diff(e,n,i)}var Te=class extends b{tokenize(n){return n.split(/([{}:;,]|\\s+)/)}},Ne=new Te;function yn(e,n,i){return Ne.diff(e,n,i)}var De=class extends b{constructor(){super(...arguments),this.tokenize=Oe}get useLongestToken(){return!0}castInput(n,i){let{undefinedReplacement:r,stringifyReplacer:l=(t,o)=>typeof o>\"u\"?r:o}=i;return typeof n==\"string\"?n:JSON.stringify(V(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)}},Re=new De;function An(e,n,i){return Re.diff(e,n,i)}function V(e,n,i,r,l){n=n||[],i=i||[],r&&(e=r(l===void 0?\"\":l,e));let t;for(t=0;t<n.length;t+=1)if(n[t]===e)return i[t];let o;if(Object.prototype.toString.call(e)===\"[object Array]\"){for(n.push(e),o=new Array(e.length),i.push(o),t=0;t<e.length;t+=1)o[t]=V(e[t],n,i,r,String(t));return n.pop(),i.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==\"object\"&&e!==null){n.push(e),o={},i.push(o);let u=[],f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&u.push(f);for(u.sort(),t=0;t<u.length;t+=1)f=u[t],o[f]=V(e[f],n,i,r,f);n.pop(),i.pop()}else o=e;return o}var Me=class extends b{tokenize(n){return n.slice()}join(n){return n}removeEmpty(n){return n}},Pe=new Me;function wn(e,n,i){return Pe.diff(e,n,i)}function We(e){return Array.isArray(e)?e.map(n=>We(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 He(e){return Array.isArray(e)?e.map(n=>He(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 Cn(e){return Array.isArray(e)||(e=[e]),!e.some(n=>n.hunks.some(i=>i.lines.some(r=>!r.startsWith(\"\\\\\")&&r.endsWith(\"\\r\"))))}function En(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 Z(e){let n=e.split(/\\n/),i=[],r=0;function l(){let u={};for(i.push(u);r<n.length;){let f=n[r];if(/^(---|\\+\\+\\+|@@)\\s/.test(f))break;let c=/^(?:Index:|diff(?: -r \\w+)+)\\s+/.exec(f);c&&(u.index=f.substring(c[0].length).trim()),r++}for(t(u),t(u),u.hunks=[];r<n.length;){let f=n[r];if(/^(Index:\\s|diff\\s|---\\s|\\+\\+\\+\\s|===================================================================)/.test(f))break;if(/^@@/.test(f))u.hunks.push(o());else{if(f)throw new Error(\"Unknown line \"+(r+1)+\" \"+JSON.stringify(f));r++}}}function t(u){let f=/^(---|\\+\\+\\+)\\s+/.exec(n[r]);if(f){let c=f[1],s=n[r].substring(3).trim().split(\"\t\",2),a=(s[1]||\"\").trim(),p=s[0].replace(/\\\\\\\\/g,\"\\\\\");p.startsWith('\"')&&p.endsWith('\"')&&(p=p.substr(1,p.length-2)),c===\"---\"?(u.oldFileName=p,u.oldHeader=a):(u.newFileName=p,u.newHeader=a),r++}}function o(){var u;let f=r,c=n[r++],s=c.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/),a={oldStart:+s[1],oldLines:typeof s[2]>\"u\"?1:+s[2],newStart:+s[3],newLines:typeof s[4]>\"u\"?1:+s[4],lines:[]};a.oldLines===0&&(a.oldStart+=1),a.newLines===0&&(a.newStart+=1);let p=0,d=0;for(;r<n.length&&(d<a.oldLines||p<a.newLines||!((u=n[r])===null||u===void 0)&&u.startsWith(\"\\\\\"));r++){let h=n[r].length==0&&r!=n.length-1?\" \":n[r][0];if(h===\"+\"||h===\"-\"||h===\" \"||h===\"\\\\\")a.lines.push(n[r]),h===\"+\"?p++:h===\"-\"?d++:h===\" \"&&(p++,d++);else throw new Error(`Hunk at line ${f+1} contained invalid line ${n[r]}`)}if(!p&&a.newLines===1&&(a.newLines=0),!d&&a.oldLines===1&&(a.oldLines=0),p!==a.newLines)throw new Error(\"Added line count did not match for hunk at line \"+(f+1));if(d!==a.oldLines)throw new Error(\"Removed line count did not match for hunk at line \"+(f+1));return a}for(;r<n.length;)l();return i}function Sn(e,n,i){let r=!0,l=!1,t=!1,o=1;return function u(){if(r&&!t){if(l?o++:r=!1,e+o<=i)return e+o;t=!0}if(!l)return t||(r=!0),n<=e-o?e-o++:(l=!0,u())}}function je(e,n,i={}){let r;if(typeof n==\"string\"?r=Z(n):Array.isArray(n)?r=n:r=[n],r.length>1)throw new Error(\"applyPatch only works with a single input.\");return Oi(e,r[0],i)}function Oi(e,n,i={}){(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(pn(e)&&Cn(n)?n=We(n):dn(e)&&En(n)&&(n=He(n)));let r=e.split(`\n`),l=n.hunks,t=i.compareLine||((h,g,y,w)=>g===w),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=\"\",c=!1,s=!1;for(let h=0;h<l[l.length-1].lines.length;h++){let g=l[l.length-1].lines[h];g[0]==\"\\\\\"&&(f[0]==\"+\"?c=!0:f[0]==\"-\"&&(s=!0)),f=g}if(c){if(s){if(!o&&r[r.length-1]==\"\")return!1}else if(r[r.length-1]==\"\")r.pop();else if(!o)return!1}else if(s){if(r[r.length-1]!=\"\")r.push(\"\");else if(!o)return!1}function a(h,g,y,w=0,m=!0,x=[],A=0){let C=0,F=!1;for(;w<h.length;w++){let E=h[w],S=E.length>0?E[0]:\" \",$=E.length>0?E.substr(1):E;if(S===\"-\")if(t(g+1,r[g],S,$))g++,C=0;else return!y||r[g]==null?null:(x[A]=r[g],a(h,g+1,y-1,w,!1,x,A+1));if(S===\"+\"){if(!m)return null;x[A]=$,A++,C=0,F=!0}if(S===\" \")if(C++,x[A]=r[g],t(g+1,r[g],S,$))A++,m=!0,F=!1,g++;else return F||!y?null:r[g]&&(a(h,g+1,y-1,w+1,!1,x,A+1)||a(h,g+1,y-1,w,!1,x,A+1))||a(h,g,y-1,w+1,!1,x,A)}return A-=C,g-=C,x.length=A,{patchedLines:x,oldLineLastI:g-1}}let p=[],d=0;for(let h=0;h<l.length;h++){let g=l[h],y,w=r.length-g.oldLines+o,m;for(let x=0;x<=o;x++){m=g.oldStart+d-1;let A=Sn(m,u,w);for(;m!==void 0&&(y=a(g.lines,m,x),!y);m=A());if(y)break}if(!y)return!1;for(let x=u;x<m;x++)p.push(r[x]);for(let x=0;x<y.patchedLines.length;x++){let A=y.patchedLines[x];p.push(A)}u=y.oldLineLastI+1,d=m+1-g.oldStart}for(let h=u;h<r.length;h++)p.push(r[h]);return p.join(`\n`)}function bn(e,n){let i=typeof e==\"string\"?Z(e):e,r=0;function l(){let t=i[r++];if(!t)return n.complete();n.loadFile(t,function(o,u){if(o)return n.complete(o);let f=je(u,t,n);n.patched(t,f,function(c){if(c)return n.complete(c);l()})})}l()}function Be(e){return Array.isArray(e)?e.map(n=>Be(n)).reverse():Object.assign(Object.assign({},e),{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(n=>({oldLines:n.newLines,oldStart:n.newStart,newLines:n.oldLines,newStart:n.oldStart,lines:n.lines.map(i=>i.startsWith(\"-\")?`+${i.slice(1)}`:i.startsWith(\"+\")?`-${i.slice(1)}`:i)}))})}var Ue={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},_n={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Ln={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function ae(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:s}=u;N(i,r,Object.assign(Object.assign({},u),{callback:a=>{let p=c(a);s(p)}}))}else return c(N(i,r,u));function c(s){if(!s)return;s.push({value:\"\",lines:[]});function a(m){return m.map(function(x){return\" \"+x})}let p=[],d=0,h=0,g=[],y=1,w=1;for(let m=0;m<s.length;m++){let x=s[m],A=x.lines||Ii(x.value);if(x.lines=A,x.added||x.removed){if(!d){let C=s[m-1];d=y,h=w,C&&(g=f>0?a(C.lines.slice(-f)):[],d-=g.length,h-=g.length)}for(let C of A)g.push((x.added?\"+\":\"-\")+C);x.added?w+=A.length:y+=A.length}else{if(d)if(A.length<=f*2&&m<s.length-2)for(let C of a(A))g.push(C);else{let C=Math.min(A.length,f);for(let E of a(A.slice(0,C)))g.push(E);let F={oldStart:d,oldLines:y-d+C,newStart:h,newLines:w-h+C,lines:g};p.push(F),d=0,h=0,g=[]}y+=A.length,w+=A.length}}for(let m of p)for(let x=0;x<m.lines.length;x++)m.lines[x].endsWith(`\n`)?m.lines[x]=m.lines[x].slice(0,-1):(m.lines.splice(x+1,0,\"\\\\"),x++);return{oldFileName:e,newFileName:n,oldHeader:l,newHeader:t,hunks:p}}}function ee(e,n){if(n||(n=Ue),Array.isArray(e)){if(e.length>1&&!n.includeFileHeaders)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(r=>ee(r,n)).join(`\n`)}let i=[];n.includeIndex&&e.oldFileName==e.newFileName&&i.push(\"Index: \"+e.oldFileName),n.includeUnderline&&i.push(\"===================================================================\"),n.includeFileHeaders&&(i.push(\"--- \"+e.oldFileName+(typeof e.oldHeader>\"u\"?\"\":\"\t\"+e.oldHeader)),i.push(\"+++ \"+e.newFileName+(typeof e.newHeader>\"u\"?\"\":\"\t\"+e.newHeader)));for(let r=0;r<e.hunks.length;r++){let l=e.hunks[r];l.oldLines===0&&(l.oldStart-=1),l.newLines===0&&(l.newStart-=1),i.push(\"@@ -\"+l.oldStart+\",\"+l.oldLines+\" +\"+l.newStart+\",\"+l.newLines+\" @@\");for(let t of l.lines)i.push(t)}return i.join(`\n`)+`\n`}function Ye(e,n,i,r,l,t,o){if(typeof o==\"function\"&&(o={callback:o}),o?.callback){let{callback:u}=o;ae(e,n,i,r,l,t,Object.assign(Object.assign({},o),{callback:f=>{u(f?ee(f,o.headerOptions):void 0)}}))}else{let u=ae(e,n,i,r,l,t,o);return u?ee(u,o?.headerOptions):void 0}}function Fn(e,n,i,r,l,t){return Ye(e,e,n,i,r,l,t)}function Ii(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 On(e){let n=[],i,r;for(let l=0;l<e.length;l++)i=e[l],i.added?r=1:i.removed?r=-1:r=0,n.push([r,i.value]);return n}function In(e){let n=[];for(let i=0;i<e.length;i++){let r=e[i];r.added?n.push(\"<ins>\"):r.removed&&n.push(\"<del>\"),n.push(ki(r.value)),r.added?n.push(\"</ins>\"):r.removed&&n.push(\"</del>\")}return n.join(\"\")}function ki(e){let n=e;return n=n.replace(/&/g,\"&\"),n=n.replace(/</g,\"<\"),n=n.replace(/>/g,\">\"),n=n.replace(/\"/g,\""\"),n}function zn(e){return typeof e>\"u\"||e===null}function Ti(e){return typeof e==\"object\"&&e!==null}function Ni(e){return Array.isArray(e)?e:zn(e)?[]:[e]}function Di(e,n){var i,r,l,t;if(n)for(t=Object.keys(n),i=0,r=t.length;i<r;i+=1)l=t[i],e[l]=n[l];return e}function Ri(e,n){var i=\"\",r;for(r=0;r<n;r+=1)i+=e;return i}function Mi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Pi=zn,Wi=Ti,Hi=Ni,ji=Ri,Bi=Mi,Ui=Di,L={isNothing:Pi,isObject:Wi,toArray:Hi,repeat:ji,isNegativeZero:Bi,extend:Ui};function Gn(e,n){var i=\"\",r=e.reason||\"(unknown reason)\";return e.mark?(e.mark.name&&(i+='in \"'+e.mark.name+'\" '),i+=\"(\"+(e.mark.line+1)+\":\"+(e.mark.column+1)+\")\",!n&&e.mark.snippet&&(i+=`\n\n`+e.mark.snippet),r+\" \"+i):r}function ie(e,n){Error.call(this),this.name=\"YAMLException\",this.reason=e,this.mark=n,this.message=Gn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\"}ie.prototype=Object.create(Error.prototype);ie.prototype.constructor=ie;ie.prototype.toString=function(n){return this.name+\": \"+Gn(this,n)};var k=ie;function qe(e,n,i,r,l){var t=\"\",o=\"\",u=Math.floor(l/2)-1;return r-n>u&&(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 ze(e,n){return L.repeat(\" \",n-e.length)+e}function Yi(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,c,s=Math.min(e.line+n.linesAfter,l.length).toString().length,a=n.maxLength-(n.indent+s+3);for(f=1;f<=n.linesBefore&&!(o-f<0);f++)c=qe(e.buffer,r[o-f],l[o-f],e.position-(r[o]-r[o-f]),a),u=L.repeat(\" \",n.indent)+ze((e.line-f+1).toString(),s)+\" | \"+c.str+`\n`+u;for(c=qe(e.buffer,r[o],l[o],e.position,a),u+=L.repeat(\" \",n.indent)+ze((e.line+1).toString(),s)+\" | \"+c.str+`\n`,u+=L.repeat(\"-\",n.indent+s+3+c.pos)+`^\n`,f=1;f<=n.linesAfter&&!(o+f>=l.length);f++)c=qe(e.buffer,r[o+f],l[o+f],e.position-(r[o]-r[o+f]),a),u+=L.repeat(\" \",n.indent)+ze((e.line+f+1).toString(),s)+\" | \"+c.str+`\n`;return u.replace(/\\n$/,\"\")}var $i=Yi,qi=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],zi=[\"scalar\",\"sequence\",\"mapping\"];function Gi(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Ji(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(qi.indexOf(i)===-1)throw new k('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=Gi(n.styleAliases||null),zi.indexOf(this.kind)===-1)throw new k('Unknown kind \"'+this.kind+'\" is specified for \"'+e+'\" YAML type.')}var O=Ji;function kn(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 Ki(){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<i;n+=1)arguments[n].forEach(r);return e}function Je(e){return this.extend(e)}Je.prototype.extend=function(n){var i=[],r=[];if(n instanceof O)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new k(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");i.forEach(function(t){if(!(t instanceof O))throw new k(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(t.loadKind&&t.loadKind!==\"scalar\")throw new k(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(t.multi)throw new k(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")}),r.forEach(function(t){if(!(t instanceof O))throw new k(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")});var l=Object.create(Je.prototype);return l.implicit=(this.implicit||[]).concat(i),l.explicit=(this.explicit||[]).concat(r),l.compiledImplicit=kn(l,\"implicit\"),l.compiledExplicit=kn(l,\"explicit\"),l.compiledTypeMap=Ki(l.compiledImplicit,l.compiledExplicit),l};var Qi=Je,Xi=new O(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(e){return e!==null?e:\"\"}}),Vi=new O(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(e){return e!==null?e:[]}}),Zi=new O(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(e){return e!==null?e:{}}}),er=new Qi({explicit:[Xi,Vi,Zi]});function nr(e){if(e===null)return!0;var n=e.length;return n===1&&e===\"~\"||n===4&&(e===\"null\"||e===\"Null\"||e===\"NULL\")}function ir(){return null}function rr(e){return e===null}var lr=new O(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:nr,construct:ir,predicate:rr,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});function or(e){if(e===null)return!1;var n=e.length;return n===4&&(e===\"true\"||e===\"True\"||e===\"TRUE\")||n===5&&(e===\"false\"||e===\"False\"||e===\"FALSE\")}function tr(e){return e===\"true\"||e===\"True\"||e===\"TRUE\"}function ur(e){return Object.prototype.toString.call(e)===\"[object Boolean]\"}var fr=new O(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:or,construct:tr,predicate:ur,represent:{lowercase:function(e){return e?\"true\":\"false\"},uppercase:function(e){return e?\"TRUE\":\"FALSE\"},camelcase:function(e){return e?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function cr(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ar(e){return 48<=e&&e<=55}function sr(e){return 48<=e&&e<=57}function pr(e){if(e===null)return!1;var n=e.length,i=0,r=!1,l;if(!n)return!1;if(l=e[i],(l===\"-\"||l===\"+\")&&(l=e[++i]),l===\"0\"){if(i+1===n)return!0;if(l=e[++i],l===\"b\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(l!==\"0\"&&l!==\"1\")return!1;r=!0}return r&&l!==\"_\"}if(l===\"x\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(!cr(e.charCodeAt(i)))return!1;r=!0}return r&&l!==\"_\"}if(l===\"o\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(!ar(e.charCodeAt(i)))return!1;r=!0}return r&&l!==\"_\"}}if(l===\"_\")return!1;for(;i<n;i++)if(l=e[i],l!==\"_\"){if(!sr(e.charCodeAt(i)))return!1;r=!0}return!(!r||l===\"_\")}function dr(e){var n=e,i=1,r;if(n.indexOf(\"_\")!==-1&&(n=n.replace(/_/g,\"\")),r=n[0],(r===\"-\"||r===\"+\")&&(r===\"-\"&&(i=-1),n=n.slice(1),r=n[0]),n===\"0\")return 0;if(r===\"0\"){if(n[1]===\"b\")return i*parseInt(n.slice(2),2);if(n[1]===\"x\")return i*parseInt(n.slice(2),16);if(n[1]===\"o\")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function hr(e){return Object.prototype.toString.call(e)===\"[object Number]\"&&e%1===0&&!L.isNegativeZero(e)}var mr=new O(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:pr,construct:dr,predicate:hr,represent:{binary:function(e){return e>=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\"]}}),gr=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function xr(e){return!(e===null||!gr.test(e)||e[e.length-1]===\"_\")}function vr(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 yr=/^[-+]?[0-9]+e/;function Ar(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),yr.test(i)?i.replace(\"e\",\".e\"):i}function wr(e){return Object.prototype.toString.call(e)===\"[object Number]\"&&(e%1!==0||L.isNegativeZero(e))}var Cr=new O(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:xr,construct:vr,predicate:wr,represent:Ar,defaultStyle:\"lowercase\"}),Er=er.extend({implicit:[lr,fr,mr,Cr]}),Sr=Er,Jn=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),Kn=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 br(e){return e===null?!1:Jn.exec(e)!==null||Kn.exec(e)!==null}function _r(e){var n,i,r,l,t,o,u,f=0,c=null,s,a,p;if(n=Jn.exec(e),n===null&&(n=Kn.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]&&(s=+n[10],a=+(n[11]||0),c=(s*60+a)*6e4,n[9]===\"-\"&&(c=-c)),p=new Date(Date.UTC(i,r,l,t,o,u,f)),c&&p.setTime(p.getTime()-c),p}function Lr(e){return e.toISOString()}var Fr=new O(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:br,construct:_r,instanceOf:Date,represent:Lr});function Or(e){return e===\"<<\"||e===null}var Ir=new O(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:Or}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function kr(e){if(e===null)return!1;var n,i,r=0,l=e.length,t=Ze;for(i=0;i<l;i++)if(n=t.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Tr(e){var n,i,r=e.replace(/[\\r\\n=]/g,\"\"),l=r.length,t=Ze,o=0,u=[];for(n=0;n<l;n++)n%4===0&&n&&(u.push(o>>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 Nr(e){var n=\"\",i=0,r,l,t=e.length,o=Ze;for(r=0;r<t;r++)r%3===0&&r&&(n+=o[i>>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 Dr(e){return Object.prototype.toString.call(e)===\"[object Uint8Array]\"}var Rr=new O(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:kr,construct:Tr,predicate:Dr,represent:Nr}),Mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.toString;function Wr(e){if(e===null)return!0;var n=[],i,r,l,t,o,u=e;for(i=0,r=u.length;i<r;i+=1){if(l=u[i],o=!1,Pr.call(l)!==\"[object Object]\")return!1;for(t in l)if(Mr.call(l,t))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(t)===-1)n.push(t);else return!1}return!0}function Hr(e){return e!==null?e:[]}var jr=new O(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:Wr,construct:Hr}),Br=Object.prototype.toString;function Ur(e){if(e===null)return!0;var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],Br.call(r)!==\"[object Object]\"||(l=Object.keys(r),l.length!==1))return!1;t[n]=[l[0],r[l[0]]]}return!0}function Yr(e){if(e===null)return[];var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],l=Object.keys(r),t[n]=[l[0],r[l[0]]];return t}var $r=new O(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:Ur,construct:Yr}),qr=Object.prototype.hasOwnProperty;function zr(e){if(e===null)return!0;var n,i=e;for(n in i)if(qr.call(i,n)&&i[n]!==null)return!1;return!0}function Gr(e){return e!==null?e:{}}var Jr=new O(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:zr,construct:Gr}),Qn=Sr.extend({implicit:[Fr,Ir],explicit:[Rr,jr,$r,Jr]}),j=Object.prototype.hasOwnProperty,se=1,Xn=2,Vn=3,pe=4,Ge=1,Kr=2,Tn=3,Qr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Xr=/[\\x85\\u2028\\u2029]/,Vr=/[,\\[\\]\\{\\}]/,Zn=/^(?:!|!!|![a-z\\-]+!)$/i,ei=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function Nn(e){return Object.prototype.toString.call(e)}function R(e){return e===10||e===13}function Y(e){return e===9||e===32}function T(e){return e===9||e===32||e===10||e===13}function J(e){return e===44||e===91||e===93||e===123||e===125}function Zr(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function el(e){return e===120?2:e===117?4:e===85?8:0}function nl(e){return 48<=e&&e<=57?e-48:-1}function Dn(e){return e===48?\"\\0\":e===97?\"\\x07\":e===98?\"\\b\":e===116||e===9?\"\t\":e===110?`\n`:e===118?\"\\v\":e===102?\"\\f\":e===114?\"\\r\":e===101?\"\\x1B\":e===32?\" \":e===34?'\"':e===47?\"/\":e===92?\"\\\\\":e===78?\"\\x85\":e===95?\"\\xA0\":e===76?\"\\u2028\":e===80?\"\\u2029\":\"\"}function il(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ni(e,n,i){n===\"__proto__\"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var ii=new Array(256),ri=new Array(256);for(U=0;U<256;U++)ii[U]=Dn(U)?1:0,ri[U]=Dn(U);var U;function rl(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Qn,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 li(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=$i(i),new k(n,i)}function v(e,n){throw li(e,n)}function de(e,n){e.onWarning&&e.onWarning.call(null,li(e,n))}var Rn={YAML:function(n,i,r){var l,t,o;n.version!==null&&v(n,\"duplication of %YAML directive\"),r.length!==1&&v(n,\"YAML directive accepts exactly one argument\"),l=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]),l===null&&v(n,\"ill-formed argument of the YAML directive\"),t=parseInt(l[1],10),o=parseInt(l[2],10),t!==1&&v(n,\"unacceptable YAML version of the document\"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&de(n,\"unsupported YAML version of the document\")},TAG:function(n,i,r){var l,t;r.length!==2&&v(n,\"TAG directive accepts exactly two arguments\"),l=r[0],t=r[1],Zn.test(l)||v(n,\"ill-formed tag handle (first argument) of the TAG directive\"),j.call(n.tagMap,l)&&v(n,'there is a previously declared suffix for \"'+l+'\" tag handle'),ei.test(t)||v(n,\"ill-formed tag prefix (second argument) of the TAG directive\");try{t=decodeURIComponent(t)}catch{v(n,\"tag prefix is malformed: \"+t)}n.tagMap[l]=t}};function H(e,n,i,r){var l,t,o,u;if(n<i){if(u=e.input.slice(n,i),r)for(l=0,t=u.length;l<t;l+=1)o=u.charCodeAt(l),o===9||32<=o&&o<=1114111||v(e,\"expected valid JSON character\");else Qr.test(u)&&v(e,\"the stream contains non-printable characters\");e.result+=u}}function Mn(e,n,i,r){var l,t,o,u;for(L.isObject(i)||v(e,\"cannot merge mappings; the provided source object is unacceptable\"),l=Object.keys(i),o=0,u=l.length;o<u;o+=1)t=l[o],j.call(n,t)||(ni(n,t,i[t]),r[t]=!0)}function K(e,n,i,r,l,t,o,u,f){var c,s;if(Array.isArray(l))for(l=Array.prototype.slice.call(l),c=0,s=l.length;c<s;c+=1)Array.isArray(l[c])&&v(e,\"nested arrays are not supported inside keys\"),typeof l==\"object\"&&Nn(l[c])===\"[object Object]\"&&(l[c]=\"[object Object]\");if(typeof l==\"object\"&&Nn(l)===\"[object Object]\"&&(l=\"[object Object]\"),l=String(l),n===null&&(n={}),r===\"tag:yaml.org,2002:merge\")if(Array.isArray(t))for(c=0,s=t.length;c<s;c+=1)Mn(e,n,t[c],i);else Mn(e,n,t,i);else!e.json&&!j.call(i,l)&&j.call(n,l)&&(e.line=o||e.line,e.lineStart=u||e.lineStart,e.position=f||e.position,v(e,\"duplicated mapping key\")),ni(n,l,t),delete i[l];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):v(e,\"a line break is expected\"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function _(e,n,i){for(var r=0,l=e.input.charCodeAt(e.position);l!==0;){for(;Y(l);)l===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),l=e.input.charCodeAt(++e.position);if(n&&l===35)do l=e.input.charCodeAt(++e.position);while(l!==10&&l!==13&&l!==0);if(R(l))for(en(e),l=e.input.charCodeAt(e.position),r++,e.lineIndent=0;l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&de(e,\"deficient indentation\"),r}function ge(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||T(i)))}function nn(e,n){n===1?e.result+=\" \":n>1&&(e.result+=L.repeat(`\n`,n-1))}function ll(e,n,i){var r,l,t,o,u,f,c,s,a=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||J(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l)))return!1;for(e.kind=\"scalar\",e.result=\"\",t=o=e.position,u=!1;d!==0;){if(d===58){if(l=e.input.charCodeAt(e.position+1),T(l)||i&&J(l))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),T(r))break}else{if(e.position===e.lineStart&&ge(e)||i&&J(d))break;if(R(d))if(f=e.line,c=e.lineStart,s=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=f,e.lineStart=c,e.lineIndent=s;break}}u&&(H(e,t,o,!1),nn(e,e.line-f),t=o=e.position,u=!1),Y(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return H(e,t,o,!1),e.result?!0:(e.kind=a,e.result=p,!1)}function ol(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(H(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)?(H(e,r,l,!0),nn(e,_(e,!1,n)),r=l=e.position):e.position===e.lineStart&&ge(e)?v(e,\"unexpected end of the document within a single quoted scalar\"):(e.position++,l=e.position);v(e,\"unexpected end of the stream within a single quoted scalar\")}function tl(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 H(e,i,e.position,!0),e.position++,!0;if(u===92){if(H(e,i,e.position,!0),u=e.input.charCodeAt(++e.position),R(u))_(e,!1,n);else if(u<256&&ii[u])e.result+=ri[u],e.position++;else if((o=el(u))>0){for(l=o,t=0;l>0;l--)u=e.input.charCodeAt(++e.position),(o=Zr(u))>=0?t=(t<<4)+o:v(e,\"expected hexadecimal character\");e.result+=il(t),e.position++}else v(e,\"unknown escape sequence\");i=r=e.position}else R(u)?(H(e,i,r,!0),nn(e,_(e,!1,n)),i=r=e.position):e.position===e.lineStart&&ge(e)?v(e,\"unexpected end of the document within a double quoted scalar\"):(e.position++,r=e.position)}v(e,\"unexpected end of the stream within a double quoted scalar\")}function ul(e,n){var i=!0,r,l,t,o=e.tag,u,f=e.anchor,c,s,a,p,d,h=Object.create(null),g,y,w,m;if(m=e.input.charCodeAt(e.position),m===91)s=93,d=!1,u=[];else if(m===123)s=125,d=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(++e.position);m!==0;){if(_(e,!0,n),m=e.input.charCodeAt(e.position),m===s)return e.position++,e.tag=o,e.anchor=f,e.kind=d?\"mapping\":\"sequence\",e.result=u,!0;i?m===44&&v(e,\"expected the node content, but found ','\"):v(e,\"missed comma between flow collection entries\"),y=g=w=null,a=p=!1,m===63&&(c=e.input.charCodeAt(e.position+1),T(c)&&(a=p=!0,e.position++,_(e,!0,n))),r=e.line,l=e.lineStart,t=e.position,Q(e,n,se,!1,!0),y=e.tag,g=e.result,_(e,!0,n),m=e.input.charCodeAt(e.position),(p||e.line===r)&&m===58&&(a=!0,m=e.input.charCodeAt(++e.position),_(e,!0,n),Q(e,n,se,!1,!0),w=e.result),d?K(e,u,h,y,g,w,r,l,t):a?u.push(K(e,null,h,y,g,w,r,l,t)):u.push(g),_(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}v(e,\"unexpected end of the stream within a flow collection\")}function fl(e,n){var i,r,l=Ge,t=!1,o=!1,u=n,f=0,c=!1,s,a;if(a=e.input.charCodeAt(e.position),a===124)r=!1;else if(a===62)r=!0;else return!1;for(e.kind=\"scalar\",e.result=\"\";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)Ge===l?l=a===43?Tn:Kr:v(e,\"repeat of a chomping mode identifier\");else if((s=nl(a))>=0)s===0?v(e,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):o?v(e,\"repeat of an indentation width identifier\"):(u=n+s-1,o=!0);else break;if(Y(a)){do a=e.input.charCodeAt(++e.position);while(Y(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!R(a)&&a!==0)}for(;a!==0;){for(en(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!o||e.lineIndent<u)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>u&&(u=e.lineIndent),R(a)){f++;continue}if(e.lineIndent<u){l===Tn?e.result+=L.repeat(`\n`,t?1+f:f):l===Ge&&t&&(e.result+=`\n`);break}for(r?Y(a)?(c=!0,e.result+=L.repeat(`\n`,t?1+f:f)):c?(c=!1,e.result+=L.repeat(`\n`,f+1)):f===0?t&&(e.result+=\" \"):e.result+=L.repeat(`\n`,f):e.result+=L.repeat(`\n`,t?1+f:f),t=!0,o=!0,f=0,i=e.position;!R(a)&&a!==0;)a=e.input.charCodeAt(++e.position);H(e,i,e.position,!1)}return!0}function Pn(e,n){var i,r=e.tag,l=e.anchor,t=[],o,u=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,\"tab characters must not be used in indentation\")),!(f!==45||(o=e.input.charCodeAt(e.position+1),!T(o))));){if(u=!0,e.position++,_(e,!0,-1)&&e.lineIndent<=n){t.push(null),f=e.input.charCodeAt(e.position);continue}if(i=e.line,Q(e,n,Vn,!1,!0),t.push(e.result),_(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&f!==0)v(e,\"bad indentation of a sequence entry\");else if(e.lineIndent<n)break}return u?(e.tag=r,e.anchor=l,e.kind=\"sequence\",e.result=t,!0):!1}function cl(e,n,i){var r,l,t,o,u,f,c=e.tag,s=e.anchor,a={},p=Object.create(null),d=null,h=null,g=null,y=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),m=e.input.charCodeAt(e.position);m!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,v(e,\"tab characters must not be used in indentation\")),r=e.input.charCodeAt(e.position+1),t=e.line,(m===63||m===58)&&T(r))m===63?(y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!0,l=!0):y?(y=!1,l=!0):v(e,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),e.position+=1,m=r;else{if(o=e.line,u=e.lineStart,f=e.position,!Q(e,i,Xn,!1,!0))break;if(e.line===t){for(m=e.input.charCodeAt(e.position);Y(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),T(m)||v(e,\"a whitespace character is expected after the key-value separator within a block mapping\"),y&&(K(e,a,p,d,h,null,o,u,f),d=h=g=null),w=!0,y=!1,l=!1,d=e.tag,h=e.result;else if(w)v(e,\"can not read an implicit mapping pair; a colon is missed\");else return e.tag=c,e.anchor=s,!0}else if(w)v(e,\"can not read a block mapping entry; a multiline key may not be an implicit key\");else return e.tag=c,e.anchor=s,!0}if((e.line===t||e.lineIndent>n)&&(y&&(o=e.line,u=e.lineStart,f=e.position),Q(e,n,pe,!0,l)&&(y?h=e.result:g=e.result),y||(K(e,a,p,d,h,g,o,u,f),d=h=g=null),_(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>n)&&m!==0)v(e,\"bad indentation of a mapping entry\");else if(e.lineIndent<n)break}return y&&K(e,a,p,d,h,null,o,u,f),w&&(e.tag=c,e.anchor=s,e.kind=\"mapping\",e.result=a),w}function al(e){var n,i=!1,r=!1,l,t,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&v(e,\"duplication of a tag property\"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,l=\"!!\",o=e.input.charCodeAt(++e.position)):l=\"!\",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(t=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):v(e,\"unexpected end of the stream within a verbatim tag\")}else{for(;o!==0&&!T(o);)o===33&&(r?v(e,\"tag suffix cannot contain exclamation marks\"):(l=e.input.slice(n-1,e.position+1),Zn.test(l)||v(e,\"named tag handle cannot contain such characters\"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),Vr.test(t)&&v(e,\"tag suffix cannot contain flow indicator characters\")}t&&!ei.test(t)&&v(e,\"tag name cannot contain such characters: \"+t);try{t=decodeURIComponent(t)}catch{v(e,\"tag name is malformed: \"+t)}return i?e.tag=t:j.call(e.tagMap,l)?e.tag=e.tagMap[l]+t:l===\"!\"?e.tag=\"!\"+t:l===\"!!\"?e.tag=\"tag:yaml.org,2002:\"+t:v(e,'undeclared tag handle \"'+l+'\"'),!0}function sl(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&v(e,\"duplication of an anchor property\"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!T(i)&&!J(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&v(e,\"name of an anchor node must contain at least one character\"),e.anchor=e.input.slice(n,e.position),!0}function pl(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!T(r)&&!J(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&v(e,\"name of an alias node must contain at least one character\"),i=e.input.slice(n,e.position),j.call(e.anchorMap,i)||v(e,'unidentified alias \"'+i+'\"'),e.result=e.anchorMap[i],_(e,!0,-1),!0}function Q(e,n,i,r,l){var t,o,u,f=1,c=!1,s=!1,a,p,d,h,g,y;if(e.listener!==null&&e.listener(\"open\",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=o=u=pe===i||Vn===i,r&&_(e,!0,-1)&&(c=!0,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)),f===1)for(;al(e)||sl(e);)_(e,!0,-1)?(c=!0,u=t,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)):u=!1;if(u&&(u=c||l),(f===1||pe===i)&&(se===i||Xn===i?g=n:g=n+1,y=e.position-e.lineStart,f===1?u&&(Pn(e,y)||cl(e,y,g))||ul(e,g)?s=!0:(o&&fl(e,g)||ol(e,g)||tl(e,g)?s=!0:pl(e)?(s=!0,(e.tag!==null||e.anchor!==null)&&v(e,\"alias node should not have any properties\")):ll(e,g,se===i)&&(s=!0,e.tag===null&&(e.tag=\"?\")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(s=u&&Pn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===\"?\"){for(e.result!==null&&e.kind!==\"scalar\"&&v(e,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+e.kind+'\"'),a=0,p=e.implicitTypes.length;a<p;a+=1)if(h=e.implicitTypes[a],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==\"!\"){if(j.call(e.typeMap[e.kind||\"fallback\"],e.tag))h=e.typeMap[e.kind||\"fallback\"][e.tag];else for(h=null,d=e.typeMap.multi[e.kind||\"fallback\"],a=0,p=d.length;a<p;a+=1)if(e.tag.slice(0,d[a].tag.length)===d[a].tag){h=d[a];break}h||v(e,\"unknown tag !<\"+e.tag+\">\"),e.result!==null&&h.kind!==e.kind&&v(e,\"unacceptable node kind for !<\"+e.tag+'> tag; it should be \"'+h.kind+'\", not \"'+e.kind+'\"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):v(e,\"cannot resolve a node with !<\"+e.tag+\"> explicit tag\")}return e.listener!==null&&e.listener(\"close\",e),e.tag!==null||e.anchor!==null||s}function dl(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&&!T(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),l=[],r.length<1&&v(e,\"directive name must not be less than one character in length\");o!==0;){for(;Y(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&&!T(o);)o=e.input.charCodeAt(++e.position);l.push(e.input.slice(i,e.position))}o!==0&&en(e),j.call(Rn,r)?Rn[r](e,r,l):de(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&&v(e,\"directives end mark is expected\"),Q(e,e.lineIndent-1,pe,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Xr.test(e.input.slice(n,e.position))&&de(e,\"non-ASCII line breaks are interpreted as content\"),e.documents.push(e.result),e.position===e.lineStart&&ge(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position<e.length-1)v(e,\"end of the stream or a document separator is expected\");else return}function oi(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new rl(e,n),r=e.indexOf(\"\\0\");for(r!==-1&&(i.position=r,v(i,\"null byte is not allowed in input\")),i.input+=\"\\0\";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)dl(i);return i.documents}function hl(e,n,i){n!==null&&typeof n==\"object\"&&typeof i>\"u\"&&(i=n,n=null);var r=oi(e,i);if(typeof n!=\"function\")return r;for(var l=0,t=r.length;l<t;l+=1)n(r[l])}function ml(e,n){var i=oi(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new k(\"expected a single document in the stream, but found more\")}}var gl=hl,xl=ml,ti={loadAll:gl,load:xl},ui=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,rn=65279,vl=9,re=10,yl=13,Al=32,wl=33,Cl=34,Ke=35,El=37,Sl=38,bl=39,_l=42,ci=44,Ll=45,he=58,Fl=61,Ol=62,Il=63,kl=64,ai=91,si=93,Tl=96,pi=123,Nl=124,di=125,I={};I[0]=\"\\\\0\";I[7]=\"\\\\a\";I[8]=\"\\\\b\";I[9]=\"\\\\t\";I[10]=\"\\\\n\";I[11]=\"\\\\v\";I[12]=\"\\\\f\";I[13]=\"\\\\r\";I[27]=\"\\\\e\";I[34]='\\\\\"';I[92]=\"\\\\\\\\\";I[133]=\"\\\\N\";I[160]=\"\\\\_\";I[8232]=\"\\\\L\";I[8233]=\"\\\\P\";var Dl=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Rl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function Ml(e,n){var i,r,l,t,o,u,f;if(n===null)return{};for(i={},r=Object.keys(n),l=0,t=r.length;l<t;l+=1)o=r[l],u=String(n[o]),o.slice(0,2)===\"!!\"&&(o=\"tag:yaml.org,2002:\"+o.slice(2)),f=e.compiledTypeMap.fallback[o],f&&fi.call(f.styleAliases,u)&&(u=f.styleAliases[u]),i[o]=u;return i}function Pl(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i=\"x\",r=2;else if(e<=65535)i=\"u\",r=4;else if(e<=4294967295)i=\"U\",r=8;else throw new k(\"code point within a string may not be greater than 0xFFFFFFFF\");return\"\\\\\"+i+L.repeat(\"0\",r-n.length)+n}var Wl=1,le=2;function Hl(e){this.schema=e.schema||Qn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ml(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='\"'?le:Wl,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==\"function\"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function Wn(e,n){for(var i=L.repeat(\" \",n),r=0,l=-1,t=\"\",o,u=e.length;r<u;)l=e.indexOf(`\n`,r),l===-1?(o=e.slice(r),r=u):(o=e.slice(r,l+1),r=l+1),o.length&&o!==`\n`&&(t+=i),t+=o;return t}function Qe(e,n){return`\n`+L.repeat(\" \",e.indent*n)}function jl(e,n){var i,r,l;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(l=e.implicitTypes[i],l.resolve(n))return!0;return!1}function me(e){return e===Al||e===vl}function oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function Hn(e){return oe(e)&&e!==rn&&e!==yl&&e!==re}function jn(e,n,i){var r=Hn(e),l=r&&!me(e);return(i?r:r&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di)&&e!==Ke&&!(n===he&&!l)||Hn(n)&&!me(n)&&e===Ke||n===he&&l}function Bl(e){return oe(e)&&e!==rn&&!me(e)&&e!==Ll&&e!==Il&&e!==he&&e!==ci&&e!==ai&&e!==si&&e!==pi&&e!==di&&e!==Ke&&e!==Sl&&e!==_l&&e!==wl&&e!==Nl&&e!==Fl&&e!==Ol&&e!==bl&&e!==Cl&&e!==El&&e!==kl&&e!==Tl}function Ul(e){return!me(e)&&e!==he}function ne(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function hi(e){var n=/^\\n* /;return n.test(e)}var mi=1,Xe=2,gi=3,xi=4,G=5;function Yl(e,n,i,r,l,t,o,u){var f,c=0,s=null,a=!1,p=!1,d=r!==-1,h=-1,g=Bl(ne(e,0))&&Ul(ne(e,e.length-1));if(n||o)for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),!oe(c))return G;g=g&&jn(c,s,u),s=c}else{for(f=0;f<e.length;c>=65536?f+=2:f++){if(c=ne(e,f),c===re)a=!0,d&&(p=p||f-h-1>r&&e[h+1]!==\" \",h=f);else if(!oe(c))return G;g=g&&jn(c,s,u),s=c}p=p||d&&f-h-1>r&&e[h+1]!==\" \"}return!a&&!p?g&&!o&&!l(e)?mi:t===le?G:Xe:i>9&&hi(e)?G:o?t===le?G:Xe:p?xi:gi}function $l(e,n,i,r,l){e.dump=(function(){if(n.length===0)return e.quotingType===le?'\"\"':\"''\";if(!e.noCompatMode&&(Dl.indexOf(n)!==-1||Rl.test(n)))return e.quotingType===le?'\"'+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(c){return jl(e,c)}switch(Yl(n,u,e.indent,o,f,e.quotingType,e.forceQuotes&&!r,l)){case mi:return n;case Xe:return\"'\"+n.replace(/'/g,\"''\")+\"'\";case gi:return\"|\"+Bn(n,e.indent)+Un(Wn(n,t));case xi:return\">\"+Bn(n,e.indent)+Un(Wn(ql(n,o),t));case G:return'\"'+zl(n)+'\"';default:throw new k(\"impossible error: invalid scalar style\")}})()}function Bn(e,n){var i=hi(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 Un(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 c=e.indexOf(`\n`);return c=c!==-1?c:e.length,i.lastIndex=c,Yn(e.slice(0,c),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`:\"\")+Yn(f,n),l=t}return r}function Yn(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 zl(e){for(var n=\"\",i=0,r,l=0;l<e.length;i>=65536?l+=2:l++)i=ne(e,l),r=I[i],!r&&oe(i)?(n+=e[l],i>=65536&&(n+=e[l+1])):n+=r||Pl(i);return n}function Gl(e,n,i){var r=\"\",l=e.tag,t,o,u;for(t=0,o=i.length;t<o;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(P(e,n,u,!1,!1)||typeof u>\"u\"&&P(e,n,null,!1,!1))&&(r!==\"\"&&(r+=\",\"+(e.condenseFlow?\"\":\" \")),r+=e.dump);e.tag=l,e.dump=\"[\"+r+\"]\"}function $n(e,n,i,r){var l=\"\",t=e.tag,o,u,f;for(o=0,u=i.length;o<u;o+=1)f=i[o],e.replacer&&(f=e.replacer.call(i,String(o),f)),(P(e,n+1,f,!0,!0,!1,!0)||typeof f>\"u\"&&P(e,n+1,null,!0,!0,!1,!0))&&((!r||l!==\"\")&&(l+=Qe(e,n)),e.dump&&re===e.dump.charCodeAt(0)?l+=\"-\":l+=\"- \",l+=e.dump);e.tag=t,e.dump=l||\"[]\"}function Jl(e,n,i){var r=\"\",l=e.tag,t=Object.keys(i),o,u,f,c,s;for(o=0,u=t.length;o<u;o+=1)s=\"\",r!==\"\"&&(s+=\", \"),e.condenseFlow&&(s+='\"'),f=t[o],c=i[f],e.replacer&&(c=e.replacer.call(i,f,c)),P(e,n,f,!1,!1)&&(e.dump.length>1024&&(s+=\"? \"),s+=e.dump+(e.condenseFlow?'\"':\"\")+\":\"+(e.condenseFlow?\"\":\" \"),P(e,n,c,!1,!1)&&(s+=e.dump,r+=s));e.tag=l,e.dump=\"{\"+r+\"}\"}function Kl(e,n,i,r){var l=\"\",t=e.tag,o=Object.keys(i),u,f,c,s,a,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==\"function\")o.sort(e.sortKeys);else if(e.sortKeys)throw new k(\"sortKeys must be a boolean or a function\");for(u=0,f=o.length;u<f;u+=1)p=\"\",(!r||l!==\"\")&&(p+=Qe(e,n)),c=o[u],s=i[c],e.replacer&&(s=e.replacer.call(i,c,s)),P(e,n+1,c,!0,!0,!0)&&(a=e.tag!==null&&e.tag!==\"?\"||e.dump&&e.dump.length>1024,a&&(e.dump&&re===e.dump.charCodeAt(0)?p+=\"?\":p+=\"? \"),p+=e.dump,a&&(p+=Qe(e,n)),P(e,n+1,s,!0,a)&&(e.dump&&re===e.dump.charCodeAt(0)?p+=\":\":p+=\": \",p+=e.dump,l+=p));e.tag=t,e.dump=l||\"{}\"}function qn(e,n,i){var r,l,t,o,u,f;for(l=i?e.explicitTypes:e.implicitTypes,t=0,o=l.length;t<o;t+=1)if(u=l[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof n==\"object\"&&n instanceof u.instanceOf)&&(!u.predicate||u.predicate(n))){if(i?u.multi&&u.representName?e.tag=u.representName(n):e.tag=u.tag:e.tag=\"?\",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,ui.call(u.represent)===\"[object Function]\")r=u.represent(n,f);else if(fi.call(u.represent,f))r=u.represent[f](n,f);else throw new k(\"!<\"+u.tag+'> 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,qn(e,i,!1)||qn(e,i,!0);var u=ui.call(e.dump),f=r,c;r&&(r=e.flowLevel<0||e.flowLevel>n);var s=u===\"[object Object]\"||u===\"[object Array]\",a,p;if(s&&(a=e.duplicates.indexOf(i),p=a!==-1),(e.tag!==null&&e.tag!==\"?\"||p||e.indent!==2&&n>0)&&(l=!1),p&&e.usedDuplicates[a])e.dump=\"*ref_\"+a;else{if(s&&p&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u===\"[object Object]\")r&&Object.keys(e.dump).length!==0?(Kl(e,n,e.dump,l),p&&(e.dump=\"&ref_\"+a+e.dump)):(Jl(e,n,e.dump),p&&(e.dump=\"&ref_\"+a+\" \"+e.dump));else if(u===\"[object Array]\")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?$n(e,n-1,e.dump,l):$n(e,n,e.dump,l),p&&(e.dump=\"&ref_\"+a+e.dump)):(Gl(e,n,e.dump),p&&(e.dump=\"&ref_\"+a+\" \"+e.dump));else if(u===\"[object String]\")e.tag!==\"?\"&&$l(e,e.dump,n,t,f);else{if(u===\"[object Undefined]\")return!1;if(e.skipInvalid)return!1;throw new k(\"unacceptable kind of an object to dump \"+u)}e.tag!==null&&e.tag!==\"?\"&&(c=encodeURI(e.tag[0]===\"!\"?e.tag.slice(1):e.tag).replace(/!/g,\"%21\"),e.tag[0]===\"!\"?c=\"!\"+c:c.slice(0,18)===\"tag:yaml.org,2002:\"?c=\"!!\"+c.slice(18):c=\"!<\"+c+\">\",e.dump=c+\" \"+e.dump)}return!0}function Ql(e,n){var i=[],r=[],l,t;for(Ve(e,i,r),l=0,t=r.length;l<t;l+=1)n.duplicates.push(i[r[l]]);n.usedDuplicates=new Array(t)}function Ve(e,n,i){var r,l,t;if(e!==null&&typeof e==\"object\")if(l=n.indexOf(e),l!==-1)i.indexOf(l)===-1&&i.push(l);else if(n.push(e),Array.isArray(e))for(l=0,t=e.length;l<t;l+=1)Ve(e[l],n,i);else for(r=Object.keys(e),l=0,t=r.length;l<t;l+=1)Ve(e[r[l]],n,i)}function Xl(e,n){n=n||{};var i=new Hl(n);i.noRefs||Ql(e,i);var r=e;return i.replacer&&(r=i.replacer.call({\"\":r},\"\",r)),P(i,0,r,!0,!0)?i.dump+`\n`:\"\"}var Vl=Xl,Zl={dump:Vl};function ln(e,n){return function(){throw new Error(\"Function yaml.\"+e+\" is removed in js-yaml 4. Use yaml.\"+n+\" instead, which is now safe by default.\")}}var on=ti.load,ot=ti.loadAll,xe=Zl.dump;var tt=ln(\"safeLoad\",\"load\"),ut=ln(\"safeLoadAll\",\"loadAll\"),ft=ln(\"safeDump\",\"dump\");var no=$e;function D(e,n){return n===\"yaml\"?xe(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function io(e,n,i=\"json\"){let r=D(e,i),l=D(n,i);return r===l?[{value:r}]:tn(e,n,0,i)}function ro(e,n){return io(e,n,\"json\")}function lo(e,n){try{let i=JSON.parse(e),r=JSON.parse(n),l=JSON.stringify(i),t=JSON.stringify(r);return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}catch{return N(e,n,{newlineIsToken:!1})}}function oo(e,n){let i=on(e),r=on(n),l=xe(i,{indent:2,lineWidth:-1,noRefs:!0}),t=xe(r,{indent:2,lineWidth:-1,noRefs:!0});return l===t?[{value:e}]:N(e,n,{newlineIsToken:!1})}function tn(e,n,i,r=\"json\"){let l=D(e,r),t=D(n,r);return l===t?[{value:W(l,i,r)}]:typeof e==\"object\"&&e!==null&&typeof n==\"object\"&&n!==null&&!Array.isArray(e)&&!Array.isArray(n)?to(e,n,i,r):Array.isArray(e)&&Array.isArray(n)?uo(e,n,i,r):fo(l,t,i,r)}function to(e,n,i,r=\"json\"){let l=[],t=\" \".repeat(i),o=\" \".repeat(i+1),u=new Set(Object.keys(e)),f=Object.keys(n),c=[...u].filter(a=>!(a in n)),s=[...f,...c];l.push({value:`{\n`});for(let a=0;a<s.length;a++){let p=s[a],h=a===s.length-1?\"\":\",\",g=p in e,y=p in n;if(g&&y){let w=D(e[p],r),m=D(n[p],r);if(w===m){let x=W(w,i+1);l.push({value:o+JSON.stringify(p)+\": \"+x+h+`\n`})}else{let x=o+JSON.stringify(p)+\": \",A=tn(e[p],n[p],i+1,r);if(A.length>0)if(!A[0].removed&&!A[0].added)A[0].value=x+A[0].value;else{let C=A.find(E=>E.removed),F=A.find(E=>E.added);C&&(C.value=x+C.value),F&&(F.value=x+F.value)}if(h&&A.length>0){let C=A[A.length-1];C.value=C.value.replace(/\\n$/,h+`\n`)}l.push(...A)}}else if(g){let w=W(D(e[p],r),i+1);l.push({removed:!0,value:o+JSON.stringify(p)+\": \"+w+h+`\n`})}else{let w=W(D(n[p],r),i+1);l.push({added:!0,value:o+JSON.stringify(p)+\": \"+w+h+`\n`})}}return l.push({value:t+`}\n`}),l}function uo(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<u;f++){let s=f===u-1?\"\":\",\";if(f>=e.length){let a=W(D(n[f],r),i+1);l.push({added:!0,value:o+a+s+`\n`})}else if(f>=n.length){let a=W(D(e[f],r),i+1);l.push({removed:!0,value:o+a+s+`\n`})}else{let a=D(e[f],r),p=D(n[f],r);if(a===p){let d=W(a,i+1);l.push({value:o+d+s+`\n`})}else{let d=tn(e[f],n[f],i+1,r);if(d.length>0&&(d[0].value=o+d[0].value),s&&d.length>0){let h=d[d.length-1];h.value=h.value.replace(/\\n$/,s+`\n`)}l.push(...d)}}}return l.push({value:t+`]\n`}),l}function fo(e,n,i,r=\"json\"){let l=W(e,i),t=W(n,i);return N(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 vi=e=>e===\"\"?[]:e.replace(/\\n$/,\"\").split(`\n`),co=(e,n,i=\"diffChars\")=>{let l=(typeof i==\"string\"?no[i]:i)(e,n),t={left:[],right:[]};return l.forEach(({added:o,removed:u,value:f})=>{let c={};return o&&(c.type=1,c.value=f,t.right.push(c)),u&&(c.type=2,c.value=f,t.left.push(c)),!u&&!o&&(c.type=0,c.value=f,t.right.push(c),t.left.push(c)),c}),t},yi=(e,n,i=!1,r=\"diffChars\",l=0,t=[],o=!1)=>{let u=[];if(typeof e==\"string\"&&typeof n==\"string\")if(r===\"diffJson\")u=lo(e,n);else if(r===\"diffYaml\")try{u=oo(e,n)}catch{u=N(e,n,{newlineIsToken:!1})}else u=N(e,n,{newlineIsToken:!1});else u=ro(e,n);let f=l,c=l,s=[],a=0,p=[],d=[],h=(g,y,w,m,x)=>vi(g).map((C,F)=>{let E={},S={};if(!(d.includes(`${y}-${F}`)||x&&F!==0)){if(w||m){let $=!0;if(m){c+=1,E.lineNumber=c,E.type=2,E.value=C||\" \";let un=u[y+1];if(un?.added){let fn=vi(un.value)[F];if(fn){let Ai=h(fn,y,!0,!1,!0),{value:B,lineNumber:wi,type:Ci}=Ai[0].right;if(d.push(`${y+1}-${F}`),S.lineNumber=wi,E.value===B)$=!1,S.type=0,E.type=0,S.value=B;else{S.type=Ci;let cn=500,Ei=C.length>cn||B.length>cn;if(i||Ei)S.value=B;else if(o)E.rawValue=C,E.value=C,S.rawValue=B,S.value=B;else{let an=co(C,B,r);S.value=an.right,E.value=an.left}}}}}else f+=1,S.lineNumber=f,S.type=1,S.value=C;$&&!x&&(p.includes(a)||p.push(a))}else c+=1,f+=1,E.lineNumber=c,E.type=0,E.value=C,S.lineNumber=f,S.type=0,S.value=C;return(t?.includes(`L-${E.lineNumber}`)||t?.includes(`R-${S.lineNumber}`)&&!p.includes(a))&&p.push(a),x||(a+=1),{right:S,left:E}}}).filter(Boolean);return u.forEach(({added:g,removed:y,value:w},m)=>{s=[...s,...h(w,m,g,y)]}),{lineInformation:s,diffLines:p}};self.onmessage=e=>{let{oldString:n,newString:i,disableWordDiff:r,lineCompareMethod:l,linesOffset:t,showLines:o,deferWordDiff:u}=e.data,f=yi(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";
|
|
7
|
+
export 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<u}let b=w&&w.oldPos+1<f;if(!E&&!b){v[h]=void 0;continue}if(!b||E&&w.oldPos<C.oldPos?g=this.addToPath(C,!0,!1,0,r):g=this.addToPath(w,!1,!0,1,r),d=this.extractCommon(g,i,n,h,r),g.oldPos+1>=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+1<o&&f+1<u&&this.equals(r[f+1],i[s+1],t);)s++,f++,p++,t.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return p&&!t.oneChangePerToken&&(n.lastComponent={count:p,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=f,s}equals(n,i,r){return r.comparator?r.comparator(n,i):n===i||!!r.ignoreCase&&n.toLowerCase()===i.toLowerCase()}removeEmpty(n){let i=[];for(let r=0;r<n.length;r++)n[r]&&i.push(n[r]);return i}castInput(n,i){return n}tokenize(n,i){return Array.from(n)}join(n){return n.join(\"\")}postProcess(n,i){return n}get useLongestToken(){return!1}buildValues(n,i,r){let l=[],t;for(;n;)l.push(n),t=n.previousComponent,delete n.previousComponent,n=t;l.reverse();let o=l.length,u=0,f=0,s=0;for(;u<o;u++){let p=l[u];if(p.removed)p.value=this.join(r.slice(s,s+p.count)),s+=p.count;else{if(!p.added&&this.useLongestToken){let c=i.slice(f,f+p.count);c=c.map(function(x,v){let d=r[s+v];return d.length>x.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;i<e.length&&i<n.length;i++)if(e[i]!=n[i])return e.slice(0,i);return e.slice(0,i)}function Fe(e,n){let i;if(!e||!n||e[e.length-1]!=n[n.length-1])return\"\";for(i=0;i<e.length&&i<n.length;i++)if(e[e.length-(i+1)]!=n[n.length-(i+1)])return e.slice(-i);return e.slice(-i)}function ae(e,n,i){if(e.slice(0,n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(n)}; this is a bug`);return i+e.slice(n.length)}function se(e,n,i){if(!n)return e+i;if(e.slice(-n.length)!=n)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(n)}; this is a bug`);return e.slice(0,-n.length)+i}function G(e,n){return ae(e,n,\"\")}function ee(e,n){return se(e,n,\"\")}function _e(e,n){return n.slice(0,ki(e,n))}function ki(e,n){let i=0;e.length>n.length&&(i=e.length-n.length);let r=n.length;e.length<n.length&&(r=e.length);let l=Array(r),t=0;l[0]=0;for(let o=1;o<r;o++){for(n[o]==n[t]?l[o]=l[t]:l[o]=t;t>0&&n[o]!=n[t];)t=l[t];n[o]==n[t]&&t++}t=0;for(let o=i;o<e.length;o++){for(;t>0&&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;l<r.length;l++){let t=r[l];l%2&&!n.newlineIsToken?i[i.length-1]+=t:i.push(t)}return i}function Ii(e){return e==\".\"||e==\"!\"||e==\"?\"}var Me=class extends F{tokenize(n){var i;let r=[],l=0;for(let t=0;t<n.length;t++){if(t==n.length-1){r.push(n.slice(l));break}if(Ii(n[t])&&n[t+1].match(/\\s/)){for(r.push(n.slice(l,t+1)),t=l=t+1;!((i=n[t+1])===null||i===void 0)&&i.match(/\\s/);)t++;r.push(n.slice(l,t+1)),l=t+1}}return r}},Pe=new Me;function An(e,n,i){return Pe.diff(e,n,i)}var We=class extends F{tokenize(n){return n.split(/([{}:;,]|\\s+)/)}},He=new We;function Cn(e,n,i){return He.diff(e,n,i)}var je=class extends F{constructor(){super(...arguments),this.tokenize=Re}get useLongestToken(){return!0}castInput(n,i){let{undefinedReplacement:r,stringifyReplacer:l=(t,o)=>typeof 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<n.length;t+=1)if(n[t]===e)return i[t];let o;if(Object.prototype.toString.call(e)===\"[object Array]\"){for(n.push(e),o=new Array(e.length),i.push(o),t=0;t<e.length;t+=1)o[t]=ne(e[t],n,i,r,String(t));return n.pop(),i.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==\"object\"&&e!==null){n.push(e),o={},i.push(o);let u=[],f;for(f in e)Object.prototype.hasOwnProperty.call(e,f)&&u.push(f);for(u.sort(),t=0;t<u.length;t+=1)f=u[t],o[f]=ne(e[f],n,i,r,f);n.pop(),i.pop()}else o=e;return o}var Ue=class extends F{tokenize(n){return n.slice()}join(n){return n}removeEmpty(n){return n}},Ye=new Ue;function Sn(e,n,i){return Ye.diff(e,n,i)}function $e(e){return Array.isArray(e)?e.map(n=>$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(;r<n.length;){let y=n[r];if(o(y)||u(y))break;if(l(y)){if(m)return;m=!0,a.isGit=!0;let h=s(y);for(h&&(a.oldFileName=h.oldFileName,a.newFileName=h.newFileName),r++;r<n.length;){let g=n[r];if(o(g)||u(g)||t(g))break;let w=/^rename from (.*)/.exec(g);w&&(a.oldFileName=\"a/\"+p(w[1]),a.isRename=!0);let C=/^rename to (.*)/.exec(g);C&&(a.newFileName=\"b/\"+p(C[1]),a.isRename=!0);let E=/^copy from (.*)/.exec(g);E&&(a.oldFileName=\"a/\"+p(E[1]),a.isCopy=!0);let b=/^copy to (.*)/.exec(g);b&&(a.newFileName=\"b/\"+p(b[1]),a.isCopy=!0);let S=/^new file mode (\\d+)/.exec(g);S&&(a.isCreate=!0,a.newMode=S[1]);let M=/^deleted file mode (\\d+)/.exec(g);M&&(a.isDelete=!0,a.oldMode=M[1]);let V=/^old mode (\\d+)/.exec(g);V&&(a.oldMode=V[1]);let Z=/^new mode (\\d+)/.exec(g);Z&&(a.newMode=Z[1]),/^Binary files /.test(g)&&(a.isBinary=!0),r++}continue}else if(t(y)){if(m)return;m=!0;let h=/^(?:Index:|diff(?: -r \\w+)+)\\s+/.exec(y);h&&(a.index=y.substring(h[0].length).trim())}r++}if(x(a),x(a),a.oldFileName===void 0!=(a.newFileName===void 0))throw new Error(\"Missing \"+(a.oldFileName!==void 0?'\"+++ ...\"':'\"--- ...\"')+\" file header for \"+((d=a.oldFileName)!==null&&d!==void 0?d:a.newFileName));for(;r<n.length;){let y=n[r];if(t(y)||o(y)||/^===================================================================/.test(y))break;u(y)?a.hunks.push(v()):r++}}function s(d){let a=d.substring(11);if(a.startsWith('\"')){let y=c(a);if(y===null)return null;let h=a.substring(y.rawLength+1),g;if(h.startsWith('\"')){let w=c(h);if(w===null)return null;g=w.fileName}else g=h;return{oldFileName:y.fileName,newFileName:g}}let m=a.indexOf('\"');if(m>0){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;){if(d[m]==='\"')return{fileName:a,rawLength:m+1};if(d[m]===\"\\\\\"&&m+1<d.length)switch(m++,d[m]){case\"a\":a+=\"\\x07\";break;case\"b\":a+=\"\\b\";break;case\"f\":a+=\"\\f\";break;case\"n\":a+=`\n`;break;case\"r\":a+=\"\\r\";break;case\"t\":a+=\"\t\";break;case\"v\":a+=\"\\v\";break;case\"\\\\\":a+=\"\\\\\";break;case'\"':a+='\"';break;case\"0\":case\"1\":case\"2\":case\"3\":case\"4\":case\"5\":case\"6\":case\"7\":{if(m+2>=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(;r<n.length&&(w<h.oldLines||g<h.newLines||!((d=n[r])===null||d===void 0)&&d.startsWith(\"\\\\\"));r++){let C=n[r].length==0&&r!=n.length-1?\" \":n[r][0];if(C===\"+\"||C===\"-\"||C===\" \"||C===\"\\\\\")h.lines.push(n[r]),C===\"+\"?g++:C===\"-\"?w++:C===\" \"&&(g++,w++);else throw new Error(`Hunk at line ${a+1} contained invalid line ${n[r]}`)}if(!g&&h.newLines===1&&(h.newLines=0),!w&&h.oldLines===1&&(h.oldLines=0),g!==h.newLines)throw new Error(\"Added line count did not match for hunk at line \"+(a+1));if(w!==h.oldLines)throw new Error(\"Removed line count did not match for hunk at line \"+(a+1));if(r<n.length&&n[r]&&/^[+ -]/.test(n[r])&&!o(n[r]))throw new Error(\"Hunk at line \"+(a+1)+\" has more lines than expected (expected \"+h.oldLines+\" old lines and \"+h.newLines+\" new lines)\");return h}for(;r<n.length;)f();return i}function _n(e,n,i){let r=!0,l=!1,t=!1,o=1;return function u(){if(r&&!t){if(l?o++:r=!1,e+o<=i)return e+o;t=!0}if(!l)return t||(r=!0),n<=e-o?e-o++:(l=!0,u())}}function Ge(e,n,i={}){let r;if(typeof n==\"string\"?r=ie(n):Array.isArray(n)?r=n:r=[n],r.length>1)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;d<l[l.length-1].lines.length;d++){let a=l[l.length-1].lines[d];a[0]==\"\\\\\"&&(f[0]==\"+\"?s=!0:f[0]==\"-\"&&(p=!0)),f=a}if(s){if(p){if(!o&&r[r.length-1]==\"\")return!1}else if(r[r.length-1]==\"\")r.pop();else if(!o)return!1}else if(p){if(r[r.length-1]!=\"\")r.push(\"\");else if(!o)return!1}function c(d,a,m,y=0,h=!0,g=[],w=0){let C=0,E=!1;for(;y<d.length;y++){let b=d[y],S=b.length>0?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;d<l.length;d++){let a=l[d],m,y=r.length-a.oldLines+o,h;for(let g=0;g<=o;g++){h=a.oldStart+v-1;let w=_n(h,u,y);for(;h!==void 0&&(m=c(a.lines,h,g),!m);h=w());if(m)break}if(!m)return!1;for(let g=u;g<h;g++)x.push(r[g]);for(let g=0;g<m.patchedLines.length;g++){let w=m.patchedLines[g];x.push(w)}u=m.oldLineLastI+1,v=h+1-a.oldStart}for(let d=u;d<r.length;d++)x.push(r[d]);return x.join(`\n`)}function Ln(e,n){let i=typeof e==\"string\"?ie(e):e,r=0;function l(){let t=i[r++];if(!t)return n.complete();n.loadFile(t,function(o,u){if(o)return n.complete(o);let f=Ge(u,t,n);n.patched(t,f,function(s){if(s)return n.complete(s);l()})})}l()}function Nn(e){return e===void 0||e===\"/dev/null\"?e:e.startsWith(\"a/\")?\"b/\"+e.slice(2):e.startsWith(\"b/\")?\"a/\"+e.slice(2):e}function ze(e){if(Array.isArray(e))return e.map(i=>ze(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.length;n++)if(e[n]<\" \"||e[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<i.length;){let l=i[r];l===7?n+=\"\\\\a\":l===8?n+=\"\\\\b\":l===9?n+=\"\\\\t\":l===10?n+=\"\\\\n\":l===11?n+=\"\\\\v\":l===12?n+=\"\\\\f\":l===13?n+=\"\\\\r\":l===34?n+='\\\\\"':l===92?n+=\"\\\\\\\\\":l>=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;h<p.length;h++){let g=p[h],w=g.lines||Ri(g.value);if(g.lines=w,g.added||g.removed){if(!v){let C=p[h-1];v=m,d=y,C&&(a=f>0?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&&h<p.length-2)for(let C of c(w))a.push(C);else{let C=Math.min(w.length,f);for(let b of c(w.slice(0,C)))a.push(b);let E={oldStart:v,oldLines:m-v+C,newStart:d,newLines:y-d+C,lines:a};x.push(E),v=0,d=0,a=[]}m+=w.length,y+=w.length}}for(let h of x)for(let g=0;g<h.lines.length;g++)h.lines[g].endsWith(`\n`)?h.lines[g]=h.lines[g].slice(0,-1):(h.lines.splice(g+1,0,\"\\\\"),g++);return{oldFileName:e,newFileName:n,oldHeader:l,newHeader:t,hunks:x}}}function re(e,n){var i,r,l,t,o,u;if(n||(n=he),Array.isArray(e)){if(e.length>1&&!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<e.hunks.length;p++){let c=e.hunks[p],x=c.oldLines===0?c.oldStart-1:c.oldStart,v=c.newLines===0?c.newStart-1:c.newStart;f.push(\"@@ -\"+x+\",\"+c.oldLines+\" +\"+v+\",\"+c.newLines+\" @@\");for(let d of c.lines)f.push(d)}return f.join(`\n`)+`\n`}function Je(e,n,i,r,l,t,o){if(typeof o==\"function\"&&(o={callback:o}),o?.callback){let{callback:u}=o;me(e,n,i,r,l,t,Object.assign(Object.assign({},o),{callback:f=>{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<e.length;l++)i=e[l],i.added?r=1:i.removed?r=-1:r=0,n.push([r,i.value]);return n}function Dn(e){let n=[];for(let i=0;i<e.length;i++){let r=e[i];r.added?n.push(\"<ins>\"):r.removed&&n.push(\"<del>\"),n.push(Mi(r.value)),r.added?n.push(\"</ins>\"):r.removed&&n.push(\"</del>\")}return n.join(\"\")}function Mi(e){let n=e;return n=n.replace(/&/g,\"&\"),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;i<r;i+=1)l=t[i],e[l]=n[l];return e}function ji(e,n){var i=\"\",r;for(r=0;r<n;r+=1)i+=e;return i}function Bi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ui=Qn,Yi=Pi,$i=Wi,qi=ji,Gi=Bi,zi=Hi,L={isNothing:Ui,isObject:Yi,toArray:$i,repeat:qi,isNegativeZero:Gi,extend:zi};function Xn(e,n){var i=\"\",r=e.reason||\"(unknown reason)\";return e.mark?(e.mark.name&&(i+='in \"'+e.mark.name+'\" '),i+=\"(\"+(e.mark.line+1)+\":\"+(e.mark.column+1)+\")\",!n&&e.mark.snippet&&(i+=`\n\n`+e.mark.snippet),r+\" \"+i):r}function oe(e,n){Error.call(this),this.name=\"YAMLException\",this.reason=e,this.mark=n,this.message=Xn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\"}oe.prototype=Object.create(Error.prototype);oe.prototype.constructor=oe;oe.prototype.toString=function(n){return this.name+\": \"+Xn(this,n)};var O=oe;function Qe(e,n,i,r,l){var t=\"\",o=\"\",u=Math.floor(l/2)-1;return r-n>u&&(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<i;n+=1)arguments[n].forEach(r);return e}function Ze(e){return this.extend(e)}Ze.prototype.extend=function(n){var i=[],r=[];if(n instanceof N)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new O(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");i.forEach(function(t){if(!(t instanceof N))throw new O(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(t.loadKind&&t.loadKind!==\"scalar\")throw new O(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(t.multi)throw new O(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")}),r.forEach(function(t){if(!(t instanceof N))throw new O(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")});var l=Object.create(Ze.prototype);return l.implicit=(this.implicit||[]).concat(i),l.explicit=(this.explicit||[]).concat(r),l.compiledImplicit=Rn(l,\"implicit\"),l.compiledExplicit=Rn(l,\"explicit\"),l.compiledTypeMap=er(l.compiledImplicit,l.compiledExplicit),l};var nr=Ze,ir=new N(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(e){return e!==null?e:\"\"}}),rr=new N(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(e){return e!==null?e:[]}}),lr=new N(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(e){return e!==null?e:{}}}),or=new nr({explicit:[ir,rr,lr]});function tr(e){if(e===null)return!0;var n=e.length;return n===1&&e===\"~\"||n===4&&(e===\"null\"||e===\"Null\"||e===\"NULL\")}function ur(){return null}function fr(e){return e===null}var ar=new N(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:tr,construct:ur,predicate:fr,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});function sr(e){if(e===null)return!1;var n=e.length;return n===4&&(e===\"true\"||e===\"True\"||e===\"TRUE\")||n===5&&(e===\"false\"||e===\"False\"||e===\"FALSE\")}function cr(e){return e===\"true\"||e===\"True\"||e===\"TRUE\"}function dr(e){return Object.prototype.toString.call(e)===\"[object Boolean]\"}var pr=new N(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:sr,construct:cr,predicate:dr,represent:{lowercase:function(e){return e?\"true\":\"false\"},uppercase:function(e){return e?\"TRUE\":\"FALSE\"},camelcase:function(e){return e?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function hr(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function mr(e){return 48<=e&&e<=55}function gr(e){return 48<=e&&e<=57}function xr(e){if(e===null)return!1;var n=e.length,i=0,r=!1,l;if(!n)return!1;if(l=e[i],(l===\"-\"||l===\"+\")&&(l=e[++i]),l===\"0\"){if(i+1===n)return!0;if(l=e[++i],l===\"b\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(l!==\"0\"&&l!==\"1\")return!1;r=!0}return r&&l!==\"_\"}if(l===\"x\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(!hr(e.charCodeAt(i)))return!1;r=!0}return r&&l!==\"_\"}if(l===\"o\"){for(i++;i<n;i++)if(l=e[i],l!==\"_\"){if(!mr(e.charCodeAt(i)))return!1;r=!0}return r&&l!==\"_\"}}if(l===\"_\")return!1;for(;i<n;i++)if(l=e[i],l!==\"_\"){if(!gr(e.charCodeAt(i)))return!1;r=!0}return!(!r||l===\"_\")}function vr(e){var n=e,i=1,r;if(n.indexOf(\"_\")!==-1&&(n=n.replace(/_/g,\"\")),r=n[0],(r===\"-\"||r===\"+\")&&(r===\"-\"&&(i=-1),n=n.slice(1),r=n[0]),n===\"0\")return 0;if(r===\"0\"){if(n[1]===\"b\")return i*parseInt(n.slice(2),2);if(n[1]===\"x\")return i*parseInt(n.slice(2),16);if(n[1]===\"o\")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function yr(e){return Object.prototype.toString.call(e)===\"[object Number]\"&&e%1===0&&!L.isNegativeZero(e)}var wr=new N(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:xr,construct:vr,predicate:yr,represent:{binary:function(e){return e>=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;i<l;i++)if(n=t.indexOf(e.charAt(i)),!(n>64)){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<l;n++)n%4===0&&n&&(u.push(o>>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<t;r++)r%3===0&&r&&(n+=o[i>>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<r;i+=1){if(l=u[i],o=!1,Ur.call(l)!==\"[object Object]\")return!1;for(t in l)if(Br.call(l,t))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(t)===-1)n.push(t);else return!1}return!0}function $r(e){return e!==null?e:[]}var qr=new N(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:Yr,construct:$r}),Gr=Object.prototype.toString;function zr(e){if(e===null)return!0;var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],Gr.call(r)!==\"[object Object]\"||(l=Object.keys(r),l.length!==1))return!1;t[n]=[l[0],r[l[0]]]}return!0}function Jr(e){if(e===null)return[];var n,i,r,l,t,o=e;for(t=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],l=Object.keys(r),t[n]=[l[0],r[l[0]]];return t}var Kr=new N(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:zr,construct:Jr}),Qr=Object.prototype.hasOwnProperty;function Xr(e){if(e===null)return!0;var n,i=e;for(n in i)if(Qr.call(i,n)&&i[n]!==null)return!1;return!0}function Vr(e){return e!==null?e:{}}var Zr=new N(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:Xr,construct:Vr}),ei=Nr.extend({implicit:[Tr,Rr],explicit:[jr,qr,Kr,Zr]}),B=Object.prototype.hasOwnProperty,ge=1,ni=2,ii=3,xe=4,Ve=1,el=2,Mn=3,nl=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,il=/[\\x85\\u2028\\u2029]/,rl=/[,\\[\\]\\{\\}]/,ri=/^(?:!|!!|![a-z\\-]+!)$/i,li=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function Pn(e){return Object.prototype.toString.call(e)}function R(e){return e===10||e===13}function q(e){return e===9||e===32}function I(e){return e===9||e===32||e===10||e===13}function K(e){return e===44||e===91||e===93||e===123||e===125}function ll(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function ol(e){return e===120?2:e===117?4:e===85?8:0}function tl(e){return 48<=e&&e<=57?e-48:-1}function Wn(e){return e===48?\"\\0\":e===97?\"\\x07\":e===98?\"\\b\":e===116||e===9?\"\t\":e===110?`\n`:e===118?\"\\v\":e===102?\"\\f\":e===114?\"\\r\":e===101?\"\\x1B\":e===32?\" \":e===34?'\"':e===47?\"/\":e===92?\"\\\\\":e===78?\"\\x85\":e===95?\"\\xA0\":e===76?\"\\u2028\":e===80?\"\\u2029\":\"\"}function ul(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>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(n<i){if(u=e.input.slice(n,i),r)for(l=0,t=u.length;l<t;l+=1)o=u.charCodeAt(l),o===9||32<=o&&o<=1114111||A(e,\"expected valid JSON character\");else nl.test(u)&&A(e,\"the stream contains non-printable characters\");e.result+=u}}function jn(e,n,i,r){var l,t,o,u;for(L.isObject(i)||A(e,\"cannot merge mappings; the provided source object is unacceptable\"),l=Object.keys(i),o=0,u=l.length;o<u;o+=1)t=l[o],B.call(n,t)||(oi(n,t,i[t]),r[t]=!0)}function Q(e,n,i,r,l,t,o,u,f){var s,p;if(Array.isArray(l))for(l=Array.prototype.slice.call(l),s=0,p=l.length;s<p;s+=1)Array.isArray(l[s])&&A(e,\"nested arrays are not supported inside keys\"),typeof l==\"object\"&&Pn(l[s])===\"[object Object]\"&&(l[s]=\"[object Object]\");if(typeof l==\"object\"&&Pn(l)===\"[object Object]\"&&(l=\"[object Object]\"),l=String(l),n===null&&(n={}),r===\"tag:yaml.org,2002:merge\")if(Array.isArray(t))for(s=0,p=t.length;s<p;s+=1)jn(e,n,t[s],i);else jn(e,n,t,i);else!e.json&&!B.call(i,l)&&B.call(n,l)&&(e.line=o||e.line,e.lineStart=u||e.lineStart,e.position=f||e.position,A(e,\"duplicated mapping key\")),oi(n,l,t),delete i[l];return n}function tn(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):A(e,\"a line break is expected\"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function _(e,n,i){for(var r=0,l=e.input.charCodeAt(e.position);l!==0;){for(;q(l);)l===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),l=e.input.charCodeAt(++e.position);if(n&&l===35)do l=e.input.charCodeAt(++e.position);while(l!==10&&l!==13&&l!==0);if(R(l))for(tn(e),l=e.input.charCodeAt(e.position),r++,e.lineIndent=0;l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&ve(e,\"deficient indentation\"),r}function Ae(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||I(i)))}function un(e,n){n===1?e.result+=\" \":n>1&&(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.lineIndent<u)&&c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>u&&(u=e.lineIndent),R(c)){f++;continue}if(e.lineIndent<u){l===Mn?e.result+=L.repeat(`\n`,t?1+f:f):l===Ve&&t&&(e.result+=`\n`);break}for(r?q(c)?(s=!0,e.result+=L.repeat(`\n`,t?1+f:f)):s?(s=!1,e.result+=L.repeat(`\n`,f+1)):f===0?t&&(e.result+=\" \"):e.result+=L.repeat(`\n`,f):e.result+=L.repeat(`\n`,t?1+f:f),t=!0,o=!0,f=0,i=e.position;!R(c)&&c!==0;)c=e.input.charCodeAt(++e.position);j(e,i,e.position,!1)}return!0}function Bn(e,n){var i,r=e.tag,l=e.anchor,t=[],o,u=!1,f;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=t),f=e.input.charCodeAt(e.position);f!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,A(e,\"tab characters must not be used in indentation\")),!(f!==45||(o=e.input.charCodeAt(e.position+1),!I(o))));){if(u=!0,e.position++,_(e,!0,-1)&&e.lineIndent<=n){t.push(null),f=e.input.charCodeAt(e.position);continue}if(i=e.line,X(e,n,ii,!1,!0),t.push(e.result),_(e,!0,-1),f=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&f!==0)A(e,\"bad indentation of a sequence entry\");else if(e.lineIndent<n)break}return u?(e.tag=r,e.anchor=l,e.kind=\"sequence\",e.result=t,!0):!1}function hl(e,n,i){var r,l,t,o,u,f,s=e.tag,p=e.anchor,c={},x=Object.create(null),v=null,d=null,a=null,m=!1,y=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),h=e.input.charCodeAt(e.position);h!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,A(e,\"tab characters must not be used in indentation\")),r=e.input.charCodeAt(e.position+1),t=e.line,(h===63||h===58)&&I(r))h===63?(m&&(Q(e,c,x,v,d,null,o,u,f),v=d=a=null),y=!0,m=!0,l=!0):m?(m=!1,l=!0):A(e,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),e.position+=1,h=r;else{if(o=e.line,u=e.lineStart,f=e.position,!X(e,i,ni,!1,!0))break;if(e.line===t){for(h=e.input.charCodeAt(e.position);q(h);)h=e.input.charCodeAt(++e.position);if(h===58)h=e.input.charCodeAt(++e.position),I(h)||A(e,\"a whitespace character is expected after the key-value separator within a block mapping\"),m&&(Q(e,c,x,v,d,null,o,u,f),v=d=a=null),y=!0,m=!1,l=!1,v=e.tag,d=e.result;else if(y)A(e,\"can not read an implicit mapping pair; a colon is missed\");else return e.tag=s,e.anchor=p,!0}else if(y)A(e,\"can not read a block mapping entry; a multiline key may not be an implicit key\");else return e.tag=s,e.anchor=p,!0}if((e.line===t||e.lineIndent>n)&&(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.lineIndent<n)break}return m&&Q(e,c,x,v,d,null,o,u,f),y&&(e.tag=s,e.anchor=p,e.kind=\"mapping\",e.result=c),y}function ml(e){var n,i=!1,r=!1,l,t,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&A(e,\"duplication of a tag property\"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,l=\"!!\",o=e.input.charCodeAt(++e.position)):l=\"!\",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(t=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):A(e,\"unexpected end of the stream within a verbatim tag\")}else{for(;o!==0&&!I(o);)o===33&&(r?A(e,\"tag suffix cannot contain exclamation marks\"):(l=e.input.slice(n-1,e.position+1),ri.test(l)||A(e,\"named tag handle cannot contain such characters\"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);t=e.input.slice(n,e.position),rl.test(t)&&A(e,\"tag suffix cannot contain flow indicator characters\")}t&&!li.test(t)&&A(e,\"tag name cannot contain such characters: \"+t);try{t=decodeURIComponent(t)}catch{A(e,\"tag name is malformed: \"+t)}return i?e.tag=t:B.call(e.tagMap,l)?e.tag=e.tagMap[l]+t:l===\"!\"?e.tag=\"!\"+t:l===\"!!\"?e.tag=\"tag:yaml.org,2002:\"+t:A(e,'undeclared tag handle \"'+l+'\"'),!0}function gl(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&A(e,\"duplication of an anchor property\"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!I(i)&&!K(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&A(e,\"name of an anchor node must contain at least one character\"),e.anchor=e.input.slice(n,e.position),!0}function xl(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!I(r)&&!K(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&A(e,\"name of an alias node must contain at least one character\"),i=e.input.slice(n,e.position),B.call(e.anchorMap,i)||A(e,'unidentified alias \"'+i+'\"'),e.result=e.anchorMap[i],_(e,!0,-1),!0}function X(e,n,i,r,l){var t,o,u,f=1,s=!1,p=!1,c,x,v,d,a,m;if(e.listener!==null&&e.listener(\"open\",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,t=o=u=xe===i||ii===i,r&&_(e,!0,-1)&&(s=!0,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)),f===1)for(;ml(e)||gl(e);)_(e,!0,-1)?(s=!0,u=t,e.lineIndent>n?f=1:e.lineIndent===n?f=0:e.lineIndent<n&&(f=-1)):u=!1;if(u&&(u=s||l),(f===1||xe===i)&&(ge===i||ni===i?a=n:a=n+1,m=e.position-e.lineStart,f===1?u&&(Bn(e,m)||hl(e,m,a))||dl(e,a)?p=!0:(o&&pl(e,a)||sl(e,a)||cl(e,a)?p=!0:xl(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&A(e,\"alias node should not have any properties\")):al(e,a,ge===i)&&(p=!0,e.tag===null&&(e.tag=\"?\")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(p=u&&Bn(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===\"?\"){for(e.result!==null&&e.kind!==\"scalar\"&&A(e,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+e.kind+'\"'),c=0,x=e.implicitTypes.length;c<x;c+=1)if(d=e.implicitTypes[c],d.resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==\"!\"){if(B.call(e.typeMap[e.kind||\"fallback\"],e.tag))d=e.typeMap[e.kind||\"fallback\"][e.tag];else for(d=null,v=e.typeMap.multi[e.kind||\"fallback\"],c=0,x=v.length;c<x;c+=1)if(e.tag.slice(0,v[c].tag.length)===v[c].tag){d=v[c];break}d||A(e,\"unknown tag !<\"+e.tag+\">\"),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<e.length-1)A(e,\"end of the stream or a document separator is expected\");else return}function ai(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`\n`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new fl(e,n),r=e.indexOf(\"\\0\");for(r!==-1&&(i.position=r,A(i,\"null byte is not allowed in input\")),i.input+=\"\\0\";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)vl(i);return i.documents}function yl(e,n,i){n!==null&&typeof n==\"object\"&&typeof i>\"u\"&&(i=n,n=null);var r=ai(e,i);if(typeof n!=\"function\")return r;for(var l=0,t=r.length;l<t;l+=1)n(r[l])}function wl(e,n){var i=ai(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new O(\"expected a single document in the stream, but found more\")}}var Al=yl,Cl=wl,si={loadAll:Al,load:Cl},ci=Object.prototype.toString,di=Object.prototype.hasOwnProperty,fn=65279,bl=9,te=10,Sl=13,El=32,Fl=33,_l=34,en=35,Ll=37,Nl=38,kl=39,Ol=42,pi=44,Il=45,ye=58,Tl=61,Dl=62,Rl=63,Ml=64,hi=91,mi=93,Pl=96,gi=123,Wl=124,xi=125,k={};k[0]=\"\\\\0\";k[7]=\"\\\\a\";k[8]=\"\\\\b\";k[9]=\"\\\\t\";k[10]=\"\\\\n\";k[11]=\"\\\\v\";k[12]=\"\\\\f\";k[13]=\"\\\\r\";k[27]=\"\\\\e\";k[34]='\\\\\"';k[92]=\"\\\\\\\\\";k[133]=\"\\\\N\";k[160]=\"\\\\_\";k[8232]=\"\\\\L\";k[8233]=\"\\\\P\";var Hl=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],jl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function Bl(e,n){var i,r,l,t,o,u,f;if(n===null)return{};for(i={},r=Object.keys(n),l=0,t=r.length;l<t;l+=1)o=r[l],u=String(n[o]),o.slice(0,2)===\"!!\"&&(o=\"tag:yaml.org,2002:\"+o.slice(2)),f=e.compiledTypeMap.fallback[o],f&&di.call(f.styleAliases,u)&&(u=f.styleAliases[u]),i[o]=u;return i}function Ul(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i=\"x\",r=2;else if(e<=65535)i=\"u\",r=4;else if(e<=4294967295)i=\"U\",r=8;else throw new O(\"code point within a string may not be greater than 0xFFFFFFFF\");return\"\\\\\"+i+L.repeat(\"0\",r-n.length)+n}var Yl=1,ue=2;function $l(e){this.schema=e.schema||ei,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Bl(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='\"'?ue:Yl,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==\"function\"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function Un(e,n){for(var i=L.repeat(\" \",n),r=0,l=-1,t=\"\",o,u=e.length;r<u;)l=e.indexOf(`\n`,r),l===-1?(o=e.slice(r),r=u):(o=e.slice(r,l+1),r=l+1),o.length&&o!==`\n`&&(t+=i),t+=o;return t}function nn(e,n){return`\n`+L.repeat(\" \",e.indent*n)}function ql(e,n){var i,r,l;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(l=e.implicitTypes[i],l.resolve(n))return!0;return!1}function we(e){return e===El||e===bl}function fe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fn||65536<=e&&e<=1114111}function Yn(e){return fe(e)&&e!==fn&&e!==Sl&&e!==te}function $n(e,n,i){var r=Yn(e),l=r&&!we(e);return(i?r:r&&e!==pi&&e!==hi&&e!==mi&&e!==gi&&e!==xi)&&e!==en&&!(n===ye&&!l)||Yn(n)&&!we(n)&&e===en||n===ye&&l}function Gl(e){return fe(e)&&e!==fn&&!we(e)&&e!==Il&&e!==Rl&&e!==ye&&e!==pi&&e!==hi&&e!==mi&&e!==gi&&e!==xi&&e!==en&&e!==Nl&&e!==Ol&&e!==Fl&&e!==Wl&&e!==Tl&&e!==Dl&&e!==kl&&e!==_l&&e!==Ll&&e!==Ml&&e!==Pl}function zl(e){return!we(e)&&e!==ye}function le(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=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<e.length;s>=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<e.length;s>=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<e.length;i>=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<o;t+=1)u=i[t],e.replacer&&(u=e.replacer.call(i,String(t),u)),(P(e,n,u,!1,!1)||typeof u>\"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;o+=1)f=i[o],e.replacer&&(f=e.replacer.call(i,String(o),f)),(P(e,n+1,f,!0,!0,!1,!0)||typeof f>\"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;o<u;o+=1)p=\"\",r!==\"\"&&(p+=\", \"),e.condenseFlow&&(p+='\"'),f=t[o],s=i[f],e.replacer&&(s=e.replacer.call(i,f,s)),P(e,n,f,!1,!1)&&(e.dump.length>1024&&(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;u<f;u+=1)x=\"\",(!r||l!==\"\")&&(x+=nn(e,n)),s=o[u],p=i[s],e.replacer&&(p=e.replacer.call(i,s,p)),P(e,n+1,s,!0,!0,!0)&&(c=e.tag!==null&&e.tag!==\"?\"||e.dump&&e.dump.length>1024,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<o;t+=1)if(u=l[t],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof n==\"object\"&&n instanceof u.instanceOf)&&(!u.predicate||u.predicate(n))){if(i?u.multi&&u.representName?e.tag=u.representName(n):e.tag=u.tag:e.tag=\"?\",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,ci.call(u.represent)===\"[object Function]\")r=u.represent(n,f);else if(di.call(u.represent,f))r=u.represent[f](n,f);else throw new O(\"!<\"+u.tag+'> 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<t;l+=1)n.duplicates.push(i[r[l]]);n.usedDuplicates=new Array(t)}function ln(e,n,i){var r,l,t;if(e!==null&&typeof e==\"object\")if(l=n.indexOf(e),l!==-1)i.indexOf(l)===-1&&i.push(l);else if(n.push(e),Array.isArray(e))for(l=0,t=e.length;l<t;l+=1)ln(e[l],n,i);else for(r=Object.keys(e),l=0,t=r.length;l<t;l+=1)ln(e[r[l]],n,i)}function io(e,n){n=n||{};var i=new $l(n);i.noRefs||no(e,i);var r=e;return i.replacer&&(r=i.replacer.call({\"\":r},\"\",r)),P(i,0,r,!0,!0)?i.dump+`\n`:\"\"}var ro=io,lo={dump:ro};function an(e,n){return function(){throw new Error(\"Function yaml.\"+e+\" is removed in js-yaml 4. Use yaml.\"+n+\" instead, which is now safe by default.\")}}var sn=si.load,st=si.loadAll,Ce=lo.dump;var ct=an(\"safeLoad\",\"load\"),dt=an(\"safeLoadAll\",\"loadAll\"),pt=an(\"safeDump\",\"dump\");var to=Ke;function D(e,n){return n===\"yaml\"?Ce(e,{indent:2,lineWidth:-1,noRefs:!0}).trimEnd():JSON.stringify(e,null,2)}function uo(e,n,i=\"json\"){let r=D(e,i),l=D(n,i);return r===l?[{value:r}]:cn(e,n,0,i)}function fo(e,n){return uo(e,n,\"json\")}function ao(e,n){try{let i=JSON.parse(e),r=JSON.parse(n),l=JSON.stringify(i),t=JSON.stringify(r);return l===t?[{value:e}]:T(e,n,{newlineIsToken:!1})}catch{return T(e,n,{newlineIsToken:!1})}}function so(e,n){let i=sn(e),r=sn(n),l=Ce(i,{indent:2,lineWidth:-1,noRefs:!0}),t=Ce(r,{indent:2,lineWidth:-1,noRefs:!0});return l===t?[{value:e}]:T(e,n,{newlineIsToken:!1})}function cn(e,n,i,r=\"json\"){let l=D(e,r),t=D(n,r);return l===t?[{value:W(l,i,r)}]:typeof e==\"object\"&&e!==null&&typeof n==\"object\"&&n!==null&&!Array.isArray(e)&&!Array.isArray(n)?co(e,n,i,r):Array.isArray(e)&&Array.isArray(n)?po(e,n,i,r):ho(l,t,i,r)}function co(e,n,i,r=\"json\"){let l=[],t=\" \".repeat(i),o=\" \".repeat(i+1),u=new Set(Object.keys(e)),f=Object.keys(n),s=[...u].filter(c=>!(c in n)),p=[...f,...s];l.push({value:`{\n`});for(let c=0;c<p.length;c++){let x=p[c],d=c===p.length-1?\"\":\",\",a=x in e,m=x in n;if(a&&m){let y=D(e[x],r),h=D(n[x],r);if(y===h){let g=W(y,i+1);l.push({value:o+JSON.stringify(x)+\": \"+g+d+`\n`})}else{let g=o+JSON.stringify(x)+\": \",w=cn(e[x],n[x],i+1,r);if(w.length>0)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<u;f++){let p=f===u-1?\"\":\",\";if(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";
|
|
@@ -305,24 +305,17 @@ const computeDiff = (oldValue, newValue, compareMethod = DiffMethod.CHARS) => {
|
|
|
305
305
|
right: [],
|
|
306
306
|
};
|
|
307
307
|
diffArray.forEach(({ added, removed, value }) => {
|
|
308
|
-
const diffInformation = {};
|
|
309
308
|
if (added) {
|
|
310
|
-
|
|
311
|
-
diffInformation.value = value;
|
|
312
|
-
computedDiff.right.push(diffInformation);
|
|
309
|
+
computedDiff.right.push({ type: DiffType.ADDED, value });
|
|
313
310
|
}
|
|
314
|
-
if (removed) {
|
|
315
|
-
|
|
316
|
-
diffInformation.value = value;
|
|
317
|
-
computedDiff.left.push(diffInformation);
|
|
311
|
+
else if (removed) {
|
|
312
|
+
computedDiff.left.push({ type: DiffType.REMOVED, value });
|
|
318
313
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
computedDiff.
|
|
323
|
-
computedDiff.left.push(diffInformation);
|
|
314
|
+
else {
|
|
315
|
+
const info = { type: DiffType.DEFAULT, value };
|
|
316
|
+
computedDiff.right.push(info);
|
|
317
|
+
computedDiff.left.push(info);
|
|
324
318
|
}
|
|
325
|
-
return diffInformation;
|
|
326
319
|
});
|
|
327
320
|
return computedDiff;
|
|
328
321
|
};
|
|
@@ -477,7 +470,7 @@ const computeLineInformation = (oldString, newString, disableWordDiff = false, l
|
|
|
477
470
|
}
|
|
478
471
|
return { right, left };
|
|
479
472
|
})
|
|
480
|
-
.filter(
|
|
473
|
+
.filter((x) => x != null);
|
|
481
474
|
};
|
|
482
475
|
diffArray.forEach(({ added, removed, value }, index) => {
|
|
483
476
|
lineInformation = [
|
|
@@ -502,20 +495,21 @@ const computeLineInformation = (oldString, newString, disableWordDiff = false, l
|
|
|
502
495
|
* @param showLines lines that are always shown, regardless of diff
|
|
503
496
|
* @returns Promise<ComputedLineInformation> - Resolves with line-by-line diff data from the worker.
|
|
504
497
|
*/
|
|
505
|
-
// Import the bundled worker code (generated by scripts/build-worker.js)
|
|
506
|
-
import { WORKER_CODE } from './workerBundle';
|
|
507
498
|
// Cached Blob URL for the worker - created once and reused
|
|
508
499
|
let workerBlobUrl = null;
|
|
509
500
|
let workerAvailable = null;
|
|
510
|
-
//
|
|
511
|
-
const getWorkerBlobUrl = () => {
|
|
501
|
+
// Lazily import and create a Blob URL from the bundled worker code
|
|
502
|
+
const getWorkerBlobUrl = async () => {
|
|
512
503
|
if (workerBlobUrl !== null)
|
|
513
504
|
return workerBlobUrl;
|
|
505
|
+
if (workerAvailable === false)
|
|
506
|
+
return null;
|
|
514
507
|
if (typeof Worker === 'undefined' || typeof Blob === 'undefined' || typeof URL === 'undefined') {
|
|
515
508
|
workerAvailable = false;
|
|
516
509
|
return null;
|
|
517
510
|
}
|
|
518
511
|
try {
|
|
512
|
+
const { WORKER_CODE } = await import('./workerBundle.js');
|
|
519
513
|
const blob = new Blob([WORKER_CODE], { type: 'application/javascript' });
|
|
520
514
|
workerBlobUrl = URL.createObjectURL(blob);
|
|
521
515
|
workerAvailable = true;
|
|
@@ -526,9 +520,12 @@ const getWorkerBlobUrl = () => {
|
|
|
526
520
|
}
|
|
527
521
|
return workerBlobUrl;
|
|
528
522
|
};
|
|
529
|
-
const computeLineInformationWorker = (oldString, newString, disableWordDiff = false, lineCompareMethod = DiffMethod.CHARS, linesOffset = 0, showLines = [], deferWordDiff = false) => {
|
|
523
|
+
const computeLineInformationWorker = async (oldString, newString, disableWordDiff = false, lineCompareMethod = DiffMethod.CHARS, linesOffset = 0, showLines = [], deferWordDiff = false, disableWorker = false) => {
|
|
530
524
|
const fallback = () => computeLineInformation(oldString, newString, disableWordDiff, lineCompareMethod, linesOffset, showLines, deferWordDiff);
|
|
531
|
-
|
|
525
|
+
if (disableWorker) {
|
|
526
|
+
return Promise.resolve(fallback());
|
|
527
|
+
}
|
|
528
|
+
const blobUrl = await getWorkerBlobUrl();
|
|
532
529
|
if (!blobUrl) {
|
|
533
530
|
return Promise.resolve(fallback());
|
|
534
531
|
}
|
|
@@ -538,7 +535,6 @@ const computeLineInformationWorker = (oldString, newString, disableWordDiff = fa
|
|
|
538
535
|
worker = new Worker(blobUrl);
|
|
539
536
|
}
|
|
540
537
|
catch {
|
|
541
|
-
// Worker instantiation failed - fall back to synchronous computation
|
|
542
538
|
workerAvailable = false;
|
|
543
539
|
resolve(fallback());
|
|
544
540
|
return;
|
|
@@ -548,7 +544,6 @@ const computeLineInformationWorker = (oldString, newString, disableWordDiff = fa
|
|
|
548
544
|
worker.terminate();
|
|
549
545
|
};
|
|
550
546
|
worker.onerror = () => {
|
|
551
|
-
// Worker error - fall back and mark as unavailable for future calls
|
|
552
547
|
workerAvailable = false;
|
|
553
548
|
worker.terminate();
|
|
554
549
|
resolve(fallback());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeLineInformation } from "./compute-lines";
|
|
1
|
+
import { computeLineInformation } from "./compute-lines.js";
|
|
2
2
|
/**
|
|
3
3
|
* This sets up a message handler inside the Web Worker.
|
|
4
4
|
* When the main thread sends a message to this worker (via postMessage), this function is triggered.
|