lolamarket-notes/notes/.obsidian/plugins/obsidian-linter/main.js

1987 lines
343 KiB
JavaScript
Raw Normal View History

2023-11-17 15:13:27 +01:00
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var Wc=Object.create;var or=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var Uc=Object.getOwnPropertyNames;var Gc=Object.getPrototypeOf,Qc=Object.prototype.hasOwnProperty;var Bi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),al=(e,t)=>{for(var n in t)or(e,n,{get:t[n],enumerable:!0})},ll=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uc(t))!Qc.call(e,i)&&i!==n&&or(e,i,{get:()=>t[i],enumerable:!(r=sl(t,i))||r.enumerable});return e};var En=(e,t,n)=>(n=e!=null?Wc(Gc(e)):{},ll(t||!e||!e.__esModule?or(n,"default",{value:e,enumerable:!0}):n,e)),Zc=e=>ll(or({},"__esModule",{value:!0}),e),B=(e,t,n,r)=>{for(var i=r>1?void 0:r?sl(t,n):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(t,n,i):s(i))||i);return r&&i&&or(t,n,i),i};var ul=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ze=(e,t,n)=>(ul(e,t,"read from private field"),n?n.call(e):t.get(e)),Ln=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},pl=(e,t,n,r)=>(ul(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var ms=Bi((v1,au)=>{au.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var gu=Bi((O1,hu)=>{"use strict";var Vi=Object.prototype.hasOwnProperty,du=Object.prototype.toString,lu=Object.defineProperty,uu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):du.call(t)==="[object Array]"},cu=function(t){if(!t||du.call(t)!=="[object Object]")return!1;var n=Vi.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Vi.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||Vi.call(t,i)},fu=function(t,n){lu&&n.name==="__proto__"?lu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},mu=function(t,n){if(n==="__proto__")if(Vi.call(t,n)){if(uu)return uu(t,n).value}else return;return t[n]};hu.exports=function e(){var t,n,r,i,o,s,a=arguments[0],l=1,u=arguments.length,p=!1;for(typeof a=="boolean"&&(p=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=mu(a,n),i=mu(t,n),a!==i&&(p&&i&&(cu(i)||(o=pu(i)))?(o?(o=!1,s=r&&pu(r)?r:[]):s=r&&cu(r)?r:{},fu(a,{name:n,newValue:e(p,s,i)})):typeof i!="undefined"&&fu(a,{name:n,newValue:i}));return a}});var gc=Bi((tA,qn)=>{var M=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},oe=-1,ae=1,U=0;M.Diff=function(e,t){return[e,t]};M.prototype.diff_main=function(e,t,n,r){typeof r=="undefined"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);var i=r;if(e==null||t==null)throw new Error("Null input. (diff_main)");if(e==t)return e?[new M.Diff(U,e)]:[];typeof n=="undefined"&&(n=!0);var o=n,s=this.diff_commonPrefix(e,t),a=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=this.diff_commonSuffix(e,t);var l=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var u=this.diff_compute_(e,t,o,i);return a&&u.unshift(new M.Diff(U,a)),l&&u.push(new M.Diff(U,l)),this.diff_cleanupMerge(u),u};M.prototype.diff_compute_=function(e,t,n,r){var i;if(!e)return[new M.Diff(ae,t)];if(!t)return[new M.Diff(oe,e)];var o=e.length>t.length?e:t,s=e.length>t.length?t:e,a=o.indexOf(s);if(a!=-1)return i=[new M.Diff(ae,o.substring(0,a)),new M.Diff(U,s),new M.Diff(ae,o.substring(a+s.length))],e.length>t.length&&(i[0][0]=i[2][0]=oe),i;if(s.length==1)return[new M.Diff(oe,e),new M.Diff(ae,t)];var l=this.diff_halfMatch_(e,t);if(l){var u=l[0],p=l[1],c=l[2],f=l[3],m=l[4],d=this.diff_main(u,c,n,r),h=this.diff_main(p,f,n,r);return d.concat([new M.Diff(U,m)],h)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)};M.prototype.diff_lineMode_=function(e,t,n){var r=this.diff_linesToChars_(e,t);e=r.chars1,t=r.char
`,p),c==-1&&(c=l.length-1);var m=l.substring(p,c+1);(r.hasOwnProperty?r.hasOwnProperty(m):r[m]!==void 0)?u+=String.fromCharCode(r[m]):(f==o&&(m=l.substring(p),c=l.length),u+=String.fromCharCode(f),r[m]=f,n[f++]=m),p=c+1}return u}var o=4e4,s=i(e);o=65535;var a=i(t);return{chars1:s,chars2:a,lineArray:n}};M.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}};M.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i};M.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i};M.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,s=1;;){var a=e.substring(i-s),l=t.indexOf(a);if(l==-1)return o;s+=l,(l==0||e.substring(i-s)==t.substring(0,s))&&(o=s,s++)}};M.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function o(d,h,g){for(var y=d.substring(g,g+Math.floor(d.length/4)),T=-1,O="",C,I,k,_;(T=h.indexOf(y,T+1))!=-1;){var F=i.diff_commonPrefix(d.substring(g),h.substring(T)),$=i.diff_commonSuffix(d.substring(0,g),h.substring(0,T));O.length<$+F&&(O=h.substring(T-$,T)+h.substring(T,T+F),C=d.substring(0,g-$),I=d.substring(g+F),k=h.substring(0,T-$),_=h.substring(T+F))}return O.length*2>=d.length?[C,I,k,_,O]:null}var s=o(n,r,Math.ceil(n.length/4)),a=o(n,r,Math.ceil(n.length/2)),l;if(!s&&!a)return null;a?s?l=s[4].length>a[4].length?s:a:l=a:l=s;var u,p,c,f;e.length>t.length?(u=l[0],p=l[1],c=l[2],f=l[3]):(c=l[0],f=l[1],u=l[2],p=l[3]);var m=l[4];return[u,p,c,f,m]};M.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],r=0,i=null,o=0,s=0,a=0,l=0,u=0;o<e.length;)e[o][0]==U?(n[r++]=o,s=l,a=u,l=0,u=0,i=e[o][1]):(e[o][0]==ae?l+=e[o][1].length:u+=e[o][1].length,i&&i.length<=Math.max(s,a)&&i.length<=Math.max(l,u)&&(e.splice(n[r-1],0,new M.Diff(oe,i)),e[n[r-1]+1][0]=ae,r--,r--,o=r>0?n[r-1]:-1,s=0,a=0,l=0,u=0,i=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o<e.length;){if(e[o-1][0]==oe&&e[o][0]==ae){var p=e[o-1][1],c=e[o][1],f=this.diff_commonOverlap_(p,c),m=this.diff_commonOverlap_(c,p);f>=m?(f>=p.length/2||f>=c.length/2)&&(e.splice(o,0,new M.Diff(U,c.substring(0,f))),e[o-1][1]=p.substring(0,p.length-f),e[o+1][1]=c.substring(f),o++):(m>=p.length/2||m>=c.length/2)&&(e.splice(o,0,new M.Diff(U,p.substring(0,m))),e[o-1][0]=ae,e[o-1][1]=c.substring(0,c.length-m),e[o+1][0]=oe,e[o+1][1]=p.substring(m),o++),o++}o++}};M.prototype.diff_cleanupSemanticLossless=function(e){function t(m,d){if(!m||!d)return 6;var h=m.charAt(m.length-1),g=d.charAt(0),y=h.match(M.nonAlphaNumericRegex_),T=g.match(M.nonAlphaNumericRegex_),O=y&&h.match(M.whitespaceRegex_),C=T&&g.match(M.whitespaceRegex_),I=O&&h.match(M.linebreakRegex_),k=C&&g.match(M.linebreakRegex_),_=I&&m.match(M.blanklineEndRegex_),F=k&&d.match(M.blanklineStartRegex_);return _||F?5:I||k?4:y&&!O&&C?3:O||C?2:y||T?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==U&&e[n+1][0]==U){var r=e[n-1][1],i=e[n][1],o=e[n+1][1],s=this.diff_commonSuffix(r,i);if(s){var a=i.substring(i.length-s);r=r.substring(0,r.length-s),i=a+i.substring(0,i.length-s),o=a+o}for(var l=r,u=i,p=o,c=t(r,i)+t(i,o);i.charAt(0)===o.charAt(0);){r+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);var f=t(r,i)+t(i,o);f>=c&&(c=f,l=r,u=i,p=o)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=u,p?e[n+1][1]=p:(e.splice(n+1,1),n--))}n++}};M.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;M.whitespaceRegex_=/\s/;M.linebreakRegex_=/[\r\n]/;M.blanklineEnd
`),r=0,i=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;r<n.length;){var o=n[r].match(i);if(!o)throw new Error("Invalid patch string: "+n[r]);var s=new M.patch_obj;for(t.push(s),s.start1=parseInt(o[1],10),o[2]===""?(s.start1--,s.length1=1):o[2]=="0"?s.length1=0:(s.start1--,s.length1=parseInt(o[2],10)),s.start2=parseInt(o[3],10),o[4]===""?(s.start2--,s.length2=1):o[4]=="0"?s.length2=0:(s.start2--,s.length2=parseInt(o[4],10)),r++;r<n.length;){var a=n[r].charAt(0);try{var l=decodeURI(n[r].substring(1))}catch(u){throw new Error("Illegal escape in patch_fromText: "+l)}if(a=="-")s.diffs.push(new M.Diff(oe,l));else if(a=="+")s.diffs.push(new M.Diff(ae,l));else if(a==" ")s.diffs.push(new M.Diff(U,l));else{if(a=="@")break;if(a!=="")throw new Error('Invalid patch mode "'+a+'" in: '+l)}r++}}return t};M.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0};M.patch_obj.prototype.toString=function(){var e,t;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?t=this.start2+",0":this.length2==1?t=this.start2+1:t=this.start2+1+","+this.length2;for(var n=["@@ -"+e+" +"+t+` @@
`],r,i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case ae:r="+";break;case oe:r="-";break;case U:r=" ";break}n[i+1]=r+encodeURI(this.diffs[i][1])+`
`}return n.join("").replace(/%20/g," ")};qn.exports=M;qn.exports.diff_match_patch=M;qn.exports.DIFF_DELETE=oe;qn.exports.DIFF_INSERT=ae;qn.exports.DIFF_EQUAL=U});var wa=Bi((yc,Oo)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define(t):typeof Oo=="object"&&Oo.exports?Oo.exports=t():e.log=t()})(yc,function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(d,h){var g=d[h];if(typeof g.bind=="function")return g.bind(d);try{return Function.prototype.bind.call(g,d)}catch(y){return function(){return Function.prototype.apply.apply(g,[d,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(d){return d==="debug"&&(d="log"),typeof console===t?!1:d==="trace"&&n?o:console[d]!==void 0?i(console,d):console.log!==void 0?i(console,"log"):e}function a(d,h){for(var g=0;g<r.length;g++){var y=r[g];this[y]=g<d?e:this.methodFactory(y,d,h)}this.log=this.debug}function l(d,h,g){return function(){typeof console!==t&&(a.call(this,h,g),this[d].apply(this,arguments))}}function u(d,h,g){return s(d)||l.apply(this,arguments)}function p(d,h,g){var y=this,T;h=h==null?"WARN":h;var O="loglevel";typeof d=="string"?O+=":"+d:typeof d=="symbol"&&(O=void 0);function C(F){var $=(r[F]||"silent").toUpperCase();if(!(typeof window===t||!O)){try{window.localStorage[O]=$;return}catch(j){}try{window.document.cookie=encodeURIComponent(O)+"="+$+";"}catch(j){}}}function I(){var F;if(!(typeof window===t||!O)){try{F=window.localStorage[O]}catch(N){}if(typeof F===t)try{var $=window.document.cookie,j=$.indexOf(encodeURIComponent(O)+"=");j!==-1&&(F=/^([^;]+)/.exec($.slice(j))[1])}catch(N){}return y.levels[F]===void 0&&(F=void 0),F}}function k(){if(!(typeof window===t||!O)){try{window.localStorage.removeItem(O);return}catch(F){}try{window.document.cookie=encodeURIComponent(O)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(F){}}}y.name=d,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=g||u,y.getLevel=function(){return T},y.setLevel=function(F,$){if(typeof F=="string"&&y.levels[F.toUpperCase()]!==void 0&&(F=y.levels[F.toUpperCase()]),typeof F=="number"&&F>=0&&F<=y.levels.SILENT){if(T=F,$!==!1&&C(F),a.call(y,F,d),typeof console===t&&F<y.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+F},y.setDefaultLevel=function(F){h=F,I()||y.setLevel(F,!1)},y.resetLevel=function(){y.setLevel(h,!1),k()},y.enableAll=function(F){y.setLevel(y.levels.TRACE,F)},y.disableAll=function(F){y.setLevel(y.levels.SILENT,F)};var _=I();_==null&&(_=h),y.setLevel(_,!1)}var c=new p,f={};c.getLogger=function(h){if(typeof h!="symbol"&&typeof h!="string"||h==="")throw new TypeError("You must supply a name when creating a logger.");var g=f[h];return g||(g=f[h]=new p(h,c.getLevel(),c.methodFactory)),g};var m=typeof window!==t?window.log:void 0;return c.noConflict=function(){return typeof window!==t&&window.log===c&&(window.log=m),c},c.getLoggers=function(){return f},c.default=c,c})});var r1={};al(r1,{default:()=>qo});module.exports=Zc(r1);var Z=require("obsidian");function Al(e){return typeof e=="undefined"||e===null}function Xc(e){return typeof e=="object"&&e!==null}function Jc(e){return Array.isArray(e)?e:Al(e)?[]:[e]}function ef(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function tf(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function nf(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var rf=Al,of=Xc,sf=Jc,af=tf,lf=nf,uf=ef,we={isNothing:rf,isObject:of,toArray:sf,repeat:af,isNegativeZero:lf,extend:uf};function Cl(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
`+e.mark.snippet),r+" "+n):r}function ar(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Cl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ar.prototype=Object.create(Error.prototype);ar.prototype.constructor=ar;ar.prototype.toString=function(t){return this.name+": "+Cl(this,t)};var He=ar;function Go(e,t,n,r,i){var o="",s="",a=Math.floor(i/2)-1;return r-t>a&&(o=" ... ",t=r-a+o.length),n-r>a&&(s=" ...",n=r+a-s.length),{str:o+e.slice(t,n).replace(/\t/g,"\u2192")+s,pos:r-t+o.length}}function Qo(e,t){return we.repeat(" ",t-e.length)+e}function pf(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],o,s=-1;o=n.exec(e.buffer);)i.push(o.index),r.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var a="",l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,c=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)u=Go(e.buffer,r[s-l],i[s-l],e.position-(r[s]-r[s-l]),c),a=we.repeat(" ",t.indent)+Qo((e.line-l+1).toString(),p)+" | "+u.str+`
`+a;for(u=Go(e.buffer,r[s],i[s],e.position,c),a+=we.repeat(" ",t.indent)+Qo((e.line+1).toString(),p)+" | "+u.str+`
`,a+=we.repeat("-",t.indent+p+3+u.pos)+`^
`,l=1;l<=t.linesAfter&&!(s+l>=i.length);l++)u=Go(e.buffer,r[s+l],i[s+l],e.position-(r[s]-r[s+l]),c),a+=we.repeat(" ",t.indent)+Qo((e.line+l+1).toString(),p)+" | "+u.str+`
`;return a.replace(/\n$/,"")}var cf=pf,ff=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],mf=["scalar","sequence","mapping"];function df(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function hf(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(ff.indexOf(n)===-1)throw new He('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=df(t.styleAliases||null),mf.indexOf(this.kind)===-1)throw new He('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ie=hf;function cl(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(o,s){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=s)}),n[i]=r}),n}function gf(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function Xo(e){return this.extend(e)}Xo.prototype.extend=function(t){var n=[],r=[];if(t instanceof Ie)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new He("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof Ie))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new He("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new He("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof Ie))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Xo.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=cl(i,"implicit"),i.compiledExplicit=cl(i,"explicit"),i.compiledTypeMap=gf(i.compiledImplicit,i.compiledExplicit),i};var yf=Xo,bf=new Ie("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),wf=new Ie("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),xf=new Ie("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),kf=new yf({explicit:[bf,wf,xf]});function vf(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Of(){return null}function Tf(e){return e===null}var Sf=new Ie("tag:yaml.org,2002:null",{kind:"scalar",resolve:vf,construct:Of,predicate:Tf,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Af(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Cf(e){return e==="true"||e==="True"||e==="TRUE"}function Ef(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Lf=new Ie("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Af,construct:Cf,predicate:Ef,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 Xf(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=rs;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function Jf(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=rs,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),new Uint8Array(a)}function em(e){var t="",n=0,r,i,o=e.length,s=rs;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function tm(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var nm=new Ie("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Xf,construct:Jf,predicate:tm,represent:em}),rm=Object.prototype.hasOwnProperty,im=Object.prototype.toString;function om(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,im.call(i)!=="[object Object]")return!1;for(o in i)if(rm.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function sm(e){return e!==null?e:[]}var am=new Ie("tag:yaml.org,2002:omap",{kind:"sequence",resolve:om,construct:sm}),lm=Object.prototype.toString;function um(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],lm.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function pm(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var cm=new Ie("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:um,construct:pm}),fm=Object.prototype.hasOwnProperty;function mm(e){if(e===null)return!0;var t,n=e;for(t in n)if(fm.call(n,t)&&n[t]!==null)return!1;return!0}function dm(e){return e!==null?e:{}}var hm=new Ie("tag:yaml.org,2002:set",{kind:"mapping",resolve:mm,construct:dm}),_l=Kf.extend({implicit:[Gf,Zf],explicit:[nm,am,cm,hm]}),Dt=Object.prototype.hasOwnProperty,Mi=1,Il=2,Fl=3,Ri=4,Zo=1,gm=2,fl=3,ym=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bm=/[\x85\u2028\u2029]/,wm=/[,\[\]\{\}]/,Bl=/^(?:!|!!|![a-z\-]+!)$/i,Ml=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ml(e){return Object.prototype.toString.call(e)}function gt(e){return e===10||e===13}function en(e){return e===9||e===32}function Qe(e){return e===9||e===32||e===10||e===13}function In(e){return e===44||e===91||e===93||e===123||e===125}function xm(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function km(e){return e===120?2:e===117?4:e===85?8:0}function vm(e){return 48<=e&&e<=57?e-48:-1}function dl(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 Om(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Rl=new Array(256),Dl=new Array(256);for(Jt=0;Jt<256;Jt++)Rl[Jt]=dl(Jt)?1:0,Dl[Jt]=dl(Jt);var Jt;function Tm(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||_l,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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 Pl(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=cf(n),new He(t,n)}function Y(e,t){throw Pl(e,t)}function Di(e,t){e.onWarning&&e.onWarning.call(null,Pl(e,t))}var hl={YAML:function(t,n,r){var i,o,s;t.version!==null&&Y(t,"duplication of %YAML directive"),r.length!==1&&Y(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Y(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Y(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Di(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&Y(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Bl.test(i)||Y(t,"ill-formed tag handle (first argument) of the TAG directive"),Dt.call(t.tagMap,i)&&Y(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ml.test(o)||Y(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(s){Y(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function Rt(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||Y(e,"expected valid JSON character");else ym.test(a)&&Y(e,"the stream contains non-printable characters");e.result+=a}}function gl(e,t,n,r){var i,o,s,a;for(we.isObject(n)||Y(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Dt.call(t,o)||(t[o]=n[o],r[o]=!0)}function Fn(e,t,n,r,i,o,s,a,l){var u,p;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,p=i.length;u<p;u+=1)Array.isArray(i[u])&&Y(e,"nested arrays are not supported inside keys"),typeof i=="object"&&ml(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&ml(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(u=0,p=o.length;u<p;u+=1)gl(e,t,o[u],n);else gl(e,t,o,n);else!e.json&&!Dt.call(n,i)&&Dt.call(t,i)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,Y(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function is(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Y(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ye(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;en(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(gt(i))for(is(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Di(e,"deficient indentation"),r}function Ni(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Qe(n)))}function os(e,t){t===1?e.result+=" ":t>1&&(e.result+=we.
`,t-1))}function Sm(e,t,n){var r,i,o,s,a,l,u,p,c=e.kind,f=e.result,m;if(m=e.input.charCodeAt(e.position),Qe(m)||In(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)&&(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&In(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&In(i))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),Qe(r))break}else{if(e.position===e.lineStart&&Ni(e)||n&&In(m))break;if(gt(m))if(l=e.line,u=e.lineStart,p=e.lineIndent,ye(e,!1,-1),e.lineIndent>=t){a=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=p;break}}a&&(Rt(e,o,s,!1),os(e,e.line-l),o=s=e.position,a=!1),en(m)||(s=e.position+1),m=e.input.charCodeAt(++e.position)}return Rt(e,o,s,!1),e.result?!0:(e.kind=c,e.result=f,!1)}function Am(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Rt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else gt(n)?(Rt(e,r,i,!0),os(e,ye(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ni(e)?Y(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Y(e,"unexpected end of the stream within a single quoted scalar")}function Cm(e,t){var n,r,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Rt(e,n,e.position,!0),e.position++,!0;if(a===92){if(Rt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),gt(a))ye(e,!1,t);else if(a<256&&Rl[a])e.result+=Dl[a],e.position++;else if((s=km(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=xm(a))>=0?o=(o<<4)+s:Y(e,"expected hexadecimal character");e.result+=Om(o),e.position++}else Y(e,"unknown escape sequence");n=r=e.position}else gt(a)?(Rt(e,n,r,!0),os(e,ye(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ni(e)?Y(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Y(e,"unexpected end of the stream within a double quoted scalar")}function Em(e,t){var n=!0,r,i,o,s=e.tag,a,l=e.anchor,u,p,c,f,m,d=Object.create(null),h,g,y,T;if(T=e.input.charCodeAt(e.position),T===91)p=93,m=!1,a=[];else if(T===123)p=125,m=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),T=e.input.charCodeAt(++e.position);T!==0;){if(ye(e,!0,t),T=e.input.charCodeAt(e.position),T===p)return e.position++,e.tag=s,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=a,!0;n?T===44&&Y(e,"expected the node content, but found ','"):Y(e,"missed comma between flow collection entries"),g=h=y=null,c=f=!1,T===63&&(u=e.input.charCodeAt(e.position+1),Qe(u)&&(c=f=!0,e.position++,ye(e,!0,t))),r=e.line,i=e.lineStart,o=e.position,Bn(e,t,Mi,!1,!0),g=e.tag,h=e.result,ye(e,!0,t),T=e.input.charCodeAt(e.position),(f||e.line===r)&&T===58&&(c=!0,T=e.input.charCodeAt(++e.position),ye(e,!0,t),Bn(e,t,Mi,!1,!0),y=e.result),m?Fn(e,a,d,g,h,y,r,i,o):c?a.push(Fn(e,null,d,g,h,y,r,i,o)):a.push(h),ye(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(n=!0,T=e.input.charCodeAt(++e.position)):n=!1}Y(e,"unexpected end of the stream within a flow collection")}function Lm(e,t){var n,r,i=Zo,o=!1,s=!1,a=t,l=0,u=!1,p,c;if(c=e.input.charCodeAt(e.position),c===124)r=!1;else if(c===62)r=!0;else return!1;for(e.kind="scalar",e.result="";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)Zo===i?i=c===43?fl:gm:Y(e,"repeat of a chomping mode identifier");else if((p=vm(c))>=0)p===0?Y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Y(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(en(c)){do c=e.input.charCodeAt(++e.position);while(en(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!gt(c)&&c!==0)}for(;c!==0;){for(is(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!s||e.lineIn
`,o?1+l:l):i===Zo&&o&&(e.result+=`
`);break}for(r?en(c)?(u=!0,e.result+=we.repeat(`
`,o?1+l:l)):u?(u=!1,e.result+=we.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=we.repeat(`
`,l):e.result+=we.repeat(`
`,o?1+l:l),o=!0,s=!0,l=0,n=e.position;!gt(c)&&c!==0;)c=e.input.charCodeAt(++e.position);Rt(e,n,e.position,!1)}return!0}function yl(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Y(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Qe(s))));){if(a=!0,e.position++,ye(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Bn(e,t,Fl,!1,!0),o.push(e.result),ye(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)Y(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function _m(e,t,n){var r,i,o,s,a,l,u=e.tag,p=e.anchor,c={},f=Object.create(null),m=null,d=null,h=null,g=!1,y=!1,T;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(e.position);T!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Y(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,(T===63||T===58)&&Qe(r))T===63?(g&&(Fn(e,c,f,m,d,null,s,a,l),m=d=h=null),y=!0,g=!0,i=!0):g?(g=!1,i=!0):Y(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,T=r;else{if(s=e.line,a=e.lineStart,l=e.position,!Bn(e,n,Il,!1,!0))break;if(e.line===o){for(T=e.input.charCodeAt(e.position);en(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),Qe(T)||Y(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Fn(e,c,f,m,d,null,s,a,l),m=d=h=null),y=!0,g=!1,i=!1,m=e.tag,d=e.result;else if(y)Y(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(y)Y(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===o||e.lineIndent>t)&&(g&&(s=e.line,a=e.lineStart,l=e.position),Bn(e,t,Ri,!0,i)&&(g?d=e.result:h=e.result),g||(Fn(e,c,f,m,d,h,s,a,l),m=d=h=null),ye(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&T!==0)Y(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&Fn(e,c,f,m,d,null,s,a,l),y&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=c),y}function Im(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Y(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Y(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Qe(s);)s===33&&(r?Y(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Bl.test(i)||Y(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),wm.test(o)&&Y(e,"tag suffix cannot contain flow indicator characters")}o&&!Ml.test(o)&&Y(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch(a){Y(e,"tag name is malformed: "+o)}return n?e.tag=o:Dt.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Y(e,'undeclared tag handle "'+i+'"'),!0}function Fm(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Y(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Qe(n)&&!In(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Y(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Bm(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Tm(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Y(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Mm(n);return n.documents}function Rm(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=$l(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Dm(e,t){var n=$l(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new He("expected a single document in the stream, but found more")}}var Pm=Rm,$m=Dm,Nl={loadAll:Pm,load:$m},zl=Object.prototype.toString,Hl=Object.prototype.hasOwnProperty,ss=65279,Nm=9,lr=10,zm=13,Hm=32,Ym=33,jm=34,Jo=35,qm=37,Km=38,Vm=39,Wm=42,Yl=44,Um=45,Pi=58,Gm=61,Qm=62,Zm=63,Xm=64,jl=91,ql=93,Jm=96,Kl=123,ed=124,Vl=125,Fe={};Fe[0]="\\0";Fe[7]="\\a";Fe[8]="\\b";Fe[9]="\\t";Fe[10]="\\n";Fe[11]="\\v";Fe[12]="\\f";Fe[13]="\\r";Fe[27]="\\e";Fe[34]='\\"';Fe[92]="\\\\";Fe[133]="\\N";Fe[160]="\\_";Fe[8232]="\\L";Fe[8233]="\\P";var td=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],nd=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function rd(e,t){var n,r,i,o,s,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Hl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function id(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new He("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+we.repeat("0",r-t.length)+t}var od=1,ur=2;function sd(e){this.schema=e.schema||_l,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=we.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=rd(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==='"'?ur:od,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 bl(e,t){for(var n=we.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
`&&(o+=n),o+=s;return o}function es(e,t){return`
`+we.repeat(" ",e.indent*t)}function ad(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function $i(e){return e===Hm||e===Nm}function pr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ss||65536<=e&&e<=1114111}function wl(e){return pr(e)&&e!==ss&&e!==zm&&e!==lr}function xl(e,t,n){var r=wl(e),i=r&&!$i(e);return(n?r:r&&e!==Yl&&e!==jl&&e!==ql&&e!==Kl&&e!==Vl)&&e!==Jo&&!(t===Pi&&!i)||wl(t)&&!$i(t)&&e===Jo||t===Pi&&i}function ld(e){return pr(e)&&e!==ss&&!$i(e)&&e!==Um&&e!==Zm&&e!==Pi&&e!==Yl&&e!==jl&&e!==ql&&e!==Kl&&e!==Vl&&e!==Jo&&e!==Km&&e!==Wm&&e!==Ym&&e!==ed&&e!==Gm&&e!==Qm&&e!==Vm&&e!==jm&&e!==qm&&e!==Xm&&e!==Jm}function ud(e){return!$i(e)&&e!==Pi}function sr(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Wl(e){var t=/^\n* /;return t.test(e)}var Ul=1,ts=2,Gl=3,Ql=4,_n=5;function pd(e,t,n,r,i,o,s,a){var l,u=0,p=null,c=!1,f=!1,m=r!==-1,d=-1,h=ld(sr(e,0))&&ud(sr(e,e.length-1));if(t||s)for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=sr(e,l),!pr(u))return _n;h=h&&xl(u,p,a),p=u}else{for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=sr(e,l),u===lr)c=!0,m&&(f=f||l-d-1>r&&e[d+1]!==" ",d=l);else if(!pr(u))return _n;h=h&&xl(u,p,a),p=u}f=f||m&&l-d-1>r&&e[d+1]!==" "}return!c&&!f?h&&!s&&!i(e)?Ul:o===ur?_n:ts:n>9&&Wl(e)?_n:s?o===ur?_n:ts:f?Ql:Gl}function cd(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===ur?'""':"''";if(!e.noCompatMode&&(td.indexOf(t)!==-1||nd.test(t)))return e.quotingType===ur?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),a=r||e.flowLevel>-1&&n>=e.flowLevel;function l(u){return ad(e,u)}switch(pd(t,a,e.indent,s,l,e.quotingType,e.forceQuotes&&!r,i)){case Ul:return t;case ts:return"'"+t.replace(/'/g,"''")+"'";case Gl:return"|"+kl(t,e.indent)+vl(bl(t,o));case Ql:return">"+kl(t,e.indent)+vl(bl(fd(t,s),o));case _n:return'"'+md(t)+'"';default:throw new He("impossible error: invalid scalar style")}}()}function kl(e,t){var n=Wl(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function vl(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function fd(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Ol(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",r+=a+(!i&&!o&&l!==""?`
`:"")+Ol(l,t),i=o}return r}function Ol(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,l+=`
`+e.slice(i,o),i=o+1),s=a;return l+=`
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function md(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=sr(e,i),r=Fe[n],!r&&pr(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||id(n);return t}function dd(e,t,n){var r="",i=e.tag,o,s,a;for(o=0,s=n.length;o<s;o+=1)a=n[o],e.replacer&&(a=e.replacer.call(n,String(o),a)),(St(e,t,a,!1,!1)||typeof a=="undefined"&&St(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function Tl(e,t,n,r){var i="",o=e.tag,s,a,l;for(s=0,a=n.length;s<a;s+=1)l=n[s],e.replacer&&(l=e.replacer.call(n,String(s),l)),(St(e,t+1,l,!0,!0,!1,!0)||typeof l=="undefined"&&St(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=es(e,t)),e.dump&&lr===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function hd(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,l,u,p;for(s=0,a=o.length;s<a;s+=1)p="",r!==""&&(p+=", "),e.condenseFlow&&(p+='"'),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),St(e,t,l,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),St(e,t,u,!1,!1)&&(p+=e.dump,r+=p));e.tag=i,e.dump="{"+r+"}"}function gd(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,l,u,p,c,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new He("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!r||i!=="")&&(f+=es(e,t)),u=s[a],p=n[u],e.replacer&&(p=e.replacer.call(n,u,p)),St(e,t+1,u,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&lr===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,c&&(f+=es(e,t)),St(e,t+1,p,!0,c)&&(e.dump&&lr===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function Sl(e,t,n){var r,i,o,s,a,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(n?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,zl.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Hl.call(a.represent,l))r=a.represent[l](t,l);else throw new He("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function St(e,t,n,r,i,o,s){e.tag=null,e.dump=n,Sl(e,n,!1)||Sl(e,n,!0);var a=zl.call(e.dump),l=r,u;r&&(r=e.flowLevel<0||e.flowLevel>t);var p=a==="[object Object]"||a==="[object Array]",c,f;if(p&&(c=e.duplicates.indexOf(n),f=c!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(p&&f&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),a==="[object Object]")r&&Object.keys(e.dump).length!==0?(gd(e,t,e.dump,i),f&&(e.dump="&ref_"+c+e.dump)):(hd(e,t,e.dump),f&&(e.dump="&ref_"+c+" "+e.dump));else if(a==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Tl(e,t-1,e.dump,i):Tl(e,t,e.dump,i),f&&(e.dump="&ref_"+c+e.dump)):(dd(e,t,e.dump),f&&(e.dump="&ref_"+c+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&cd(e,e.dump,t,o,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new He("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function yd(e,t){var n=[],r=[],i,o;for(ns(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function ns(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)ns(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)ns(e[r[i]],t,n)}function bd(e,t){t=t||{};var n=new sd(t);n.noRefs||yd(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),St(n,0,r,!0,!0)?n.dump+`
`:""}var wd=bd,xd={dump:wd};function as(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Zl=Nl.load,o1=Nl.loadAll,Xl=xd.dump,Jl=He;var s1=as("safeLoad","load"),a1=as("safeLoadAll","loadAll"),l1=as("safeDump","dump");var Mn=/^(\s*)(#+)(\s+)(.*)$/,eu=`^XXX\\.*?
(?:((?:.|
)*?)
)?XXX(?=\\s|$)$`,ve=/^---\n((?:(((?!---)(?:.|\n)*?)\n)?))---(?=\n|$)/,kd=eu.replaceAll("X","`"),vd=eu.replaceAll("X","~"),Od=`^(( |( {4})).*
)+`,p1=new RegExp(`${kd}|${vd}|${Od}`,"gm"),ls=/(!?)(\[{2}[^[\n\]]*\]{2})/g,cr=/^!?\[.*\](.*)$/,fr=/(?:\s|^)#[^\s#]{1,}/g,tu=/^%%\n[^%]*\n%%/gm,us=/[,\s]+/;function Be(e){return e.replace(/\$/g,"$$$$")}function nu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ru(e){let t=e.match(ls);if(t){for(let n of t)if(n.includes("|")){let r=n.indexOf("|"),i=n.substring(0,r+1)+n.substring(r+1,n.length-2).trim()+"]]";e=e.replace(n,i)}}return e}var Pt="tags",Xe="aliases",mr="linter-yaml-title-alias";function yt(e){return e.match(ve)===null&&(e=`---
---
`+e),e}function Me(e,t){if(!e.match(ve))return e;let n=e.match(ve)[0],r=t(n);return e=e.replace(n,Be(r)),e}function zi(e){return Xl(e,{lineWidth:-1}).slice(0,-1)}function cs(e){return new RegExp(`${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`)}function Oe(e,t,n){let r=`${t}:${n}
`,i=!1,o=e.replace(cs(t),()=>(i=!0,r));return i||(o=`${e}${r}`),o}function Te(e,t){let n=e.match(cs(t));return n==null?null:n[1]}function tn(e,t){return e.replace(cs(t),"")}function tt(e){if(e==null)return null;let t=Zl(e.replace(/\n(\t)+/g,`
`));return t==null?{}:t}function Je(e,t){switch(typeof e=="string"&&(e=[e]),t){case"single-line":return e==null||e.length===0?" []":" "+ps(e);case"multi-line":return e==null||e.length===0?`
- `:`
- `+e.join(`
- `);case"single string to single-line":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+ps(e);case"single string to multi-line":return e==null||e.length===0?" ":e.length===1?" "+e[0]:`
- `+e.join(`
- `);case"single string space delimited":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+e.join(" ");case"single string comma delimited":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+e.join(", ");case"single-line space delimited":return e==null||e.length===0?" []":e.length===1?" "+e[0]:" "+ps(e).replaceAll(", "," ")}}function ps(e){return e==null||e.length===0?"[]":"["+e.join(", ")+"]"}function bt(e){if(e==null||e.length===0)return null;if(e=e.trimEnd(),e.startsWith("[")){if(e=e.substring(1),e.endsWith("]")&&(e=e.substring(0,e.length-1)),e.length===0)return null;let t=e.split(", ");return t=t.length>1?t:t[0].split(","),t.filter(n=>n!="")}if(e.includes(`
`)){let t=e.split(/[ \t]*\n[ \t]*-[ \t]*/);return t.splice(0,1),t=t.filter(n=>n!=""),t==null||t.length===0?null:t}return e}function Hi(e){return typeof e=="string"?e.includes(",")?e.split(", "):e.split(" "):e}function Yi(e){return typeof e=="string"?e.split(", "):e}var jn=require("obsidian");var dr=function(e){if(e==null)return Cd;if(typeof e=="string")return Ad(e);if(typeof e=="object")return Array.isArray(e)?Td(e):Sd(e);if(typeof e=="function")return ji(e);throw new Error("Expected function, string, or object as test")};function Td(e){let t=[],n=-1;for(;++n<e.length;)t[n]=dr(e[n]);return ji(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function Sd(e){return ji(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Ad(e){return ji(t);function t(n){return n&&n.type===e}}function ji(e){return t;function t(...n){return Boolean(e.call(this,...n))}}function Cd(){return!0}var iu=!0,ou="skip",hr=!1,qi=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);let i=dr(t),o=r?-1:1;s(e,null,[])();function s(a,l,u){let p=typeof a=="object"&&a!==null?a:{},c;return typeof p.type=="string"&&(c=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0,Object.defineProperty(f,"name",{value:"node ("+(p.type+(c?"<"+c+">":""))+")"})),f;function f(){let m=[],d,h,g;if((!t||i(a,l,u[u.length-1]||null))&&(m=Ed(n(a,u)),m[0]===hr))return m;if(a.children&&m[0]!==ou)for(h=(r?a.children.length:-1)+o,g=u.concat(a);h>-1&&h<a.children.length;){if(d=s(a.children[h],h,g)(),d[0]===hr)return d;h=typeof d[1]=="number"?d[1]:h+o}return m}}};function Ed(e){return Array.isArray(e)?e:typeof e=="number"?[iu,e]:[e]}var Ki=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),qi(e,t,i,r);function i(o,s){let a=s[s.length-1];return n(o,a?a.children.indexOf(o):null,a)}};function nn(e,t,n){return e.substring(0,t)+n+e.substring(t)}function Re(e,t,n,r){return e.substring(0,t)+r+e.substring(n)}function su(e){return e.replace(/\r/g,"")}function fs(e){if(e)throw e}var Cu=En(ms(),1),ks=En(gu(),1);function gr(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function yu(){let e=[],t={run:n,use:r};return t;function n(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...u){let p=e[++o],c=-1;if(l){s(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,p?Ld(p,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ld(e,t){let n;return r;function r(...s){let a=e.length>s.length,l;a&&s.push(i);try{l=e(...s)}catch(u){let p=u;if(a&&n)throw p;return i(p)}a||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}var Ou=En(ms(),1);var Rn={}.hasOwnProperty;function rn(e){return!e||typeof e!="object"?"":Rn.call(e,"position")||Rn.call(e,"type")?bu(e.position):Rn.call(e,"start")||Rn.call(e,"end")?bu(e):Rn.call(e,"line")||Rn.call(e,"column")?ds(e):""}function ds(e){return wu(e&&e.line)+":"+wu(e&&e.column)}function bu(e){return ds(e&&e.start)+"-"+ds(e&&e.end)}function wu(e){return e&&typeof e=="number"?e:1}var Ye=class extends Error{constructor(t,n,r){var i=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}},s;super(),typeof n=="string"&&(r=n,n=null),typeof r=="string"&&(s=r.indexOf(":"),s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))),n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=rn(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack=typeof t=="object"?t.stack:"",this.reason=this.message,this.line=o.start.line,this.column=o.start.column,this.source=i[0],this.ruleId=i[1],this.position=o,this.file,this.fatal,this.url,this.note}};Ye.prototype.file="";Ye.prototype.name
`;break}case-3:{s=`\r
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}var Rs={};al(Rs,{attentionMarkers:()=>ig,contentInitial:()=>Xh,disable:()=>og,document:()=>Zh,flow:()=>eg,flowInitial:()=>Jh,insideSpan:()=>rg,string:()=>tg,text:()=>ng});var Zh={[42]:$e,[43]:$e,[45]:$e,[48]:$e,[49]:$e,[50]:$e,[51]:$e,[52]:$e,[53]:$e,[54]:$e,[55]:$e,[56]:$e,[57]:$e,[62]:Ui},Xh={[91]:Cs},Jh={[-2]:vr,[-1]:vr,[32]:vr},eg={[35]:Ls,[42]:pn,[45]:[ro,pn],[60]:Is,[61]:ro,[95]:pn,[96]:Xi,[126]:Xi},tg={[38]:Zi,[92]:Gi},ng={[-5]:Or,[-4]:Or,[-3]:Or,[33]:Bs,[38]:Zi,[42]:kr,[60]:[Ts,Fs],[91]:Ms,[92]:[Es,Gi],[93]:un,[95]:kr,[96]:Ss},rg={null:[kr,Yu]},ig={null:[42,95]},og={null:[]};function Uu(e={}){let t=Wi([Rs].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(Du),document:r($u),flow:r(Hu),string:r(ju),text:r(qu)};return n;function r(i){return o;function o(s){return Wu(n,i,s)}}}var Gu=/[\0\t\n\r]/g;function Qu(){let e=1,t="",n=!0,r;return i;function i(o,s,a){let l=[],u,p,c,f,m;for(o=t+o.toString(s),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Gu.lastIndex=c,u=Gu.exec(o),f=u&&u.index!==void 0?u.index:o.length,m=o.charCodeAt(f),!u){t=o.slice(c);break}if(m===10&&c===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<f&&(l.push(o.slice(c,f)),e+=f-c),m){case 0:{l.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,l.push(-2);e++<p;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}function Zu(e){for(;!Ji(e););return e}function io(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}var sg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oo(e){return e.replace(sg,ag)}function ag(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return io(n.slice(o?2:1),o?16:10)}return $n(n)||e}var Ds={}.hasOwnProperty,Ps=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),lg(n)(Zu(Uu(n).document().write(Qu()(e,t,!0))))};function lg(e={}){let t=Xu({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Xt),autolinkProtocol:V,autolinkEmail:V,atxHeading:l(er),blockQuote:l(Mt),characterEscape:V,characterReference:V,codeFenced:l(Zt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(Zt,u),codeText:l(Vo,u),codeTextData:V,data:V,codeFlowValue:V,definition:l(Wo),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Si),hardBreakEscape:l(Ai),hardBreakTrailing:l(Ai),htmlFlow:l(Ci,u),htmlFlowData:V,htmlText:l(Ci,u),htmlTextData:V,image:l(Ot),label:u,link:l(Xt),listItem:l(Ei),listItemValue:h,listOrdered:l(tr,d),listUnordered:l(tr),paragraph:l(nr),reference:st,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(er),strong:l(Li),thematicBreak:l(Ii)},exit:{atxHeading:c(),atxHeadingSequence:F,autolink:c(),autolinkEmail:ht,autolinkProtocol:at,blockQuote:c(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:vt,codeFenced:c(O),codeFencedFence:T,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:D,codeIndented:c(C),codeText:c(J),codeTextData:D,data:D,definition:c(),definitionDestinationString:_,definitionLabelString:I,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(ee),hardBreakTrailing:c(ee),htmlFlow:c(S),htmlFlowData:D,htmlText:c(ne),htmlTextData:D,image:c(ie),label:x,labelText:w,lineEnding:q,link:c(pe),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ue,resourceDestinationString:Ve,resourceTitleString:We,resource:ze,setextHeading:c(N),setextHeadingLineSequence:j,setextHeadingText:$,strong:c(),thematicBreak:c()}},e.mdastExtensions||[]),n={};return r;function r(L){let P={type:"root",children:[]},K=[P],le=[],lt=[],Fi={stack:K,tokenStack:le,config:t,ent
`,after:`
`,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(l(u,i[a+1])))}return r.pop(),s.join("");function l(u,p){let c=t.join.length;for(;c--;){let f=t.join[c](u,p,e,t);if(f===!0||f===1)break;if(typeof f=="number")return`
`.repeat(1+f);if(f===!1)return`
<!---->
`}return`
`}}var pg=/\r?\n|\r/g;function Ht(e,t){let n=[],r=0,i=0,o;for(;o=pg.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function np(e,t,n,r){let i=n.enter("blockquote"),o=Q(r);o.move("> "),o.shift(2);let s=Ht(xt(e,n,o.current()),cg);return i(),s}function cg(e,t,n){return">"+(n?"":" ")+e}function so(e,t){return rp(e,t.inConstruct,!0)&&!rp(e,t.notInConstruct,!1)}function rp(e,t,n){if(!t)return n;typeof t=="string"&&(t=[t]);let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ns(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
`&&so(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
`}function ao(e,t){var n=String(e),r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string"||t.length!==1)throw new Error("Expected character");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+1,r=n.indexOf(t,i);return s}function Sr(e,t){return Boolean(!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ip(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function lo(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function te(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={},a=-1;for(;++a<e.unsafe.length;){let p=e.unsafe[a];if(!so(e.stack,p))continue;let c=lo(p),f;for(;f=c.exec(r);){let m="before"in p||Boolean(p.atBreak),d="after"in p,h=f.index+(m?f[1].length:0);i.includes(h)?(s[h].before&&!m&&(s[h].before=!1),s[h].after&&!d&&(s[h].after=!1)):(i.push(h),s[h]={before:m,after:d})}}i.sort(fg);let l=n.before?n.before.length:0,u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let p=i[a];p<l||p>=u||p+1<u&&i[a+1]===p+1&&s[p].after&&!s[p+1].before&&!s[p+1].after||i[a-1]===p-1&&s[p].before&&!s[p-1].before&&!s[p-1].after||(l!==p&&o.push(op(r.slice(l,p),"\\")),l=p,/[!-/:-@[-`{-~]/.test(r.charAt(p))&&(!n.encode||!n.encode.includes(r.charAt(p)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(p).toString(16).toUpperCase()+";"),l++))}return o.push(op(r.slice(l,u),n.after)),o.join("")}function fg(e,t){return e-t}function op(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t,s=-1,a=0,l;for(;l=n.exec(o);)r.push(l.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function sp(e,t,n,r){let i=ip(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Sr(e,n)){let c=n.enter("codeIndented"),f=Ht(o,mg);return c(),f}let a=Q(r),l=i.repeat(Math.max(ao(o,i)+1,3)),u=n.enter("codeFenced"),p=a.move(l);if(e.lang){let c=n.enter("codeFencedLang"+s);p+=a.move(te(n,e.lang,{before:p,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){let c=n.enter("codeFencedMeta"+s);p+=a.move(" "),p+=a.move(te(n,e.meta,{before:p,after:`
`,encode:["`"],...a.current()})),c()}return p+=a.move(`
`),o&&(p+=a.move(o+`
`)),p+=a.move(l),u(),p}function mg(e,t,n){return(n?"":" ")+e}function At(e){return e.label||!e.identifier?e.label||"":oo(e.identifier)}function Nn(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ap(e,t,n,r){let i=Nn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition"),a=n.enter("label"),l=Q(r),u=l.move("[");return u+=l.move(te(n,At(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(te(n,e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(te(n,e.url,{before:u,after:e.title?" ":`
`,...l.current()}))),a(),e.title&&(a=n.enter("title"+o),u+=l.move(" "+i),u+=l.move(te(n,e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function lp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ae(e,t,n){let r=t.indexStack,i=e.children||[],o=[],s=-1,a=n.before;r.push(-1);let l=Q(n);for(;++s<i.length;){let u=i[s],p;if(r[r.length-1]=s,s+1<i.length){let c=t.handle.handlers[i[s+1].type];c&&c.peek&&(c=c.peek),p=c?c(i[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else p=n.after;o.length>0&&(a==="\r"||a===`
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=Q(n),l.move(o.join(""))),o.push(l.move(t.handle(u,e,t,{...l.current(),before:a,after:p}))),a=o[o.length-1].slice(-1)}return r.pop(),o.join("")}zs.peek=dg;function zs(e,t,n,r){let i=lp(n),o=n.enter("emphasis"),s=Q(r),a=s.move(i);return a+=s.move(Ae(e,n,{before:a,after:i,...s.current()})),a+=s.move(i),o(),a}function dg(e,t,n){return n.options.emphasis||"*"}function uo(e,t){let n=!1;return Ki(e,r=>{if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,hr}),Boolean((!e.depth||e.depth<3)&&Dn(e)&&(t.options.setext||n))}function up(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=Q(r);if(uo(e,n)){let p=n.enter("headingSetext"),c=n.enter("phrasing"),f=Ae(e,n,{...o.current(),before:`
`,after:`
`});return c(),p(),f+`
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
`))+1))}let s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=Ae(e,n,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}Hs.peek=hg;function Hs(e){return e.value||""}function hg(){return"<"}Ys.peek=gg;function Ys(e,t,n,r){let i=Nn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image"),a=n.enter("label"),l=Q(r),u=l.move("![");return u+=l.move(te(n,e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(te(n,e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(te(n,e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter("title"+o),u+=l.move(" "+i),u+=l.move(te(n,e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function gg(){return"!"}js.peek=yg;function js(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),s=n.enter("label"),a=Q(r),l=a.move("!["),u=te(n,e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();let p=n.stack;n.stack=[],s=n.enter("reference");let c=te(n,At(e),{before:l,after:"]",...a.current()});return s(),n.stack=p,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function yg(){return"!"}Ar.peek=bg;function Ar(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let s=n.unsafe[o],a=lo(s),l;if(!!s.atBreak)for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function bg(){return"`"}function qs(e,t){let n=Dn(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ks.peek=wg;function Ks(e,t,n,r){let i=Nn(n),o=i==='"'?"Quote":"Apostrophe",s=Q(r),a,l;if(qs(e,n)){let p=n.stack;n.stack=[],a=n.enter("autolink");let c=s.move("<");return c+=s.move(Ae(e,n,{before:c,after:">",...s.current()})),c+=s.move(">"),a(),n.stack=p,c}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(Ae(e,n,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(te(n,e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(te(n,e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter("title"+o),u+=s.move(" "+i),u+=s.move(te(n,e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function wg(e,t,n){return qs(e,n)?"<":"["}Vs.peek=xg;function Vs(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),s=n.enter("label"),a=Q(r),l=a.move("["),u=Ae(e,n,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();let p=n.stack;n.stack=[],s=n.enter("reference");let c=te(n,At(e),{before:l,after:"]",...a.current()});return s(),n.stack=p,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function xg(){return"["}function zn(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function pp(e){let t=zn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function po(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function cp(e){let t=po(e),n=e.options.bulletOrderedOther;if(!n)return t==="."?")":".";if(n!=="."&&n!==")
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:cn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:cn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing",notInConstruct:cn},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:cn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:cn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:cn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:cn},{atBreak:!0,character:"~"}];function Us(e,t={}){let n={enter:i,stack:[],unsafe:[],join:[],handlers:{},options:{},indexStack:[]};Tr(n,{unsafe:vp,join:kp,handlers:xp}),Tr(n,t),n.options.tightDefinitions&&Tr(n,{join:[Sg]}),n.handle=tp("type",{invalid:Og,unknown:Tg,handlers:n.handlers});let r=n.handle(e,null,n,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
`),r;function i(o){return n.stack.push(o),s;function s(){n.stack.pop()}}}function Og(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Tg(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function Sg(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Gs(e){Object.assign(this,{Compiler:n=>{let r=this.data("settings");return Us(n,Object.assign({},r,e,{extensions:this.data("toMarkdownExtensions")||[]}))}})}var Op=Gs;var Tp=vs().use(Ju).use(Op).freeze();var Ag={tokenize:_g,partial:!0},Ap={tokenize:Ig,partial:!0},Cp={tokenize:Fg,partial:!0},Hn={tokenize:Mg,partial:!0},Ep={tokenize:Bg,partial:!0},Lp={tokenize:Eg,previous:Fp},_p={tokenize:Lg,previous:Xs},Ct={tokenize:Cg,previous:Bp},kt={},Qs={text:kt},fn=48;for(;fn<123;)kt[fn]=Ct,fn++,fn===58?fn=65:fn===91&&(fn=97);kt[43]=Ct;kt[45]=Ct;kt[46]=Ct;kt[95]=Ct;kt[72]=[Ct,_p];kt[104]=[Ct,_p];kt[87]=[Ct,Lp];kt[119]=[Ct,Lp];function Cg(e,t,n){let r=this,i,o;return s;function s(m){return!Sp(m)||!Bp(r.previous)||Js(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(m))}function a(m){return Sp(m)?(e.consume(m),a):m===64?(e.consume(m),l):n(m)}function l(m){return m===46?e.check(Hn,f,u)(m):m===45||m===95?e.check(Hn,n,p)(m):Se(m)?(!o&&on(m)&&(o=!0),e.consume(m),l):f(m)}function u(m){return e.consume(m),i=!0,o=void 0,l}function p(m){return e.consume(m),c}function c(m){return m===46?e.check(Hn,n,u)(m):l(m)}function f(m){return i&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Eg(e,t,n){let r=this;return i;function i(s){return s!==87&&s!==119||!Fp(r.previous)||Js(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ag,e.attempt(Ap,e.attempt(Cp,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Lg(e,t,n){let r=this;return i;function i(d){return d!==72&&d!==104||!Xs(r.previous)||Js(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(d),o)}function o(d){return d===84||d===116?(e.consume(d),s):n(d)}function s(d){return d===84||d===116?(e.consume(d),a):n(d)}function a(d){return d===80||d===112?(e.consume(d),l):n(d)}function l(d){return d===83||d===115?(e.consume(d),u):u(d)}function u(d){return d===58?(e.consume(d),p):n(d)}function p(d){return d===47?(e.consume(d),c):n(d)}function c(d){return d===47?(e.consume(d),f):n(d)}function f(d){return d===null||$t(d)||sn(d)||an(d)?n(d):e.attempt(Ap,e.attempt(Cp,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function _g(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return l===87||l===119?(e.consume(l),o):n(l)}function o(l){return l===87||l===119?(e.consume(l),s):n(l)}function s(l){return l===46?(e.consume(l),a):n(l)}function a(l){return l===null||R(l)?n(l):t(l)}}function Ig(e,t,n){let r,i;return o;function o(l){return l===38?e.check(Ep,a,s)(l):l===46||l===95?e.check(Hn,a,s)(l):l===null||$t(l)||sn(l)||l!==45&&an(l)?a(l):(e.consume(l),o)}function s(l){return l===46?(i=r,r=void 0,e.consume(l),o):(l===95&&(r=!0),e.consume(l),o)}function a(l){return!i&&!r?t(l):n(l)}}function Fg(e,t){let n=0;return r;function r(s){return s===38?e.check(Ep,t,i)(s):(s===40&&n++,s===41?e.check(Hn,o,i)(s):Zs(s)?t(s):Ip(s)?e.check(Hn,t,i)(s):(e.consume(s),r))}function i(s){return e.consume(s),r}function o(s){return n--,n<0?t(s):i(s)}}function Bg(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return De(s)?(e.consume(s),i):s===59?(e.consume(s),o):n(s)}function o(s){return Zs(s)?t(s):n(s)}}function Mg(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Ip(o)?(e.consume(o),i):Zs(o)?t(o):n(o)}}function Ip(e){return e===33||e===34||e===39||e===41||e===42||e===44||e===46||e===58||e===59||e===60||e===63||e===95||e===126}function Zs(e){return e===null||e===60||X(e)}function Sp(e){return e===43||e===45||e===46||e===95||Se(e)}function Fp(e){return e===null||e===40||e===42||e===95||e===126||X(e)}function Xs(e){return e===null||!De(e)}function Bp(e){return e!==47&&Xs(e)}function
`)}function py(e){return e==null?"":String(e)}function cy(e){return e.length}function Vp(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var ca={enter:{table:fy,tableData:Up,tableHeader:Up,tableRow:dy},exit:{codeText:hy,table:my,tableData:pa,tableHeader:pa,tableRow:pa}};function fy(e){let t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function my(e){this.exit(e),this.setData("inTable")}function dy(e){this.enter({type:"tableRow",children:[]},e)}function pa(e){this.exit(e)}function Up(e){this.enter({type:"tableCell",children:[]},e)}function hy(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,gy));let n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function gy(e,t){return t==="|"?t:e}function fa(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:l,inlineCode:f}};function s(m,d,h,g){return u(p(m,h,g),m.align)}function a(m,d,h,g){let y=c(m,h,g),T=u([y]);return T.slice(0,T.indexOf(`
`))}function l(m,d,h,g){let y=h.enter("tableCell"),T=h.enter("phrasing"),O=Ae(m,h,{...g,before:o,after:o});return T(),y(),O}function u(m,d){return Wp(m,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function p(m,d,h){let g=m.children,y=-1,T=[],O=d.enter("table");for(;++y<g.length;)T[y]=c(g[y],d,h);return O(),T}function c(m,d,h){let g=m.children,y=-1,T=[],O=d.enter("tableRow");for(;++y<g.length;)T[y]=l(g[y],m,d,h);return O(),T}function f(m,d,h){let g=Ar(m,d,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}var Qp={exit:{taskListCheckValueChecked:Gp,taskListCheckValueUnchecked:Gp,paragraph:yy}},Zp={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:by}};function Gp(e){let t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function yy(e){let t=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],r=t.children,i=n.children[0],o=-1,s;if(t&&t.type==="listItem"&&typeof t.checked=="boolean"&&i&&i.type==="text"){for(;++o<r.length;){let a=r[o];if(a.type==="paragraph"){s=a;break}}s===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}this.exit(e)}function by(e,t,n,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=Q(r);o&&a.move(s);let l=fo(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(p){return p+s}}function ma(){return[$p,Hp(),jp,ca,Qp]}function da(e){return{extensions:[Np,Yp(),qp,fa(e),Zp]}}function ha(e={}){let t=this.data();n("micromarkExtensions",Rp(e)),n("fromMarkdownExtensions",ma()),n("toMarkdownExtensions",da(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}var Xp={tokenize:xy,concrete:!0},wy={tokenize:ky,partial:!0};function xy(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(g){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(g)}function l(g){return g===36?(e.consume(g),s++,l):(e.exit("mathFlowFenceSequence"),s<2?n(g):H(e,u,"whitespace")(g))}function u(g){return g===null||R(g)?c(g):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||R(g)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),c(g)):g===36?n(g):(e.consume(g),p)}function c(g){return e.exit("mathFlowFence"),r.interrupt?t(g):f(g)}function f(g){return g===null?d(g):R(g)?e.attempt(wy,e.attempt({tokenize:h,partial:!0},d,o?H(e,f,"linePrefix",o+1):f),d)(g):(e.enter("mathFlowValue"),m(g))}function m(g){return g===null||R(g)?(e.exit("mathFlowValue"),f(g)):(e.consume(g),m)}function d(g){return e.exit("mathFlow"),t(g)}function h(g,y,T){let O=0;return H(g,C,"linePrefix",4);function C(_){return g.enter("mathFlowFence"),g.enter("mathFlowFenceSequence"),I(_)}function I(_){return _===36?(g.consume(_),O++,I):O<s?T(_):(g.exit("mathFlowFenceSequence"),H(g,k,"whitespace")(_))}function k(_){return _===null||R(_)?(g.exit("mathFlowFence"),y(_)):T(_)}}}function ky(e,t,n){let r=this;return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Jp(e={}){let t=e.singleDollarTextMath;return t==null&&(t=!0),{tokenize:n,resolve:vy,previous:Oy};function n(r,i,o){let s=this,a=0,l,u;return p;function p(h){return r.enter("mathText"),r.enter("mathTextSequence"),c(h)}function c(h){return h===36?(r.consume(h),a++,c):a<2&&!t?o(h):(r.exit("mathTextSequence"),f(h))}function f(h){return h===null?o(h):h===36?(u=r.enter("mathTextSequence"),l=0,d(h)):h===32?(r.enter("space"),r.consume(h),r.exit("space"),f):R(h)?(r.enter("lineEnding"),r.consume(h),r.exit("lineEnding"),f):(r.enter("mathTextData"),m(h))}function m(h){return h===null||h===32||h===36||R(h)?(r.exit("mathTextData"),f(h)):(r.consume(h),m)}function d(h){return h===36?(r.consume
`),u&&(m+=f.move(u+`
`)),m+=f.move(p),c(),m}function r(o){let s=o.value||"",a=1,l="";for(t||a++;new RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(s);)a++;/[^ \r\n]/.test(s)&&(/[ \r\n$]/.test(s.charAt(0))||/[ \r\n$]/.test(s.charAt(s.length-1)))&&(l=" ");let u="$".repeat(a);return u+l+s+l+u}function i(){return"$"}}function ya(e={}){let t=this.data();n("micromarkExtensions",ga(e)),n("fromMarkdownExtensions",ec()),n("toMarkdownExtensions",tc(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}function Ty(e){return Tp().use(ha).use(ya).parse(e)}function qe(e,t){let n=Ty(t),r=[];return Ki(n,e,i=>{r.push(i.position)}),r.sort((i,o)=>o.start.offset-i.start.offset),r}function nc(e){let t=qe("footnoteDefinition",e),n=[],r=new Set,i=new Map,o=function(s,a){let l=s.match(/\[\^.*?\]/)[0],u;do u=e.lastIndexOf(l,a),a=u;while(r.has(u)&&u!==-1);if(u===-1)throw new Error(`Footnote '${s}' has no corresponding footnote reference before the footnote contents and cannot be processed. Please make sure that all footnotes have a corresponding reference before the content of the footnote.`);return r.add(u),u};for(let s of t){let a=e.substring(s.start.offset,s.end.offset);n.push(a),s.end.offset<e.length&&e[s.end.offset]===`
`&&(e=e.substring(0,s.end.offset)+e.substring(s.end.offset+1)),s.end.offset<e.length&&e[s.end.offset]===`
`&&(e=e.substring(0,s.end.offset)+e.substring(s.end.offset+1)),e=e.substring(0,s.start.offset)+e.substring(s.end.offset),i.set(a,o(a,s.start.offset))}n=n.sort((s,a)=>i.get(s)-i.get(a)),n.length>0&&(e=e.trimEnd()+`
`);for(let s of n)e+=`
`+s;return e}function ho(e,t,n){let r=qe(n,e);if(r.length===0)return e;let i="";if(t==="underscore")i="_";else if(t==="asterisk")i="*";else{let o=r[r.length-1];i=e.substring(o.start.offset,o.start.offset+1)}n==="strong"&&(i+=i);for(let o of r){let s=i+e.substring(o.start.offset+i.length,o.end.offset-i.length)+i;e=Re(e,o.start.offset,o.end.offset,s)}return e}function rc(e){let t=qe("paragraph",e);if(t.length===0)return e;for(let n of t){let r=e.substring(n.start.offset,n.end.offset).split(`
`),i=r.length-1;if(!(i<1)){for(let o=0;o<i;o++){let s=r[o].trimEnd();s.endsWith("<br>")||s.endsWith("<br/>")||(r[o]=s+" ")}e=Re(e,n.start.offset,n.end.offset,r.join(`
`))}}return e}function ic(e){let t=e.endsWith(`
`),n=qe("paragraph",e);if(n.length===0)return e;for(let r of n){let i=r.start.offset;for(i>0&&i--;i>=0&&e.charAt(i)!=`
`;)i--;i++;let o=e.substring(i,r.end.offset).split(`
`),s=o[0].trimStart();if(s.startsWith("> ")||s.startsWith("> ")||s.startsWith("- ")||s.startsWith("- ")||s.match(/^[0-9]+\.( |\t)+/))continue;let a=o.length,l=[],u=!1;for(let d=0;d<a;d++){let h=o[d];if(u){let g=l.length-1;l[g]+=`
`+h}else l.push(h);u=h.endsWith("<br>")||h.endsWith("<br/>")||h.endsWith(" ")}for(;i>0&&e.charAt(i-1)==`
`;)i--;let p=e.length,c=r.end.offset;for(c<p&&c++;c<p&&e.charAt(c)==`
`;)c++;let f=`
`;i==0&&(f="");let m=`
`;c==p&&(m=""),e=Re(e,i,c,f+l.join(`
`)+m)}return t&&!e.endsWith(`
`)&&(e+=`
`),e}function oc(e){let t=qe("link",e);for(let n of t){if(n==null)continue;let r=e.substring(n.start.offset,n.end.offset);if(!r.match(cr))continue;let i=r.indexOf("]"),o=r.substring(0,1)+r.substring(1,i).trim()+r.substring(i);e=Re(e,n.start.offset,n.end.offset,o)}return e}function sc(e,t){let n=qe("emphasis",e);for(let r of n){let i=e.substring(r.start.offset+1,r.end.offset-1);i=t(i),e=Re(e,r.start.offset+1,r.end.offset-1,i)}return e}function ac(e,t){let n=qe("strong",e);for(let r of n){let i=e.substring(r.start.offset+2,r.end.offset-2);i=t(i),e=Re(e,r.start.offset+2,r.end.offset-2,i)}return e}function lc(e,t){let n=qe("listItem",e);for(let r of n){let i=e.substring(r.start.offset+2,r.end.offset),o=/\n(( |\t)*>?)*(\*|-|\+|- \[( | x)\]|\d+\.) /g,s=i.match(o);if(s){let a=i.split(new RegExp(o.source.replaceAll("(","(?:"))),l="",u=0;for(let p of a)u>0&&(l+=s[u-1]),l+=t(p),u++;i=l}else i=t(i);e=Re(e,r.start.offset+2,r.end.offset,i)}return e}function mo(e,t,n){return n?e==t:t.match(new RegExp("^"+nu(e)+"( |\\t)*$","m"))!=null}function uc(e,t,n){var l;let r=e.substring(t,n),i="",o=!0,s=e.substring(0,t);if(s.length>0){let u=s.split(`
`);i=(l=u[u.length-1])!=null?l:"",o=i.trim()=="",o||(i=i.trimEnd());let p=0;for(;u.length-(2+p)>=0&&mo(i,u[u.length-(2+p)],o);)p++;u.splice(u.length-(1+p),p),u.length>1&&!mo(i,u[u.length-2],o)&&u.splice(u.length-1,0,i),s=u.join(`
`)}let a=e.substring(n);if(a.length>0){let u=a.split(`
`),p=0;for(;p+1<u.length&&mo(i,u[1+p],o);)p++;u.splice(1,p),u.length>1&&!mo(i,u[1],o)&&u.splice(1,0,i),a=u.join(`
`)}return s+r+a}function pc(e){let t=qe("code",e);for(let n of t)!e.substring(n.start.offset,n.end.offset).startsWith("```")||(e=uc(e,n.start.offset,n.end.offset));return e}function cc(e){let t=qe("table",e);for(let n of t)e=uc(e,n.start.offset,n.end.offset);return e}function ba(e){let t=qe("link",e);for(let n of t){if(n==null)continue;let r=e.substring(n.start.offset,n.end.offset);if(!r.match(cr))continue;let i=r.indexOf("]"),o='<a href="'+r.substring(i+2,r.length-1)+'">'+r.substring(1,i)+"</a>";e=Re(e,n.start.offset,n.end.offset,o)}return e}function fc(e,t,n){let r=qe("list",e);if(!r)return e;for(let i of r){let o=i.start.offset;for(;o>0&&e.charAt(o-1)!==`
`;)o--;let s=e.substring(o,i.end.offset),a=new Map;s=s.replace(/^(( |\t |>)*)(\d(\.|\)))([^\n]*)$/gm,(l,u="",p,c,f,m)=>{let d=1;return a.has(u)?t==="ascending"&&(d=a.get(u)+1,a.set(u,d)):a.set(u,1),`${u}${d}${n}${m}`}),e=Re(e,o,i.end.offset,s)}return e}var mn=class{constructor(t,n,r,i){this.name=t,this.description=n,this.defaultValue=r,i&&(this.ruleName=i)}setOption(t,n){n.ruleConfigs[this.ruleName][this.name]=t}},Yn=class extends mn{display(n,r,i){let o=new jn.Setting(n).setName(this.name).setDesc(this.description).addToggle(s=>{s.setValue(r.ruleConfigs[this.ruleName][this.name]),s.onChange(a=>{this.setOption(a,r),i.settings=r,i.saveData(i.settings)})});Er(o),o.settingEl.style.border="none"}},Cr=class extends mn{display(n,r,i){let o=new jn.Setting(n).setName(this.name).setDesc(this.description).addText(s=>{s.setValue(r.ruleConfigs[this.ruleName][this.name]),s.onChange(a=>{this.setOption(a,r),i.settings=r,i.saveData(i.settings)})});Er(o),o.settingEl.style.border="none"}},go=class extends mn{display(n,r,i){let o=new jn.Setting(n).setName(this.name).setDesc(this.description).addTextArea(s=>{s.setValue(r.ruleConfigs[this.ruleName][this.name]),s.onChange(a=>{this.setOption(a,r),i.settings=r,i.saveData(i.settings)})});Er(o),o.settingEl.style.border="none"}},yo=class extends mn{display(n,r,i){let o=new jn.Setting(n).setName(this.name).setDesc(this.description).addMomentFormat(s=>{s.setValue(r.ruleConfigs[this.ruleName][this.name]),s.setPlaceholder("dddd, MMMM Do YYYY, h:mm:ss a"),s.onChange(a=>{this.setOption(a,r),i.settings=r,i.saveData(i.settings)})});Er(o),o.settingEl.style.border="none"}},bo=class{constructor(t,n){this.value=t,this.description=n}},wo=class extends mn{constructor(n,r,i,o,s){super(n,r,i,s);this.options=o}display(n,r,i){let o=new jn.Setting(n).setName(this.name).setDesc(this.description).addDropdown(s=>{for(let a of this.options)s.addOption(a.value,a.value);s.setValue(r.ruleConfigs[this.ruleName][this.name]),s.onChange(a=>{this.setOption(a,r),i.settings=r,i.saveData(i.settings)})});Er(o),o.settingEl.style.border="none"}};function Er(e){e.nameEl.innerHTML=ba(e.nameEl.innerHTML),e.descEl.innerHTML=ba(e.descEl.innerHTML)}var Yt=class extends Error{constructor(t,n){var r;super(t),this.cause=n!=null?n:null,this.stack=(r=n.stack)!=null?r:null,Object.setPrototypeOf(this,Yt.prototype)}};var W=(o=>(o.YAML="YAML",o.HEADING="Heading",o.FOOTNOTE="Footnote",o.CONTENT="Content",o.SPACING="Spacing",o))(W||{}),xo=class{constructor(t,n,r,i,o,s=[],a=!1){this.name=t,this.description=n,this.type=r,this.apply=i,this.examples=o,s.unshift(new Yn(this.description,"",!1));for(let l of s)l.ruleName=t;this.options=s,this.hasSpecialExecutionOrder=a}alias(){return this.name.replace(/ /g,"-").toLowerCase()}getDefaultOptions(){let t={};for(let n of this.options)t[n.name]=n.defaultValue;return t}getOptions(t){return t.ruleConfigs[this.name]}getURL(){return"https://github.com/platers/obsidian-linter/blob/master/docs/rules.md"+"#"+this.alias()}enabledOptionName(){return this.options[0].name}},ko=class{constructor(t,n,r,i={}){this.description=t,this.options=i,this.before=n,this.after=r}},mc=Object.values(W);function dc(e){let t=e.match(ve);if(!t)return[];let n=t[1],r=Te(n,"disabled rules");if(r==null)return[];let i=r.includes(`
`)?`disabled rules:
`:"disabled rules: ";i+=r;let s=tt(i)["disabled rules"];return s?(typeof s=="string"&&(s=[s]),s.includes("all")?Et.map(a=>a.alias()):s):[]}var Et=[],Sy=Et.reduce((e,t)=>(e[t.alias()]=t,e),{});function hc(e){Et.push(e),Et.sort((t,n)=>mc.indexOf(t.type)-mc.indexOf(n.type)||t.name.localeCompare(n.name)),Sy[e.alias()]=e}function vo(e,t){let n;throw e instanceof Jl?(n=e.toString(),n=`error in the yaml: ${n.substring(n.indexOf(":")+1)}`):n=`unknown error: ${e.message}`,new Yt(`"${t}" encountered an ${n}`,e)}var Jn=En(gc());function Ay(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e=="string"?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(a,l){var u=l.match(/\n([\t ]+|(?!\s).)/g);return u?a.concat(u.map(function(p){var c,f;return(f=(c=p.match(/[\t ]/g))===null||c===void 0?void 0:c.length)!==null&&f!==void 0?f:0})):a},[]);if(i.length){var o=new RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");r=r.map(function(a){return a.replace(o,`
`)})}r[0]=r[0].replace(/^\r?\n/,"");var s=r[0];return t.forEach(function(a,l){var u=s.match(/(?:^|\n)( *)$/),p=u?u[1]:"",c=a;typeof a=="string"&&a.includes(`
`)&&(c=String(a).split(`
`).map(function(f,m){return m===0?f:""+p+f}).join(`
`)),s+=c+r[l+1]}),s}var b=Ay;var Vc=En(wa());var Le=En(wa()),To="[Obsidian Linter]";function bc(e,t){let n=`${To} ${e}:
`;t.stack?n+=t.stack:n+=`${t.name} ${t.message}`,Le.default.error(n)}function Lr(e){Le.default.info(`${To} ${e}`)}function jt(e){Le.default.debug(`${To} ${e}`)}function wc(e){Le.default.warn(`${To} ${e}`)}function xc(e){switch(e){case Le.default.levels.INFO:{Le.default.setLevel("info");break}case Le.default.levels.TRACE:{Le.default.setLevel("trace");break}case Le.default.levels.DEBUG:{Le.default.setLevel("debug");break}case Le.default.levels.SILENT:{Le.default.setLevel("silent");break}case Le.default.levels.ERROR:{Le.default.setLevel("error");break}case Le.default.levels.WARN:{Le.default.setLevel("warn");break}}}var Ti=require("obsidian");var Kn,_r,qt,nt=class{static getRule(){if(!Ze(nt,Kn).has(this.name)){let t=new this,n=new xo(t.name,t.description,t.type,t.safeApply.bind(t),t.exampleBuilders.map(r=>r.example),t.optionBuilders.map(r=>r.option),t.hasSpecialExecutionOrder);Ze(nt,Kn).set(this.name,n),Ze(nt,_r).set(t.name,t)}return Ze(nt,Kn).get(this.name)}static applyIfEnabledBase(t,n,r,i){let o=t.getOptions(r);if(o[t.enabledOptionName()]){let s=Object.assign({},o,i);jt(`Running ${t.name}`);try{return[t.apply(n,s),!0]}catch(a){vo(a,t.name)}}else return[n,!1]}static getBuilderByName(t){return Ze(nt,_r).get(t)}static setNoSettingControl(t,n){Ze(nt,qt).has(t)||Ze(nt,qt).set(t,[]),Ze(nt,qt).get(t).push(n)}static hasSettingControl(t,n){return!Ze(nt,qt).has(t)||!Ze(nt,qt).get(t).includes(n)}},pt=nt;Kn=new WeakMap,_r=new WeakMap,qt=new WeakMap,Ln(pt,Kn,new Map),Ln(pt,_r,new Map),Ln(pt,qt,new Map);var E=class extends pt{static register(t){let n=t.getRule();hc(n)}safeApply(t,n){return this.apply(t,this.buildRuleOptions(n))}buildRuleOptions(t){t=t!=null?t:{};let n=new this.OptionsClass,r=Object.assign(n,t);for(let i of this.optionBuilders)i.setRuleOption(r,t);return r}get hasSpecialExecutionOrder(){return!1}static applyIfEnabled(t,n,r,i){let o=this.getRule();return r.includes(o.alias())?(jt(o.alias()+" is disabled"),[t,!1]):pt.applyIfEnabledBase(o,t,n,i)}static getRuleOptions(t){let n=pt.getRule.bind(this)(),r=new this,i=n.getOptions(t);return r.buildRuleOptions(i)}static noSettingControl(){return(t,n)=>{let r=t.constructor.name;pt.setNoSettingControl(r,n)}}},xa,A=class{constructor(t){Ln(this,xa,void 0);this.example=new ko(t.description,t.before,t.after,t.options)}};xa=new WeakMap;var Vn,Kt=class{constructor(t){Ln(this,Vn,void 0);this.OptionsClass=t.OptionsClass,this.name=t.name,this.description=t.description,this.optionsKey=t.optionsKey}get defaultValue(){return new this.OptionsClass()[this.optionsKey]}get option(){return Ze(this,Vn)||pl(this,Vn,this.buildOption()),Ze(this,Vn)}setRuleOption(t,n){let r=n[this.name];r!==void 0&&(t[this.optionsKey]=r)}};Vn=new WeakMap;var re=class extends Kt{buildOption(){return new Yn(this.name,this.description,this.defaultValue)}},So=class extends Kt{buildOption(){return new Cr(this.name,this.description,this.defaultValue)}},ce=class extends Kt{constructor(n){super(n);this.records=n.records.map(r=>new bo(r.value,r.description))}buildOption(){return new wo(this.name,this.description,this.defaultValue,this.records)}},Ne=class extends Kt{constructor(n){var r,i;super(n);this.separator=(r=n.separator)!=null?r:`
`,this.splitter=(i=n.splitter)!=null?i:/\n/}buildOption(){return new go(this.name,this.description,this.defaultValue.join(this.separator))}setRuleOption(n,r){if(r[this.name]!==void 0){let i=r[this.name].split(this.splitter).filter(function(o){return o!=""});n[this.optionsKey]=i}}},dn=class extends Kt{buildOption(){return new Cr(this.name,this.description,this.defaultValue)}},Ao=class extends Kt{buildOption(){return new yo(this.name,this.description,this.defaultValue)}};var v={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}"},table:{replaceAction:"table",placeholder:"{TABLE_PLACEHOLDER}"},math:{replaceAction:"math",placeholder:"{MATH_PLACEHOLDER}"},inlineMath:{replaceAction:"inlineMath",placeholder:"{INLINE_MATH_PLACEHOLDER}"},yaml:{replaceAction:ve,placeholder:Be(`---
---`)},wikiLink:{replaceAction:ls,placeholder:"{WIKI_LINK_PLACEHOLDER}"},tag:{replaceAction:fr,placeholder:"#tag-placeholder"},obsidianMultiLineComments:{replaceAction:tu,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},link:{replaceAction:_y,placeholder:"{REGULAR_LINK_PLACEHOLDER}"}};function z(e,t,n){let r=[];for(let i of e){let o;if(typeof i.replaceAction=="string")o=Ey(t,i.placeholder,i.replaceAction);else if(i.replaceAction instanceof RegExp)o=Ly(t,i.placeholder,i.replaceAction);else if(typeof i.replaceAction=="function"){let s=i.replaceAction;o=s(t,i.placeholder)}t=o.newText,r.push({replacedValues:o.replacedValues,placeholder:i.placeholder})}return t=n(t),r=r.reverse(),r!=null&&r.length>0&&r.forEach(i=>{i.replacedValues.forEach(o=>{t=t.replace(new RegExp(i.placeholder,"i"),Be(o))})}),t}function Ey(e,t,n){let r=qe(n,e),i=[];for(let o of r){let s=e.substring(o.start.offset,o.end.offset);i.push(s),e=Re(e,o.start.offset,o.end.offset,t)}return i.reverse(),{newText:e,replacedValues:i}}function Ly(e,t,n){let r=e.match(n),i=[];if(n.flags.includes("g")){if(e=e.replaceAll(n,t),r)for(let o of r)i.push(o)}else e=e.replace(n,t),r&&i.push(r[0]);return{newText:e,replacedValues:i}}function _y(e,t){let n=qe("link",e),r=[];for(let i of n){if(i==null)continue;let o=e.substring(i.start.offset,i.end.offset);!o.match(cr)||(r.push(o),e=Re(e,i.start.offset,i.end.offset,t))}return r.reverse(),{newText:e,replacedValues:r}}var hn=class{constructor(){this.style="Title Case";this.ignoreWords=["macOS","iOS","iPhone","iPad","JavaScript","TypeScript","AppleScript"];this.lowercaseWords=["via","a","an","the","and","or","but","for","nor","so","yet","at","by","in","of","on","to","up","as","is","if","it","for","to","with","without","into","onto","per"];this.ignoreCasedWords=!0}},Ir=class extends E{get OptionsClass(){return hn}get name(){return"Capitalize Headings"}get description(){return"Headings should be formatted with capitalization"}get type(){return"Heading"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=r.split(`
`);for(let o=0;o<i.length;o++)if(!!i[o].match(Mn))switch(n.style){case"Title Case":{let a=i[o].match(/\S+/g),l=n.ignoreWords,u=n.lowercaseWords,p=!0;for(let c=1;c<a.length;c++){if(!a[c].match(/^[\p{L}'-]+[.?!,:;]?$/u))continue;n.ignoreCasedWords&&a[c]!==a[c].toLowerCase()||l.includes(a[c])||(a[c]=a[c].toLowerCase(),(!u.includes(a[c])||p===!0)&&(a[c]=a[c][0].toUpperCase()+a[c].slice(1))),p=!1}i[o]=i[o].replace(Mn,Be(`${a.join(" ")}`));break}case"ALL CAPS":i[o]=i[o].toUpperCase();break;case"First letter":i[o]=i[o].toLowerCase().replace(/^#*\s+([^\p{L}])*([\p{L}])/u,a=>a.toUpperCase());break}return i.join(`
`)})}get exampleBuilders(){return[new A({description:"With `Title Case=true`, `Ignore Cased Words=false`",before:b`
# this is a heading 1
## THIS IS A HEADING 2
### a heading 3
`,after:b`
# This is a Heading 1
## This is a Heading 2
### A Heading 3
`,options:{style:"Title Case",ignoreCasedWords:!1}}),new A({description:"With `Title Case=true`, `Ignore Cased Words=true`",before:b`
# this is a heading 1
## THIS IS A HEADING 2
### a hEaDiNg 3
`,after:b`
# This is a Heading 1
## THIS IS A HEADING 2
### A hEaDiNg 3
`,options:{style:"Title Case",ignoreCasedWords:!0}}),new A({description:"With `First letter=true`",before:b`
# this is a heading 1
## this is a heading 2
`,after:b`
# This is a heading 1
## This is a heading 2
`,options:{style:"First letter"}}),new A({description:"With `ALL CAPS=true`",before:b`
# this is a heading 1
## this is a heading 2
`,after:b`
# THIS IS A HEADING 1
## THIS IS A HEADING 2
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new ce({OptionsClass:hn,name:"Style",description:"The style of capitalization to use",optionsKey:"style",records:[{value:"Title Case",description:"Capitalize Using Title Case Rules"},{value:"ALL CAPS",description:"CAPITALIZE THE WHOLE TITLE"},{value:"First letter",description:"Only capitalize the first letter"}]}),new re({OptionsClass:hn,name:"Ignore Cased Words",description:"Only apply title case style to words that are all lowercase",optionsKey:"ignoreCasedWords"}),new Ne({OptionsClass:hn,name:"Ignore Words",description:"A comma separated list of words to ignore when capitalizing",optionsKey:"ignoreWords",splitter:us,separator:", "}),new Ne({OptionsClass:hn,name:"Lowercase Words",description:"A comma separated list of words to keep lowercase",optionsKey:"lowercaseWords",splitter:us,separator:", "})]}};Ir=B([E.register],Ir);var Co=class{constructor(){this.innerNewLines=!1}},Fr=class extends E{get OptionsClass(){return Co}get name(){return"Compact YAML"}get description(){return"Removes leading and trailing blank lines in the YAML front matter."}get type(){return"Spacing"}apply(t,n){return Me(t,r=>(r=r.replace(/^---\n+/,`---
`),r=r.replace(/\n+---/,`
---`),n.innerNewLines&&(r=r.replaceAll(/\n{2,}/g,`
`)),r))}get exampleBuilders(){return[new A({description:"Remove blank lines at the start and end of the YAML",before:b`
---
${""}
date: today
${""}
title: unchanged without inner new lines turned on
${""}
---
`,after:b`
---
date: today
${""}
title: unchanged without inner new lines turned on
---
`}),new A({description:"Remove blank lines anywhere in YAML with inner new lines set to true",before:b`
---
${""}
date: today
${""}
${""}
title: remove inner new lines
${""}
---
${""}
# Header 1
${""}
${""}
Body content here.
`,after:b`
---
date: today
title: remove inner new lines
---
${""}
# Header 1
${""}
${""}
Body content here.
`,options:{innerNewLines:!0}})]}get optionBuilders(){return[new re({OptionsClass:Co,name:"Inner New Lines",description:"Remove new lines that are not at the start or the end of the YAML",optionsKey:"innerNewLines"})]}};Fr=B([E.register],Fr);var ka=class{},Br=class extends E{get OptionsClass(){return ka}get name(){return"Consecutive blank lines"}get description(){return"There should be at most one consecutive blank line."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/\n{2,}/g,`
`))}get exampleBuilders(){return[new A({description:"",before:b`
Some text
${""}
${""}
Some more text
`,after:b`
Some text
${""}
Some more text
`})]}get optionBuilders(){return[]}};Br=B([E.register],Br);var va=class{},Mr=class extends E{get OptionsClass(){return va}get name(){return"Convert Bullet List Markers"}get description(){return"Converts common bullet list marker symbols to markdown list markers."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/^([^\S\n]*)([•§])([^\S\n]*)/gm,"$1-$3"))}get exampleBuilders(){return[new A({description:"Converts \u2022",before:b`
item 1
item 2
`,after:b`
- item 1
- item 2
`}),new A({description:"Converts \xA7",before:b`
item 1
§ item 2
§ item 3
`,after:b`
- item 1
- item 2
- item 3
`})]}get optionBuilders(){return[]}};Mr=B([E.register],Mr);var Eo=class{constructor(){this.tabsize=4}},Rr=class extends E{get OptionsClass(){return Eo}get name(){return"Convert Spaces to Tabs"}get description(){return"Converts leading spaces to tabs."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=String(n.tabsize),o=new RegExp("^( *) {"+String(i)+"}","gm");for(;r.match(o)!=null;)r=r.replace(o,"$1 ");return r})}get exampleBuilders(){return[new A({description:"Converting spaces to tabs with `tabsize = 3`",before:b`
- text with no indention
- text indented with 3 spaces
- text with no indention
- text indented with 6 spaces
`,after:b`
- text with no indention
\t- text indented with 3 spaces
- text with no indention
\t\t- text indented with 6 spaces
`,options:{tabsize:3}})]}get optionBuilders(){return[new So({OptionsClass:Eo,name:"Tabsize",description:"Number of spaces that will be converted to a tab",optionsKey:"tabsize"})]}};Rr=B([E.register],Rr);var Lo=class{constructor(){this.style="consistent"}},Dr=class extends E{get OptionsClass(){return Lo}get name(){return"Emphasis Style"}get description(){return"Makes sure the emphasis style is consistent."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.math,v.inlineMath],t,r=>ho(r,n.style,"emphasis"))}get exampleBuilders(){return[new A({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:b`
# Emphasis Cases
${""}
*Test emphasis*
* Test not emphasized *
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is ***bold and emphasized***
This is ***nested bold** and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
**Test bold**
${""}
* List Item1 with *emphasized text*
* List Item2
`,after:b`
# Emphasis Cases
${""}
_Test emphasis_
* Test not emphasized *
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is _**bold and emphasized**_
This is _**nested bold** and ending emphasized_
This is **_nested emphasis_ and ending bold**
${""}
**Test bold**
${""}
* List Item1 with _emphasized text_
* List Item2
`,options:{style:"underscore"}}),new A({description:"Emphasis indicators should use asterisks when style is set to 'asterisk'",before:b`
# Emphasis Cases
${""}
_Test emphasis_
_ Test not emphasized _
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is ___bold and emphasized___
This is ___nested bold__ and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,after:b`
# Emphasis Cases
${""}
*Test emphasis*
_ Test not emphasized _
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is __*nested emphasis* and ending bold__
${""}
__Test bold__
`,options:{style:"asterisk"}}),new A({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:b`
# Emphasis First Emphasis Is an Asterisk
${""}
*First emphasis*
This is _emphasized_ mid sentence
This is *emphasized* mid sentence with a second _emphasis_ on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
__Test bold__
`,after:b`
# Emphasis First Emphasis Is an Asterisk
${""}
*First emphasis*
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
__Test bold__
`,options:{style:"consistent"}}),new A({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:b`
# Emphasis First Emphasis Is an Underscore
${""}
**_First emphasis_**
This is _emphasized_ mid sentence
This is *emphasized* mid sentence with a second _emphasis_ on the same line
This is *__bold and emphasized__*
This is _**nested bold** and ending emphasized_
This is __*nested emphasis* and ending bold__
${""}
__Test bold__
`,after:b`
# Emphasis First Emphasis Is an Underscore
${""}
**_First emphasis_**
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is ___bold and emphasized___
This is _**nested bold** and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ce({OptionsClass:Lo,name:"Style",description:"The style used to denote emphasized content",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"}]})]}};Dr=B([E.register],Dr);var Oa=class{},Pr=class extends E{get OptionsClass(){return Oa}get name(){return"Empty Line Around Code Fences"}get description(){return"Ensures that there is an empty line around code fences unless they start or end a document."}get type(){return"Spacing"}apply(t,n){return pc(t)}get exampleBuilders(){return[new A({description:"Fenced code blocks that start a document do not get an empty line before them.",before:b`
\`\`\` js
var temp = 'text';
// this is a code block
\`\`\`
Text after code block.
`,after:b`
\`\`\` js
var temp = 'text';
// this is a code block
\`\`\`
${""}
Text after code block.
`}),new A({description:"Fenced code blocks that end a document do not get an empty line after them.",before:b`
# Heading 1
\`\`\`
Here is a code block
\`\`\`
`,after:b`
# Heading 1
${""}
\`\`\`
Here is a code block
\`\`\`
`}),new A({description:"Fenced code blocks that are in a blockquote have the proper empty line added",before:b`
# Make sure that code blocks in blockquotes are accounted for correctly
> \`\`\`js
> var text = 'this is some text';
> \`\`\`
>
> \`\`\`js
> var other text = 'this is more text';
> \`\`\`
${""}
**Note that the blanks blockquote lines added do not have whitespace after them**
${""}
# Doubly nested code block
${""}
> > \`\`\`js
> > var other text = 'this is more text';
> > \`\`\`
`,after:b`
# Make sure that code blocks in blockquotes are accounted for correctly
>
> \`\`\`js
> var text = 'this is some text';
> \`\`\`
>
> \`\`\`js
> var other text = 'this is more text';
> \`\`\`
>
${""}
**Note that the blanks blockquote lines added do not have whitespace after them**
${""}
# Doubly nested code block
${""}
> >
> > \`\`\`js
> > var other text = 'this is more text';
> > \`\`\`
`}),new A({description:"Nested fenced code blocks get empty lines added around them",before:b`
\`\`\`markdown
# Header
${""}
\`\`\`\`JavaScript
var text = 'some string';
\`\`\`\`
\`\`\`
`,after:b`
\`\`\`markdown
# Header
${""}
\`\`\`\`JavaScript
var text = 'some string';
\`\`\`\`
${""}
\`\`\`
`})]}get optionBuilders(){return[]}};Pr=B([E.register],Pr);var Ta=class{},$r=class extends E{get OptionsClass(){return Ta}get name(){return"Empty Line Around Tables"}get description(){return"Ensures that there is an empty line around github flavored tables unless they start or end a document."}get type(){return"Spacing"}apply(t,n){return z([v.yaml,v.code],t,r=>cc(r))}get exampleBuilders(){return[new A({description:"Tables that start a document do not get an empty line before them.",before:b`
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
More text.
# Heading
${""}
**Note that text directly following a table is considered part of a table according to github markdown**
`,after:b`
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
More text.
${""}
# Heading
${""}
**Note that text directly following a table is considered part of a table according to github markdown**
`}),new A({description:"Tables that end a document do not get an empty line after them.",before:b`
# Heading 1
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
`,after:b`
# Heading 1
${""}
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
`}),new A({description:"Tables that are not at the start or the end of the document will have an empty line added before and after them",before:b`
# Table 1
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| foo | bar | blob |
| baz | qux | trust |
| quux | quuz | glob |
# Table 2 without Pipe at Start and End
| Column 1 | Column 2 |
:-: | -----------:
bar | baz
foo | bar
# Header for more content
New paragraph.
`,after:b`
# Table 1
${""}
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| foo | bar | blob |
| baz | qux | trust |
| quux | quuz | glob |
${""}
# Table 2 without Pipe at Start and End
${""}
| Column 1 | Column 2 |
:-: | -----------:
bar | baz
foo | bar
${""}
# Header for more content
New paragraph.
`}),new A({description:"Tables in callouts or blockquotes have the appropriately formatted blank lines added",before:b`
> Table in blockquote
> | Column 1 | Column 2 | Column 3 |
> |----------|----------|----------|
> | foo | bar | blob |
> | baz | qux | trust |
> | quux | quuz | glob |
${""}
More content here
${""}
> Table doubly nested in blockquote
> > | Column 1 | Column 2 | Column 3 |
> > |----------|----------|----------|
> > | foo | bar | blob |
> > | baz | qux | trust |
> > | quux | quuz | glob |
`,after:b`
> Table in blockquote
>
> | Column 1 | Column 2 | Column 3 |
> |----------|----------|----------|
> | foo | bar | blob |
> | baz | qux | trust |
> | quux | quuz | glob |
>
${""}
More content here
${""}
> Table doubly nested in blockquote
> >
> > | Column 1 | Column 2 | Column 3 |
> > |----------|----------|----------|
> > | foo | bar | blob |
> > | baz | qux | trust |
> > | quux | quuz | glob |
`})]}get optionBuilders(){return[]}};$r=B([E.register],$r);var Wn=class{constructor(){this.defaultEscapeCharacter='"';this.tryToEscapeSingleLineArrays=!1;this.forceYamlEscape=[]}},gn=class extends E{get OptionsClass(){return Wn}get name(){return"Escape YAML Special Characters"}get description(){return`Escapes colons with a space after them (: ), single quotes ('), and double quotes (") in YAML.`}get type(){return"YAML"}apply(t,n){return Me(t,r=>{let i=r.split(`
`),o=i.length;if(o<1)return r;let s=function(u){return u.length>1&&(u.startsWith("'")&&u.endsWith("'")||u.startsWith('"')&&u.endsWith('"'))},a=function(u,p){if(s(p))return u;let c=p.includes("'"),f=p.includes('"'),m=p.includes(": ");if(!c&&!f&&!m||c&&f)return u;let d;return c?d=u.replace(p,`"${p}"`):f?d=u.replace(p,`'${p}'`):d=u.replace(p,`${n.defaultEscapeCharacter}${p}${n.defaultEscapeCharacter}`),d};for(let u=0;u<o;u++){let p=i[u].trim(),c=p.indexOf(":"),f=c<0||c+1>=p.length,m=p.startsWith("-"),d=m&&p.length<2;if(f&&d)continue;let h=1;m||(h+=c);let g=p.substring(h).trim();if(g.startsWith("[")){if(n.tryToEscapeSingleLineArrays){if(g.length<3)continue;let y=g.substring(1,g.length-1).split(","),T=y.length;for(let O=0;O<T;O++){let C=y[O].trim();C.startsWith("[")&&(C=C.substring(1).trimStart()),C.endsWith("]")&&(C=C.substring(0,C.length-1).trimEnd()),y[O]=a(y[O],C)}i[u]=i[u].replace(g,"["+y.join(",")+"]")}continue}i[u]=a(i[u],g)}let l=i.join(`
`);for(let u of n.forceYamlEscape){let p=Te(l,u);if(p!=null){if(p.includes(`
`)||p.startsWith(" [")||s(p))continue;l=Oe(l,u,` ${n.defaultEscapeCharacter}${p}${n.defaultEscapeCharacter}`)}}return l})}get exampleBuilders(){return[new A({description:"YAML without anything to escape",before:b`
---
key: value
otherKey: []
---
`,after:b`
---
key: value
otherKey: []
---
`}),new A({description:"YAML with unescaped values",before:b`
---
key: value: with colon in the middle
secondKey: value with ' a single quote present
thirdKey: "already escaped: value"
fourthKey: value with " a double quote present
fifthKey: value with both ' " a double and single quote present is not escaped, but is invalid YAML
sixthKey: colon:between characters is fine
otherKey: []
---
`,after:b`
---
key: "value: with colon in the middle"
secondKey: "value with ' a single quote present"
thirdKey: "already escaped: value"
fourthKey: 'value with " a double quote present'
fifthKey: value with both ' " a double and single quote present is not escaped, but is invalid YAML
sixthKey: colon:between characters is fine
otherKey: []
---
`}),new A({description:"YAML with unescaped values in an expanded list with `Default Escape Character = '`",before:b`
---
key:
- value: with colon in the middle
- value with ' a single quote present
- 'already escaped: value'
- value with " a double quote present
- value with both ' " a double and single quote present is not escaped, but is invalid YAML
- colon:between characters is fine
---
`,after:b`
---
key:
- 'value: with colon in the middle'
- "value with ' a single quote present"
- 'already escaped: value'
- 'value with " a double quote present'
- value with both ' " a double and single quote present is not escaped, but is invalid YAML
- colon:between characters is fine
---
`,options:{defaultEscapeCharacter:"'"}}),new A({description:"YAML with unescaped values with arrays",before:b`
---
array: [value: with colon in the middle, value with ' a single quote present, "already escaped: value", value with " a double quote present, value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray: [[value: with colon in the middle, value with ' a single quote present], ["already escaped: value", value with " a double quote present], value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray2: [[value: with colon in the middle], value with ' a single quote present]
---
${""}
_Note that escaped commas in a YAML array will be treated as a separator._
`,after:b`
---
array: ["value: with colon in the middle", "value with ' a single quote present", "already escaped: value", 'value with " a double quote present', value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray: [["value: with colon in the middle", "value with ' a single quote present"], ["already escaped: value", 'value with " a double quote present'], value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray2: [["value: with colon in the middle"], "value with ' a single quote present"]
---
${""}
_Note that escaped commas in a YAML array will be treated as a separator._
`,options:{tryToEscapeSingleLineArrays:!0}}),new A({description:"Force YAML keys to be escaped with double quotes where not already escaped with `Force Yaml Escape on Keys = ['key', 'title', 'bool']`",before:b`
---
key: 'Already escaped value'
title: This is a title
bool: false
unaffected: value
---
${""}
_Note that the force Yaml key option should not be used with arrays._
`,after:b`
---
key: 'Already escaped value'
title: "This is a title"
bool: "false"
unaffected: value
---
${""}
_Note that the force Yaml key option should not be used with arrays._
`,options:{forceYamlEscape:["key","title","bool"],defaultEscapeCharacter:'"'}})]}get optionBuilders(){return[new ce({OptionsClass:Wn,name:"Default Escape Character",description:"The default character to use to escape YAML values when a single quote and double quote are not present.",optionsKey:"defaultEscapeCharacter",records:[{value:'"',description:"Use a double quote to escape if no single or double quote is present"},{value:"'",description:"Use a single quote to escape if no single or double quote is present"}]}),new re({OptionsClass:Wn,name:"Try to Escape Single Line Arrays",description:'Tries to escape array values assuming that an array starts with "[", ends with "]", and has items that are delimited by ",".',optionsKey:"tryToEscapeSingleLineArrays"}),new Ne({OptionsClass:Wn,name:"Force Yaml Escape on Keys",description:"Uses the Yaml escape character on the specified Yaml keys separated by a new line character if it is not already escaped. Do not use on Yaml arrays.",optionsKey:"forceYamlEscape"})]}get hasSpecialExecutionOrder(){return!0}};gn=B([E.register],gn);var _o=class{};B([E.noSettingControl()],_o.prototype,"fileName",2);var Nr=class extends E{get OptionsClass(){return _o}get name(){return"File Name Heading"}get description(){return"Inserts the file name as a H1 heading if no H1 heading exists."}get type(){return"Heading"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{if(r.match(/^#\s.*/m))return r;let o=n.fileName,s=r.indexOf(`
---`);return s=s==-1||!r.startsWith(`---
`)?0:s+5,nn(r,s,`# ${o}
`)})}get exampleBuilders(){return[new A({description:"Inserts an H1 heading",before:b`
This is a line of text
`,after:b`
# File Name
This is a line of text
`,options:{fileName:"File Name"}}),new A({description:"Inserts heading after YAML front matter",before:b`
---
title: My Title
---
This is a line of text
`,after:b`
---
title: My Title
---
# File Name
This is a line of text
`,options:{fileName:"File Name"}})]}get optionBuilders(){return[]}};Nr=B([E.register],Nr);var Sa=class{},zr=class extends E{get OptionsClass(){return Sa}get name(){return"Footnote after Punctuation"}get description(){return"Ensures that footnote references are placed after punctuation, not before."}get type(){return"Footnote"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/(?!^)(\[\^\w+\]) ?([,.;!:?])/gm,"$2$1"))}get exampleBuilders(){return[new A({description:"Placing footnotes after punctuation.",before:b`
Lorem[^1]. Ipsum[^2], doletes.
`,after:b`
Lorem.[^1] Ipsum,[^2] doletes.
`})]}get optionBuilders(){return[]}};zr=B([E.register],zr);var Aa=class{},yn=class extends E{get OptionsClass(){return Aa}get name(){return"Format Tags in YAML"}get description(){return"Remove Hashtags from tags in the YAML frontmatter, as they make the tags there invalid."}get type(){return"YAML"}apply(t,n){return Me(t,r=>r.replace(/\ntags:(.*?)(?=\n(?:[A-Za-z-]+?:|---))/s,function(i){return i.replaceAll("#","")}))}get exampleBuilders(){return[new A({description:"Format Tags in YAML frontmatter",before:b`
---
tags: #one #two #three #nested/four/five
---
`,after:b`
---
tags: one two three nested/four/five
---
`}),new A({description:"Format tags in array",before:b`
---
tags: [#one #two #three]
---
`,after:b`
---
tags: [one two three]
---
`}),new A({description:"Format tags in list",before:b`
---
tags:
- #tag1
- #tag2
---
`,after:b`
---
tags:
- tag1
- tag2
---
`})]}get optionBuilders(){return[]}get hasSpecialExecutionOrder(){return!0}};yn=B([E.register],yn);var ct=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=[]}},Hr=class extends E{get OptionsClass(){return ct}get name(){return"Format Yaml Array"}get description(){return"Allows for the formatting of regular yaml arrays as either multi-line or single-line and `tags` and `aliases` are allowed to have some Obsidian specific yaml formats. Note that single string to single-line goes from a single string entry to a single-line array if more than 1 entry is present. The same is true for single string to multi-line except it becomes a multi-line array."}get type(){return"YAML"}apply(t,n){return Me(t,r=>{let i=tt(r.replace(`---
`,"").replace(`
---`,""));if(!i)return r;let o=function(s){return s&&Object.prototype.toString.call(s)==="[object Date]"&&!isNaN(s)};if(n.formatAliasKey&&Object.keys(i).includes(Xe)&&(r=Oe(r,Xe,Je(Yi(bt(Te(r,Xe))),n.aliasArrayStyle))),n.formatTagKey&&Object.keys(i).includes(Pt)&&(r=Oe(r,Pt,Je(Hi(bt(Te(r,Pt))),n.tagArrayStyle))),n.formatArrayKeys){let s=[Xe,Pt,...n.forceMultiLineArrayStyle,...n.forceSingleLineArrayStyle];for(let a of Object.keys(i))s.includes(a)||!(typeof i[a]=="object"&&!o(i[a])&&i[a])||(r=Oe(r,a,Je(bt(Te(r,a)),n.defaultArrayStyle)))}for(let s of n.forceSingleLineArrayStyle)!Object.keys(i).includes(s)||(r=Oe(r,s,Je(bt(Te(r,s)),"single-line")));for(let s of n.forceMultiLineArrayStyle)!Object.keys(i).includes(s)||(r=Oe(r,s,Je(bt(Te(r,s)),"multi-line")));return r})}get exampleBuilders(){return[new A({description:"Format tags as a single-line array delimited by spaces and aliases as a multi-line array and format the key `test` to be a single-line array",before:b`
---
tags:
- computer
- research
aliases: Title 1, Title2
test: this is a value
---
${""}
# Notes:
${""}
Nesting yaml arrays may result in unexpected results.
${""}
Multi-line arrays will have empty values removed only leaving one if it is completely empty. The same is not true for single-line arrays as that is invalid yaml unless it comes as the last entry in the array.
`,after:b`
---
tags: [computer, research]
aliases:
- Title 1
- Title2
test: [this is a value]
---
${""}
# Notes:
${""}
Nesting yaml arrays may result in unexpected results.
${""}
Multi-line arrays will have empty values removed only leaving one if it is completely empty. The same is not true for single-line arrays as that is invalid yaml unless it comes as the last entry in the array.
`,options:{aliasArrayStyle:"multi-line",forceSingleLineArrayStyle:["test"]}}),new A({description:"Format tags as a single string with space delimiters, ignore aliases, and format regular yaml arrays as single-line arrays",before:b`
---
aliases: Typescript
types:
- thought provoking
- peer reviewed
tags: [computer, science, trajectory]
---
`,after:b`
---
aliases: Typescript
types: [thought provoking, peer reviewed]
tags: computer science trajectory
---
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}})]}get optionBuilders(){return[new ce({OptionsClass:ct,name:"Yaml aliases section style",description:"The style of the yaml aliases section",optionsKey:"aliasArrayStyle",records:[{value:"multi-line",description:"```aliases:\\n - Title```"},{value:"single-line",description:"```aliases: [Title]```"},{value:"single string comma delimited",description:"```aliases: Title, Other Title```"},{value:"single string to single-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```aliases: Title```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```aliases: Title```. If there is more than 1 element, it will be formatted like a multi-line array."}]}),new re({OptionsClass:ct,name:"Format yaml aliases section",description:"Turns on formatting for the yaml aliases section. You should not enable this option alongside the rule `YAML Title Alias` as they may not work well together or they may have different format styles selected causing unexpected results.",optionsKey:"formatAliasKey"}),new ce({OptionsClass:ct,name:"Yaml tags section style",description:"The style of the yaml tags section",optionsKey:"tagArrayStyle",records:[{value:"multi-line",description:"```tags:\\n - tag1```"},{value:"single-line",description:"```tags: [tag1]```"},{value:"single string to single-line",description:"Tags will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a multi-line array."},{value:"single-line space delimited",description:"```tags: [tag1 tag2]```"},{value:"single string space delimited",description:"```tags: tag1 tag2```"},{value:"single string comma delimited",description:"```tags: tag1, tag2```"}]}),new re({OptionsClass:ct,name:"Format yaml tags section",description:"Turns on formatting for the yaml tags section.",optionsKey:"formatTagKey"}),new ce({OptionsClass:ct,name:"Default yaml array section style",description:"The style of other yaml arrays that are not `tags`, `aliases` or in `Force key values to be single-line arrays` and `Force key values to be multi-line arrays`",optionsKey:"defaultArrayStyle",records:[{value:"multi-line",description:"```key:\\n - value```"},{value:"single-line",description:"```key: [value]```"}]}),new re({OptionsClass:ct,name:"Format yaml array sections",description:"Turns on formatting for regular yaml arrays",optionsKey:"formatArrayKeys"}),new Ne({OptionsClass:ct,name:"Force key values to be single-line arrays",description:"Forces the yaml array for the new line separated keys to be in single-line format (leave empty to disable this option)",optionsKey:"forceSingleLineArrayStyle"}),new Ne({OptionsClass:ct,name:"Force key values to be multi-line arrays",description:"Forces the yaml array for the new line separated keys to be in multi-line format (leave empty to disable this option)",optionsKey:"forceMultiLineArrayStyle"})]}};Hr=B([E.register],Hr);var Ca=class{},Yr=class extends E{get OptionsClass(){return Ca}get name(){return"Header Increment"}get description(){return"Heading levels should only increment by one level at a time"}get type(){return"Heading"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=r.split(`
`),o=0,s=0;for(let a=0;a<i.length;a++){let l=i[a].match(Mn);if(!l)continue;let u=l[2].length-s;u>o+1?(s+=u-(o+1),u=o+1):u<o&&(s-=o+s-l[2].length,s<=0&&(u=l[2].length,s=0)),i[a]=i[a].replace(Mn,`$1${"#".repeat(u)}$3$4`),o=u}return i.join(`
`)})}get exampleBuilders(){return[new A({description:"",before:b`
# H1
### H3
### H3
#### H4
###### H6
${""}
We skipped a 2nd level heading
`,after:b`
# H1
## H3
## H3
### H4
#### H6
${""}
We skipped a 2nd level heading
`}),new A({description:"Skipped headings in sections that would be decremented will result in those headings not having the same meaning",before:b`
# H1
### H3
${""}
We skip from 1 to 3
${""}
####### H7
${""}
We skip from 3 to 7 leaving out 4, 5, and 6. Thus headings level 4, 5, and 6 will be treated like H3 above until another H2 or H1 is encountered
${""}
###### H6
${""}
We skipped 6 previously so it will be treated the same as the H3 above since it was the next lowest header that was to be decremented
${""}
## H2
${""}
This resets the decrement section so the H6 below is decremented to an H3
${""}
###### H6
`,after:b`
# H1
## H3
${""}
We skip from 1 to 3
${""}
### H7
${""}
We skip from 3 to 7 leaving out 4, 5, and 6. Thus headings level 4, 5, and 6 will be treated like H3 above until another H2 or H1 is encountered
${""}
## H6
${""}
We skipped 6 previously so it will be treated the same as the H3 above since it was the next lowest header that was to be decremented
${""}
## H2
${""}
This resets the decrement section so the H6 below is decremented to an H3
${""}
### H6
`})]}get optionBuilders(){return[]}};Yr=B([E.register],Yr);var qr=class{constructor(){this.bottom=!0;this.emptyLineAfterYaml=!0}},jr=class extends E{get OptionsClass(){return qr}get name(){return"Heading blank lines"}get description(){return"All headings have a blank line both before and after (except where the heading is at the beginning or end of the document)."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>(n.bottom?(r=r.replace(/^(#+\s.*)/gm,`
$1
`),r=r.replace(/\n+(#+\s.*)/g,`
$1`),r=r.replace(/(^#+\s.*)\n+/gm,`$1
`)):(r=r.replace(/(^#+\s.*)\n+/gm,`$1
`),r=r.replace(/\n+(#+\s.*)/g,`
$1`)),r=r.replace(/^\n+(#+\s.*)/,"$1"),r=r.replace(/(#+\s.*)\n+$/,"$1"),n.emptyLineAfterYaml||(r=r.replace(new RegExp("("+ve.source+")\\n+(#+\\s.*)"),`$1
$5`)),r))}get exampleBuilders(){return[new A({description:"Headings should be surrounded by blank lines",before:b`
# H1
## H2
${""}
${""}
# H1
line
## H2
${""}
`,after:b`
# H1
${""}
## H2
${""}
# H1
${""}
line
${""}
## H2
`}),new A({description:"With `Bottom=false`",before:b`
# H1
line
## H2
# H1
line
`,after:b`
# H1
line
${""}
## H2
${""}
# H1
line
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new A({description:"Empty line before header and after Yaml is removed with `Empty Line Between Yaml and Header=true`",before:b`
---
key: value
---
# Header
Paragraph here...
`,after:b`
---
key: value
---
# Header
Paragraph here...
`,options:{bottom:!0,emptyLineAfterYaml:!1}})]}get optionBuilders(){return[new re({OptionsClass:qr,name:"Bottom",description:"Insert a blank line after headings",optionsKey:"bottom"}),new re({OptionsClass:qr,name:"Empty Line Between Yaml and Header",description:"Keep the empty line between the Yaml frontmatter and header",optionsKey:"emptyLineAfterYaml"})]}};jr=B([E.register],jr);var Io=class{constructor(){this.textToInsert=["aliases: ","tags: "]}},Kr=class extends E{get OptionsClass(){return Io}get name(){return"Insert YAML attributes"}get description(){return"Inserts the given YAML attributes into the YAML frontmatter. Put each attribute on a single line."}get type(){return"YAML"}apply(t,n){return t=yt(t),Me(t,r=>{let i=n.textToInsert.reverse(),o=tt(r.match(ve)[1]);for(let s of i){let a=s.split(":")[0];Object.prototype.hasOwnProperty.call(o,a)||(r=r.replace(/^---\n/,Be(`---
${s}
`)))}return r})}get exampleBuilders(){return[new A({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags: doc\nanimal: dog`",before:b`
---
animal: cat
---
`,after:b`
---
aliases:
tags: doc
animal: cat
---
`,options:{textToInsert:["aliases:","tags: doc","animal: dog"]}})]}get optionBuilders(){return[new Ne({OptionsClass:Io,name:"Text to insert",description:"Text to insert into the YAML frontmatter",optionsKey:"textToInsert"})]}};Kr=B([E.register],Kr);var Ea=class{},Vr=class extends E{get OptionsClass(){return Ea}get name(){return"Line Break at Document End"}get description(){return"Ensures that there is exactly one line break at the end of a document."}get type(){return"Spacing"}apply(t,n){return t=t.replace(/\n+$/g,""),t+=`
`,t}get exampleBuilders(){return[new A({description:"Appending a line break to the end of the document.",before:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
`,after:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
`}),new A({description:"Removing trailing line breaks to the end of the document, except one.",before:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
${""}
${""}
`,after:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
`})]}get optionBuilders(){return[]}};Vr=B([E.register],Vr);var La=class{},Wr=class extends E{get OptionsClass(){return La}get name(){return"Move Footnotes to the bottom"}get description(){return"Move all footnotes to the bottom of the document."}get type(){return"Footnote"}apply(t,n){return z([v.code,v.yaml],t,r=>nc(r))}get exampleBuilders(){return[new A({description:"Moving footnotes to the bottom",before:b`
Lorem ipsum, consectetur adipiscing elit. [^1] Donec dictum turpis quis ipsum pellentesque.
${""}
[^1]: first footnote
${""}
Quisque lorem est, fringilla sed enim at, sollicitudin lacinia nisi.[^2]
[^2]: second footnote
${""}
Maecenas malesuada dignissim purus ac volutpat.
`,after:b`
Lorem ipsum, consectetur adipiscing elit. [^1] Donec dictum turpis quis ipsum pellentesque.
${""}
Quisque lorem est, fringilla sed enim at, sollicitudin lacinia nisi.[^2]
Maecenas malesuada dignissim purus ac volutpat.
${""}
[^1]: first footnote
[^2]: second footnote
`})]}get optionBuilders(){return[]}};Wr=B([E.register],Wr);var Gr=class{constructor(){this.tagArrayStyle="single-line";this.removeHashtagsFromTagsInBody=!1}},Ur=class extends E{get OptionsClass(){return Gr}get name(){return"Move Tags to Yaml"}get description(){return"Move all tags to Yaml frontmatter of the document."}get type(){return"YAML"}apply(t,n){return z([v.code,v.inlineCode,v.math],t,r=>{let i=r.match(fr);return i&&(r=yt(r),r=Me(r,o=>{o=o.replace(`---
`,"").replace("---","");let s=Hi(bt(Te(o,Pt))),a=new Set;if(typeof s=="string")a.add(s),s=[s];else if(s!=null)for(let u of s)a.add(u);else s=[];for(let u of i){let p=u.trim().substring(1);a.has(p)||(a.add(p),s.push(p))}return`---
${Oe(o,Pt,Je(s,n.tagArrayStyle))}---`}),n.removeHashtagsFromTagsInBody&&(r=r.replace(fr,o=>{let s=o.indexOf("#");return o.substring(0,s)+o.substring(s+1)}))),r})}get exampleBuilders(){return[new A({description:"Move tags from body to Yaml",before:b`
Text has to do with #test and #markdown
${""}
#test content here
\`\`\`
#ignored
Code block content is ignored
\`\`\`
${""}
This inline code \`#ignored content\`
`,after:b`
---
tags: [test, markdown]
---
Text has to do with #test and #markdown
${""}
#test content here
\`\`\`
#ignored
Code block content is ignored
\`\`\`
${""}
This inline code \`#ignored content\`
`}),new A({description:"Move tags from body to Yaml with existing tags retains the already existing ones and only adds new ones",before:b`
---
tags: [test, tag2]
---
Text has to do with #test and #markdown
`,after:b`
---
tags: [test, tag2, markdown]
---
Text has to do with #test and #markdown
`}),new A({description:"Move tags to Yaml frontmatter and then remove hashtags in body content tags `Remove the hashtag from tags in content body = true` ",before:b`
---
tags: [test, tag2]
---
Text has to do with #test and #markdown
`,after:b`
---
tags: [test, tag2, markdown]
---
Text has to do with test and markdown
`,options:{removeHashtagsFromTagsInBody:!0}})]}get optionBuilders(){return[new ce({OptionsClass:Gr,name:"Yaml tags section style",description:"The style of the Yaml tags section",optionsKey:"tagArrayStyle",records:[{value:"multi-line",description:"```tags:\\n - tag1```"},{value:"single-line",description:"```tags: [tag1]```"},{value:"single string to single-line",description:"Tags will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a multi-line array."},{value:"single-line space delimited",description:"```tags: [tag1 tag2]```"},{value:"single string space delimited",description:"```tags: tag1 tag2```"},{value:"single string comma delimited",description:"```tags: tag1, tag2```"}]}),new re({OptionsClass:Gr,name:"Remove the hashtag from tags in content body",description:"Removes `#` from tags in content body after moving them to the Yaml frontmatter",optionsKey:"removeHashtagsFromTagsInBody"})]}};Ur=B([E.register],Ur);var _a=class{},Qr=class extends E{get OptionsClass(){return _a}get name(){return"No Bare URLs"}get description(){return"Encloses bare URLs with angle brackets except when enclosed in back ticks, square braces, or single or double quotes."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.image],t,r=>{let i=r.match(/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s`\]'">]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s`\]'">]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s`\]'">]{2,}|www\.[a-zA-Z0-9]+\.[^\s`\]'">]{2,})/gi);if(!i)return r;let o=0,s=i.length;for(let a=0;a<s;a++){let l=i[a],u=r.indexOf(l,o),p=u+l.length,c=u===0?void 0:r.charAt(u-1),f=p>=r.length?void 0:r.charAt(p);if(c!=null&&(c==="`"||c==='"'||c==="'"||c==="[")&&f!=null&&(f==="`"||f==='"'||f==="'"||f==="]")){o=u+l.length;continue}if(c!=null&&c==="<"&&f!=null&&f===">"){let m=u-1;for(;m>0&&r.charAt(m-1)==="<";)m--;let d=p;for(;d<r.length-1&&r.charAt(d+1)===">";)d++;r=Re(r,m,d+1,"<"+l+">"),o=u+l.length;continue}r=Re(r,u,u+l.length,"<"+l+">"),o=u+l.length+2}return r})}get exampleBuilders(){return[new A({description:"Make sure that links are inside of angle brackets when not in single quotes('), double quotes(\"), or backticks(`)",before:b`
https://github.com
braces around url should stay the same: [https://github.com]
backticks around url should stay the same: \`https://github.com\`
Links mid-sentence should be updated like https://google.com will be.
'https://github.com'
"https://github.com"
<https://github.com>
links should stay the same: [](https://github.com)
https://gitlab.com
`,after:b`
<https://github.com>
braces around url should stay the same: [https://github.com]
backticks around url should stay the same: \`https://github.com\`
Links mid-sentence should be updated like <https://google.com> will be.
'https://github.com'
"https://github.com"
<https://github.com>
links should stay the same: [](https://github.com)
<https://gitlab.com>
`}),new A({description:"Angle brackets are added if the url is not the only text in the single quotes('), double quotes(\"), or backticks(`)",before:b`
[https://github.com some text here]
backticks around a url should stay the same, but only if the only contents of the backticks: \`https://github.com some text here\`
single quotes around a url should stay the same, but only if the contents of the single quotes is the url: 'https://github.com some text here'
double quotes around a url should stay the same, but only if the contents of the double quotes is the url: "https://github.com some text here"
`,after:b`
[<https://github.com> some text here]
backticks around a url should stay the same, but only if the only contents of the backticks: \`<https://github.com> some text here\`
single quotes around a url should stay the same, but only if the contents of the single quotes is the url: '<https://github.com> some text here'
double quotes around a url should stay the same, but only if the contents of the double quotes is the url: "<https://github.com> some text here"
`}),new A({description:"Multiple angle brackets at the start and or end of a url will be reduced down to 1",before:b`
<<https://github.com>
<https://google.com>>
<<https://gitlab.com>>
`,after:b`
<https://github.com>
<https://google.com>
<https://gitlab.com>
`})]}get optionBuilders(){return[]}};Qr=B([E.register],Qr);var Xr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Zr=class extends E{get OptionsClass(){return Xr}get name(){return"Ordered List Style"}get description(){return"Makes sure that ordered lists follow the style specified."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.tag],t,r=>fc(r,n.numberStyle,n.listEndStyle))}get exampleBuilders(){return[new A({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:b`
1. Item 1
2. Item 2
4. Item 3
${""}
Some text here
${""}
1. Item 1
1. Item 2
1. Item 3
`,after:b`
1. Item 1
2. Item 2
3. Item 3
${""}
Some text here
${""}
1. Item 1
2. Item 2
3. Item 3
`}),new A({description:"Nested ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:b`
1. Item 1
2. Item 2
1. Subitem 1
5. Subitem 2
2. Subitem 3
4. Item 3
`,after:b`
1. Item 1
2. Item 2
1. Subitem 1
2. Subitem 2
3. Subitem 3
3. Item 3
`}),new A({description:"Ordered list in blockquote has list items set to '1.' when Number Style is `lazy`.",before:b`
> 1. Item 1
> 4. Item 2
> > 1. Subitem 1
> > 5. Subitem 2
> > 2. Subitem 3
`,after:b`
> 1. Item 1
> 1. Item 2
> > 1. Subitem 1
> > 1. Subitem 2
> > 1. Subitem 3
`,options:{numberStyle:"lazy"}}),new A({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:b`
> 1. Item 1
> 4. Item 2
> > 1. Subitem 1
> > 5. Subitem 2
> > 2. Subitem 3
`,after:b`
> 1. Item 1
> 2. Item 2
> > 1. Subitem 1
> > 2. Subitem 2
> > 3. Subitem 3
`}),new A({description:"Nested ordered list has list items set to '1)' when Number Style is `lazy` and Ordered List Indicator End Style is `)`.",before:b`
1. Item 1
2. Item 2
1. Subitem 1
5. Subitem 2
2. Subitem 3
4. Item 3
`,after:b`
1) Item 1
1) Item 2
1) Subitem 1
1) Subitem 2
1) Subitem 3
1) Item 3
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new ce({OptionsClass:Xr,name:"Number Style",description:"The number style used in ordered list indicators",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 number 1"}]}),new ce({OptionsClass:Xr,name:"Ordered List Indicator End Style",description:"The ending character of an ordered list indicator",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)`)"}]})]}};Zr=B([E.register],Zr);var Ia=class{},Jr=class extends E{get OptionsClass(){return Ia}get name(){return"Paragraph blank lines"}get description(){return"All paragraphs should have exactly one blank line both before and after."}get type(){return"Spacing"}apply(t,n){return z([v.obsidianMultiLineComments,v.yaml],t,ic)}get exampleBuilders(){return[new A({description:"Paragraphs should be surrounded by blank lines",before:b`
# H1
Newlines are inserted.
A paragraph is a line that starts with a letter.
`,after:b`
# H1
${""}
Newlines are inserted.
${""}
A paragraph is a line that starts with a letter.
`})]}get optionBuilders(){return[]}};Jr=B([E.register],Jr);var Fa=class{},ei=class extends E{get OptionsClass(){return Fa}get name(){return"Proper Ellipsis"}get description(){return"Replaces three consecutive dots with an ellipsis."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replaceAll("...","\u2026"))}get exampleBuilders(){return[new A({description:"Replacing three consecutive dots with an ellipsis.",before:b`
Lorem (...) Impsum.
`,after:b`
Lorem () Impsum.
`})]}get optionBuilders(){return[]}};ei=B([E.register],ei);var Ba=class{},ti=class extends E{get OptionsClass(){return Ba}get name(){return"Re-Index Footnotes"}get description(){return"Re-indexes footnote keys and footnote, based on the order of occurrence (NOTE: This rule deliberately does *not* preserve the relation between key and footnote, to be able to re-index duplicate keys.)"}get type(){return"Footnote"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=0;return r=r.replace(/^\[\^\w+\]: /gm,function(){return i++,"[^"+String(i)+"]: "}),i=0,r=r.replace(/(?!^)\[\^\w+\]/gm,function(){return i++,"[^"+String(i)+"]"}),r})}get exampleBuilders(){return[new A({description:"Re-indexing footnotes after having deleted previous footnotes",before:b`
Lorem ipsum at aliquet felis.[^3] Donec dictum turpis quis pellentesque,[^5] et iaculis tortor condimentum.
${""}
[^3]: first footnote
[^5]: second footnote
`,after:b`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^2] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^2]: second footnote
`}),new A({description:"Re-indexing footnotes after inserting a footnote between",before:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.[^1] Aenean at aliquet felis. Donec dictum turpis quis ipsum pellentesque, et iaculis tortor condimentum.[^1a] Vestibulum nec blandit felis, vulputate finibus purus.[^2] Praesent quis iaculis diam.
${""}
[^1]: first footnote
[^1a]: third footnote, inserted later
[^2]: second footnotes
`,after:b`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.[^1] Aenean at aliquet felis. Donec dictum turpis quis ipsum pellentesque, et iaculis tortor condimentum.[^2] Vestibulum nec blandit felis, vulputate finibus purus.[^3] Praesent quis iaculis diam.
${""}
[^1]: first footnote
[^2]: third footnote, inserted later
[^3]: second footnotes
`}),new A({description:"Re-indexing duplicate footnote keys",before:b`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^1] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^1]: second footnote
`,after:b`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^2] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^2]: second footnote
`})]}get optionBuilders(){return[]}};ti=B([E.register],ti);var Ma=class{},ni=class extends E{get OptionsClass(){return Ma}get name(){return"Remove Consecutive List Markers"}get description(){return"Removes consecutive list markers. Useful when copy-pasting list items."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/^([ |\t]*)- - \b/gm,"$1- "))}get exampleBuilders(){return[new A({description:"Removing consecutive list markers.",before:b`
- item 1
- - copypasted item A
- item 2
- indented item
- - copypasted item B
`,after:b`
- item 1
- copypasted item A
- item 2
- indented item
- copypasted item B
`})]}get optionBuilders(){return[]}};ni=B([E.register],ni);var bn=class extends E{get OptionsClass(){return bn}get name(){return"Remove Empty Lines Between List Markers and Checklists"}get description(){return"There should not be any empty lines between list markers and checklists."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.thematicBreak],t,r=>{let i=function(p,c,f){let m=new RegExp(`^${c}
{2,}${c}$`,"gm"),d,h=p;do d=h.match(m),h=h.replaceAll(m,f);while(d);return h};return r=i(r,"(( |\\t)*- \\[( |x)\\]( |\\t)+.+)",`$1
$5`),r=i(r,"(( |\\t)*\\d+\\.( |\\t)+.+)",`$1
$4`),r=i(r,"(( |\\t)*\\+( |\\t)+.+)",`$1
$4`),r=i(r,"(( |\\t)*-(?! \\[( |x)\\])( |\\t)+.+)",`$1
$5`),i(r,"(( |\\t)*\\*( |\\t)+.+)",`$1
$4`)})}get exampleBuilders(){return[new A({description:"",before:b`
1. Item 1
${""}
2. Item 2
${""}
- Item 1
${""}
\t- Subitem 1
${""}
- Item 2
${""}
- [x] Item 1
${""}
\t- [ ] Subitem 1
${""}
- [ ] Item 2
${""}
+ Item 1
${""}
\t+ Subitem 1
${""}
+ Item 2
${""}
* Item 1
${""}
\t* Subitem 1
${""}
* Item 2
`,after:b`
1. Item 1
2. Item 2
${""}
- Item 1
\t- Subitem 1
- Item 2
${""}
- [x] Item 1
\t- [ ] Subitem 1
- [ ] Item 2
${""}
+ Item 1
\t+ Subitem 1
+ Item 2
${""}
* Item 1
\t* Subitem 1
* Item 2
`})]}get optionBuilders(){return[]}};bn=B([E.register],bn);var Ra=class{},ri=class extends E{get OptionsClass(){return Ra}get name(){return"Remove Empty List Markers"}get description(){return"Removes empty list markers, i.e. list items without content."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=/^\s*(>\s*)*(-|\*|\+|\d+[.)]|- (\[( |x)\]))\s*?$/gm;return r=r.replace(new RegExp(i.source+"\\n","gm"),""),r=r.replace(new RegExp("\\n"+i.source,"gm"),""),r.replace(i,"")})}get exampleBuilders(){return[new A({description:"Removes empty list markers.",before:b`
- item 1
-
- item 2
${""}
* list 2 item 1
*
* list 2 item 2
${""}
+ list 3 item 1
+
+ list 3 item 2
`,after:b`
- item 1
- item 2
${""}
* list 2 item 1
* list 2 item 2
${""}
+ list 3 item 1
+ list 3 item 2
`}),new A({description:"Removes empty ordered list markers.",before:b`
1. item 1
2.
3. item 2
${""}
1. list 2 item 1
2. list 2 item 2
3. ${""}
${""}
_Note that this rule does not make sure that the ordered list is sequential after removal_
`,after:b`
1. item 1
3. item 2
${""}
1. list 2 item 1
2. list 2 item 2
${""}
_Note that this rule does not make sure that the ordered list is sequential after removal_
`}),new A({description:"Removes empty checklist markers.",before:b`
- [ ] item 1
- [x]
- [ ] item 2
- [ ] ${""}
${""}
_Note that this will affect checked and uncheck checked list items_
`,after:b`
- [ ] item 1
- [ ] item 2
${""}
_Note that this will affect checked and uncheck checked list items_
`}),new A({description:"Removes empty list, checklist, and ordered list markers in callouts/blockquotes",before:b`
> Checklist in blockquote
> - [ ] item 1
> - [x]
> - [ ] item 2
> - [ ] ${""}
${""}
> Ordered List in blockquote
> > 1. item 1
> > 2.
> > 3. item 2
> > 4. ${""}
${""}
> Regular lists in blockquote
>
> - item 1
> -
> - item 2
>
> List 2
>
> * item 1
> *
> * list 2 item 2
>
> List 3
>
> + item 1
> +
> + item 2
`,after:b`
> Checklist in blockquote
> - [ ] item 1
> - [ ] item 2
${""}
> Ordered List in blockquote
> > 1. item 1
> > 3. item 2
${""}
> Regular lists in blockquote
>
> - item 1
> - item 2
>
> List 2
>
> * item 1
> * list 2 item 2
>
> List 3
>
> + item 1
> + item 2
`})]}get optionBuilders(){return[]}};ri=B([E.register],ri);var Da=class{},ii=class extends E{get OptionsClass(){return Da}get name(){return"Remove Hyphenated Line Breaks"}get description(){return"Removes hyphenated line breaks. Useful when pasting text from textbooks."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/\b[-] \b/g,""))}get exampleBuilders(){return[new A({description:"Removing hyphenated line breaks.",before:b`
This text has a linebr eak.
`,after:b`
This text has a linebreak.
`})]}get optionBuilders(){return[]}};ii=B([E.register],ii);var Pa=class{},oi=class extends E{get OptionsClass(){return Pa}get name(){return"Remove link spacing"}get description(){return"Removes spacing around link text."}get type(){return"Spacing"}apply(t,n){return t=oc(t),ru(t)}get exampleBuilders(){return[new A({description:"Space in regular markdown link text",before:b`
[ here is link text1 ](link_here)
[ here is link text2](link_here)
[here is link text3 ](link_here)
[here is link text4](link_here)
[\there is link text5\t](link_here)
[](link_here)
**Note that image markdown syntax does not get affected even if it is transclusion:**
![\there is link text6 ](link_here)
`,after:b`
[here is link text1](link_here)
[here is link text2](link_here)
[here is link text3](link_here)
[here is link text4](link_here)
[here is link text5](link_here)
[](link_here)
**Note that image markdown syntax does not get affected even if it is transclusion:**
![\there is link text6 ](link_here)
`}),new A({description:"Space in wiki link text",before:b`
[[link_here| here is link text1 ]]
[[link_here|here is link text2 ]]
[[link_here| here is link text3]]
[[link_here|here is link text4]]
[[link_here|\there is link text5\t]]
![[link_here|\there is link text6\t]]
[[link_here]]
`,after:b`
[[link_here|here is link text1]]
[[link_here|here is link text2]]
[[link_here|here is link text3]]
[[link_here|here is link text4]]
[[link_here|here is link text5]]
![[link_here|here is link text6]]
[[link_here]]
`})]}get optionBuilders(){return[]}};oi=B([E.register],oi);var $a=class{},si=class extends E{get OptionsClass(){return $a}get name(){return"Remove Multiple Spaces"}get description(){return"Removes two or more consecutive spaces. Ignores spaces at the beginning and ending of the line. "}get type(){return"Content"}apply(t,n){return z([v.table,v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/(?!^>)([^\s])( ){2,}([^\s])/gm,"$1 $3"))}get exampleBuilders(){return[new A({description:"Removing double and triple space.",before:b`
Lorem ipsum dolor sit amet.
`,after:b`
Lorem ipsum dolor sit amet.
`})]}get optionBuilders(){return[]}};si=B([E.register],si);var Na=class{},ai=class extends E{get OptionsClass(){return Na}get name(){return"Remove Space around Fullwidth Characters"}get description(){return"Ensures that fullwidth characters are not followed by whitespace (either single spaces or a tab). Note that this may causes issues with markdown format in some cases."}get type(){return"Spacing"}apply(t,n){let r=/([ \t])+([\u2013\u2014\u2026\u3001\u3002\u300a\u300d-\u300f\u3014\u3015\u3008-\u3011\uff00-\uffff])/g,i=/([\u2013\u2014\u2026\u3001\u3002\u300a\u300d-\u300f\u3014\u3015\u3008-\u3011\uff00-\uffff])([ \t])+/g,o=function(a){return a.replace(r,"$2").replace(i,"$1")},s=z([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.list],t,o);return s=lc(s,o),s}get exampleBuilders(){return[new A({description:"Remove Spaces and Tabs around Fullwidth Characters",before:b`
Full list of affected characters: _
This is a fullwidth period\t with text after it.
This is a fullwidth comma\t with text after it.
This is a fullwidth left parenthesis \twith text after it.
This is a fullwidth right parenthesis with text after it.
This is a fullwidth colon with text after it.
This is a fullwidth semicolon with text after it.
emoves space at start of line
`,after:b`
Full list of affected characters:_
This is a fullwidth periodwith text after it.
This is a fullwidth commawith text after it.
This is a fullwidth left parenthesiswith text after it.
This is a fullwidth right parenthesiswith text after it.
This is a fullwidth colonwith text after it.
This is a fullwidth semicolonwith text after it.
emoves space at start of line
`}),new A({description:"Fullwidth Characters in List Do not Affect List Markdown Syntax",before:b`
# List indicators should not have the space after them removed if they are followed by a fullwidth character
${""}
- contents here
- \t more contents here more text here
+ \t another item here
* one last item here
${""}
# Nested in a block quote
${""}
> - contents here
> - \t more contents here more text here
> + \t another item here
> * one last item here
${""}
# Doubly nested in a block quote
${""}
> The following is doubly nested
> > - contents here
> > - \t more contents here more text here
> > + \t another item here
> > * one last item here
`,after:b`
# List indicators should not have the space after them removed if they are followed by a fullwidth character
${""}
- contents here
- more contents heremore text here
+ another item here
* one last item here
${""}
# Nested in a block quote
${""}
> - contents here
> - more contents heremore text here
> + another item here
> * one last item here
${""}
# Doubly nested in a block quote
${""}
> The following is doubly nested
> > - contents here
> > - more contents heremore text here
> > + another item here
> > * one last item here
`})]}get optionBuilders(){return[]}};ai=B([E.register],ai);var Fo=class{constructor(){this.yamlKeysToRemove=[]}},li=class extends E{get OptionsClass(){return Fo}get name(){return"Remove YAML Keys"}get description(){return"Removes the YAML keys specified"}get type(){return"YAML"}apply(t,n){let r=n.yamlKeysToRemove,i=t.match(ve);if(!i||r.length===0)return t;let o=i[1];for(let s of r){let a=s.trim();a.endsWith(":")&&(a=a.substring(0,a.length-1)),o=tn(o,a)}return t.replace(i[1],o)}get exampleBuilders(){return[new A({description:'Removes the values specified in `YAML Keys to Remove` = "status:\nkeywords\ndate"',before:b`
---
language: Typescript
type: programming
tags: computer
keywords:
- keyword1
- keyword2
status: WIP
date: 02/15/2022
---
${""}
# Header Context
${""}
Text
`,after:b`
---
language: Typescript
type: programming
tags: computer
---
${""}
# Header Context
${""}
Text
`,options:{yamlKeysToRemove:["status:","keywords","date"]}})]}get optionBuilders(){return[new Ne({OptionsClass:Fo,name:"YAML Keys to Remove",description:"The yaml keys to remove from the yaml frontmatter with or without colons",optionsKey:"yamlKeysToRemove"})]}};li=B([E.register],li);var za=class{},ui=class extends E{get OptionsClass(){return za}get name(){return"Space after list markers"}get description(){return"There should be a single space after list markers and checkboxes."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>(r=r.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),r.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")))}get exampleBuilders(){return[new A({description:"",before:b`
1. Item 1
2. Item 2
${""}
- [ ] Item 1
- [x] Item 2
\t- [ ] Item 3
`,after:b`
1. Item 1
2. Item 2
${""}
- [ ] Item 1
- [x] Item 2
\t- [ ] Item 3
`})]}get optionBuilders(){return[]}};ui=B([E.register],ui);var Ha=class{},pi=class extends E{get OptionsClass(){return Ha}get name(){return"Space between Chinese and English or numbers"}get description(){return"Ensures that Chinese and English or numbers are separated by a single space. Follows these [guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines)"}get type(){return"Spacing"}apply(t,n){let r=/([\u4e00-\u9fa5])( *)(\[[^[]*\]\(.*\)|`[^`]*`|\w+|[-+'"([{¥$]|\*[^*])/gm,i=/(\[[^[]*\]\(.*\)|`[^`]*`|\w+|[-+;:'"°%$)\]}]|[^*]\*)( *)([\u4e00-\u9fa5])/gm,o=function(a){return a.replace(r,"$1 $3").replace(i,"$1 $3")},s=z([v.code,v.inlineCode,v.yaml,v.image,v.link,v.wikiLink,v.tag,v.italics,v.bold,v.math,v.inlineMath],t,o);return s=sc(s,o),s=ac(s,o),s}get exampleBuilders(){return[new A({description:"Space between Chinese and English",before:b`
中文字符串english中文字符串
`,after:b`
中文字符串 english 中文字符串
`}),new A({description:"Space between Chinese and link",before:b`
中文字符串[english](http://example.com)中文字符串。
`,after:b`
中文字符串 [english](http://example.com) 中文字符串。
`}),new A({description:"Space between Chinese and inline code block",before:b`
中文字符串\`code\`中文字符串。
`,after:b`
中文字符串 \`code\` 中文字符串。
`}),new A({description:"No space between Chinese and English in tag",before:b`
#标签A #标签2标签
`,after:b`
#标签A #标签2标签
`}),new A({description:"Make sure that spaces are not added between italics and chinese characters to preserve markdown syntax",before:b`
_这是一个数学公式_
*这是一个数学公式english*
${""}
# Handling bold and italics nested in each other is not supported at this time
${""}
**_这是一_个数学公式**
*这是一hello__个数学world公式__*
`,after:b`
_这是一个数学公式_
*这是一个数学公式 english*
${""}
# Handling bold and italics nested in each other is not supported at this time
${""}
**_ 这是一 _ 个数学公式**
*这是一 hello__ 个数学 world 公式 __*
`}),new A({description:"Images and links are ignored",before:b`
[[这是一个数学公式english]]
![[这是一个数学公式english.jpg]]
[这是一个数学公式english](这是一个数学公式english.md)
![这是一个数学公式english](这是一个数学公式english.jpg)
`,after:b`
[[这是一个数学公式english]]
![[这是一个数学公式english.jpg]]
[这是一个数学公式english](这是一个数学公式english.md)
![这是一个数学公式english](这是一个数学公式english.jpg)
`})]}get optionBuilders(){return[]}};pi=B([E.register],pi);var Bo=class{constructor(){this.style="consistent"}},ci=class extends E{get OptionsClass(){return Bo}get name(){return"Strong Style"}get description(){return"Makes sure the strong style is consistent."}get type(){return"Content"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.math,v.inlineMath],t,r=>ho(r,n.style,"strong"))}get exampleBuilders(){return[new A({description:"Strong indicators should use underscores when style is set to 'underscore'",before:b`
# Strong/Bold Cases
${""}
**Test bold**
** Test not bold **
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is ***bold and emphasized***
This is ***nested bold** and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
*Test emphasis*
${""}
* List Item1 with **bold text**
* List Item2
`,after:b`
# Strong/Bold Cases
${""}
__Test bold__
** Test not bold **
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is __*nested emphasis* and ending bold__
${""}
*Test emphasis*
${""}
* List Item1 with __bold text__
* List Item2
`,options:{style:"underscore"}}),new A({description:"Strong indicators should use asterisks when style is set to 'asterisk'",before:b`
# Strong/Bold Cases
${""}
__Test bold__
__ Test not bold __
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is ___bold and emphasized___
This is ___nested bold__ and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
_Test emphasis_
`,after:b`
# Strong/Bold Cases
${""}
**Test bold**
__ Test not bold __
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is _**bold and emphasized**_
This is _**nested bold** and ending emphasized_
This is **_nested emphasis_ and ending bold**
${""}
_Test emphasis_
`,options:{style:"asterisk"}}),new A({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:b`
# Strong First Strong Is an Asterisk
${""}
**First bold**
This is __bold__ mid sentence
This is __bold__ mid sentence with a second **bold** on the same line
This is ___bold and emphasized___
This is *__nested bold__ and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
__Test bold__
`,after:b`
# Strong First Strong Is an Asterisk
${""}
**First bold**
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is _**bold and emphasized**_
This is ***nested bold** and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
**Test bold**
`,options:{style:"consistent"}}),new A({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:b`
# Strong First Strong Is an Underscore
${""}
__First bold__
This is **bold** mid sentence
This is **bold** mid sentence with a second __bold__ on the same line
This is **_bold and emphasized_**
This is ***nested bold** and ending emphasized*
This is ___nested emphasis_ and ending bold__
${""}
**Test bold**
`,after:b`
# Strong First Strong Is an Underscore
${""}
__First bold__
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is ___bold and emphasized___
This is *__nested bold__ and ending emphasized*
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ce({OptionsClass:Bo,name:"Style",description:"The style used to denote strong/bolded content",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of strong is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure ** is the strong indicator"},{value:"underscore",description:"Makes sure __ is the strong indicator"}]})]}};ci=B([E.register],ci);var Mo=class{constructor(){this.twoSpaceLineBreak=!1}},fi=class extends E{get OptionsClass(){return Mo}get name(){return"Trailing spaces"}get description(){return"Removes extra spaces after every line."}get type(){return"Spacing"}apply(t,n){return z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>n.twoSpaceLineBreak?(r=r.replace(/(\S)[ \t]$/gm,"$1"),r=r.replace(/(\S)[ \t]{3,}$/gm,"$1"),r=r.replace(/(\S)( ?\t\t? ?)$/gm,"$1"),r):r.replace(/[ \t]+$/gm,""))}get exampleBuilders(){return[new A({description:"Removes trailing spaces and tabs.",before:b`
# H1
Line with trailing spaces and tabs. ${""}
`,after:b`
# H1
Line with trailing spaces and tabs.
`}),new A({description:"With `Two Space Linebreak = true`",before:b`
# H1
Line with trailing spaces and tabs. ${""}
`,after:b`
# H1
Line with trailing spaces and tabs. ${""}
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new re({OptionsClass:Mo,name:"Two Space Linebreak",description:'Ignore two spaces followed by a line break ("Two Space Rule").',optionsKey:"twoSpaceLineBreak"})]}};fi=B([E.register],fi);var Ya=class{},mi=class extends E{get OptionsClass(){return Ya}get name(){return"Two Spaces Between Lines with Content"}get description(){return"Makes sure that two spaces are added to the ends of lines with content continued on the next line for paragraphs, blockquotes, and list items"}get type(){return"Content"}apply(t,n){return z([v.obsidianMultiLineComments,v.yaml],t,rc)}get exampleBuilders(){return[new A({description:"Make sure two spaces are added to the ends of lines that have content on it and the next line for lists, blockquotes, and paragraphs",before:b`
# Heading 1
First paragraph stays as the first paragraph
${""}
- list item 1
- list item 2
Continuation of list item 2
- list item 3
${""}
1. Item 1
2. Item 2
Continuation of item 3
3. Item 3
${""}
Paragraph for with link [[other file name]].
Continuation *of* the paragraph has \`inline code block\` __in it__.
Even more continuation
${""}
Paragraph lines that end in <br/>
Or lines that end in <br>
Are left alone
Since they mean the same thing
${""}
\`\`\` text
Code blocks are ignored
Even with multiple lines
\`\`\`
Another paragraph here
${""}
> Blockquotes are affected
> More content here
Content here
${""}
<div>
html content
should be ignored
</div>
Even more content here
${""}
`,after:b`
# Heading 1
First paragraph stays as the first paragraph
${""}
- list item 1
- list item 2 ${""}
Continuation of list item 2
- list item 3
${""}
1. Item 1
2. Item 2 ${""}
Continuation of item 3
3. Item 3
${""}
Paragraph for with link [[other file name]]. ${""}
Continuation *of* the paragraph has \`inline code block\` __in it__. ${""}
Even more continuation
${""}
Paragraph lines that end in <br/>
Or lines that end in <br>
Are left alone ${""}
Since they mean the same thing
${""}
\`\`\` text
Code blocks are ignored
Even with multiple lines
\`\`\`
Another paragraph here
${""}
> Blockquotes are affected ${""}
> More content here ${""}
Content here
${""}
<div>
html content
should be ignored
</div>
Even more content here
${""}
`})]}get optionBuilders(){return[]}};mi=B([E.register],mi);var Lt=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};B([E.noSettingControl()],Lt.prototype,"dateModifiedKey",2),B([E.noSettingControl()],Lt.prototype,"currentTimeFormatted",2),B([E.noSettingControl()],Lt.prototype,"yamlTimestampDateModifiedEnabled",2);var wn=class extends E{get OptionsClass(){return Lt}get name(){return"YAML Key Sort"}get description(){return"Sorts the YAML keys based on the order and priority specified. Note: may remove blank lines as well."}get type(){return"YAML"}apply(t,n){let r=t.match(ve);if(!r)return t;let i=r[1],o=n.priorityKeysAtStartOfYaml,s=function(O,C){return O==C?C:Oe(C,n.dateModifiedKey," "+n.currentTimeFormatted)},a=function(O,C,I){let k=`${C}${O}`;return I&&(k=`${O}${C}`),n.yamlTimestampDateModifiedEnabled&&(k=s(r[1],k)),t.replace(r[1],k)},l=function(O,C){let I="";for(let k of C){let _=Te(O,k);_!==null&&(_.includes(`
`)?I+=`${k}:${_}
`:I+=`${k}: ${_}
`,O=tn(O,k))}return{remainingYaml:O,sortedYamlKeyValues:I}},u=n.yamlKeyPrioritySortOrder,p=l(i,u),c=p.sortedYamlKeyValues;i=p.remainingYaml;let f=n.yamlSortOrderForOtherKeys,m=tt(i);if(m==null)return a(c,i,o);let d=function(O,C){return O=O.toLowerCase(),C=C.toLowerCase(),O>C?-1:C>O?1:0},h=function(O,C){return O=O.toLowerCase(),C=C.toLowerCase(),O<C?-1:C<O?1:0},g=Object.keys(m),y;if(f==="Ascending Alphabetical")y=h;else if(f==="Descending Alphabetical")y=d;else return a(c,i,o);g=g.sort(y);let T=l(i,g);return a(c,T.sortedYamlKeyValues,o)}get exampleBuilders(){return[new A({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language`",before:b`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:b`
---
date: 02/15/2022
type: programming
language: Typescript
tags: computer
keywords: []
status: WIP
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"None",priorityKeysAtStartOfYaml:!0}}),new A({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Ascending Alphabetical`",before:b`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:b`
---
date: 02/15/2022
type: programming
language: Typescript
keywords: []
status: WIP
tags: computer
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Ascending Alphabetical"}}),new A({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Descending Alphabetical`",before:b`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:b`
---
date: 02/15/2022
type: programming
language: Typescript
tags: computer
status: WIP
keywords: []
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!0}}),new A({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Descending Alphabetical` and `'Priority Keys at Start of YAML' = false`",before:b`
---
language: Typescript
type: programming
tags: computer
keywords: []
${""}
status: WIP
date: 02/15/2022
---
`,after:b`
---
tags: computer
status: WIP
keywords: []
date: 02/15/2022
type: programming
language: Typescript
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new Ne({OptionsClass:Lt,name:"YAML Key Priority Sort Order",description:"The order in which to sort keys with one on each line where it sorts in the order found in the list",optionsKey:"yamlKeyPrioritySortOrder"}),new re({OptionsClass:Lt,name:"Priority Keys at Start of YAML",description:"YAML Key Priority Sort Order is placed at the start of the YAML frontmatter",optionsKey:"priorityKeysAtStartOfYaml"}),new ce({OptionsClass:Lt,name:"YAML Sort Order for Other Keys",description:"The way in which to sort the keys that are not found in the YAML Key Priority Sort Order text area",optionsKey:"yamlSortOrderForOtherKeys",records:[{value:"None",description:"No sorting other than what is in the YAML Key Priority Sort Order text area"},{value:"Ascending Alphabetical",description:"Sorts the keys based on key value from a to z"},{value:"Descending Alphabetical",description:"Sorts the keys based on key value from z to a"}]})]}get hasSpecialExecutionOrder(){return!0}};wn=B([E.register],wn);var _t=require("obsidian");var et=class{constructor(){this.dateCreatedKey="date created";this.dateCreated=!0;this.format="dddd, MMMM Do YYYY, h:mm:ss a";this.dateModified=!0;this.dateModifiedKey="date modified";this.locale="en"}};B([E.noSettingControl()],et.prototype,"alreadyModified",2),B([E.noSettingControl()],et.prototype,"fileCreatedTime",2),B([E.noSettingControl()],et.prototype,"fileModifiedTime",2),B([E.noSettingControl()],et.prototype,"locale",2),B([E.noSettingControl()],et.prototype,"currentTime",2);var Vt=class extends E{get OptionsClass(){return et}get name(){return"YAML Timestamp"}get description(){return"Keep track of the date the file was last edited in the YAML front matter. Gets dates from file metadata."}get type(){return"YAML"}apply(t,n){let r=n.alreadyModified,i=yt(t);return r=r||i!==t,Me(i,o=>{let s=`
${n.dateCreatedKey}: [^
]+
`,a=`
${n.dateCreatedKey}:[ ]*
`,l=new RegExp(a),u=new RegExp(s);if(n.dateCreated){let p=(0,_t.moment)(n.fileCreatedTime);p.locale(n.locale);let c=p.format(n.format),f=`
${n.dateCreatedKey}: ${c}`,m=u.test(o);if(!m&&l.test(o))o=o.replace(l,Be(f)+`
`),r=!0;else if(m){if(m){let d=(0,_t.moment)(o.match(u)[0].replace(n.dateCreatedKey+":","").trim(),n.format,n.locale,!0);(d==null||!d.isValid())&&(o=o.replace(u,Be(f)+`
`),r=!0)}}else{let d=o.indexOf(`
---`);o=nn(o,d,`
${n.dateCreatedKey}: ${c}`),r=!0}}if(n.dateModified){let p=`
${n.dateModifiedKey}: [^
]+
`,c=`
${n.dateModifiedKey}:[ ]*
`,f=new RegExp(c),m=new RegExp(p),d=(0,_t.moment)(n.fileModifiedTime);d.locale(n.locale);let h=n.currentTime.format(n.format),g=`
${n.dateModifiedKey}: ${h}`,y=m.test(o);if(y){let T=(0,_t.moment)(o.match(m)[0].replace(n.dateModifiedKey+":","").trim(),n.format,n.locale,!0);(r||T==null||!T.isValid()||Math.abs(T.diff(d,"seconds"))>5)&&(o=o.replace(m,Be(g)+`
`))}else if(f.test(o))o=o.replace(f,Be(g)+`
`);else if(!y){let T=o.indexOf(`
---`);o=nn(o,T,g)}}return o})}get exampleBuilders(){return[new A({description:"Adds a header with the date.",before:b`
# H1
`,after:b`
---
date created: Wednesday, January 1st 2020, 12:00:00 am
date modified: Thursday, January 2nd 2020, 12:00:05 am
---
# H1
`,options:{fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-02T00:00:00-00:00",currentTime:(0,_t.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new A({description:"dateCreated option is false",before:b`
# H1
`,after:b`
---
date modified: Thursday, January 2nd 2020, 12:00:05 am
---
# H1
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,_t.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new A({description:"Date Created Key is set",before:b`
# H1
`,after:b`
---
created: Wednesday, January 1st 2020, 12:00:00 am
---
# H1
`,options:{dateCreated:!0,dateModified:!1,dateCreatedKey:"created",fileCreatedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,_t.moment)("Thursday, January 2nd 2020, 12:00:03 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new A({description:"Date Modified Key is set",before:b`
# H1
`,after:b`
---
modified: Wednesday, January 1st 2020, 4:00:00 pm
---
# H1
`,options:{dateCreated:!1,dateModified:!0,dateModifiedKey:"modified",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,_t.moment)("Wednesday, January 1st 2020, 4:00:00 pm","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}})]}get optionBuilders(){return[new re({OptionsClass:et,name:"Date Created",description:"Insert the file creation date",optionsKey:"dateCreated"}),new dn({OptionsClass:et,name:"Date Created Key",description:"Which YAML key to use for creation date",optionsKey:"dateCreatedKey"}),new re({OptionsClass:et,name:"Date Modified",description:"Insert the date the file was last modified",optionsKey:"dateModified"}),new dn({OptionsClass:et,name:"Date Modified Key",description:"Which YAML key to use for modification date",optionsKey:"dateModifiedKey"}),new Ao({OptionsClass:et,name:"Format",description:"Moment date format to use (see [Moment format options](https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/))",optionsKey:"format"})]}get hasSpecialExecutionOrder(){return!0}};Vt=B([E.register],Vt);var Wt=class{constructor(){this.yamlAliasesSectionStyle="Multi-line array";this.preserveExistingAliasesSectionStyle=!0;this.keepAliasThatMatchesTheFilename=!1;this.useYamlKeyToKeepTrackOfOldFilenameOrHeading=!0}};B([E.noSettingControl()],Wt.prototype,"fileName",2);var di=class extends E{get OptionsClass(){return Wt}get name(){return"YAML Title Alias"}get description(){return"Inserts the title of the file into the YAML frontmatter's aliases section. Gets the title from the first H1 or filename."}get type(){return"YAML"}apply(t,n){t=yt(t);let r=z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,c=>{let f=c.match(/^#\s+(.*)/m);return f?f[1]:""});r=r||n.fileName;let i=null,o=t.match(ve)[1],s=!n.keepAliasThatMatchesTheFilename&&r===n.fileName;n.useYamlKeyToKeepTrackOfOldFilenameOrHeading&&(i=tt(Te(o,mr)));let a=o.replace(`---
`,"").replace(`
---`,""),l=tt(o);i=tt(Te(o,mr));let u="multi-line";switch(n.yamlAliasesSectionStyle){case"Multi-line array":u="multi-line";break;case"Single-line array":u="single-line";break;case"Single string that expands to multi-line array if needed":u="single string to multi-line";break;case"Single string that expands to single-line array if needed":u="single string to single-line";break;default:throw new Error(`Unsupported setting 'YAML aliases section style': ${n.yamlAliasesSectionStyle}`)}let p=function(c,f){if(c==null)return r;if(typeof c=="string")f?c===r&&(c=""):i===c?c=r:c=[r,c];else if(i!==null){let m=c.indexOf(i);m!==-1&&(f?c.splice(m,1):c[m]=r)}else{let m=c.indexOf(r);m!==-1?f&&c.splice(m,1):f||(c=[r,...c])}return c===""||c.length===0?"":c};if(r=zi(r),Object.keys(l).includes(Xe)){let c=Te(a,Xe),f="multi-line",m=c==="",d=!1;c.includes(`
`)||(c.match(/^\[.*\]/)===null?(f="single string to single-line",d=!0):f="single-line");let h=Yi(bt(c)),g=p(h,s);g===""?a=tn(a,Xe):n.preserveExistingAliasesSectionStyle?!m&&(d&&r==g||!d||h==g)?a=Oe(a,Xe,Je(g,f)):a=Oe(a,Xe,Je(g,u)):a=Oe(a,Xe,Je(g,u))}else s||(a=Oe(a,Xe,Je(r,u)));return!n.useYamlKeyToKeepTrackOfOldFilenameOrHeading||s?a=tn(a,mr):a=Oe(a,mr,` ${r}`),t=t.replace(`---
${o}---
`,`---
${a}---
`),t}get exampleBuilders(){return[new A({description:"Adds a header with the title from heading.",before:b`
# Obsidian
`,after:b`
---
aliases:
- Obsidian
linter-yaml-title-alias: Obsidian
---
# Obsidian
`}),new A({description:"Adds a header with the title from heading without YAML key when the use of the YAML key is set to false.",before:b`
# Obsidian
`,after:b`
---
aliases:
- Obsidian
---
# Obsidian
`,options:{useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new A({description:"Adds a header with the title.",before:b`
${""}
`,after:b`
---
aliases:
- Filename
linter-yaml-title-alias: Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new A({description:"Adds a header with the title without YAML key when the use of the YAML key is set to false.",before:b`
${""}
`,after:b`
---
aliases:
- Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0,useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new A({description:"Replaces old filename with new filename when no header is present and filename is different than the old one listed in `linter-yaml-title-alias`.",before:b`
---
aliases:
- Old Filename
- Alias 2
linter-yaml-title-alias: Old Filename
---
${""}
`,after:b`
---
aliases:
- Filename
- Alias 2
linter-yaml-title-alias: Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}})]}get optionBuilders(){return[new ce({OptionsClass:Wt,name:"YAML aliases section style",description:"The style of the aliases YAML section. It is recommended that the value here matches the aliases format for format YAML arrays if in use.",optionsKey:"yamlAliasesSectionStyle",records:[{value:"Multi-line array",description:"```aliases:\\n - Title```"},{value:"Single-line array",description:"```aliases: [Title]```"},{value:"Single string that expands to multi-line array if needed",description:"```aliases: Title```"},{value:"Single string that expands to single-line array if needed",description:"```aliases: Title```"}]}),new re({OptionsClass:Wt,name:"Preserve existing aliases section style",description:"If set, the `YAML aliases section style` setting applies only to the newly created sections",optionsKey:"preserveExistingAliasesSectionStyle"}),new re({OptionsClass:Wt,name:"Keep alias that matches the filename",description:"Such aliases are usually redundant",optionsKey:"keepAliasThatMatchesTheFilename"}),new re({OptionsClass:Wt,name:"Use the YAML key `linter-yaml-title-alias` to help with filename and heading changes",description:"If set, when the first H1 heading changes or filename if first H1 is not present changes, then the old alias stored in this key will be replaced with the new value instead of just inserting a new entry in the aliases array",optionsKey:"useYamlKeyToKeepTrackOfOldFilenameOrHeading"})]}};di=B([E.register],di);var gi=class{constructor(){this.titleKey="title"}};B([E.noSettingControl()],gi.prototype,"fileName",2);var hi=class extends E{get OptionsClass(){return gi}get name(){return"YAML Title"}get description(){return"Inserts the title of the file into the YAML frontmatter. Gets the title from the first H1 or filename if there is no H1."}get type(){return"YAML"}apply(t,n){t=yt(t);let r=z([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,i=>{let o=i.match(/^#\s+(.*)/m);return o?o[1]:""});return r=r||n.fileName,r=zi(r),Me(t,i=>{let o=`
${n.titleKey}.*
`,s=new RegExp(o);if(s.test(i))i=i.replace(s,Be(`
${n.titleKey}: ${r}
`));else{let a=i.indexOf(`
---`);i=nn(i,a,`
${n.titleKey}: ${r}`)}return i})}get exampleBuilders(){return[new A({description:"Adds a header with the title from heading.",before:b`
# Obsidian
`,after:b`
---
title: Obsidian
---
# Obsidian
`,options:{fileName:"Filename"}}),new A({description:"Adds a header with the title.",before:b`
${""}
`,after:b`
---
title: Filename
---
${""}
`,options:{fileName:"Filename"}})]}get optionBuilders(){return[new dn({OptionsClass:gi,name:"Title Key",description:"Which YAML key to use for title",optionsKey:"titleKey"})]}};hi=B([E.register],hi);var w0=`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
fill="currentColor"
viewBox="0 0 100 100"
width="100"
height="100"
version="1.1"
id="svg3235"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3239" /><path
d="M 5,2 V 99.648562 H 96.607328 V 28.733947 L 95.891646,28.070574 65.35587,2.597036 64.560667,2 Z m 5.089296,4.2455896 h 50.89296 V 31.719127 H 91.518032 V 95.402972 H 10.089296 Z M 66.071552,9.2971072 87.860101,27.473538 H 66.071552 Z"
id="path3233"
style="stroke-width:2.32417" /><g
transform="matrix(0.15232206,0,0,0.14054685,49.142307,65.828276)"
id="g3717">
<g
style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
transform="matrix(3.89,0,0,3.89,-175.05,-175.05)"
id="g3715">
<path
d="m 89.161,11.093 c -0.109,-0.329 -0.381,-0.578 -0.719,-0.658 -0.334,-0.078 -0.692,0.02 -0.937,0.266 l -7.189,7.189 c -1.096,1.096 -2.553,1.7 -4.104,1.7 -1.55,0 -3.007,-0.603 -4.104,-1.699 -2.262,-2.263 -2.262,-5.944 0,-8.207 L 79.297,2.495 C 79.542,2.25 79.643,1.895 79.563,1.558 79.484,1.221 79.234,0.949 78.905,0.839 73.042,-1.106 66.689,0.39 62.335,4.745 57.872,9.207 56.419,15.794 58.543,21.693 L 21.693,58.544 C 15.796,56.42 9.208,57.874 4.745,62.336 0.39,66.691 -1.107,73.04 0.838,78.906 c 0.109,0.329 0.381,0.579 0.719,0.658 0.335,0.081 0.692,-0.021 0.937,-0.266 l 7.189,-7.189 c 2.261,-2.263 5.943,-2.263 8.207,0 1.096,1.096 1.699,2.553 1.699,4.104 0,1.551 -0.603,3.007 -1.7,4.104 L 10.7,87.506 c -0.245,0.245 -0.346,0.599 -0.266,0.937 0.08,0.338 0.329,0.609 0.658,0.719 1.7,0.563 3.44,0.839 5.16,0.839 4.218,0 8.317,-1.652 11.41,-4.745 4.463,-4.463 5.917,-11.049 3.793,-16.948 L 68.306,31.457 c 5.9,2.123 12.485,0.671 16.948,-3.793 4.357,-4.355 5.853,-10.705 3.907,-16.571 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3709" />
<path
d="M 72.088,57.275 C 71.911,57.098 71.675,56.995 71.426,56.983 67.964,56.828 64.348,55.107 61.503,52.262 59.761,50.519 58.438,48.48 57.64,46.365 L 46.517,57.488 c 2.115,0.799 4.154,2.121 5.897,3.863 2.845,2.846 4.565,6.462 4.721,9.923 0.012,0.249 0.115,0.485 0.292,0.662 l 14.876,14.876 c 2.021,2.021 4.676,3.031 7.33,3.031 2.655,0 5.311,-1.01 7.331,-3.031 4.041,-4.042 4.041,-10.619 0,-14.661 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3711" />
<path
d="m 5.351,14.171 c 0.123,0.219 0.324,0.384 0.563,0.462 l 5.82,1.89 23.869,23.869 4.638,-4.638 L 16.372,11.885 14.481,6.065 C 14.403,5.826 14.238,5.625 14.019,5.502 L 4.714,0.279 C 4.323,0.06 3.834,0.128 3.518,0.444 L 0.293,3.668 C -0.024,3.985 -0.091,4.474 0.128,4.864 Z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3713" />
</g>
</g></svg>`,x0=`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="100"
height="100"
viewBox="0 0 100 100"
xml:space="preserve"
id="svg3874"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs3862" />
<g
transform="matrix(0.14701218,0,0,0.10231871,54.655987,68.756842)"
id="g3940">
<g
style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
transform="matrix(3.89,0,0,3.89,-175.05,-175.05)"
id="g3938">
<path
d="m 89.161,11.093 c -0.109,-0.329 -0.381,-0.578 -0.719,-0.658 -0.334,-0.078 -0.692,0.02 -0.937,0.266 l -7.189,7.189 c -1.096,1.096 -2.553,1.7 -4.104,1.7 -1.55,0 -3.007,-0.603 -4.104,-1.699 -2.262,-2.263 -2.262,-5.944 0,-8.207 L 79.297,2.495 C 79.542,2.25 79.643,1.895 79.563,1.558 79.484,1.221 79.234,0.949 78.905,0.839 73.042,-1.106 66.689,0.39 62.335,4.745 57.872,9.207 56.419,15.794 58.543,21.693 L 21.693,58.544 C 15.796,56.42 9.208,57.874 4.745,62.336 0.39,66.691 -1.107,73.04 0.838,78.906 c 0.109,0.329 0.381,0.579 0.719,0.658 0.335,0.081 0.692,-0.021 0.937,-0.266 l 7.189,-7.189 c 2.261,-2.263 5.943,-2.263 8.207,0 1.096,1.096 1.699,2.553 1.699,4.104 0,1.551 -0.603,3.007 -1.7,4.104 L 10.7,87.506 c -0.245,0.245 -0.346,0.599 -0.266,0.937 0.08,0.338 0.329,0.609 0.658,0.719 1.7,0.563 3.44,0.839 5.16,0.839 4.218,0 8.317,-1.652 11.41,-4.745 4.463,-4.463 5.917,-11.049 3.793,-16.948 L 68.306,31.457 c 5.9,2.123 12.485,0.671 16.948,-3.793 4.357,-4.355 5.853,-10.705 3.907,-16.571 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3932" />
<path
d="M 72.088,57.275 C 71.911,57.098 71.675,56.995 71.426,56.983 67.964,56.828 64.348,55.107 61.503,52.262 59.761,50.519 58.438,48.48 57.64,46.365 L 46.517,57.488 c 2.115,0.799 4.154,2.121 5.897,3.863 2.845,2.846 4.565,6.462 4.721,9.923 0.012,0.249 0.115,0.485 0.292,0.662 l 14.876,14.876 c 2.021,2.021 4.676,3.031 7.33,3.031 2.655,0 5.311,-1.01 7.331,-3.031 4.041,-4.042 4.041,-10.619 0,-14.661 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3934" />
<path
d="m 5.351,14.171 c 0.123,0.219 0.324,0.384 0.563,0.462 l 5.82,1.89 23.869,23.869 4.638,-4.638 L 16.372,11.885 14.481,6.065 C 14.403,5.826 14.238,5.625 14.019,5.502 L 4.714,0.279 C 4.323,0.06 3.834,0.128 3.518,0.444 L 0.293,3.668 C -0.024,3.985 -0.091,4.474 0.128,4.864 Z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path3936" />
</g>
</g><g
transform="matrix(0.27381202,0,0,0.35603928,51.097404,51.582597)"
id="g4147">
<g
style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
transform="matrix(3.89,0,0,3.89,-175.05,-175.05)"
id="g4145">
<path
d="M 89.234,35.526 C 88.505,34.55 87.387,33.99 86.169,33.99 H 74.085 v -8.511 c 0,-2.856 -2.324,-5.181 -5.181,-5.181 H 44.128 c -0.574,0 -1.136,-0.233 -1.542,-0.639 L 34.998,12.071 C 34.02,11.092 32.719,10.553 31.334,10.553 H 5.181 C 2.324,10.554 0,12.878 0,15.735 v 49.459 7.593 2.517 c 0,2.284 1.858,4.143 4.142,4.143 h 70.042 c 0.011,0 0.021,0 0.033,0 2.389,0 4.245,-1.737 5.093,-4.753 L 89.841,38.902 c 0.344,-1.17 0.124,-2.4 -0.607,-3.376 z M 4.142,76.446 C 3.512,76.446 3,75.933 3,75.303 V 72.786 65.193 15.735 c 0,-1.203 0.978,-2.181 2.181,-2.181 h 26.154 c 0.574,0 1.136,0.233 1.542,0.639 l 7.588,7.588 c 0.978,0.979 2.279,1.518 3.664,1.518 h 24.776 c 1.202,0 2.181,0.978 2.181,2.181 v 8.511 h -50.05 c -2.338,0 -4.421,1.57 -5.065,3.817 L 5.342,74.893 C 4.9,76.446 4.388,76.446 4.142,76.446 Z M 86.963,38.054 76.426,73.864 c -0.331,1.179 -0.983,2.582 -2.222,2.582 -0.003,0 -0.007,0 -0.011,0 H 7.985 C 8.071,76.219 8.152,75.977 8.226,75.717 L 18.855,38.634 c 0.277,-0.968 1.174,-1.644 2.181,-1.644 h 65.133 c 0.36,0 0.57,0.208 0.663,0.333 0.093,0.124 0.233,0.384 0.131,0.731 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4143" />
</g>
</g></svg>`,k0=`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="100"
height="100"
viewBox="0 0 100 100"
xml:space="preserve"
id="svg4286"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs4268" />
<g
transform="matrix(0.27531192,0,0,0.3088608,50.157353,49.85424)"
id="g4284">
<g
style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
transform="matrix(3.89,0,0,3.89,-175.05,-175.05)"
id="g4282">
<path
d="M 90,84.505 H 0 V 5.495 h 90 z m -86,-4 H 86 V 9.495 H 4 Z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4270" />
<path
d="M 90,32.695 H 0 v -27.2 h 90 z m -86,-4 H 86 V 9.495 H 4 Z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4272" />
<rect
x="9.5799999"
y="17.09"
rx="0"
ry="0"
width="3.0699999"
height="4"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
id="rect4274" />
<rect
x="16.450001"
y="17.09"
rx="0"
ry="0"
width="3.0699999"
height="4"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
id="rect4276" />
<rect
x="23.309999"
y="17.09"
rx="0"
ry="0"
width="3.0699999"
height="4"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
id="rect4278" />
<rect
x="36.549999"
y="17.09"
rx="0"
ry="0"
width="43.880001"
height="4"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
id="rect4280" />
</g>
</g>
<g
transform="matrix(0.17149846,0,0,0.13197486,48.887861,64.150509)"
id="g4352">
<g
style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
transform="matrix(3.89,0,0,3.89,-175.05,-175.05)"
id="g4350">
<path
d="m 89.161,11.093 c -0.109,-0.329 -0.381,-0.578 -0.719,-0.658 -0.334,-0.078 -0.692,0.02 -0.937,0.266 l -7.189,7.189 c -1.096,1.096 -2.553,1.7 -4.104,1.7 -1.55,0 -3.007,-0.603 -4.104,-1.699 -2.262,-2.263 -2.262,-5.944 0,-8.207 L 79.297,2.495 C 79.542,2.25 79.643,1.895 79.563,1.558 79.484,1.221 79.234,0.949 78.905,0.839 73.042,-1.106 66.689,0.39 62.335,4.745 57.872,9.207 56.419,15.794 58.543,21.693 L 21.693,58.544 C 15.796,56.42 9.208,57.874 4.745,62.336 0.39,66.691 -1.107,73.04 0.838,78.906 c 0.109,0.329 0.381,0.579 0.719,0.658 0.335,0.081 0.692,-0.021 0.937,-0.266 l 7.189,-7.189 c 2.261,-2.263 5.943,-2.263 8.207,0 1.096,1.096 1.699,2.553 1.699,4.104 0,1.551 -0.603,3.007 -1.7,4.104 L 10.7,87.506 c -0.245,0.245 -0.346,0.599 -0.266,0.937 0.08,0.338 0.329,0.609 0.658,0.719 1.7,0.563 3.44,0.839 5.16,0.839 4.218,0 8.317,-1.652 11.41,-4.745 4.463,-4.463 5.917,-11.049 3.793,-16.948 L 68.306,31.457 c 5.9,2.123 12.485,0.671 16.948,-3.793 4.357,-4.355 5.853,-10.705 3.907,-16.571 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4344" />
<path
d="M 72.088,57.275 C 71.911,57.098 71.675,56.995 71.426,56.983 67.964,56.828 64.348,55.107 61.503,52.262 59.761,50.519 58.438,48.48 57.64,46.365 L 46.517,57.488 c 2.115,0.799 4.154,2.121 5.897,3.863 2.845,2.846 4.565,6.462 4.721,9.923 0.012,0.249 0.115,0.485 0.292,0.662 l 14.876,14.876 c 2.021,2.021 4.676,3.031 7.33,3.031 2.655,0 5.311,-1.01 7.331,-3.031 4.041,-4.042 4.041,-10.619 0,-14.661 z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4346" />
<path
d="m 5.351,14.171 c 0.123,0.219 0.324,0.384 0.563,0.462 l 5.82,1.89 23.869,23.869 4.638,-4.638 L 16.372,11.885 14.481,6.065 C 14.403,5.826 14.238,5.625 14.019,5.502 L 4.714,0.279 C 4.323,0.06 3.834,0.128 3.518,0.444 L 0.293,3.668 C -0.024,3.985 -0.091,4.474 0.128,4.864 Z"
style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"
stroke-linecap="round"
id="path4348" />
</g>
</g></svg>`,Ut={folder:{id:"lint-folder",source:x0},file:{id:"lint-file",source:w0},vault:{id:"lint-vault",source:k0}};var Kc=require("obsidian");var me="top",xe="bottom",be="right",ge="left",Ro="auto",Gt=[me,xe,be,ge],It="start",xn="end",Tc="clippingParents",Do="viewport",Un="popper",Sc="reference",ja=Gt.reduce(function(e,t){return e.concat([t+"-"+It,t+"-"+xn])},[]),Po=[].concat(Gt,[Ro]).reduce(function(e,t){return e.concat([t,t+"-"+It,t+"-"+xn])},[]),v0="beforeRead",O0="read",T0="afterRead",S0="beforeMain",A0="main",C0="afterMain",E0="beforeWrite",L0="write",_0="afterWrite",Ac=[v0,O0,T0,S0,A0,C0,E0,L0,_0];function Ce(e){return e?(e.nodeName||"").toLowerCase():null}function fe(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rt(e){var t=fe(e).Element;return e instanceof t||e instanceof Element}function ke(e){var t=fe(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Gn(e){if(typeof ShadowRoot=="undefined")return!1;var t=fe(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function I0(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ke(o)||!Ce(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function F0(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!ke(i)||!Ce(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Cc={name:"applyStyles",enabled:!0,phase:"write",fn:I0,effect:F0,requires:["computeStyles"]};function Ee(e){return e.split("-")[0]}var ft=Math.max,kn=Math.min,Ft=Math.round;function Qn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function yi(){return!/^((?!chrome|android).)*safari/i.test(Qn())}function it(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ke(e)&&(i=e.offsetWidth>0&&Ft(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ft(r.height)/e.offsetHeight||1);var s=rt(e)?fe(e):window,a=s.visualViewport,l=!yi()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,p=(r.top+(l&&a?a.offsetTop:0))/o,c=r.width/i,f=r.height/o;return{width:c,height:f,top:p,right:u+c,bottom:p+f,left:u,x:u,y:p}}function vn(e){var t=it(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function bi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ke(e){return fe(e).getComputedStyle(e)}function qa(e){return["table","td","th"].indexOf(Ce(e))>=0}function _e(e){return((rt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bt(e){return Ce(e)==="html"?e:e.assignedSlot||e.parentNode||(Gn(e)?e.host:null)||_e(e)}function Ec(e){return!ke(e)||Ke(e).position==="fixed"?null:e.offsetParent}function B0(e){var t=/firefox/i.test(Qn()),n=/Trident/i.test(Qn());if(n&&ke(e)){var r=Ke(e);if(r.position==="fixed")return null}var i=Bt(e);for(Gn(i)&&(i=i.host);ke(i)&&["html","body"].indexOf(Ce(i))<0;){var o=Ke(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function mt(e){for(var t=fe(e),n=Ec(e);n&&qa(n)&&Ke(n).position==="static";)n=Ec(n);return n&&(Ce(n)==="html"||Ce(n)==="body"&&Ke(n).posi
`);return{line:g.length-1,ch:g[g.length-1].length}}let[m,d]=c;if(m==Jn.default.DIFF_INSERT)n.replaceRange(d,f(l)),l+=d;else if(m==Jn.default.DIFF_DELETE){let h=f(l),g=l;g+=d;let y=f(g);n.replaceRange("",h,y)}else l+=d});let u=a.map(c=>c[0]==Jn.default.DIFF_INSERT?c[1].length:0).reduce((c,f)=>c+f,0),p=a.map(c=>c[0]==Jn.default.DIFF_DELETE?c[1].length:0).reduce((c,f)=>c+f,0);this.displayChangedMessage(u,p);try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(c){this.handleLintError(r,c,"Lint File Error in File '${file.path}'",!1)}}async setOrUpdateMomentInstance(){var a;let n=localStorage.getItem("language")||"en",r=(a=navigator.language)==null?void 0:a.toLowerCase(),i=n1[n];this.settings.linterLocale!=="system-default"?i=this.settings.linterLocale:r.startsWith(n)&&(i=r),this.momentLocale=i;let o=Ti.moment.locale(),s=Ti.moment.locale(i);jt(`Trying to switch Moment.js locale to ${i}, got ${s}`),Ti.moment.locale(o)}displayChangedMessage(n,r){if(this.settings.displayChanged){let i=b`
${n} characters added
${r} characters removed
`;new Z.Notice(i)}}handleLintError(n,r,i,o=!0){let s=i.replace("${file.path}",n.path);r instanceof Yt?o?new Z.Notice(`${s} ${r.message}.
See console for more details.`):new Z.Notice(`${r.message}.
See console for more details.`):new Z.Notice("An unknown error occurred during linting. See console for details"),bc(s,r)}},ol=class extends Z.PluginSettingTab{constructor(n,r){super(n,r);this.plugin=r}display(){let{containerEl:n}=this;n.empty(),n.createEl("h2",{text:"General Settings"}),new Z.Setting(n).setName("Lint on save").setDesc("Lint the file on manual save (when `Ctrl + S` is pressed or when `:w` is executed while using vim keybindings)").addToggle(i=>{i.setValue(this.plugin.settings.lintOnSave).onChange(async o=>{this.plugin.settings.lintOnSave=o,await this.plugin.saveSettings()})}),new Z.Setting(n).setName("Display message on lint").setDesc("Display the number of characters changed after linting").addToggle(i=>{i.setValue(this.plugin.settings.displayChanged).onChange(async o=>{this.plugin.settings.displayChanged=o,await this.plugin.saveSettings()})}),new Z.Setting(n).setName("Folders to ignore").setDesc("Folders to ignore when linting all files or linting on save. Enter folder paths separated by newlines").addTextArea(i=>{i.setValue(this.plugin.settings.foldersToIgnore.join(`
`)).onChange(async o=>{this.plugin.settings.foldersToIgnore=o.split(`
`),await this.plugin.saveSettings()})}),this.addLocaleOverrideSetting();let r="";for(let i of Et){i.type!==r&&(n.createEl("h2",{text:i.type}),r=i.type),n.createEl("h3",{},o=>{o.innerHTML=`<a href="${i.getURL()}">${i.name}</a>`});for(let o of i.options)o.display(n,this.plugin.settings,this.plugin)}this.addCustomCommandsSetting()}addLocaleOverrideSetting(){var r;let n=(r=navigator.language)==null?void 0:r.toLowerCase();new Z.Setting(this.containerEl).setName("Override locale:").setDesc("Set this if you want to use a locale different from the default").addDropdown(i=>{i.addOption("system-default",`Same as system (${n})`),Ti.moment.locales().forEach(o=>{i.addOption(o,o)}),i.setValue(this.plugin.settings.linterLocale),i.onChange(async o=>{this.plugin.settings.linterLocale=o,await this.plugin.setOrUpdateMomentInstance(),await this.plugin.saveSettings()})})}addCustomCommandsSetting(){this.containerEl.createEl("h2",{text:"Custom Commands Settings"}),this.containerEl.createEl("p",{text:`Custom commands are Obsidian commands that get run after the linter is finished running its regular rules.
This means that they do not run before the yaml timestamp logic runs, so they can cause yaml timestamp to be triggered on the next run of the linter.
You may only select an Obsidian command once. Note that this currently only works on linting the current file`}),this.containerEl.createEl("p",{text:`When selecting an option, make sure to select the option either by using the mouse or by hitting the enter key.
Other selection methods may not work and only selections of an actual Obsidian command or an empty string will be saved.`}).style.color="#EED202";function n(r,i,o){if(o<0||o===r.length)return;let s=r[i];r[i]=r[o],r[o]=s}new Z.Setting(this.containerEl).addButton(r=>{r.setButtonText("Add new command").setCta().onClick(()=>{this.plugin.settings.lintCommands.push({id:"",name:""}),this.plugin.saveSettings(),this.display();let i=document.getElementsByClassName("linter-custom-command");i[i.length-1].focus()})}),this.plugin.settings.lintCommands.forEach((r,i)=>{new Z.Setting(this.containerEl).addSearch(o=>{new Oi(this.app,o.inputEl,this.plugin.settings.lintCommands),o.setPlaceholder("obsidian command").setValue(r.name).onChange(s=>{let a={id:o.inputEl.getAttribute("commandId"),name:s};a.name&&a.id?(this.plugin.settings.lintCommands[i]=a,this.plugin.saveSettings()):!a.name&&!a.id&&(this.plugin.settings.lintCommands[i]=a,this.plugin.saveSettings())}),o.inputEl.setAttr("tabIndex",i),o.inputEl.addClass("linter-custom-command")}).addExtraButton(o=>{o.setIcon("up-chevron-glyph").setTooltip("Move up").onClick(()=>{n(this.plugin.settings.lintCommands,i,i-1),this.plugin.saveSettings(),this.display()})}).addExtraButton(o=>{o.setIcon("down-chevron-glyph").setTooltip("Move down").onClick(()=>{n(this.plugin.settings.lintCommands,i,i+1),this.plugin.saveSettings(),this.display()})}).addExtraButton(o=>{o.setIcon("cross").setTooltip("Delete").onClick(()=>{this.plugin.settings.lintCommands.splice(i,1),this.plugin.saveSettings(),this.display()})})})}},Ko=class extends Z.Modal{constructor(t,n,r,i,o){super(t),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:"Warning"});let s=this.contentEl.createEl("p",{text:n+" Make sure you have backed up your files."});s.id="confirm-dialog",this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:"Cancel"}).addEventListener("click",()=>this.close());let l=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:r});l.addEventListener("click",async u=>{new Z.Notice(i),this.close(),await o()}),setTimeout(()=>{l.focus()},50)})}};
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */