You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

470 lines
776 KiB
JavaScript

3 months ago
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var $y=Object.create;var cs=Object.defineProperty;var $p=Object.getOwnPropertyDescriptor;var Uy=Object.getOwnPropertyNames;var jy=Object.getPrototypeOf,Vy=Object.prototype.hasOwnProperty;var gi=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),au=(e,n)=>{for(var t in n)cs(e,t,{get:n[t],enumerable:!0})},Up=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Uy(n))!Vy.call(e,r)&&r!==t&&cs(e,r,{get:()=>n[r],enumerable:!(i=$p(n,r))||i.enumerable});return e};var yi=(e,n,t)=>(t=e!=null?$y(jy(e)):{},Up(n||!e||!e.__esModule?cs(t,"default",{value:e,enumerable:!0}):t,e)),Wy=e=>Up(cs({},"__esModule",{value:!0}),e),T=(e,n,t,i)=>{for(var r=i>1?void 0:i?$p(n,t):n,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(i?o(n,t,r):o(r))||r);return i&&r&&cs(n,t,r),r};var lu=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)};var z=(e,n,t)=>(lu(e,n,"read from private field"),t?t.call(e):n.get(e)),Ie=(e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)},Pe=(e,n,t,i)=>(lu(e,n,"write to private field"),i?i.call(e,t):n.set(e,t),t);var cu=(e,n,t,i)=>({set _(r){Pe(e,n,r,t)},get _(){return z(e,n,i)}}),ye=(e,n,t)=>(lu(e,n,"access private method"),t);var Ta=gi((Wp,xa)=>{(function(e,n){"use strict";typeof define=="function"&&define.amd?define(n):typeof xa=="object"&&xa.exports?xa.exports=n():e.log=n()})(Wp,function(){"use strict";var e=function(){},n="undefined",t=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],r={},s=null;function o(f,h){var g=f[h];if(typeof g.bind=="function")return g.bind(f);try{return Function.prototype.bind.call(g,f)}catch{return function(){return Function.prototype.apply.apply(g,[f,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(f){return f==="debug"&&(f="log"),typeof console===n?!1:f==="trace"&&t?a:console[f]!==void 0?o(console,f):console.log!==void 0?o(console,"log"):e}function c(){for(var f=this.getLevel(),h=0;h<i.length;h++){var g=i[h];this[g]=h<f?e:this.methodFactory(g,f,this.name)}if(this.log=this.debug,typeof console===n&&f<this.levels.SILENT)return"No console available for logging"}function u(f){return function(){typeof console!==n&&(c.call(this),this[f].apply(this,arguments))}}function d(f,h,g){return l(f)||u.apply(this,arguments)}function p(f,h){var g=this,b,k,A,x="loglevel";typeof f=="string"?x+=":"+f:typeof f=="symbol"&&(x=void 0);function O(N){var q=(i[N]||"silent").toUpperCase();if(!(typeof window===n||!x)){try{window.localStorage[x]=q;return}catch{}try{window.document.cookie=encodeURIComponent(x)+"="+q+";"}catch{}}}function L(){var N;if(!(typeof window===n||!x)){try{N=window.localStorage[x]}catch{}if(typeof N===n)try{var q=window.document.cookie,Y=encodeURIComponent(x),_=q.indexOf(Y+"=");_!==-1&&(N=/^([^;]+)/.exec(q.slice(_+Y.length+1))[1])}catch{}return g.levels[N]===void 0&&(N=void 0),N}}function C(){if(!(typeof window===n||!x)){try{window.localStorage.removeItem(x)}catch{}try{window.document.cookie=encodeURIComponent(x)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function M(N){var q=N;if(typeof q=="string"&&g.levels[q.toUpperCase()]!==void 0&&(q=g.levels[q.toUpperCase()]),typeof q=="number"&&q>=0&&q<=g.levels.SILENT)return q;throw new TypeError("log.setLevel() called with invalid level: "+N)}g.name=f,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=h||d,g.getLevel=function(){return A??k??b},g.setLevel=function(N,q){return A=M(N),q!==!1&&O(A),c.call(g)},g.setDefaultLevel=function(N){k=M(N),L()||g.setLevel(N,!1)},g.resetLevel=function(){A=null,C(),c.call(g)},g.enableAll=function(N){g.setLevel(g.levels.TRACE,N)},g.disableAll=function(N){g.setLevel(g.levels.SILENT,N)},g.rebuild=function(){if(s!==g&&(b=M(s.getLevel())),c.call(g),s===g)for(var N in r)r[N].rebuild()},b=M(s?s.getLevel():"WARN");var B=L();B!=null&&(A=M(B)),c.call(g)}s=new p,s.getLogger=f
`,u),d==-1&&(d=l.length-1);var m=l.substring(u,d+1);(i.hasOwnProperty?i.hasOwnProperty(m):i[m]!==void 0)?c+=String.fromCharCode(i[m]):(p==s&&(m=l.substring(u),d=l.length),c+=String.fromCharCode(p),i[m]=p,t[p++]=m),u=d+1}return c}var s=4e4,o=r(e);s=65535;var a=r(n);return{chars1:o,chars2:a,lineArray:t}};F.prototype.diff_charsToLines_=function(e,n){for(var t=0;t<e.length;t++){for(var i=e[t][1],r=[],s=0;s<i.length;s++)r[s]=n[i.charCodeAt(s)];e[t][1]=r.join("")}};F.prototype.diff_commonPrefix=function(e,n){if(!e||!n||e.charAt(0)!=n.charAt(0))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,s=0;t<r;)e.substring(s,r)==n.substring(s,r)?(t=r,s=t):i=r,r=Math.floor((i-t)/2+t);return r};F.prototype.diff_commonSuffix=function(e,n){if(!e||!n||e.charAt(e.length-1)!=n.charAt(n.length-1))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,s=0;t<r;)e.substring(e.length-r,e.length-s)==n.substring(n.length-r,n.length-s)?(t=r,s=t):i=r,r=Math.floor((i-t)/2+t);return r};F.prototype.diff_commonOverlap_=function(e,n){var t=e.length,i=n.length;if(t==0||i==0)return 0;t>i?e=e.substring(t-i):t<i&&(n=n.substring(0,t));var r=Math.min(t,i);if(e==n)return r;for(var s=0,o=1;;){var a=e.substring(r-o),l=n.indexOf(a);if(l==-1)return s;o+=l,(l==0||e.substring(r-o)==n.substring(0,o))&&(s=o,o++)}};F.prototype.diff_halfMatch_=function(e,n){if(this.Diff_Timeout<=0)return null;var t=e.length>n.length?e:n,i=e.length>n.length?n:e;if(t.length<4||i.length*2<t.length)return null;var r=this;function s(f,h,g){for(var b=f.substring(g,g+Math.floor(f.length/4)),k=-1,A="",x,O,L,C;(k=h.indexOf(b,k+1))!=-1;){var M=r.diff_commonPrefix(f.substring(g),h.substring(k)),B=r.diff_commonSuffix(f.substring(0,g),h.substring(0,k));A.length<B+M&&(A=h.substring(k-B,k)+h.substring(k,k+M),x=f.substring(0,g-B),O=f.substring(g+M),L=h.substring(0,k-B),C=h.substring(k+M))}return A.length*2>=f.length?[x,O,L,C,A]:null}var o=s(t,i,Math.ceil(t.length/4)),a=s(t,i,Math.ceil(t.length/2)),l;if(!o&&!a)return null;a?o?l=o[4].length>a[4].length?o:a:l=a:l=o;var c,u,d,p;e.length>n.length?(c=l[0],u=l[1],d=l[2],p=l[3]):(d=l[0],p=l[1],c=l[2],u=l[3]);var m=l[4];return[c,u,d,p,m]};F.prototype.diff_cleanupSemantic=function(e){for(var n=!1,t=[],i=0,r=null,s=0,o=0,a=0,l=0,c=0;s<e.length;)e[s][0]==Z?(t[i++]=s,o=l,a=c,l=0,c=0,r=e[s][1]):(e[s][0]==de?l+=e[s][1].length:c+=e[s][1].length,r&&r.length<=Math.max(o,a)&&r.length<=Math.max(l,c)&&(e.splice(t[i-1],0,new F.Diff(le,r)),e[t[i-1]+1][0]=de,i--,i--,s=i>0?t[i-1]:-1,o=0,a=0,l=0,c=0,r=null,n=!0)),s++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(e[s-1][0]==le&&e[s][0]==de){var u=e[s-1][1],d=e[s][1],p=this.diff_commonOverlap_(u,d),m=this.diff_commonOverlap_(d,u);p>=m?(p>=u.length/2||p>=d.length/2)&&(e.splice(s,0,new F.Diff(Z,d.substring(0,p))),e[s-1][1]=u.substring(0,u.length-p),e[s+1][1]=d.substring(p),s++):(m>=u.length/2||m>=d.length/2)&&(e.splice(s,0,new F.Diff(Z,u.substring(0,m))),e[s-1][0]=de,e[s-1][1]=d.substring(0,d.length-m),e[s+1][0]=le,e[s+1][1]=u.substring(m),s++),s++}s++}};F.prototype.diff_cleanupSemanticLossless=function(e){function n(m,f){if(!m||!f)return 6;var h=m.charAt(m.length-1),g=f.charAt(0),b=h.match(F.nonAlphaNumericRegex_),k=g.match(F.nonAlphaNumericRegex_),A=b&&h.match(F.whitespaceRegex_),x=k&&g.match(F.whitespaceRegex_),O=A&&h.match(F.linebreakRegex_),L=x&&g.match(F.linebreakRegex_),C=O&&m.match(F.blanklineEndRegex_),M=L&&f.match(F.blanklineStartRegex_);return C||M?5:O||L?4:b&&!A&&x?3:A||x?2:b||k?1:0}for(var t=1;t<e.length-1;){if(e[t-1][0]==Z&&e[t+1][0]==Z){var i=e[t-1][1],r=e[t][1],s=e[t+1][1],o=this.diff_commonSuffix(i,r);if(o){var a=r.substring(r.length-o);i=i.substring(0,i.length-o),r=a+r.substring(0,r.length-o),s=a+s}for(var l=i,c=r,u=s,d=n(i,r)+n(r,s);r.charAt(0)===s.charAt(0);){i+=r.charAt(0),r=r.substring(1)+s.charAt(0),s=s.substring(1);var p=n(i,r)+n(r,s);p>=d&&(d=p,l=i,c=r,u=s)}e[t-1][1]!=l&&(l?e[t-1][1]=l:(e.splice(t-1,1),t--),e[t][1]=c,u?e[t+1][1]=u:(e.splice(t+1,1),t--))}t++}};F.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;F.whitespaceRegex_=/\s/;F.linebreakRegex_=/[\r\n]/;F.blanklineEnd
`),i=0,r=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<t.length;){var s=t[i].match(r);if(!s)throw new Error("Invalid patch string: "+t[i]);var o=new F.patch_obj;for(n.push(o),o.start1=parseInt(s[1],10),s[2]===""?(o.start1--,o.length1=1):s[2]=="0"?o.length1=0:(o.start1--,o.length1=parseInt(s[2],10)),o.start2=parseInt(s[3],10),s[4]===""?(o.start2--,o.length2=1):s[4]=="0"?o.length2=0:(o.start2--,o.length2=parseInt(s[4],10)),i++;i<t.length;){var a=t[i].charAt(0);try{var l=decodeURI(t[i].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+l)}if(a=="-")o.diffs.push(new F.Diff(le,l));else if(a=="+")o.diffs.push(new F.Diff(de,l));else if(a==" ")o.diffs.push(new F.Diff(Z,l));else{if(a=="@")break;if(a!=="")throw new Error('Invalid patch mode "'+a+'" in: '+l)}i++}}return n};F.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0};F.patch_obj.prototype.toString=function(){var e,n;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?n=this.start2+",0":this.length2==1?n=this.start2+1:n=this.start2+1+","+this.length2;for(var t=["@@ -"+e+" +"+n+` @@
`],i,r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case de:i="+";break;case le:i="-";break;case Z:i=" ";break}t[r+1]=i+encodeURI(this.diffs[r][1])+`
`}return t.join("").replace(/%20/g," ")};Qr.exports=F;Qr.exports.diff_match_patch=F;Qr.exports.DIFF_DELETE=le;Qr.exports.DIFF_INSERT=de;Qr.exports.DIFF_EQUAL=Z});var by=gi((oW,yy)=>{yy.exports=CE;var EL=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xL=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],TL=["Su","Mo","Tu","We","Th","Fr","Sa"],Hc=["January","February","March","April","May","June","July","August","September","October","November","December"],OL=["ACDT","ACST","ACWT","ADT","ACT","AEDT","AEST","AFT","AKDT","AKST","ALMT","AMT","AMST","ANAT","ANAST","AQTT","ART","AST","AWDT","AWST","AZOT","AZOST","AZT","AZST","BNT","BDT","BOT","BRT","BRST","BST","BTT","B","CAST","CAT","CCT","CDT","CEDT","CEST","CET","CHADT","CHAST","CHOT","CHOST","CHsT","CHUT","CIT","CKT","CLST","CLT","COT","CST","CVT","CWST","CXT","C","DAVT","DDUT","DST","EASST","EAST","EAT","ECT","EDT","EEDT","EEST","EET","EGT","EGST","EST","E","EIT","FET","FJT","FJST","FKST","FKT","FNT","F","GALT","GAMT","GET","GFT","GILT","GMT","GST","GYT","G","HADT","HAST","HKT","HOVT","HOVST","HST","ICT","IDT","IOT","IRDT","IRKT","IRKST","IRST","IST","JST","KGT","KOST","KRAT","KRAST","KST","KUYT","LHDT","LHST","LINT","L","MAGT","MAGST","MART","MAWT","MDT","MeST","MHT","MIST","MMT","MSD","MSK","MST","MUT","MVT","MYT","NCT","NDT","NFT","N","NOVT","NOVST","NPT","NRT","NST","NT","NUT","NZDT","NZST","OMST","OMSST","ORAT","O","PDT","PET","PETT","PETST","PGT","PHT","PHOT","PKT","PMDT","PMST","PONT","PST","PWT","PYT","PYST","P","QYZT","RET","ROTT","R","SAKT","SAMT","SAST","SBT","SCT","SGT","SRT","SLT","SLST","SRET","SST","SYOT","TAHT","TFT","TJT","TKT","TLT","TMT","TOT","TRUT","TVT","T","ULAT","ULAST","UTC","UYST","UYT","UZT","U","VET","VLAT","VLAST","VOLT","VUT","V","WAKT","WAT","WAST","WDT","WEDT","WEST","WET","WFT","WGT","WGST","WIB","WIT","WITA","WST","WT","YAKT","YAKST","YAP","YEK","YEKS"],qc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CL=new RegExp(EL.join("|"),"i"),ML=new RegExp(xL.join("|"),"i"),IL=new RegExp("\\b("+TL.join("|")+")\\b","i"),BL=new RegExp(Hc.join("|"),"i"),FL=new RegExp(qc.join("|"),"i"),RL=new RegExp("\\b("+OL.join("|")+")\\b","i"),DL=/(\d+)(st|nd|rd|th)\b/i,NL=/(\d{1,4})([/.-])(\d{1,2})[/.-](\d{1,4})/,_L=/((\+|-)(12:00|11:00|10:00|09:30|09:00|08:00|07:00|06:00|05:00|04:00|03:30|03:00|02:00|01:00|00:00|01:00|02:00|03:00|03:30|04:00|04:30|05:00|05:30|05:45|06:00|06:30|07:00|08:00|08:45|09:00|09:30|10:00|10:30|11:00|12:00|12:45|13:00|14:00))$/,KL=/((\+|-)(1200|1100|1000|0930|0900|0800|0700|0600|0500|0400|0330|0300|0200|0100|0000|0100|0200|0300|0330|0400|0430|0500|0530|0545|0600|0630|0700|0800|0845|0900|0930|1000|1030|1100|1200|1245|1300|1400))$/,ts="("+["AM?","PM?"].join("|")+")",YL=new RegExp("0\\d\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),PL=new RegExp("0\\d\\:\\d{1,2}(\\s*)"+ts,"i"),zL=new RegExp("0\\d(\\s*)"+ts,"i"),HL=new RegExp("\\d{1,2}\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),qL=new RegExp("\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),$L=new RegExp("\\d{1,2}(\\s*)"+ts,"i"),UL=new RegExp("\\d{1,2}"),jL=new RegExp(Hc.join("|")+"-\\d{2}","i"),VL=new RegExp(qc.join("|")+"-\\d{2}","i"),_p=new RegExp("(\\d{1,2})(\\D+)("+Hc.join("|")+"|"+qc.join("|")+")(\\2)('?\\d{2,4})"),WL=/\d{2}:\d{2}:\d{2}\.\d{3}/,GL=/\d{2}:\d{2}:\d{2}\.\d{2}/,QL=/\d{2}:\d{2}:\d{2}\.\d{1}/,ZL=/T\d{2}:\d{2}:\d{2}/,JL=/0\d:\d{2}:\d{2}/,XL=/0\d:\d{2}/,eE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}/,tE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{3}/,nE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{2}/,iE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{1}/,rE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]/,sE=/24:00:\d{2}/,oE=/24:00:\d{2}\.\d{3}/,aE=/24:00:\d{2}\.\d{2}/,lE=/24:00:\d{2}\.\d{1}/,cE=/24:00/,uE=/\d{4}/,dE=/\d{2}/,pE=/'\d{2}/,py=/0\d/,my=/\d{1,2}/,mE=/0\d/,fE=/\d{1,2}/,hE=/^([1-9])\/([1-9]|0[1-9])$/,gE=/^([1-9])\/(1[012])$/,yE=/^(0[1-9]|[12][0-9]|3[01])\/([1-9])$/,bE=/^(0[1-9]|[12][0-9]|3[01])\/(1[012]|0[1-9])$/,kE=/^([1-9])(\D)([1-9][0-9])$/,vE=/^([1-9])(\D)([0][0-9])$/,wE=/^(0[1-9]|1[012])(\D)([1-9][0-9])$/,AE=/^(0[1-9]|1[012])(\D)([0][0-9])$/,Kp=/([/][M]|[M][/]|[MM]|[M
`;t+=`${n.name} ${n.message}`,n.stack&&(t+=`
`+n.stack),ce.default.error(t),ds&&Ia(t.substring(t.indexOf("]")+2),ce.default.levels.TRACE)}function Dt(e){ce.default.info(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.INFO)}function pt(e){ce.default.debug(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.DEBUG)}function Et(e){ce.default.warn(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.WARN)}function bi(e){ce.default.getLevel()>ce.default.levels.DEBUG||du.set(e,performance.now())}function Yn(e){if(ce.default.getLevel()>ce.default.levels.DEBUG)return;du.has(e)||Et(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let n=performance.now()-du.get(e);pt(`${e}: ${n} `+E("logs.milliseconds-abbreviation"))}function Ia(e,n){ce.default.getLevel()<=n&&Ca.push(e)}function Gp(){Ca=[]}function pu(e){ds=e}function Ba(e){switch(e){case"INFO":{ce.default.setLevel("info");break}case"TRACE":{ce.default.setLevel("trace");break}case"DEBUG":{ce.default.setLevel("debug");break}case"SILENT":{ce.default.setLevel("silent");break}case"ERROR":{ce.default.setLevel("error");break}case"WARN":{ce.default.setLevel("warn");break}}}function Qp(e){switch(e){case ce.default.levels.INFO:return"INFO";case ce.default.levels.TRACE:return"TRACE";case ce.default.levels.DEBUG:return"DEBUG";case ce.default.levels.SILENT:return"SILENT";case ce.default.levels.ERROR:return"ERROR";case ce.default.levels.WARN:return"WARN"}}var Zp={};var Jp={};var Xp={};var em={commands:{"lint-file":{name:"Linten Sie die aktuelle Datei","error-message":"Lint-Datei-Fehler in der Datei"},"lint-file-unless-ignored":{name:"Linten Sie die aktuelle Datei, es sei denn, sie wird ignoriert"},"lint-all-files":{name:"Linten Sie alle Dateien im Vault","error-message":"Beim Linten aller Dateien Fehler in der Datei","success-message":"Alle Dateien gelinted","errors-message-singular":"Beim Linten aller Dateien gab es einen Fehler.","errors-message-plural":"Beim Linten aller Dateien gab es {NUM} Fehler.","start-message":"Dadurch werden alle Ihre Dateien ver\xE4ndert und es k\xF6nnen Fehler entstehen.","submit-button-text":"Linte alle","submit-button-notice-text":"Linte alle Dateien..."},"lint-all-files-in-folder":{name:"Linte alle Dateien im aktuellen Ordner","start-message":"Dadurch werden alle Ihre Dateien in {FOLDER_NAME} bearbeitet, einschlie\xDFlich der Dateien in den Unterordnern, was zu Fehlern f\xFChren kann.","submit-button-text":"Linte alle Dateien in {FOLDER_NAME}","submit-button-notice-text":"Linten aller Dateien in {FOLDER_NAME}...","error-message":"Beim Linten aller Dateien im Ordner gab es Fehler in der Datei","success-message":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted.","message-singular":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted und es trat ein Fehler auf.","message-plural":"Alle {FILE_COUNT}-Dateien in {FOLDER_NAME} wurden gelinted und es gab {ERROR_COUNT} Fehler."},"paste-as-plain-text":{name:"Einf\xFCgen als reiner Text und ohne \xC4nderungen"},"lint-file-pop-up-menu-text":{name:"Linte Datei"},"lint-folder-pop-up-menu-text":{name:"Linte Ordner"}},logs:{"plugin-load":"Plugin wird geladen","plugin-unload":"Plugin entladen","folder-lint":"Linting-Ordner ","linter-run":"Laufender Linter","paste-link-warning":"Abgebrochenes Einf\xFCgen des Lints, da der Inhalt der Zwischenablage ein Link ist, wodurch Konflikte mit anderen Plugins vermieden werden, die das Einf\xFCgen \xE4ndern.","see-console":"Weitere Informationen finden Sie in der Konsole.","unknown-error":"Beim Linten ist ein unbekannter Fehler aufgetreten.","moment-locale-not-found":"Beim Versuch, Moment.js locale auf {MOMENT_LOCALE} umzustellen, wurde {CURRENT_LOCALE} angezeigt","file-change-lint-message-start":"Linted","pre-rules":"Regeln vor regul\xE4ren Regeln","post-rules":"Regeln nach regul\xE4ren Regeln","rule-running":"Laufende Regeln","custom-regex":"Benutzerdefinierte Regex-Regeln","running-custom-regex":"Ausf\xFChren von benutzerdefinierten Regex","running-custom-lint-command":"Ausf\xFChren von benutzerdefinierten Lint-Befehlen","custom-lint-duplicate-warning":'Sie k\xF6nnen denselben Befehl ("{COMMAND_NAME}") nicht zweimal als benutzerdefinierte Lint-Regel
`)break;r.trim()===""||r===">"?t=r+t:t="",i--}return[t,i]}function bu(e=""){let[n]=gr(e,e.length);return`
`+n.trim()}function Am(e="",n=!1,t=1){let i=bu(e),r=Hn(i,">");return(n||Pa.test(e))&&t===r||t<r?i.substring(0,i.lastIndexOf(">")):i}function tb(e,n){if(n===0)return e;let t=n,i=n;for(;t>=0;){let r=e.charAt(t);if(r.trim()!=="")break;r===`
`&&(i=t),t--}return t<0||i===0?e.substring(n+1):e.substring(0,i)+`
`+e.substring(n)}function nb(e,n,t,i=!1,r=!1){if(t===0)return e;let s=n.split(">").length-1,o=t,a=t,l=0,c=!1,u="";for(;o>=0;){let k=e.charAt(o);if(k.trim()!==""&&k!==">")break;if(k===">"){if(c)break;l++}else if(k===`
`)if(l===0||l===s||l+1===s)a=o,l=0,u===`
`&&(c=!0);else break;o--,u=k}if(o<0||a===0)return e.substring(t+1);let d=e.substring(a,t);if(d===`
`||d.startsWith(`
`))return e.substring(0,a)+`
`+e.substring(t);let m=e.lastIndexOf(`
`,a-1),f="";m===-1?f=e.substring(0,a):f=e.substring(m,a);let h,g=e.indexOf(`
`,t+1);g===-1?h=e.substring(t):h=e.substring(t,g);let b;return r?b=Am(f,i,s):Hn(f,">")!=0&&!Pa.test(f)&&(ms.test(f)||ms.test(h))?b=e.substring(a,t).trimEnd():b=bu(f),e.substring(0,a)+b+e.substring(t)}function ib(e,n){if(n===e.length-1)return e;let t=n,i=n,r=!0;for(;t<e.length;){let s=e.charAt(t);if(s.trim()!=="")break;s===`
`&&(r?r=!1:i=t),t++}return t===e.length||i===e.length-1?e.substring(0,n):e.substring(0,n)+`
`+e.substring(i)}function rb(e,n,t,i=!1,r=!1){if(t===e.length-1)return e;let s=n.split(">").length-1,o=t,a=t,l=!0,c=0,u=!1,d="",p=!0,m=e.charAt(o-1);for(;o<e.length;){let O=e.charAt(o);if(O.trim()!==""&&O!==">")break;if(O===">"){if(u)break;c++}else if(O===`
`)if(c===0||c===s||c+1===s)c=0,l?l=!1:a=o,d===`
`&&(u=!0);else break;if(o++,d=O,p&&O===`
`&&r&&m===`
`){a=o;break}p=!1}if(o===e.length||a===e.length-1)return e.substring(0,t);let f=e.substring(t,a);if(f===`
`||f.endsWith(`
`))return e.substring(0,t)+`
`+e.substring(a);let g=e.indexOf(`
`,a+1),b="";g===-1?b=e.substring(a):b=e.substring(a+1,g);let k,A=e.lastIndexOf(`
`,t-1);A===-1?k=e.substring(0,a):k=e.substring(A+1,t);let x;return r?x=Am(b,i,s):ms.test(b)||ms.test(k)?x=e.substring(t,a).trimEnd():x=bu(b),e.substring(0,t)+x+e.substring(a)}function zn(e,n,t,i=!1){let[r,s]=gr(e,n);if(r.trim()!==""){let a=Pa.test(e.substring(n,t)),l=Hn(r,">"),c=ob(e,t,l),u=rb(e,r,c,a,i);return s=sb(u,s,l),nb(u,r,s,a,i)}let o=ib(e,t);return tb(o,s)}function Sm(e,n=0){let t=3735928559^n,i=1103547991^n;for(let r=0,s;r<e.length;r++)s=e.charCodeAt(r),t=Math.imul(t^s,2654435761),i=Math.imul(i^s,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&i)+(t>>>0)}function Lm(e){return e=e.replaceAll("\\b","\b"),e=e.replaceAll("\\f","\f"),e=e.replaceAll("\\n",`
`),e=e.replaceAll("\\r","\r"),e=e.replaceAll("\\t"," "),e=e.replaceAll("\\v","\v"),e}function yr(e,n){if(n==0)return n;let t=n;for(;t>0&&e.charAt(t-1)!==`
`;)t--;return t}function Em(e,n,t,i){return i>e.length-1?e:e.slice(0,i)+e.slice(i,e.length).replace(n,t)}function Hn(e,n){let t=0;for(let i=0,r=e.length;i<r;i++){let s=e.indexOf(n,i);s>-1&&(t++,i=s)}return t}function Ya(e){let n=typeof e;return n!="string"?n==="number":!isNaN(e)&&!isNaN(parseFloat(e))}function xm(e,n){let t=[],i=-1;for(;(i=n.indexOf(e,i+1))>=0;)t.push(i);return t}function sb(e,n,t){let i=n,r=n+1,s="",o=!1,a=0;for(;r<e.length;){if(s=e.charAt(r),s.trim()!==""&&s!==">"){o=!0;break}else if(s===`
`){if(a!==t)break;a=0,i=r}else s===">"&&a++;r++}return o?i:n}function ob(e,n,t){let i=n,r=n-1,s="",o=!1,a=0;for(;r>=0;){if(s=e.charAt(r),s.trim()!==""&&s!==">"){o=!0;break}else if(s===`
`){if(a!==t)break;a=0,i=r}else s===">"&&a++;r--}return o?i:n}function br(e){let n=kr(e),t=new Map,i="",r=[],s=[];for(let o of n){i=e.substring(o.startIndex,o.endIndex),r=i.split(`
`),r.splice(0,2);for(let a of r){if(s=a.split("|"),s.length!==4){Et(E("options.custom-auto-correct.custom-row-parse-warning").replace("{ROW}",a));continue}t.set(s[1].trim().toLowerCase(),s[2].trim())}}return t}function Ue(e,n,t,i){let r=e.length,s=0,o;if(n<0?n=-n>r?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);s<i.length;)o=i.slice(s,s+1e4),o.unshift(n,0),e.splice(...o),s+=1e4,n+=1e4}function st(e,n){return e.length>0?(Ue(e,e.length,0,n),e):n}var ab=qn(/\p{P}/u),yt=qn(/[A-Za-z]/),ot=qn(/[\dA-Za-z]/),Tm=qn(/[#-'*+\--9=?A-Z^-~]/);function fs(e){return e!==null&&(e<32||e===127)}var hs=qn(/\d/),Om=qn(/[\dA-Fa-f]/),ku=qn(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function ae(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}function Cm(e){return ku(e)||ab(e)}var Mm=qn(/\s/);function qn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function vu(e){if(e===null||ae(e)||Mm(e))return 1;if(Cm(e))return 2}function vr(e,n,t){let i=[],r=-1;for(;++r<e.length;){let s=e[r].resolveAll;s&&!i.includes(s)&&(n=s(n,t),i.push(s))}return n}var gs={name:"attention",tokenize:cb,resolveAll:lb};function lb(e,n){let t=-1,i,r,s,o,a,l,c,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(i=t;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let d=Object.assign({},e[i][1].end),p=Object.assign({},e[t][1].start);Im(d,-l),Im(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:p},s={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[t][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[i][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},a.end),c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=st(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=st(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",s,n]]),c=st(c,vr(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=st(c,[["exit",s,n],["enter",a,n],["exit",a,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,c=st(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,Ue(e,i-1,t-i+3,c),t=i+c.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function cb(e,n){let t=this.parser.constructs.attentionMarkers.null,i=this.previous,r=vu(i),s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;let c=e.exit("attentionSequence"),u=vu(l),d=!u||u===2&&r||t.includes(l),p=!r||r===2&&u||t.includes(i);return c._open=!!(s===42?d:d&&(r||!p)),c._close=!!(s===42?p:p&&(u||!d)),n(l)}}function Im(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var wu={name:"autolink",tokenize:ub};function ub(e,n,t){let i=0;return r;function r(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return yt(m)?(e.consume(m),o):c(m)}function o(m){return m===43||m===45||m===46||ot(m)?(i=1,a(m)):c(m)}function a(m){return m===58?(e.consume(m),i=0,l):(m===43||m===45||m===46||ot(m))&&i++<32?(e.consume(m),a):(i=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),n):m===null||m===32||m===60||fs(m)?t(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):Tm(m)?(e.consume(m),c):t(m)}function u(m){return ot(m)?d(m):t(m)}function d(m){return m===46?(e.consu
`;break}case-3:{o=`\r
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&r)continue;o=" ";break}default:o=String.fromCharCode(s)}r=s===-2,i.push(o)}return i.join("")}var zu={};au(zu,{attentionMarkers:()=>Gk,contentInitial:()=>qk,disable:()=>Qk,document:()=>Hk,flow:()=>Uk,flowInitial:()=>$k,insideSpan:()=>Wk,string:()=>jk,text:()=>Vk});var Hk={42:Xe,43:Xe,45:Xe,48:Xe,49:Xe,50:Xe,51:Xe,52:Xe,53:Xe,54:Xe,55:Xe,56:Xe,57:Xe,62:za},qk={91:Lu},$k={[-2]:ys,[-1]:ys,32:ys},Uk={35:xu,42:Ai,45:[Ga,Ai],60:Ou,61:Ga,95:Ai,96:$a,126:$a},jk={38:qa,92:Ha},Vk={[-5]:bs,[-4]:bs,[-3]:bs,33:Mu,38:qa,42:gs,60:[wu,Cu],91:Iu,92:[Eu,Ha],93:wi,95:gs,96:Au},Wk={null:[gs,Gm]},Gk={null:[42,95]},Qk={null:[]};function Hu(e){let t=Za([zu,...(e||{}).extensions||[]]),i={defined:[],lazy:{},constructs:t,content:r(Um),document:r(Vm),flow:r(Wm),string:r(Qm),text:r(Zm)};return i;function r(s){return o;function o(a){return ef(i,s,a)}}}function qu(e){for(;!Ua(e););return e}var tf=/[\0\t\n\r]/g;function $u(){let e=1,n="",t=!0,i;return r;function r(s,o,a){let l=[],c,u,d,p,m;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,n="",t&&(s.charCodeAt(0)===65279&&d++,t=void 0);d<s.length;){if(tf.lastIndex=d,c=tf.exec(s),p=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(p),!c){n=s.slice(d);break}if(m===10&&d===p&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),d<p&&(l.push(s.slice(d,p)),e+=p-d),m){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:i=!0,e=1}d=p+1}return a&&(i&&l.push(-5),n&&l.push(n),l.push(null)),l}}var Zk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nf(e){return e.replace(Zk,Jk)}function Jk(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let r=t.charCodeAt(1),s=r===120||r===88;return Ja(t.slice(s?2:1),s?16:10)}return wr(t)||e}function Ar(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rf(e.position):"start"in e||"end"in e?rf(e):"line"in e||"column"in e?Uu(e):""}function Uu(e){return sf(e&&e.line)+":"+sf(e&&e.column)}function rf(e){return Uu(e&&e.start)+"-"+Uu(e&&e.end)}function sf(e){return e&&typeof e=="number"?e:1}var af={}.hasOwnProperty;function ju(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Xk(t)(qu(Hu(t).document().write($u()(e,n,!0))))}function Xk(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Aa),autolinkProtocol:B,autolinkEmail:B,atxHeading:s(ka),blockQuote:s(vn),characterEscape:B,characterReference:B,codeFenced:s(Lt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Lt,o),codeText:s(nn,o),codeTextData:B,data:B,codeFlowValue:B,definition:s(Kn),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(mr),hardBreakEscape:s(va),hardBreakTrailing:s(va),htmlFlow:s(ss,o),htmlFlowData:B,htmlText:s(ss,o),htmlTextData:B,image:s(wa),label:o,link:s(Aa),listItem:s(wn),listItemValue:p,listOrdered:s(Sa,d),listUnordered:s(Sa),paragraph:s(fr),reference:S,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(ka),strong:s(La),thematicBreak:s(os)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:pe,autolinkProtocol:kn,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:bn,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:m,codeFencedFenceMeta:f,codeFlowValue:N,codeIndented:l(b),codeText:l(W),codeTextData:N,data:N,definition:l(),definitionDestinationString:x,definitionLabelString:k,definitionTitleString:A,emphasis:l(),hardBreakEscape:l(Y),hardBreakTrailing:l(Y),htmlFlow:l(_),htmlFlowData:N,htmlText:l(V),htmlTextData:N,image:l(re),label:Ye,labelText:Ge,lineEnding:q,link:l(X),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Me,resourceDestinationString:w,resourceTitleString:Qe,resource:rt,setextHeading:l(M),setextHeadingLineSequence:C,setextHeadingText:L,strong:l(),thematicBreak:l()}};lf(n,(e||{}).mdastExtensions||[]);let t={};return i;function
`&&(e=e.substring(0,o.end.offset)+e.substring(o.end.offset+1)),o.end.offset<e.length&&e[o.end.offset]===`
`&&(e=e.substring(0,o.end.offset)+e.substring(o.end.offset+1)),e=e.substring(0,o.start.offset)+e.substring(o.end.offset),s(e,a,o.start.offset)}for(let o of i){let a=o[1],l=a.referencePositions.length-a.footnotesReferencingKey.length;l=l>=0?l:0;let c=0;for(let u of a.footnotesReferencingKey){if(c+l>=a.referencePositions.length)throw new Error(E("logs.missing-footnote-error-message").replace("{FOOTNOTE}",u));r.set(u,a.referencePositions[l+c++])}}t=t.sort((o,a)=>r.get(o)-r.get(a)),t.length>0&&(e=e.trimEnd()+`
`);for(let o of t)e+=`
`+o;return e}function gf(e){let n=Se("footnoteDefinition",e),t=[],i=new Map,r=new Map,s=[],o=new Set,a=[],l=function(d,p,m){let f=p.match(/\[\^.*?\]/)[0];i.set(p,f);let h=o.has(f);if(h&&t.includes(p)){a.unshift(p);return}else if(h)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",f));let g;do g=d.lastIndexOf(f,m),g!==-1&&((g+p.length>d.length||d.substring(g,g+p.length)!==p)&&s.push({key:f,position:g}),m=g-1);while(g>0);o.add(f)};for(let d of n){let p=e.substring(d.start.offset,d.end.offset);t.unshift(p),l(e,p,d.start.offset)}let c=1,u=new Set;for(let d of t){if(u.has(d))continue;u.add(d);let p=i.get(d),m=`[^${c++}]`;r.set(p,m)}s.sort((d,p)=>p.position-d.position);for(let d of s){let p=r.get(d.key);e=Em(e,d.key,p,d.position)}for(let d of u){let p=i.get(d),m=r.get(p);e=e.replace(d,d.replace(p,m))}for(let d of a){let p=e.replace(`
${d}
`,`
`);e===p&&(p=e.replace(d,"")),e=p}return e}function tl(e,n,t){let i=Se(t,e);if(i.length===0)return e;let r="";if(n==="underscore")r="_";else if(n==="asterisk")r="*";else{let s=i[i.length-1];r=e.substring(s.start.offset,s.start.offset+1)}t==="strong"&&(r+=r);for(let s of i){let o=r+e.substring(s.start.offset+r.length,s.end.offset-r.length)+r;e=me(e,s.start.offset,s.end.offset,o)}return e}function yf(e,n){let t=Se("paragraph",e);if(t.length===0)return e;for(let i of t){let r=e.substring(i.start.offset,i.end.offset).split(`
`),s=r.length-1;if(!(s<1)){for(let o=0;o<s;o++){let a=r[o];mv(a,n)||(r[o]=fv(a,n))}e=me(e,i.start.offset,i.end.offset,r.join(`
`))}}return e}function mv(e,n){return!!(e.endsWith("<br>")&&n=="<br>"||e.endsWith("<br/>")&&n=="<br/>"||e.endsWith(" ")&&n==" "||!e.endsWith("\\\\")&&e.endsWith("\\")&&n=="\\")}function fv(e,n){e=e.trimEnd();let t=0;return e.endsWith("<br>")&&(t=4),e.endsWith("<br/>")&&(t=5),!e.endsWith("\\\\")&&e.endsWith("\\")&&(t=1),t&&(e=e.substring(0,e.length-t)),e.trimEnd()+n}function bf(e){let n=e.endsWith(`
`),t=Se("paragraph",e);if(t.length===0)return e;for(let i of t){let r=i.start.offset;for(r>0&&r--;r>=0&&e.charAt(r)!=`
`;)r--;r++;let s=e.substring(r,i.end.offset).split(`
`),o=s[0].trimStart();if(o.startsWith(">")||o.match(nl)||o.match(il))continue;let a=s.length,l=[],c=!1;for(let f=0;f<a;f++){let h=s[f];if(c){let g=l.length-1;l[g]+=`
`+h}else l.push(h);c=h.endsWith("<br>")||h.endsWith("<br/>")||h.endsWith(" ")||!h.endsWith("\\\\")&&h.endsWith("\\")}for(;r>0&&e.charAt(r-1)==`
`;)r--;let u=e.length,d=i.end.offset;for(d<u&&d++;d<u&&e.charAt(d)==`
`;)d++;let p=`
`;r==0&&(p="");let m=`
`;d==u&&(m=""),e=me(e,r,d,p+l.join(`
`)+m)}return n&&!e.endsWith(`
`)&&(e+=`
`),e}function kf(e){let n=Se("link",e);for(let t of n){if(t==null)continue;let i=e.substring(t.start.offset,t.end.offset);if(!i.match(Os))continue;let r=i.indexOf("]"),s=i.substring(0,1)+i.substring(1,r).trim()+i.substring(r);e=me(e,t.start.offset,t.end.offset,s)}return e}function vf(e,n){let t=Se("emphasis",e);for(let i of t){let r=e.substring(i.start.offset+1,i.end.offset-1);r=n(r),e=me(e,i.start.offset+1,i.end.offset-1,r)}return e}function wf(e,n){let t=Se("strong",e);for(let i of t){let r=e.substring(i.start.offset+2,i.end.offset-2);r=n(r),e=me(e,i.start.offset+2,i.end.offset-2,r)}return e}function Vn(e,n,t=!1){let i=pv(e,t);for(let r of i){let s=r.position.start.offset;if(r.isEmpty){for(;s<r.position.end.offset&&e.charAt(s).trim()!=="";)s++;s++}else{for(;s>0&&e.charAt(s-1).trim()==="";)s--;(s===0||e.charAt(s-1).trim()!="")&&s++}let o=e.substring(s,r.position.end.offset);Nf.test(o)&&(s+=4,o=o.substring(4)),o=n(o),e=me(e,s,r.position.end.offset,o)}return e}function Af(e){let n=Se("code",e);for(let t of n){let i=e.substring(t.start.offset,t.end.offset);!i.startsWith("```")&&!i.startsWith("~~~")||(e=zn(e,t.start.offset,t.end.offset))}return e}function Sf(e,n){let t=Se("math",e);for(let i of t)e=zn(e,i.start.offset,i.end.offset);t=Se("inlineMath",e);for(let i of t)e.substring(i.start.offset,i.end.offset).startsWith("$".repeat(n))&&(e=zn(e,i.start.offset,i.end.offset));return e}function Lf(e){let n=Se("blockquote",e);for(let t of n){let i=t.end.offset;for(;i<e.length-1&&e.charAt(i)!==`
`;)i++;e=zn(e,t.start.offset,i,!0)}return e}function Ef(e){let n=Se("thematicBreak",e);for(let t of n)e=zn(e,t.start.offset,t.end.offset);return e}function xf(e,n,t,i){let r=Se("list",e);if(!r)return e;for(let s of r){let o=s.start.offset;for(;o>0&&e.charAt(o-1)!==`
`;)o--;let a=e.substring(o,s.end.offset),l=function(p){let m=p.lastIndexOf("> ");return m!==-1&&(p=p.substring(m+2)),p=p.replaceAll(" "," "),Math.floor((p.split(" ").length-1)/2)+1},c=new Map,u=function(p,m){let f=m;for(;f>p;)c.delete(f--)},d=-1;a=a.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(p,m="",f,h,g,b,k)=>{let A=n==="preserve"||i?Number(g):1,x=l(m);if(!/^\d/.test(h)){let O=x>d?x:d;return u(x,O),p}return c.has(x)?n==="ascending"?(A=c.get(x)+1,c.set(x,A)):i&&(A=c.get(x)):c.set(x,A),d>x&&u(x,d),d=x,`${m}${A}${t}${k}`}),e=me(e,o,s.end.offset,a)}return e}function Tf(e,n){let t=Se("listItem",e);if(!t)return e;let i=/^((\d+[.)])|(- \[[ x]\]))/m,r=n;if(n=="consistent"){let s=t.length-1;for(;s>=0;){let o=e.substring(t[s].start.offset,t[s].end.offset);if(s--,!o.match(i)){r=o.charAt(0);break}}if(s==-1)return e}for(let s of t){let o=e.substring(s.start.offset,s.end.offset);o.match(i)||(o=r+o.substring(1),e=me(e,s.start.offset,s.end.offset,o))}return e}function id(e,n){let t=Se("blockquote",e);for(let i of t){let r=i.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let s=e.substring(i.start.offset,r);s=n(s),e=me(e,i.start.offset,r,s)}return e}function Of(e,n){let t=Se("math",e),i=new RegExp("^(\\${"+n+",})(\\n*)"),r=new RegExp("(\\n*)(\\${"+n+",})([^\\$]*)$");for(let s of t){let o=e.substring(s.start.offset,s.end.offset),a=hv(o,n,s.start.offset);for(let l of a)e=pf(e,l.startIndex,l.endIndex,i,r)}t=Se("inlineMath",e);for(let s of t)e.substring(s.start.offset,s.end.offset).startsWith("$".repeat(n))&&(e=pf(e,s.start.offset,s.end.offset,i,r));return e}function hv(e,n,t){let i="$".repeat(n),r=n;for(;e.charAt(r)==="$";)i+="$",r++;let s=[],o=Hn(e,i);if(o<=1)return[];if(o===2)return s.unshift({startIndex:t,endIndex:t+e.length}),s;o===3&&s.unshift({startIndex:t,endIndex:t+e.indexOf(i,i.length)+i.length}),o%2===1&&o--;let a=t,l=i.length;for(;o>2;){let c=e.indexOf(i,l)+i.length;s.unshift({startIndex:a,endIndex:t+c}),a=t+c+1,l=c+1,o-=2}return s.unshift({startIndex:t+e.indexOf(i,l),endIndex:t+e.length}),s}function pf(e,n,t,i,r){let s=e.substring(yr(e,n),n)??"",[o]=gr(s,s.length),a=e.substring(yr(e,t),t)??"",l=e.substring(n,t),c=If.test(s.trim()),u=!1;for(l=l.replace(i,(d,p,m="")=>{let f="";return!c&&s.trim()!=""?(f+=`
`,u=!0):c&&!td.test(s)&&(f+=`
`+o,u=!0),f+=p+`
`,m===""&&c&&(f+=o),f}),l=l.replace(r,(d,p="",m,f)=>{let h=p==="";return h&&c&&td.test(a.trim())?d:h&&c?`
`+o+m+f:`
`+m+f});u&&n>0;){let d=e[n-1];if(d!==" "&&d!==" ")break;n--}return me(e,n,t,l)}function kr(e){let n=[...e.matchAll(Bf)],t=[];for(let i of n){let r=yr(e,i.index);if(r===0)continue;let s=yr(e,r-1),o=i[0],a=e.substring(r,i.index+o.length);if(gv(a,o))continue;let l=s,c=e.substring(s,r-1);if(!o.includes("|")&&!c.includes("|"))continue;c=c.replace(nd,f=>{let h=f.trim();return h===""||h==="|"||(l+=f.length-1),""});let u=o.replace(nd,"");if(c.endsWith("|")&&(c=c.slice(0,-1)),u.endsWith("|")&&(u=u.slice(0,-1)),mf(c)!==mf(u))continue;if(s!==0){let f=yr(e,s-1),h=e.substring(f,s-1);if(h.startsWith("|")||h.endsWith("|"))continue}let d=i.index+i[0].length;if(d>=e.length-1){t.push({startIndex:l,endIndex:e.length});continue}let p=e.substring(d+1).split(`
`),m=0;for(;m<p.length&&Ff.test(p[m]);)d+=p[m].length+1,m++;t.push({startIndex:l,endIndex:d})}return t.reverse()}function gv(e,n){if(e.trim()===""||n.includes("||"))return!0;let t=e.replace(n,"");return/[^\s>]/.test(t)}function mf(e){let n=!1,t=0,i=0,r="";for(let s=0;s<e.length;s++)r=e[s],r==="\\"?(t++,n=t%2==1):(t=0,r==="|"&&!n&&i++,n=!1);return i}function Cf(e){let n=0,t=[],i=[...e.matchAll(Rf)];if(!i||i.length===0)return t;let r=[...e.matchAll(Df)];return i.forEach(s=>{n=s.index;let o=!1,a=e.length-1;for(;r&&r.length!==0&&!o;)if(r[0].index<=n)r.shift();else{o=!0;let l=r[0];a=l.index+l[0].length}t.push({startIndex:n,endIndex:a}),!r||r.length}),t.reverse()}function Mf(e,n){let t=Se("code",e);for(let i of t){let r=e.substring(i.start.offset,i.end.offset);!r.startsWith("```")||r.substring(3,r.indexOf(`
`)).trim()!==""||(e=me(e,i.start.offset+3,i.start.offset+3,n))}return e}var Wn=/^([ \t]*)(#+)([ \t]+)([^\n\r]*?)([ \t]+#+)?$/gm,_f=`^XXX\\.*?
(?:((?:.|
)*?)
)?XXX(?=\\s|$)$`,je=/^---\n((?:(((?!---)(?:.|\n)*?)\n)?))---(?=\n|$)/,yv=_f.replaceAll("X","`"),bv=_f.replaceAll("X","~"),kv=`^(( |( {4})).*
)+`,sI=new RegExp(`${yv}|${bv}|${kv}`,"gm"),rl=/(!?)\[{2}([^\][\n|]+)(\|([^\][\n|]+))?(\|([^\][\n|]+))?\]{2}/g,Os=/(!?)\[([^[]*)\](\(.*\))/g,Cs=/(\s|^)(#[\p{L}\-_\d/\p{Emoji_Presentation}]+)/gu,Kf=/^%%\n[^%]*\n%%/gm,Ms=/[,\s]+/,sl=/(\. ?){2}\./g,Is="\\s*(>\\s*)*",td=/^(>( |\t)*)+\$*?$/m,If=/^\s*(>\s*)+/m,Bf=/(\|? *:?-{1,}:? *\|?)(\| *:?-{1,}:? *\|?)*( |\t)*$/gm,nd=/^(((>[ ]?)*)|([ ]{0,3}))\|/m,Ff=/[^\n]*?\|[^\n]*?(\n|$)/m,Yf=/(([a-z\-0-9]+:)\/{2,3})([^\s/?#]*[^\s")'.?!/]|[/])?(([/?#][^\s")']*[^\s")'.?!])|[/])?/gi,Li=/(?:(?:(?:[a-z]+:)?\/\/)|www\.)(?:localhost|(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?|(?:(?:[a-z0-9][-_]*)*[a-z0-9]+)(?:\.(?:[a-z0-9]-*)*[a-z0-9]+)*(?:\.(?:[a-z]{2,})))(?::\d{2,5})?(?:(?:[/?#][a-z0-9-_%/&=?$.+~!*(,#@]*[a-z0-9-%_/$+~!*(,])|[/])?/gi,oI=new RegExp("^"+Li.source+"$","si"),Pf=/<a[\s]+([^>]+)>((?:.(?!<\/a>))*.)<\/a>/g,zf=/[\p{L}\p{N}\p{Pc}\p{M}\-'`]+/gu,Hf=/&[^\s]+;$/mi,Rf=Qf(!0),Df=Qf(!1),qf=/[“”„«»]/g,$f=/[]/g,Uf=/<%[^]*?%>/g,Ei="\\[.\\]",Nf=new RegExp(`^${Ei}`),jf=new RegExp(`^${Is}- ${Ei} `),ol=new RegExp(`^\\s*- ${Ei} `),nl=new RegExp(`^\\s*(-|\\*|\\+|\\d+[.)]|- (${Ei}))`,"m"),il=/^(\[\^[^\]]*\]) ?([,.;!:?])/gm,Pa=/^(>\s*)+\[![^\s]*\]/m,ms=/^\n?(>\s*)+((```)|(~~~))/m,rd=RegExp(/\p{L}/,"u");function at(e){return e.replace(/\$/g,"$$$$")}function sn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vf(e){let n=e.match(rl);if(n){for(let t of n)if(t.includes("|")){let i=t.indexOf("|"),r=t.substring(0,i+1)+t.substring(i+1,t.length-2).trim()+"]]";e=e.replace(t,r)}}return e}function Wf(e){let n=kr(e);if(n.length===0)return e;for(let t of n)e=zn(e,t.startIndex,t.endIndex);return e}function al(e){let n=e.match(/^#\s+(.*)/m);if(n&&n[1]){let t=n[1];return t=t.replaceAll(rl,(i,r,s,o)=>o!=null?o.replace("|",""):s),t.replaceAll(Os,"$2")}return""}function Gf(e){return[...e.matchAll(Cs)].map(n=>n[2])}function Qf(e){let n="(?:<!-{2,}|%%) *linter-{ENDING_TEXT} *(?:-{2,}>|%%)",t="";return e?t+="disable":t+="enable",new RegExp(n.replace("{ENDING_TEXT}",t),"g")}var ll=Symbol.for("yaml.alias"),cl=Symbol.for("yaml.document"),_t=Symbol.for("yaml.map"),sd=Symbol.for("yaml.pair"),kt=Symbol.for("yaml.scalar"),Ln=Symbol.for("yaml.seq"),lt=Symbol.for("yaml.node.type"),Kt=e=>!!e&&typeof e=="object"&&e[lt]===ll,Yt=e=>!!e&&typeof e=="object"&&e[lt]===cl,Pt=e=>!!e&&typeof e=="object"&&e[lt]===_t,ee=e=>!!e&&typeof e=="object"&&e[lt]===sd,Q=e=>!!e&&typeof e=="object"&&e[lt]===kt,zt=e=>!!e&&typeof e=="object"&&e[lt]===Ln;function se(e){if(e&&typeof e=="object")switch(e[lt]){case _t:case Ln:return!0}return!1}function te(e){if(e&&typeof e=="object")switch(e[lt]){case ll:case _t:case kt:case Ln:return!0}return!1}var Zf=e=>(Q(e)||se(e))&&!!e.anchor;var mt=Symbol("break visit"),Jf=Symbol("skip children"),on=Symbol("remove node");function Ht(e,n){let t=Xf(n);Yt(e)?Sr(null,e.contents,t,Object.freeze([e]))===on&&(e.contents=null):
`)}};an.defaultYaml={explicit:!1,version:"1.2"};an.defaultTags={"!!":"tag:yaml.org,2002:"};function dl(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(t)}return!0}function od(e){let n=new Set;return Ht(e,{Value(t,i){i.anchor&&n.add(i.anchor)}}),n}function ad(e,n){for(let t=1;;++t){let i=`${e}${t}`;if(!n.has(i))return i}}function nh(e,n){let t=[],i=new Map,r=null;return{onAnchor:s=>{t.push(s),r||(r=od(e));let o=ad(n,r);return r.add(o),o},setAnchors:()=>{for(let s of t){let o=i.get(s);if(typeof o=="object"&&o.anchor&&(Q(o.node)||se(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:i}}function Gn(e,n,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r){let o=i[r],a=Gn(e,i,String(r),o);a===void 0?delete i[r]:a!==o&&(i[r]=a)}else if(i instanceof Map)for(let r of Array.from(i.keys())){let s=i.get(r),o=Gn(e,i,r,s);o===void 0?i.delete(r):o!==s&&i.set(r,o)}else if(i instanceof Set)for(let r of Array.from(i)){let s=Gn(e,i,r,r);s===void 0?i.delete(r):s!==r&&(i.delete(r),i.add(s))}else for(let[r,s]of Object.entries(i)){let o=Gn(e,i,r,s);o===void 0?delete i[r]:o!==s&&(i[r]=o)}return e.call(n,t,i)}function Re(e,n,t){if(Array.isArray(e))return e.map((i,r)=>Re(i,String(r),t));if(e&&typeof e.toJSON=="function"){if(!t||!Zf(e))return e.toJSON(n,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(e,i),t.onCreate=s=>{i.res=s,delete t.onCreate};let r=e.toJSON(n,t);return t.onCreate&&t.onCreate(r),r}return typeof e=="bigint"&&!t?.keep?Number(e):e}var Qn=class{constructor(n){Object.defineProperty(this,lt,{value:n})}clone(){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:t,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!Yt(n))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:n,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=Re(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof s=="function"?Gn(s,{"":a},"",a):a}};var En=class extends Qn{constructor(n){super(ll),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n){let t;return Ht(n,{Node:(i,r)=>{if(r===this)return Ht.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(n,t){if(!t)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:s}=t,o=this.resolve(r);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=i.get(o);if(a||(Re(o,null,t),a=i.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=pl(r,o,i)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(n,t,i){let r=`*${this.source}`;if(n){if(dl(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(n.implicitKey)return`${r} `}return r}};function pl(e,n,t){if(Kt(n)){let i=n.resolve(e),r=t&&i&&t.get(i);return r?r.count*r.aliasCount:0}else if(se(n)){let i=0;for(let r of n.items){let s=pl(e,r,t);s>i&&(i=s)}return i}else if(ee(n)){let i=pl(e,n.key,t),r=pl(e,n.value,t);return Math.max(i,r)}return 1}var ml=e=>!e||typeof e!="function"&&typeof e!="object",P=class extends Qn{constructor(n){super(kt),this.value=n}toJSON(n,t){return t?.keep?this.value:Re(this.value,n,t)}toString(){return String(this.value)}};P.BLOCK_FOLDED="BLOCK_FOLDED";P.BLOCK_LITERAL="BLOCK_LITERAL";P.PLAIN="PLAIN";P.QUOTE_DOUBLE="QUOTE_DOUBLE";P.QUOTE_SINGLE="QUOTE_SINGLE";var Av="tag:yaml.org,2002:";function Sv(e,n,t){if(n){let i=t.filter(s=>s.tag===n),r=i.find(s=>!s.format)??i[0];if(!r)th
`)?Tt(t,n):t.includes(`
`)?`
`+Tt(t,n):(e.endsWith(" ")?"":" ")+t;var ld="flow",fl="block",Fs="quoted";function Rs(e,n,t="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return e;r<s&&(s=0);let l=Math.max(1+s,1+r-n.length);if(e.length<=l)return e;let c=[],u={},d=r-n.length;typeof i=="number"&&(i>r-Math.max(2,s)?c.push(0):d=r-i);let p,m,f=!1,h=-1,g=-1,b=-1;t===fl&&(h=rh(e,h,n.length),h!==-1&&(d=h+l));for(let A;A=e[h+=1];){if(t===Fs&&A==="\\"){switch(g=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(A===`
`)t===fl&&(h=rh(e,h,n.length)),d=h+n.length+l,p=void 0;else{if(A===" "&&m&&m!==" "&&m!==`
`&&m!==" "){let x=e[h+1];x&&x!==" "&&x!==`
`&&x!==" "&&(p=h)}if(h>=d)if(p)c.push(p),d=p+l,p=void 0;else if(t===Fs){for(;m===" "||m===" ";)m=A,A=e[h+=1],f=!0;let x=h>b+1?h-2:g-1;if(u[x])return e;c.push(x),u[x]=!0,d=x+l,p=void 0}else f=!0}m=A}if(f&&a&&a(),c.length===0)return e;o&&o();let k=e.slice(0,c[0]);for(let A=0;A<c.length;++A){let x=c[A],O=c[A+1]||e.length;x===0?k=`
${n}${e.slice(0,O)}`:(t===Fs&&u[x]&&(k+=`${e[x]}\\`),k+=`
${n}${e.slice(x+1,O)}`)}return k}function rh(e,n,t){let i=n,r=n+1,s=e[r];for(;s===" "||s===" ";)if(n<r+t)s=e[++n];else{do s=e[++n];while(s&&s!==`
`);i=n,r=n+1,s=e[r]}return i}var gl=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),yl=e=>/^(%|---|\.\.\.)/m.test(e);function Lv(e,n,t){if(!n||n<0)return!1;let i=n-t,r=e.length;if(r<=i)return!1;for(let s=0,o=0;s<r;++s)if(e[s]===`
`){if(s-o>i)return!0;if(o=s+1,r-o<=i)return!1}return!0}function Ds(e,n){let t=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=n,r=n.options.doubleQuotedMinMultiLineLength,s=n.indent||(yl(e)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(i||t[l+2]==='"'||t.length<r)l+=1;else{for(o+=t.slice(a,l)+`
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,i?o:Rs(o,s,Fs,gl(n,!1))}function cd(e,n){if(n.options.singleQuote===!1||n.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return Ds(e,n);let t=n.indent||(yl(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${t}`)+"'";return n.implicitKey?i:Rs(i,t,ld,gl(n,!1))}function Tr(e,n){let{singleQuote:t}=n.options,i;if(t===!1)i=Ds;else{let r=e.includes('"'),s=e.includes("'");r&&!s?i=cd:s&&!r?i=Ds:i=t?cd:Ds}return i(e,n)}var ud;try{ud=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{ud=/\n+(?!\n|$)/g}function hl({comment:e,type:n,value:t},i,r,s){let{blockQuote:o,commentString:a,lineWidth:l}=i.options;if(!o||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Tr(t,i);let c=i.indent||(i.forceBlockIndent||yl(t)?" ":""),u=o==="literal"?!0:o==="folded"||n===P.BLOCK_FOLDED?!1:n===P.BLOCK_LITERAL?!0:!Lv(t,l,c.length);if(!t)return u?`|
`:`>
`;let d,p;for(p=t.length;p>0;--p){let O=t[p-1];if(O!==`
`&&O!==" "&&O!==" ")break}let m=t.substring(p),f=m.indexOf(`
`);f===-1?d="-":t===m||f!==m.length-1?(d="+",s&&s()):d="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
`&&(m=m.slice(0,-1)),m=m.replace(ud,`$&${c}`));let h=!1,g,b=-1;for(g=0;g<t.length;++g){let O=t[g];if(O===" ")h=!0;else if(O===`
`)b=g;else break}let k=t.substring(0,b<g?b+1:g);k&&(t=t.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let x=(h?c?"2":"1":"")+d;if(e&&(x+=" "+a(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let O=t.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),L=!1,C=gl(i,!0);o!=="folded"&&n!==P.BLOCK_FOLDED&&(C.onOverflow=()=>{L=!0});let M=Rs(`${k}${O}${m}`,c,fl,C);if(!L)return`>${x}
${c}${M}`}return t=t.replace(/\n+/g,`$&${c}`),`|${x}
${c}${k}${t}${m}`}function Ev(e,n,t,i){let{type:r,value:s}=e,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=n;if(a&&s.includes(`
`)||u&&/[[\]{},]/.test(s))return Tr(s,n);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
`)?Tr(s,n):hl(e,n,t,i);if(!a&&!u&&r!==P.PLAIN&&s.includes(`
`))return hl(e,n,t,i);if(yl(s)){if(l==="")return n.forceBlockIndent=!0,hl(e,n,t,i);if(a&&l===c)return Tr(s,n)}let d=s.replace(/\n+/g,`$&
${l}`);if(o){let p=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:m,tags:f}=n.doc.schema;if(f.some(p)||m?.some(p))return Tr(s,n)}return a?d:Rs(d,l,ld,gl(n,!1))}function Tn(e,n,t,i){let{implicitKey:r,inFlow:s}=n,o=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==P.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=P.QUOTE_DOUBLE);let l=u=>{switch(u){case P.BLOCK_FOLDED:case P.BLOCK_LITERAL:return r||s?Tr(o.value,n):hl(o,n,t,i);case P.QUOTE_DOUBLE:return Ds(o.value,n);case P.QUOTE_SINGLE:return cd(o.value,n);case P.PLAIN:return Ev(o,n,t,i);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:d}=n.options,p=r&&u||d;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function bl(e,n){let t=Object.assign({blockQuote:!0,commentString:ih,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,n),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function xv(e,n){if(n.tag){let r=e.filter(s=>s.tag===n.tag);if(r.length>0)return r.find(s=>s.format===n.format)??r[0]}let t,i;if(Q(n)){i=n.value;let r=e.filter(s=>s.identify?.(i));if(r.length>1){let s=r.filter(o=>o.test);s.length>0&&(r=s)}t=r.find(s=>s.format===n.format)??r.find(s=>!s.format)}else i=n,t=e.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!t){let r=i?.constructor?.name??typeof i;throw new Error(`Tag not resolved for ${r} value`)}return t}function Tv(e,n,{anchors:t,doc:i}){if(!i.directives)return"";let r=[],s=(Q(e)||se(e))&&e.anchor;s&&dl(s)&&(t.add(s),r.push(`&${s}`));let o=e.tag?e.tag:n.default?null:n.tag;return o&&r.push(i.directives.tagString(o)),r.join(" ")}function On(e,n,t,i){if(ee(e))return e.toString(n,t,i);if(Kt(e)){if(n.doc.directives)return e.toString(n);if(n.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(e):n.resolvedAliases=new Set([e]),e=e.resolve(n.doc)}let r,s=te(e)?e:n.doc.createNode(e,{onTagObj:l=>r=l});r||(r=xv(n.doc.schema.tags,s));let o=Tv(s,r,n);o.length>0&&(n.indentAtStart=(n.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(s,n,t,i):Q(s)?Tn(s,n,t,i):s.toString(n,t,i);return o?Q(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
${n.indent}${a}`:a}function sh({key:e,value:n},t,i,r){let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=t,p=te(e)&&e.comment||null;if(d){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(se(e)||!te(e)&&typeof e=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let m=!d&&(!e||p&&n==null&&!t.inFlow||se(e)||(Q(e)?e.type===P.BLOCK_FOLDED||e.type===P.BLOCK_LITERAL:typeof e=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(d||!s),indent:a+l});let f=!1,h=!1,g=On(e,t,()=>f=!0,()=>h=!0);if(!m&&!t.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(s||n==null)return f&&i&&i(),g===""?"?":m?`? ${g}`:g}else if(s&&!d||n==null&&m)return g=`? ${g}`,p&&!f?g+=ln(g,t.indent,c(p)):h&&r&&r(),g;f&&(p=null),m?(p&&(g+=ln(g,t.indent,c(p))),g=`? ${g}
${a}:`):(g=`${g}:`,p&&(g+=ln(g,t.indent,c(p))));let b,k,A;te(n)?(b=!!n.spaceBefore,k=n.commentBefore,A=n.comment):(b=!1,k=null,A=null,n&&typeof n=="object"&&(n=o.createNode(n))),t.implicitKey=!1,!m&&!p&&Q(n)&&(t.indentAtStart=g.length+1),h=!1,!u&&l.length>=2&&!t.inFlow&&!m&&zt(n)&&!n.flow&&!n.tag&&!n.anchor&&(t.indent=t.indent.substring(2));let x=!1,O=On(n,t,()=>x=!0,()=>h=!0),L=" ";if(p||b||k){if(L=b?`
`:"",k){let C=c(k);L+=`
${Tt(C,t.indent)}`}O===""&&!t.inFlow?L===`
`&&(L=`
`):L+=`
${t.indent}`}else if(!m&&se(n)){let C=O[0],M=O.indexOf(`
`),B=M!==-1,N=t.inFlow??n.flow??n.items.length===0;if(B||!N){let q=!1;if(B&&(C==="&"||C==="!")){let Y=O.indexOf(" ");C==="&"&&Y!==-1&&Y<M&&O[Y+1]==="!"&&(Y=O.indexOf(" ",Y+1)),(Y===-1||M<Y)&&(q=!0)}q||(L=`
${t.indent}`)}}else(O===""||O[0]===`
`)&&(L="");return g+=L+O,t.inFlow?x&&i&&i():A&&!x?g+=ln(g,t.indent,c(A)):h&&r&&r(),g}function kl(e,n){(e==="debug"||e==="warn")&&console.warn(n)}var vl="<<",qt={identify:e=>e===vl||typeof e=="symbol"&&e.description===vl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new P(Symbol(vl)),{addToJSMap:pd}),stringify:()=>vl},oh=(e,n)=>(qt.identify(n)||Q(n)&&(!n.type||n.type===P.PLAIN)&&qt.identify(n.value))&&e?.doc.schema.tags.some(t=>t.tag===qt.tag&&t.default);function pd(e,n,t){if(t=e&&Kt(t)?t.resolve(e.doc):t,zt(t))for(let i of t.items)dd(e,n,i);else if(Array.isArray(t))for(let i of t)dd(e,n,i);else dd(e,n,t)}function dd(e,n,t){let i=e&&Kt(t)?t.resolve(e.doc):t;if(!Pt(i))throw new Error("Merge sources must be maps or map aliases");let r=i.toJSON(null,e,Map);for(let[s,o]of r)n instanceof Map?n.has(s)||n.set(s,o):n instanceof Set?n.add(s):Object.prototype.hasOwnProperty.call(n,s)||Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return n}function wl(e,n,{key:t,value:i}){if(te(t)&&t.addToJSMap)t.addToJSMap(e,n,i);else if(oh(e,t))pd(e,n,i);else{let r=Re(t,"",e);if(n instanceof Map)n.set(r,Re(i,r,e));else if(n instanceof Set)n.add(r);else{let s=Ov(t,r,e),o=Re(i,s,e);s in n?Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[s]=o}}return n}function Ov(e,n,t){if(n===null)return"";if(typeof n!="object")return String(n);if(te(e)&&t?.doc){let i=bl(t.doc,{});i.anchors=new Set;for(let s of t.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let r=e.toString(i);if(!t.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),kl(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(n)}function Or(e,n,t){let i=xn(e,void 0,t),r=xn(n,void 0,t);return new Le(i,r)}var Le=class e{constructor(n,t=null){Object.defineProperty(this,lt,{value:sd}),this.key=n,this.value=t}clone(n){let{key:t,value:i}=this;return te(t)&&(t=t.clone(n)),te(i)&&(i=i.clone(n)),new e(t,i)}toJSON(n,t){let i=t?.mapAsMap?new Map:{};return wl(t,i,this)}toString(n,t,i){return n?.doc?sh(this,n,t,i):JSON.stringify(this)}};function Sl(e,n,t){return(n.inFlow??e.flow?Mv:Cv)(e,n,t)}function Cv({comment:e,items:n},t,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),d=!1,p=[];for(let f=0;f<n.length;++f){let h=n[f],g=null;if(te(h))!d&&h.spaceBefore&&p.push(""),Al(t,p,h.commentBefore,d),h.comment&&(g=h.comment);else if(ee(h)){let k=te(h.key)?h.key:null;k&&(!d&&k.spaceBefore&&p.push(""),Al(t,p,k.commentBefore,d))}d=!1;let b=On(h,u,()=>g=null,()=>d=!0);g&&(b+=ln(b,s,c(g))),d&&g&&(d=!1),p.push(i+b)}let m;if(p.length===0)m=r.start+r.end;else{m=p[0];for(let f=1;f<p.length;++f){let h=p[f];m+=h?`
${l}${h}`:`
`}}return e?(m+=`
`+Tt(c(e),l),a&&a()):d&&o&&o(),m}function Mv({items:e},n,{flowChars:t,itemIndent:i}){let{indent:r,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=n;i+=s;let l=Object.assign({},n,{indent:i,inFlow:!0,type:null}),c=!1,u=0,d=[];for(let f=0;f<e.length;++f){let h=e[f],g=null;if(te(h))h.spaceBefore&&d.push(""),Al(n,d,h.commentBefore,!1),h.comment&&(g=h.comment);else if(ee(h)){let k=te(h.key)?h.key:null;k&&(k.spaceBefore&&d.push(""),Al(n,d,k.commentBefore,!1),k.comment&&(c=!0));let A=te(h.value)?h.value:null;A?(A.comment&&(g=A.comment),A.commentBefore&&(c=!0)):h.value==null&&k?.comment&&(g=k.comment)}g&&(c=!0);let b=On(h,l,()=>g=null);f<e.length-1&&(b+=","),g&&(b+=ln(b,i,a(g))),!c&&(d.length>u||b.includes(`
`))&&(c=!0),d.push(b),u=d.length}let{start:p,end:m}=t;if(d.length===0)return p+m;if(!c){let f=d.reduce((h,g)=>h+g.length+2,2);c=n.options.lineWidth>0&&f>n.options.lineWidth}if(c){let f=p;for(let h of d)f+=h?`
${s}${r}${h}`:`
`;return`${f}
${r}${m}`}else return`${p}${o}${d.join(" ")}${o}${m}`}function Al({indent:e,options:{commentString:n}},t,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){let s=Tt(n(i),e);t.push(s.trimStart())}}function Zn(e,n){let t=Q(n)?n.value:n;for(let i of e)if(ee(i)&&(i.key===n||i.key===t||Q(i.key)&&i.key.value===t))return i}var be=class extends Er{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(_t,n),this.items=[]}static from(n,t,i){let{keepUndefined:r,replacer:s}=i,o=new this(n),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||r)&&o.items.push(Or(l,c,i))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof n.sortMapEntries=="function"&&o.items.sort(n.sortMapEntries),o}add(n,t){let i;ee(n)?i=n:!n||typeof n!="object"||!("key"in n)?i=new Le(n,n?.value):i=new Le(n.key,n.value);let r=Zn(this.items,i.key),s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${i.key} already set`);Q(r.value)&&ml(i.value)?r.value.value=i.value:r.value=i.value}else if(s){let o=this.items.findIndex(a=>s(i,a)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(n){let t=Zn(this.items,n);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(n,t){let r=Zn(this.items,n)?.value;return(!t&&Q(r)?r.value:r)??void 0}has(n){return!!Zn(this.items,n)}set(n,t){this.add(new Le(n,t),!0)}toJSON(n,t,i){let r=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let s of this.items)wl(t,r,s);return r}toString(n,t,i){if(!n)return JSON.stringify(this);for(let r of this.items)if(!ee(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),Sl(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:i,onComment:t})}};var $t={collection:"map",default:!0,nodeClass:be,tag:"tag:yaml.org,2002:map",resolve(e,n){return Pt(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,t)=>be.from(e,n,t)};var et=class extends Er{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ln,n),this.items=[]}add(n){this.items.push(n)}delete(n){let t=Ll(n);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(n,t){let i=Ll(n);if(typeof i!="number")return;let r=this.items[i];return!t&&Q(r)?r.value:r}has(n){let t=Ll(n);return typeof t=="number"&&t<this.items.length}set(n,t){let i=Ll(n);if(typeof i!="number")throw new Error(`Expected a valid index, not ${n}.`);let r=this.items[i];Q(r)&&ml(t)?r.value=t:this.items[i]=t}toJSON(n,t){let i=[];t?.onCreate&&t.onCreate(i);let r=0;for(let s of this.items)i.push(Re(s,String(r++),t));return i}toString(n,t,i){return n?Sl(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(n,t,i){let{replacer:r}=i,s=new this(n);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof r=="function"){let l=t instanceof Set?a:String(o++);a=r.call(t,l,a)}s.items.push(xn(a,void 0,i))}}return s}};function Ll(e){let n=Q(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}var Ut={collection:"seq",default:!0,nodeClass:et,tag:"tag:yaml.org,2002:seq",resolve(e,n){return zt(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,t)=>et.from(e,n,t)};var Jn={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,t,i){return n=Object.assign({actualString:!0},n),Tn(e,n,t,i)}};var xi={identify:e=>e==null,createNode:()=>new P(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new P(null),stringify:({source:e},n)=>typeof e=="string"&&xi.test.test(e)?e:n.options.nullStr};var Ns={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new P(e[0]==="t"||e[0]==="T"),stringify({source:e,valu
`:" ")}return Tn({comment:e,type:n,value:a},i,r,s)}};function fd(e,n){if(zt(e))for(let t=0;t<e.items.length;++t){let i=e.items[t];if(!ee(i)){if(Pt(i)){i.items.length>1&&n("Each pair must have its own sequence indicator");let r=i.items[0]||new Le(new P(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
${r.key.commentBefore}`:i.commentBefore),i.comment){let s=r.value??r.key;s.comment=s.comment?`${i.comment}
${s.comment}`:i.comment}i=r}e.items[t]=ee(i)?i:new Le(i)}}else n("Expected a sequence for this tag");return e}function hd(e,n,t){let{replacer:i}=t,r=new et(e);r.tag="tag:yaml.org,2002:pairs";let s=0;if(n&&Symbol.iterator in Object(n))for(let o of n){typeof i=="function"&&(o=i.call(n,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(Or(a,l,t))}return r}var Ks={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:fd,createNode:hd};var Cr=class e extends et{constructor(){super(),this.add=be.prototype.add.bind(this),this.delete=be.prototype.delete.bind(this),this.get=be.prototype.get.bind(this),this.has=be.prototype.has.bind(this),this.set=be.prototype.set.bind(this),this.tag=e.tag}toJSON(n,t){if(!t)return super.toJSON(n);let i=new Map;t?.onCreate&&t.onCreate(i);for(let r of this.items){let s,o;if(ee(r)?(s=Re(r.key,"",t),o=Re(r.value,s,t)):s=Re(r,"",t),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,o)}return i}static from(n,t,i){let r=hd(n,t,i),s=new this;return s.items=r.items,s}};Cr.tag="tag:yaml.org,2002:omap";var Ys={collection:"seq",identify:e=>e instanceof Map,nodeClass:Cr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){let t=fd(e,n),i=[];for(let{key:r}of t.items)Q(r)&&(i.includes(r.value)?n(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new Cr,t)},createNode:(e,n,t)=>Cr.from(e,n,t)};function dh({value:e,source:n},t){return n&&(e?gd:yd).test.test(n)?n:e?t.options.trueStr:t.options.falseStr}var gd={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new P(!0),stringify:dh},yd={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new P(!1),stringify:dh};var ph={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:tt},mh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let n=Number(e.value);return isFinite(n)?n.toExponential():tt(e)}},fh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let n=new P(parseFloat(e.replace(/_/g,""))),t=e.indexOf(".");if(t!==-1){let i=e.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(n.minFractionDigits=i.length)}return n},stringify:tt};var Ps=e=>typeof e=="bigint"||Number.isInteger(e);function Fl(e,n,t,{intAsBigInt:i}){let r=e[0];if((r==="-"||r==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),i){switch(t){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return r==="-"?BigInt(-1)*o:o}let s=parseInt(e,t);return r==="-"?-1*s:s}function bd(e,n,t){let{value:i}=e;if(Ps(i)){let r=i.toString(n);return i<0?"-"+t+r.substr(1):t+r}return tt(e)}var hh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,t)=>Fl(e,2,2,t),stringify:e=>bd(e,2,"0b")},gh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,t)=>Fl(e,1,8,t),stringify:e=>bd(e,8,"0")},yh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,t)=>Fl(e,0,10,t),stringify:tt},bh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,t)=>Fl(e,2,16,t),stringify:e=>bd(e,16,"0x")};var Mr=class e extends be{constructor(n){super(n),this.tag=e.tag}add(n){let t;ee(n)?t=n:n&&typeof n=="object"&&"key"in n&&"value"in n&
`)?(t.push("..."),t.push(Tt(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=e.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Tt(s(l),"")))}return t.join(`
`)+`
`}var jt=class e{constructor(n,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,lt,{value:cl});let r=null;typeof t=="function"||Array.isArray(t)?r=t:i===void 0&&t&&(i=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:o}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new an({version:o}),this.setSchema(o,i),this.contents=n===void 0?null:this.createNode(n,r,i)}clone(){let n=Object.create(e.prototype,{[lt]:{value:cl}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=te(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){Br(this.contents)&&this.contents.add(n)}addIn(n,t){Br(this.contents)&&this.contents.addIn(n,t)}createAlias(n,t){if(!n.anchor){let i=od(this);n.anchor=!t||i.has(t)?ad(t||"a",i):t}return new En(n.anchor)}createNode(n,t,i){let r;if(typeof t=="function")n=t.call({"":n},"",n),r=t;else if(Array.isArray(t)){let g=k=>typeof k=="number"||k instanceof String||k instanceof Number,b=t.filter(g).map(String);b.length>0&&(t=t.concat(b)),r=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=i??{},{onAnchor:d,setAnchors:p,sourceObjects:m}=nh(this,o||"a"),f={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:m},h=xn(n,u,f);return a&&se(h)&&(h.flow=!0),p(),h}createPair(n,t,i={}){let r=this.createNode(n,null,i),s=this.createNode(t,null,i);return new Le(r,s)}delete(n){return Br(this.contents)?this.contents.delete(n):!1}deleteIn(n){return xr(n)?this.contents==null?!1:(this.contents=null,!0):Br(this.contents)?this.contents.deleteIn(n):!1}get(n,t){return se(this.contents)?this.contents.get(n,t):void 0}getIn(n,t){return xr(n)?!t&&Q(this.contents)?this.contents.value:this.contents:se(this.contents)?this.contents.getIn(n,t):void 0}has(n){return se(this.contents)?this.contents.has(n):!1}hasIn(n){return xr(n)?this.contents!==void 0:se(this.contents)?this.contents.hasIn(n):!1}set(n,t){this.contents==null?this.contents=Bs(this.schema,[n],t):Br(this.contents)&&this.contents.set(n,t)}setIn(n,t){xr(n)?this.contents=t:this.contents==null?this.contents=Bs(this.schema,Array.from(n),t):Br(this.contents)&&this.contents.setIn(n,t)}setSchema(n,t={}){typeof n=="number"&&(n=String(n));let i;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new an({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new an({version:n}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let r=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new Hs(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:t,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!n,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=Re(this.contents,t??"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?Gn(o,{"":l},"",l):l}toJSON(n,t){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:t})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){let t=JSON.stringify(n.indent);throw new Error
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l&&l.line===i&&l.col>r&&(a=Math.max(1,Math.min(l.col-r,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
${o}
${c}
`}};function cn(e,{flow:n,indicator:t,next:i,offset:r,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,d="",p="",m=!1,f=!1,h=null,g=null,b=null,k=null,A=null,x=null,O=null;for(let M of e)switch(f&&(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma"&&s(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),h&&(c&&M.type!=="comment"&&M.type!=="newline"&&s(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),M.type){case"space":!n&&(t!=="doc-start"||i?.type!=="flow-collection")&&M.source.includes(" ")&&(h=M),u=!0;break;case"comment":{u||s(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=M.source.substring(1)||" ";d?d+=p+B:d=B,p="",c=!1;break}case"newline":c?d?d+=M.source:(!x||t!=="seq-item-ind")&&(l=!0):p+=M.source,c=!0,m=!0,(g||b)&&(k=M),u=!0;break;case"anchor":g&&s(M,"MULTIPLE_ANCHORS","A node can have at most one anchor"),M.source.endsWith(":")&&s(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=M,O===null&&(O=M.offset),c=!1,u=!1,f=!0;break;case"tag":{b&&s(M,"MULTIPLE_TAGS","A node can have at most one tag"),b=M,O===null&&(O=M.offset),c=!1,u=!1,f=!0;break}case t:(g||b)&&s(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),x&&s(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),x=M,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(n){A&&s(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),A=M,c=!1,u=!1;break}default:s(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),c=!1,u=!1}let L=e[e.length-1],C=L?L.offset+L.source.length:r;return f&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&s(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:x,spaceBefore:l,comment:d,hasNewline:m,anchor:g,tag:b,newlineAfterProp:k,end:C,start:O??C}}function Xn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
`))return!0;if(e.end){for(let n of e.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(let n of e.items){for(let t of n.start)if(t.type==="newline")return!0;if(n.sep){for(let t of n.sep)if(t.type==="newline")return!0}if(Xn(n.key)||Xn(n.value))return!0}return!1;default:return!0}}function Us(e,n,t){if(n?.type==="flow-collection"){let i=n.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Xn(n)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _l(e,n,t){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let r=typeof i=="function"?i:(s,o)=>s===o||Q(s)&&Q(o)&&s.value===o.value;return n.some(s=>r(s.key,t))}var Lh="All mapping items must start at the same column";function Eh({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=s?.nodeClass??be,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=i.offset,c=null;for(let u of i.items){let{start:d,key:p,sep:m,value:f}=u,h=cn(d,{indicator:"explicit-key-ind",next:p??m?.[0],offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0}),g=!h.found;if(g){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(l,"BAD_INDENT",Lh)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(a.comment?a.comment+=`
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Xn(p))&&r(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&r(l,"BAD_INDENT",Lh);t.atKey=!0;let b=h.end,k=p?e(t,p,h,r):n(t,b,d,null,h,r);t.schema.compat&&Us(i.indent,p,r),t.atKey=!1,_l(t,a.items,k)&&r(b,"DUPLICATE_KEY","Map keys must be unique");let A=cn(m??[],{indicator:"map-value-ind",next:f,offset:k.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=A.end,A.found){g&&(f?.type==="block-map"&&!A.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<A.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let x=f?e(t,f,A,r):n(t,l,m,null,A,r);t.schema.compat&&Us(i.indent,f,r),l=x.range[2];let O=new Le(k,x);t.options.keepSourceTokens&&(O.srcToken=u),a.items.push(O)}else{g&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(k.comment?k.comment+=`
`+A.comment:k.comment=A.comment);let x=new Le(k);t.options.keepSourceTokens&&(x.srcToken=u),a.items.push(x)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,l,c??l],a}function xh({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=s?.nodeClass??et,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=i.offset,c=null;for(let{start:u,value:d}of i.items){let p=cn(u,{indicator:"seq-item-ind",next:d,offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d&&d.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let m=d?e(t,d,p,r):n(t,p.end,u,null,p,r);t.schema.compat&&Us(i.indent,d,r),l=m.range[2],a.items.push(m)}return a.range=[i.offset,l,c??l],a}function un(e,n,t,i){let r="";if(e){let s=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),s=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}n+=l.length}}return{comment:r,offset:n}}var Ad="Block collections are not allowed within flow collections",Sd=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Th({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=i.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?be:et),c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let d=i.offset+i.start.source.length;for(let g=0;g<i.items.length;++g){let b=i.items[g],{start:k,key:A,sep:x,value:O}=b,L=cn(k,{flow:a,indicator:"explicit-key-ind",next:A??x?.[0],offset:d,onError:r,parentIndent:i.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!x&&!O){g===0&&L.comma?r(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<i.items.length-1&&r(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),L.comment&&(c.comment?c.comment+=`
`+L.comment:c.comment=L.comment),d=L.end;continue}!o&&t.options.strict&&Xn(A)&&r(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)L.comma&&r(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(L.comma||r(L.start,"MISSING_CHAR",`Missing , between ${a} items`),L.comment){let C="";e:for(let M of k)switch(M.type){case"comma":case"space":break;case"comment":C=M.source.substring(1);break e;default:break e}if(C){let M=c.items[c.items.length-1];ee(M)&&(M=M.value??M.key),M.comment?M.comment+=`
`+C:M.comment=C,L.comment=L.comment.substring(C.length+1)}}if(!o&&!x&&!L.found){let C=O?e(t,O,L,r):n(t,L.end,x,null,L,r);c.items.push(C),d=C.range[2],Sd(O)&&r(C.range,"BLOCK_IN_FLOW",Ad)}else{t.atKey=!0;let C=L.end,M=A?e(t,A,L,r):n(t,C,k,null,L,r);Sd(A)&&r(M.range,"BLOCK_IN_FLOW",Ad),t.atKey=!1;let B=cn(x??[],{flow:a,indicator:"map-value-ind",next:O,offset:M.range[2],onError:r,parentIndent:i.indent,startOnNewline:!1});if(B.found){if(!o&&!L.found&&t.options.strict){if(x)for(let Y of x){if(Y===B.found)break;if(Y.type==="newline"){r(Y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}L.start<B.found.offset-1024&&r(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else O&&("source"in O&&O.source&&O.source[0]===":"?r(O,"MISSING_CHAR",`Missing space after : in ${a}`):r(B.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let N=O?e(t,O,B,r):B.found?n(t,B.end,x,null,B,r):null;N?Sd(O)&&r(N.range,"BLOCK_IN_FLOW",Ad):B.comment&&(M.comment?M.comment+=`
`+B.comment:M.comment=B.comment);let q=new Le(M,N);if(t.options.keepSourceTokens&&(q.srcToken=b),o){let Y=c;_l(t,Y.items,M)&&r(C,"DUPLICATE_KEY","Map keys must be unique"),Y.items.push(q)}else{let Y=new be(t.schema);Y.flow=!0,Y.items.push(q);let _=(N??M).range;Y.range=[M.range[0],_[1],_[2]],c.items.push(Y)}d=N?N.range[2]:B.end}}let p=o?"}":"]",[m,...f]=i.end,h=d;if(m&&m.source===p)h=m.offset+m.source.length;else{let g=a[0].toUpperCase()+a.substring(1),b=u?`${g} must end with a ${p}`:`${g} in block collection must be sufficiently indented and end with a ${p}`;r(d,u?"MISSING_CHAR":"BAD_INDENT",b),m&&m.source.length!==1&&f.unshift(m)}if(f.length>0){let g=un(f,h,t.options.strict,r);g.comment&&(c.comment?c.comment+=`
`+g.comment:c.comment=g.comment),c.range=[i.offset,h,g.offset]}else c.range=[i.offset,h,h];return c}function Ld(e,n,t,i,r,s){let o=t.type==="block-map"?Eh(e,n,t,i,s):t.type==="block-seq"?xh(e,n,t,i,s):Th(e,n,t,i,s),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Oh(e,n,t,i,r){let s=i.tag,o=s?n.directives.tagName(s.source,p=>r(s,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){let{anchor:p,newlineAfterProp:m}=i,f=p&&s?p.offset>s.offset?p:s:p??s;f&&(!m||m.offset<f.offset)&&r(f,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===be.tagName&&a==="map"||o===et.tagName&&a==="seq")return Ld(e,n,t,r,o);let l=n.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=n.schema.knownTags[o];if(p&&p.collection===a)n.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?.collection?r(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ld(e,n,t,r,o)}let c=Ld(e,n,t,r,o,l),u=l.resolve?.(c,p=>r(s,"TAG_RESOLVE_FAILED",p),n.options)??c,d=te(u)?u:new P(u);return d.range=c.range,d.tag=o,l?.format&&(d.format=l.format),d}function Kl(e,n,t){let i=n.offset,r=Rv(n,e.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};let s=r.mode===">"?P.BLOCK_FOLDED:P.BLOCK_LITERAL,o=n.source?Dv(n.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let g=o[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=r.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"",g=i+r.length;return n.source&&(g+=n.source.length),{value:h,type:s,comment:r.comment,range:[i,g,g]}}let l=n.indent+r.indent,c=n.offset+r.length,u=0;for(let h=0;h<a;++h){let[g,b]=o[h];if(b===""||b==="\r")r.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&t(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=g.length),u=h,l===0&&!e.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+b.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>l&&(a=h+1);let d="",p="",m=!1;for(let h=0;h<u;++h)d+=o[h][0].slice(l)+`
`;for(let h=u;h<a;++h){let[g,b]=o[h];c+=g.length+b.length+1;let k=b[b.length-1]==="\r";if(k&&(b=b.slice(0,-1)),b&&g.length<l){let x=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(c-b.length-(k?2:1),"BAD_INDENT",x),g=""}s===P.BLOCK_LITERAL?(d+=p+g.slice(l)+b,p=`
`):g.length>l||b[0]===" "?(p===" "?p=`
`:!m&&p===`
`&&(p=`
`),d+=p+g.slice(l)+b,p=`
`,m=!0):b===""?p===`
`?d+=`
`:p=`
`:(d+=p+b,p=" ",m=!1)}switch(r.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)d+=`
`+o[h][0].slice(l);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
`}let f=i+r.length+n.source.length;return{value:d,type:s,comment:r.comment,range:[i,f,f]}}function Rv({offset:e,props:n},t,i){if(n[0].type!=="block-scalar-header")return i(n[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=n[0],s=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let m=r[p];if(!a&&(m==="-"||m==="+"))a=m;else{let f=Number(m);!o&&f?o=f:l===-1&&(l=e+p)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",d=r.length;for(let p=1;p<n.length;++p){let m=n[p];switch(m.type){case"space":c=!0;case"newline":d+=m.source.length;break;case"comment":t&&!c&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=m.source.length,u=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),d+=m.source.length;break;default:{let f=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",f);let h=m.source;h&&typeof h=="string"&&(d+=h.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:d}}function Dv(e){let n=e.split(/\n( *)/),t=n[0],i=t.match(/^( *)/),s=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let o=1;o<n.length;o+=2)s.push([n[o],n[o+1]]);return s}function Yl(e,n,t){let{offset:i,type:r,source:s,end:o}=e,a,l,c=(p,m,f)=>t(i+p,m,f);switch(r){case"scalar":a=P.PLAIN,l=Nv(s,c);break;case"single-quoted-scalar":a=P.QUOTE_SINGLE,l=_v(s,c);break;case"double-quoted-scalar":a=P.QUOTE_DOUBLE,l=Kv(s,c);break;default:return t(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let u=i+s.length,d=un(o,u,n,t);return{value:l,type:a,comment:d.comment,range:[i,u,d.offset]}}function Nv(e,n){let t="";switch(e[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${e[0]}`;break}case"@":case"`":{t=`reserved character ${e[0]}`;break}}return t&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ch(e)}function _v(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),Ch(e.slice(1,-1)).replace(/''/g,"'")}function Ch(e){let n,t;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=n.exec(e);if(!i)return e;let r=i[1],s=" ",o=n.lastIndex;for(t.lastIndex=o;i=t.exec(e);)i[1]===""?s===`
`?r+=s:s=`
`:(r+=s+i[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,i=a.exec(e),r+s+(i?.[1]??"")}function Kv(e,n){let t="";for(let i=1;i<e.length-1;++i){let r=e[i];if(!(r==="\r"&&e[i+1]===`
`))if(r===`
`){let{fold:s,offset:o}=Yv(e,i);t+=s,i=o}else if(r==="\\"){let s=e[++i],o=Pv[s];if(o)t+=o;else if(s===`
`)for(s=e[i+1];s===" "||s===" ";)s=e[++i+1];else if(s==="\r"&&e[i+1]===`
`)for(s=e[++i+1];s===" "||s===" ";)s=e[++i+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=zv(e,i+1,a,n),i+=a}else{let a=e.substr(i-1,2);n(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(r===" "||r===" "){let s=i,o=e[i+1];for(;o===" "||o===" ";)o=e[++i+1];o!==`
`&&!(o==="\r"&&e[i+2]===`
`)&&(t+=i>s?e.slice(s,i+1):r)}else t+=r}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),t}function Yv(e,n){let t="",i=e[n+1];for(;(i===" "||i===" "||i===`
`||i==="\r")&&!(i==="\r"&&e[n+2]!==`
`);)i===`
`&&(t+=`
`),n+=1,i=e[n+1];return t||(t=" "),{fold:t,offset:n}}var Pv={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function zv(e,n,t,i){let r=e.substr(n,t),o=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(o)){let a=e.substr(n-2,t+2);return i(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function Ed(e,n,t,i){let{value:r,type:s,comment:o,range:a}=n.type==="block-scalar"?Kl(e,n,i):Yl(n,e.options.strict,i),l=t?e.directives.tagName(t.source,d=>i(t,"TAG_RESOLVE_FAILED",d)):null,c;e.options.stringKeys&&e.atKey?c=e.schema[kt]:l?c=Hv(e.schema,r,l,t,i):n.type==="scalar"?c=qv(e,r,n,i):c=e.schema[kt];let u;try{let d=c.resolve(r,p=>i(t??n,"TAG_RESOLVE_FAILED",p),e.options);u=Q(d)?d:new P(d)}catch(d){let p=d instanceof Error?d.message:String(d);i(t??n,"TAG_RESOLVE_FAILED",p),u=new P(r)}return u.range=a,u.source=r,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Hv(e,n,t,i,r){if(t==="!")return e[kt];let s=[];for(let a of e.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(n))return a;let o=e.knownTags[t];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),e[kt])}function qv({atKey:e,directives:n,schema:t},i,r,s){let o=t.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(i))||t[kt];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(i))??t[kt];if(o.tag!==a.tag){let l=n.tagString(o.tag),c=n.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;s(r,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Mh(e,n,t){if(n){t===null&&(t=n.length);for(let i=t-1;i>=0;--i){let r=n[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=n[++i];r?.type==="space";)e+=r.source.length,r=n[++i];break}}return e}var $v={composeNode:xd,composeEmptyNode:Pl};function xd(e,n,t,i){let r=e.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(n.type){case"alias":c=Uv(e,n,i),(a||l)&&i(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Ed(e,n,l,i),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Oh($v,e,n,t,i),a&&(c.anchor=a.source.substring(1));break;default:{let d=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;i(n,"UNEXPECTED_TOKEN",d),c=Pl(e,n.offset,void 0,null,t,i),u=!1}}return a&&c.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!Q(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(n.type==="scalar"&&n.source===""?c.comment=o:c.commentBefore=o),e.options.keepSourceTokens&&u&&(c.srcToken=n),c}function Pl(e,n,t,i,{spaceBefore:r,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Mh(n,t,i),indent:-1,source:""},d=Ed(e,u,a,c);return o&&(d.anchor=o.source.substring(1),d.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(d.spaceBefore=!0),s&&(d.comment=s,d.range[2]=l),d}function Uv({options:e},{offset:n,source:t,end:i},r){let s=new En(t.substring(1));s.source===""&&r(n,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(n+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=n+t.length,a=un(i,o,e.strict,r);return s.range=[n,o,a.offset],a.comment&&(s.comment=a.comment),s}function Ih(e,n,{offset:t,start:i,value:r,end:s},o){let a=Object.assign({_directives:n},e),l=new jt(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=cn(i,{indicator:"doc-start",next:r??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.content
`:`
`)+(s.substring(1)||" "),t=!0,i=!1;break;case"%":e[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:n,afterEmptyLine:i}}var Vs=class{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,r,s)=>{let o=js(t);s?this.warnings.push(new $s(o,i,r)):this.errors.push(new Ot(o,i,r))},this.directives=new an({version:n.version||"1.2"}),this.options=n}decorate(n,t){let{comment:i,afterEmptyLine:r}=Bh(this.prelude);if(i){let s=n.contents;if(t)n.comment=n.comment?`${n.comment}
${i}`:i;else if(r||n.directives.docStart||!s)n.commentBefore=i;else if(se(s)&&!s.flow&&s.items.length>0){let o=s.items[0];ee(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${i}
${a}`:i}else{let o=s.commentBefore;s.commentBefore=o?`${i}
${o}`:i}}t?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Bh(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,t=!1,i=-1){for(let r of n)yield*this.next(r);yield*this.end(t,i)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(t,i,r)=>{let s=js(n);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{let t=Ih(this.options,this.directives,n,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{let t=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,i=new Ot(js(n),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Ot(js(n),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=un(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ot(js(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){let i=Object.assign({_directives:this.directives},this.options),r=new jt(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};var ql={};au(ql,{BOM:()=>Ws,DOCUMENT:()=>Gs,FLOW_END:()=>Qs,SCALAR:()=>Fr,createScalarToken:()=>Rh,isCollection:()=>Wv,isScalar:()=>Gv,prettyToken:()=>Qv,resolveAsScalar:()=>Fh,setScalarValue:()=>Dh,stringify:()=>_h,tokenType:()=>Cd,visit:()=>ei});function Fh(e,n=!0,t){if(e){let i=(r,s,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(a,s,o);else throw new Ot([a,a+1],s,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Yl(e,n,i);case"block-scalar":return Kl({options:{strict:n}},e,i)}}return null}function Rh(e,n){let{implicitKey:t=!1,indent:i,inFlow:r=!1,offset:s=-1,type:o="PLAIN"}=n,a=Tn({type:o,value:e},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=n.end??[{type:"newline",offset:-1,indent:i,source:`
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
`),u=a.substring(0,c),d=a.substring(c+1)+`
`,p=[{type:"block-scalar-header",offset:s,indent:i,source:u}];return Nh(p,l)||p.push({type:"newline",offset:-1,indent:i,source:`
`}),{type:"block-scalar",offset:s,indent:i,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:a,end:l};default:return{type:"scalar",offset:s,indent:i,source:a,end:l}}}function Dh(e,n,t={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:s=!1,type:o}=t,a="indent"in e?e.indent:null;if(i&&typeof a=="number"&&(a+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Tn({type:o,value:n},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":jv(e,l);break;case'"':Td(e,l,"double-quoted-scalar");break;case"'":Td(e,l,"single-quoted-scalar");break;default:Td(e,l,"scalar")}}function jv(e,n){let t=n.indexOf(`
`),i=n.substring(0,t),r=n.substring(t+1)+`
`;if(e.type==="block-scalar"){let s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,e.source=r}else{let{offset:s}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:i}];Nh(a,"end"in e?e.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
`});for(let l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:r})}}function Nh(e,n){if(n)for(let t of n)switch(t.type){case"space":case"comment":e.push(t);break;case"newline":return e.push(t),!0}return!1}function Td(e,n,t){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=t,e.source=n;break;case"block-scalar":{let i=e.props.slice(1),r=n.length;e.props[0].type==="block-scalar-header"&&(r-=e.props[0].source.length);for(let s of i)s.offset+=r;delete e.props,Object.assign(e,{type:t,source:n,end:i});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+n.length,indent:e.indent,source:`
`};delete e.items,Object.assign(e,{type:t,source:n,end:[r]});break}default:{let i="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:t,indent:i,source:n,end:r})}}}var _h=e=>"type"in e?Hl(e):zl(e);function Hl(e){switch(e.type){case"block-scalar":{let n="";for(let t of e.props)n+=Hl(t);return n+e.source}case"block-map":case"block-seq":{let n="";for(let t of e.items)n+=zl(t);return n}case"flow-collection":{let n=e.start.source;for(let t of e.items)n+=zl(t);for(let t of e.end)n+=t.source;return n}case"document":{let n=zl(e);if(e.end)for(let t of e.end)n+=t.source;return n}default:{let n=e.source;if("end"in e&&e.end)for(let t of e.end)n+=t.source;return n}}}function zl({start:e,key:n,sep:t,value:i}){let r="";for(let s of e)r+=s.source;if(n&&(r+=Hl(n)),t)for(let s of t)r+=s.source;return i&&(r+=Hl(i)),r}var Od=Symbol("break visit"),Vv=Symbol("skip children"),Kh=Symbol("remove item");function ei(e,n){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Yh(Object.freeze([]),e,n)}ei.BREAK=Od;ei.SKIP=Vv;ei.REMOVE=Kh;ei.itemAtPath=(e,n)=>{let t=e;for(let[i,r]of n){let s=t?.[i];if(s&&"items"in s)t=s.items[r];else return}return t};ei.parentCollection=(e,n)=>{let t=ei.itemAtPath(e,n.slice(0,-1)),i=n[n.length-1][0],r=t?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Yh(e,n,t){let i=t(n,e);if(typeof i=="symbol")return i;for(let r of["key","value"]){let s=n[r];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Yh(Object.freeze(e.concat([[r,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Od)return Od;a===Kh&&(s.items.splice(o,1),o-=1)}}typeof i=="function"&&r==="key"&&(i=i(n,e))}}return typeof i=="function"?i(n,e):i}var Ws="\uFEFF",Gs="",Qs="",Fr="",Wv=e=>!!e&&"items"in e,Gv=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Qv(e){switch(e){case Ws:return"<BOM>";case Gs:return"<DOC>";case Qs:return"<FLOW_END>";case Fr:return"<SCALAR>";default:return JSON.stringify(e)}}function Cd(e){switch(e){case Ws:return"byte-order-mark";case Gs:return"doc-mode";case Qs:return"flow-error-end";case Fr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Vt(e){switch(e){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var Ph=new Set("0123456789ABCDEFabcdef"),Zv=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),$l=new Set(",[]{}"),Jv=new Set(` ,[]{}
\r `),Md=e=>!e||Jv.has(e),Zs=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,t=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!t;let i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let n=this.pos,t=this.buffer[n];for(;t===" "||t===" ";)t=this.buffer[++n];return!t||t==="#"||t===`
`?!0:t==="\r"?this.buffer[n+1]===`
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let t=this.buffer[n];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+n];if(t==="\r"){let r=this.buffer[i+n+1];if(r===`
`||!r&&!this.atEnd)return n+i+1}return t===`
`||i>=this.indentNext||!t&&!this.atEnd?n+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(n,3);if((i==="---"||i==="...")&&Vt(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Ws&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let t=n.length,i=n.indexOf("#");for(;i!==-1;){let s=n[i-1];if(s===" "||s===" "){t=i-1;break}else i=n.indexOf("#",i+1)}for(;;){let s=n[t-1];if(s===" "||s===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-t),yield*this.pushNewline(),"stream"}return yield Gs,yield*this.parseLineStart()}*parseLineStart(){let n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Vt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Vt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[n,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Vt(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let n=this.getLine();if(n===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(n[t]){case"#":yield*this.pushCount(n.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Md),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,t,i=-1;do n=yield*this.pushNewline(),n>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(n+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&Vt(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Qs,yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Md),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Vt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flo
`,this.pos);if(r!==-1){for(;r!==-1;){let s=this.continueScalar(r+1);if(s===-1)break;r=i.indexOf(`
`,s)}r!==-1&&(t=r-(i[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){let t=this.buffer[++n];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Vt(t)||t==="#")}*parseBlockScalar(){let n=this.pos-1,t=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":t+=1;break;case`
`:n=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(n+1);if(s===-1)break;n=this.buffer.indexOf(`
`,s)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let r=n+1;for(i=this.buffer[r];i===" ";)i=this.buffer[++r];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
`;)i=this.buffer[++r];n=r-1}else if(!this.blockScalarKeep)do{let s=n-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
`&&s>=this.pos&&s+1+t>a)n=s;else break}while(!0);return yield Fr,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let n=this.flowLevel>0,t=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){let s=this.buffer[i+1];if(Vt(s)||n&&$l.has(s))break;t=i}else if(Vt(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===`
`?(i+=1,r=`
`,s=this.buffer[i+1]):t=i),s==="#"||n&&$l.has(s))break;if(r===`
`){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(n&&$l.has(r))break;t=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Fr,yield*this.pushToIndex(t+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,t){let i=this.buffer.slice(this.pos,n);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Md))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let n=this.flowLevel>0,t=this.charAt(1);if(Vt(t)||n&&$l.has(t))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,t=this.buffer[n];for(;!Vt(t)&&t!==">";)t=this.buffer[++n];return yield*this.pushToIndex(t===">"?n+1:n,!1)}else{let n=this.pos+1,t=this.buffer[n];for(;t;)if(Zv.has(t))t=this.buffer[++n];else if(t==="%"&&Ph.has(this.buffer[n+1])&&Ph.has(this.buffer[n+2]))t=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){let n=this.buffer[this.pos];return n===`
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(n){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||n&&i===" ");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(n){let t=this.pos,i=this.buffer[t];for(;!n(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};var Js=class{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let t=0,i=this.lineStarts.length;for(;t<i;){let s=t+i>>1;this.lineStarts[s]<n?t=s+1:i=s}if(this.lineStarts[t]===n)return{line:t+1,col:1};if(t===0)return{line:0,col:n};let r=this.lineStarts[t-1];return{line:t,col:n-r+1}}}};function Ti(e,n){for(let t=0;t<e.length;++t)if(e[t].type===n)return!0;return!1}function zh(e){for(let n=0;n<e.length;++n)switch(e[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function qh(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ul(e){switch(e.type){case"document":return e.start;case"block-map":{let n=e.items[e.items.length-1];return n.sep??n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Rr(e){if(e.length===0)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++n]?.type==="space";);return e.splice(n,e.length)}function Hh(e){if(e.start.type==="flow-seq-start")for(let n of e.items)n.sep&&!n.value&&!Ti(n.start,"explicit-key-ind")&&!Ti(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,qh(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}var Xs=class{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Zs,this.onNewLine=n}*parse(n,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(n,t))yield*this.next(i);t||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}let t=Cd(n);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{let i=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let n=this.peek(1);if(this.type==="doc-end"&&(!n||n.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){let t=n??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Hh(t),i.type){case"document":i.valu
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){let t=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)n.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,n.indent)){let r=n.items[n.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),n.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=n.indent){let i=!this.onKeyLine&&this.indent===n.indent,r=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(r&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>n.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(s.push(this.sourceToken),n.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(s.push(this.sourceToken),n.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ti(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(qh(t.key)&&!Ti(t.sep,"newline")){let o=Rr(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Ti(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Rr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?n.items.push({start:s,key:null,sep:[this.sourceToken]}):Ti(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||t.value?(n.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(n);if(o){i&&o.type!=="block-seq"&&n.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){let t=n.items[n.items.length-1];switch(this.type){case"newline":if(t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,n.indent)){let r=n.items[n.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),n.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=n.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;t.value||Ti(t.start,"seq-item-ind")?n.items.push({start:[this.sourceTo
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Ul(n),i=Rr(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ul(n),i=Rr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,t){return this.type!=="comment"||this.indent<=t?!1:n.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Xv(e){let n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new Js||null,prettyErrors:n}}function jl(e,n={}){let{lineCounter:t,prettyErrors:i}=Xv(n),r=new Xs(t?.addNewLine),s=new Vs(n),o=null;for(let a of s.compose(r.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ot(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(o.errors.forEach(wd(e,t)),o.warnings.forEach(wd(e,t))),o}function Vl(e,n,t){let i;typeof n=="function"?i=n:t===void 0&&n&&typeof n=="object"&&(t=n);let r=jl(e,t);if(!r)return null;if(r.warnings.forEach(s=>kl(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},t))}function Wl(e,n,t){let i=null;if(typeof n=="function"||Array.isArray(n)?i=n:t===void 0&&n&&(t=n),typeof t=="string"&&(t=t.length),typeof t=="number"){let r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){let{keepUndefined:r}=t??n??{};if(!r)return}return Yt(e)&&!i?e.toString(t):new jt(e,i,t).toString(t)}var Id="tag",eo="tags",Wt=[Id,eo],tw="alias",Bd="aliases",Gt=[tw,Bd],Fd="linter-yaml-title-alias",Dr="disabled rules";function dn(e){return e.match(je)===null&&(e=`---
---
`+e),e}function Nr(e){let n=e.match(je);return n?n[1]:null}function Ee(e,n){if(!e.match(je))return e;let t=e.match(je)[0],i=n(t);return e=e.replace(t,at(i)),e}function Rd(e,n=!0){return n?new RegExp(`^([\\t ]*)${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m"):new RegExp(`^${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m")}function ue(e,n,t){let i=`${n}:${t}
`,r=!1,s=e.replace(Rd(n),(o,a)=>(r=!0,a+i));return r||(s=`${e}${i}`),s}function ke(e,n,t=!0){let i=e.match(Rd(n,t));if(i==null)return null;let r=i[2];return t||(r=i[1]),r}function to(e,n,t=!0){return e.replace(Rd(n,t),"")}function vt(e){if(e==null)return null;let n=Vl(e.replace(/\n(\t)+/g,`
`));return n??{}}function Uh(e){if(e==null)return null;let n=jl(e.replace(/\n(\t)+/g,`
`),{keepSourceTokens:!0});return n??null}function Dd(e){let n=new jt(e.options);n.contents=new be;let t=e.contents.srcToken;return n.contents.srcToken={offset:t.offset,type:t.type,indent:t.indent,start:t.start,end:t.end,items:[]},n}function Oi(e){if(!e||!e.contents)return"";let n=e.contents.items;return!n||n.length==0?"":ql.stringify(e.contents.srcToken)}function Te(e,n,t,i,r=!1){if(typeof e=="string"&&(e=[e]),e==null||e.length===0)return nw(n);let s=i&&(n=="multi-line"||n=="single string to multi-line"&&e.length>1);if(r||s)for(let o=0;o<e.length;o++){let a=e[o],l=_r(a);l&&(a=a.substring(1,a.length-1));let c=r&&Ya(a);l&&c||(c||l&&s)&&(e[o]=Qt(a,t,c))}switch(n){case"single string to single-line":if(e.length===1)return" "+e[0];case"single-line":return" "+$h(e);case"single string to multi-line":if(e.length===1)return" "+e[0];case"multi-line":return iw(e);case"single string space delimited":return e.length===1?" "+e[0]:" "+e.join(" ");case"single string comma delimited":return e.length===1?" "+e[0]:" "+e.join(", ");case"single-line space delimited":return e.length===1?" "+e[0]:" "+$h(e).replaceAll(", "," ")}}function nw(e){switch(e){case"single-line":case"single-line space delimited":case"multi-line":return" []";case"single string to single-line":case"single string to multi-line":case"single string space delimited":case"single string comma delimited":return" "}}function $h(e){return e==null||e.length===0?"[]":"["+e.join(", ")+"]"}function iw(e){return e==null||e.length===0?"[]":`
- `+e.join(`
- `)}function ze(e){if(e==null||e.length===0)return null;if(e=e.trimEnd(),e.startsWith("["))return e=e.substring(1),e.endsWith("]")&&(e=e.substring(0,e.length-1)),e.length===0?null:Gl(e,",").filter(t=>t!="");if(e.includes(`
`)){let n=e.split(/[ \t]*\n[ \t]*-[ \t]*/);return n.splice(0,1),n=n.filter(t=>t!=""),n==null||n.length===0?null:n}return e}function ti(e){if(e==null)return[];let n=[],t=[];Array.isArray(e)?t=e:e.includes(",")?t=Gl(e,","):t=Gl(e," ");for(let i of t)n.push(i.trim());return n}function ni(e){return typeof e=="string"?Gl(e,","):e}function Gl(e,n=","){if(e==""||e==null)return null;if(n.length>1)throw new Error(E("logs.invalid-delimiter-error-message"));let t=[],i="",r=0;for(;r<e.length;){let s=e.charAt(r);if(s===n)t.push(i.trim()),i="";else if(s==='"'||s==="'"){let o=e.indexOf(s,r+1);o!=-1?(i+=e.substring(r,o+1),r=o):i+=s}else i+=s;r++}return i.trim()!=""&&t.push(i.trim()),t}function _r(e){return e.length>1&&(e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"'))}function Qt(e,n,t=!1,i=!1){let r=rw(e,n,t);if(i)return r;try{if(Vl(r)===e)return r}catch{}let s=Wl(e,{lineWidth:-1,quotingType:n,forceQuotes:t}).slice(0,-1),o=Wl(e,{lineWidth:-1,quotingType:n=='"'?"'":'"',forceQuotes:t}).slice(0,-1);return o===e||o.length<s.length?o:s}function rw(e,n,t=!1){if(_r(e))return e;let i=e.includes("'"),r=e.includes('"'),s=e.includes(": ");return!i&&!r&&!s&&!t||i&&r?e:i?`"${e}"`:r?`'${e}'`:`${n}${e}${n}`}function jh(e){let n=ke(e,Dr);if(n==null)return[];let t=n.includes(`
`)?`${Dr}:
`:`${Dr}: `;t+=n;let r=vt(t)["disabled rules"];return r?(typeof r=="string"&&(r=[r]),r):[]}var $r=require("obsidian");function De(e){e.addClass("linter-visually-hidden")}function Ve(e){e.removeClass("linter-visually-hidden")}function ft(e,n){if(e.includes("</")){let t=document.createRange();n.append(t.createContextualFragment(e))}else n.setText(e)}var qr=require("obsidian");var Vh=require("obsidian");var Ql=class{constructor(n,t,i,r,s,o,a,l,c,u){this.containerEl=n;this.name=t;this.description=i;this.warning=r;this.addInputTooltip=s;this.refreshBtnTooltip=o;this.app=a;this.saveSettings=l;this.onAddInput=c;this.onRefresh=u}display(){this.containerEl.createDiv({cls:"setting-item-name",text:this.name});let n=this.containerEl.createDiv({cls:"setting-item-description"});ft(this.description,n.createEl("p",{cls:"custom-row-description"})),new Vh.Setting(this.containerEl).addButton(t=>{t.setIcon("plus-with-circle").setTooltip(this.addInputTooltip).onClick(()=>this.onAddInput()),t.buttonEl.addClass("clickable-icon")}).addButton(t=>{t.setIcon("reset").setTooltip(this.refreshBtnTooltip).onClick(()=>this.onRefresh()),t.buttonEl.addClass("clickable-icon")}).setClass("linter-border-bottom").setDesc(this.warning??"").descEl.addClass("mod-warning"),this.inputElDiv=this.containerEl.createDiv(),this.showInputEls()}resetInputEls(){this.inputElDiv.empty(),this.showInputEls()}};var hg=require("obsidian");var xe="top",Ne="bottom",Be="right",Oe="left",Zl="auto",ii=[xe,Ne,Be,Oe],Cn="start",Ci="end",Wh="clippingParents",Jl="viewport",Kr="popper",Gh="reference",Nd=ii.reduce(function(e,n){return e.concat([n+"-"+Cn,n+"-"+Ci])},[]),Xl=[].concat(ii,[Zl]).reduce(function(e,n){return e.concat([n,n+"-"+Cn,n+"-"+Ci])},[]),sw="beforeRead",ow="read",aw="afterRead",lw="beforeMain",cw="main",uw="afterMain",dw="beforeWrite",pw="write",mw="afterWrite",Qh=[sw,ow,aw,lw,cw,uw,dw,pw,mw];function He(e){return e?(e.nodeName||"").toLowerCase():null}function he(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Ct(e){var n=he(e).Element;return e instanceof n||e instanceof Element}function _e(e){var n=he(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function Yr(e){if(typeof ShadowRoot>"u")return!1;var n=he(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}function fw(e){var n=e.state;Object.keys(n.elements).forEach(function(t){var i=n.styles[t]||{},r=n.attributes[t]||{},s=n.elements[t];!_e(s)||!He(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function hw(e){var n=e.state,t={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,t.popper),n.styles=t,n.elements.arrow&&Object.assign(n.elements.arrow.style,t.arrow),function(){Object.keys(n.elements).forEach(function(i){var r=n.elements[i],s=n.attributes[i]||{},o=Object.keys(n.styles.hasOwnProperty(i)?n.styles[i]:t[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!_e(r)||!He(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(l){r.removeAttribute(l)}))})}}var Zh={name:"applyStyles",enabled:!0,phase:"write",fn:fw,effect:hw,requires:["computeStyles"]};function qe(e){return e.split("-")[0]}var Zt=Math.max,Mi=Math.min,Mn=Math.round;function Pr(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function no(){return!/^((?!chrome|android).)*safari/i.test(Pr())}function Mt(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!1);var i=e.getBoundingClientRect(),r=1,s=1;n&&_e(e)&&(r=e.offsetWidth>0&&Mn(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Mn(i.height)/e.offsetHeight||1);var o=Ct(e)?he(e):window,a=o.visualViewport,l=!no()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/s,d=i.width/r,p=i.height/s;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c,x:c,y:u}}function Ii(e){var n=Mt(e),t=e.
`+e.mark.snippet),i+" "+t):i}function po(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Rg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}po.prototype=Object.create(Error.prototype);po.prototype.constructor=po;po.prototype.toString=function(n){return this.name+": "+Rg(this,n)};var ut=po;function Zd(e,n,t,i,r){var s="",o="",a=Math.floor(r/2)-1;return i-n>a&&(s=" ... ",n=i-a+s.length),t-i>a&&(o=" ...",t=i+a-o.length),{str:s+e.slice(n,t).replace(/\t/g,"\u2192")+o,pos:i-n+s.length}}function Jd(e,n){return Ke.repeat(" ",n-e.length)+e}function Qw(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 t=/\r?\n|\r|\0/g,i=[0],r=[],s,o=-1;s=t.exec(e.buffer);)r.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",l,c,u=Math.min(e.line+n.linesAfter,r.length).toString().length,d=n.maxLength-(n.indent+u+3);for(l=1;l<=n.linesBefore&&!(o-l<0);l++)c=Zd(e.buffer,i[o-l],r[o-l],e.position-(i[o]-i[o-l]),d),a=Ke.repeat(" ",n.indent)+Jd((e.line-l+1).toString(),u)+" | "+c.str+`
`+a;for(c=Zd(e.buffer,i[o],r[o],e.position,d),a+=Ke.repeat(" ",n.indent)+Jd((e.line+1).toString(),u)+" | "+c.str+`
`,a+=Ke.repeat("-",n.indent+u+3+c.pos)+`^
`,l=1;l<=n.linesAfter&&!(o+l>=r.length);l++)c=Zd(e.buffer,i[o+l],r[o+l],e.position-(i[o]-i[o+l]),d),a+=Ke.repeat(" ",n.indent)+Jd((e.line+l+1).toString(),u)+" | "+c.str+`
`;return a.replace(/\n$/,"")}var Zw=Qw,Jw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Xw=["scalar","sequence","mapping"];function eA(e){var n={};return e!==null&&Object.keys(e).forEach(function(t){e[t].forEach(function(i){n[String(i)]=t})}),n}function tA(e,n){if(n=n||{},Object.keys(n).forEach(function(t){if(Jw.indexOf(t)===-1)throw new ut('Unknown option "'+t+'" 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(t){return t},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=eA(n.styleAliases||null),Xw.indexOf(this.kind)===-1)throw new ut('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var nt=tA;function bg(e,n){var t=[];return e[n].forEach(function(i){var r=t.length;t.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(r=o)}),t[r]=i}),t}function nA(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,t;function i(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,t=arguments.length;n<t;n+=1)arguments[n].forEach(i);return e}function ep(e){return this.extend(e)}ep.prototype.extend=function(n){var t=[],i=[];if(n instanceof nt)i.push(n);else if(Array.isArray(n))i=i.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(t=t.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit));else throw new ut("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(s){if(!(s instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ut("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ut("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(ep.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=bg(r,"implicit"),r.compiledExplicit=bg(r,"explicit"),r.compiledTypeMap=nA(r.compiledImplicit,r.compiledExplicit),r};var iA=ep,rA=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),sA=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),oA=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),aA=new iA({explicit:[rA,sA,oA]});function lA(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function cA(){return null}function uA(e){return e===null}var dA=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:lA,construct:cA,predicate:uA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function pA(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 mA(e){return e==="true"||e==="True"||e==="TRUE"}function fA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var hA=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pA,construct:mA,predicate:fA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});functio
\r`;function KA(e){if(e===null)return!1;var n,t,i=0,r=e.length,s=sp;for(t=0;t<r;t++)if(n=s.indexOf(e.charAt(t)),!(n>64)){if(n<0)return!1;i+=6}return i%8===0}function YA(e){var n,t,i=e.replace(/[\r\n=]/g,""),r=i.length,s=sp,o=0,a=[];for(n=0;n<r;n++)n%4===0&&n&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(n));return t=r%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),new Uint8Array(a)}function PA(e){var n="",t=0,i,r,s=e.length,o=sp;for(i=0;i<s;i++)i%3===0&&i&&(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]),t=(t<<8)+e[i];return r=s%3,r===0?(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]):r===2?(n+=o[t>>10&63],n+=o[t>>4&63],n+=o[t<<2&63],n+=o[64]):r===1&&(n+=o[t>>2&63],n+=o[t<<4&63],n+=o[64],n+=o[64]),n}function zA(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var HA=new nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:KA,construct:YA,predicate:zA,represent:PA}),qA=Object.prototype.hasOwnProperty,$A=Object.prototype.toString;function UA(e){if(e===null)return!0;var n=[],t,i,r,s,o,a=e;for(t=0,i=a.length;t<i;t+=1){if(r=a[t],o=!1,$A.call(r)!=="[object Object]")return!1;for(s in r)if(qA.call(r,s))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(s)===-1)n.push(s);else return!1}return!0}function jA(e){return e!==null?e:[]}var VA=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:UA,construct:jA}),WA=Object.prototype.toString;function GA(e){if(e===null)return!0;var n,t,i,r,s,o=e;for(s=new Array(o.length),n=0,t=o.length;n<t;n+=1){if(i=o[n],WA.call(i)!=="[object Object]"||(r=Object.keys(i),r.length!==1))return!1;s[n]=[r[0],i[r[0]]]}return!0}function QA(e){if(e===null)return[];var n,t,i,r,s,o=e;for(s=new Array(o.length),n=0,t=o.length;n<t;n+=1)i=o[n],r=Object.keys(i),s[n]=[r[0],i[r[0]]];return s}var ZA=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:GA,construct:QA}),JA=Object.prototype.hasOwnProperty;function XA(e){if(e===null)return!0;var n,t=e;for(n in t)if(JA.call(t,n)&&t[n]!==null)return!1;return!0}function eS(e){return e!==null?e:{}}var tS=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:XA,construct:eS}),_g=IA.extend({implicit:[DA,_A],explicit:[HA,VA,ZA,tS]}),ci=Object.prototype.hasOwnProperty,uc=1,Kg=2,Yg=3,dc=4,Xd=1,nS=2,kg=3,iS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rS=/[\x85\u2028\u2029]/,sS=/[,\[\]\{\}]/,Pg=/^(?:!|!!|![a-z\-]+!)$/i,zg=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vg(e){return Object.prototype.toString.call(e)}function pn(e){return e===10||e===13}function Ki(e){return e===9||e===32}function ht(e){return e===9||e===32||e===10||e===13}function jr(e){return e===44||e===91||e===93||e===123||e===125}function oS(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function aS(e){return e===120?2:e===117?4:e===85?8:0}function lS(e){return 48<=e&&e<=57?e-48:-1}function wg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`: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 cS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Hg=new Array(256),qg=new Array(256);for(_i=0;_i<256;_i++)Hg[_i]=wg(_i)?1:0,qg[_i]=wg(_i);var _i;function uS(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||_g,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 $g(e,n){var t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return t.snippet=Zw(t),new ut(n,t)}function H(e,n){throw $g(e,n)}function pc(e,n){e.onWarning&&e.onWarning.call(null,$g(e,n))}var Ag={YAML:function(n,t,i){var r,s,o;n.version!==null&&H(n,"duplication of %YAML directive"),i.length!==1&&H(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&H(n,"ill-formed argument of the YAML directive"),s=parseInt(r[1],10),o=parseInt(r[2],10),s!==1&&H(n,"unacceptable YAML version of the document"),n.version=i[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&pc(n,"unsupported YAML version of the document")},TAG:function(n,t,i){var r,s;i.length!==2&&H(n,"TAG directive accepts exactly two arguments"),r=i[0],s=i[1],Pg.test(r)||H(n,"ill-formed tag handle (first argument) of the TAG directive"),ci.call(n.tagMap,r)&&H(n,'there is a previously declared suffix for "'+r+'" tag handle'),zg.test(s)||H(n,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{H(n,"tag prefix is malformed: "+s)}n.tagMap[r]=s}};function li(e,n,t,i){var r,s,o,a;if(n<t){if(a=e.input.slice(n,t),i)for(r=0,s=a.length;r<s;r+=1)o=a.charCodeAt(r),o===9||32<=o&&o<=1114111||H(e,"expected valid JSON character");else iS.test(a)&&H(e,"the stream contains non-printable characters");e.result+=a}}function Sg(e,n,t,i){var r,s,o,a;for(Ke.isObject(t)||H(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(t),o=0,a=r.length;o<a;o+=1)s=r[o],ci.call(n,s)||(n[s]=t[s],i[s]=!0)}function Vr(e,n,t,i,r,s,o,a,l){var c,u;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,u=r.length;c<u;c+=1)Array.isArray(r[c])&&H(e,"nested arrays are not supported inside keys"),typeof r=="object"&&vg(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&vg(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,u=s.length;c<u;c+=1)Sg(e,n,s[c],t);else Sg(e,n,s,t);else!e.json&&!ci.call(t,r)&&ci.call(n,r)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,H(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(n,r,{configurable:!0,enumerable:!0,writable:!0,value:s}):n[r]=s,delete t[r];return n}function op(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++):H(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Fe(e,n,t){for(var i=0,r=e.input.charCodeAt(e.position);r!==0;){for(;Ki(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(pn(r))for(op(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return t!==-1&&i!==0&&e.lineIndent<t&&pc(e,"deficient indentation"),i}function hc(e){var n=e.position,t;return t=e.input.charCodeAt(n),!!((t===45||t===46)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),t===0||ht(t)))}function ap(e,n){n===1?e.result+=" ":n>1&&(e.result+=Ke.rep
`,n-1))}function dS(e,n,t){var i,r,s,o,a,l,c,u,d=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),ht(m)||jr(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(r=e.input.charCodeAt(e.position+1),ht(r)||t&&jr(r)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;m!==0;){if(m===58){if(r=e.input.charCodeAt(e.position+1),ht(r)||t&&jr(r))break}else if(m===35){if(i=e.input.charCodeAt(e.position-1),ht(i))break}else{if(e.position===e.lineStart&&hc(e)||t&&jr(m))break;if(pn(m))if(l=e.line,c=e.lineStart,u=e.lineIndent,Fe(e,!1,-1),e.lineIndent>=n){a=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=u;break}}a&&(li(e,s,o,!1),ap(e,e.line-l),s=o=e.position,a=!1),Ki(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return li(e,s,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}function pS(e,n){var t,i,r;if(t=e.input.charCodeAt(e.position),t!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(t=e.input.charCodeAt(e.position))!==0;)if(t===39)if(li(e,i,e.position,!0),t=e.input.charCodeAt(++e.position),t===39)i=e.position,e.position++,r=e.position;else return!0;else pn(t)?(li(e,i,r,!0),ap(e,Fe(e,!1,n)),i=r=e.position):e.position===e.lineStart&&hc(e)?H(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);H(e,"unexpected end of the stream within a single quoted scalar")}function mS(e,n){var t,i,r,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,t=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return li(e,t,e.position,!0),e.position++,!0;if(a===92){if(li(e,t,e.position,!0),a=e.input.charCodeAt(++e.position),pn(a))Fe(e,!1,n);else if(a<256&&Hg[a])e.result+=qg[a],e.position++;else if((o=aS(a))>0){for(r=o,s=0;r>0;r--)a=e.input.charCodeAt(++e.position),(o=oS(a))>=0?s=(s<<4)+o:H(e,"expected hexadecimal character");e.result+=cS(s),e.position++}else H(e,"unknown escape sequence");t=i=e.position}else pn(a)?(li(e,t,i,!0),ap(e,Fe(e,!1,n)),t=i=e.position):e.position===e.lineStart&&hc(e)?H(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}H(e,"unexpected end of the stream within a double quoted scalar")}function fS(e,n){var t=!0,i,r,s,o=e.tag,a,l=e.anchor,c,u,d,p,m,f=Object.create(null),h,g,b,k;if(k=e.input.charCodeAt(e.position),k===91)u=93,m=!1,a=[];else if(k===123)u=125,m=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),k=e.input.charCodeAt(++e.position);k!==0;){if(Fe(e,!0,n),k=e.input.charCodeAt(e.position),k===u)return e.position++,e.tag=o,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=a,!0;t?k===44&&H(e,"expected the node content, but found ','"):H(e,"missed comma between flow collection entries"),g=h=b=null,d=p=!1,k===63&&(c=e.input.charCodeAt(e.position+1),ht(c)&&(d=p=!0,e.position++,Fe(e,!0,n))),i=e.line,r=e.lineStart,s=e.position,Wr(e,n,uc,!1,!0),g=e.tag,h=e.result,Fe(e,!0,n),k=e.input.charCodeAt(e.position),(p||e.line===i)&&k===58&&(d=!0,k=e.input.charCodeAt(++e.position),Fe(e,!0,n),Wr(e,n,uc,!1,!0),b=e.result),m?Vr(e,a,f,g,h,b,i,r,s):d?a.push(Vr(e,null,f,g,h,b,i,r,s)):a.push(h),Fe(e,!0,n),k=e.input.charCodeAt(e.position),k===44?(t=!0,k=e.input.charCodeAt(++e.position)):t=!1}H(e,"unexpected end of the stream within a flow collection")}function hS(e,n){var t,i,r=Xd,s=!1,o=!1,a=n,l=0,c=!1,u,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Xd===r?r=d===43?kg:nS:H(e,"repeat of a chomping mode identifier");else if((u=lS(d))>=0)u===0?H(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?H(e,"repeat of an indentation width identifier"):(a=n+u-1,o=!0);else break;if(Ki(d)){do d=e.input.charCodeAt(++e.position);while(Ki(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!pn(d)&&d!==0)}for(;d!==0;){for(op(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIn
`,s?1+l:l):r===Xd&&s&&(e.result+=`
`);break}for(i?Ki(d)?(c=!0,e.result+=Ke.repeat(`
`,s?1+l:l)):c?(c=!1,e.result+=Ke.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Ke.repeat(`
`,l):e.result+=Ke.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,t=e.position;!pn(d)&&d!==0;)d=e.input.charCodeAt(++e.position);li(e,t,e.position,!1)}return!0}function Lg(e,n){var t,i=e.tag,r=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,H(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!ht(o))));){if(a=!0,e.position++,Fe(e,!0,-1)&&e.lineIndent<=n){s.push(null),l=e.input.charCodeAt(e.position);continue}if(t=e.line,Wr(e,n,Yg,!1,!0),s.push(e.result),Fe(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===t||e.lineIndent>n)&&l!==0)H(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return a?(e.tag=i,e.anchor=r,e.kind="sequence",e.result=s,!0):!1}function gS(e,n,t){var i,r,s,o,a,l,c=e.tag,u=e.anchor,d={},p=Object.create(null),m=null,f=null,h=null,g=!1,b=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),k=e.input.charCodeAt(e.position);k!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,H(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(k===63||k===58)&&ht(i))k===63?(g&&(Vr(e,d,p,m,f,null,o,a,l),m=f=h=null),b=!0,g=!0,r=!0):g?(g=!1,r=!0):H(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=i;else{if(o=e.line,a=e.lineStart,l=e.position,!Wr(e,t,Kg,!1,!0))break;if(e.line===s){for(k=e.input.charCodeAt(e.position);Ki(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),ht(k)||H(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Vr(e,d,p,m,f,null,o,a,l),m=f=h=null),b=!0,g=!1,r=!1,m=e.tag,f=e.result;else if(b)H(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=u,!0}else if(b)H(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=u,!0}if((e.line===s||e.lineIndent>n)&&(g&&(o=e.line,a=e.lineStart,l=e.position),Wr(e,n,dc,!0,r)&&(g?f=e.result:h=e.result),g||(Vr(e,d,p,m,f,h,o,a,l),m=f=h=null),Fe(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>n)&&k!==0)H(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return g&&Vr(e,d,p,m,f,null,o,a,l),b&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=d),b}function yS(e){var n,t=!1,i=!1,r,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&H(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):H(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ht(o);)o===33&&(i?H(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),Pg.test(r)||H(e,"named tag handle cannot contain such characters"),i=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(n,e.position),sS.test(s)&&H(e,"tag suffix cannot contain flow indicator characters")}s&&!zg.test(s)&&H(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{H(e,"tag name is malformed: "+s)}return t?e.tag=s:ci.call(e.tagMap,r)?e.tag=e.tagMap[r]+s:r==="!"?e.tag="!"+s:r==="!!"?e.tag="tag:yaml.org,2002:"+s:H(e,'undeclared tag handle "'+r+'"'),!0}function bS(e){var n,t;if(t=e.input.charCodeAt(e.position),t!==38)return!1;for(e.anchor!==null&&H(e,"duplication of an anchor property"),t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!ht(t)&&!jr(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&H(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function kS(e){var n,t,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var t=new uS(e,n),i=e.indexOf("\0");for(i!==-1&&(t.position=i,H(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)vS(t);return t.documents}function wS(e,n,t){n!==null&&typeof n=="object"&&typeof t>"u"&&(t=n,n=null);var i=Ug(e,t);if(typeof n!="function")return i;for(var r=0,s=i.length;r<s;r+=1)n(i[r])}function AS(e,n){var t=Ug(e,n);if(t.length!==0){if(t.length===1)return t[0];throw new ut("expected a single document in the stream, but found more")}}var SS=wS,LS=AS,jg={loadAll:SS,load:LS},Vg=Object.prototype.toString,Wg=Object.prototype.hasOwnProperty,lp=65279,ES=9,mo=10,xS=13,TS=32,OS=33,CS=34,tp=35,MS=37,IS=38,BS=39,FS=42,Gg=44,RS=45,mc=58,DS=61,NS=62,_S=63,KS=64,Qg=91,Zg=93,YS=96,Jg=123,PS=124,Xg=125,it={};it[0]="\\0";it[7]="\\a";it[8]="\\b";it[9]="\\t";it[10]="\\n";it[11]="\\v";it[12]="\\f";it[13]="\\r";it[27]="\\e";it[34]='\\"';it[92]="\\\\";it[133]="\\N";it[160]="\\_";it[8232]="\\L";it[8233]="\\P";var zS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],HS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qS(e,n){var t,i,r,s,o,a,l;if(n===null)return{};for(t={},i=Object.keys(n),r=0,s=i.length;r<s;r+=1)o=i[r],a=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Wg.call(l.styleAliases,a)&&(a=l.styleAliases[a]),t[o]=a;return t}function $S(e){var n,t,i;if(n=e.toString(16).toUpperCase(),e<=255)t="x",i=2;else if(e<=65535)t="u",i=4;else if(e<=4294967295)t="U",i=8;else throw new ut("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+t+Ke.repeat("0",i-n.length)+n}var US=1,fo=2;function jS(e){this.schema=e.schema||_g,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ke.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qS(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==='"'?fo:US,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 Eg(e,n){for(var t=Ke.repeat(" ",n),i=0,r=-1,s="",o,a=e.length;i<a;)r=e.indexOf(`
`,i),r===-1?(o=e.slice(i),i=a):(o=e.slice(i,r+1),i=r+1),o.length&&o!==`
`&&(s+=t),s+=o;return s}function np(e,n){return`
`+Ke.repeat(" ",e.indent*n)}function VS(e,n){var t,i,r;for(t=0,i=e.implicitTypes.length;t<i;t+=1)if(r=e.implicitTypes[t],r.resolve(n))return!0;return!1}function fc(e){return e===TS||e===ES}function ho(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==lp||65536<=e&&e<=1114111}function xg(e){return ho(e)&&e!==lp&&e!==xS&&e!==mo}function Tg(e,n,t){var i=xg(e),r=i&&!fc(e);return(t?i:i&&e!==Gg&&e!==Qg&&e!==Zg&&e!==Jg&&e!==Xg)&&e!==tp&&!(n===mc&&!r)||xg(n)&&!fc(n)&&e===tp||n===mc&&r}function WS(e){return ho(e)&&e!==lp&&!fc(e)&&e!==RS&&e!==_S&&e!==mc&&e!==Gg&&e!==Qg&&e!==Zg&&e!==Jg&&e!==Xg&&e!==tp&&e!==IS&&e!==FS&&e!==OS&&e!==PS&&e!==DS&&e!==NS&&e!==BS&&e!==CS&&e!==MS&&e!==KS&&e!==YS}function GS(e){return!fc(e)&&e!==mc}function uo(e,n){var t=e.charCodeAt(n),i;return t>=55296&&t<=56319&&n+1<e.length&&(i=e.charCodeAt(n+1),i>=56320&&i<=57343)?(t-55296)*1024+i-56320+65536:t}function ey(e){var n=/^\n* /;return n.test(e)}var ty=1,ip=2,ny=3,iy=4,Ur=5;function QS(e,n,t,i,r,s,o,a){var l,c=0,u=null,d=!1,p=!1,m=i!==-1,f=-1,h=WS(uo(e,0))&&GS(uo(e,e.length-1));if(n||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=uo(e,l),!ho(c))return Ur;h=h&&Tg(c,u,a),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=uo(e,l),c===mo)d=!0,m&&(p=p||l-f-1>i&&e[f+1]!==" ",f=l);else if(!ho(c))return Ur;h=h&&Tg(c,u,a),u=c}p=p||m&&l-f-1>i&&e[f+1]!==" "}return!d&&!p?h&&!o&&!r(e)?ty:s===fo?Ur:ip:t>9&&ey(e)?Ur:o?s===fo?Ur:ip:p?iy:ny}function ZS(e,n,t,i,r){e.dump=function(){if(n.length===0)return e.quotingType===fo?'""':"''";if(!e.noCompatMode&&(zS.indexOf(n)!==-1||HS.test(n)))return e.quotingType===fo?'"'+n+'"':"'"+n+"'";var s=e.indent*Math.max(1,t),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=i||e.flowLevel>-1&&t>=e.flowLevel;function l(c){return VS(e,c)}switch(QS(n,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,r)){case ty:return n;case ip:return"'"+n.replace(/'/g,"''")+"'";case ny:return"|"+Og(n,e.indent)+Cg(Eg(n,s));case iy:return">"+Og(n,e.indent)+Cg(Eg(JS(n,o),s));case Ur:return'"'+XS(n)+'"';default:throw new ut("impossible error: invalid scalar style")}}()}function Og(e,n){var t=ey(e)?String(n):"",i=e[e.length-1]===`
`,r=i&&(e[e.length-2]===`
`||e===`
`),s=r?"+":i?"":"-";return t+s+`
`}function Cg(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function JS(e,n){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
`);return c=c!==-1?c:e.length,t.lastIndex=c,Mg(e.slice(0,c),n)}(),r=e[0]===`
`||e[0]===" ",s,o;o=t.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!r&&!s&&l!==""?`
`:"")+Mg(l,n),r=s}return i}function Mg(e,n){if(e===""||e[0]===" ")return e;for(var t=/ [^ ]/g,i,r=0,s,o=0,a=0,l="";i=t.exec(e);)a=i.index,a-r>n&&(s=o>r?o:a,l+=`
`+e.slice(r,s),r=s+1),o=a;return l+=`
`,e.length-r>n&&o>r?l+=e.slice(r,o)+`
`+e.slice(o+1):l+=e.slice(r),l.slice(1)}function XS(e){for(var n="",t=0,i,r=0;r<e.length;t>=65536?r+=2:r++)t=uo(e,r),i=it[t],!i&&ho(t)?(n+=e[r],t>=65536&&(n+=e[r+1])):n+=i||$S(t);return n}function e0(e,n,t){var i="",r=e.tag,s,o,a;for(s=0,o=t.length;s<o;s+=1)a=t[s],e.replacer&&(a=e.replacer.call(t,String(s),a)),(Bn(e,n,a,!1,!1)||typeof a>"u"&&Bn(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=r,e.dump="["+i+"]"}function Ig(e,n,t,i){var r="",s=e.tag,o,a,l;for(o=0,a=t.length;o<a;o+=1)l=t[o],e.replacer&&(l=e.replacer.call(t,String(o),l)),(Bn(e,n+1,l,!0,!0,!1,!0)||typeof l>"u"&&Bn(e,n+1,null,!0,!0,!1,!0))&&((!i||r!=="")&&(r+=np(e,n)),e.dump&&mo===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=s,e.dump=r||"[]"}function t0(e,n,t){var i="",r=e.tag,s=Object.keys(t),o,a,l,c,u;for(o=0,a=s.length;o<a;o+=1)u="",i!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=s[o],c=t[l],e.replacer&&(c=e.replacer.call(t,l,c)),Bn(e,n,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Bn(e,n,c,!1,!1)&&(u+=e.dump,i+=u));e.tag=r,e.dump="{"+i+"}"}function n0(e,n,t,i){var r="",s=e.tag,o=Object.keys(t),a,l,c,u,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ut("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)p="",(!i||r!=="")&&(p+=np(e,n)),c=o[a],u=t[c],e.replacer&&(u=e.replacer.call(t,c,u)),Bn(e,n+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&mo===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=np(e,n)),Bn(e,n+1,u,!0,d)&&(e.dump&&mo===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,r+=p));e.tag=s,e.dump=r||"{}"}function Bg(e,n,t){var i,r,s,o,a,l;for(r=t?e.explicitTypes:e.implicitTypes,s=0,o=r.length;s<o;s+=1)if(a=r[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof n=="object"&&n instanceof a.instanceOf)&&(!a.predicate||a.predicate(n))){if(t?a.multi&&a.representName?e.tag=a.representName(n):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,Vg.call(a.represent)==="[object Function]")i=a.represent(n,l);else if(Wg.call(a.represent,l))i=a.represent[l](n,l);else throw new ut("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function Bn(e,n,t,i,r,s,o){e.tag=null,e.dump=t,Bg(e,t,!1)||Bg(e,t,!0);var a=Vg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>n);var u=a==="[object Object]"||a==="[object Array]",d,p;if(u&&(d=e.duplicates.indexOf(t),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(r=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(n0(e,n,e.dump,r),p&&(e.dump="&ref_"+d+e.dump)):(t0(e,n,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Ig(e,n-1,e.dump,r):Ig(e,n,e.dump,r),p&&(e.dump="&ref_"+d+e.dump)):(e0(e,n,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&ZS(e,e.dump,n,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ut("unacceptable kind of an object to dump "+a)}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 i0(e,n){var t=[],i=[],r,s;for(rp(e,t,i),r=0,s=i.length;r<s;r+=1)n.duplicates.push(t[i[r]]);n.usedDuplicates=new Array(s)}function rp(e,n,t){var i,r,s;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)t.indexOf(r)===-1&&t.push(r);else if(n.push(e),Array.isArray(e))for(r=0,s=e.length;r<s;r+=1)rp(e[r],n,t);else for(i=Object.keys(e),r=0,s=i.length;r<s;r+=1)rp(e[i[r]],n,t)}function r0(e,n){n=n||{};var t=new jS(n);t.noRefs||i0(e,t);var i=e;return t.replacer&&(i=t.replacer.call({"":i},"",i)),Bn(t,0,i,!0,!0)?t.dump+`
`:""}var s0=r0,o0={dump:s0};function cp(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 mP=jg.load,fP=jg.loadAll,hP=o0.dump,ry=ut;var gP=cp("safeLoad","load"),yP=cp("safeLoadAll","loadAll"),bP=cp("safeDump","dump");var Gr=class e extends Error{constructor(n,t){super(n),this.cause=t??null,this.stack=t.stack??null,Object.setPrototypeOf(this,e.prototype)}};var y={code:{replaceAction:"code",placeholder:"{CODE_BLOCK_PLACEHOLDER}"},inlineCode:{replaceAction:"inlineCode",placeholder:"{INLINE_CODE_BLOCK_PLACEHOLDER}"},image:{replaceAction:"image",placeholder:"{IMAGE_PLACEHOLDER}"},thematicBreak:{replaceAction:"thematicBreak",placeholder:"{HORIZONTAL_RULE_PLACEHOLDER}"},italics:{replaceAction:"emphasis",placeholder:"{ITALICS_PLACEHOLDER}"},bold:{replaceAction:"strong",placeholder:"{STRONG_PLACEHOLDER}"},list:{replaceAction:"list",placeholder:"{LIST_PLACEHOLDER}"},blockquote:{replaceAction:"blockquote",placeholder:"{BLOCKQUOTE_PLACEHOLDER}"},math:{replaceAction:"math",placeholder:"{MATH_PLACEHOLDER}"},inlineMath:{replaceAction:"inlineMath",placeholder:"{INLINE_MATH_PLACEHOLDER}"},html:{replaceAction:"html",placeholder:"{HTML_PLACEHOLDER}"},yaml:{replaceAction:je,placeholder:at(`---
---`)},wikiLink:{replaceAction:rl,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:Kf,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:il,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:Li,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:Pf,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:Uf,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:c0,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:u0,placeholder:"#tag-placeholder"},table:{replaceAction:d0,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:p0,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function ve(e,n,t){let i=[];for(let r of e){let s;if(typeof r.replaceAction=="string")s=a0(n,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)s=l0(n,r.placeholder,r.replaceAction);else if(typeof r.replaceAction=="function"){let o=r.replaceAction;s=o(n,r.placeholder)}n=s.newText,i.push({replacedValues:s.replacedValues,placeholder:r.placeholder})}return n=t(n),i=i.reverse(),i!=null&&i.length>0&&i.forEach(r=>{r.replacedValues.forEach(s=>{n=n.replace(new RegExp(r.placeholder,"i"),at(s))})}),n}function a0(e,n,t){let i=Se(t,e),r=[];t==="list"&&(i=m0(i));for(let s of i){let o=e.substring(s.start.offset,s.end.offset);r.push(o),e=me(e,s.start.offset,s.end.offset,n)}return r.reverse(),{newText:e,replacedValues:r}}function l0(e,n,t){let i=e.match(t),r=[];if(t.flags.includes("g")){if(e=e.replaceAll(t,n),i)for(let s of i)r.push(s)}else e=e.replace(t,n),i&&r.push(i[0]);return{newText:e,replacedValues:r}}function c0(e,n){let t=Se("link",e),i=[];for(let r of t){if(r==null)continue;let s=e.substring(r.start.offset,r.end.offset);s.match(Os)&&(i.push(s),e=me(e,r.start.offset,r.end.offset,n))}return i.reverse(),{newText:e,replacedValues:i}}function u0(e,n){let t=[];return e=e.replace(Cs,(i,r,s)=>(t.push(s),r+n)),{newText:e,replacedValues:t}}function d0(e,n){let t=kr(e),i=new Array(t.length),r=0,s=i.length;for(let o of t)i[s-1-r++]=e.substring(o.startIndex,o.endIndex),e=me(e,o.startIndex,o.endIndex,n);return{newText:e,replacedValues:i}}function p0(e,n){let t=Cf(e),i=new Array(t.length),r=0,s=i.length;for(let o of t)i[s-1-r++]=e.substring(o.startIndex,o.endIndex),e=me(e,o.startIndex,o.endIndex,n);return{newText:e,replacedValues:i}}function m0(e){if(e.length<2)return e;let n=e.pop(),t=null,i=[n];for(;e.length>0;)t=e.pop(),(n.start.offset>=t.end.offset||t.start.offset>=n.end.offset)&&(i.unshift(t),n=t);return i}var K=(o=>(o.YAML="YAML",o.HEADING="Heading",o.FOOTNOTE="Footnote",o.CONTENT="Content",o.SPACING="Spacing",o.PASTE="Paste",o))(K||{}),gc=class{constructor(n,t,i,r,s,o,a=[],l=!1,c=[],u=null){this.nameKey=n;this.descriptionKey=t;this.settingsKey=i;this.alias=r;this.type=s;this.applyAfterIgnore=o;this.options=a;this.hasSpecialExecutionOrder=l;this.ignoreTypes=c;this.ruleHeading=this.getName().toLowerCase().replaceAll(" ","-"),a.unshift(new ai("enabled",this.descriptionKey,"",!1,r,(d,p)=>{if(d&&u&&u(d,p),a.length>1)for(let m=1;m<a.length;m++)d?a[m].unhide():a[m].hide()}));for(let d of a)d.ruleAlias=r}getDefaultOptions(){let n={};for(let t of this.options)n[t.configKey]=t.defaultValue;return n}getOptions(n){return n.ruleConfigs[this.settingsKey]}getName(){return E(this.nameKey)}getDescription(){return E(this.descriptionKey)}getURL(){return"https://platers.github.io/obsidian-linter/settings/"+this.type.toLowerCase()+"-rules/#"+this.ruleHeading}enabledOptionName(){return this.options[0].configKey}apply(n,t){return ve(this.ignoreTypes,n,i=>this.applyAfterIgnore(i,t))}};var oy=Object.values(K);function yc(e){let n=Nr(e);if(n===null)return[[],!1];let t=jh(n);return t.includes("all")?[mn.map(i=>i.alias),!0]:[t,!1]}var mn=[],wt={},Yi=new Map;function ay(e){mn.push(e),wt[e.alias]=e,Yi.has(e.type)?Yi.get(e.type).push(e):Yi.set(e.type,[e])}function ly(){mn.sort((e,n)=>oy.indexOf(e.type)-oy.indexOf(n.type)||e.settingsKey
[ ]{`+Math.min.apply(Math,r)+"}","g");i=i.map(function(a){return a.replace(s,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return n.forEach(function(a,l){var c=o.match(/(?:^|\n)( *)$/),u=c?c[1]:"",d=a;typeof a=="string"&&a.includes(`
`)&&(d=String(a).split(`
`).map(function(p,m){return m===0?p:""+u+p}).join(`
`)),o+=d+i[l+1]}),o}var uy=f0;var su=require("obsidian");var Zr,go,ui,dt=class dt{static getRule(){if(!z(dt,Zr).has(this.name)){let n=new this,t=new gc(n.nameKey,n.descriptionKey,n.settingsKey,n.alias,n.type,n.safeApply.bind(n),n.optionBuilders.map(i=>i.option),n.hasSpecialExecutionOrder,n.ignoreTypes,n.disableConflictingOptions);z(dt,Zr).set(this.name,t),z(dt,go).set(n.alias,n)}return z(dt,Zr).get(this.name)}static applyIfEnabledBase(n,t,i,r){let s=n.getOptions(i);if(s[n.enabledOptionName()]){bi(n.alias);let o=Object.assign({},s,r);pt(`${E("logs.run-rule-text")} ${n.getName()}`);try{let a=n.apply(t,o);return Yn(n.alias),pt(a),[a,!0]}catch(a){Yn(n.alias),bc(a,n.getName())}}else return[t,!1]}static getBuilderByName(n){return z(dt,go).get(n)}static setNoSettingControl(n,t){z(dt,ui).has(n)||z(dt,ui).set(n,[]),z(dt,ui).get(n).push(t)}static hasSettingControl(n,t){return!z(dt,ui).has(n)||!z(dt,ui).get(n).includes(t)}};Zr=new WeakMap,go=new WeakMap,ui=new WeakMap,Ie(dt,Zr,new Map),Ie(dt,go,new Map),Ie(dt,ui,new Map);var di=dt,v=class extends di{constructor(n){super(),this.alias=n.nameKey.substring(6,n.nameKey.length-5),this.settingsKey=this.alias,this.nameKey=n.nameKey,this.descriptionKey=n.descriptionKey,this.type=n.type,this.hasSpecialExecutionOrder=n.hasSpecialExecutionOrder??!1,this.disableConflictingOptions=n.disableConflictingOptions??null,n.ruleIgnoreTypes?this.ignoreTypes=[y.customIgnore,...n.ruleIgnoreTypes]:this.ignoreTypes=[y.customIgnore]}static register(n){let t=n.getRule();ay(t)}safeApply(n,t){return this.apply(n,this.buildRuleOptions(t))}buildRuleOptions(n){n=n??{};let t=new this.OptionsClass,i=Object.assign(t,n);for(let r of this.optionBuilders)r.setRuleOption(i,n);return i}static applyIfEnabled(n,t,i,r){let s=this.getRule();return i.includes(s.alias)?(pt(s.alias+" "+E("logs.disabled-text")),[n,!1]):di.applyIfEnabledBase(s,n,t,r)}static getRuleOptions(n){let t=di.getRule.bind(this)(),i=new this,r=t.getOptions(n);return i.buildRuleOptions(r)}static noSettingControl(){return(n,t)=>{let i=n.constructor.name;di.setNoSettingControl(i,t)}}};var Jr,Fn=class{constructor(n){Ie(this,Jr,void 0);this.OptionsClass=n.OptionsClass;let t=n.nameKey.split(".");t.length==1?this.configKey=t[0]:this.configKey=t[t.length-2],this.nameKey=n.nameKey,this.descriptionKey=n.descriptionKey,this.optionsKey=n.optionsKey}get defaultValue(){return new this.OptionsClass()[this.optionsKey]}get option(){return z(this,Jr)||Pe(this,Jr,this.buildOption()),z(this,Jr)}setRuleOption(n,t){let i=t[this.configKey];i!==void 0&&(n[this.optionsKey]=i)}};Jr=new WeakMap;var j=class extends Fn{constructor(n){super(n),this.onChange=n.onChange??null}buildOption(){return new ai(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue,null,this.onChange)}},kc=class extends Fn{buildOption(){return new co(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},ie=class extends Fn{constructor(n){super(n),this.records=n.records.map(t=>new ac("enums."+t.value,t.description))}buildOption(){return new lc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue,this.records)}},ge=class extends Fn{constructor(n){super(n),this.separator=n.separator??`
`,this.splitter=n.splitter??/\n/}buildOption(){return new sc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue.join(this.separator))}setRuleOption(n,t){if(t[this.configKey]!==void 0){let i=t[this.configKey].split(this.splitter).filter(function(r){return r!=""});n[this.optionsKey]=i}}},Ce=class extends Fn{buildOption(){return new co(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},vc=class extends Fn{buildOption(){return new oc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},wc=class extends Fn{buildOption(){return new cc(this.configKey,this.nameKey,this.descriptionKey)}};var up=class{},pi=class extends v{constructor(){super({nameKey:"rules.add-blank-line-after-yaml.name",descriptionKey:"rules.add-blank-line-after-yaml.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return up}apply(n,t){let i=n.match(je);if(i===null)return n;let r=i[0],s=n.indexOf(r)+r.length;return s+1>=n.length||n.trimEnd()===r.trimEnd()||n.charAt(s+1)===`
`?n:n.replace(r,r+`
`)}get optionBuilders(){return[]}};pi=T([v.register],pi);var Pi=class{constructor(){this.ignoreWords=[];this.extraAutoCorrectFiles=[];this.skipWordsWithMultipleCapitals=!1;this.misspellingToCorrection=new Map}};T([v.noSettingControl()],Pi.prototype,"misspellingToCorrection",2);var zi=class extends v{constructor(){super({nameKey:"rules.auto-correct-common-misspellings.name",descriptionKey:"rules.auto-correct-common-misspellings.description",type:"Content",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[y.yaml,y.code,y.inlineCode,y.math,y.inlineMath,y.link,y.wikiLink,y.tag,y.image,y.url]})}get OptionsClass(){return Pi}apply(n,t){return n.replaceAll(zf,i=>this.replaceWordWithCorrectCasing(i,t))}replaceWordWithCorrectCasing(n,t){let i=n.toLowerCase();if(t.ignoreWords.includes(i)||t.skipWordsWithMultipleCapitals&&n.length>1&&i.substring(1)!==n.substring(1))return n;if(t.misspellingToCorrection.has(i))return this.determineCorrectedWord(n,t.misspellingToCorrection.get(i));if(t.extraAutoCorrectFiles){for(let r=0;r<t.extraAutoCorrectFiles.length;r++)if(t.extraAutoCorrectFiles[r].customReplacements instanceof Map&&t.extraAutoCorrectFiles[r].customReplacements?.has(i))return this.determineCorrectedWord(n,t.extraAutoCorrectFiles[r].customReplacements.get(i))}return n}determineCorrectedWord(n,t){return n.charAt(0)==n.charAt(0).toUpperCase()&&(t=t.charAt(0).toUpperCase()+t.substring(1)),t}get optionBuilders(){return[new ge({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.ignore-words.name",descriptionKey:"rules.auto-correct-common-misspellings.ignore-words.description",optionsKey:"ignoreWords",splitter:Ms,separator:", "}),new j({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.skip-words-with-multiple-capitals.name",descriptionKey:"rules.auto-correct-common-misspellings.skip-words-with-multiple-capitals.description",optionsKey:"skipWordsWithMultipleCapitals"}),new wc({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.extra-auto-correct-files.name",descriptionKey:"rules.auto-correct-common-misspellings.extra-auto-correct-files.description",optionsKey:"extraAutoCorrectFiles"})]}};zi=T([v.register],zi);var Ac=class{constructor(){this.style="space"}},Hi=class extends v{constructor(){super({nameKey:"rules.blockquote-style.name",descriptionKey:"rules.blockquote-style.description",type:"Content",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[y.html,y.code,y.math]})}get OptionsClass(){return Ac}apply(n,t){return t.style==="space"?id(n,i=>this.updateBlockquoteLines(i,this.addSpaceToIndicator)):id(n,i=>this.updateBlockquoteLines(i,this.removeSpaceFromIndicator))}removeSpaceFromIndicator(n,t){return t?n.replace(/>[ \t]+>/g,">>"):n.replace(/>[ \t]+/g,">")}addSpaceToIndicator(n,t){let i=n.replace(/>([^ ]|$)/g,"> $1").replace(/>>/g,"> >");return t?i:i.replace(/>(?:[ \t]{2,}|\t+)/g,"> ")}updateBlockquoteLines(n,t){let i=0,r=0,s="",o="",a=0,l=n,c=!1;do{r=l.indexOf(`
`,i),r===-1&&(r=l.length-1,c=!0),[s,a]=gr(l,r-1);let u=a+s.length+1,d=r;c&&d++;let p=l.substring(u,d);if(p.includes(y.math.placeholder)||p.includes(y.code.placeholder)){i++;continue}let m=nl.test(p);o=t(s,m),a++,l=me(l,a,a+s.length,o),i=r+1+o.length-s.length}while(!c);return l}get optionBuilders(){return[new ie({OptionsClass:Ac,nameKey:"rules.blockquote-style.style.name",descriptionKey:"rules.blockquote-style.style.description",optionsKey:"style",records:[{value:"space",description:"> indicator is followed by a space"},{value:"no space",description:">indicator is not followed by a space"}]})]}};Hi=T([v.register],Hi);var Sc=class{};T([v.noSettingControl()],Sc.prototype,"lineContent",2);var qi=class extends v{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Sc}apply(n,t){let i=/^(\s*)((> ?)+) .*/,r=t.lineContent.match(i);if(!r)return n;let s=r[1]??"",o=r[2]??"";return n.trim().replace(/\n/gm,`
${s}${o} `)}get optionBuilders(){return[]}};qi=T([v.register],qi);var $i=class{constructor(){this.style="Title Case";this.ignoreWords=["macOS","iOS","iPhone","iPad","JavaScript","TypeScript","AppleScript","I"];this.lowercaseWords=["a","an","the","aboard","about","abt.","above","abreast","absent","across","after","against","along","aloft","alongside","amid","amidst","mid","midst","among","amongst","anti","apropos","around","round","as","aslant","astride","at","atop","ontop","bar","barring","before","B4","behind","below","beneath","neath","beside","besides","between","'tween","beyond","but","by","chez","circa","c.","ca.","come","concerning","contra","counting","cum","despite","spite","down","during","effective","ere","except","excepting","excluding","failing","following","for","from","in","including","inside","into","less","like","minus","modulo","mod","near","nearer","nearest","next","notwithstanding","of","o'","off","offshore","on","onto","opposite","out","outside","over","o'er","pace","past","pending","per","plus","post","pre","pro","qua","re","regarding","respecting","sans","save","saving","short","since","sub","than","through","thru","throughout","thruout","till","times","to","t'","touching","toward","towards","under","underneath","unlike","until","unto","up","upon","versus","vs.","v.","via","vice","vis-\xE0-vis","wanting","with","w/","w.","c\u0304","within","w/i","without","'thout","w/o","abroad","adrift","aft","afterward","afterwards","ahead","apart","ashore","aside","away","back","backward","backwards","beforehand","downhill","downstage","downstairs","downstream","downward","downwards","downwind","east","eastward","eastwards","forth","forward","forwards","heavenward","heavenwards","hence","henceforth","here","hereby","herein","hereof","hereto","herewith","home","homeward","homewards","indoors","inward","inwards","leftward","leftwards","north","northeast","northward","northwards","northwest","now","onward","onwards","outdoors","outward","outwards","overboard","overhead","overland","overseas","rightward","rightwards","seaward","seawards","skywards","skyward","south","southeast","southwards","southward","southwest","then","thence","thenceforth","there","thereby","therein","thereof","thereto","therewith","together","underfoot","underground","uphill","upstage","upstairs","upstream","upward","upwards","upwind","west","westward","westwards","when","whence","where","whereby","wherein","whereto","wherewith","although","because","considering","given","granted","if","lest","once","provided","providing","seeing","so","supposing","though","unless","whenever","whereas","wherever","while","whilst","ago","according to","as regards","counter to","instead of","owing to","pertaining to","at the behest of","at the expense of","at the hands of","at risk of","at the risk of","at variance with","by dint of","by means of","by virtue of","by way of","for the sake of","for sake of","for lack of","for want of","from want of","in accordance with","in addition to","in case of","in charge of","in compliance with","in conformity with","in contact with","in exchange for","in favor of","in front of","in lieu of","in light of","in the light of","in line with","in place of","in point of","in quest of","in relation to","in regard to","with regard to","in respect to","with respect to","in return for","in search of","in step with","in touch with","in terms of","in the name of","in view of","on account of","on behalf of","on grounds of","on the grounds of","on the part of","on top of","with a view to","with the exception of","\xE0 la","a la","as soon as","as well as","close to","due to","far from","in case","other than","prior to","pursuant to","regardless of","subsequent to","as long as","as much as","as far as","by the time","in as much as","inasmuch","in order to","in order that","even","provide that","if only","whether","whose","whoever","why","how","or not","whatever","what","both","and","or","not only","but also","either","neither","nor","just","rather","no sooner","such","that","yet","is","it"];this.ignoreCasedWords=!0}},Ui=class extends v{const
`),i=i.replace(/\n+---/,`
---`),t.innerNewLines&&(i=i.replaceAll(/\n{2,}/g,`
`)),i))}get optionBuilders(){return[new j({OptionsClass:Lc,nameKey:"rules.compact-yaml.inner-new-lines.name",descriptionKey:"rules.compact-yaml.inner-new-lines.description",optionsKey:"innerNewLines"})]}};yo=T([v.register],yo);var dp=class{},ji=class extends v{constructor(){super({nameKey:"rules.consecutive-blank-lines.name",descriptionKey:"rules.consecutive-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag],hasSpecialExecutionOrder:!0})}get OptionsClass(){return dp}apply(n,t){return n.replace(/(\n([\t\v\f\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+)?){2,}\n/g,`
`)}get optionBuilders(){return[]}};ji=T([v.register],ji);var pp=class{},bo=class extends v{constructor(){super({nameKey:"rules.convert-bullet-list-markers.name",descriptionKey:"rules.convert-bullet-list-markers.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return pp}apply(n,t){return n.replace(/^([^\S\n]*)([•§])([^\S\n]*)/gm,"$1-$3")}get optionBuilders(){return[]}};bo=T([v.register],bo);var Ec=class{constructor(){this.tabsize=4}},ko=class extends v{constructor(){super({nameKey:"rules.convert-spaces-to-tabs.name",descriptionKey:"rules.convert-spaces-to-tabs.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Ec}apply(n,t){let i=String(t.tabsize),r=new RegExp("^( *) {"+i+"}","gm");n=this.replaceAllRegexMatches(n,r);let s=new RegExp("^((>( | *))*(>( | )) *) {"+i+"}","gm");return n=this.replaceAllRegexMatches(n,s),n}replaceAllRegexMatches(n,t){for(;n.match(t)!=null;)n=n.replace(t,"$1 ");return n}get optionBuilders(){return[new kc({OptionsClass:Ec,nameKey:"rules.convert-spaces-to-tabs.tabsize.name",descriptionKey:"rules.convert-spaces-to-tabs.tabsize.description",optionsKey:"tabsize"})]}};ko=T([v.register],ko);var en=class{constructor(){this.aliasArrayStyle="single-line";this.dedupeAliasKey=!0;this.tagArrayStyle="single-line";this.dedupeTagKey=!0;this.dedupeArrayKeys=!0;this.ignoreDedupeArrayKeys=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],en.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],en.prototype,"tagArrayStyle",2),T([v.noSettingControl()],en.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],en.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var vo=class extends v{constructor(){super({nameKey:"rules.dedupe-yaml-array-values.name",descriptionKey:"rules.dedupe-yaml-array-values.description",type:"YAML"})}get OptionsClass(){return en}apply(n,t){return Ee(n,i=>{let r=vt(i.replace(`---
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.dedupeAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(this.getUniqueArray(ze(ke(i,s)))),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.dedupeTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(this.getUniqueArray(ze(ke(i,s)))),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.dedupeArrayKeys){let s=[...Gt,...Wt,...t.ignoreDedupeArrayKeys];for(let o of Object.keys(r)){if(s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null)continue;let a=ke(i,o),l="single-line";a.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(ze(a));i=ue(i,o,Te(c,l,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return i})}getUniqueArray(n){return n==null||typeof n=="string"||n.length<=1?n:[...new Set(n)]}get optionBuilders(){return[new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.description",optionsKey:"dedupeAliasKey"}),new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.description",optionsKey:"dedupeTagKey"}),new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.description",optionsKey:"dedupeArrayKeys"}),new ge({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.ignore-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.ignore-keys.description",optionsKey:"ignoreDedupeArrayKeys"})]}};vo=T([v.register],vo);var xc=class{constructor(){this.defaultLanguage=""}},wo=class extends v{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[y.yaml,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return xc}apply(n,t){return Mf(n,t.defaultLanguage)}get optionBuilders(){return[new Ce({OptionsClass:xc,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};wo=T([v.register],wo);var Tc=class{constructor(){this.style="consistent"}},Ao=class extends v{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.math,y.inlineMath]})}get OptionsClass(){return Tc}apply(n,t){return tl(n,t.style,"emphasis")}get optionBuilders(){return[new ie({OptionsClass:Tc,nameKey:"rules.emphasis-style.style.name",descriptionKey:"rules.emphasis-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of emphasis is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure * is the emphasis indicator"},{value:"underscore",description:"Makes sure _ is the emphasis indicator"}]})]}};Ao=T([v.register],Ao);var mp=class{},So=class extends v{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return mp}apply(n,t){return Lf(n)}get optionBuilders(){return[]}};So=T([v.register],So);var fp=class{},Lo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return fp}apply(n,t){return Af(n)}get optionBuilders(){return[]}};Lo=T([v.register],Lo);var hp=class{},Eo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-horizontal-rules.name",descriptionKey:"rules.empty-line-around-horizontal-rules.description",type:"Spacing"})}get OptionsClass(){return hp}apply(n,t){return Ef(n)}get optionBuilders(){return[]}};Eo=T([v.register],Eo);var Oc=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Oc.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var xo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[y.yaml,y.code]})}get OptionsClass(){return Oc}apply(n,t){return Sf(n,t.minimumNumberOfDollarSignsToBeAMathBlock)}get optionBuilders(){return[]}};xo=T([v.register],xo);var gp=class{},To=class extends v{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.descr
`),s=r.length;if(s<1)return i;for(let o=0;o<s;o++){let a=r[o].trim(),l=a.indexOf(":"),c=l<0||l+1>=a.length,u=a.startsWith("-"),d=u&&a.length<2;if(c&&d)continue;let p=1;if(!u)p+=l;else if(l!==-1&&o+1<s){let f=r[o],h=f.indexOf("-")+1;for(;h<f.length&&f.charAt(h)===" ";)h++;let g=0,b=r[o+1];for(;g<b.length&&b.charAt(g)===" ";)g++;h<=g&&(p+=l)}let m=a.substring(p).trim();if(m.startsWith("[")){if(t.tryToEscapeSingleLineArrays){if(m.length<3)continue;let f=m.substring(1,m.length-1).split(","),h=f.length;for(let g=0;g<h;g++){let b=f[g].trim();b.startsWith("[")&&(b=b.substring(1).trimStart()),b.endsWith("]")&&(b=b.substring(0,b.length-1).trimEnd()),f[g]=f[g].replace(b,Qt(b,t.defaultEscapeCharacter,!1,!0))}r[o]=r[o].replace(m,"["+f.join(",")+"]")}continue}r[o]=r[o].replace(m,Qt(m,t.defaultEscapeCharacter,!1,!0))}return r.join(`
`)})}get optionBuilders(){return[new j({OptionsClass:Oo,nameKey:"rules.escape-yaml-special-characters.try-to-escape-single-line-arrays.name",descriptionKey:"rules.escape-yaml-special-characters.try-to-escape-single-line-arrays.description",optionsKey:"tryToEscapeSingleLineArrays"})]}};Vi=T([v.register],Vi);var dy=require("obsidian");var fn=class extends dy.Modal{constructor(n,t,i,r,s){super(n),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text"),cls:"modal-heading"});let o=this.contentEl.createEl("p");o.id="confirm-dialog",ft(E("disabled-other-rule-notice").replace("{NAME_1}",E(t)).replace("{NAME_2}",E(i)),o),this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:E("cancel-button-text")}).addEventListener("click",()=>{s(),this.close()});let l=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:E("ok")});l.addEventListener("click",()=>{this.close(),r()}),setTimeout(()=>{l.focus()},50)})}};var Cc=class{};T([v.noSettingControl()],Cc.prototype,"fileName",2);var Co=class extends v{constructor(){super({nameKey:"rules.file-name-heading.name",descriptionKey:"rules.file-name-heading.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag],disableConflictingOptions(n,t){let i=wt["header-increment"],r=i.options[0],s=i.options[1];n&&r.getValue()&&new fn(t,"rules.file-name-heading.name","rules.header-increment.start-at-h2.name",()=>{s.setValue(!1)},()=>{wt["file-name-heading"].options[0].setValue(!1)}).open()}})}get OptionsClass(){return Cc}apply(n,t){if(n.match(/^#\s.*/m))return n;let r=t.fileName,s=n.indexOf(`
---`);s=s==-1||!n.startsWith(`---
`)?0:s+5;let o=`# ${r}
`;return n.length<s&&(o=`
`+o),ki(n,s,o)}get optionBuilders(){return[]}};Co=T([v.register],Co);var yp=class{},Mo=class extends v{constructor(){super({nameKey:"rules.footnote-after-punctuation.name",descriptionKey:"rules.footnote-after-punctuation.description",type:"Footnote",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.footnoteAtStartOfLine,y.footnoteAfterATask]})}get OptionsClass(){return yp}apply(n,t){return n.replace(/(\[\^[^\]]+\]) ?([,.;!:?])/gm,"$2$1")}get optionBuilders(){return[]}};Mo=T([v.register],Mo);var Io=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};T([v.noSettingControl()],Io.prototype,"defaultEscapeCharacter",2);var Wi=class extends v{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Io}apply(n,t){return Ee(n,i=>{for(let r of t.forceYamlEscape){let s=ke(i,r);if(s!=null){if(s.includes(`
`)||s.startsWith(" [")||_r(s))continue;s=Qt(s,t.defaultEscapeCharacter,!0),i=ue(i,r," "+s)}}return i})}get optionBuilders(){return[new ge({OptionsClass:Io,nameKey:"rules.force-yaml-escape.force-yaml-escape-keys.name",descriptionKey:"rules.force-yaml-escape.force-yaml-escape-keys.description",optionsKey:"forceYamlEscape"})]}};Wi=T([v.register],Wi);var bp=class{},Gi=class extends v{constructor(){super({nameKey:"rules.format-tags-in-yaml.name",descriptionKey:"rules.format-tags-in-yaml.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return bp}apply(n,t){return Ee(n,i=>i.replace(new RegExp(`^(${eo}|${Id}):[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m"),function(r){return r.replaceAll("#","")}))}get optionBuilders(){return[]}};Gi=T([v.register],Gi);var At=class{constructor(){this.aliasArrayStyle="single-line";this.formatAliasKey=!0;this.tagArrayStyle="single-line";this.formatTagKey=!0;this.defaultArrayStyle="single-line";this.formatArrayKeys=!0;this.forceSingleLineArrayStyle=[];this.forceMultiLineArrayStyle=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],At.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],At.prototype,"tagArrayStyle",2),T([v.noSettingControl()],At.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],At.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var Bo=class extends v{constructor(){super({nameKey:"rules.format-yaml-array.name",descriptionKey:"rules.format-yaml-array.description",type:"YAML"})}get OptionsClass(){return At}apply(n,t){return Ee(n,i=>{let r=vt(i.replace(`---
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.formatAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(ze(ke(i,s))),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.formatTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(ze(ke(i,s))),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.formatArrayKeys){let s=[...Gt,...Wt,...t.forceMultiLineArrayStyle,...t.forceSingleLineArrayStyle];for(let o of Object.keys(r))s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null||(i=ue(i,o,Te(ze(ke(i,o)),t.defaultArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let s of t.forceSingleLineArrayStyle)Object.keys(r).includes(s)&&(i=ue(i,s,Te(ze(ke(i,s)),"single-line",t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let s of t.forceMultiLineArrayStyle)Object.keys(r).includes(s)&&(i=ue(i,s,Te(ze(ke(i,s)),"multi-line",t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)));return i})}get optionBuilders(){return[new j({OptionsClass:At,nameKey:"rules.format-yaml-array.alias-key.name",descriptionKey:"rules.format-yaml-array.alias-key.description",optionsKey:"formatAliasKey"}),new j({OptionsClass:At,nameKey:"rules.format-yaml-array.tag-key.name",descriptionKey:"rules.format-yaml-array.tag-key.description",optionsKey:"formatTagKey"}),new ie({OptionsClass:At,nameKey:"rules.format-yaml-array.default-array-style.name",descriptionKey:"rules.format-yaml-array.default-array-style.description",optionsKey:"defaultArrayStyle",records:[{value:"multi-line",description:"```key:\\n - value```"},{value:"single-line",description:"```key: [value]```"}]}),new j({OptionsClass:At,nameKey:"rules.format-yaml-array.default-array-keys.name",descriptionKey:"rules.format-yaml-array.default-array-keys.description",optionsKey:"formatArrayKeys"}),new ge({OptionsClass:At,nameKey:"rules.format-yaml-array.force-single-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-single-line-array-style.description",optionsKey:"forceSingleLineArrayStyle"}),new ge({OptionsClass:At,nameKey:"rules.format-yaml-array.force-multi-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-multi-line-array-style.description",optionsKey:"forceMultiLineArrayStyle"})]}};Bo=T([v.register],Bo);var Mc=class{constructor(){this.startAtH2=!1}},Fo=class extends v{constructor(){super({nameKey:"rules.header-increment.name",descriptionKey:"rules.header-increment.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Mc}apply(n,t){let i=0,r=t.startAtH2?2:1,s=[],o=[0,0,0,0,0,0],a=o.length;return n.replace(Wn,(l,c="",u="",d="",p="",m="")=>{let f=u.length;if(f=f<=a?f:a,o[f-1]>=0&&f<i){let h=o.length;for(;s.length!==0&&f<=s[s.length-1];)h=s.pop();s.length===0?h=0:h--;for(let g=o.length-1;g>=h;g--)o[g]=0}if(o[f-1]<=0){let h=i,g=s.length+r;g=g<=a?g:a;for(let b=h;b<f-1;b++)o[b]=g-1;s.push(f),o[f-1]=g}return i=f,c+"#".repeat(o[f-1])+d+p+m})}get optionBuilders(){return[new j({OptionsClass:Mc,nameKey:"rules.header-increment.start-at-h2.name",descriptionKey:"rules.header-increment.start-at-h2.description",optionsKey:"startAtH2",onChange(n,t){let i=wt["file-name-heading"].options[0];n&&i.getValue()&&new fn(t,"rules.header-increment.start-at-h2.name","rules.file-name-heading.name",()=>{i.setValue(!1)},()=>{wt["header-increment"].options[1].setValue(!1)}).open()}})]}};Fo=T([v.register],Fo);var Do=class{constructor(){this.bottom=!0;this.emptyLineAfterYaml=!0}},Ro=class extends v{constructor(){super({nameKey:"rules.heading-blank-lines.name",descriptionKey:"rules.heading-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink]})}get OptionsClass(){return Do}apply(n,t){return t.bottom?(n=n.replace(/^(#+\s.*)/gm,`
$1
`),n=n.replace(/\n+(#+\s.*)/g,`
$1`),n=n.replace(/(^#+\s.*)\n+/gm,`$1
`)):n=n.replace(/^([^#\n][^\n]+)\n+(#+\s.*)/gm,`$1
$2`),n=n.replace(/^\n+(#+\s.*)/,"$1"),n=n.replace(/(#+\s.*)\n+$/,"$1"),t.emptyLineAfterYaml||(n=n.replace(new RegExp("("+je.source+")\\n+(#+\\s.*)"),`$1
$5`)),n}get optionBuilders(){return[new j({OptionsClass:Do,nameKey:"rules.heading-blank-lines.bottom.name",descriptionKey:"rules.heading-blank-lines.bottom.description",optionsKey:"bottom"}),new j({OptionsClass:Do,nameKey:"rules.heading-blank-lines.empty-line-after-yaml.name",descriptionKey:"rules.heading-blank-lines.empty-line-after-yaml.description",optionsKey:"emptyLineAfterYaml"})]}};Ro=T([v.register],Ro);var kp=class{},No=class extends v{constructor(){super({nameKey:"rules.headings-start-line.name",descriptionKey:"rules.headings-start-line.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml]})}get OptionsClass(){return kp}apply(n,t){return n.replaceAll(Wn,i=>i.trimStart())}get optionBuilders(){return[]}};No=T([v.register],No);var Ic=class{constructor(){this.textToInsert=["aliases: ","tags: "]}},_o=class extends v{constructor(){super({nameKey:"rules.insert-yaml-attributes.name",descriptionKey:"rules.insert-yaml-attributes.description",type:"YAML"})}get OptionsClass(){return Ic}apply(n,t){return n=dn(n),Ee(n,i=>{let r=t.textToInsert.reverse(),s=vt(i.match(je)[1]);for(let o of r){let a=o.split(":")[0];Object.prototype.hasOwnProperty.call(s,a)||(i=i.replace(/^---\n/,at(`---
${o}
`)))}return i})}get optionBuilders(){return[new ge({OptionsClass:Ic,nameKey:"rules.insert-yaml-attributes.text-to-insert.name",descriptionKey:"rules.insert-yaml-attributes.text-to-insert.description",optionsKey:"textToInsert"})]}};_o=T([v.register],_o);var vp=class{},Ko=class extends v{constructor(){super({nameKey:"rules.line-break-at-document-end.name",descriptionKey:"rules.line-break-at-document-end.description",type:"Spacing"})}get OptionsClass(){return vp}apply(n,t){return n.length===0||(n=n.replace(/\n+$/g,""),n+=`
`),n}get optionBuilders(){return[]}};Ko=T([v.register],Ko);var wp=class{},Yo=class extends v{constructor(){super({nameKey:"rules.move-footnotes-to-the-bottom.name",descriptionKey:"rules.move-footnotes-to-the-bottom.description",type:"Footnote",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml]})}get OptionsClass(){return wp}apply(n,t){return hf(n)}get optionBuilders(){return[]}};Yo=T([v.register],Yo);var Bc=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Bc.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Qi=class extends v{constructor(){super({nameKey:"rules.move-math-block-indicators-to-their-own-line.name",descriptionKey:"rules.move-math-block-indicators-to-their-own-line.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Bc}apply(n,t){return Of(n,t.minimumNumberOfDollarSignsToBeAMathBlock)}get optionBuilders(){return[]}};Qi=T([v.register],Qi);var mi=class{constructor(){this.tagArrayStyle="single-line";this.howToHandleExistingTags="Nothing";this.tagsToIgnore=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],mi.prototype,"tagArrayStyle",2),T([v.noSettingControl()],mi.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],mi.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var Po=class extends v{constructor(){super({nameKey:"rules.move-tags-to-yaml.name",descriptionKey:"rules.move-tags-to-yaml.description",type:"YAML",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.html,y.wikiLink,y.link]})}get OptionsClass(){return mi}apply(n,t){let i;return ve([y.yaml],n,r=>(i=Gf(r),r)),i.length===0||(n=dn(n),n=Ee(n,r=>{r=r.replace(`---
`,"").replace("---","");let s=[],o=eo;for(let c of Wt){let u=ke(r,c);if(u!=null){s=ti(ze(u)),o=c;break}}let a=new Set;if(typeof s=="string")a.add(s),s=[s];else if(s!=null)for(let c of s)a.add(c);else s=[];for(let c of i){let u=c.trim().substring(1);!a.has(u)&&!t.tagsToIgnore.includes(u)&&(a.add(u),s.push(u))}return`---
${ue(r,o,Te(s,t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),n=ve([y.yaml],n,r=>(t.howToHandleExistingTags!=="Nothing"&&(r=r.replace(Cs,s=>{let o=s.indexOf("#"),a=s.substring(o+1);return t.tagsToIgnore.includes(a)?s:t.howToHandleExistingTags==="Remove hashtag"?s.substring(0,o)+a:""})),r)),n=n.replace(/(\n---)( |\t)+/,"$1")),n}get optionBuilders(){return[new ie({OptionsClass:mi,nameKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.name",descriptionKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.description",optionsKey:"howToHandleExistingTags",records:[{value:"Nothing",description:"Leaves tags in the body of the file alone"},{value:"Remove hashtag",description:"Removes `#` from tags in content body after moving them to the YAML frontmatter"},{value:"Remove whole tag",description:"Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_"}]}),new ge({OptionsClass:mi,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};Po=T([v.register],Po);var Rc=class{constructor(){this.noBareURIs=!1}},Fc="'\"\u2018\u2019\u201C\u201D`[]",V0=["http","ftp","https","smtp"],zo=class extends v{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.image,y.inlineCode,y.anchorTag,y.html]})}get OptionsClass(){return Rc}apply(n,t){let i=n.match(Li);if(i&&(n=this.handleMatches(n,i,!1)),t.noBareURIs){let r=n.match(Yf);r&&(n=this.handleMatches(n,r,!0))}return n}handleMatches(n,t,i){let r=0,s=t.length;for(let o=0;o<s;o++){let a=t[o],l=n.indexOf(a,r),c=l+a.length;a.charAt(0)==="<"&&(a=a.substring(1),l++),a.charAt(a.length-1)===">"&&(a=a.substring(0,a.length-1),c--);let u=l===0?void 0:n.charAt(l-1),d=c>=n.length?void 0:n.charAt(c),p=Hn(a,"(");if(p!=0&&p!=Hn(a,")")&&d==")"?(a+=d,c++,d=c>=n.length?void 0:n.charAt(c)):p==0&&a.endsWith(")")&&(d=")",c--,a=a.substring(0,a.length-1)),this.skipMatch(u,d,a,i)){r=l+a.length;continue}if(u!=null&&u==="<"&&d!=null&&d===">"){let m=l-1;for(;m>0&&n.charAt(m-1)==="<";)m--;let f=c;for(;f<n.length-1&&n.charAt(f+1)===">";)f++;n=me(n,m,f+1,"<"+a+">"),r=l+a.length;continue}n=me(n,l,l+a.length,"<"+a+">"),r=l+a.length+2}return n}skipMatch(n,t,i,r){let s=n!=null&&Fc.includes(n)||Fc.includes(i.charAt(0)),o=t!=null&&Fc.includes(t)||Fc.includes(i.charAt(i.length-1));return s&&o?!0:r?V0.includes(i.substring(0,i.indexOf(":"))):!1}get optionBuilders(){return[new j({OptionsClass:Rc,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};zo=T([v.register],zo);var es=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Ho=class extends v{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.tag]})}get OptionsClass(){return es}apply(n,t){return xf(n,t.numberStyle,t.listEndStyle,t.preserveStart)}get optionBuilders(){return[new ie({OptionsClass:es,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)"},{value:"lazy",description:"Makes sure ordered list item indicators all are the same"},{value:"preserve",description:"Preserves ordered list item indicators as they are"}]}),new ie({OptionsClass:es,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",optionsKey:"listEndStyle",records:[{value:".",description:"Makes sure ordered list items indicators end in '.' (i.e `1.`)"},{value:")",description:"Makes sure ordered list item indicators end in ')' (i.e. `1)`)"}]}),new j({OptionsClass:es,name
{2,}${i}$`,"gm"),s,o=t;do s=o.match(r),o=o.replaceAll(r,`$1
$4`);while(s);return o}}get OptionsClass(){return Tp}apply(t,i){let r=`(( |\\t)*- ${Ei}( |\\t)+.+)`;t=this.replaceEmptyLinesBetweenList(t,r),t=this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\d+\\.( |\\t)+.+)"),t=this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\+( |\\t)+.+)");let a=`(( |\\t)*-(?! ${Ei})( |\\t)+.+)`;return t=this.replaceEmptyLinesBetweenList(t,a),this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\*( |\\t)+.+)")}get optionBuilders(){return[]}};Qo=T([v.register],Qo);var Op=class{},Zo=class extends v{constructor(){super({nameKey:"rules.remove-empty-list-markers.name",descriptionKey:"rules.remove-empty-list-markers.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Op}apply(n,t){let i=new RegExp(`^${Is}(-|\\*|\\+|\\d+[.)]|- (\\[(.)\\]))\\s*?$`,"gm");return n=n.replace(new RegExp(i.source+"\\n","gm"),""),n=n.replace(new RegExp("\\n"+i.source,"gm"),""),n.replace(i,"")}get optionBuilders(){return[]}};Zo=T([v.register],Zo);var Cp=class{},Jo=class extends v{constructor(){super({nameKey:"rules.remove-hyphenated-line-breaks.name",descriptionKey:"rules.remove-hyphenated-line-breaks.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Cp}apply(n,t){return n.replace(/\b[-] \b/g,"")}get optionBuilders(){return[]}};Jo=T([v.register],Jo);var Mp=class{},tr=class extends v{constructor(){super({nameKey:"rules.remove-hyphens-on-paste.name",descriptionKey:"rules.remove-hyphens-on-paste.description",type:"Paste"})}get OptionsClass(){return Mp}apply(n,t){return n.replace(/([^\s-])[-]\s+\n?(?=\w)/g,"$1")}get optionBuilders(){return[]}};tr=T([v.register],tr);var Ip=class{},nr=class extends v{constructor(){super({nameKey:"rules.remove-leading-or-trailing-whitespace-on-paste.name",descriptionKey:"rules.remove-leading-or-trailing-whitespace-on-paste.description",type:"Paste"})}get OptionsClass(){return Ip}apply(n,t){return n.replace(/^[\n ]+|\s+$/g,"")}get optionBuilders(){return[]}};nr=T([v.register],nr);var Bp=class{},ir=class extends v{constructor(){super({nameKey:"rules.remove-leftover-footnotes-from-quote-on-paste.name",descriptionKey:"rules.remove-leftover-footnotes-from-quote-on-paste.description",ruleIgnoreTypes:[y.wikiLink,y.link,y.image],type:"Paste"})}get OptionsClass(){return Bp}apply(n,t){return n.replace(/(\D)[.,]\d+/g,"$1")}get optionBuilders(){return[]}};ir=T([v.register],ir);var Fp=class{},Xo=class extends v{constructor(){super({nameKey:"rules.remove-link-spacing.name",descriptionKey:"rules.remove-link-spacing.description",type:"Spacing"})}get OptionsClass(){return Fp}apply(n,t){return n=kf(n),Vf(n)}get optionBuilders(){return[]}};Xo=T([v.register],Xo);var Rp=class{},rr=class extends v{constructor(){super({nameKey:"rules.remove-multiple-blank-lines-on-paste.name",descriptionKey:"rules.remove-multiple-blank-lines-on-paste.description",type:"Paste"})}get OptionsClass(){return Rp}apply(n,t){return n.replace(/\n{3,}/g,`
`)}get optionBuilders(){return[]}};rr=T([v.register],rr);var Dp=class{},ea=class extends v{constructor(){super({nameKey:"rules.remove-multiple-spaces.name",descriptionKey:"rules.remove-multiple-spaces.description",type:"Content",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.inlineMath,y.yaml,y.link,y.wikiLink,y.tag,y.table]})}get OptionsClass(){return Dp}apply(n,t){return n=ve([y.list],n,i=>i.replace(/(?!^>)([^\s])( ){2,}([^\s])/gm,"$1 $3")),n=Vn(n,i=>i.replace(/([^\s])( ){2,}([^\s])/gm,"$1 $3")),n}get optionBuilders(){return[]}};ea=T([v.register],ea);var sr=class{constructor(){this.includeFullwidthForms=!0;this.includeCJKSymbolsAndPunctuation=!0;this.includeDashes=!0;this.otherSymbols=""}},ta=class extends v{constructor(){super({nameKey:"rules.remove-space-around-characters.name",descriptionKey:"rules.remove-space-around-characters.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return sr}apply(n,t){let i="";if(t.includeFullwidthForms&&(i+="\uFF01-\uFF5E"),t.includeCJKSymbolsAndPunctuation&&(i+="\u3000-\u303F"),t.includeDashes&&(i+="\u2013\u2014"),i+=sn(t.otherSymbols),!i)return n;let r=new RegExp(`([ ])+([${i}])`,"g"),s=new RegExp(`([${i}])([ ])+`,"g"),o=function(l){return l.replace(r,"$2").replace(s,"$1")},a=ve([y.list],n,o);return a=Vn(a,o),a}get optionBuilders(){return[new j({nameKey:"rules.remove-space-around-characters.include-fullwidth-forms.name",descriptionKey:"rules.remove-space-around-characters.include-fullwidth-forms.description",OptionsClass:sr,optionsKey:"includeFullwidthForms"}),new j({nameKey:"rules.remove-space-around-characters.include-cjk-symbols-and-punctuation.name",descriptionKey:"rules.remove-space-around-characters.include-cjk-symbols-and-punctuation.description",OptionsClass:sr,optionsKey:"includeCJKSymbolsAndPunctuation"}),new j({nameKey:"rules.remove-space-around-characters.include-dashes.name",descriptionKey:"rules.remove-space-around-characters.include-dashes.description",OptionsClass:sr,optionsKey:"includeDashes"}),new Ce({nameKey:"rules.remove-space-around-characters.other-symbols.name",descriptionKey:"rules.remove-space-around-characters.other-symbols.description",OptionsClass:sr,optionsKey:"otherSymbols"})]}};ta=T([v.register],ta);var ia=class{constructor(){this.charactersToRemoveSpacesBefore=",!?;:).\u2019\u201D]";this.charactersToRemoveSpacesAfter="\xBF\xA1\u2018\u201C(["}},na=class extends v{constructor(){super({nameKey:"rules.remove-space-before-or-after-characters.name",descriptionKey:"rules.remove-space-before-or-after-characters.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return ia}apply(n,t){let i=sn(t.charactersToRemoveSpacesBefore),r=sn(t.charactersToRemoveSpacesAfter);if(!i&&!r)return n;let s=new RegExp(`([ ])+([${i}])`,"g"),o=new RegExp(`([${r}])([ ])+`,"g"),a=function(c){return c.replace(s,"$2").replace(o,"$1")},l=ve([y.list,y.html],n,a);return l=Vn(l,a),l}get optionBuilders(){return[new Ce({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.description",OptionsClass:ia,optionsKey:"charactersToRemoveSpacesBefore"}),new Ce({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.description",OptionsClass:ia,optionsKey:"charactersToRemoveSpacesAfter"})]}};na=T([v.register],na);var Dc=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},ra=class extends v{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml]})}get OptionsClass(){return Dc}apply(n,t){return n.replaceAll(Wn,(i,r="",s="",o="",a="",l="")=>{if(a==""||a.match(Hf))return i;let c=a.trimEnd(),u=c.charAt(c.length-1);retur
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.sortAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(this.sortArray(ze(ke(i,s)),t.sortOrder)),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.sortTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(this.sortArray(ze(ke(i,s)),t.sortOrder)),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.sortArrayKeys){let s=[...Gt,...Wt,...t.ignoreSortArrayKeys];for(let o of Object.keys(r)){if(s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null)continue;let a=ke(i,o),l="single-line";a.includes(`
`)&&(l="multi-line");let c=this.sortArray(ze(a),t.sortOrder);i=ue(i,o,Te(c,l,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return i})}sortArray(n,t){return n==null||typeof n=="string"||n.length<=1||(n.sort(function(i,r){let s=i.toLowerCase().localeCompare(r.toLowerCase());return s===0?i.localeCompare(r):s}),t==="Ascending Alphabetical")||n.reverse(),n}get optionBuilders(){return[new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-alias-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-alias-key.description",optionsKey:"sortAliasKey"}),new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-tag-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-tag-key.description",optionsKey:"sortTagKey"}),new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-array-keys.name",descriptionKey:"rules.sort-yaml-array-values.sort-array-keys.description",optionsKey:"sortArrayKeys"}),new ge({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.ignore-keys.name",descriptionKey:"rules.sort-yaml-array-values.ignore-keys.description",optionsKey:"ignoreSortArrayKeys"}),new ie({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-order.name",descriptionKey:"rules.sort-yaml-array-values.sort-order.description",optionsKey:"sortOrder",records:[{value:"Ascending Alphabetical",description:"Sorts the array values from a to z"},{value:"Descending Alphabetical",description:"Sorts the array values from z to a"}]})]}};oa=T([v.register],oa);var Np=class{},aa=class extends v{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Np}apply(n,t){return n=n.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),n.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")}get optionBuilders(){return[]}};aa=T([v.register],aa);var ca=class{constructor(){this.englishNonLetterCharactersAfterCJKCharacters=`-+'"([\xA5$`;this.englishNonLetterCharactersBeforeCJKCharacters=`-+;:'"\xB0%$)]`}},la=class extends v{constructor(){super({nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode,y.yaml,y.image,y.link,y.wikiLink,y.tag,y.math,y.inlineMath,y.html]})}get OptionsClass(){return ca}apply(n,t){let i=this.buildHeadRegex(t.englishNonLetterCharactersAfterCJKCharacters),r=this.buildTailRegex(t.englishNonLetterCharactersBeforeCJKCharacters),s=`${y.link.placeholder}|${y.inlineMath.placeholder}|${y.inlineCode.placeholder}|${y.wikiLink.placeholder}`.replaceAll("{","\\{").replaceAll("}","\\}"),o=new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(${s})`,"gmu"),a=new RegExp(`(${s})( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu"),l=function(u){return u.replace(i,"$1 $3").replace(r,"$1 $3")},c=ve([y.italics,y.bold],n,l);return c=c.replace(o,"$1 $3").replace(a,"$1 $3"),c=vf(c,l),c=wf(c,l),c}buildHeadRegex(n){n&&n!==""&&(n=n.replaceAll(/\s/g,""));let t="";return n&&n.length!=0&&(t=`|[${sn(n)}]`),new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${t}|\\*[^*])`,"gmu")}buildTailRegex(n){n&&n!==""&&(n=n.replaceAll(/\s/g,""));let t="";return n&&n.length!=0&&(t=`|[${sn(n)}]`),new RegExp(`(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${t}|[^*]\\*)( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu")}get optionBuilders(){return[new Ce({OptionsClass:ca,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.description",optionsKey:"englishNonLetterCharactersBeforeCJKCharacters"}),new Ce({OptionsClass:ca,nameKey:"rules.space-between-chinese-japanese-or
${t.dateCreatedKey}: [^
]+
`,s=`
${t.dateCreatedKey}:[ ]*
`,o=new RegExp(s),a=new RegExp(r),l=(0,Ft.moment)(t.fileCreatedTime);l.locale(t.locale);let c=t.convertToUTC?l.utc().format(t.format):l.format(t.format),u=`
${t.dateCreatedKey}: ${c}`,d=a.test(n);if(!d&&o.test(n))n=n.replace(o,at(u)+`
`),i=!0;else if(d){if(d){let p=this.getYAMLTimestampString(n,a,t.dateCreatedKey),m=(0,Pp.default)(p);if(t.dateCreatedSourceOfTruth=="frontmatter"&&t.format!==m){let f=this.parseValueToCurrentFormatIfPossible(p,t.format,t.locale,t.convertToUTC);if(f==null)throw new Error(E("logs.invalid-date-format-error").replace("{DATE}",p).replace("{FILE_NAME}",t.fileName));let h=t.convertToUTC?f.utc().format(t.format):f.format(t.format);if(h!==p){let g=`
${t.dateCreatedKey}: ${h}`;n=n.replace(a,at(g)+`
`),i=!0}}else if(t.dateCreatedSourceOfTruth!="frontmatter"){let f=(0,Ft.moment)(p,t.format,t.locale,!0);(f==null||!f.isValid())&&(n=n.replace(a,at(u)+`
`),i=!0)}}}else{let p=n.indexOf(`
---`);n=ki(n,p,`
${t.dateCreatedKey}: ${c}`),i=!0}return[n,i]}handleDateModifiedValue(n,t,i){let r=`
${i.dateModifiedKey}: [^
]+
`,s=`
${i.dateModifiedKey}:[ ]*
`,o=new RegExp(s),a=new RegExp(r),l=(0,Ft.moment)(i.fileModifiedTime);l.locale(i.locale);let c=i.convertToUTC?i.currentTime.utc().format(i.format):i.currentTime.format(i.format),u=`
${i.dateModifiedKey}: ${c}`,d=a.test(n);if(d){let p=(0,Ft.moment)(this.getYAMLTimestampString(n,a,i.dateModifiedKey),i.format,i.locale,!0);(t||p==null||!p.isValid()||i.dateModifiedSourceOfTruth!="user or Linter edits"&&this.getTimeDifferenceInSeconds(p,l,i)>5)&&(n=n.replace(a,at(u)+`
`))}else if(o.test(n))n=n.replace(o,at(u)+`
`);else if(!d){let p=n.indexOf(`
---`);n=ki(n,p,u)}return n}parseValueToCurrentFormatIfPossible(n,t,i,r){if(n==null)return null;let s=r?Ft.moment.utc(n,t,i,!0):(0,Ft.moment)(n,t,i,!0);if(s!=null&&s.isValid())return s;let o=(0,Pp.default)(n);if(o!=null){let a=r?Ft.moment.utc(n,o):(0,Ft.moment)(n,o);a.locale(i);let l=r?a.utc().format(t):a.format(t);return r?Ft.moment.utc(l,t,i,!0):(0,Ft.moment)(l,t,i,!0)}return null}getYAMLTimestampString(n,t,i){return n.match(t)[0].replace(i+":","").trim()}getTimeDifferenceInSeconds(n,t,i){let r=(0,Ft.moment)(t.format(i.format),i.format,i.locale,!0);return Math.abs(n.diff(r,"seconds"))}get optionBuilders(){return[new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created.name",descriptionKey:"rules.yaml-timestamp.date-created.description",optionsKey:"dateCreated"}),new Ce({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created-key.name",descriptionKey:"rules.yaml-timestamp.date-created-key.description",optionsKey:"dateCreatedKey"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created-source-of-truth.name",descriptionKey:"rules.yaml-timestamp.date-created-source-of-truth.description",optionsKey:"dateCreatedSourceOfTruth",records:[{value:"file system",description:"The file system date created value is used to set the value of date created in the frontmatter"},{value:"frontmatter",description:"When a value is present in the frontmatter for date created, this value is used as the value for the date created"}]}),new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified.name",descriptionKey:"rules.yaml-timestamp.date-modified.description",optionsKey:"dateModified"}),new Ce({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified-key.name",descriptionKey:"rules.yaml-timestamp.date-modified-key.description",optionsKey:"dateModifiedKey"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified-source-of-truth.name",descriptionKey:"rules.yaml-timestamp.date-modified-source-of-truth.description",optionsKey:"dateModifiedSourceOfTruth",records:[{value:"file system",description:"The file system date modified value is used to set the value of date modified in the frontmatter"},{value:"user or Linter edits",description:"When a value is present in the frontmatter for date modified, date modified is kept as is unless the Linter makes a change to a note or the user edits a note with the setting `{NAME}` set to something other than `{NEVER}`.".replace("{NAME}",E("rules.yaml-timestamp.update-on-file-contents-updated.name")).replace("{NEVER}",E("enums.never"))}]}),new vc({OptionsClass:$e,nameKey:"rules.yaml-timestamp.format.name",descriptionKey:"rules.yaml-timestamp.format.description",optionsKey:"format"}),new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.convert-to-utc.name",descriptionKey:"rules.yaml-timestamp.convert-to-utc.description",optionsKey:"convertToUTC"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.update-on-file-contents-updated.name",descriptionKey:"rules.yaml-timestamp.update-on-file-contents-updated.description",optionsKey:"timestampUpdateOnFileContentUpdated",records:[{value:"never",description:"never"},{value:"after 5 seconds",description:"after 5 seconds"},{value:"after 10 seconds",description:"after 10 seconds"},{value:"after 15 seconds",description:"after 15 seconds"},{value:"after 30 seconds",description:"after 30 seconds"},{value:"after 1 minute",description:"after 1 minute"}]})]}};Dn=T([v.register],Dn);var tn=class{constructor(){this.preserveExistingAliasesSectionStyle=!0;this.keepAliasThatMatchesTheFilename=!1;this.useYamlKeyToKeepTrackOfOldFilenameOrHeading=!0;this.aliasHelperKey=Fd;this.aliasArrayStyle="multi-line";this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],tn.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],tn.prototype,"fileName",2),T([v.noSettingControl()],tn.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],tn.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var lr=class extends v{constructor(){super({nameKey:"rules.yaml-title-alias.name",descrip
`,"").replace(`
---`,""),c=vt(o),u=t.aliasHelperKey??Fd;u.endsWith(":")&&(u=u.substring(0,u.length-1)),s=c[u]??null,s!=null&&(s=s+"",s=Qt(s,t.defaultEscapeCharacter,this.forceEscape(s,t.aliasArrayStyle)));let d=null,p=Object.keys(c);for(let m of Gt)if(p.includes(m)){d=m;break}if(d!=null){let m=ke(l,d),f="multi-line",h=m==="",g=!1;!m.includes(`
`)&&!(m==="[]"&&t.aliasArrayStyle==="multi-line")&&(m.match(/^\[.*\]/)===null?(f="single string to single-line",g=!0):f="single-line");let b=ni(ze(m)),k=this.getNewAliasValue(b,a,r,s);k===""?l=to(l,d):t.preserveExistingAliasesSectionStyle?!h&&(g&&r==k||!g||b==k)?l=ue(l,d,Te(k,f,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ue(l,d,Te(k,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ue(l,d,Te(k,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else a||(l=ue(l,Bd,Te(r,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!t.useYamlKeyToKeepTrackOfOldFilenameOrHeading||a?l=to(l,u):l=ue(l,u,` ${r}`),n=n.replace(`---
${o}---`,`---
${l}---`),n}getTitleInfo(n,t,i,r){let s=ve([y.code,y.math,y.yaml,y.tag],n,al);s=s||t;let o=Qt(s,r,this.forceEscape(s,i));return[s,o]}forceEscape(n,t){return Ya(n)||n.includes(",")&&(t==="single-line"||t==="single string to single-line"||t==="single string comma delimited")}getNewAliasValue(n,t,i,r){if(n==null)return t?"":i;if(typeof n=="string")t?n===i&&(n=""):r===n?n=i:n=[i,n];else if(r!==null){let s=n.indexOf(r);s===-1&&_r(r)&&(s=n.indexOf(r.substring(1,r.length-1))),s!==-1?t?n.splice(s,1):n[s]=i:n=[i,...n]}else{let s=n.indexOf(i);s!==-1?t&&n.splice(s,1):t||(n=[i,...n])}return n===""||n.length===0?"":n}get optionBuilders(){return[new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.preserve-existing-alias-section-style.name",descriptionKey:"rules.yaml-title-alias.preserve-existing-alias-section-style.description",optionsKey:"preserveExistingAliasesSectionStyle"}),new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.keep-alias-that-matches-the-filename.name",descriptionKey:"rules.yaml-title-alias.keep-alias-that-matches-the-filename.description",optionsKey:"keepAliasThatMatchesTheFilename"}),new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.use-yaml-key-to-keep-track-of-old-filename-or-heading.name",descriptionKey:"rules.yaml-title-alias.use-yaml-key-to-keep-track-of-old-filename-or-heading.description",optionsKey:"useYamlKeyToKeepTrackOfOldFilenameOrHeading"}),new Ce({OptionsClass:tn,nameKey:"rules.yaml-title-alias.alias-helper-key.name",descriptionKey:"rules.yaml-title-alias.alias-helper-key.description",optionsKey:"aliasHelperKey"})]}};lr=T([v.register],lr);var cr=class{constructor(){this.defaultEscapeCharacter='"';this.titleKey="title";this.mode="first-h1-or-filename-if-h1-missing"}};T([v.noSettingControl()],cr.prototype,"fileName",2),T([v.noSettingControl()],cr.prototype,"defaultEscapeCharacter",2);var ur=class extends v{constructor(){super({nameKey:"rules.yaml-title.name",descriptionKey:"rules.yaml-title.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return cr}apply(n,t){n=dn(n);let i="";switch(t.mode){case"filename":i=t.fileName;break;case"first-h1":i=this.getFirstH1Header(n);break;default:i=this.getFirstH1Header(n),i=i||t.fileName}return i=Qt(i,t.defaultEscapeCharacter),Ee(n,r=>{let s=`
${t.titleKey}.*
`,o=new RegExp(s);if(o.test(r))r=r.replace(o,at(`
${t.titleKey}: ${i}
`));else{let a=r.indexOf(`
---`);r=ki(r,a,`
${t.titleKey}: ${i}`)}return r})}getFirstH1Header(n){return ve([y.code,y.math,y.yaml,y.tag],n,al)}get optionBuilders(){return[new Ce({OptionsClass:cr,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ie({OptionsClass:cr,nameKey:"rules.yaml-title.mode.name",descriptionKey:"rules.yaml-title.mode.description",optionsKey:"mode",records:[{value:"first-h1-or-filename-if-h1-missing",description:"Uses the first H1 in the file or the filename of the file if there is not H1"},{value:"filename",description:"Uses the filename as the title"},{value:"first-h1",description:"Uses the first H1 in the file as the title"}]})]}};ur=T([v.register],ur);var NE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-cog">
<circle cx="6" cy="13" r="3"/>
<path d="m9.7 14.4-.9-.3"/>
<path d="m3.2 11.9-.9-.3"/>
<path d="m4.6 16.7.3-.9"/>
<path d="m7.6 16.7-.4-1"/>
<path d="m4.8 10.3-.4-1"/>
<path d="m2.3 14.6 1-.4"/>
<path d="m8.7 11.8 1-.4"/>
<path d="m7.4 9.3-.3.9"/>
<path d="M14 2v6h6"/>
<path d="M4 5.5V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-1.5"/>
</svg>`,_E=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-cog">
<circle cx="18" cy="18" r="3"/>
<path d="M10.5 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v3.5"/>
<path d="m21.7 19.4-.9-.3"/>
<path d="m15.2 16.9-.9-.3"/>
<path d="m16.6 21.7.3-.9"/>
<path d="m19.1 15.2.3-.9"/>
<path d="m19.6 21.7-.4-1"/>
<path d="m16.8 15.3-.4-1"/>
<path d="m14.3 19.6 1-.4"/>
<path d="m20.7 16.8 1-.4"/>
</svg>`,KE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server-cog">
<circle cx="12" cy="12" r="3"/><path d="M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5"/>
<path d="M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5"/>
<path d="M6 6h.01"/><path d="M6 18h.01"/>
<path d="m15.7 13.4-.9-.3"/>
<path d="m9.2 10.9-.9-.3"/>
<path d="m10.6 15.7.3-.9"/>
<path d="m13.6 15.7-.4-1"/>
<path d="m10.8 9.3-.4-1"/>
<path d="m8.3 13.6 1-.4"/>
<path d="m14.7 10.8 1-.4"/>
<path d="m13.4 8.3-.3.9"/>
</svg>`,YE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pilcrow">
<path d="M13 4v16"/>
<path d="M17 4v16"/>
<path d="M19 4H9.5a4.5 4.5 0 0 0 0 9H13"/>
</svg>`,PE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-function-square">
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/>
<path d="M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3"/>
<path d="M9 11.2h5.7"/>
</svg>`,zE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gantt-chart-square">
<rect width="18" height="18" x="3" y="3" rx="2"/>
<path d="M9 8h7"/>
<path d="M8 12h6"/>
<path d="M11 16h5"/>
</svg>`,HE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clipboard-list">
<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>
<path d="M12 11h4"/>
<path d="M12 16h4"/>
<path d="M8 11h.01"/>
<path d="M8 16h.01"/>
</svg>`,qE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-plus">
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/>
<path d="M9 10h6"/>
<path d="M12 7v6"/>
</svg>`,$E=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heading-1">
<path d="M4 12h8"/>
<path d="M4 18V6"/>
<path d="M12 18V6"/>
<path d="m17 12 3-2v8"/>
</svg>`,UE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-superscript">
<path d="m4 19 8-8"/>
<path d="m12 19-8-8"/>
<path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"/>
</svg>`,jE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-code-2">
<path d="M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v4"/>
<polyline points="14 2 14 8 20 8"/>
<path d="m9 18 3-3-3-3"/>
<path d="m5 12-3 3 3 3"/>
</svg>`,VE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/>
<circle cx="12" cy="12" r="3"/>
</svg>`,WE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug-play">
<path d="m8 2 1.88 1.88"/>
<path d="M14.12 3.88 16 2"/>
<path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"/>
<path d="M18 11a4 4 0 0 0-4-4h-4a4 4 0 0 0-4 4v3a6.1 6.1 0 0 0 2 4.5"/>
<path d="M6.53 9C4.6 8.8 3 7.1 3 5"/>
<path d="M6 13H2"/>
<path d="M3 21c0-2.1 1.7-3.9 3.8-4"/>
<path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"/>
<path d="m12 12 8 5-8 5Z"/>
</svg>`,GE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clipboard">
<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>
</svg>`,QE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check">
<polyline points="20 6 9 17 4 12"/>
</svg>`,ZE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-x">
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/>
<path d="M14 2v4a2 2 0 0 0 2 2h4"/>
<path d="m14.5 12.5-5 5"/>
<path d="m9.5 12.5 5 5"/>
</svg>`,JE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-x">
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>
<path d="m9.5 10.5 5 5"/>
<path d="m14.5 10.5-5 5"/>
</svg>`,we={folder:{id:"lint-folder",source:_E},ignoreFolder:{id:"lint-ignore-folder",source:JE},file:{id:"lint-file",source:NE},ignoreFile:{id:"lint-ignored-file",source:ZE},vault:{id:"lint-vault",source:KE},whitespace:{id:"lint-whitespace",source:YE},math:{id:"lint-math",source:PE},content:{id:"lint-content",source:zE},paste:{id:"lint-paste",source:HE},custom:{id:"lint-custom",source:qE},heading:{id:"lint-heading",source:$E},footer:{id:"lint-footer",source:UE},yaml:{id:"lint-yaml",source:jE},general:{id:"lint-general",source:VE},debug:{id:"lint-debug",source:WE},clipboard:{id:"linter-clipboard",source:GE},success:{id:"linter-success",source:QE}};var ns=require("obsidian");var $c=class{constructor(){this.disabledRules=[]}lintText(n){this.skipFile=!1;let t=n.oldText;if([this.disabledRules,this.skipFile]=yc(t),this.skipFile)return t;bi(E("logs.rule-running"));let i=E("logs.pre-rules");bi(i);let r=this.runBeforeRegularRules(n);Yn(i);let s=!1;for(let l of n.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(l.filePath!=""){s=!0;break}let o=E("logs.disabled-text");for(let l of mn){if(this.disabledRules.includes(l.alias)){pt(l.alias+" "+o);continue}else if(l.hasSpecialExecutionOrder||l.type==="Paste")continue;if(l.alias==="auto-correct-common-misspellings"&&s){let c=!1;for(let u of n.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(u.filePath==n.fileInfo.path){c=!0;break}if(c){pt(l.alias+" "+o);continue}}[r]=di.applyIfEnabledBase(l,r,n.settings,{fileCreatedTime:n.fileInfo.createdAtFormatted,fileModifiedTime:n.fileInfo.modifiedAtFormatted,fileName:n.fileInfo.name,locale:n.momentLocale,minimumNumberOfDollarSignsToBeAMathBlock:n.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock,aliasArrayStyle:n.settings.commonStyles.aliasArrayStyle,tagArrayStyle:n.settings.commonStyles.tagArrayStyle,defaultEscapeCharacter:n.settings.commonStyles.escapeCharacter,removeUnnecessaryEscapeCharsForMultiLineArrays:n.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays})}let a=E("logs.custom-regex");return bi(a),r=this.runCustomRegexReplacement(n.settings.customRegexes,r),Yn(a),n.oldText=r,this.runAfterRegularRules(t,n)}runBeforeRegularRules(n){let t=n.oldText;return[t]=Gi.applyIfEnabled(t,n.settings,this.disabledRules),[t]=Vi.applyIfEnabled(t,n.settings,this.disabledRules,{defaultEscapeCharacter:n.settings.commonStyles.escapeCharacter}),[t]=Qi.applyIfEnabled(t,n.settings,this.disabledRules,{minimumNumberOfDollarSignsToBeAMathBlock:n.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock}),[t]=zi.applyIfEnabled(t,n.settings,this.disabledRules,{misspellingToCorrection:n.defaultMisspellings}),t}runAfterRegularRules(n,t){let i=t.oldText,r=E("logs.post-rules");bi(r),[i]=Ui.applyIfEnabled(i,t.settings,this.disabledRules),[i]=ur.applyIfEnabled(i,t.settings,this.disabledRules,{fileName:t.fileInfo.name,defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter}),[i]=lr.applyIfEnabled(i,t.settings,this.disabledRules,{fileName:t.fileInfo.name,aliasArrayStyle:t.settings.commonStyles.aliasArrayStyle,defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter,removeUnnecessaryEscapeCharsForMultiLineArrays:t.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays}),[i]=Hi.applyIfEnabled(i,t.settings,this.disabledRules),[i]=Wi.applyIfEnabled(i,t.settings,this.disabledRules,{defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter}),[i]=or.applyIfEnabled(i,t.settings,this.disabledRules),[i]=ji.applyIfEnabled(i,t.settings,this.disabledRules);let s=i.match(je);s!=null&&([i]=pi.applyIfEnabled(i,t.settings,this.disabledRules));let o=t.getCurrentTime(),a;[i,a]=Dn.applyIfEnabled(i,t.settings,this.disabledRules,{fileCreatedTime:t.fileInfo.createdAtFormatted,fileModifiedTime:t.fileInfo.modifiedAtFormatted,currentTime:o,alreadyModified:n!=i,locale:t.momentLocale}),s===null&&([i]=pi.applyIfEnabled(i,t.settings,this.disabledRules));let l=Dn.getRuleOptions(t.settings);return o=t.getCurrentTime(),l.convertToUTC&&(o=o.utc()),[i]=ar.appl
`),c+=`/${o.find}/${o.flags}/${o.replace}/`,pt(c);let u=new RegExp(`${o.find}`,o.flags);r=r.replace(u,Lm(o.replace)),s!=r&&pt(r),s=r}return r})}runPasteLint(n,t,i){let r=i.oldText;return[r]=tr.applyIfEnabled(r,i.settings,[]),[r]=rr.applyIfEnabled(r,i.settings,[]),[r]=ir.applyIfEnabled(r,i.settings,[]),[r]=Xi.applyIfEnabled(r,i.settings,[]),[r]=nr.applyIfEnabled(r,i.settings,[]),[r]=Zi.applyIfEnabled(r,i.settings,[],{lineContent:n,selectedText:t}),[r]=Ji.applyIfEnabled(r,i.settings,[],{lineContent:n,selectedText:t}),[r]=qi.applyIfEnabled(r,i.settings,[],{lineContent:n}),r}runYAMLTimestampByItself(n){let t=n.oldText,i=n.getCurrentTime();return[t]=Dn.applyIfEnabled(t,n.settings,this.disabledRules,{fileCreatedTime:n.fileInfo.createdAtFormatted,fileModifiedTime:n.fileInfo.modifiedAtFormatted,currentTime:i,alreadyModified:!0,locale:n.momentLocale}),t}};function dr(e,n=null,t,i,r){let s=n&&n.stat.ctime!==0?(0,ns.moment)(n.stat.ctime):(0,ns.moment)();s.locale(t);let o=n?(0,ns.moment)(n.stat.mtime):(0,ns.moment)();o.locale(t);let a=o.format(),l=s.format();return{oldText:e,fileInfo:{name:n?n.basename:"",createdAtFormatted:l,modifiedAtFormatted:a,path:n?n.path:""},settings:i,momentLocale:t,getCurrentTime:()=>{let c=(0,ns.moment)();return c.locale(t),c},defaultMisspellings:r}}var Uc=require("obsidian");var fa=class extends Uc.Modal{constructor(n,t,i,r,s,o=!1){super(n),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text"),cls:"modal-heading"}),o&&this.contentEl.createEl("p",{text:E("custom-command-warning"),cls:"modal-warn"}),this.contentEl.createEl("p",{text:t+" "+E("file-backup-text")}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:E("cancel-button-text")}).addEventListener("click",()=>this.close());let l=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:i});l.addEventListener("click",async c=>{new Uc.Notice(r),this.close(),await s()}),setTimeout(()=>{l.focus()},50)})}};var ba=require("obsidian");var jc=require("obsidian");var XE={General:we.general.id,Custom:we.custom.id,YAML:we.yaml.id,Heading:we.heading.id,Footnote:we.footer.id,Content:we.content.id,Spacing:we.whitespace.id,Paste:we.paste.id,Debug:we.debug.id},ex={General:"tabs.names.general",Custom:"tabs.names.custom",YAML:"tabs.names.yaml",Heading:"tabs.names.heading",Footnote:"tabs.names.footnote",Content:"tabs.names.content",Spacing:"tabs.names.spacing",Paste:"tabs.names.paste",Debug:"tabs.names.debug"},hn=class{constructor(n,t,i,r,s){this.name=i;this.isMobile=r;this.plugin=s;this.searchSettingInfo=[];this.navButton=n.createDiv("linter-navigation-item");let o="linter-desktop";r&&(o="linter-mobile"),this.navButton.addClass(o),(0,jc.setIcon)(this.navButton.createSpan({cls:"linter-navigation-item-icon"}),XE[i]);let a=E(ex[i]);this.navButton.createSpan().setText(a),this.contentEl=t.createDiv("linter-tab-settings"),this.contentEl.id=i.toLowerCase().replace(" ","-"),this.headingEl=new jc.Setting(this.contentEl).setName(a).setHeading().nameEl,De(this.headingEl)}addSettingSearchInfo(n,t="",i="",r=null,s=null){this.searchSettingInfo.push({containerEl:n,name:t.toLowerCase(),description:i.toLowerCase(),options:r,alias:s})}addSettingSearchInfoForGeneralSettings(n){this.searchSettingInfo.push({containerEl:n.containerEl,name:n.name.toLowerCase(),description:n.description.toLowerCase(),options:null,alias:null})}updateTabDisplayMode(n,t="the status is still the same"){switch(n?(this.navButton.addClass("linter-navigation-item-selected"),Ve(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),De(this.contentEl)),t){case"entering search mode by focusing on the search input box":Ve(this.contentEl),Ve(this.headingEl);for(let i of this.searchSettingInfo)Ve(i.containerEl);break;case"leaving search mode by selecting a tab":De(this.headingEl);for(let i of this.searchSettingInfo)Ve(i.containerEl);break}}};var Cy=require("obsidian");var Ay=require("obsidian");var fi=class{constructor(n,t,i,r,s,o=null){this.containerEl=n;this.keyToUpdate=r;this.plugin=s;this.beforeSave=o;th
`," "));let b=this.contentEl.createDiv(),k=new Gc(b,this.plugin.settings.filesToIgnore,this.app,()=>{this.plugin.saveSettings()});this.addSettingSearchInfo(b,k.name,k.description.replaceAll(`
`," "))}};var My=require("obsidian"),Zc=class extends hn{constructor(t,i,r,s,o,a){super(t,i,r,o,a);this.rules=s;this.display()}display(){for(let t of this.rules){let i=this.contentEl.createDiv();i.id=t.alias,new My.Setting(i).setHeading().nameEl.createEl("a",{href:t.getURL(),text:t.getName()});let r=[],s=!0,o=!1;for(let a of t.options)a.display(i,this.plugin.settings,this.plugin),r.push(a.getSearchInfo()),s?(s=!1,a instanceof ai&&(o=!this.plugin.settings.ruleConfigs[a.ruleAlias][a.configKey])):o&&a.hide();this.addSettingSearchInfo(i,t.getName().toLowerCase(),t.getDescription().toLowerCase(),r,i.id)}}};var Iy=require("obsidian");var ga=class extends si{constructor(t,i,r=[]){super(t,i);this.app=t;this.inputEl=i;this.valuesToExclude=r}getSuggestions(t){let i=this.app.commands.listCommands();if(!i)return[];let r=i.filter(a=>{for(let l of this.valuesToExclude)if(l.id==a.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==a.id))return!1;return!0}),s=[],o=t.toLowerCase();return r.forEach(a=>{(a.id.contains(o)||a.name.toLowerCase().contains(o))&&s.push(a)}),s}renderSuggestion(t,i){i.setText(t.name)}selectSuggestion(t){this.inputEl.value=t.name,this.inputEl.setAttribute("commandId",t.id),this.inputEl.trigger("input"),this.close()}};var Jc=class extends yn{constructor(t,i,r,s){super(t,E("options.custom-command.name"),E("options.custom-command.description"),E("options.custom-command.warning"),E("options.custom-command.add-input-button-text"),r,s,()=>{let o={id:"",name:"",enabled:!0};this.lintCommands.push(o),this.saveSettings(),this.addCommand(o,this.lintCommands.length-1,!0)});this.lintCommands=i;this.display()}showInputEls(){this.lintCommands.forEach((t,i)=>{this.addCommand(t,i)})}addCommand(t,i,r=!1){new Iy.Setting(this.inputElDiv).addSearch(s=>{new ga(this.app,s.inputEl,this.lintCommands),s.setPlaceholder(E("options.custom-command.command-search-placeholder-text")).setValue(t.name).onChange(o=>{let a={id:s.inputEl.getAttribute("commandId"),name:o,enabled:t.enabled};a.name&&a.id?(this.lintCommands[i]=a,this.saveSettings()):!a.name&&!a.id&&(this.lintCommands[i]=a,this.saveSettings())}),s.inputEl.setAttr("tabIndex",i),s.inputEl.addClass("linter-custom-command"),r&&s.inputEl.focus()}).addExtraButton(s=>{s.setIcon("up-chevron-glyph").setTooltip(E("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(i,i-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(s=>{s.setIcon("down-chevron-glyph").setTooltip(E("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(i,i+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(s=>{s.setIcon("trash").setTooltip(E("options.custom-command.delete-tooltip")).onClick(()=>{this.lintCommands.splice(i,1),this.saveSettings(),this.resetInputEls()})}).addToggle(s=>{s.setValue(t.enabled).onChange(o=>{t.enabled=o})})}arrayMove(t,i){if(i<0||i===this.lintCommands.length)return;let r=this.lintCommands[t];this.lintCommands[t]=this.lintCommands[i],this.lintCommands[i]=r}};var zp=require("obsidian");var nx="gm",Xc=class extends yn{constructor(t,i,r,s){super(t,E("options.custom-replace.name"),E("options.custom-replace.description"),E("options.custom-replace.warning"),E("options.custom-replace.add-input-button-text"),r,s,()=>{let o={label:"",find:"",replace:"",flags:nx,enabled:!0};this.regexes.push(o),this.saveSettings(),this.addRegex(o,this.regexes.length-1,!0)});this.regexes=i;this.display(),this.inputElDiv.addClass("linter-custom-regex-replacement-container")}showInputEls(){this.regexes.forEach((t,i)=>{this.addRegex(t,i)})}addRegex(t,i,r=!1){let s=this.inputElDiv.createDiv({cls:"linter-custom-regex-replacement"}),o=s.createDiv(),a=new zp.Setting(o).addText(u=>{u.setPlaceholder(E("options.custom-replace.label-placeholder-text")).setValue(t.label).onChange(d=>{this.regexes[i].label=d,this.saveSettings()}),u.inputEl.setAttr("inputIndex",i),u.inputEl.addClass("linter-custom-regex-replacement-label-input"),r&&u.inputEl.focus()});a.controlEl.addClass("linter-custom-regex-replacement-label"),a.descEl.remove(),a.infoEl.remove(),a.name
`," ")+i.warning.replaceAll(`
`," "));let r=this.contentEl.createDiv(),s=new Xc(r,this.plugin.settings.customRegexes,this.app,()=>{this.plugin.saveSettings()});this.addSettingSearchInfo(r,s.name,s.description.replaceAll(`
`," ")+s.warning.replaceAll(`
`," "))}};var By=require("obsidian");var tu=class{constructor(n,t,i,r){this.containerEl=n;this.searchZeroState=t;this.tabNameToTab=i;this.onFocus=r;this.searchSettingInfo=new Map;for(let[s,o]of i)this.searchSettingInfo.set(s,o.searchSettingInfo);this.display()}display(){let n=new By.Setting(this.containerEl);n.settingEl.addClass("linter-no-border"),n.addSearch(t=>{this.search=t}),this.search.setPlaceholder(E("tabs.default-search-bar-text")),this.search.inputEl.onfocus=()=>{this.onFocus()},this.search.onChange(t=>{this.searchSettings(t.toLowerCase())})}searchSettings(n){let t=new Set,i=function(r,s){Ve(r),t.has(s)||t.add(s)};for(let[r,s]of this.searchSettingInfo)for(let o of s)if(n.trim()===""||o.alias?.includes(n)||o.description.includes(n)||o.name.includes(n))i(o.containerEl,r);else if(o.options)for(let a of o.options){if(a.description.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)){i(o.containerEl,r);break}else if(a.options){for(let l of a.options)if(l.description.toLowerCase().includes(n)||l.value.toLowerCase().includes(n)){i(o.containerEl,r);break}}De(o.containerEl)}else De(o.containerEl);for(let[r,s]of this.tabNameToTab)t.has(r)?Ve(s.headingEl):De(s.headingEl);t.size===0?Ve(this.searchZeroState):De(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var Fy=yi(Ta());var is=require("obsidian");var ya=class{constructor(n,t,i,r=!0){this.containerEl=n;this.name=t;this.description=i;this.disabled=r;this.display()}display(){this.settingEl=this.containerEl.createDiv();let n=this.settingEl.createDiv("setting-item-info");this.nameEl=n.createDiv("setting-item-name"),this.nameEl.setText(this.name),this.descEl=n.createDiv("setting-item-description"),this.descEl.setText(this.description),this.inputContainerEl=this.settingEl.createDiv("full-width-textbox-input-wrapper"),this.inputContainerEl.onmouseover=()=>{this.getInput().trim()!=""&&this.copyEl.removeClass("linter-visually-hidden")},this.inputContainerEl.onmouseleave=()=>{this.copyEl.addClass("linter-visually-hidden")},this.inputEl=this.inputContainerEl.createEl("textarea",{cls:"full-width"}),this.inputEl.spellcheck=!1,this.inputEl.disabled=this.disabled,this.copyEl=this.inputContainerEl.createDiv({cls:"settings-copy-button linter-visually-hidden ",attr:{"aria-label":E("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,is.setIcon)(this.copyIconEl,"linter-clipboard"),this.copyIconEl.onclick=()=>{this.handleCopy(this.copyIconEl)}}getInput(){return this.inputEl.value}handleCopy(n){navigator.clipboard.writeText(this.getInput()).then(()=>{(0,is.setIcon)(n,"linter-success"),setTimeout(()=>{(0,is.setIcon)(n,"linter-clipboard")},1500)},t=>{new is.Notice(`${E("notice-text.copy-to-clipboard-failed")+t}`,0)})}hide(){De(this.settingEl)}unhide(){Ve(this.settingEl)}};var ix=Object.keys(Fy.default.levels),nu=class extends hn{constructor(n,t,i,r){super(n,t,"Debug",i,r),this.display()}display(){let n=this.contentEl.createDiv(),t={isForEnum:!0,values:ix,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new Nn(n,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,t,async()=>{Ba(this.plugin.settings.logLevel)})),n=this.contentEl.createDiv();let i=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new ya(n,i,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(n,i,r);let o=null;n=this.contentEl.createDiv();let a=new gn(n,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin,l=>{l?o.unhide():o.hide()});this.addSettingSearchInfoForGeneralSettings(a),n=this.contentEl.createDiv(),i=E("tabs.debug.linter-logs.name"),r=E("tabs.debug.linter-logs.description"),o=new ya(n,i,""),o.inputEl.setText(Ca.join(`
`)),ft(r,o.descEl),a.getBoolean()||o.hide(),this.addSettingSearchInfo(n,i,r)}};var iu=class extends ba.PluginSettingTab{constructor(t,i){super(t,i);this.plugin=i;this.tabNameToTab=new Map;this.selectedTab="General"}display(){let{containerEl:t}=this;t.empty();let i=t.createDiv("linter-setting-title");ba.Platform.isMobile?i.addClass("linter-mobile"):i.createEl("h1").setText(E("linter-title")),this.navContainer=t.createEl("nav",{cls:"linter-setting-header"}),this.tabNavEl=this.navContainer.createDiv("linter-setting-tab-group"),this.settingsContentEl=t.createDiv("linter-setting-content"),this.addTabs(ba.Platform.isMobile),this.createSearchZeroState(),this.generateSearchBar(i),this.selectedTab==""&&this.tabSearcher.focusOnInput()}addTabs(t){this.addTab(new Qc(this.tabNavEl,this.settingsContentEl,t,this.plugin,this.app));for(let i of Object.values(K))this.addTab(new Zc(this.tabNavEl,this.settingsContentEl,i,Yi.get(i),t,this.plugin));this.addTab(new eu(this.tabNavEl,this.settingsContentEl,t,this.app,this.plugin)),this.addTab(new nu(this.tabNavEl,this.settingsContentEl,t,this.plugin))}generateSearchBar(t){this.tabSearcher=new tu(t,this.searchZeroState,this.tabNameToTab,()=>{for(let i of this.tabNameToTab.values()){i.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(){this.searchZeroState=this.settingsContentEl.createDiv({cls:"search-zero-state"}),De(this.searchZeroState),this.searchZeroState.createEl("p",{text:E("empty-search-results-text")})}addTab(t){t.navButton.onclick=()=>{this.onTabClick(t.name)},t.updateTabDisplayMode(this.selectedTab===t.name,"the status is still the same"),this.tabNameToTab.set(t.name,t)}onTabClick(t){if(this.selectedTab!==t){if(this.selectedTab=="")for(let[i,r]of this.tabNameToTab)r.updateTabDisplayMode(i===t,"leaving search mode by selecting a tab");else De(this.searchZeroState),this.tabNameToTab.get(t).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=t}}};var Dy=require("obsidian");var rx=/^---\n/gm,Ry=`${Dr}:`,ru=class extends Dy.EditorSuggest{constructor(t){super(t.app);this.plugin=t;this.inline=!1;let i=E("all-rules-option");this.ruleInfo=[{displayName:i,name:i.toLowerCase(),alias:"all"}];for(let r of mn){let s=r.getName();this.ruleInfo.push({displayName:s,name:s.toLowerCase(),alias:r.alias})}}onTrigger(t,i,r){let s=i.getLine(t.line).toLowerCase();if(s.startsWith(Ry)||this.disabledRulesIsEndOfStartOfFileToCursor(i.getRange({line:0,ch:0},t))){this.inline=s.startsWith(Ry);let a=i.getLine(t.line).substring(0,t.ch),l=a.match(/(\S+)$/)?.first().replaceAll("[","").replaceAll("]","");if(l)return{end:t,start:{ch:a.lastIndexOf(l),line:t.line},query:l}}return null}getSuggestions(t){let[i,r]=yc(t.editor.getValue());if(r)return[];let s=t.query.toLowerCase();return this.ruleInfo.filter(a=>(a.name.contains(s)||a.alias.contains(s))&&!i.includes(a.alias))}renderSuggestion(t,i){i.addClass("mod-complex");let r=i.createDiv({cls:"suggestion-content"});r.createDiv({cls:"suggestion-title"}).setText(`${t.displayName}`),r.createDiv({cls:"suggestion-note"}).setText(`${t.alias}`)}selectSuggestion(t){if(this.context){let i=t.alias;this.inline?i=`${i},`:i=`${i}
-`,this.context.editor.replaceRange(`${i} `,this.context.start,this.context.end)}}disabledRulesIsEndOfStartOfFileToCursor(t){if(!t||!t.length||t.match(rx)?.length!=1)return!1;let i=ke(t+`
`,Dr)?.trimEnd();return i===null?!1:t.trimEnd().endsWith(i)}};var Hy=yi(Yy()),qy=yi(Ta());var pr=require("obsidian");var qp="default-misspellings.md",Hp=`https://raw.githubusercontent.com/platers/obsidian-linter/refs/heads/master/src/utils/${qp}`;async function Py(e,n){let t=e.app,i=e.manifest.dir??"",r=(0,pr.normalizePath)(i+"/"+qp);if(await t.vault.adapter.exists(r))return;let s=new pr.Notice(E("rules.auto-correct-common-misspellings.default-install")),o;try{o=await(0,pr.requestUrl)(Hp)}catch(a){Ma(E("rules.auto-correct-common-misspellings.default-install-failed").replace("{URL}",Hp),a)}if(!o||o.status!==200){let a=E("rules.auto-correct-common-misspellings.default-install-failed").replace("{URL}",Hp)+E("logs.see-console");await n(a);return}await t.vault.adapter.exists(i)||await t.vault.adapter.mkdir(i),await t.vault.adapter.writeBinary(r,o.arrayBuffer),s.hide()}async function zy(e){let n=e.app,t=e.manifest.dir??"",i=(0,pr.normalizePath)(t+"/"+qp);return await n.vault.adapter.exists(i)?await n.vault.adapter.read(i):(Et(E("rules.auto-correct-common-misspellings.defaults-missing").replace("{FILE}",i)),"")}var sx={en:"en-gb",zh:"zh-cn","zh-TW":"zh-tw",ru:"ru",ko:"ko",it:"it",id:"id",ro:"ro","pt-BR":"pt-br",cz:"cs",da:"da",de:"de",es:"es",fr:"fr",no:"nn",pl:"pl",pt:"pt",tr:"tr",hi:"hi",nl:"nl",ar:"ar",ja:"ja"},_n=0,ou=class extends ne.Plugin{constructor(){super(...arguments);this.eventRefs=[];this.isEnabled=!0;this.rulesRunner=new $c;this.overridePaste=!1;this.hasCustomCommands=!1;this.customCommandsLock=new Hy.default;this.originalSaveCallback=null;this.editorLintFiles=[];this.fileLintFiles=new Set;this.customCommandsCallback=null;this.currentlyOpeningSidebar=!1;this.activeFileChangeDebouncer=new Map;this.defaultAutoCorrectMisspellings=new Map;this.hasLoadedMisspellingFiles=!1}async onload(){ly(),Ra(window.localStorage.getItem("language")),Dt(E("logs.plugin-load")),this.isEnabled=!0;for(let t in we){let i=we[t];(0,ne.addIcon)(i.id,i.source)}await this.loadSettings(),this.addCommands(),this.registerEventsAndSaveCallback(),this.registerEditorSuggest(new ru(this)),this.settingsTab=new iu(this.app,this),this.addSettingTab(this.settingsTab)}async onunload(){Dt(E("logs.plugin-unload")),this.isEnabled=!1;for(let i of this.eventRefs)this.app.workspace.offref(i);let t=this.app.commands?.commands?.["editor:save-file"];t&&t.callback&&this.originalSaveCallback&&(t.callback=this.originalSaveCallback)}async loadSettings(){let t=await this.loadData();this.settings=Object.assign({},ma,t),typeof this.settings.logLevel=="number"&&(this.settings.logLevel=Qp(this.settings.logLevel)),Ba(this.settings.logLevel),await this.setOrUpdateMomentInstance(),this.updatePasteOverrideStatus(),this.updateHasCustomCommandStatus()}async saveSettings(){this.hasLoadedMisspellingFiles||await this.loadAutoCorrectFiles(!1),await this.saveData(this.settings),this.updatePasteOverrideStatus(),this.updateHasCustomCommandStatus()}addCommands(){let t=this;this.addCommand({id:"lint-file",name:E("commands.lint-file.name"),editorCheckCallback(i,r,s){if(i)return t.isMarkdownFile(s.file)&&r.cm!=null;t.runLinterEditor(r)},icon:we.file.id}),this.addCommand({id:"lint-file-unless-ignored",name:E("commands.lint-file-unless-ignored.name"),editorCheckCallback(i,r,s){if(i)return t.isMarkdownFile(s.file);!t.shouldIgnoreFile(s.file)&&r.cm&&t.runLinterEditor(r)},icon:we.file.id}),this.addCommand({id:"lint-all-files",name:E("commands.lint-all-files.name"),icon:we.vault.id,callback:()=>{let i=E("commands.lint-all-files.start-message"),r=E("commands.lint-all-files.submit-button-text"),s=E("commands.lint-all-files.submit-button-notice-text");new fa(this.app,i,r,s,()=>this.runLinterAllFiles(this.app),this.settings.lintCommands&&this.settings.lintCommands.length>0).open()}}),this.addCommand({id:"lint-all-files-in-folder",name:E("commands.lint-all-files-in-folder.name"),icon:we.folder.id,editorCheckCallback:(i,r,s)=>{if(i)return s&&s.file&&s.file instanceof ne.TFile&&s.file.parent?!s.file.parent.isRoot():!1;this.createFolderLintModal(s.file.parent)}}),this.addCommand({id:"paste-as-plain-tex
`+r),new ne.Notice(r),this.settings.ruleConfigs["auto-correct-common-misspellings"].enabled=!1,await this.saveSettings()}),!!this.settings.ruleConfigs["auto-correct-common-misspellings"].enabled)){this.defaultAutoCorrectMisspellings=br(Pn(await zy(this)));for(let r of this.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(r.filePath!=""){let s=this.getFileFromPath(r.filePath);s&&(r.customReplacements=br(Pn(await this.app.vault.cachedRead(s))))}this.hasLoadedMisspellingFiles=!0}}onMenuOpenCallback(t,i,r){i instanceof ne.TFile&&this.isMarkdownFile(i)?this.shouldIgnoreFile(i)||(t.addItem(s=>{s.setIcon(we.file.id).setTitle(E("commands.lint-file-pop-up-menu-text.name")).onClick(()=>{let o=this.app.workspace.getActiveFile(),a=this.getEditor();o===i&&a&&a.cm?this.runLinterEditor(a):this.runLinterFile(i)})}),t.addItem(s=>{s.setIcon(we.ignoreFile.id).setTitle(E("commands.ignore-file-pop-up-menu-text.name")).onClick(()=>{this.addFileToIgnoreList(i)})})):i instanceof ne.TFolder&&(this.settings.foldersToIgnore.includes(i.path)||(t.addItem(s=>{s.setTitle(E("commands.lint-folder-pop-up-menu-text.name")).setIcon(we.folder.id).onClick(()=>this.createFolderLintModal(i))}),t.addItem(s=>{s.setTitle(E("commands.ignore-folder-pop-up-menu-text.name")).setIcon(we.ignoreFolder.id).onClick(()=>void this.addFolderToIgnoreList(i))})))}async onActiveLeafChange(){if(!this.isEnabled||this.currentlyOpeningSidebar)return;let t=this.app.workspace.getActiveFile(),i=this.lastActiveFile==null?!1:await this.app.vault.adapter.exists(this.lastActiveFile.path);if(!this.settings.lintOnFileChange||!i||this.lastActiveFile===t||!this.isMarkdownFile(this.lastActiveFile)||this.shouldIgnoreFile(this.lastActiveFile)){this.lastActiveFile=t;return}try{await this.runLinterFile(this.lastActiveFile,!0)}catch(r){this.handleLintError(this.lastActiveFile,r,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}finally{this.lastActiveFile=t}}shouldIgnoreFile(t){for(let i of this.settings.foldersToIgnore)if(i.length>0&&t.path.startsWith((0,ne.normalizePath)(i)+"/"))return!0;for(let i of this.settings.filesToIgnore){if(!i.match)continue;if(new RegExp(`${i.match}`,i.flags).test(t.path))return!0}return!1}isMarkdownFile(t){return t&&t.extension==="md"}async runLinterFile(t,i=!1){let r=Pn(await this.app.vault.read(t)),s=this.rulesRunner.lintText(dr(r,t,this.momentLocale,this.settings,this.defaultAutoCorrectMisspellings));if(r!=s){if(await this.app.vault.modify(t,s),i){let o=E("logs.file-change-lint-message-start")+" "+this.lastActiveFile.path;this.settings.displayLintOnFileChangeNotice&&new ne.Notice(o),Dt(o)}this.fileLintFiles.add(t);return}await this.runCustomCommandsInSidebar(t)}async runLinterAllFiles(t){let i=0;if(await Promise.all(t.vault.getMarkdownFiles().map(async r=>{if(!this.shouldIgnoreFile(r))try{await this.runLinterFile(r)}catch(s){this.handleLintError(r,s,E("commands.lint-all-files.error-message")+" '{FILE_PATH}'"),i+=1}})),i===0)new ne.Notice(E("commands.lint-all-files.success-message"),_n);else{let r=i===1?E("commands.lint-all-files.errors-message-singular"):E("commands.lint-all-files.errors-message-plural").replace("{NUM}",i.toString());new ne.Notice(r,_n)}}async runLinterAllFilesInFolder(t){Dt(E("logs.folder-lint")+t.name);let i=0,r=0,s=this.getAllFilesInFolder(t);if(await Promise.all(s.map(async o=>{if(!this.shouldIgnoreFile(o)){try{await this.runLinterFile(o)}catch(a){this.handleLintError(o,a,E("commands.lint-all-files-in-folder.error-message")+" '{FILE_PATH}'"),i+=1}r++}})),i===0)new ne.Notice(E("commands.lint-all-files-in-folder.success-message").replace("{NUM}",r.toString()).replace("{FOLDER_NAME}",t.name),_n);else{let o=i===1?E("commands.lint-all-files-in-folder.message-singular").replace("{NUM}",r.toString()).replace("{FOLDER_NAME}",t.name):E("commands.lint-all-files-in-folder.message-plural").replace("{FILE_COUNT}",r.toString()).replace("{FOLDER_NAME}",t.name).replace("{ERROR_COUNT}",i.toString());new ne.Notice(o,_n)}}createFolderLintModal(t){let i=E("commands.lint-all-files-in-folder.start-message").replace("
`+E("disabled-conflicting-rule-notice").replace("{NAME_1}",E("rules.header-increment.start-at-h2.name")).replace("{NAME_2}",E("rules.file-name-heading.name"))),this.settings.ruleConfigs["paragraph-blank-lines"]&&this.settings.ruleConfigs["paragraph-blank-lines"].enabled&&this.settings.ruleConfigs["two-spaces-between-lines-with-content"]&&this.settings.ruleConfigs["two-spaces-between-lines-with-content"].enabled&&(this.settings.ruleConfigs["paragraph-blank-lines"].enabled=!1,t=!0,r&&(i+=`
`),r=!0,i+=`
`+E("disabled-conflicting-rule-notice").replace("{NAME_1}",E("rules.paragraph-blank-lines.name")).replace("{NAME_2}",E("rules.two-spaces-between-lines-with-content.name"))),r&&new ne.Notice(i,_n);for(let s of mn){let o=s.getDefaultOptions();if(!this.settings.ruleConfigs[s.alias]){this.settings.ruleConfigs[s.alias]=o,t=!0;continue}if(s.alias=="space-between-chinese-japanese-or-korean-and-english-or-numbers")"english-symbols-punctuation-before"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["english-symbols-punctuation-before"]=o["english-symbols-punctuation-before"],t=!0),"english-symbols-punctuation-after"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["english-symbols-punctuation-after"]=o["english-symbols-punctuation-after"],t=!0);else if(s.alias=="yaml-timestamp"){let a=s.getDefaultOptions();"force-retention-of-create-value"in this.settings.ruleConfigs[s.alias]&&("date-created-source-of-truth"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["force-retention-of-create-value"]?this.settings.ruleConfigs[s.alias]["date-created-source-of-truth"]="frontmatter":this.settings.ruleConfigs[s.alias]["date-created-source-of-truth"]=a["date-created-source-of-truth"]),delete this.settings.ruleConfigs[s.alias]["force-retention-of-create-value"],t=!0),"date-modified-source-of-truth"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["date-modified-source-of-truth"]=a["date-modified-source-of-truth"],t=!0)}for(let a of Object.keys(o))Object.hasOwn(this.settings.ruleConfigs[s.alias],a)||(this.settings.ruleConfigs[s.alias][a]=o[a],t=!0)}for(let s of this.settings.customRegexes)Object.hasOwn(s,"enabled")||(s.enabled=!0,t=!0);for(let s of this.settings.lintCommands)Object.hasOwn(s,"enabled")||(s.enabled=!0,t=!0);t&&await this.saveSettings()}createDebouncedFileUpdate(){let t=5e3;switch(this.settings.ruleConfigs["yaml-timestamp"]["update-on-file-contents-updated"]??"never"){case"after 10 seconds":t=1e4;break;case"after 15 seconds":t=15e3;break;case"after 30 seconds":t=3e4;break;case"after 1 minute":t=6e4;break}return(0,ne.debounce)(async(i,r)=>{if(!this.activeFileChangeDebouncer.has(i.path)){Et(E("logs.file-change-yaml-lint-warning"));return}let s=this.activeFileChangeDebouncer.get(i.path);s.isRunning=!0;let o=r.getValue(),a=await this.app.vault.cachedRead(i),l=o===a,c="";if(l){c=o;let u=c;if(c!=s.originalText){Dt(E("logs.file-change-yaml-lint-run"));try{u=this.rulesRunner.runYAMLTimestampByItself(dr(c,i,this.momentLocale,this.settings,null))}catch(d){this.handleLintError(i,d,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1);return}this.updateEditor(c,u,r)}else Dt(E("logs.file-change-yaml-lint-skipped"))}else c=a,c!=s.originalText?(Dt(E("logs.file-change-yaml-lint-run")),await this.app.vault.process(i,u=>{Dt(E("logs.file-change-yaml-lint-run"));try{return this.rulesRunner.runYAMLTimestampByItself(dr(c,i,this.momentLocale,this.settings,null))}catch(d){return this.handleLintError(i,d,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1),u}})):Dt(E("logs.file-change-yaml-lint-skipped"));this.activeFileChangeDebouncer.delete(i.path),s.isRunning=!1},t,!0)}updateEditor(t,i,r){let o=new rs.default.diff_match_patch().diff_main(t,i),a="";return o.forEach(l=>{let[c,u]=l;if(c==rs.default.DIFF_INSERT)r.cm.dispatch({changes:[{from:r.posToOffset(this.endOfDocument(a)),insert:u}],filter:!1}),a+=u;else if(c==rs.default.DIFF_DELETE){let d=this.endOfDocument(a),p=a;p+=u;let m=this.endOfDocument(p);r.cm.dispatch({changes:[{from:r.posToOffset(d),to:r.posToOffset(m),insert:""}],filter:!1})}else a+=u}),o}displayChangedMessage(t,i){if(this.settings.displayChanged){let r=uy`
${t} ${E("notice-text.characters-added")}
${i} ${E("notice-text.characters-removed")}
`;new ne.Notice(r)}}handleLintError(t,i,r,s=!0){let o=r.replace("{FILE_PATH}",t.path),a=E("logs.see-console");i instanceof Gr?s?new ne.Notice(`${o} ${i.message}.
${a}`,_n):new ne.Notice(`${i.message}.
${a}`,_n):new ne.Notice(`${E("logs.unknown-error")} ${a}`,_n),Ma(o,i)}async modifyPasteEvent(t,i){if(!i)return;let r=t.clipboardData.getData("text/plain");if(!r)return;let s=r.trim();if(Li.test(s)){Et(E("logs.paste-link-warning"));return}if(t.stopPropagation(),t.preventDefault(),!t.defaultPrevented)return;let o=this.app.vault.getConfig("autoConvertHtml"),a=t.clipboardData.getData("text/html"),l=a&&o?(0,ne.htmlToMarkdown)(a):r,c=i.listSelections();if(c.length===1){let u=c[0];l=this.rulesRunner.runPasteLint(this.getLineContent(i,u),i.getSelection()??"",dr(l,null,this.momentLocale,this.settings,null)),i.replaceSelection(l)}else this.handleMultiCursorPaste(i,c,l)}handleMultiCursorPaste(t,i,r){let s=this.convertContentIntoProperPasteContent(i,r),o=[];i.forEach((a,l)=>{r=this.rulesRunner.runPasteLint(this.getLineContent(t,a),t.getRange(a.anchor,a.head)??"",dr(s[l],null,this.momentLocale,this.settings,null)),o.push({text:r,from:a.anchor,to:a.head})}),t.transaction({changes:o})}convertContentIntoProperPasteContent(t,i){let r=i.split(`
`),s=[];if(r.length%t.length!==0)for(let o=0;o<t.length;o++)s.push(i);else{let o=r.length/t.length,a="";for(let l=0;l<r.length;l++)a+=r[l],(l+1===t.length||(l+1)%o===0)&&(s.push(a),a="")}return s}async pasteAsPlainText(t){let i=await navigator.clipboard.readText();if(!i){new ne.Notice(E("notice-text.empty-clipboard"),_n);return}t.replaceSelection(i)}setCustomCommandCallback(t){(0,qy.warn)(E("logs.custom-command-callback-warning")),this.customCommandsCallback=t}async runCustomCommandsInSidebar(t){if(!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands)return;let i=this.app.workspace.getRightLeaf(!1),r=this.getEditor();await this.customCommandsLock.acquire("command",async()=>{this.currentlyOpeningSidebar=!0,await i.openFile(t),this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands),this.customCommandsCallback&&await this.customCommandsCallback(t)}),i.detach(),r&&r.focus(),this.currentlyOpeningSidebar=!1}async runCustomCommands(t){!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands||(await this.customCommandsLock.acquire("command",async()=>{try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(i){this.handleLintError(t,i,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(t)}),this.updateFileDebouncerText(t,Pn(await this.app.vault.read(t))))}getEditor(){let t=this.app.workspace.getActiveViewOfType(ne.MarkdownView);return t?t.editor:null}getLineContent(t,i){return t.getLine(i.anchor.line)}async moveConfigValuesToKeyBasedFormat(){Ra("en");let t=!1;for(let i of mn){let r=E("rules."+i.alias+".name"),s=this.settings.ruleConfigs[r];if(s!=null){let o=E("rules."+i.alias+".description"),a={enabled:s[o]??!1};for(let l of i.options){if(l.configKey==="enabled")continue;let c=E("rules."+i.alias+"."+l.configKey+".name");a[l.configKey]=s[c]??l.defaultValue}this.settings.ruleConfigs[i.alias]=a,delete this.settings.ruleConfigs[r],t=!0}}return this.settings.settingsConvertedToConfigKeyValues=!0,await this.saveSettings(),Ra(window.localStorage.getItem("language")),t}getAllFilesInFolder(t){let i=[],r=[t];for(let s of r)for(let o of s.children)o instanceof ne.TFile&&this.isMarkdownFile(o)?i.push(o):o instanceof ne.TFolder&&r.push(o);return i}updatePasteOverrideStatus(){for(let t of Yi.get("Paste"))if(t.getOptions(this.settings)?.enabled){this.overridePaste=!0;return}this.overridePaste=!1}updateHasCustomCommandStatus(){for(let t of this.settings.lintCommands)if(t.id&&t.id.trim()!=""&&t.enabled){this.hasCustomCommands=!0;return}this.hasCustomCommands=!1}endOfDocument(t){let i=t.split(`
`);return{line:i.length-1,ch:i[i.length-1].length}}getFileFromPath(t){let i=this.app.vault.getAbstractFileByPath((0,ne.normalizePath)(t));return i instanceof ne.TFile?i:null}updateFileDebouncerText(t,i){this.activeFileChangeDebouncer.has(t.path)&&(this.activeFileChangeDebouncer.get(t.path).originalText=i)}async addFileToIgnoreList(t){this.settings.filesToIgnore.push({match:"^"+sn(t.path)+"$",flags:"",label:""}),await this.saveSettings()}async addFolderToIgnoreList(t){this.settings.foldersToIgnore.push(t.path),await this.saveSettings()}};
/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/
/* nosourcemap */