varzm=Object.create;varRn=Object.defineProperty;varOc=Object.getOwnPropertyDescriptor;varSm=Object.getOwnPropertyNames;varAm=Object.getPrototypeOf,Tm=Object.prototype.hasOwnProperty;varnn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cc=(e,t)=>{for(variint)Rn(e,i,{get:t[i],enumerable:!0})},Mc=(e,t,i,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofSm(t))!Tm.call(e,r)&&r!==i&&Rn(e,r,{get:()=>t[r],enumerable:!(n=Oc(t,r))||n.enumerable});returne};varrn=(e,t,i)=>(i=e!=null?zm(Am(e)):{},Mc(t||!e||!e.__esModule?Rn(i,"default",{value:e,enumerable:!0}):i,e)),Lm=e=>Mc(Rn({},"__esModule",{value:!0}),e),A=(e,t,i,n)=>{for(varr=n>1?void0:n?Oc(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);returnn&&r&&Rn(t,i,r),r};varTo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};varj=(e,t,i)=>(To(e,t,"read from private field"),i?i.call(e):t.get(e)),he=(e,t,i)=>{if(t.has(e))throwTypeError("Cannot add the same private member more than once");tinstanceofWeakSet?t.add(e):t.set(e,i)},Ee=(e,t,i,n)=>(To(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);varLo=(e,t,i,n)=>({set_(r){Ee(e,t,r,i)},get_(){returnj(e,t,n)}}),pe=(e,t,i)=>(To(e,t,"access private method"),i);varDa=nn((wd,Ra)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeofRa=="object"&&Ra.exports?Ra.exports=t():e.log=t()})(wd,function(){"use strict";vare=function(){},t="undefined",i=typeofwindow!==t&&typeofwindow.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];functionr(f,w){varx=f[w];if(typeofx.bind=="function")returnx.bind(f);try{returnFunction.prototype.bind.call(x,f)}catch{returnfunction(){returnFunction.prototype.apply.apply(x,[f,arguments])}}}functiona(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}functions(f){returnf==="debug"&&(f="log"),typeofconsole===t?!1:f==="trace"&&i?a:console[f]!==void0?r(console,f):console.log!==void0?r(console,"log"):e}functiono(f,w){for(varx=0;x<n.length;x++){varb=n[x];this[b]=x<f?e:this.methodFactory(b,f,w)}this.log=this.debug}functionl(f,w,x){returnfunction(){typeofconsole!==t&&(o.call(this,w,x),this[f].apply(this,arguments))}}functionc(f,w,x){returns(f)||l.apply(this,arguments)}functiond(f,w,x){varb=this,S;w=w??"WARN";varL="loglevel";typeoff=="string"?L+=":"+f:typeoff=="symbol"&&(L=void0);functionC(q){var_=(n[q]||"silent").toUpperCase();if(!(typeofwindow===t||!L)){try{window.localStorage[L]=_;return}catch{}try{window.document.cookie=encodeURIComponent(L)+"="+_+";"}catch{}}}functionR(){varq;if(!(typeofwindow===t||!L)){try{q=window.localStorage[L]}catch{}if(typeofq===t)try{var_=window.document.cookie,P=_.indexOf(encodeURIComponent(L)+"=");P!==-1&&(q=/^([^;]+)/.exec(_.slice(P))[1])}catch{}returnb.levels[q]===void0&&(q=void0),q}}functionT(){if(!(typeofwindow===t||!L)){try{window.localStorage.removeItem(L);return}catch{}try{window.document.cookie=encodeURIComponent(L)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}b.name=f,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=x||c,b.getLevel=function(){returnS},b.setLevel=function(q,_){if(typeofq=="string"&&b.levels[q.toUpperCase()]!==void0&&(q=b.levels[q.toUpperCase()]),typeofq=="number"&&q>=0&&q<=b.levels.SILENT){if(S=q,_!==!1&&C(q),o.call(b,q,f),typeofconsole===t&&q<b.levels.SILENT)return"No console available for logging"}elsethrow"log.setLevel() called with invalid level: "+q},b.setDefaultLevel=function(q){w=q,R()||b.setLevel(q,!1)},b.resetLevel=function(){b.setLevel(w,!1),T()},b.enableAll=function(q){b.setLevel(b.levels.TRACE,q)},b.disableAll=function(q){b.setLevel(b.levels.SILENT,q)};varB=R();B==null&&(B=w),b.setLevel(B,!1)}varu=newd,g={};u.getLogger=function(w){if(typeofw!="symbol"&&typeofw!="string"||w==="")thrownewTypeError("You must supply a name when creating a logger.");varx=g[w];returnx||(x=g[w]=newd(w,u.getLevel(),u.methodFac
`;return o.replace(/\n$/,"")}var jm=Nm,Km=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ym=["scalar","sequence","mapping"];function Pm(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){t[String(n)]=i})}),t}function Hm(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(Km.indexOf(i)===-1)throw new $e('Unknown option "'+i+'" 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(i){return i},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=Pm(t.styleAliases||null),Ym.indexOf(this.kind)===-1)throw new $e('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ne=Hm;function qc(e,t){var i=[];return e[t].forEach(function(n){var r=i.length;i.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(r=s)}),i[r]=n}),i}function $m(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function n(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(n);return e}function Mo(e){return this.extend(e)}Mo.prototype.extend=function(t){var i=[],n=[];if(t instanceof Ne)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new $e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new $e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new $e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Mo.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=qc(r,"implicit"),r.compiledExplicit=qc(r,"explicit"),r.compiledTypeMap=$m(r.compiledImplicit,r.compiledExplicit),r};var Wm=Mo,Um=new Ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vm=new Ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Gm=new Ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Qm=new Wm({explicit:[Um,Vm,Gm]});function Zm(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Jm(){return null}function Xm(e){return e===null}var eg=new Ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zm,construct:Jm,predicate:Xm,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function ig(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 tg(e){return e==="true"||e==="True"||e==="TRUE"}function ng(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var rg=new Ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ig,construct:tg,predicate:ng,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
`: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 Jg(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var td=new Array(256),nd=new Array(256);for(pt=0;pt<256;pt++)td[pt]=_c(pt)?1:0,nd[pt]=_c(pt);var pt;function Xg(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zc,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 rd(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=jm(i),new $e(t,i)}function K(e,t){throw rd(e,t)}function Ia(e,t){e.onWarning&&e.onWarning.call(null,rd(e,t))}var Fc={YAML:function(t,i,n){var r,a,s;t.version!==null&&K(t,"duplication of %YAML directive"),n.length!==1&&K(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&K(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&K(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Ia(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&K(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],ed.test(r)||K(t,"ill-formed tag handle (first argument) of the TAG directive"),Wi.call(t.tagMap,r)&&K(t,'there is a previously declared suffix for "'+r+'" tag handle'),id.test(a)||K(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{K(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function $i(e,t,i,n){var r,a,s,o;if(t<i){if(o=e.input.slice(t,i),n)for(r=0,a=o.length;r<a;r+=1)s=o.charCodeAt(r),s===9||32<=s&&s<=1114111||K(e,"expected valid JSON character");else Wg.test(o)&&K(e,"the stream contains non-printable characters");e.result+=o}}function Rc(e,t,i,n){var r,a,s,o;for(ke.isObject(i)||K(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),s=0,o=r.length;s<o;s+=1)a=r[s],Wi.call(t,a)||(t[a]=i[a],n[a]=!0)}function on(e,t,i,n,r,a,s,o,l){var c,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,d=r.length;c<d;c+=1)Array.isArray(r[c])&&K(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Bc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Bc(r)==="[object Object]"&&(r="[object Object]"),r=String(r),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,d=a.length;c<d;c+=1)Rc(e,t,a[c],i);else Rc(e,t,a,i);else!e.json&&!Wi.call(i,r)&&Wi.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,K(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[r]=a,delete i[r];return t}function Ro(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++):K(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ve(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);r!==0;){for(;mt(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(wi(r))for(Ro(e),r=e.input.charCodeAt(e.position),n++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&n!==0&&e.lineIndent<i&&Ia(e,"deficient indentation"),n}function Fa(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||Xe(i)))}function Do(e,t){t===1?e.result+=" ":t>1&&(e.result+=ke.rep
`,t-1))}function eh(e,t,i){var n,r,a,s,o,l,c,d,u=e.kind,g=e.result,p;if(p=e.input.charCodeAt(e.position),Xe(p)||sn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&sn(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;p!==0;){if(p===58){if(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&sn(r))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),Xe(n))break}else{if(e.position===e.lineStart&&Fa(e)||i&&sn(p))break;if(wi(p))if(l=e.line,c=e.lineStart,d=e.lineIndent,ve(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=d;break}}o&&($i(e,a,s,!1),Do(e,e.line-l),a=s=e.position,o=!1),mt(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return $i(e,a,s,!1),e.result?!0:(e.kind=u,e.result=g,!1)}function ih(e,t){var i,n,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if($i(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else wi(i)?($i(e,n,r,!0),Do(e,ve(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Fa(e)?K(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);K(e,"unexpected end of the stream within a single quoted scalar")}function th(e,t){var i,n,r,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return $i(e,i,e.position,!0),e.position++,!0;if(o===92){if($i(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),wi(o))ve(e,!1,t);else if(o<256&&td[o])e.result+=nd[o],e.position++;else if((s=Qg(o))>0){for(r=s,a=0;r>0;r--)o=e.input.charCodeAt(++e.position),(s=Gg(o))>=0?a=(a<<4)+s:K(e,"expected hexadecimal character");e.result+=Jg(a),e.position++}else K(e,"unknown escape sequence");i=n=e.position}else wi(o)?($i(e,i,n,!0),Do(e,ve(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Fa(e)?K(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}K(e,"unexpected end of the stream within a double quoted scalar")}function nh(e,t){var i=!0,n,r,a,s=e.tag,o,l=e.anchor,c,d,u,g,p,f=Object.create(null),w,x,b,S;if(S=e.input.charCodeAt(e.position),S===91)d=93,p=!1,o=[];else if(S===123)d=125,p=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),S=e.input.charCodeAt(++e.position);S!==0;){if(ve(e,!0,t),S=e.input.charCodeAt(e.position),S===d)return e.position++,e.tag=s,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=o,!0;i?S===44&&K(e,"expected the node content, but found ','"):K(e,"missed comma between flow collection entries"),x=w=b=null,u=g=!1,S===63&&(c=e.input.charCodeAt(e.position+1),Xe(c)&&(u=g=!0,e.position++,ve(e,!0,t))),n=e.line,r=e.lineStart,a=e.position,ln(e,t,Ma,!1,!0),x=e.tag,w=e.result,ve(e,!0,t),S=e.input.charCodeAt(e.position),(g||e.line===n)&&S===58&&(u=!0,S=e.input.charCodeAt(++e.position),ve(e,!0,t),ln(e,t,Ma,!1,!0),b=e.result),p?on(e,o,f,x,w,b,n,r,a):u?o.push(on(e,null,f,x,w,b,n,r,a)):o.push(w),ve(e,!0,t),S=e.input.charCodeAt(e.position),S===44?(i=!0,S=e.input.charCodeAt(++e.position)):i=!1}K(e,"unexpected end of the stream within a flow collection")}function rh(e,t){var i,n,r=Co,a=!1,s=!1,o=t,l=0,c=!1,d,u;if(u=e.input.charCodeAt(e.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Co===r?r=u===43?Ic:$g:K(e,"repeat of a chomping mode identifier");else if((d=Zg(u))>=0)d===0?K(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?K(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(mt(u)){do u=e.input.charCodeAt(++e.position);while(mt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!wi(u)&&u!==0)}for(;u!==0;){for(Ro(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIn
`,a?1+l:l),a=!0,s=!0,l=0,i=e.position;!wi(u)&&u!==0;)u=e.input.charCodeAt(++e.position);$i(e,i,e.position,!1)}return!0}function Dc(e,t){var i,n=e.tag,r=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Xe(s))));){if(o=!0,e.position++,ve(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(i=e.line,ln(e,t,Xc,!1,!0),a.push(e.result),ve(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)K(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=r,e.kind="sequence",e.result=a,!0):!1}function ah(e,t,i){var n,r,a,s,o,l,c=e.tag,d=e.anchor,u={},g=Object.create(null),p=null,f=null,w=null,x=!1,b=!1,S;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),S=e.input.charCodeAt(e.position);S!==0;){if(!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(S===63||S===58)&&Xe(n))S===63?(x&&(on(e,u,g,p,f,null,s,o,l),p=f=w=null),b=!0,x=!0,r=!0):x?(x=!1,r=!0):K(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,S=n;else{if(s=e.line,o=e.lineStart,l=e.position,!ln(e,i,Jc,!1,!0))break;if(e.line===a){for(S=e.input.charCodeAt(e.position);mt(S);)S=e.input.charCodeAt(++e.position);if(S===58)S=e.input.charCodeAt(++e.position),Xe(S)||K(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(on(e,u,g,p,f,null,s,o,l),p=f=w=null),b=!0,x=!1,r=!1,p=e.tag,f=e.result;else if(b)K(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(b)K(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=d,!0}if((e.line===a||e.lineIndent>t)&&(x&&(s=e.line,o=e.lineStart,l=e.position),ln(e,t,qa,!0,r)&&(x?f=e.result:w=e.result),x||(on(e,u,g,p,f,w,s,o,l),p=f=w=null),ve(e,!0,-1),S=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&S!==0)K(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&on(e,u,g,p,f,null,s,o,l),b&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),b}function sh(e){var t,i=!1,n=!1,r,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&K(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):K(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Xe(s);)s===33&&(n?K(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),ed.test(r)||K(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Vg.test(a)&&K(e,"tag suffix cannot contain flow indicator characters")}a&&!id.test(a)&&K(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{K(e,"tag name is malformed: "+a)}return i?e.tag=a:Wi.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:K(e,'undeclared tag handle "'+r+'"'),!0}function oh(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&K(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Xe(i)&&!sn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function lh(e){var t,i,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Xg(e,t),n=e.indexOf("\0");for(n!==-1&&(i.position=n,K(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)ch(i);return i.documents}function dh(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var n=ad(e,i);if(typeof t!="function")return n;for(var r=0,a=n.length;r<a;r+=1)t(n[r])}function uh(e,t){var i=ad(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new $e("expected a single document in the stream, but found more")}}var ph=dh,mh=uh,sd={loadAll:ph,load:mh},od=Object.prototype.toString,ld=Object.prototype.hasOwnProperty,No=65279,gh=9,jn=10,hh=13,fh=32,yh=33,bh=34,qo=35,vh=37,xh=38,wh=39,kh=42,cd=44,zh=45,Ba=58,Sh=61,Ah=62,Th=63,Lh=64,dd=91,ud=93,Eh=96,pd=123,Oh=124,md=125,je={};je[0]="\\0";je[7]="\\a";je[8]="\\b";je[9]="\\t";je[10]="\\n";je[11]="\\v";je[12]="\\f";je[13]="\\r";je[27]="\\e";je[34]='\\"';je[92]="\\\\";je[133]="\\N";je[160]="\\_";je[8232]="\\L";je[8233]="\\P";var Ch=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Mh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qh(e,t){var i,n,r,a,s,o,l;if(t===null)return{};for(i={},n=Object.keys(t),r=0,a=n.length;r<a;r+=1)s=n[r],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&ld.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[s]=o;return i}function Ih(e){var t,i,n;if(t=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new $e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+ke.repeat("0",n-t.length)+t}var Bh=1,Kn=2;function _h(e){this.schema=e.schema||Zc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ke.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qh(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==='"'?Kn:Bh,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 Nc(e,t){for(var i=ke.repeat(" ",t),n=0,r=-1,a="",s,o=e.length;n<o;)r=e.indexOf(`
`+t.stack),re.default.error(i),Hn&&Ka(i.substring(i.indexOf("]")+2),re.default.levels.TRACE)}function cn(e){re.default.info(`${Na}${e}`),Hn&&Ka(e,re.default.levels.INFO)}function gi(e){re.default.debug(`${Na}${e}`),Hn&&Ka(e,re.default.levels.DEBUG)}function gt(e){re.default.warn(`${Na}${e}`),Hn&&Ka(e,re.default.levels.WARN)}function ht(e){re.default.getLevel()>re.default.levels.DEBUG||Ho.set(e,performance.now())}function Ui(e){if(re.default.getLevel()>re.default.levels.DEBUG)return;Ho.has(e)||gt(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-Ho.get(e);gi(`${e}:${t}`+E("logs.milliseconds-abbreviation"))}function Ka(e,t){re.default.getLevel()<=t&&ja.push(e)}function zd(){ja=[]}function $o(e){Hn=e}function Ya(e){switch(e){case"INFO":{re.default.setLevel("info");break}case"TRACE":{re.default.setLevel("trace");break}case"DEBUG":{re.default.setLevel("debug");break}case"SILENT":{re.default.setLevel("silent");break}case"ERROR":{re.default.setLevel("error");break}case"WARN":{re.default.setLevel("warn");break}}}function Sd(e){switch(e){case re.default.levels.INFO:return"INFO";case re.default.levels.TRACE:return"TRACE";case re.default.levels.DEBUG:return"DEBUG";case re.default.levels.SILENT:return"SILENT";case re.default.levels.ERROR:return"ERROR";case re.default.levels.WARN:return"WARN"}}var Ad={};var Td={};var Ld={};var Ed={commands:{"lint-file":{name:"Linten Sie die aktuelle Datei","error-message":"Lint-Datei-Fehler in der Datei"},"lint-file-unless-ignored":{name:"Linten Sie die aktuelle Datei, es sei denn, sie wird ignoriert"},"lint-all-files":{name:"Linten Sie alle Dateien im Vault","error-message":"Beim Linten aller Dateien Fehler in der Datei","success-message":"Alle Dateien gelinted","errors-message-singular":"Beim Linten aller Dateien gab es einen Fehler.","errors-message-plural":"Beim Linten aller Dateien gab es {NUM} Fehler.","start-message":"Dadurch werden alle Ihre Dateien ver\xE4ndert und es k\xF6nnen Fehler entstehen.","submit-button-text":"Linte alle","submit-button-notice-text":"Linte alle Dateien..."},"lint-all-files-in-folder":{name:"Linte alle Dateien im aktuellen Ordner","start-message":"Dadurch werden alle Ihre Dateien in {FOLDER_NAME} bearbeitet, einschlie\xDFlich der Dateien in den Unterordnern, was zu Fehlern f\xFChren kann.","submit-button-text":"Linte alle Dateien in {FOLDER_NAME}","submit-button-notice-text":"Linten aller Dateien in {FOLDER_NAME}...","error-message":"Beim Linten aller Dateien im Ordner gab es Fehler in der Datei","success-message":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted.","message-singular":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted und es trat ein Fehler auf.","message-plural":"Alle {FILE_COUNT}-Dateien in {FOLDER_NAME} wurden gelinted und es gab {ERROR_COUNT} Fehler."},"paste-as-plain-text":{name:"Einf\xFCgen als reiner Text und ohne \xC4nderungen"},"lint-file-pop-up-menu-text":{name:"Linte Datei"},"lint-folder-pop-up-menu-text":{name:"Linte Ordner"}},logs:{"plugin-load":"Plugin wird geladen","plugin-unload":"Plugin entladen","folder-lint":"Linting-Ordner ","linter-run":"Laufender Linter","paste-link-warning":"Abgebrochenes Einf\xFCgen des Lints, da der Inhalt der Zwischenablage ein Link ist, wodurch Konflikte mit anderen Plugins vermieden werden, die das Einf\xFCgen \xE4ndern.","see-console":"Weitere Informationen finden Sie in der Konsole.","unknown-error":"Beim Linten ist ein unbekannter Fehler aufgetreten.","moment-locale-not-found":"Beim Versuch, Moment.js locale auf {MOMENT_LOCALE} umzustellen, wurde {CURRENT_LOCALE} angezeigt","file-change-lint-message-start":"Linted","pre-rules":"Regeln vor regul\xE4ren Regeln","post-rules":"Regeln nach regul\xE4ren Regeln","rule-running":"Laufende Regeln","custom-regex":"Benutzerdefinierte Regex-Regeln","running-custom-regex":"Ausf\xFChren von benutzerdefinierten Regex","running-custom-lint-command":"Ausf\xFChren von benutzerdefinierten Lint-Befehlen","custom-lint-duplicate-warning":'Sie k\xF6nnen denselben Befehl ("{COMMAND_NAME}") nicht zweimal als benutzerdefinierte Lint-Regel
`&&(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),a(e,o,s.start.offset)}for(let s of n){let o=s[1],l=o.referencePositions.length-o.footnotesReferencingKey.length;l=l>=0?l:0;let c=0;for(let d of o.footnotesReferencingKey){if(c+l>=o.referencePositions.length)throw new Error(E("logs.missing-footnote-error-message").replace("{FOOTNOTE}",d));r.set(d,o.referencePositions[l+c++])}}i=i.sort((s,o)=>r.get(s)-r.get(o)),i.length>0&&(e=e.trimEnd()+`
`+s;return e}function Du(e){let t=fe("footnoteDefinition",e),i=[],n=new Map,r=new Map,a=[],s=new Set,o=[],l=function(u,g,p){let f=g.match(/\[\^.*?\]/)[0];n.set(g,f);let w=s.has(f);if(w&&i.includes(g)){o.unshift(g);return}else if(w)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",f));let x;do x=u.lastIndexOf(f,p),x!==-1&&((x+g.length>u.length||u.substring(x,x+g.length)!==g)&&a.push({key:f,position:x}),p=x-1);while(x>0);s.add(f)};for(let u of t){let g=e.substring(u.start.offset,u.end.offset);i.unshift(g),l(e,g,u.start.offset)}let c=1,d=new Set;for(let u of i){if(d.has(u))continue;d.add(u);let g=n.get(u),p=`[^${c++}]`;r.set(g,p)}a.sort((u,g)=>g.position-u.position);for(let u of a){let g=r.get(u.key);e=Xd(e,u.key,g,u.position)}for(let u of d){let g=n.get(u),p=r.get(g);e=e.replace(u,u.replace(g,p))}for(let u of o){let g=e.replace(`
${u}
`,`
`);e===g&&(g=e.replace(u,"")),e=g}return e}function ms(e,t,i){let n=fe(i,e);if(n.length===0)return e;let r="";if(t==="underscore")r="_";else if(t==="asterisk")r="*";else{let a=n[n.length-1];r=e.substring(a.start.offset,a.start.offset+1)}i==="strong"&&(r+=r);for(let a of n){let s=r+e.substring(a.start.offset+r.length,a.end.offset-r.length)+r;e=le(e,a.start.offset,a.end.offset,s)}return e}function Nu(e){let t=fe("paragraph",e);if(t.length===0)return e;for(let i of t){let n=e.substring(i.start.offset,i.end.offset).split(`
`),e}function Ku(e){let t=fe("link",e);for(let i of t){if(i==null)continue;let n=e.substring(i.start.offset,i.end.offset);if(!n.match(rr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=le(e,i.start.offset,i.end.offset,a)}return e}function Yu(e,t){let i=fe("emphasis",e);for(let n of i){let r=e.substring(n.start.offset+1,n.end.offset-1);r=t(r),e=le(e,n.start.offset+1,n.end.offset-1,r)}return e}function Pu(e,t){let i=fe("strong",e);for(let n of i){let r=e.substring(n.start.offset+2,n.end.offset-2);r=t(r),e=le(e,n.start.offset+2,n.end.offset-2,r)}return e}function gs(e,t){let i=ub(e);for(let n of i){let r=n.start.offset;for(;r>0&&e.charAt(r-1).trim()==="";)r--;(r===0||e.charAt(r-1).trim()!="")&&r++;let a=e.substring(r,n.end.offset);tp.test(a)&&(r+=4,a=a.substring(4)),a=t(a),e=le(e,r,n.end.offset,a)}return e}function Hu(e){let t=fe("code",e);for(let i of t)e.substring(i.start.offset,i.end.offset).startsWith("```")&&(e=yt(e,i.start.offset,i.end.offset));return e}function $u(e,t){let i=fe("math",e);for(let n of i)e=yt(e,n.start.offset,n.end.offset);i=fe("inlineMath",e);for(let n of i)e.substring(n.start.offset,n.end.offset).startsWith("$".repeat(t))&&(e=yt(e,n.start.offset,n.end.offset));return e}function Wu(e){let t=fe("blockquote",e);for(letioft){letn=i.end.offset;for(;n<e.length-1&&e.charAt(n)!==`
`;)n++;e=yt(e,i.start.offset,n,!0)}return e}function Uu(e,t,i){let n=fe("list",e);if(!n)return e;for(let r of n){let a=r.start.offset;for(;a>0&&e.charAt(a-1)!==`
`;)a--;let s=e.substring(a,r.end.offset),o=function(u){let g=u.lastIndexOf("> ");return g!==-1&&(u=u.substring(g+2)),u=u.replaceAll(" "," "),Math.floor((u.split(" ").length-1)/2)+1},l=new Map,c=function(u,g){let p=g;for(;p>u;)l.delete(p--)},d=-1;s=s.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(u,g="",p,f,w,x,b)=>{let S=1,L=o(g);if(!/^\d/.test(f)){let C=L>d?L:d;return c(L,C),u}return l.has(L)?t==="ascending"&&(S=l.get(L)+1,l.set(L,S)):l.set(L,1),d>L&&c(L,d),d=L,`${g}${S}${i}${b}`}),e=le(e,a,r.end.offset,s)}return e}function Vu(e,t){let i=fe("listItem",e);if(!i)return e;let n=/^((\d+[.)])|(- \[[ x]\]))/m,r=t;if(t=="consistent"){let a=i.length-1;for(;a>=0;){let s=e.substring(i[a].start.offset,i[a].end.offset);if(a--,!s.match(n)){r=s.charAt(0);break}}if(a==-1)return e}for(let a of i){let s=e.substring(a.start.offset,a.end.offset);s.match(n)||(s=r+s.substring(1),e=le(e,a.start.offset,a.end.offset,s))}return e}function Ol(e,t){let i=fe("blockquote",e);for(let n of i){let r=n.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let a=e.substring(n.start.offset,r);a=t(a),e=le(e,n.start.offset,r,a)}return e}function Gu(e,t){let i=fe("math",e),n=new RegExp("^(\\${"+t+",})(\\n*)"),r=new RegExp("(\\n*)(\\${"+t+",})([^\\$]*)$");for(let a of i){let s=e.substring(a.start.offset,a.end.offset),o=pb(s,t,a.start.offset);for(let l of o)e=_u(e,l.startIndex,l.endIndex,n,r)}i=fe("inlineMath",e);for(let a of i)e.substring(a.start.offset,a.end.offset).startsWith("$".repeat(t))&&(e=_u(e,a.start.offset,a.end.offset,n,r));return e}function pb(e,t,i){let n="$".repeat(t),r=t;for(;e.charAt(r)==="$";)n+="$",r++;let a=[],s=Vi(e,n);if(s<=1)return[];if(s===2)return a.unshift({startIndex:i,endIndex:i+e.length}),a;s===3&&a.unshift({startIndex:i,endIndex:i+e.indexOf(n,n.length)+n.length}),s%2===1&&s--;let o=i,l=n.length;for(;s>2;){let c=e.indexOf(n,l)+n.length;a.unshift({startIndex:o,endIndex:i+c}),o=i+c+1,l=c+1,s-=2}return a.unshift({startIndex:i+e.indexOf(n,l),endIndex:i+e.length}),a}function _u(e,t,i,n,r){let a=e.substring($n(e,t),t)??"",s=e.substring($n(e,i),i)??"",o=/^(>( |\t)*)+\$+$/m,l=e.substring(t,i);return l=l.replace(n,(c,d,u="")=>u===""?d+`
---`)},wikiLink:{replaceAction:ys,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:rp,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:fs,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:mn,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:sp,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:up,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:zb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:Sb,placeholder:"#tag-placeholder"},table:{replaceAction:Ab,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:Tb,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function ze(e,t,i){let n=[];for(let r of e){let a;if(typeof r.replaceAction=="string")a=wb(t,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)a=kb(t,r.placeholder,r.replaceAction);else if(typeof r.replaceAction=="function"){let s=r.replaceAction;a=s(t,r.placeholder)}t=a.newText,n.push({replacedValues:a.replacedValues,placeholder:r.placeholder})}return t=i(t),n=n.reverse(),n!=null&&n.length>0&&n.forEach(r=>{r.replacedValues.forEach(a=>{t=t.replace(new RegExp(r.placeholder,"i"),Ge(a))})}),t}function wb(e,t,i){let n=fe(i,e),r=[];for(let a of n){let s=e.substring(a.start.offset,a.end.offset);r.push(s),e=le(e,a.start.offset,a.end.offset,t)}return r.reverse(),{newText:e,replacedValues:r}}function kb(e,t,i){let n=e.match(i),r=[];if(i.flags.includes("g")){if(e=e.replaceAll(i,t),n)for(let a of n)r.push(a)}else e=e.replace(i,t),n&&r.push(n[0]);return{newText:e,replacedValues:r}}function zb(e,t){let i=fe("link",e),n=[];for(let r of i){if(r==null)continue;let a=e.substring(r.start.offset,r.end.offset);a.match(rr)&&(n.push(a),e=le(e,r.start.offset,r.end.offset,t))}return n.reverse(),{newText:e,replacedValues:n}}function Sb(e,t){let i=[];return e=e.replace(ar,(n,r,a)=>(i.push(a),r+t)),{newText:e,replacedValues:i}}function Ab(e,t){let i=hs(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=le(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}function Tb(e,t){let i=Qu(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=le(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}var N=(s=>(s.YAML="YAML",s.HEADING="Heading",s.FOOTNOTE="Footnote",s.CONTENT="Content",s.SPACING="Spacing",s.PASTE="Paste",s))(N||{}),Os=class{constructor(t,i,n,r,a,s,o,l=[],c=!1,d=[]){this.nameKey=t;this.descriptionKey=i;this.settingsKey=n;this.alias=r;this.type=a;this.applyAfterIgnore=s;this.examples=o;this.options=l;this.hasSpecialExecutionOrder=c;this.ignoreTypes=d;this.ruleHeading=this.getName().toLowerCase().replaceAll(" ","-"),l.unshift(new yn("enabled",this.descriptionKey,"",!1));for(let u of l)u.ruleAlias=r}getDefaultOptions(){let t={};for(let i of this.options)t[i.configKey]=i.defaultValue;return t}getOptions(t){return t.ruleConfigs[this.settingsKey]}getName(){return E(this.nameKey)}getDescription(){return E(this.descriptionKey)}getURL(){return"https://platers.github.io/obsidian-linter/settings/"+this.type.toLowerCase()+"-rules/#"+this.ruleHeading}enabledOptionName(){return this.options[0].configKey}apply(t,i){return ze(this.ignoreTypes,t,n=>this.applyAfterIgnore(n,i))}},Cs=class{constructor(t,i,n,r={}){this.description=t,this.options=r,this.before=i,this.after=n}},kp=Object.values(N);function Ms(e){let t=hn(e);if(t===null)return[[],!1];let i=vp(t);return i.includes("all")?[Li.map(n=>n.alias),!0]:[i,!1]}var Li=[],Lb={},St=new Map;function zp(e){Li.push(e),Li.sort((t,i)=>kp.indexOf(t.type)-kp.indexOf(i.type)||t.settingsKey.localeCompare(i.settingsKey)),Lb[e.alias]=e,St.has(e.type)?St.get(e.type).push(e):St.set(e.type,[e])}function qs(e,t){let i;throw e instanceof bd?(i=e.toString(),i=E("logs.wrapper-yaml-error").replace("{ERROR_MESSAGE}",i.substring(i.indexOf(":")+1))):i=E("logs.wrapper-unknown-e
`,n),r===-1&&(r=l.length-1,c=!0),[a,o]=Qa(l,r-1);let d=o+a.length+1,u=r;c&&u++;let g=l.substring(d,u),p=mp.test(g);s=i(a,p),o++,l=le(l,o,o+a.length,s),n=r+1+s.length-a.length}while(!c);return l}get exampleBuilders(){return[new y({description:"When style = `space`, a space is added to blockquotes missing a space after the indicator",before:m`
`,options:{style:"no space"}})]}get optionBuilders(){return[new se({OptionsClass:Fs,nameKey:"rules.blockquote-style.style.name",descriptionKey:"rules.blockquote-style.style.description",optionsKey:"style",records:[{value:"space",description:"> indicator is followed by a space"},{value:"no space",description:">indicator is not followed by a space"}]})]}};At=A([v.register],At);var Rs=class{};A([v.noSettingControl()],Rs.prototype,"lineContent",2);var Tt=class extends v{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Rs}apply(t,i){let n=/^(\s*)((> ?)+) .*/,r=i.lineContent.match(n);if(!r)return t;let a=r[1]??"",s=r[2]??"";return t.trim().replace(/\n/gm,`
${a}${s}`)}get exampleBuilders(){return[new y({description:"Line being pasted into regular text does not get blockquotified with current line being `Part1ofthesentence`",before:m`
`,options:{lineContent:"Part 1 of the sentence"}}),new y({description:"Line being pasted into a blockquote gets blockquotified with current line being `>>`",before:m`
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new se({OptionsClass:Lt,nameKey:"rules.capitalize-headings.style.name",descriptionKey:"rules.capitalize-headings.style.description",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 Z({OptionsClass:Lt,nameKey:"rules.capitalize-headings.ignore-case-words.name",descriptionKey:"rules.capitalize-headings.ignore-case-words.description",optionsKey:"ignoreCasedWords"}),new xe({OptionsClass:Lt,nameKey:"rules.capitalize-headings.ignore-words.name",descriptionKey:"rules.capitalize-headings.ignore-words.description",optionsKey:"ignoreWords",splitter:sr,separator:", "}),new xe({OptionsClass:Lt,nameKey:"rules.capitalize-headings.lowercase-words.name",descriptionKey:"rules.capitalize-headings.lowercase-words.description",optionsKey:"lowercaseWords",splitter:sr,separator:", "})]}};Et=A([v.register],Et);var Ds=class{constructor(){this.innerNewLines=!1}},fr=class extends v{constructor(){super({nameKey:"rules.compact-yaml.name",descriptionKey:"rules.compact-yaml.description",type:"Spacing"})}get OptionsClass(){return Ds}apply(t,i){return Oe(t,n=>(n=n.replace(/^---\n+/,`---
`,options:{tabsize:3}})]}get optionBuilders(){return[new Is({OptionsClass:Ns,nameKey:"rules.convert-spaces-to-tabs.tabsize.name",descriptionKey:"rules.convert-spaces-to-tabs.tabsize.description",optionsKey:"tabsize"})]}};vr=A([v.register],vr);var js=class{constructor(){this.defaultLanguage=""}},xr=class extends v{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[h.yaml,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return js}apply(t,i){return Zu(t,i.defaultLanguage)}get exampleBuilders(){return[new y({description:"Add a default language `javascript` to code blocks that do not have a language specified",before:m`
`,options:{defaultLanguage:""}})]}get optionBuilders(){return[new Pe({OptionsClass:js,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};xr=A([v.register],xr);var Ks=class{constructor(){this.style="consistent"}},wr=class extends v{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.math,h.inlineMath]})}get OptionsClass(){return Ks}apply(t,i){return ms(t,i.style,"emphasis")}get exampleBuilders(){return[new y({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:m`
`,options:{style:"asterisk"}}),new y({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:m`
`,options:{style:"consistent"}}),new y({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:m`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new se({OptionsClass:Ks,nameKey:"rules.emphasis-style.style.name",descriptionKey:"rules.emphasis-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of emphasis is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure * is the emphasis indicator"},{value:"underscore",description:"Makes sure _ is the emphasis indicator"}]})]}};wr=A([v.register],wr);var Nl=class{},kr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return Nl}apply(t,i){return Wu(t)}get exampleBuilders(){return[new y({description:"Blockquotes that start a document do not get an empty line before them.",before:m`
`})]}get optionBuilders(){return[]}};kr=A([v.register],kr);var jl=class{},zr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return jl}apply(t,i){return Hu(t)}get exampleBuilders(){return[new y({description:"Fenced code blocks that start a document do not get an empty line before them.",before:m`
`})]}get optionBuilders(){return[]}};zr=A([v.register],zr);var Ys=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([v.noSettingControl()],Ys.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Sr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code]})}get OptionsClass(){return Ys}apply(t,i){return $u(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Math blocks that start a document do not get an empty line before them.",before:m`
`}),new y({description:"Math blocks that are singe-line are updated based on the value of `NumberofDollarSignstoIndicateaMathBlock` (in this case its value is 2)",before:m`
`}),new y({description:"Math blocks that are not at the start or the end of the document will have an empty line added before and after them",before:m`
`})]}get optionBuilders(){return[]}};Sr=A([v.register],Sr);var Kl=class{},Ar=class extends v{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code,h.math,h.inlineMath,h.wikiLink,h.link]})}get OptionsClass(){return Kl}apply(t,i){return hp(t)}get exampleBuilders(){return[new y({description:"Tables that start a document do not get an empty line before them.",before:m`
array:[value:withcoloninthemiddle,valuewith' a single quote present, "already escaped: value", value with " a double quote present, value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[[value:withcoloninthemiddle,valuewith' a single quote present], ["already escaped: value", value with " a double quote present], value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
array:["value: with colon in the middle","value with ' a single quote present","already escaped: value",'value with " a double quote present',valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[["value: with colon in the middle","value with ' a single quote present"],["already escaped: value",'value with " a double quote present'],valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray2:[["value: with colon in the middle"],"value with ' a single quote present"]
`})]}get optionBuilders(){return[]}};Er=A([v.register],Er);var Or=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};A([v.noSettingControl()],Or.prototype,"defaultEscapeCharacter",2);var Ct=class extends v{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Or}apply(t,i){return Oe(t,n=>{for(let r of i.forceYamlEscape){let a=Be(n,r);if(a!=null){if(a.includes(`
`)||a.startsWith(" [")||fn(a))continue;a=fi(a,i.defaultEscapeCharacter,!0),n=Ce(n,r," "+a)}}return n})}get exampleBuilders(){return[new y({description:"YAML without anything to escape",before:m`
`}),new y({description:"Force YAML keys to be escaped with double quotes where not already escaped with `ForceYAMLEscapeonKeys='key'\\n'title'\\n'bool'`",before:m`
---`,""));if(!r)return n;for(let a of ur)if(i.formatAliasKey&&Object.keys(r).includes(a)){n=Ce(n,a,ni(Ss(Si(Be(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of dr)if(i.formatTagKey&&Object.keys(r).includes(a)){n=Ce(n,a,ni(zs(Si(Be(n,a))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.formatArrayKeys){let a=[...ur,...dr,...i.forceMultiLineArrayStyle,...i.forceSingleLineArrayStyle];for(let s of Object.keys(r))a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null||(n=Ce(n,s,ni(Si(Be(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=Ce(n,a,ni(Si(Be(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=Ce(n,a,ni(Si(Be(n,a)),"multi-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));return n})}get exampleBuilders(){return[new y({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:m`
`,options:{aliasArrayStyle:"multi-line",forceSingleLineArrayStyle:["test"]}}),new y({description:"Format tags as a single string with space delimiters, ignore aliases, and format regular YAML arrays as single-line arrays",before:m`
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}}),new y({description:"Arrays with dictionaries in them are ignored",before:m`
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new y({description:"Empty line before header and after YAML is removed with `EmptyLineBetweenYAMLandHeader=false`",before:m`
`)))}return n})}get exampleBuilders(){return[new y({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags:doc\nanimal:dog`",before:m`
`})]}get optionBuilders(){return[]}};Rr=A([v.register],Rr);var Us=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([v.noSettingControl()],Us.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var qt=class extends v{constructor(){super({nameKey:"rules.move-math-block-indicators-to-their-own-line.name",descriptionKey:"rules.move-math-block-indicators-to-their-own-line.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Us}apply(t,i){return Gu(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2",before:m`
`}),new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 3 and opening indicator is on the same line as the start of the content",before:m`
`}),new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2 and ending indicator is on the same line as the ending line of the content",before:m`
`,"").replace("---","");let a=[],s=cr;for(let c of dr){let d=Be(r,c);if(d!=null){a=zs(Si(d)),s=c;break}}let o=new Set;if(typeof a=="string")o.add(a),a=[a];else if(a!=null)for(let c of a)o.add(c);else a=[];for(let c of n){let d=c.trim().substring(1);!o.has(d)&&!i.tagsToIgnore.includes(d)&&(o.add(d),a.push(d))}return`---
${Ce(r,s,ni(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=ze([h.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(ar,a=>{let s=a.indexOf("#"),o=a.substring(s+1);return i.tagsToIgnore.includes(o)?a:i.howToHandleExistingTags==="Remove hashtag"?a.substring(0,s)+o:""})),r)),t=t.replace(/(\n---)( |\t)+/,"$1")),t}get exampleBuilders(){return[new y({description:"Move tags from body to YAML with `Tagstoignore='ignored-tag'`",before:m`
`,options:{tagsToIgnore:["ignored-tag"]}}),new y({description:"Move tags from body to YAML with existing tags retains the already existing ones and only adds new ones",before:m`
`}),new y({description:"Move tags to YAML frontmatter and then remove hashtags in body content tags when `Bodytagoperation='Remove hashtag'` and `Tagstoignore='yet-another-ignored-tag'`.",before:m`
`,options:{howToHandleExistingTags:"Remove hashtag",tagsToIgnore:["yet-another-ignored-tag"]}}),new y({description:"Move tags to YAML frontmatter and then remove body content tags when `Bodytagoperation='Remove whole tag'`.",before:m`
`,options:{howToHandleExistingTags:"Remove whole tag"}})]}get optionBuilders(){return[new se({OptionsClass:nt,nameKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.name",descriptionKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.description",optionsKey:"howToHandleExistingTags",records:[{value:"Nothing",description:"Leaves tags in the body of the file alone"},{value:"Remove hashtag",description:"Removes `#` from tags in content body after moving them to the YAML frontmatter"},{value:"Remove whole tag",description:"Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_"}]}),new xe({OptionsClass:nt,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};Dr=A([v.register],Dr);var Gs=class{constructor(){this.noBareURIs=!1}},Vs="'\"\u2018\u2019\u201C\u201D`[]",sv=["http","ftp","https","smtp"],Nr=class extends v{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.image,h.inlineCode,h.anchorTag,h.html]})}get OptionsClass(){return Gs}apply(t,i){let n=t.match(mn);if(n&&(t=this.handleMatches(t,n,!1)),i.noBareURIs){let r=t.match(ap);r&&(t=this.handleMatches(t,r,!0))}return t}handleMatches(t,i,n){let r=0,a=i.length;for(let s=0;s<a;s++){let o=i[s],l=t.indexOf(o,r),c=l+o.length;o.charAt(0)==="<"&&(o=o.substring(1),l++),o.charAt(o.length-1)===">"&&(o=o.substring(0,o.length-1),c--);let d=l===0?void 0:t.charAt(l-1),u=c>=t.length?void 0:t.charAt(c),g=Vi(o,"(");if(g!=0&&g!=Vi(o,")")&&u==")"?(o+=u,c++,u=c>=t.length?void 0:t.charAt(c)):g==0&&o.endsWith(")")&&(u=")",c--,o=o.substring(0,o.length-1)),this.skipMatch(d,u,o,n)){r=l+o.length;continue}if(d!=null&&d==="<"&&u!=null&&u===">"){let p=l-1;for(;p>0&&t.charAt(p-1)==="<";)p--;let f=c;for(;f<t.length-1&&t.charAt(f+1)===">";)f++;t=le(t,p,f+1,"<"+o+">"),r=l+o.length;continue}t=le(t,l,l+o.length,"<"+o+">"),r=l+o.length+2}return t}skipMatch(t,i,n,r){let a=t!=null&&Vs.includes(t)||Vs.includes(n.charAt(0)),s=i!=null&&Vs.includes(i)||Vs.includes(n.charAt(n.length-1));return a&&s?!0:r?sv.includes(n.substring(0,n.indexOf(":"))):!1}get exampleBuilders(){return[new y({description:"Makesurethatlinksareinsideofanglebracketswhennotinsinglequotes('),doublequotes(\"), or backticks(`)",before:m`
`,options:{noBareURIs:!0}})]}get optionBuilders(){return[new Z({OptionsClass:Gs,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};Nr=A([v.register],Nr);var Kr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},jr=class extends v{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.tag]})}get OptionsClass(){return Kr}apply(t,i){return Uu(t,i.numberStyle,i.listEndStyle)}get exampleBuilders(){return[new y({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:m`
`,options:{numberStyle:"lazy"}}),new y({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:m`
`}),new y({description:"Nested ordered list has list items set to '1)' when Number Style is `lazy` and Ordered List Indicator End Style is `)`.",before:m`
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new se({OptionsClass:Kr,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)"},{value:"lazy",description:"Makes sure ordered list item indicators all are the number 1"}]}),new se({OptionsClass:Kr,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",optionsKey:"listEndStyle",records:[{value:".",description:"Makes sure ordered list items indicators end in '.' (i.e `1.`)"},{value:")",description:"Makes sure ordered list item indicators end in ')' (i.e. `1)`)"}]})]}};jr=A([v.register],jr);var Ul=class{},Yr=class extends v{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",descriptionKey:"rules.paragraph-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[h.obsidianMultiLineComments,h.yaml,h.table]})}get OptionsClass(){return Ul}apply(t,i){return ju(t)}get exampleBuilders(){return[new y({description:"Paragraphs should be surrounded by blank lines",before:m`
`})]}get optionBuilders(){return[]}};Yr=A([v.register],Yr);var Pr=class{};A([v.noSettingControl()],Pr.prototype,"lineContent",2),A([v.noSettingControl()],Pr.prototype,"selectedText",2);var It=class extends v{constructor(){super({nameKey:"rules.prevent-double-checklist-indicator-on-paste.name",descriptionKey:"rules.prevent-double-checklist-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Pr}apply(t,i){let n=pp.test(i.lineContent),r=vs.test(t),a=vs.test(i.selectedText);return!n||!r||a?t:t.replace(vs,"")}get exampleBuilders(){return[new y({description:"Line being pasted is left alone when current line has no checklist indicator in it: `Regulartexthere`",before:m`
`,options:{lineContent:"Regular text here",selectedText:""}}),new y({description:"Line being pasted into a blockquote without a checklist indicator is left alone when it lacks a checklist indicator: `>>`",before:m`
`,options:{lineContent:"> > ",selectedText:""}}),new y({description:"Line being pasted into a blockquote with a checklist indicator has its checklist indicator removed when current line is: `>-[x]`",before:m`
`,options:{lineContent:"> - [x] ",selectedText:""}}),new y({description:"Line being pasted with a checklist indicator has its checklist indicator removed when current line is: `-[]`",before:m`
`,options:{lineContent:"- [ ] ",selectedText:""}}),new y({description:"Line being pasted as a checklist indicator has its checklist indicator removed when current line is: `-[!]`",before:m`
`,options:{lineContent:"- [!] ",selectedText:""}}),new y({description:"When pasting a checklist and the selected text starts with a checklist, the text to paste should still start with a checklist",before:m`
`,options:{lineContent:"- [!] Some text here",selectedText:"- [!] Some text here"}})]}get optionBuilders(){return[]}};It=A([v.register],It);var Hr=class{};A([v.noSettingControl()],Hr.prototype,"lineContent",2),A([v.noSettingControl()],Hr.prototype,"selectedText",2);var Bt=class extends v{constructor(){super({nameKey:"rules.prevent-double-list-item-indicator-on-paste.name",descriptionKey:"rules.prevent-double-list-item-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Hr}apply(t,i){let n=new RegExp(`^${or}[*+-]`),r=/^\s*[*+-] /,a=n.test(i.lineContent),s=n.test(i.selectedText),o=r.test(t);return s||!a||!o?t:t.replace(r,"")}get exampleBuilders(){return[new y({description:"Line being pasted is left alone when current line has no list indicator in it: `Regulartexthere`",before:m`
`,options:{lineContent:"Regular text here",selectedText:""}}),new y({description:"Line being pasted into a blockquote without a list indicator is left alone when it lacks a list indicator: `>>`",before:m`
`,options:{lineContent:"> > ",selectedText:""}}),new y({description:"Line being pasted into a blockquote with a list indicator is has its list indicator removed when current line is: `>*`",before:m`
`,options:{lineContent:"> * ",selectedText:""}}),new y({description:"Line being pasted with a list indicator is has its list indicator removed when current line is: `+`",before:m`
`,options:{lineContent:"+ ",selectedText:""}}),new y({description:"When pasting a list item and the selected text starts with a list item indicator, the text to paste should still start with a list item indicator",before:m`
`,options:{lineContent:"+ ",selectedText:"+ "}})]}get optionBuilders(){return[]}};Bt=A([v.register],Bt);var Vl=class{},_t=class extends v{constructor(){super({nameKey:"rules.proper-ellipsis-on-paste.name",descriptionKey:"rules.proper-ellipsis-on-paste.description",type:"Paste"})}get OptionsClass(){return Vl}apply(t,i){return t.replaceAll(bs,"\u2026")}get exampleBuilders(){return[new y({description:"Replacing three consecutive dots with an ellipsis even if spaces are present",before:m`
`})]}get optionBuilders(){return[]}};$r=A([v.register],$r);var Ft=class{constructor(){this.singleQuoteStyleEnabled=!0;this.singleQuoteStyle="''";this.doubleQuoteStyleEnabled=!0;this.doubleQuoteStyle='""'}},Wr=class extends v{constructor(){super({nameKey:"rules.quote-style.name",descriptionKey:"rules.quote-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.inlineCode,h.math,h.yaml,h.math,h.inlineMath,h.html,h.link,h.wikiLink,h.templaterCommand]})}get OptionsClass(){return Ft}apply(t,i){let n=t;return i.doubleQuoteStyleEnabled&&(i.doubleQuoteStyle==='""'?n=this.convertSmartDoubleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,'"',"\u201C\u201D"[0],"\u201C\u201D"[1],!1)),i.singleQuoteStyleEnabled&&(i.singleQuoteStyle==="''"?n=this.convertSmartSingleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,"'","\u2018\u2019"[0],"\u2018\u2019"[1],!0)),n}convertSmartSingleQuotesToStraightQuotes(t){return t.replace(dp,"'")}convertSmartDoubleQuotesToStraightQuotes(t){return t.replace(cp,'"')}convertStraightQuoteToSmartQuote(t,i,n,r,a){let s=eu(i,t);if(s.length===0)return t;let o=t.length-1,l,c="",d="",u=!1,g=!1,p=!1,f=!1,w=!1,x="";for(let b of s)c=b==0?"":t.charAt(b-1),d=b===o?"":t.charAt(b+1),u=Cl.test(c),g=Cl.test(d),w=u&&g,p=c!=""&&c.trim()==="",f=d!=""&&d.trim()==="",w&&a?l=r:f&&!p?(l=r,x=l):p&&!f?(l=n,x=l):(x===""||x===r?l=n:l=r,x=l),t=le(t,b,b+1,l);return t}get exampleBuilders(){return[new y({description:"Smart quotes used in file are converted to straight quotes when styles are set to `Straight`",before:m`
`}),new y({description:"Blanks lines are removed between like list types (ordered, specific list item indicators, and checklists) while blanks are left between different kinds of list item indicators",before:m`
`})]}get optionBuilders(){return[new Pe({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.description",OptionsClass:ta,optionsKey:"charactersToRemoveSpacesBefore"}),new Pe({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.description",OptionsClass:ta,optionsKey:"charactersToRemoveSpacesAfter"})]}};ia=A([v.register],ia);var Qs=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},na=class extends v{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[h.code,h.math,h.yaml]})}get OptionsClass(){return Qs}apply(t,i){return t.replaceAll(Xi,(n,r="",a="",s="",o="",l="")=>{if(o==""||o.match(lp))return n;let c=o.trimEnd(),d=c.charAt(c.length-1);return i.punctuationToRemove.includes(d)?r+a+s+o.substring(0,c.length-1)+o.substring(c.length)+l:n})}get exampleBuilders(){return[new y({description:"Removes punctuation from the end of a heading",before:m`
`,options:{yamlKeysToRemove:["status:","keywords","date"]}})]}get optionBuilders(){return[new xe({OptionsClass:Zs,nameKey:"rules.remove-yaml-keys.yaml-keys-to-remove.name",descriptionKey:"rules.remove-yaml-keys.yaml-keys-to-remove.description",optionsKey:"yamlKeysToRemove"})]}};ra=A([v.register],ra);var oc=class{},aa=class extends v{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return oc}apply(t,i){return t=t.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),t.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")}get exampleBuilders(){return[new y({description:"A single space is left between the list marker and the text of the list item",before:m`
`})]}get optionBuilders(){return[]}};sa=A([v.register],sa);var Js=class{constructor(){this.style="consistent"}},oa=class extends v{constructor(){super({nameKey:"rules.strong-style.name",descriptionKey:"rules.strong-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.yaml,h.link,h.wikiLink,h.tag,h.math,h.inlineMath]})}get OptionsClass(){return Js}apply(t,i){return ms(t,i.style,"strong")}get exampleBuilders(){return[new y({description:"Strong indicators should use underscores when style is set to 'underscore'",before:m`
`,options:{style:"asterisk"}}),new y({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:m`
`,options:{style:"consistent"}}),new y({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:m`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new se({OptionsClass:Js,nameKey:"rules.strong-style.style.name",descriptionKey:"rules.strong-style.style.description",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"}]})]}};oa=A([v.register],oa);var Xs=class{constructor(){this.twoSpaceLineBreak=!1}},Yt=class extends v{constructor(){super({nameKey:"rules.trailing-spaces.name",descriptionKey:"rules.trailing-spaces.description",type:"Spacing",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return Xs}apply(t,i){return i.twoSpaceLineBreak?(t=t.replace(/(\S)[ \t]$/gm,"$1"),t=t.replace(/(\S)[ \t]{3,}$/gm,"$1"),t=t.replace(/(\S)( ?\t\t? ?)$/gm,"$1"),t):t.replace(/[ \t]+$/gm,"")}get exampleBuilders(){return[new y({description:"Removes trailing spaces and tabs.",before:m`
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new Z({OptionsClass:Xs,nameKey:"rules.trailing-spaces.twp-space-line-break.name",descriptionKey:"rules.trailing-spaces.twp-space-line-break.description",optionsKey:"twoSpaceLineBreak"})]}};Yt=A([v.register],Yt);var cc=class{},la=class extends v{constructor(){super({nameKey:"rules.two-spaces-between-lines-with-content.name",descriptionKey:"rules.two-spaces-between-lines-with-content.description",type:"Content",ruleIgnoreTypes:[h.obsidianMultiLineComments,h.yaml,h.table]})}get OptionsClass(){return cc}apply(t,i){return Nu(t)}get exampleBuilders(){return[new y({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:m`
`})]}get optionBuilders(){return[]}};la=A([v.register],la);var eo=class{constructor(){this.listStyle="consistent"}},ca=class extends v{constructor(){super({nameKey:"rules.unordered-list-style.name",descriptionKey:"rules.unordered-list-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.tag]})}get OptionsClass(){return eo}apply(t,i){return Vu(t,i.listStyle)}get exampleBuilders(){return[new y({description:"Unordered lists have their indicator updated to `*` when `Listitemstyle='consistent'` and `*` is the first unordered list indicator",before:m`
`,options:{listStyle:"+"}})]}get optionBuilders(){return[new se({OptionsClass:eo,nameKey:"rules.unordered-list-style.list-style.name",descriptionKey:"rules.unordered-list-style.list-style.description",optionsKey:"listStyle",records:[{value:"consistent",description:"Makes sure unordered list items use a consistent list item indicator in the file which will be based on the first list item found"},{value:"-",description:"Makes sure unordered list items use `-` as their indicator"},{value:"*",description:"Makes sure unordered list items use `*` as their indicator"},{value:"+",description:"Makes sure unordered list items use `+` as their indicator"}]})]}};ca=A([v.register],ca);var Ni=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};A([v.noSettingControl()],Ni.prototype,"dateModifiedKey",2),A([v.noSettingControl()],Ni.prototype,"currentTimeFormatted",2),A([v.noSettingControl()],Ni.prototype,"yamlTimestampDateModifiedEnabled",2);var Pt=class extends v{constructor(){super({nameKey:"rules.yaml-key-sort.name",descriptionKey:"rules.yaml-key-sort.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Ni}apply(t,i){let n=hn(t);if(n===null)return t;let r=n,a=i.priorityKeysAtStartOfYaml,s=i.yamlKeyPrioritySortOrder,o=0;for(let w of s)w.endsWith(":")&&(s[o]=w.substring(0,w.length-1)),o++;let l=Di(r),c=this.getYAMLKeysSorted(r,s,l),d=c.sortedYamlKeyValues;r=c.remainingYaml;let u=i.yamlSortOrderForOtherKeys;if(l==null)return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);let g=Object.keys(l),p;if(u==="Ascending Alphabetical")p=this.sortAlphabeticallyAsc;else if(u==="Descending Alphabetical")p=this.sortAlphabeticallyDesc;else return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);g=g.sort(p);let f=this.getYAMLKeysSorted(r,g,l);return this.getTextWithNewYamlFrontmatter(t,n,d,f.sortedYamlKeyValues,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled)}getYAMLKeysSorted(t,i,n){let r="";for(let a of i){if(!(a in n))continue;let s=Be(t,a,!1);s!==null&&(s.includes(`
`)?r+=`${a}:${s}
`:r+=`${a}:${s}
`,t=kt(t,a,!1))}return{remainingYaml:t,sortedYamlKeyValues:r}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:Ce(i,n," "+r)}getTextWithNewYamlFrontmatter(t,i,n,r,a,s,o,l){let c=`${r}${n}`;return a&&(c=`${n}${r}`),l&&(c=this.updateDateModifiedIfYamlChanged(i,c,s,o)),t.replace(i,c)}sortAlphabeticallyAsc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t<i?-1:i<t?1:0}sortAlphabeticallyDesc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t>i?-1:i>t?1:0}get exampleBuilders(){return[new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage`",before:m`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"None",priorityKeysAtStartOfYaml:!0}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=AscendingAlphabetical`",before:m`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Ascending Alphabetical"}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical`",before:m`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!0}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical` and `'Priority Keys at Start of YAML'=false`",before:m`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new xe({OptionsClass:Ni,nameKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.name",descriptionKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.description",optionsKey:"yamlKeyPrioritySortOrder"}),new Z({OptionsClass:Ni,nameKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.name",descriptionKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.description",optionsKey:"priorityKeysAtStartOfYaml"}),new se({OptionsClass:Ni,nameKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.name",descriptionKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.description",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"}]})]}};Pt=A([v.register],Pt);var ai=require("obsidian");var _p=rn(Bp());var Ze=class{constructor(){this.dateCreatedKey="date created";this.dateCreated=!0;this.forceRetentionOfCreatedValue=!1;this.format="dddd, MMMM Do YYYY, h:mm:ss a";this.dateModified=!0;this.dateModifiedKey="date modified";this.locale="en"}};A([v.noSettingControl()],Ze.prototype,"alreadyModified",2),A([v.noSettingControl()],Ze.prototype,"fileCreatedTime",2),A([v.noSettingControl()],Ze.prototype,"fileModifiedTime",2),A([v.noSettingControl()],Ze.prototype,"locale",2),A([v.noSettingControl()],Ze.prototype,"currentTime",2),A([v.noSettingControl()],Ze.prototype,"fileName",2);var rt=class extends v{constructor(){super({nameKey:"rules.yaml-timestamp.name",descriptionKey:"rules.yaml-timestamp.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Ze}apply(t,i){let n=i.alreadyModified,r=zi(t);return n=n||r!==t,i.format=i.format.trimEnd(),Oe(r,a=>{if(i.dateCreated){let s=!1;[a,s]=this.handleDateCreatedValue(a,i),n=n||s}return i.dateModified&&(a=this.handleDateModifiedValue(a,n,i)),a})}handleDateCreatedValue(t,i){let n=!1,r=`
`,options:{fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-02T00:00:00-00:00",currentTime:(0,ai.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new y({description:"dateCreated option is false",before:m`
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,ai.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new y({description:"Date Created Key is set",before:m`
---`,""),c=Di(s);a=c[ks]??null,a!=null&&(a=a+"",a=fi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let d=null,u=Object.keys(c);for(let g of ur)if(u.includes(g)){d=g;break}if(d!=null){let g=Be(l,d),p="multi-line",f=g==="",w=!1;g.includes(`
`)||(g.match(/^\[.*\]/)===null?(p="single string to single-line",w=!0):p="single-line");let x=Ss(Si(g)),b=this.getNewAliasValue(x,o,r,a);b===""?l=kt(l,d):i.preserveExistingAliasesSectionStyle?!f&&(w&&r==b||!w||x==b)?l=Ce(l,d,ni(b,p,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=Ce(l,d,ni(b,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=Ce(l,d,ni(b,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=Ce(l,ql,ni(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=kt(l,ks):l=Ce(l,ks,`${r}`),t=t.replace(`---
${l}---`),t}getTitleInfo(t,i,n,r){let a=ze([h.code,h.math,h.yaml,h.tag],t,xs);a=a||i;let s=fi(a,r,this.forceEscape(a,n));return[a,s]}forceEscape(t,i){return Ja(t)||t.includes(",")&&(i==="single-line"||i==="single string to single-line"||i==="single string comma delimited")}getNewAliasValue(t,i,n,r){if(t==null)return i?"":n;if(typeof t=="string")i?t===n&&(t=""):r===t?t=n:t=[n,t];else if(r!==null){let a=t.indexOf(r);a===-1&&fn(r)&&(a=t.indexOf(r.substring(1,r.length-1))),a!==-1?i?t.splice(a,1):t[a]=n:t=[n,...t]}else{let a=t.indexOf(n);a!==-1?i&&t.splice(a,1):i||(t=[n,...t])}return t===""||t.length===0?"":t}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading.",before:m`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new y({description:"Adds a header with the title without YAML key when the use of the YAML key is set to false.",before:m`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0,useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new y({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:m`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new y({description:"Make sure that markdown and wiki links in first H1 get their values converted to text",before:m`
${i.titleKey}:${n}`)}return r})}getFirstH1Header(t){return ze([h.code,h.math,h.yaml,h.tag],t,xs)}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading when `mode='First H1 or Filename if H1 Missing'`.",before:m`
`,options:{fileName:"Filename"}}),new y({description:"Make sure that markdown links in headings are properly copied to the YAML as just the text when `mode='First H1 or Filename if H1 Missing'`",before:m`
`,options:{mode:"first-h1",fileName:"Filename"}}),new y({description:"When `mode='Filename'`, title uses the filename ignoring all H1s. Note: the filename is \"Filename\" in this example.",before:m`
`,options:{mode:"filename",fileName:"Filename"}})]}get optionBuilders(){return[new Pe({OptionsClass:Ht,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new se({OptionsClass:Ht,nameKey:"rules.yaml-title.mode.name",descriptionKey:"rules.yaml-title.mode.description",optionsKey:"mode",records:[{value:"first-h1-or-filename-if-h1-missing",description:"Uses the first H1 in the file or the filename of the file if there is not H1"},{value:"filename",description:"Uses the filename as the title"},{value:"first-h1",description:"Uses the first H1 in the file as the title"}]})]}};ua=A([v.register],ua);var Ux=`<svgxmlns="http://www.w3.org/2000/svg"width="100"height="100"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-file-cog">
`," "))}};var fo=class extends Oi{constructor(i,n,r,a,s,o){super(i,n,r,s,o);this.rules=a;this.display()}display(){for(let i of this.rules){let n=this.contentEl.createDiv();n.id=i.alias,n.createEl(this.isMobile?"h4":"h3",{},a=>{a.innerHTML=`<ahref="${i.getURL()}">${i.getName()}</a>`});letr=[];for(letaofi.options)a.display(n,this.plugin.settings,this.plugin),r.push(a.getSearchInfo());this.addSettingSearchInfo(n,i.getName().toLowerCase(),i.getDescription().toLowerCase(),r,n.id)}}};varpm=require("obsidian");varka=classextendsCn{constructor(i,n,r=[]){super(i,n);this.app=i;this.inputEl=n;this.valuesToExclude=r}getSuggestions(i){letn=this.app.commands.listCommands();if(!n)return[];letr=n.filter(o=>{for(letlofthis.valuesToExclude)if(l.id==o.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==o.id))return!1;return!0}),a=[],s=i.toLowerCase();returnr.forEach(o=>{(o.id.contains(s)||o.name.toLowerCase().contains(s))&&a.push(o)}),a}renderSuggestion(i,n){n.setText(i.name)}selectSuggestion(i){this.inputEl.value=i.name,this.inputEl.setAttribute("commandId",i.id),this.inputEl.trigger("input"),this.close()}};varyo=classextendsst{constructor(i,n,r,a,s){super(i,n,E("options.custom-command.name"),E("options.custom-command.description"),E("options.custom-command.warning"),E("options.custom-command.add-input-button-text"),s,()=>{leto={id:"",name:""};this.lintCommands.push(o),this.saveSettings(),this.addCommand(o,this.lintCommands.length-1,!0)});this.lintCommands=r;this.app=a;this.display()}showInputEls(){this.lintCommands.forEach((i,n)=>{this.addCommand(i,n)})}addCommand(i,n,r=!1){newpm.Setting(this.inputElDiv).addSearch(a=>{newka(this.app,a.inputEl,this.lintCommands),a.setPlaceholder(E("options.custom-command.command-search-placeholder-text")).setValue(i.name).onChange(s=>{leto={id:a.inputEl.getAttribute("commandId"),name:s};o.name&&o.id?(this.lintCommands[n]=o,this.saveSettings()):!o.name&&!o.id&&(this.lintCommands[n]=o,this.saveSettings())}),a.inputEl.setAttr("tabIndex",n),a.inputEl.addClass("linter-custom-command"),r&&a.inputEl.focus()}).addExtraButton(a=>{a.setIcon("up-chevron-glyph").setTooltip(E("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(n,n-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("down-chevron-glyph").setTooltip(E("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(n,n+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("cross").setTooltip(E("options.custom-command.delete-tooltip")).onClick(()=>{this.lintCommands.splice(n,1),this.saveSettings(),this.resetInputEls()})})}arrayMove(i,n){if(n<0||n===this.lintCommands.length)return;letr=this.lintCommands[i];this.lintCommands[i]=this.lintCommands[n],this.lintCommands[n]=r}};varEc=require("obsidian");varHw="gm",bo=classextendsst{constructor(i,n,r,a){super(i,n,E("options.custom-replace.name"),E("options.custom-replace.description"),E("options.custom-replace.warning"),E("options.custom-replace.add-input-button-text"),a,()=>{lets={label:"",find:"",replace:"",flags:Hw};this.regexes.push(s),this.saveSettings(),this.addRegex(s,this.regexes.length-1,!0)});this.regexes=r;this.display(),this.inputElDiv.addClass("linter-custom-regex-replacement-container")}showInputEls(){this.regexes.forEach((i,n)=>{this.addRegex(i,n)})}addRegex(i,n,r=!1){leta=this.inputElDiv.createDiv({cls:"linter-custom-regex-replacement"}),s=a.createDiv(),o=newEc.Setting(s).addText(d=>{d.setPlaceholder(E("options.custom-replace.label-placeholder-text")).setValue(i.label).onChange(u=>{this.regexes[n].label=u,this.saveSettings()}),d.inputEl.setAttr("inputIndex",n),d.inputEl.addClass("linter-custom-regex-replacement-label-input"),r&&d.inputEl.focus()});o.controlEl.addClass("linter-custom-regex-replacement-label"),o.descEl.remove(),o.infoEl.remove(),o.nameEl.remove();letl=a.createDiv();newEc.Setting(l).addText(d=>{d.setPlaceholder(E("options.custom-replace.regex-to-find-placeholder-text")).setValue(i.find).onChange(u=>{this.regexes[n].find=u,this.saveSettings()})
`," "))}};var mm=require("obsidian");var xo=class{constructor(t,i,n,r){this.containerEl=t;this.searchZeroState=i;this.tabNameToTab=n;this.onFocus=r;this.searchSettingInfo=new Map;for(let[a,s]of n)this.searchSettingInfo.set(a,s.searchSettingInfo);this.display()}display(){let t=new mm.Setting(this.containerEl);t.settingEl.style.border="none",t.addSearch(i=>{this.search=i}),this.search.setPlaceholder(E("tabs.default-search-bar-text")),this.search.inputEl.onfocus=()=>{this.onFocus()},this.search.onChange(i=>{this.searchSettings(i.toLowerCase())})}searchSettings(t){let i=new Set,n=function(r,a){Ti(r),i.has(a)||i.add(a)};for(let[r,a]of this.searchSettingInfo)for(let s of a)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))n(s.containerEl,r);else if(s.options)for(let o of s.options){if(o.description.toLowerCase().includes(t)||o.name.toLowerCase().includes(t)){n(s.containerEl,r);break}else if(o.options){for(let l of o.options)if(l.description.toLowerCase().includes(t)||l.value.toLowerCase().includes(t)){n(s.containerEl,r);break}}ci(s.containerEl)}else ci(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?Ti(a.headingEl):ci(a.headingEl);i.size===0?Ti(this.searchZeroState):ci(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var gm=rn(Da());var Mn=require("obsidian");var za=class{constructor(t,i,n,r=!0){this.containerEl=t;this.name=i;this.description=n;this.disabled=r;this.display()}display(){let t=this.containerEl.createDiv(),i=t.createDiv("setting-item-info");this.nameEl=i.createDiv("setting-item-name"),this.nameEl.setText(this.name),this.descEl=i.createDiv("setting-item-description"),this.descEl.setText(this.description),this.inputContainerEl=t.createDiv("full-width-textbox-input-wrapper"),this.inputContainerEl.onmouseover=()=>{this.getInput().trim()!=""&&this.copyEl.removeClass("linter-visually-hidden")},this.inputContainerEl.onmouseleave=()=>{this.copyEl.addClass("linter-visually-hidden")},this.inputEl=this.inputContainerEl.createEl("textarea",{cls:"full-width"}),this.inputEl.spellcheck=!1,this.inputEl.disabled=this.disabled,this.copyEl=this.inputContainerEl.createDiv({cls:"settings-copy-button linter-visually-hidden ",attr:{"aria-label":E("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,Mn.setIcon)(this.copyIconEl,"linter-clipboard"),this.copyIconEl.onclick=()=>{this.handleCopy(this.copyIconEl)}}getInput(){return this.inputEl.value}handleCopy(t){navigator.clipboard.writeText(this.getInput()).then(()=>{(0,Mn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Mn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Mn.Notice(`${E("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var $w=Object.keys(gm.default.levels),wo=class extends Oi{constructor(t,i,n,r){super(t,i,"Debug",n,r),this.display()}display(){let t=this.contentEl.createDiv(),i={isForEnum:!0,values:$w,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new ji(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{Ya(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new za(t,n,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(t,n,r),t=this.contentEl.createDiv(),this.addSettingSearchInfoForGeneralSettings(new Ci(t,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin)),t=this.contentEl.createDiv(),n=E("tabs.debug.linter-logs.name"),r=E("tabs.debug.linter-logs.description");let s=new za(t,n,"");s.inputEl.setText(ja.join(`
`)),Ai(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var ko=class extends ct.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new ct.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");ct.Platform.isMobile?n.addClass("linter-mobile"):n.createEl("h1").setText(E("linter-title")),this.navContainer=i.createEl("nav",{cls:"linter-setting-header"}),this.tabNavEl=this.navContainer.createDiv("linter-setting-tab-group"),this.settingsContentEl=i.createDiv("linter-setting-content"),this.addTabs(ct.Platform.isMobile),this.createSearchZeroState(ct.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new ho(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(N))this.addTab(new fo(this.tabNavEl,this.settingsContentEl,n,St.get(n),i,this.plugin));this.addTab(new vo(this.tabNavEl,this.settingsContentEl,i,this.app,this.plugin)),this.addTab(new wo(this.tabNavEl,this.settingsContentEl,i,this.plugin))}generateSearchBar(i){this.tabSearcher=new xo(i,this.searchZeroState,this.tabNameToTab,()=>{for(let n of this.tabNameToTab.values()){n.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(i){this.searchZeroState=this.settingsContentEl.createDiv(),ci(this.searchZeroState),this.searchZeroState.createEl(i?"h3":"h2",{text:E("empty-search-results-text")}).style.textAlign="center"}addTab(i){i.navButton.onclick=()=>{this.onTabClick(i.name)},i.updateTabDisplayMode(this.selectedTab===i.name,"the status is still the same"),this.tabNameToTab.set(i.name,i)}onTabClick(i){if(this.selectedTab!==i){if(this.selectedTab=="")for(let[n,r]of this.tabNameToTab)r.updateTabDisplayMode(n===i,"leaving search mode by selecting a tab");else ci(this.searchZeroState),this.tabNameToTab.get(i).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=i}}};var fm=require("obsidian");var Ww=/^---\n/gm,hm=`${gn}:`,zo=class extends fm.EditorSuggest{constructor(i){super(i.app);this.plugin=i;this.inline=!1;let n=E("all-rules-option");this.ruleInfo=[{displayName:n,name:n.toLowerCase(),alias:"all"}];for(let r of Li){let a=r.getName();this.ruleInfo.push({displayName:a,name:a.toLowerCase(),alias:r.alias})}}onTrigger(i,n,r){let a=n.getLine(i.line).toLowerCase();if(a.startsWith(hm)||this.disabledRulesIsEndOfStartOfFileToCursor(n.getRange({line:0,ch:0},i))){this.inline=a.startsWith(hm);let o=n.getLine(i.line).substring(0,i.ch),l=o.match(/(\S+)$/)?.first().replaceAll("[","").replaceAll("]","");if(l)return{end:i,start:{ch:o.lastIndexOf(l),line:i.line},query:l}}return null}getSuggestions(i){let[n,r]=Ms(i.editor.getValue());if(r)return[];let a=i.query.toLowerCase();return this.ruleInfo.filter(o=>(o.name.contains(a)||o.alias.contains(a))&&!n.includes(o.alias))}renderSuggestion(i,n){n.addClass("mod-complex");let r=n.createDiv({cls:"suggestion-content"});r.createDiv({cls:"suggestion-title"}).setText(`${i.displayName}`),r.createDiv({cls:"suggestion-note"}).setText(`${i.alias}`)}selectSuggestion(i){if(this.context){let n=i.alias;this.inline?n=`${n},`:n=`${n}
`),a=[];if(r.length%i.length!==0)for(let s=0;s<i.length;s++)a.push(n);else{let s=r.length/i.length,o="";for(let l=0;l<r.length;l++)o+=r[l],(l+1===i.length||(l+1)%s===0)&&(a.push(o),o="")}return a}async pasteAsPlainText(i){let n=await navigator.clipboard.readText();if(!n){new de.Notice(E("notice-text.empty-clipboard"),dt);return}i.replaceSelection(n)}setCustomCommandCallback(i){(0,km.warn)(E("logs.custom-command-callback-warning")),this.customCommandsCallback=i}async runCustomCommandsInSidebar(i){if(!this.settings.lintCommands||this.settings.lintCommands.length==0)return;let n=this.app.workspace.getRightLeaf(!1),r=this.getEditor();await this.customCommandsLock.acquire("command",async()=>{this.currentlyOpeningSidebar=!0,await n.openFile(i),this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands),this.customCommandsCallback&&await this.customCommandsCallback(i)}),n.detach(),r&&r.focus(),this.currentlyOpeningSidebar=!1}async runCustomCommands(i){!this.settings.lintCommands||this.settings.lintCommands.length==0||await this.customCommandsLock.acquire("command",async()=>{try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(n){this.handleLintError(i,n,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(i)})}getEditor(){let i=this.app.workspace.getActiveViewOfType(de.MarkdownView);return i?i.editor:null}getLineContent(i,n){return i.getLine(n.anchor.line)}moveConfigValuesToKeyBasedFormat(){$a("en");for(let i of Li){let n=E("rules."+i.alias+".name"),r=this.settings.ruleConfigs[n];if(r!=null){let a=E("rules."+i.alias+".description"),s={enabled:r[a]??!1};for(let o of i.options){if(o.configKey==="enabled")continue;let l=E("rules."+i.alias+"."+o.configKey+".name");s[o.configKey]=r[l]??o.defaultValue}this.settings.ruleConfigs[i.alias]=s,delete this.settings.ruleConfigs[n]}}this.settings.settingsConvertedToConfigKeyValues=!0,this.saveSettings(),$a(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof de.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof de.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of St.get("Paste"))if(i.getOptions(this.settings).enabled){this.overridePaste=!0;return}this.overridePaste=!1}};