36 lines
143 KiB
JavaScript
36 lines
143 KiB
JavaScript
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var Qi=Object.create;var wt=Object.defineProperty;var Zi=Object.getOwnPropertyDescriptor;var Ki=Object.getOwnPropertyNames;var Ji=Object.getPrototypeOf,Xi=Object.prototype.hasOwnProperty;var Kt=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),Kn=(e,n)=>{for(var t in n)wt(e,t,{get:n[t],enumerable:!0})},Jn=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Ki(n))!Xi.call(e,i)&&i!==t&&wt(e,i,{get:()=>n[i],enumerable:!(r=Zi(n,i))||r.enumerable});return e};var Dt=(e,n,t)=>(t=e!=null?Qi(Ji(e)):{},Jn(n||!e||!e.__esModule?wt(t,"default",{value:e,enumerable:!0}):t,e)),Gi=e=>Jn(wt({},"__esModule",{value:!0}),e);var Gn=Kt((Ma,Jt)=>{(function(){var e;typeof Jt!="undefined"?e=Jt.exports=r:e=function(){return this||(0,eval)("this")}(),e.format=r,e.vsprintf=t,typeof console!="undefined"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,u){return r.apply(null,[i].concat(u))}function r(i){for(var u=1,o=[].slice.call(arguments),a=0,c=i.length,l="",s,h=!1,f,p,b=!1,A,y=function(){return o[u++]},F=function(){for(var w="";/\d/.test(i[a]);)w+=i[a++],s=i[a];return w.length>0?parseInt(w):null};a<c;++a)if(s=i[a],h)switch(h=!1,s=="."?(b=!1,s=i[++a]):s=="0"&&i[a+1]=="."?(b=!0,a+=2,s=i[a]):b=!0,A=F(),s){case"b":l+=parseInt(y(),10).toString(2);break;case"c":f=y(),typeof f=="string"||f instanceof String?l+=f:l+=String.fromCharCode(parseInt(f,10));break;case"d":l+=parseInt(y(),10);break;case"f":p=String(parseFloat(y()).toFixed(A||6)),l+=b?p:p.replace(/^0/,"");break;case"j":l+=JSON.stringify(y());break;case"o":l+="0"+parseInt(y(),10).toString(8);break;case"s":l+=y();break;case"x":l+="0x"+parseInt(y(),10).toString(16);break;case"X":l+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:l+=s;break}else s==="%"?h=!0:l+=s;return l}})()});var Dn=Kt((Yp,Xr)=>{Xr.exports=function(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}});var ai=Kt((Qp,oi)=>{"use strict";var jt=Object.prototype.hasOwnProperty,ui=Object.prototype.toString,Gr=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ti=function(n){return typeof Array.isArray=="function"?Array.isArray(n):ui.call(n)==="[object Array]"},ni=function(n){if(!n||ui.call(n)!=="[object Object]")return!1;var t=jt.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&jt.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i=="undefined"||jt.call(n,i)},ri=function(n,t){Gr&&t.name==="__proto__"?Gr(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},ii=function(n,t){if(t==="__proto__")if(jt.call(n,t)){if(ei)return ei(n,t).value}else return;return n[t]};oi.exports=function e(){var n,t,r,i,u,o,a=arguments[0],c=1,l=arguments.length,s=!1;for(typeof a=="boolean"&&(s=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c<l;++c)if(n=arguments[c],n!=null)for(t in n)r=ii(a,t),i=ii(n,t),a!==i&&(s&&i&&(ni(i)||(u=ti(i)))?(u?(u=!1,o=r&&ti(r)?r:[]):o=r&&ni(r)?r:{},ri(a,{name:t,newValue:e(s,o,i)})):typeof i!="undefined"&&ri(a,{name:t,newValue:i}));return a}});var Sa={};Kn(Sa,{SUGGESTIONS:()=>$t,default:()=>Wt,getElectronWindow:()=>wa});module.exports=Gi(Sa);var se=require("obsidian");var N=require("obsidian");var Ve={children(e){return e.children},annotatetextnode(e,n){return e.type==="text"?{offset:{end:e.position.end.offset,start:e.position.start.offset},text:n.substring(e.position.start.offset,e.position.end.offset)}:null},interpretmarkup(e=""){return e}};function eu(e,n,t=Ve){let r=[];function i(u){let o=t.annotatetextnode(u,n);o!==null&&r.push(o);let a=t.children(u);a!==null&&Array.isArray(a)&&a.forEach(i)}return i(e),r}function tu(e,n,t=Ve){let r=[],i={offset:{end:0,start:0}};for(let o of n){let a=e.substring(i.offset.end,o.offset.start);r.push({interpretAs:t.interpretmarkup(a),markup:a,offset:{end:o.offset.start,start:i.offset.end}}),r.push(o),i=o}let u=e.substring(i.offset.end,e.length);return r.push({interpretAs:t.interpretmarkup(u),markup:u,offset:{end:e.length,start:i.offset.end}}),{annotation:r}}function Xn(e,n,t=Ve){let r=eu(n,e,t);return tu(e,r,t)}var va=ye(/[A-Za-z]/),Ta=ye(/[\dA-Za-z]/),Oa=ye(/[#-'*+\--9=?A-Z^-~]/);var _a=ye(/\d/),Pa=ye(/[\dA-Fa-f]/),Ia=ye(/[!-/:-@[-`{-~]/);function at(e){return e!==null&&e<-2}function st(e){return e===-2||e===-1||e===32}var La=ye(/\p{P}|\p{S}/u),Ra=ye(/\s/);function ye(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var er=Dt(Gn(),1),lt=Object.assign(Ie(Error),{eval:Ie(EvalError),range:Ie(RangeError),reference:Ie(ReferenceError),syntax:Ie(SyntaxError),type:Ie(TypeError),uri:Ie(URIError)});function Ie(e){return n.displayName=e.displayName||e.name,n;function n(t,...r){let i=t&&(0,er.default)(t,...r);return new e(i)}}var St={}.hasOwnProperty,tr={yaml:"-",toml:"+"};function He(e){let n=[],t=-1,r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++t<r.length;)n[t]=ru(r[t]);return n}function ru(e){let n=e;if(typeof n=="string"){if(!St.call(tr,n))throw lt("Missing matter definition for `%s`",n);n={type:n,marker:tr[n]}}else if(typeof n!="object")throw lt("Expected matter to be an object, not `%j`",n);if(!St.call(n,"type"))throw lt("Missing `type` in matter `%j`",n);if(!St.call(n,"fence")&&!St.call(n,"marker"))throw lt("Missing `marker` or `fence` in matter `%j`",n);return n}function Gt(e){let n=He(e),t={},r=-1;for(;++r<n.length;){let i=n[r],u=Xt(i,"open").charCodeAt(0),o=iu(i),a=t[u];Array.isArray(a)?a.push(o):t[u]=[o]}return{flow:t}}function iu(e){let n=e.anywhere,t=e.type,r=t+"Fence",i=r+"Sequence",u=t+"Value",o={tokenize:s,partial:!0},a,c=0;return{tokenize:l,concrete:!0};function l(h,f,p){let b=this;return A;function A(C){let _=b.now();return _.column===1&&(_.line===1||n)&&(a=Xt(e,"open"),c=0,C===a.charCodeAt(c))?(h.enter(t),h.enter(r),h.enter(i),y(C)):p(C)}function y(C){return c===a.length?(h.exit(i),st(C)?(h.enter("whitespace"),F(C)):w(C)):C===a.charCodeAt(c++)?(h.consume(C),y):p(C)}function F(C){return st(C)?(h.consume(C),F):(h.exit("whitespace"),w(C))}function w(C){return at(C)?(h.exit(r),h.enter("lineEnding"),h.consume(C),h.exit("lineEnding"),a=Xt(e,"close"),c=0,h.attempt(o,g,E)):p(C)}function E(C){return C===null||at(C)?T(C):(h.enter(u),S(C))}function S(C){return C===null||at(C)?(h.exit(u),T(C)):(h.consume(C),S)}function T(C){return C===null?p(C):(h.enter("lineEnding"),h.consume(C),h.exit("lineEnding"),h.attempt(o,g,E))}function g(C){return h.exit(t),f(C)}}function s(h,f,p){let b=0;return A;function A(E){return E===a.charCodeAt(b)?(h.enter(r),h.enter(i),y(E)):p(E)}function y(E){return b===a.length?(h.exit(i),st(E)?(h.enter("whitespace"),F(E)):w(E)):E===a.charCodeAt(b++)?(h.consume(E),y):p(E)}function F(E){return st(E)?(h.consume(E),F):(h.exit("whitespace"),w(E))}function w(E){return E===null||at(E)?(h.exit(r),f(E)):p(E)}}}function Xt(e,n){return e.marker?nr(e.marker,n).repeat(3):nr(e.fence,n)}function nr(e,n){return typeof e=="string"?e:e[n]}function en(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nn(e){let n=He(e),t={},r={},i=-1;for(;++i<n.length;){let u=n[i];t[u.type]=uu(u),r[u.type]=ou,r[u.type+"Value"]=au}return{enter:t,exit:r}}function uu(e){return n;function n(t){this.enter({type:e.type,value:""},t),this.buffer()}}function ou(e){let n=this.resume(),t=this.stack[this.stack.length-1];"value"in t,this.exit(e),t.value=n.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function au(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function rn(e){let n=[],t={},r=He(e),i=-1;for(;++i<r.length;){let u=r[i];t[u.type]=su(u);let o=tn(u,"open");n.push({atBreak:!0,character:o.charAt(0),after:en(o.charAt(1))})}return{unsafe:n,handlers:t}}function su(e){let n=tn(e,"open"),t=tn(e,"close");return r;function r(i){return n+(i.value?`
|
|
`+i.value:"")+`
|
|
`+t}}function tn(e,n){return e.marker?rr(e.marker,n).repeat(3):rr(e.fence,n)}function rr(e,n){return typeof e=="string"?e:e[n]}var lu="yaml";function Bt(e){let n=this,t=e||lu,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gt(t)),u.push(nn(t)),o.push(rn(t))}var cu={};function un(e,n){let t=n||cu,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return ur(e,r,i)}function ur(e,n,t){if(fu(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ir(e.children,n,t)}return Array.isArray(e)?ir(e,n,t):""}function ir(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=ur(e[i],n,t);return r.join("")}function fu(e){return!!(e&&typeof e=="object")}function Z(e,n,t,r){let i=e.length,u=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);u<r.length;)o=r.slice(u,u+1e4),o.unshift(n,0),e.splice(...o),u+=1e4,n+=1e4}function G(e,n){return e.length>0?(Z(e,e.length,0,n),e):n}var or={}.hasOwnProperty;function ar(e){let n={},t=-1;for(;++t<e.length;)pu(n,e[t]);return n}function pu(e,n){let t;for(t in n){let i=(or.call(e,t)?e[t]:void 0)||(e[t]={}),u=n[t],o;if(u)for(o in u){or.call(i,o)||(i[o]=[]);let a=u[o];hu(i[o],Array.isArray(a)?a:a?[a]:[])}}}function hu(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Z(e,0,0,r)}var sr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var hs=Ee(/[A-Za-z]/),ms=Ee(/[\dA-Za-z]/),ds=Ee(/[#-'*+\--9=?A-Z^-~]/);var gs=Ee(/\d/),Fs=Ee(/[\dA-Fa-f]/),xs=Ee(/[!-/:-@[-`{-~]/);function on(e){return e===-2||e===-1||e===32}var ys=Ee(sr),Es=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function P(e,n,t,r){let i=r?r-1:Number.POSITIVE_INFINITY,u=0;return o;function o(c){return on(c)?(e.enter(t),a(c)):n(c)}function a(c){return on(c)&&u++<i?(e.consume(c),a):(e.exit(t),n(c))}}var lr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var Ds=Ae(/[A-Za-z]/),Ss=Ae(/[\dA-Za-z]/),Bs=Ae(/[#-'*+\--9=?A-Z^-~]/);var vs=Ae(/\d/),Ts=Ae(/[\dA-Fa-f]/),Os=Ae(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}var _s=Ae(lr),Ps=Ae(/\s/);function Ae(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}var cr={tokenize:mu};function mu(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),P(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),u(a)}function u(a){let c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return qe(a)?(e.consume(a),e.exit("chunkText"),u):(e.consume(a),o)}}var pr={tokenize:du},fr={tokenize:gu};function du(e){let n=this,t=[],r=0,i,u,o;return a;function a(E){if(r<t.length){let S=t[r];return n.containerState=S[1],e.attempt(S[0].continuation,c,l)(E)}return l(E)}function c(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&w();let S=n.events.length,T=S,g;for(;T--;)if(n.events[T][0]==="exit"&&n.events[T][1].type==="chunkFlow"){g=n.events[T][1].end;break}F(r);let C=S;for(;C<n.events.length;)n.events[C][1].end=Object.assign({},g),C++;return Z(n.events,T+1,0,n.events.slice(S)),n.events.length=C,l(E)}return a(E)}function l(E){if(r===t.length){if(!i)return f(E);if(i.currentConstruct&&i.currentConstruct.concrete)return b(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(fr,s,h)(E)}function s(E){return i&&w(),F(r),f(E)}function h(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,b(E)}function f(E){return n.containerState={},e.attempt(fr,p,b)(E)}function p(E){return r++,t.push([n.currentConstruct,n.containerState]),f(E)}function b(E){if(E===null){i&&w(),F(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:u,_tokenizer:i}),A(E)}function A(E){if(E===null){y(e.exit("chunkFlow"),!0),F(0),e.consume(E);return}return qe(E)?(e.consume(E),y(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),A)}function y(E,S){let T=n.sliceStream(E);if(S&&T.push(null),E.previous=u,u&&(u.next=E),u=E,i.defineSkip(E.start),i.write(T),n.parser.lazy[E.start.line]){let g=i.events.length;for(;g--;)if(i.events[g][1].start.offset<o&&(!i.events[g][1].end||i.events[g][1].end.offset>o))return;let C=n.events.length,_=C,R,Y;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(R){Y=n.events[_][1].end;break}R=!0}for(F(r),g=C;g<n.events.length;)n.events[g][1].end=Object.assign({},Y),g++;Z(n.events,_+1,0,n.events.slice(C)),n.events.length=g}}function F(E){let S=t.length;for(;S-- >E;){let T=t[S];n.containerState=T[1],T[0].exit.call(n,e)}t.length=E}function w(){i.write([null]),u=void 0,i=void 0,n.containerState._closeFlow=void 0}}function gu(e,n,t){return P(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var hr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var qs=Ce(/[A-Za-z]/),$s=Ce(/[\dA-Za-z]/),Ws=Ce(/[#-'*+\--9=?A-Z^-~]/);var Ys=Ce(/\d/),Qs=Ce(/[\dA-Fa-f]/),Zs=Ce(/[!-/:-@[-`{-~]/);function mr(e){return e!==null&&(e<0||e===32)}var dr=Ce(hr),gr=Ce(/\s/);function Ce(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function an(e){if(e===null||mr(e)||gr(e))return 1;if(dr(e))return 2}function $e(e,n,t){let r=[],i=-1;for(;++i<e.length;){let u=e[i].resolveAll;u&&!r.includes(u)&&(n=u(n,t),r.push(u))}return n}var ct={name:"attention",tokenize:xu,resolveAll:Fu};function Fu(e,n){let t=-1,r,i,u,o,a,c,l,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let h=Object.assign({},e[r][1].end),f=Object.assign({},e[t][1].start);Fr(h,-c),Fr(f,c),o={type:c>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},a={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:f},u={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},a.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=G(l,[["enter",e[r][1],n],["exit",e[r][1],n]])),l=G(l,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",u,n]]),l=G(l,$e(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),l=G(l,[["exit",u,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,l=G(l,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,Z(e,r-1,t-r+3,l),t=r+l.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function xu(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=an(r),u;return o;function o(c){return u=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===u)return e.consume(c),a;let l=e.exit("attentionSequence"),s=an(c),h=!s||s===2&&i||t.includes(c),f=!i||i===2&&s||t.includes(r);return l._open=!!(u===42?h:h&&(i||!f)),l._close=!!(u===42?f:f&&(s||!h)),n(c)}}function Fr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var xr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var re=be(/[A-Za-z]/),ee=be(/[\dA-Za-z]/),yr=be(/[#-'*+\--9=?A-Z^-~]/);function Er(e){return e!==null&&(e<32||e===127)}var ft=be(/\d/),Ar=be(/[\dA-Fa-f]/),Cr=be(/[!-/:-@[-`{-~]/);function v(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var ol=be(xr),al=be(/\s/);function be(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}var sn={name:"autolink",tokenize:yu};function yu(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(p){return re(p)?(e.consume(p),o):l(p)}function o(p){return p===43||p===45||p===46||ee(p)?(r=1,a(p)):l(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ee(p))&&r++<32?(e.consume(p),a):(r=0,l(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||Er(p)?t(p):(e.consume(p),c)}function l(p){return p===64?(e.consume(p),s):yr(p)?(e.consume(p),l):t(p)}function s(p){return ee(p)?h(p):t(p)}function h(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):f(p)}function f(p){if((p===45||ee(p))&&r++<63){let b=p===45?f:h;return e.consume(p),b}return t(p)}}var ke={tokenize:Eu,partial:!0};function Eu(e,n,t){return r;function r(u){return z(u)?P(e,i,"linePrefix")(u):i(u)}function i(u){return u===null||v(u)?n(u):t(u)}}var vt={name:"blockQuote",tokenize:Au,continuation:{tokenize:Cu},exit:bu};function Au(e,n,t){let r=this;return i;function i(o){if(o===62){let a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),u}return t(o)}function u(o){return z(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Cu(e,n,t){let r=this;return i;function i(o){return z(o)?P(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):u(o)}function u(o){return e.attempt(vt,n,t)(o)}}function bu(e){e.exit("blockQuote")}var Tt={name:"characterEscape",tokenize:ku};function ku(e,n,t){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),i}function i(u){return Cr(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(u)}}var br=document.createElement("i");function We(e){let n="&"+e+";";br.innerHTML=n;let t=br.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}var Ot={name:"characterReference",tokenize:wu};function wu(e,n,t){let r=this,i=0,u,o;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),u=31,o=ee,s(h))}function l(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,o=Ar,s):(e.enter("characterReferenceValue"),u=7,o=ft,s(h))}function s(h){if(h===59&&i){let f=e.exit("characterReferenceValue");return o===ee&&!We(r.sliceSerialize(f))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(h)&&i++<u?(e.consume(h),s):t(h)}}var kr={tokenize:Su,partial:!0},_t={name:"codeFenced",tokenize:Du,concrete:!0};function Du(e,n,t){let r=this,i={tokenize:T,partial:!0},u=0,o=0,a;return c;function c(g){return l(g)}function l(g){let C=r.events[r.events.length-1];return u=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,a=g,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(g)}function s(g){return g===a?(o++,e.consume(g),s):o<3?t(g):(e.exit("codeFencedFenceSequence"),z(g)?P(e,h,"whitespace")(g):h(g))}function h(g){return g===null||v(g)?(e.exit("codeFencedFence"),r.interrupt?n(g):e.check(kr,A,S)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||v(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(g)):z(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),P(e,p,"whitespace")(g)):g===96&&g===a?t(g):(e.consume(g),f)}function p(g){return g===null||v(g)?h(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(g))}function b(g){return g===null||v(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(g)):g===96&&g===a?t(g):(e.consume(g),b)}function A(g){return e.attempt(i,S,y)(g)}function y(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),F}function F(g){return u>0&&z(g)?P(e,w,"linePrefix",u+1)(g):w(g)}function w(g){return g===null||v(g)?e.check(kr,A,S)(g):(e.enter("codeFlowValue"),E(g))}function E(g){return g===null||v(g)?(e.exit("codeFlowValue"),w(g)):(e.consume(g),E)}function S(g){return e.exit("codeFenced"),n(g)}function T(g,C,_){let R=0;return Y;function Y(I){return g.enter("lineEnding"),g.consume(I),g.exit("lineEnding"),H}function H(I){return g.enter("codeFencedFence"),z(I)?P(g,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):D(I)}function D(I){return I===a?(g.enter("codeFencedFenceSequence"),B(I)):_(I)}function B(I){return I===a?(R++,g.consume(I),B):R>=o?(g.exit("codeFencedFenceSequence"),z(I)?P(g,L,"whitespace")(I):L(I)):_(I)}function L(I){return I===null||v(I)?(g.exit("codeFencedFence"),C(I)):_(I)}}}function Su(e,n,t){let r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),u)}function u(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}var pt={name:"codeIndented",tokenize:vu},Bu={tokenize:Tu,partial:!0};function vu(e,n,t){let r=this;return i;function i(l){return e.enter("codeIndented"),P(e,u,"linePrefix",5)(l)}function u(l){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(l):t(l)}function o(l){return l===null?c(l):v(l)?e.attempt(Bu,o,c)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||v(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),a)}function c(l){return e.exit("codeIndented"),n(l)}}function Tu(e,n,t){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):v(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):P(e,u,"linePrefix",5)(o)}function u(o){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):v(o)?i(o):t(o)}}var ln={name:"codeText",tokenize:Pu,resolve:Ou,previous:_u};function Ou(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function _u(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Pu(e,n,t){let r=this,i=0,u,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),c(f)}function c(f){return f===96?(e.consume(f),i++,c):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?t(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),u=0,h(f)):v(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(f))}function s(f){return f===null||f===32||f===96||v(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),s)}function h(f){return f===96?(e.consume(f),u++,h):u===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(f)):(o.type="codeTextData",s(f))}}function Pt(e){let n={},t=-1,r,i,u,o,a,c,l;for(;++t<e.length;){for(;t in n;)t=n[t];if(r=e[t],t&&r[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,u=0,u<c.length&&c[u][1].type==="lineEndingBlank"&&(u+=2),u<c.length&&c[u][1].type==="content"))for(;++u<c.length&&c[u][1].type!=="content";)c[u][1].type==="chunkText"&&(c[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Iu(e,t)),t=n[t],l=!0);else if(r[1]._container){for(u=t,i=void 0;u--&&(o=e[u],o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),o[1].type="lineEnding",i=u);i&&(r[1].end=Object.assign({},e[i][1].start),a=e.slice(i,t),a.unshift(r),Z(e,i,t-i+1,a))}}return!l}function Iu(e,n){let t=e[n][1],r=e[n][2],i=n-1,u=[],o=t._tokenizer||r.parser[t.contentType](t.start),a=o.events,c=[],l={},s,h,f=-1,p=t,b=0,A=0,y=[A];for(;p;){for(;e[++i][1]!==p;);u.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),h&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(A=f+1,y.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),f=y.length;f--;){let F=a.slice(y[f],y[f+1]),w=u.pop();c.unshift([w,w+F.length-1]),Z(e,w,2,F)}for(f=-1;++f<c.length;)l[b+c[f][0]]=b+c[f][1],b+=c[f][1]-c[f][0]-1;return l}var cn={tokenize:zu,resolve:Ru},Lu={tokenize:Mu,partial:!0};function Ru(e){return Pt(e),e}function zu(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?u(a):v(a)?e.check(Lu,o,u)(a):(e.consume(a),i)}function u(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Mu(e,n,t){let r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),P(e,u,"linePrefix")}function u(o){if(o===null||v(o))return t(o);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}var wr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var jl=we(/[A-Za-z]/),Ul=we(/[\dA-Za-z]/),Vl=we(/[#-'*+\--9=?A-Z^-~]/);function fn(e){return e!==null&&(e<32||e===127)}var Hl=we(/\d/),ql=we(/[\dA-Fa-f]/),$l=we(/[!-/:-@[-`{-~]/);function Dr(e){return e!==null&&e<-2}function Sr(e){return e!==null&&(e<0||e===32)}var Wl=we(wr),Yl=we(/\s/);function we(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function It(e,n,t,r,i,u,o,a,c){let l=c||Number.POSITIVE_INFINITY,s=0;return h;function h(F){return F===60?(e.enter(r),e.enter(i),e.enter(u),e.consume(F),e.exit(u),f):F===null||F===32||F===41||fn(F)?t(F):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(F))}function f(F){return F===62?(e.enter(u),e.consume(F),e.exit(u),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(F))}function p(F){return F===62?(e.exit("chunkString"),e.exit(a),f(F)):F===null||F===60||Dr(F)?t(F):(e.consume(F),F===92?b:p)}function b(F){return F===60||F===62||F===92?(e.consume(F),p):p(F)}function A(F){return!s&&(F===null||F===41||Sr(F))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(F)):s<l&&F===40?(e.consume(F),s++,A):F===41?(e.consume(F),s--,A):F===null||F===32||F===40||fn(F)?t(F):(e.consume(F),F===92?y:A)}function y(F){return F===40||F===41||F===92?(e.consume(F),A):A(F)}}var Br=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var Gl=De(/[A-Za-z]/),ec=De(/[\dA-Za-z]/),tc=De(/[#-'*+\--9=?A-Z^-~]/);var nc=De(/\d/),rc=De(/[\dA-Fa-f]/),ic=De(/[!-/:-@[-`{-~]/);function pn(e){return e!==null&&e<-2}function vr(e){return e===-2||e===-1||e===32}var uc=De(Br),oc=De(/\s/);function De(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function Lt(e,n,t,r,i,u){let o=this,a=0,c;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(u),s}function s(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(u),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):pn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||pn(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),c||(c=!vr(p)),p===92?f:h)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}var Tr=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var pc=Se(/[A-Za-z]/),hc=Se(/[\dA-Za-z]/),mc=Se(/[#-'*+\--9=?A-Z^-~]/);var dc=Se(/\d/),gc=Se(/[\dA-Fa-f]/),Fc=Se(/[!-/:-@[-`{-~]/);function hn(e){return e!==null&&e<-2}var xc=Se(Tr),yc=Se(/\s/);function Se(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function Rt(e,n,t,r,i,u){let o;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,c):t(f)}function c(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):(e.enter(u),l(f))}function l(f){return f===o?(e.exit(u),c(o)):f===null?t(f):hn(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),P(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(f))}function s(f){return f===o||f===null||hn(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?h:s)}function h(f){return f===o||f===92?(e.consume(f),s):s(f)}}var Or=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var Dc=Be(/[A-Za-z]/),Sc=Be(/[\dA-Za-z]/),Bc=Be(/[#-'*+\--9=?A-Z^-~]/);var vc=Be(/\d/),Tc=Be(/[\dA-Fa-f]/),Oc=Be(/[!-/:-@[-`{-~]/);function _r(e){return e!==null&&e<-2}function Pr(e){return e===-2||e===-1||e===32}var _c=Be(Or),Pc=Be(/\s/);function Be(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function Le(e,n){let t;return r;function r(i){return _r(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):Pr(i)?P(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}function Fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var mn={name:"definition",tokenize:ju},Nu={tokenize:Uu,partial:!0};function ju(e,n,t){let r=this,i;return u;function u(p){return e.enter("definition"),o(p)}function o(p){return Lt.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return K(p)?Le(e,l)(p):l(p)}function l(p){return It(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Nu,h,h)(p)}function h(p){return z(p)?P(e,f,"whitespace")(p):f(p)}function f(p){return p===null||v(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Uu(e,n,t){return r;function r(a){return K(a)?Le(e,i)(a):t(a)}function i(a){return Rt(e,u,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function u(a){return z(a)?P(e,o,"whitespace")(a):o(a)}function o(a){return a===null||v(a)?n(a):t(a)}}var dn={name:"hardBreakEscape",tokenize:Vu};function Vu(e,n,t){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),i}function i(u){return v(u)?(e.exit("hardBreakEscape"),n(u)):t(u)}}var gn={name:"headingAtx",tokenize:qu,resolve:Hu};function Hu(e,n){let t=e.length-2,r=3,i,u;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},u={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Z(e,r,t-r+1,[["enter",i,n],["enter",u,n],["exit",u,n],["exit",i,n]])),e}function qu(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),u(s)}function u(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||K(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||v(s)?(e.exit("atxHeading"),n(s)):z(s)?P(e,a,"whitespace")(s):(e.enter("atxHeadingText"),l(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),a(s))}function l(s){return s===null||s===35||K(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),l)}}var Ir=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fn=["pre","script","style","textarea"];var xn={name:"htmlFlow",tokenize:Qu,resolveTo:Yu,concrete:!0},$u={tokenize:Ku,partial:!0},Wu={tokenize:Zu,partial:!0};function Yu(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Qu(e,n,t){let r=this,i,u,o,a,c;return l;function l(d){return s(d)}function s(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),h}function h(d){return d===33?(e.consume(d),f):d===47?(e.consume(d),u=!0,A):d===63?(e.consume(d),i=3,r.interrupt?n:m):re(d)?(e.consume(d),o=String.fromCharCode(d),y):t(d)}function f(d){return d===45?(e.consume(d),i=2,p):d===91?(e.consume(d),i=5,a=0,b):re(d)?(e.consume(d),i=4,r.interrupt?n:m):t(d)}function p(d){return d===45?(e.consume(d),r.interrupt?n:m):t(d)}function b(d){let ne="CDATA[";return d===ne.charCodeAt(a++)?(e.consume(d),a===ne.length?r.interrupt?n:D:b):t(d)}function A(d){return re(d)?(e.consume(d),o=String.fromCharCode(d),y):t(d)}function y(d){if(d===null||d===47||d===62||K(d)){let ne=d===47,je=o.toLowerCase();return!ne&&!u&&Fn.includes(je)?(i=1,r.interrupt?n(d):D(d)):Ir.includes(o.toLowerCase())?(i=6,ne?(e.consume(d),F):r.interrupt?n(d):D(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):u?w(d):E(d))}return d===45||ee(d)?(e.consume(d),o+=String.fromCharCode(d),y):t(d)}function F(d){return d===62?(e.consume(d),r.interrupt?n:D):t(d)}function w(d){return z(d)?(e.consume(d),w):Y(d)}function E(d){return d===47?(e.consume(d),Y):d===58||d===95||re(d)?(e.consume(d),S):z(d)?(e.consume(d),E):Y(d)}function S(d){return d===45||d===46||d===58||d===95||ee(d)?(e.consume(d),S):T(d)}function T(d){return d===61?(e.consume(d),g):z(d)?(e.consume(d),T):E(d)}function g(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),c=d,C):z(d)?(e.consume(d),g):_(d)}function C(d){return d===c?(e.consume(d),c=null,R):d===null||v(d)?t(d):(e.consume(d),C)}function _(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||K(d)?T(d):(e.consume(d),_)}function R(d){return d===47||d===62||z(d)?E(d):t(d)}function Y(d){return d===62?(e.consume(d),H):t(d)}function H(d){return d===null||v(d)?D(d):z(d)?(e.consume(d),H):t(d)}function D(d){return d===45&&i===2?(e.consume(d),q):d===60&&i===1?(e.consume(d),W):d===62&&i===4?(e.consume(d),ue):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),pe):v(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($u,he,B)(d)):d===null||v(d)?(e.exit("htmlFlowData"),B(d)):(e.consume(d),D)}function B(d){return e.check(Wu,L,he)(d)}function L(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),I}function I(d){return d===null||v(d)?B(d):(e.enter("htmlFlowData"),D(d))}function q(d){return d===45?(e.consume(d),m):D(d)}function W(d){return d===47?(e.consume(d),o="",le):D(d)}function le(d){if(d===62){let ne=o.toLowerCase();return Fn.includes(ne)?(e.consume(d),ue):D(d)}return re(d)&&o.length<8?(e.consume(d),o+=String.fromCharCode(d),le):D(d)}function pe(d){return d===93?(e.consume(d),m):D(d)}function m(d){return d===62?(e.consume(d),ue):d===45&&i===2?(e.consume(d),m):D(d)}function ue(d){return d===null||v(d)?(e.exit("htmlFlowData"),he(d)):(e.consume(d),ue)}function he(d){return e.exit("htmlFlow"),n(d)}}function Zu(e,n,t){let r=this;return i;function i(o){return v(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),u):t(o)}function u(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Ku(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ke,n,t)}}var yn={name:"htmlText",tokenize:Ju};function Ju(e,n,t){let r=this,i,u,o;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),l):m===47?(e.consume(m),T):m===63?(e.consume(m),E):re(m)?(e.consume(m),_):t(m)}function l(m){return m===45?(e.consume(m),s):m===91?(e.consume(m),u=0,b):re(m)?(e.consume(m),w):t(m)}function s(m){return m===45?(e.consume(m),p):t(m)}function h(m){return m===null?t(m):m===45?(e.consume(m),f):v(m)?(o=h,W(m)):(e.consume(m),h)}function f(m){return m===45?(e.consume(m),p):h(m)}function p(m){return m===62?q(m):m===45?f(m):h(m)}function b(m){let ue="CDATA[";return m===ue.charCodeAt(u++)?(e.consume(m),u===ue.length?A:b):t(m)}function A(m){return m===null?t(m):m===93?(e.consume(m),y):v(m)?(o=A,W(m)):(e.consume(m),A)}function y(m){return m===93?(e.consume(m),F):A(m)}function F(m){return m===62?q(m):m===93?(e.consume(m),F):A(m)}function w(m){return m===null||m===62?q(m):v(m)?(o=w,W(m)):(e.consume(m),w)}function E(m){return m===null?t(m):m===63?(e.consume(m),S):v(m)?(o=E,W(m)):(e.consume(m),E)}function S(m){return m===62?q(m):E(m)}function T(m){return re(m)?(e.consume(m),g):t(m)}function g(m){return m===45||ee(m)?(e.consume(m),g):C(m)}function C(m){return v(m)?(o=C,W(m)):z(m)?(e.consume(m),C):q(m)}function _(m){return m===45||ee(m)?(e.consume(m),_):m===47||m===62||K(m)?R(m):t(m)}function R(m){return m===47?(e.consume(m),q):m===58||m===95||re(m)?(e.consume(m),Y):v(m)?(o=R,W(m)):z(m)?(e.consume(m),R):q(m)}function Y(m){return m===45||m===46||m===58||m===95||ee(m)?(e.consume(m),Y):H(m)}function H(m){return m===61?(e.consume(m),D):v(m)?(o=H,W(m)):z(m)?(e.consume(m),H):R(m)}function D(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,B):v(m)?(o=D,W(m)):z(m)?(e.consume(m),D):(e.consume(m),L)}function B(m){return m===i?(e.consume(m),i=void 0,I):m===null?t(m):v(m)?(o=B,W(m)):(e.consume(m),B)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||K(m)?R(m):(e.consume(m),L)}function I(m){return m===47||m===62||K(m)?R(m):t(m)}function q(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function W(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return z(m)?P(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):pe(m)}function pe(m){return e.enter("htmlTextData"),o(m)}}var Re={name:"labelEnd",tokenize:ro,resolveTo:no,resolveAll:to},Xu={tokenize:io},Gu={tokenize:uo},eo={tokenize:oo};function to(e){let n=-1;for(;++n<e.length;){let t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function no(e,n){let t=e.length,r=0,i,u,o,a;for(;t--;)if(i=e[t][1],u){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(u=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);let c={type:e[u][1].type==="labelLink"?"link":"image",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[u][1].start),end:Object.assign({},e[o][1].end)},s={type:"labelText",start:Object.assign({},e[u+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return a=[["enter",c,n],["enter",l,n]],a=G(a,e.slice(u+1,u+r+3)),a=G(a,[["enter",s,n]]),a=G(a,$e(n.parser.constructs.insideSpan.null,e.slice(u+r+4,o-3),n)),a=G(a,[["exit",s,n],e[o-2],e[o-1],["exit",l,n]]),a=G(a,e.slice(o+1)),a=G(a,[["exit",c,n]]),Z(e,u,e.length,a),e}function ro(e,n,t){let r=this,i=r.events.length,u,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){u=r.events[i][1];break}return a;function a(f){return u?u._inactive?h(f):(o=r.parser.defined.includes(Fe(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):t(f)}function c(f){return f===40?e.attempt(Xu,s,o?s:h)(f):f===91?e.attempt(Gu,s,o?l:h)(f):o?s(f):h(f)}function l(f){return e.attempt(eo,s,h)(f)}function s(f){return n(f)}function h(f){return u._balanced=!0,t(f)}}function io(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return K(h)?Le(e,u)(h):u(h)}function u(h){return h===41?s(h):It(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return K(h)?Le(e,c)(h):s(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?Rt(e,l,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):s(h)}function l(h){return K(h)?Le(e,s)(h):s(h)}function s(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function uo(e,n,t){let r=this;return i;function i(a){return Lt.call(r,e,u,o,"reference","referenceMarker","referenceString")(a)}function u(a){return r.parser.defined.includes(Fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function oo(e,n,t){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),i}function i(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):t(u)}}var En={name:"labelStartImage",tokenize:ao,resolveAll:Re.resolveAll};function ao(e,n,t){let r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),u}function u(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var An={name:"labelStartLink",tokenize:so,resolveAll:Re.resolveAll};function so(e,n,t){let r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),u}function u(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}var ht={name:"lineEnding",tokenize:lo};function lo(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),P(e,n,"linePrefix")}}var ze={name:"thematicBreak",tokenize:co};function co(e,n,t){let r=0,i;return u;function u(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||v(l))?(e.exit("thematicBreak"),n(l)):t(l)}function c(l){return l===i?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),z(l)?P(e,a,"whitespace")(l):a(l))}}var J={name:"list",tokenize:ho,continuation:{tokenize:mo},exit:Fo},fo={tokenize:xo,partial:!0},po={tokenize:go,partial:!0};function ho(e,n,t){let r=this,i=r.events[r.events.length-1],u=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){let b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ft(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ze,t,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return ft(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):t(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ke,r.interrupt?t:s,e.attempt(fo,f,h))}function s(p){return r.containerState.initialBlankLine=!0,u++,f(p)}function h(p){return z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):t(p)}function f(p){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function mo(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(ke,i,u);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,P(e,n,"listItemIndent",r.containerState.size+1)(a)}function u(a){return r.containerState.furtherBlankLines||!z(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(po,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,P(e,e.attempt(J,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function go(e,n,t){let r=this;return P(e,i,"listItemIndent",r.containerState.size+1);function i(u){let o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(u):t(u)}}function Fo(e){e.exit(this.containerState.type)}function xo(e,n,t){let r=this;return P(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(u){let o=r.events[r.events.length-1];return!z(u)&&o&&o[1].type==="listItemPrefixWhitespace"?n(u):t(u)}}var zt={name:"setextUnderline",tokenize:Eo,resolveTo:yo};function yo(e,n){let t=e.length,r,i,u;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!u&&e[t][1].type==="definition"&&(u=t);let o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",u?(e.splice(i,0,["enter",o,n]),e.splice(u+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[u][1].end)):e[r][1]=o,e.push(["exit",o,n]),e}function Eo(e,n,t){let r=this,i;return u;function u(l){let s=r.events.length,h;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){h=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=l,o(l)):t(l)}function o(l){return e.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit("setextHeadingLineSequence"),z(l)?P(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||v(l)?(e.exit("setextHeadingLine"),n(l)):t(l)}}var Lr={tokenize:Ao};function Ao(e){let n=this,t=e.attempt(ke,r,e.attempt(this.parser.constructs.flowInitial,i,P(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cn,i)),"linePrefix")));return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Rr={resolveAll:jr()},zr=Nr("string"),Mr=Nr("text");function Nr(e){return{tokenize:n,resolveAll:jr(e==="text"?Co:void 0)};function n(t){let r=this,i=this.parser.constructs[e],u=t.attempt(i,o,a);return o;function o(s){return l(s)?u(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return l(s)?(t.exit("data"),u(s)):(t.consume(s),c)}function l(s){if(s===null)return!0;let h=i[s],f=-1;if(h)for(;++f<h.length;){let p=h[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function jr(e){return n;function n(t,r){let i=-1,u;for(;++i<=t.length;)u===void 0?t[i]&&t[i][1].type==="data"&&(u=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==u+2&&(t[u][1].end=t[i-1][1].end,t.splice(u+2,i-u-2),i=u+2),u=void 0);return e?e(t,r):t}}function Co(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){let r=e[t-1][1],i=n.sliceStream(r),u=i.length,o=-1,a=0,c;for(;u--;){let l=i[u];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(l===-2)c=!0,a++;else if(l!==-1){u++;break}}if(a){let l={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+u,_bufferIndex:u?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(t,0,["enter",l,n],["exit",l,n]),t+=2)}t++}return e}function Ur(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},u=[],o=[],a=[],c=!0,l={consume:S,enter:T,exit:g,attempt:R(C),check:R(_),interrupt:R(_,{interrupt:!0})},s={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:A,sliceSerialize:b,now:y,defineSkip:F,write:p},h=n.tokenize.call(s,l),f;return n.resolveAll&&u.push(n),s;function p(B){return o=G(o,B),w(),o[o.length-1]!==null?[]:(Y(n,0),s.events=$e(u,s.events,s),s.events)}function b(B,L){return ko(A(B),L)}function A(B){return bo(o,B)}function y(){let{line:B,column:L,offset:I,_index:q,_bufferIndex:W}=r;return{line:B,column:L,offset:I,_index:q,_bufferIndex:W}}function F(B){i[B.line]=B.column,D()}function w(){let B;for(;r._index<o.length;){let L=o[r._index];if(typeof L=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<L.length;)E(L.charCodeAt(r._bufferIndex));else E(L)}}function E(B){c=void 0,f=B,h=h(B)}function S(B){qe(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,D()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=B,c=!0}function T(B,L){let I=L||{};return I.type=B,I.start=y(),s.events.push(["enter",I,s]),a.push(I),I}function g(B){let L=a.pop();return L.end=y(),s.events.push(["exit",L,s]),L}function C(B,L){Y(B,L.from)}function _(B,L){L.restore()}function R(B,L){return I;function I(q,W,le){let pe,m,ue,he;return Array.isArray(q)?ne(q):"tokenize"in q?ne([q]):d(q);function d(Q){return it;function it(me){let Ue=me!==null&&Q[me],Pe=me!==null&&Q.null,Qt=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return ne(Qt)(me)}}function ne(Q){return pe=Q,m=0,Q.length===0?le:je(Q[m])}function je(Q){return it;function it(me){return he=H(),ue=Q,Q.partial||(s.currentConstruct=Q),Q.name&&s.parser.constructs.disable.null.includes(Q.name)?rt(me):Q.tokenize.call(L?Object.assign(Object.create(s),L):s,l,Yt,rt)(me)}}function Yt(Q){return c=!0,B(ue,he),W}function rt(Q){return c=!0,he.restore(),++m<pe.length?je(pe[m]):le}}}function Y(B,L){B.resolveAll&&!u.includes(B)&&u.push(B),B.resolve&&Z(s.events,L,s.events.length-L,B.resolve(s.events.slice(L),s)),B.resolveTo&&(s.events=B.resolveTo(s.events,s))}function H(){let B=y(),L=s.previous,I=s.currentConstruct,q=s.events.length,W=Array.from(a);return{restore:le,from:q};function le(){r=B,s.previous=L,s.currentConstruct=I,s.events.length=q,a=W,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function bo(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,u=n.end._bufferIndex,o;if(t===i)o=[e[t].slice(r,u)];else{if(o=e.slice(t,i),r>-1){let a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}u>0&&o.push(e[i].slice(0,u))}return o}function ko(e,n){let t=-1,r=[],i;for(;++t<e.length;){let u=e[t],o;if(typeof u=="string")o=u;else switch(u){case-5:{o="\r";break}case-4:{o=`
|
|
`;break}case-3:{o=`\r
|
|
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(u)}i=u===-2,r.push(o)}return r.join("")}var Cn={};Kn(Cn,{attentionMarkers:()=>_o,contentInitial:()=>Do,disable:()=>Po,document:()=>wo,flow:()=>Bo,flowInitial:()=>So,insideSpan:()=>Oo,string:()=>vo,text:()=>To});var wo={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:vt},Do={91:mn},So={[-2]:pt,[-1]:pt,32:pt},Bo={35:gn,42:ze,45:[zt,ze],60:xn,61:zt,95:ze,96:_t,126:_t},vo={38:Ot,92:Tt},To={[-5]:ht,[-4]:ht,[-3]:ht,33:En,38:Ot,42:ct,60:[sn,yn],91:An,92:[dn,Tt],93:Re,95:ct,96:ln},Oo={null:[ct,Rr]},_o={null:[42,95]},Po={null:[]};function Vr(e){let t=ar([Cn,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(cr),document:i(pr),flow:i(Lr),string:i(zr),text:i(Mr)};return r;function i(u){return o;function o(a){return Ur(r,u,a)}}}var Hr=/[\0\t\n\r]/g;function qr(){let e=1,n="",t=!0,r;return i;function i(u,o,a){let c=[],l,s,h,f,p;for(u=n+u.toString(o),h=0,n="",t&&(u.charCodeAt(0)===65279&&h++,t=void 0);h<u.length;){if(Hr.lastIndex=h,l=Hr.exec(u),f=l&&l.index!==void 0?l.index:u.length,p=u.charCodeAt(f),!l){n=u.slice(h);break}if(p===10&&h===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<f&&(c.push(u.slice(h,f)),e+=f-h),p){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=f+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}function $r(e){for(;!Pt(e););return e}function Mt(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCharCode(t)}var Io=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wr(e){return e.replace(Io,Lo)}function Lo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),u=i===120||i===88;return Mt(t.slice(u?2:1),u?16:10)}return We(t)||e}function ve(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yr(e.position):"start"in e||"end"in e?Yr(e):"line"in e||"column"in e?bn(e):""}function bn(e){return Qr(e&&e.line)+":"+Qr(e&&e.column)}function Yr(e){return bn(e&&e.start)+"-"+bn(e&&e.end)}function Qr(e){return e&&typeof e=="number"?e:1}var Kr={}.hasOwnProperty,kn=function(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Ro(t)($r(Vr(t).document().write(qr()(e,n,!0))))};function Ro(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Qn),autolinkProtocol:H,autolinkEmail:H,atxHeading:a($n),blockQuote:a(Ue),characterEscape:H,characterReference:H,codeFenced:a(Pe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Pe,c),codeText:a(Qt,c),codeTextData:H,data:H,codeFlowValue:H,definition:a(ji),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Ui),hardBreakEscape:a(Wn),hardBreakTrailing:a(Wn),htmlFlow:a(Yn,c),htmlFlowData:H,htmlText:a(Yn,c),htmlTextData:H,image:a(Vi),label:c,link:a(Qn),listItem:a(Hi),listItemValue:b,listOrdered:a(Zn,p),listUnordered:a(Zn),paragraph:a(qi),reference:je,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a($n),strong:a($i),thematicBreak:a(Yi)},exit:{atxHeading:s(),atxHeadingSequence:C,autolink:s(),autolinkEmail:me,autolinkProtocol:it,blockQuote:s(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:rt,characterReferenceMarkerNumeric:rt,characterReferenceValue:Q,codeFenced:s(w),codeFencedFence:F,codeFencedFenceInfo:A,codeFencedFenceMeta:y,codeFlowValue:D,codeIndented:s(E),codeText:s(W),codeTextData:D,data:D,definition:s(),definitionDestinationString:g,definitionLabelString:S,definitionTitleString:T,emphasis:s(),hardBreakEscape:s(L),hardBreakTrailing:s(L),htmlFlow:s(I),htmlFlowData:D,htmlText:s(q),htmlTextData:D,image:s(pe),label:ue,labelText:m,lineEnding:B,link:s(le),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:Yt,resourceDestinationString:he,resourceTitleString:d,resource:ne,setextHeading:s(Y),setextHeadingLineSequence:R,setextHeadingText:_,strong:s(),thematicBreak:s()}};Jr(n,(e||{}).mdastExtensions||[]);let t={};return r;function r(x){let k={type:"root",children:[]},O={stack:[k],tokenStack:[],config:n,enter:l,exit:h,buffer:c,resume:f,setData:u,getData:o},j=[],U=-1;for(;++U<x.length;)if(x[U][1].type==="listOrdered"||x[U][1].type==="listUnordered")if(x[U][0]==="enter")j.push(U);else{let ce=j.pop();U=i(x,ce,U)}for(U=-1;++U<x.length;){let ce=n[x[U][0]];Kr.call(ce,x[U][1].type)&&ce[x[U][1].type].call(Object.assign({sliceSerialize:x[U][2].sliceSerialize},O),x[U][1])}if(O.tokenStack.length>0){let ce=O.tokenStack[O.tokenStack.length-1];(ce[1]||Zr).call(O,void 0,ce[0])}for(k.position={start:Te(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:Te(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<n.transforms.length;)k=n.transforms[U](k)||k;return k}function i(x,k,O){let j=k-1,U=-1,ce=!1,xe,de,ut,ot;for(;++j<=O;){let $=x[j];if($[1].type==="listUnordered"||$[1].type==="listOrdered"||$[1].type==="blockQuote"?($[0]==="enter"?U++:U--,ot=void 0):$[1].type==="lineEndingBlank"?$[0]==="enter"&&(xe&&!ot&&!U&&!ut&&(ut=j),ot=void 0):$[1].type==="linePrefix"||$[1].type==="listItemValue"||$[1].type==="listItemMarker"||$[1].type==="listItemPrefix"||$[1].type==="listItemPrefixWhitespace"||(ot=void 0),!U&&$[0]==="enter"&&$[1].type==="listItemPrefix"||U===-1&&$[0]==="exit"&&($[1].type==="listUnordered"||$[1].type==="listOrdered")){if(xe){let Zt=j;for(de=void 0;Zt--;){let ge=x[Zt];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;de&&(x[de][1].type="lineEndingBlank",ce=!0),ge[1].type="lineEnding",de=Zt}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}ut&&(!de||ut<de)&&(xe._spread=!0),xe.end=Object.assign({},de?x[de][1].start:$[1].end),x.splice(de||j,0,["exit",xe,$[2]]),j++,O++}$[1].type==="listItemPrefix"&&(xe={type:"listItem",_spread:!1,start:Object.assign({},$[1].start),end:void 0},x.splice(j,0,["enter",xe,$[2]]),j++,O++,ut=void 0,ot=!0)}}return x[k][1]._spread=ce,O}function u(x,k){t[x]=k}function o(x){return t[x]}function a(x,k){return O;function O(j){l.call(this,x(j),j),k&&k.call(this,j)}}function c(){this.stack.push({type:"fragment",children:[]})}function l(x,k,O){return this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([k,O]),x.position={start:Te(k.start)},x}function s(x){return k;function k(O){x&&x.call(this,O),h.call(this,O)}}function h(x,k){let O=this.stack.pop(),j=this.tokenStack.pop();if(j)j[0].type!==x.type&&(k?k.call(this,x,j[0]):(j[1]||Zr).call(this,x,j[0]));else throw new Error("Cannot close `"+x.type+"` ("+ve({start:x.start,end:x.end})+"): it\u2019s not open");return O.position.end=Te(x.end),O}function f(){return un(this.stack.pop())}function p(){u("expectingFirstListItemValue",!0)}function b(x){if(o("expectingFirstListItemValue")){let k=this.stack[this.stack.length-2];k.start=Number.parseInt(this.sliceSerialize(x),10),u("expectingFirstListItemValue")}}function A(){let x=this.resume(),k=this.stack[this.stack.length-1];k.lang=x}function y(){let x=this.resume(),k=this.stack[this.stack.length-1];k.meta=x}function F(){o("flowCodeInside")||(this.buffer(),u("flowCodeInside",!0))}function w(){let x=this.resume(),k=this.stack[this.stack.length-1];k.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u("flowCodeInside")}function E(){let x=this.resume(),k=this.stack[this.stack.length-1];k.value=x.replace(/(\r?\n|\r)$/g,"")}function S(x){let k=this.resume(),O=this.stack[this.stack.length-1];O.label=k,O.identifier=Fe(this.sliceSerialize(x)).toLowerCase()}function T(){let x=this.resume(),k=this.stack[this.stack.length-1];k.title=x}function g(){let x=this.resume(),k=this.stack[this.stack.length-1];k.url=x}function C(x){let k=this.stack[this.stack.length-1];if(!k.depth){let O=this.sliceSerialize(x).length;k.depth=O}}function _(){u("setextHeadingSlurpLineEnding",!0)}function R(x){let k=this.stack[this.stack.length-1];k.depth=this.sliceSerialize(x).charCodeAt(0)===61?1:2}function Y(){u("setextHeadingSlurpLineEnding")}function H(x){let k=this.stack[this.stack.length-1],O=k.children[k.children.length-1];(!O||O.type!=="text")&&(O=Wi(),O.position={start:Te(x.start)},k.children.push(O)),this.stack.push(O)}function D(x){let k=this.stack.pop();k.value+=this.sliceSerialize(x),k.position.end=Te(x.end)}function B(x){let k=this.stack[this.stack.length-1];if(o("atHardBreak")){let O=k.children[k.children.length-1];O.position.end=Te(x.end),u("atHardBreak");return}!o("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(k.type)&&(H.call(this,x),D.call(this,x))}function L(){u("atHardBreak",!0)}function I(){let x=this.resume(),k=this.stack[this.stack.length-1];k.value=x}function q(){let x=this.resume(),k=this.stack[this.stack.length-1];k.value=x}function W(){let x=this.resume(),k=this.stack[this.stack.length-1];k.value=x}function le(){let x=this.stack[this.stack.length-1];if(o("inReference")){let k=o("referenceType")||"shortcut";x.type+="Reference",x.referenceType=k,delete x.url,delete x.title}else delete x.identifier,delete x.label;u("referenceType")}function pe(){let x=this.stack[this.stack.length-1];if(o("inReference")){let k=o("referenceType")||"shortcut";x.type+="Reference",x.referenceType=k,delete x.url,delete x.title}else delete x.identifier,delete x.label;u("referenceType")}function m(x){let k=this.sliceSerialize(x),O=this.stack[this.stack.length-2];O.label=Wr(k),O.identifier=Fe(k).toLowerCase()}function ue(){let x=this.stack[this.stack.length-1],k=this.resume(),O=this.stack[this.stack.length-1];if(u("inReference",!0),O.type==="link"){let j=x.children;O.children=j}else O.alt=k}function he(){let x=this.resume(),k=this.stack[this.stack.length-1];k.url=x}function d(){let x=this.resume(),k=this.stack[this.stack.length-1];k.title=x}function ne(){u("inReference")}function je(){u("referenceType","collapsed")}function Yt(x){let k=this.resume(),O=this.stack[this.stack.length-1];O.label=k,O.identifier=Fe(this.sliceSerialize(x)).toLowerCase(),u("referenceType","full")}function rt(x){u("characterReferenceType",x.type)}function Q(x){let k=this.sliceSerialize(x),O=o("characterReferenceType"),j;O?(j=Mt(k,O==="characterReferenceMarkerNumeric"?10:16),u("characterReferenceType")):j=We(k);let U=this.stack.pop();U.value+=j,U.position.end=Te(x.end)}function it(x){D.call(this,x);let k=this.stack[this.stack.length-1];k.url=this.sliceSerialize(x)}function me(x){D.call(this,x);let k=this.stack[this.stack.length-1];k.url="mailto:"+this.sliceSerialize(x)}function Ue(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Qt(){return{type:"inlineCode",value:""}}function ji(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ui(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:void 0,children:[]}}function Wn(){return{type:"break"}}function Yn(){return{type:"html",value:""}}function Vi(){return{type:"image",title:null,url:"",alt:null}}function Qn(){return{type:"link",title:null,url:"",children:[]}}function Zn(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function Hi(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function qi(){return{type:"paragraph",children:[]}}function $i(){return{type:"strong",children:[]}}function Wi(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function Jr(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?Jr(e,r):zo(e,r)}}function zo(e,n){let t;for(t in n)if(Kr.call(n,t)){if(t==="canContainEols"){let r=n[t];r&&e[t].push(...r)}else if(t==="transforms"){let r=n[t];r&&e[t].push(...r)}else if(t==="enter"||t==="exit"){let r=n[t];r&&Object.assign(e[t],r)}}}function Zr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ve({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ve({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ve({start:n.start,end:n.end})+") is still open")}function Nt(e){Object.assign(this,{Parser:t=>{let r=this.data("settings");return kn(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function wn(e){if(e)throw e}var gi=Dt(Dn(),1),In=Dt(ai(),1);function mt(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Sn(){let e=[],n={run:t,use:r};return n;function t(...i){let u=-1,o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...l){let s=e[++u],h=-1;if(c){o(c);return}for(;++h<i.length;)(l[h]===null||l[h]===void 0)&&(l[h]=i[h]);i=l,s?si(s,a)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function si(e,n){let t;return r;function r(...o){let a=e.length>o.length,c;a&&o.push(i);try{c=e.apply(this,o)}catch(l){let s=l;if(a&&t)throw s;return i(s)}a||(c&&c.then&&typeof c.then=="function"?c.then(u,i):c instanceof Error?i(c):u(c))}function i(o,...a){t||(t=!0,n(o,...a))}function u(o){i(null,o)}}var pi=Dt(Dn(),1);var X=class extends Error{constructor(n,t,r){let i=[null,null],u={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(r=t,t=void 0),typeof r=="string"){let o=r.indexOf(":");o===-1?i[1]=r:(i[0]=r.slice(0,o),i[1]=r.slice(o+1))}t&&("type"in t||"position"in t?t.position&&(u=t.position):"start"in t||"end"in t?u=t:("line"in t||"column"in t)&&(u.start=t)),this.name=ve(t)||"1:1",this.message=typeof n=="object"?n.message:n,this.stack="",typeof n=="object"&&n.stack&&(this.stack=n.stack),this.reason=this.message,this.fatal,this.line=u.start.line,this.column=u.start.column,this.position=u,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}};X.prototype.file="";X.prototype.name="";X.prototype.reason="";X.prototype.message="";X.prototype.stack="";X.prototype.fatal=null;X.prototype.column=null;X.prototype.line=null;X.prototype.source=null;X.prototype.ruleId=null;X.prototype.position=null;var fe={basename:Mo,dirname:No,extname:jo,join:Uo,sep:"/"};function Mo(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');dt(e);let t=0,r=-1,i=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(u){t=i+1;break}}else r<0&&(u=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(u){t=i+1;break}}else o<0&&(u=!0,o=i+1),a>-1&&(e.charCodeAt(i)===n.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function No(e){if(dt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.charCodeAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.charCodeAt(0)===47?"/":".":n===1&&e.charCodeAt(0)===47?"//":e.slice(0,n)}function jo(e){dt(e);let n=e.length,t=-1,r=0,i=-1,u=0,o;for(;n--;){let a=e.charCodeAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:u!==1&&(u=1):i>-1&&(u=-1)}return i<0||t<0||u===0||u===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Uo(...e){let n=-1,t;for(;++n<e.length;)dt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Vo(t)}function Vo(e){dt(e);let n=e.charCodeAt(0)===47,t=Ho(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.charCodeAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Ho(e,n){let t="",r=0,i=-1,u=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||u===1))if(i!==o-1&&u===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,u=0;continue}}else if(t.length>0){t="",r=0,i=o,u=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,u=0}else a===46&&u>-1?u++:u=-1}return t}function dt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var li={cwd:qo};function qo(){return"/"}function Ye(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function ci(e){if(typeof e=="string")e=new URL(e);else if(!Ye(e)){let n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){let n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return $o(e)}function $o(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let n=e.pathname,t=-1;for(;++t<n.length;)if(n.charCodeAt(t)===37&&n.charCodeAt(t+1)===50){let r=n.charCodeAt(t+2);if(r===70||r===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}var Bn=["history","path","basename","stem","extname","dirname"],gt=class{constructor(n){let t;n?typeof n=="string"||Wo(n)?t={value:n}:Ye(n)?t={path:n}:t=n:t={},this.data={},this.messages=[],this.history=[],this.cwd=li.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Bn.length;){let u=Bn[r];u in t&&t[u]!==void 0&&t[u]!==null&&(this[u]=u==="history"?[...t[u]]:t[u])}let i;for(i in t)Bn.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(n){Ye(n)&&(n=ci(n)),Tn(n,"path"),this.path!==n&&this.history.push(n)}get dirname(){return typeof this.path=="string"?fe.dirname(this.path):void 0}set dirname(n){fi(this.basename,"dirname"),this.path=fe.join(n||"",this.basename)}get basename(){return typeof this.path=="string"?fe.basename(this.path):void 0}set basename(n){Tn(n,"basename"),vn(n,"basename"),this.path=fe.join(this.dirname||"",n)}get extname(){return typeof this.path=="string"?fe.extname(this.path):void 0}set extname(n){if(vn(n,"extname"),fi(this.dirname,"extname"),n){if(n.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fe.join(this.dirname,this.stem+(n||""))}get stem(){return typeof this.path=="string"?fe.basename(this.path,this.extname):void 0}set stem(n){Tn(n,"stem"),vn(n,"stem"),this.path=fe.join(this.dirname||"",n+(this.extname||""))}toString(n){return(this.value||"").toString(n||void 0)}message(n,t,r){let i=new X(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=null,i}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}};function vn(e,n){if(e&&e.includes(fe.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+fe.sep+"`")}function Tn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function fi(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Wo(e){return(0,pi.default)(e)}var Ln=xi().freeze(),Fi={}.hasOwnProperty;function xi(){let e=Sn(),n=[],t={},r,i=-1;return u.data=o,u.Parser=void 0,u.Compiler=void 0,u.freeze=a,u.attachers=n,u.use=c,u.parse=l,u.stringify=s,u.run=h,u.runSync=f,u.process=p,u.processSync=b,u;function u(){let A=xi(),y=-1;for(;++y<n.length;)A.use(...n[y]);return A.data((0,In.default)(!0,{},t)),A}function o(A,y){return typeof A=="string"?arguments.length===2?(Pn("data",r),t[A]=y,u):Fi.call(t,A)&&t[A]||null:A?(Pn("data",r),t=A,u):t}function a(){if(r)return u;for(;++i<n.length;){let[A,...y]=n[i];if(y[0]===!1)continue;y[0]===!0&&(y[0]=void 0);let F=A.call(u,...y);typeof F=="function"&&e.use(F)}return r=!0,i=Number.POSITIVE_INFINITY,u}function c(A,...y){let F;if(Pn("use",r),A!=null)if(typeof A=="function")T(A,...y);else if(typeof A=="object")Array.isArray(A)?S(A):E(A);else throw new TypeError("Expected usable value, not `"+A+"`");return F&&(t.settings=Object.assign(t.settings||{},F)),u;function w(g){if(typeof g=="function")T(g);else if(typeof g=="object")if(Array.isArray(g)){let[C,..._]=g;T(C,..._)}else E(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function E(g){S(g.plugins),g.settings&&(F=Object.assign(F||{},g.settings))}function S(g){let C=-1;if(g!=null)if(Array.isArray(g))for(;++C<g.length;){let _=g[C];w(_)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function T(g,C){let _=-1,R;for(;++_<n.length;)if(n[_][0]===g){R=n[_];break}R?(mt(R[1])&&mt(C)&&(C=(0,In.default)(!0,R[1],C)),R[1]=C):n.push([...arguments])}}function l(A){u.freeze();let y=Ft(A),F=u.Parser;return On("parse",F),hi(F,"parse")?new F(String(y),y).parse():F(String(y),y)}function s(A,y){u.freeze();let F=Ft(y),w=u.Compiler;return _n("stringify",w),mi(A),hi(w,"compile")?new w(A,F).compile():w(A,F)}function h(A,y,F){if(mi(A),u.freeze(),!F&&typeof y=="function"&&(F=y,y=void 0),!F)return new Promise(w);w(null,F);function w(E,S){e.run(A,Ft(y),T);function T(g,C,_){C=C||A,g?S(g):E?E(C):F(null,C,_)}}}function f(A,y){let F,w;return u.run(A,y,E),di("runSync","run",w),F;function E(S,T){wn(S),F=T,w=!0}}function p(A,y){if(u.freeze(),On("process",u.Parser),_n("process",u.Compiler),!y)return new Promise(F);F(null,y);function F(w,E){let S=Ft(A);u.run(u.parse(S),S,(g,C,_)=>{if(g||!C||!_)T(g);else{let R=u.stringify(C,_);R==null||(Zo(R)?_.value=R:_.result=R),T(g,_)}});function T(g,C){g||!C?E(g):w?w(C):y(null,C)}}}function b(A){let y;u.freeze(),On("processSync",u.Parser),_n("processSync",u.Compiler);let F=Ft(A);return u.process(F,w),di("processSync","process",y),F;function w(E){y=!0,wn(E)}}}function hi(e,n){return typeof e=="function"&&e.prototype&&(Yo(e.prototype)||n in e.prototype)}function Yo(e){let n;for(n in e)if(Fi.call(e,n))return!0;return!1}function On(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function _n(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Pn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mi(e){if(!mt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function di(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ft(e){return Qo(e)?e:new gt(e)}function Qo(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Zo(e){return typeof e=="string"||(0,gi.default)(e)}var Rn={children(e){return Ve.children(e)},annotatetextnode(e,n){return Ve.annotatetextnode(e,n)},interpretmarkup(e=""){return`
|
|
`.repeat((e.match(/\n/g)||[]).length)},remarkoptions:{}};function yi(e,n=Rn){let t=Ln().use(Nt,n.remarkoptions).use(Bt,["yaml","toml"]).parse(e);return Xn(e,t,n)}var _e=require("obsidian");function Jo(e,n,t){return n=xt(n),ia(e,Un()?Reflect.construct(n,t||[],xt(e).constructor):n.apply(e,t))}function bi(e,n,t){if(Un())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var i=new(e.bind.apply(e,r));return t&&yt(i,t.prototype),i}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(Un=function(){return!!e})()}function Ei(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function Xo(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ei(Object(t),!0).forEach(function(r){ea(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ei(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function Go(e,n){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function ki(e){var n=Go(e,"string");return typeof n=="symbol"?n:n+""}function oe(e){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oe(e)}function Ke(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ai(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ki(r.key),r)}}function Je(e,n,t){return n&&Ai(e.prototype,n),t&&Ai(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ea(e,n,t){return n=ki(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ta(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&yt(e,n)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xt(e)}function yt(e,n){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yt(e,n)}function na(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(n){return typeof e=="function"}}function Mn(e){var n=typeof Map=="function"?new Map:void 0;return Mn=function(r){if(r===null||!na(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(r))return n.get(r);n.set(r,i)}function i(){return bi(r,arguments,xt(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),yt(i,r)},Mn(e)}function ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ia(e,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ra(e)}function Vn(e){return ua(e)||oa(e)||wi(e)||aa()}function ua(e){if(Array.isArray(e))return Nn(e)}function oa(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wi(e,n){if(e){if(typeof e=="string")return Nn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Nn(e,n)}}function Nn(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function aa(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sa(e,n){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=wi(e))||n&&e&&typeof e.length=="number"){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=!0,o=!1,a;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return u=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!u&&t.return!=null&&t.return()}finally{if(o)throw a}}}}var la=function(){function e(){Ke(this,e)}return Je(e,[{key:"add",value:function(t,r,i){if(typeof arguments[0]!="string")for(var u in arguments[0])this.add(u,arguments[0][u],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],r&&this[o][i?"unshift":"push"](r)},this)}},{key:"run",value:function(t,r){this[t]=this[t]||[],this[t].forEach(function(i){i.call(r&&r.context?r.context:r,r)})}}])}(),ca=function(){function e(n){Ke(this,e),this.jsep=n,this.registered={}}return Je(e,[{key:"register",value:function(){for(var t=this,r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];i.forEach(function(o){if(oe(o)!=="object"||!o.name||!o.init)throw new Error("Invalid JSEP plugin format");t.registered[o.name]||(o.init(t.jsep),t.registered[o.name]=o)})}}])}(),ae=function(){function e(n){Ke(this,e),this.expr=n,this.index=0}return Je(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(t){var r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}},{key:"runHook",value:function(t,r){if(e.hooks[t]){var i={context:this,node:r};return e.hooks.run(t,i),i.node}return r}},{key:"searchHook",value:function(t){if(e.hooks[t]){var r={context:this};return e.hooks[t].find(function(i){return i.call(r.context,r),r.node}),r.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",r)}},{key:"gobbleExpressions",value:function(t){for(var r=[],i,u;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(u=this.gobbleExpression())r.push(u);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}},{key:"gobbleExpression",value:function(){var t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),r=t.length;r>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,r,i,u,o,a,c,l,s;if(a=this.gobbleToken(),!a||(r=this.gobbleBinaryOp(),!r))return a;for(o={value:r,prec:e.binaryPrecedence(r),right_a:e.right_associative.has(r)},c=this.gobbleToken(),c||this.throwError("Expected expression after "+r),u=[a,o,c];r=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(r),i===0){this.index-=r.length;break}o={value:r,prec:i,right_a:e.right_associative.has(r)},s=r;for(var h=function(p){return o.right_a&&p.right_a?i>p.prec:i<=p.prec};u.length>2&&h(u[u.length-2]);)c=u.pop(),r=u.pop().value,a=u.pop(),t={type:e.BINARY_EXP,operator:r,left:a,right:c},u.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+s),u.push(o,t)}for(l=u.length-1,t=u[l];l>1;)t={type:e.BINARY_EXP,operator:u[l-1].value,left:u[l-2],right:t},l-=2;return t}},{key:"gobbleToken",value:function(){var t,r,i,u;if(this.gobbleSpaces(),u=this.searchHook("gobble-token"),u)return this.runHook("after-token",u);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)u=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)u=this.gobbleArray();else{for(r=this.expr.substr(this.index,e.max_unop_len),i=r.length;i>0;){if(e.unary_ops.hasOwnProperty(r)&&(!e.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=i;var o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--i)}e.isIdentifierStart(t)?(u=this.gobbleIdentifier(),e.literals.hasOwnProperty(u.name)?u={type:e.LITERAL,value:e.literals[u.name],raw:u.name}:u.name===e.this_str&&(u={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(u=this.gobbleGroup())}return u?(u=this.gobbleTokenProperty(u),this.runHook("after-token",u)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var r=this.code;r===e.PERIOD_CODE||r===e.OBRACK_CODE||r===e.OPAREN_CODE||r===e.QUMARK_CODE;){var i=void 0;if(r===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},this.gobbleSpaces(),r=this.code,r!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(r===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t="",r,i;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}},{key:"gobbleStringLiteral",value:function(){for(var t="",r=this.index,i=this.expr.charAt(this.index++),u=!1;this.index<this.expr.length;){var o=this.expr.charAt(this.index++);if(o===i){u=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
|
|
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return u||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,r=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(r,this.index)}}},{key:"gobbleArguments",value:function(t){for(var r=[],i=!1,u=0;this.index<this.expr.length;){this.gobbleSpaces();var o=this.code;if(o===t){i=!0,this.index++,t===e.CPAREN_CODE&&u&&u>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===e.COMMA_CODE){if(this.index++,u++,u!==r.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=r.length;a<u;a++)r.push(null)}}else if(r.length!==u&&u!==0)this.throwError("Expected comma");else{var c=this.gobbleExpression();(!c||c.type===e.COMPOUND)&&this.throwError("Expected comma"),r.push(c)}}return i||this.throwError("Expected "+String.fromCharCode(t)),r}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.3.8"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,r,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=r,i?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,r){return e.literals[t]=r,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(t){return Math.max.apply(Math,[0].concat(Vn(Object.keys(t).map(function(r){return r.length}))))}},{key:"isDecimalDigit",value:function(t){return t>=48&&t<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}])}(),fa=new la;Object.assign(ae,{hooks:fa,plugins:new ca(ae),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});ae.max_unop_len=ae.getMaxKeyLen(ae.unary_ops);ae.max_binop_len=ae.getMaxKeyLen(ae.binary_ops);var Ze=function(n){return new ae(n).parse()},pa=Object.getOwnPropertyNames(ae);pa.forEach(function(e){Ze[e]===void 0&&e!=="prototype"&&(Ze[e]=ae[e])});Ze.Jsep=ae;var ha="ConditionalExpression",ma={name:"ternary",init:function(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;var i=r.node,u=this.gobbleExpression();if(u||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),r.node={type:ha,test:i,consequent:u,alternate:o},i.operator&&n.binary_ops[i.operator]<=.9){for(var a=i;a.right.operator&&n.binary_ops[a.right.operator]<=.9;)a=a.right;r.node.test=a.right,a.right=r.node,r.node=i}}else this.throwError("Expected :")}})}};Ze.plugins.register(ma);var Ci=47,da=92,ga={name:"regex",init:function(n){n.hooks.add("gobble-token",function(r){if(this.code===Ci){for(var i=++this.index,u=!1;this.index<this.expr.length;){if(this.code===Ci&&!u){for(var o=this.expr.slice(i,this.index),a="";++this.index<this.expr.length;){var c=this.code;if(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57)a+=this.char;else break}var l=void 0;try{l=new RegExp(o,a)}catch(s){this.throwError(s.message)}return r.node={type:n.LITERAL,value:l,raw:this.expr.slice(i-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?u=!0:u&&this.code===n.CBRACK_CODE&&(u=!1),this.index+=this.code===da?2:1}this.throwError("Unclosed Regex")}})}},zn=43,Fa=45,Qe={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[zn,Fa],assignmentPrecedence:.9,init:function(n){var t=[n.IDENTIFIER,n.MEMBER_EXP];Qe.assignmentOperators.forEach(function(i){return n.addBinaryOp(i,Qe.assignmentPrecedence,!0)}),n.hooks.add("gobble-token",function(u){var o=this,a=this.code;Qe.updateOperators.some(function(c){return c===a&&c===o.expr.charCodeAt(o.index+1)})&&(this.index+=2,u.node={type:"UpdateExpression",operator:a===zn?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!u.node.argument||!t.includes(u.node.argument.type))&&this.throwError("Unexpected ".concat(u.node.operator)))}),n.hooks.add("after-token",function(u){var o=this;if(u.node){var a=this.code;Qe.updateOperators.some(function(c){return c===a&&c===o.expr.charCodeAt(o.index+1)})&&(t.includes(u.node.type)||this.throwError("Unexpected ".concat(u.node.operator)),this.index+=2,u.node={type:"UpdateExpression",operator:a===zn?"++":"--",argument:u.node,prefix:!1})}}),n.hooks.add("after-expression",function(u){u.node&&r(u.node)});function r(i){Qe.assignmentOperators.has(i.operator)?(i.type="AssignmentExpression",r(i.left),r(i.right)):i.operator||Object.values(i).forEach(function(u){u&&oe(u)==="object"&&r(u)})}}},te=Object.prototype.hasOwnProperty;function Oe(e,n){return e=e.slice(),e.push(n),e}function jn(e,n){return n=n.slice(),n.unshift(e),n}var xa=function(e){function n(t){var r;return Ke(this,n),r=Jo(this,n,['JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)']),r.avoidNew=!0,r.value=t,r.name="NewError",r}return ta(n,e),Je(n)}(Mn(Error));function M(e,n,t,r,i){if(!(this instanceof M))try{return new M(e,n,t,r,i)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof e=="string"&&(i=r,r=t,t=n,n=e,e=null);var u=e&&oe(e)==="object";if(e=e||{},this.json=e.json||t,this.path=e.path||n,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=te.call(e,"wrap")?e.wrap:!0,this.sandbox=e.sandbox||{},this.eval=e.eval===void 0?"safe":e.eval,this.ignoreEvalErrors=typeof e.ignoreEvalErrors=="undefined"?!1:e.ignoreEvalErrors,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||r||null,this.otherTypeCallback=e.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},e.autostart!==!1){var o={path:u?e.path:n};u?"json"in e&&(o.json=e.json):o.json=t;var a=this.evaluate(o);if(!a||oe(a)!=="object")throw new xa(a);return a}}M.prototype.evaluate=function(e,n,t,r){var i=this,u=this.parent,o=this.parentProperty,a=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,t=t||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,n=n||this.json,e=e||this.path,e&&oe(e)==="object"&&!Array.isArray(e)){if(!e.path&&e.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!te.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var l=e;n=l.json,a=te.call(e,"flatten")?e.flatten:a,this.currResultType=te.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=te.call(e,"sandbox")?e.sandbox:this.currSandbox,c=te.call(e,"wrap")?e.wrap:c,this.currEval=te.call(e,"eval")?e.eval:this.currEval,t=te.call(e,"callback")?e.callback:t,this.currOtherTypeCallback=te.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,u=te.call(e,"parent")?e.parent:u,o=te.call(e,"parentProperty")?e.parentProperty:o,e=e.path}if(u=u||null,o=o||null,Array.isArray(e)&&(e=M.toPathString(e)),!(!e&&e!==""||!n)){var s=M.toPathArray(e);s[0]==="$"&&s.length>1&&s.shift(),this._hasParentSelector=null;var h=this._trace(s,n,["$"],u,o,t).filter(function(f){return f&&!f.isParentSelector});return h.length?!c&&h.length===1&&!h[0].hasArrExpr?this._getPreferredOutput(h[0]):h.reduce(function(f,p){var b=i._getPreferredOutput(p);return a&&Array.isArray(b)?f=f.concat(b):f.push(b),f},[]):c?[]:void 0}};M.prototype._getPreferredOutput=function(e){var n=this.currResultType;switch(n){case"all":{var t=Array.isArray(e.path)?e.path:M.toPathArray(e.path);return e.pointer=M.toPointer(t),e.path=typeof e.path=="string"?e.path:M.toPathString(e.path),e}case"value":case"parent":case"parentProperty":return e[n];case"path":return M.toPathString(e[n]);case"pointer":return M.toPointer(e.path);default:throw new TypeError("Unknown result type")}};M.prototype._handleCallback=function(e,n,t){if(n){var r=this._getPreferredOutput(e);e.path=typeof e.path=="string"?e.path:M.toPathString(e.path),n(r,t,e)}};M.prototype._trace=function(e,n,t,r,i,u,o,a){var c=this,l;if(!e.length)return l={path:t,value:n,parent:r,parentProperty:i,hasArrExpr:o},this._handleCallback(l,u,"value"),l;var s=e[0],h=e.slice(1),f=[];function p(D){Array.isArray(D)?D.forEach(function(B){f.push(B)}):f.push(D)}if((typeof s!="string"||a)&&n&&te.call(n,s))p(this._trace(h,n[s],Oe(t,s),n,s,u,o));else if(s==="*")this._walk(n,function(D){p(c._trace(h,n[D],Oe(t,D),n,D,u,!0,!0))});else if(s==="..")p(this._trace(h,n,t,r,i,u,o)),this._walk(n,function(D){oe(n[D])==="object"&&p(c._trace(e.slice(),n[D],Oe(t,D),n,D,u,!0))});else{if(s==="^")return this._hasParentSelector=!0,{path:t.slice(0,-1),expr:h,isParentSelector:!0};if(s==="~")return l={path:Oe(t,s),value:i,parent:r,parentProperty:null},this._handleCallback(l,u,"property"),l;if(s==="$")p(this._trace(h,n,t,null,null,u,o));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(s))p(this._slice(s,h,n,t,r,i,u));else if(s.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var b=s.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),A=/@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])?((?:[\0->@-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))(?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\)\])['\]]/g.exec(b);A?this._walk(n,function(D){var B=[A[2]],L=A[1]?n[D][A[1]]:n[D],I=c._trace(B,L,t,r,i,u,!0);I.length>0&&p(c._trace(h,n[D],Oe(t,D),n,D,u,!0))}):this._walk(n,function(D){c._eval(b,n[D],D,t,r,i)&&p(c._trace(h,n[D],Oe(t,D),n,D,u,!0))})}else if(s[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");p(this._trace(jn(this._eval(s,n,t[t.length-1],t.slice(0,-1),r,i),h),n,t,r,i,u,o))}else if(s[0]==="@"){var y=!1,F=s.slice(1,-2);switch(F){case"scalar":(!n||!["object","function"].includes(oe(n)))&&(y=!0);break;case"boolean":case"string":case"undefined":case"function":oe(n)===F&&(y=!0);break;case"integer":Number.isFinite(n)&&!(n%1)&&(y=!0);break;case"number":Number.isFinite(n)&&(y=!0);break;case"nonFinite":typeof n=="number"&&!Number.isFinite(n)&&(y=!0);break;case"object":n&&oe(n)===F&&(y=!0);break;case"array":Array.isArray(n)&&(y=!0);break;case"other":y=this.currOtherTypeCallback(n,t,r,i);break;case"null":n===null&&(y=!0);break;default:throw new TypeError("Unknown value type "+F)}if(y)return l={path:t,value:n,parent:r,parentProperty:i},this._handleCallback(l,u,"value"),l}else if(s[0]==="`"&&n&&te.call(n,s.slice(1))){var w=s.slice(1);p(this._trace(h,n[w],Oe(t,w),n,w,u,o,!0))}else if(s.includes(",")){var E=s.split(","),S=sa(E),T;try{for(S.s();!(T=S.n()).done;){var g=T.value;p(this._trace(jn(g,h),n,t,r,i,u,!0))}}catch(D){S.e(D)}finally{S.f()}}else!a&&n&&te.call(n,s)&&p(this._trace(h,n[s],Oe(t,s),n,s,u,o,!0))}if(this._hasParentSelector)for(var C=0;C<f.length;C++){var _=f[C];if(_&&_.isParentSelector){var R=this._trace(_.expr,n,_.path,r,i,u,o);if(Array.isArray(R)){f[C]=R[0];for(var Y=R.length,H=1;H<Y;H++)C++,f.splice(C,0,R[H])}else f[C]=R}}return f};M.prototype._walk=function(e,n){if(Array.isArray(e))for(var t=e.length,r=0;r<t;r++)n(r);else e&&oe(e)==="object"&&Object.keys(e).forEach(function(i){n(i)})};M.prototype._slice=function(e,n,t,r,i,u,o){if(Array.isArray(t)){var a=t.length,c=e.split(":"),l=c[2]&&Number.parseInt(c[2])||1,s=c[0]&&Number.parseInt(c[0])||0,h=c[1]&&Number.parseInt(c[1])||a;s=s<0?Math.max(0,s+a):Math.min(a,s),h=h<0?Math.max(0,h+a):Math.min(a,h);for(var f=[],p=s;p<h;p+=l){var b=this._trace(jn(p,n),t,r,i,u,o,!0);b.forEach(function(A){f.push(A)})}return f}};M.prototype._eval=function(e,n,t,r,i,u){var o=this;this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=t,this.currSandbox._$_root=this.json,this.currSandbox._$_v=n;var a=e.includes("@path");a&&(this.currSandbox._$_path=M.toPathString(r.concat([t])));var c=this.currEval+"Script:"+e;if(!M.cache[c]){var l=e.replace(/@parentProperty/g,"_$_parentProperty").replace(/@parent/g,"_$_parent").replace(/@property/g,"_$_property").replace(/@root/g,"_$_root").replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1");if(a&&(l=l.replace(/@path/g,"_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)M.cache[c]=new this.safeVm.Script(l);else if(this.currEval==="native")M.cache[c]=new this.vm.Script(l);else if(typeof this.currEval=="function"&&this.currEval.prototype&&te.call(this.currEval.prototype,"runInNewContext")){var s=this.currEval;M.cache[c]=new s(l)}else if(typeof this.currEval=="function")M.cache[c]={runInNewContext:function(f){return o.currEval(l,f)}};else throw new TypeError('Unknown "eval" property "'.concat(this.currEval,'"'))}try{return M.cache[c].runInNewContext(this.currSandbox)}catch(h){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+h.message+": "+e)}};M.cache={};M.toPathString=function(e){for(var n=e,t=n.length,r="$",i=1;i<t;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(n[i])||(r+=/^[\*0-9]+$/.test(n[i])?"["+n[i]+"]":"['"+n[i]+"']");return r};M.toPointer=function(e){for(var n=e,t=n.length,r="",i=1;i<t;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(n[i])||(r+="/"+n[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return r};M.toPathArray=function(e){var n=M.cache;if(n[e])return n[e].concat();var t=[],r=e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]](?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\])/g,function(u,o){return"[#"+(t.push(o)-1)+"]"}).replace(/\[["']((?:[\0-&\(-\\\^-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)["']\]/g,function(u,o){return"['"+o.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:[\0-Z\\-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(u,o){return";"+o.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=r.split(";").map(function(u){var o=u.match(/#([0-9]+)/);return!o||!o[1]?u:t[o[1]]});return n[e]=i,n[e].concat()};var ya=function(n,t,r){for(var i=n.length,u=0;u<i;u++){var o=n[u];r(o)&&t.push(n.splice(u--,1)[0])}};Ze.plugins.register(ga,Qe);var V={evalAst:function(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return V.evalBinaryExpression(n,t);case"Compound":return V.evalCompound(n,t);case"ConditionalExpression":return V.evalConditionalExpression(n,t);case"Identifier":return V.evalIdentifier(n,t);case"Literal":return V.evalLiteral(n,t);case"MemberExpression":return V.evalMemberExpression(n,t);case"UnaryExpression":return V.evalUnaryExpression(n,t);case"ArrayExpression":return V.evalArrayExpression(n,t);case"CallExpression":return V.evalCallExpression(n,t);case"AssignmentExpression":return V.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression:function(n,t){var r={"||":function(u,o){return u||o()},"&&":function(u,o){return u&&o()},"|":function(u,o){return u|o()},"^":function(u,o){return u^o()},"&":function(u,o){return u&o()},"==":function(u,o){return u==o()},"!=":function(u,o){return u!=o()},"===":function(u,o){return u===o()},"!==":function(u,o){return u!==o()},"<":function(u,o){return u<o()},">":function(u,o){return u>o()},"<=":function(u,o){return u<=o()},">=":function(u,o){return u>=o()},"<<":function(u,o){return u<<o()},">>":function(u,o){return u>>o()},">>>":function(u,o){return u>>>o()},"+":function(u,o){return u+o()},"-":function(u,o){return u-o()},"*":function(u,o){return u*o()},"/":function(u,o){return u/o()},"%":function(u,o){return u%o()}}[n.operator](V.evalAst(n.left,t),function(){return V.evalAst(n.right,t)});return r},evalCompound:function(n,t){for(var r,i=0;i<n.body.length;i++){n.body[i].type==="Identifier"&&["var","let","const"].includes(n.body[i].name)&&n.body[i+1]&&n.body[i+1].type==="AssignmentExpression"&&(i+=1);var u=n.body[i];r=V.evalAst(u,t)}return r},evalConditionalExpression:function(n,t){return V.evalAst(n.test,t)?V.evalAst(n.consequent,t):V.evalAst(n.alternate,t)},evalIdentifier:function(n,t){if(n.name in t)return t[n.name];throw ReferenceError("".concat(n.name," is not defined"))},evalLiteral:function(n){return n.value},evalMemberExpression:function(n,t){var r=n.computed?V.evalAst(n.property):n.property.name,i=V.evalAst(n.object,t),u=i[r];return typeof u=="function"?u.bind(i):u},evalUnaryExpression:function(n,t){var r={"-":function(u){return-V.evalAst(u,t)},"!":function(u){return!V.evalAst(u,t)},"~":function(u){return~V.evalAst(u,t)},"+":function(u){return+V.evalAst(u,t)}}[n.operator](n.argument);return r},evalArrayExpression:function(n,t){return n.elements.map(function(r){return V.evalAst(r,t)})},evalCallExpression:function(n,t){var r=n.arguments.map(function(u){return V.evalAst(u,t)}),i=V.evalAst(n.callee,t);return i.apply(void 0,Vn(r))},evalAssignmentExpression:function(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");var r=n.left.name,i=V.evalAst(n.right,t);return t[r]=i,t[r]}},Ea=function(){function e(n){Ke(this,e),this.code=n,this.ast=Ze(this.code)}return Je(e,[{key:"runInNewContext",value:function(t){var r=Xo({},t);return V.evalAst(this.ast,r)}}])}(),Aa=function(){function e(n){Ke(this,e),this.code=n}return Je(e,[{key:"runInNewContext",value:function(t){var r=this.code,i=Object.keys(t),u=[];ya(i,u,function(s){return typeof t[s]=="function"});var o=i.map(function(s){return t[s]}),a=u.reduce(function(s,h){var f=t[h].toString();return/function/.test(f)||(f="function "+f),"var "+h+"="+f+";"+s},"");r=a+r,!/(["'])use strict\1/.test(r)&&!i.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var c=r.lastIndexOf(";"),l=c>-1?r.slice(0,c+1)+" return "+r.slice(c+1):" return "+r;return bi(Function,i.concat([l])).apply(void 0,Vn(o))}}])}();M.prototype.vm={Script:Aa};M.prototype.safeVm={Script:Ea};var ie;(h=>{async function e(f,p,b){var E;let A=yi(b,{...Rn,interpretmarkup(S=""){var g,C;if(/^`[^`]+`$/.test(S))return S;let T=`
|
|
`.repeat((C=(g=S.match(/\n/g))==null?void 0:g.length)!=null?C:0);return S.match(/^\s*(-|\d+\.) $/m)?T+"\u2022 ":T}}),y={data:JSON.stringify(A),language:(E=f.staticLanguage)!=null?E:"auto",enabledOnly:"false",level:f.pickyMode?"picky":"default"};f.motherTongue&&(y.motherTongue=f.motherTongue),f.enabledCategories&&(y.enabledCategories=f.enabledCategories),f.disabledCategories&&(y.disabledCategories=f.disabledCategories),f.enabledRules&&(y.enabledRules=f.enabledRules),f.disabledRules&&(y.disabledRules=f.disabledRules),f.staticLanguage==null&&(y.preferredVariants=Object.values(f.languageVariety).join(",")),f.apikey&&f.username&&(y.username=f.username,y.apiKey=f.apikey);let F;try{F=await(0,_e.requestUrl)({url:`${f.serverUrl}/v2/check`,method:"POST",body:new URLSearchParams(y).toString(),throw:!0,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}})}catch(S){throw console.log(S),new Error(`Request to LanguageTool failed: Please check your connection and server URL.
|
|
${S}`)}if(F.json==null)throw new Error("Error processing response from LanguageTool.");return l("$.matches[*]",F.json).map(S=>{let T=c("$.offset@number()",S),g=T+c("$.length@number()",S);return{text:b.slice(T,g),from:p+T,to:p+g,title:c("$.shortMessage@string()",S),message:c("$.message@string()",S),replacements:l("$.replacements[*].value@string()",S),categoryId:c("$.rule.category.id@string()",S),ruleId:c("$.rule.id@string()",S)}})}h.check=e;async function n(f){let p=await(0,_e.requestUrl)({url:`${f}/v2/languages`}).json;if(p==null||!(p instanceof Array))throw new Error("Error processing response from LanguageTool.");return p}h.languages=n;async function t(f){if(f.username==null||f.apikey==null)throw Error("Syncing words is only supported for premium users");try{let p=await(0,_e.requestUrl)({url:s(`${f.serverUrl}/v2/words`,{username:f.username,apiKey:f.apikey,limit:"1000"}).href}).json;return l("$.words[*]@string()",p)}catch(p){throw new Error(`Requesting words failed
|
|
${p}`)}}h.words=t;async function r(f,p){if(f.username==null||f.apikey==null)throw Error("Syncing words is only supported for premium users");try{let b=await(0,_e.requestUrl)({url:s(`${f.serverUrl}/v2/words/add`,{username:f.username,apiKey:f.apikey,word:p}).href,method:"POST"}).json;return c("$.added@boolean()",b)}catch(b){throw new Error(`Adding words failed
|
|
${b}`)}}h.wordsAdd=r;async function i(f,p){if(f.username==null||f.apikey==null)throw Error("Syncing words is only supported for premium users");try{let b=await(0,_e.requestUrl)({url:s(`${f.serverUrl}/v2/words/delete`,{username:f.username,apiKey:f.apikey,word:p}).href,method:"POST"}).json;return c("$.deleted@boolean()",b)}catch(b){throw new Error(`Deleting words failed
|
|
${b}`)}}h.wordsDel=i;class u{constructor(){this.url="https://qb-grammar-en.languagetool.org/phrasal-paraphraser/subscribe"}async query(p,b){let A="$.data.suggestions[*][*]@string()",y=p.slice(0,b.from).split(/\s+/).length,F=p.slice(b.from,b.to),w={message:{indices:[y],mode:0,phrases:[F],text:p},meta:{clientStatus:"string",product:"string",traceID:"string",userID:"string"},response_queue:"string"},E;try{return E=await(0,_e.requestUrl)({url:this.url,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)}).json,l(A,E)}catch(S){throw new Error(`Requesting synonyms failed
|
|
${S}`)}}}class o{constructor(){this.url="https://synonyms.languagetool.org/synonyms/de"}async query(p,b){let A=p.slice(b.from,b.to).trim(),y=p.slice(0,b.from).split(/\s+/).join("+"),F=p.slice(b.to).split(/\s+/).join("+"),w;try{return w=await(0,_e.requestUrl)({url:s(`${this.url}/${A}`,{before:y,after:F}).href,method:"GET"}).json,l("$.synsets[*].terms[*].term@string()",w)}catch(E){throw new Error(`Requesting synonyms failed
|
|
${E}`)}}}h.SYNONYMS={en:new u,de:new o};function c(f,p){let b=M({path:f,json:p,wrap:!1,eval:!1});if(b==null)throw new Error("Error parsing response.");return b}function l(f,p){let b=M({path:f,json:p,wrap:!0,eval:!1});if(b==null||!(b instanceof Array))throw new Error("Error parsing response.");return b}function s(f,p){let b=new URL(f);return b.search=new URLSearchParams(p).toString(),b}})(ie||(ie={}));function Ut(e){switch(e){case"COLLOQUIALISMS":case"REDUNDANCY":case"STYLE":case"SYNONYMS":return"lt-style";case"TYPOS":return"lt-major"}return"lt-minor"}function Xe(e,n){let t=new Set(e);for(let r of n)t.delete(r);return t}function Hn(e,n){let t=new Set(e);for(let r of n)t.add(r);return t}function Di(e,n){let t=new Set;for(let r of n)e.has(r)&&t.add(r);return t}function Ge(e,n){return e=e.toLowerCase(),n=n.toLowerCase(),e>n?1:e<n?-1:0}var Si=5e3,Ca=250,Et=class{constructor(n,t){this.url=n,this.requestsPerSec=t}get minDelay(){return 60/this.requestsPerSec*1e3}},Ct={standard:new Et("https://api.languagetool.org",20),premium:new Et("https://api.languagetoolplus.com",80),custom:new Et("",120)};function At(e){for(let[n,t]of Object.entries(Ct))if(t.url===e)return n;return"custom"}var vi={serverUrl:Ct.standard.url,autoCheckDelay:Ct.standard.minDelay,shouldAutoCheck:!1,languageVariety:{en:"en-US",de:"de-DE",pt:"pt-PT",ca:"ca-ES"},dictionary:[],syncDictionary:!1,remoteDictionary:[],pickyMode:!1};function Bi(e,n){return e=e.filter(t=>t.code===n).filter(t=>t.longCode!==t.code),Object.fromEntries(e.map(t=>[t.longCode,t.name]))}var Vt=class extends N.PluginSettingTab{constructor(t,r){super(t,r);this.endpointListeners=[];this.languageListeners=[];this.languages=[];this.plugin=r}configureCheckDelay(t,r){let i=Ct[r].minDelay;this.plugin.settings.autoCheckDelay=Math.clamp(this.plugin.settings.autoCheckDelay,i,Si),t.setLimits(i,Si,Ca)}async notifyEndpointChange(t){for(let r of this.endpointListeners)await r(t.serverUrl)}async configureLanguageVariants(t,r){var o;let i=this.plugin.settings.languageVariety,u=Bi(this.languages,r);i[r]=(o=i[r])!=null?o:Object.keys(u)[0],t.addOptions(u).setValue(i[r]).onChange(async a=>{i[r]=a,await this.plugin.saveSettings()}),this.languageListeners.push(async a=>{var l;for(;t.selectEl.options.length>0;)t.selectEl.remove(0);let c=Bi(a,r);i[r]=(l=i[r])!=null?l:Object.keys(c)[0],t.addOptions(c).setValue(i[r])})}async display(){let{containerEl:t}=this;t.empty();let r=this.plugin.settings;this.endpointListeners=[],this.endpointListeners.push(async l=>{let s=[];l&&(s=await ie.languages(l)),this.languages=s;for(let h of this.languageListeners)await h(s)}),this.endpointListeners.push(async l=>{await this.plugin.syncDictionary()}),this.languageListeners=[],new N.Setting(t).setName("Error logs").setDesc(`${this.plugin.logs.length} messages`).addButton(l=>{l.setButtonText("Copy to clipboard").onClick(async()=>{await window.navigator.clipboard.writeText(this.plugin.logs.join(`
|
|
`)),new N.Notice("Logs copied to clipboard")})});let i=At(r.serverUrl),u=null;new N.Setting(t).setName("Endpoint").setDesc("Choose the LanguageTool server url").then(l=>{l.controlEl.classList.add("lt-settings-grid");let s=null,h=null;l.addDropdown(f=>{s=f,f.addOptions({standard:"(Standard) api.languagetool.org",premium:"(Premium) api.languagetoolplus.com",custom:"Custom URL"}).setValue(i).onChange(async p=>{i=p,r.serverUrl=Ct[i].url,h&&h.setValue(r.serverUrl).setDisabled(p!=="custom"),u&&this.configureCheckDelay(u,i),await this.notifyEndpointChange(r),await this.plugin.saveSettings()})}),l.addText(f=>{h=f,f.setPlaceholder("https://your-custom-url.com").setValue(r.serverUrl).setDisabled(i!=="custom").onChange(async p=>{r.serverUrl=p.replace(/\/v2\/check\/$/,"").replace(/\/$/,""),i=At(r.serverUrl),i!=="custom"&&(s==null||s.setValue(i),h==null||h.setDisabled(!0)),await this.notifyEndpointChange(r),await this.plugin.saveSettings()})})}),new N.Setting(t).setName("API username").setDesc("Enter a username/mail for API access").addText(l=>l.setPlaceholder("peterlustig@example.com").setValue(r.username||"").onChange(async s=>{r.username=s.replace(/\s+/g,""),await this.plugin.saveSettings()})),new N.Setting(t).setName("API key").setDesc(createFragment(l=>{l.createEl("a",{text:"Click here for information about Premium Access",href:"https://github.com/wrenger/obsidian-languagetool#premium-accounts",attr:{target:"_blank"}})})).addText(l=>l.setValue(r.apikey||"").onChange(async s=>{r.apikey=s.replace(/\s+/g,""),r.apikey&&i!=="premium"&&new N.Notice("You have entered an API Key but you are not using the Premium Endpoint"),await this.plugin.saveSettings()})),new N.Setting(t).setName("Auto check text").setDesc("Check text as you type").addToggle(l=>{l.setValue(r.shouldAutoCheck).onChange(async s=>{r.shouldAutoCheck=s,await this.plugin.saveSettings()})}),new N.Setting(t).setName("Auto check delay (ms)").setDesc("Time to wait for autocheck after the last key press").addSlider(l=>{u=l,this.configureCheckDelay(l,i),l.setValue(r.autoCheckDelay).onChange(async s=>{r.autoCheckDelay=s,await this.plugin.saveSettings()}).setDynamicTooltip()});function o(l){if(l.appendText("Enables the context menu for synonyms fetched from"),l.createEl("br"),r.synonyms!=null){let s=ie.SYNONYMS[r.synonyms];if(!s){l.appendText(" (unknown API)");return}l.createEl("a",{text:s.url,href:s.url,attr:{target:"_blank"}})}else l.appendText("(none)")}let a=new N.Setting(t).setName("Find synonyms").setDesc(createFragment(o));a.addDropdown(l=>{var s;l.addOption("none","---");for(let h of Object.keys(ie.SYNONYMS))l.addOption(h,h);l.setValue((s=r.synonyms)!=null?s:"none").onChange(async h=>{r.synonyms=h!=="none"?h:void 0,await this.plugin.saveSettings(),a.setDesc(createFragment(o))})}),new N.Setting(t).setName("Language settings").setHeading(),new N.Setting(t).setName("Mother tongue").setDesc("Set mother tongue if you want to be warned about false friends when writing in other languages. This setting will also be used for automatic language detection.").addDropdown(l=>{this.languageListeners.push(async s=>{var h;for(;l.selectEl.options.length>0;)l.selectEl.remove(0);l.addOption("none","---").addOptions(Object.fromEntries(s.filter(f=>f.longCode==f.code).map(f=>[f.longCode,f.name]))).setValue((h=r.motherTongue)!=null?h:"none").onChange(async f=>{r.motherTongue=f!=="none"?f:void 0,await this.plugin.saveSettings()})})}),new N.Setting(t).setName("Static language").setDesc("Set a static language that will always be used (LanguageTool tries to auto detect the language, this is usually not necessary)").addDropdown(l=>{this.languageListeners.push(async s=>{var h;for(;l.selectEl.options.length>0;)l.selectEl.remove(0);l.addOption("auto","Auto Detect").addOptions(Object.fromEntries(s.map(f=>[f.longCode,f.name]))).setValue((h=r.staticLanguage)!=null?h:"auto").onChange(async f=>{r.staticLanguage=f!=="auto"?f:void 0,await this.plugin.saveSettings()})})}),new N.Setting(t).setName("Language varieties").setHeading().setDesc("Some languages have varieties depending on the country they are spoken in.");let c={en:"English",de:"German",pt:"Portuguese",ca:"Catalan"};for(let[l,s]of Object.entries(c))new N.Setting(t).setName(`Interpret ${s} as`).addDropdown(async h=>{this.configureLanguageVariants(h,l)});new N.Setting(t).setName("Spellcheck Dictionary").setHeading(),new N.Setting(t).setName("Ignored Words").setDesc("Words that should not be highlighted as spelling mistakes.").addButton(l=>{l.setIcon("settings").setTooltip("Edit dictionary").onClick(()=>{new qn(this.app,this.plugin).open()})}),new N.Setting(t).setName("Sync with LanguageTool").setDesc("This is only supported for premium users.").addToggle(l=>{l.setDisabled(i!=="premium").setValue(r.syncDictionary).onChange(async s=>{r.syncDictionary=s,await this.plugin.syncDictionary()}),this.endpointListeners.push(async s=>{l.setDisabled(At(s)!=="premium")})}),new N.Setting(t).setName("Rule categories").setHeading().setDesc(createFragment(l=>{l.appendText("The picky mode enables a lot of extra categories and rules. Additionally, you can enable or disable specific rules down below."),l.createEl("br"),l.createEl("a",{text:"Click here for a list of rules and categories",href:"https://community.languagetool.org/rule/list",attr:{target:"_blank"}})})),new N.Setting(t).setName("Picky mode").setDesc("Provides more style and tonality suggestions, detects long or complex sentences, recognizes colloquialism and redundancies, proactively suggests synonyms for commonly overused words").addToggle(l=>{l.setValue(r.pickyMode).onChange(async s=>{r.pickyMode=s,await this.plugin.saveSettings()})}),new N.Setting(t).setName("Enabled categories").setDesc("Comma-separated list of categories").addText(l=>{var s;return l.setPlaceholder("CATEGORY_1,CATEGORY_2").setValue((s=r.enabledCategories)!=null?s:"").onChange(async h=>{r.enabledCategories=h.replace(/\s+/g,""),await this.plugin.saveSettings()})}),new N.Setting(t).setName("Disabled categories").setDesc("Comma-separated list of categories").addText(l=>{var s;return l.setPlaceholder("CATEGORY_1,CATEGORY_2").setValue((s=r.disabledCategories)!=null?s:"").onChange(async h=>{r.disabledCategories=h.replace(/\s+/g,""),await this.plugin.saveSettings()})}),new N.Setting(t).setName("Enabled rules").setDesc("Comma-separated list of rules").addText(l=>{var s;return l.setPlaceholder("RULE_1,RULE_2").setValue((s=r.enabledRules)!=null?s:"").onChange(async h=>{r.enabledRules=h.replace(/\s+/g,""),await this.plugin.saveSettings()})}),new N.Setting(t).setName("Disabled rules").setDesc("Comma-separated list of rules").addText(l=>{var s;return l.setPlaceholder("RULE_1,RULE_2").setValue((s=r.disabledRules)!=null?s:"").onChange(async h=>{r.disabledRules=h.replace(/\s+/g,""),await this.plugin.saveSettings()})}),await this.notifyEndpointChange(r)}},qn=class extends N.Modal{constructor(n,t){super(n),this.setTitle("Spellcheck dictionary"),this.plugin=t,this.words=t.settings.dictionary}async onOpen(){this.words=this.plugin.settings.dictionary;let{contentEl:n}=this,t=a=>{a.replaceChildren(...this.words.map(c=>a.createDiv({cls:"multi-select-pill"},l=>{l.createDiv({cls:"multi-select-pill-content"},s=>s.createSpan({text:c})),l.createDiv({cls:"multi-select-pill-remove-button"},s=>{s.appendChild((0,N.getIcon)("x")),s.onClickEvent(()=>{this.words.remove(c),t(a)})})})))},r=null;n.createDiv({cls:"multi-select-container"},a=>{r=a,t(a)}),this.plugin.syncDictionary().then(a=>{a&&(this.words=this.plugin.settings.dictionary,r&&t(r))});let i="",u=null,o=()=>{i&&(this.words=[...new Set([...this.words,i])].sort(Ge),r&&t(r),u&&u.setValue(""),i="")};new N.Setting(n).setName("Add").addText(a=>{u=a.setValue(i).onChange(c=>i=c.trim()),a.inputEl.addEventListener("keypress",c=>{c.key==="Enter"&&o()})}).addExtraButton(a=>{a.setIcon("plus").setTooltip("Add").onClick(()=>{o()})})}async onClose(){this.contentEl.empty(),this.plugin.settings.dictionary=this.words,await this.plugin.syncDictionary()}};var zi=require("@codemirror/view");var Ti=require("@codemirror/view");function Oi(e){let n=-1,t=1/0,r=-1/0;return Ti.EditorView.updateListener.of(i=>{if(!i.docChanged||!e.settings.shouldAutoCheck)return;i.changes.iterChangedRanges((o,a,c,l)=>{t=Math.min(t,c,l),r=Math.max(r,c,l)});let u=i.view;clearTimeout(n),n=window.setTimeout(()=>{e.runDetection(u,{from:t,to:r}).catch(o=>{console.error(o)}),t=1/0,r=-1/0},e.settings.autoCheckDelay)})}var Ii=require("@codemirror/view"),Li=require("@codemirror/state");var kt=require("obsidian");var et=require("@codemirror/view"),Me=require("@codemirror/state"),tt=require("@codemirror/language");var ba=/(frontmatter|code|math|templater|blockid|hashtag|internal)/,Ht=Me.StateEffect.define(),bt=Me.StateEffect.define(),nt=Me.StateEffect.define(),qt=Me.StateEffect.define();function _i(e,n){return e.from<=n.from&&n.from<=e.to||e.from<=n.to&&n.to<=e.to||n.from<=e.from&&e.from<=n.to||n.from<=e.to&&e.to<=n.to}var Ne=Me.StateField.define({create(){return et.Decoration.none},update(e,n){e=e.map(n.changes);let t=new Set,r={},i=null,u=a=>{if(r[a]==null){i||(i=(0,tt.syntaxTree)(n.state));let c=i.resolveInner(a,1).type.prop(tt.tokenClassNodeProp);r[a]=!(c&&ba.test(c))}return r[a]},o=a=>{i||(i=(0,tt.syntaxTree)(n.state));let c=i.resolve(n.newDoc.lineAt(a.from).from,1).type.prop(tt.tokenClassNodeProp);return!(c!=null&&c.includes("table")&&a.ruleId==="WHITESPACE_RULE")};n.docChanged&&n.selection&&e.size&&(e=e.update({filter:(a,c)=>!_i({from:a,to:c},n.selection.main)}));for(let a of n.effects)if(a.is(Ht)){let c=a.value,l=`${c.from},${c.to}`;!t.has(l)&&u(c.from)&&u(c.to)&&o(c)&&(t.add(l),e=e.update({add:[et.Decoration.mark({class:`lt-underline ${Ut(c.categoryId)}`,underline:c}).range(c.from,c.to)]}))}else a.is(bt)?e=et.Decoration.none:a.is(nt)?e=e.update({filterFrom:a.value.from,filterTo:a.value.to,filter:(c,l)=>!_i({from:c,to:l},a.value)}):a.is(qt)&&(e=e.update({filter:(c,l,s)=>!a.value(s.spec.underline)}));return e},provide:e=>et.EditorView.decorations.from(e)});function ka(e,n,t){let r=t.replacements.slice(0,$t),i=t.categoryId,u=t.ruleId;return createDiv({cls:["lt-predictions-container",Ut(i)]},o=>{t.title&&o.createSpan({cls:"lt-title"},c=>{c.createSpan({text:t.title})}),t.message&&o.createSpan({cls:"lt-message",text:t.message});let a=nt.of({...t});o.createDiv({cls:"lt-bottom"},c=>{r.length&&c.createDiv({cls:"lt-buttoncontainer"},l=>{for(let s of r)l.createEl("button",{text:s||"(delete)"},h=>{h.onclick=()=>{n.dispatch({changes:[{from:t.from,to:t.to,insert:s}],effects:[a]})}})}),c.createDiv({cls:"lt-info-container"},l=>{l.createEl("button",{cls:"lt-info-button clickable-icon"},s=>{(0,kt.setIcon)(s,"info"),s.onclick=()=>{let h=document.getElementsByClassName("lt-info-box").item(0);if(!h)throw Error("Programming error: failed to create popup.");h.hasClass("hidden")?h.removeClass("hidden"):h.addClass("hidden")}}),l.createDiv({cls:"lt-info-box hidden"},s=>{s.createDiv({cls:"lt-info",text:`Category:\xA0${i}`}),s.createDiv({cls:"lt-info",text:`Rule:\xA0${u}`})})})}),o.createDiv({cls:"lt-ignorecontainer"},c=>{c.createEl("button",{cls:"lt-ignore-btn"},l=>{i==="TYPOS"?((0,kt.setIcon)(l.createSpan(),"plus-with-circle"),l.createSpan({text:"Add to personal dictionary"}),l.onclick=async()=>{e.settings.dictionary.push(t.text),await e.syncDictionary(),n.dispatch({effects:[qt.of(s=>s.text===t.text)]})}):((0,kt.setIcon)(l.createSpan(),"cross"),l.createSpan({text:"Ignore suggestion"}),l.onclick=()=>{n.dispatch({effects:[a]})})}),i!=="TYPOS"&&i!=="SYNONYMS"&&c.createEl("button",{cls:"lt-ignore-btn"},l=>{(0,kt.setIcon)(l.createSpan(),"circle-off"),l.createSpan({text:"Disable rule"}),l.onclick=()=>{e.settings.disabledRules?e.settings.disabledRules+=","+u:e.settings.disabledRules=u,e.saveSettings(),n.dispatch({effects:[qt.of(s=>s.ruleId===u)]})}})})})}function Pi(e,n,t){let r=t.field(Ne);if(r.size===0||t.selection.ranges.length>1)return[];let i=null;if(r.between(t.selection.main.from,t.selection.main.to,(u,o,a)=>{i={...a.spec.underline,from:u,to:o}}),i!=null){let{from:u,to:o}=i;if(e.length){let a=e[0];if(a.pos===u&&a.end===o)return e}return[{pos:u,end:o,above:!0,strictSide:!1,arrow:!1,create:a=>({dom:ka(n,a,i)})}]}return[]}function Ri(e){return Li.StateField.define({create:n=>Pi([],e,n),update:(n,t)=>Pi(n,e,t.state),provide:n=>Ii.showTooltip.computeN([n],t=>t.field(n))})}function Mi(e){return[(0,zi.tooltips)({position:"absolute",tooltipSpace:n=>n.dom.getBoundingClientRect()}),Ne,Ri(e),Oi(e)]}var Ni=require("@codemirror/language");var $t=5;function wa(){if(window.electronWindow==null)throw Error("Electron not found!");return window.electronWindow}var Wt=class extends se.Plugin{constructor(){super(...arguments);this.isLoading=!1;this.logs=[]}async onload(){await this.loadSettings(),this.settingTab=new Vt(this.app,this),this.addSettingTab(this.settingTab),this.app.workspace.onLayoutReady(()=>{this.statusBarText=this.addStatusBarItem(),this.setStatusBarReady(),this.registerDomEvent(this.statusBarText,"click",()=>this.handleStatusBarClick())}),this.registerEditorExtension(Mi(this)),this.registerCommands(),this.registerMenuItems();let t=new Set(this.settings.dictionary.map(r=>r.trim()));t.delete(""),this.settings.dictionary=[...t].sort(Ge),this.syncDictionary(),await this.saveSettings()}onunload(){this.logs=[],this.isLoading=!1}registerCommands(){this.addCommand({id:"check",name:"Check text",editorCallback:(t,r)=>{let i=t.cm;this.runDetection(i).catch(u=>{console.error(u)})}}),this.addCommand({id:"toggle-auto-check",name:"Toggle automatic checking",callback:async()=>{this.settings.shouldAutoCheck=!this.settings.shouldAutoCheck,await this.saveSettings()}}),this.addCommand({id:"clear",name:"Clear suggestions",editorCallback:t=>{t.cm.dispatch({effects:[bt.of(null)]})}}),this.addCommand({id:"next",name:"Jump to next suggestion",editorCheckCallback:(t,r)=>{let i=r.cm,u=r.posToOffset(r.getCursor()),o=null;if(i.state.field(Ne).between(u+1,1/0,(a,c)=>{(!o||o.from>a)&&(o={from:a,to:c})}),t)return o!=null;o!=null&&i.dispatch({selection:{anchor:o.from,head:o.to}})}});for(let t=1;t<=$t;t++)this.addCommand(this.applySuggestionCommand(t));this.addCommand({id:"synonyms",name:"Show synonyms",editorCheckCallback:(t,r)=>this.showSynonyms(r,t)})}applySuggestionCommand(t){return{id:`accept-${t}`,name:`Accept suggestion ${t}`,editorCheckCallback(r,i){var p,b,A;let u=i.cm,o=i.posToOffset(i.getCursor()),a=[];u.state.field(Ne).between(o,o,(y,F,w)=>{a.push({from:y,to:F,value:w})});let c=a.length===1&&((A=(b=(p=a[0].value.spec)==null?void 0:p.underline)==null?void 0:b.replacements)==null?void 0:A.length)>=t;if(r)return c;if(!c)return;let{from:l,to:s,value:h}=a[0],f={from:l,to:s,insert:h.spec.underline.replacements[t-1]};u.dispatch({changes:[f],effects:[nt.of({from:l,to:s})]})}}}registerMenuItems(){this.registerEvent(this.app.workspace.on("editor-menu",(t,r,i)=>{this.showSynonyms(r,!0)&&t.addItem(u=>{u.setTitle("Synonyms"),u.setIcon("square-stack"),u.onClick(()=>this.showSynonyms(r))})}))}showSynonyms(t,r=!1){if(!this.settings.synonyms||!(this.settings.synonyms in ie.SYNONYMS))return!1;let i=ie.SYNONYMS[this.settings.synonyms];if(!i)return!1;let u=t.cm,o=u.state.selection.main;if(o.empty)return!1;let a=u.state.sliceDoc(u.state.selection.main.from,u.state.selection.main.to);if(a.match(/[\s\.]/))return!1;if(r)return!0;let c=u.state.doc.lineAt(o.from),l=c.text.slice(0,o.from-c.from).lastIndexOf(".")+1,s=c.text.slice(l),h=s.trimStart(),f=c.from+l+s.length-h.length,p={from:o.from-f,to:o.to-f};h=h.trimEnd();let b=h.indexOf(".");return b!==-1&&(h=h.slice(0,b+1)),i.query(h,p).then(A=>u.dispatch({effects:[Ht.of({text:a,from:o.from,to:o.to,title:"Synonyms",message:"",categoryId:"SYNONYMS",ruleId:"SYNONYMS",replacements:A})]})).catch(A=>{this.pushLogs(A),new se.Notice(A.message,5e3)}),!0}setStatusBarReady(){this.isLoading=!1,this.statusBarText.empty(),this.statusBarText.createSpan({cls:"lt-status-bar-btn"},t=>{t.createSpan({cls:"lt-status-bar-check-icon",text:"Aa"})})}setStatusBarWorking(){this.isLoading||(this.isLoading=!0,this.statusBarText.empty(),this.statusBarText.createSpan({cls:["lt-status-bar-btn","lt-loading"]},t=>{(0,se.setIcon)(t,"sync-small")}))}handleStatusBarClick(){var i;let t=(i=this.statusBarText.parentElement)==null?void 0:i.getBoundingClientRect(),r=this.statusBarText.getBoundingClientRect();new se.Menu().addItem(u=>{u.setTitle("Check text"),u.setIcon("checkbox-glyph"),u.onClick(async()=>{let o=this.app.workspace.getActiveViewOfType(se.MarkdownView);if(o&&o.getMode()==="source")try{let a=o.editor.cm;await this.runDetection(a)}catch(a){console.error(a)}})}).addItem(u=>{u.setTitle(this.settings.shouldAutoCheck?"Disable automatic checking":"Enable automatic checking"),u.setIcon("uppercase-lowercase-a"),u.onClick(async()=>{this.settings.shouldAutoCheck=!this.settings.shouldAutoCheck,await this.saveSettings()})}).addItem(u=>{u.setTitle("Clear suggestions"),u.setIcon("reset"),u.onClick(()=>{let o=this.app.workspace.getActiveViewOfType(se.MarkdownView);if(!o)return;o.editor.cm.dispatch({effects:[bt.of(null)]})})}).showAtPosition({x:r.right+5,y:((t==null?void 0:t.top)||0)-5})}async runDetection(t,r){let i=t.state.selection.main;!r&&!i.empty&&(r={...i});let u=0,o="";if(r?(r=Da(t,r),u=r.from,o=t.state.sliceDoc(r.from,r.to)):o=t.state.sliceDoc(0),!o.trim())return;let a;try{this.setStatusBarWorking(),a=await ie.check(this.settings,u,o)}catch(l){console.error(l),l instanceof Error&&(this.pushLogs(l),new se.Notice(l.message,5e3));return}finally{this.setStatusBarReady()}let c=[];if(r?c.push(nt.of(r)):c.push(bt.of(null)),a){let l=this.settings.dictionary;for(let s of a)s.to>t.state.doc.length||s.categoryId==="TYPOS"&&l.includes(s.text)||c.push(Ht.of(s))}c.length&&t.dispatch({effects:c})}async pushLogs(t){let r=`${new Date().toLocaleString()}:
|
|
Error: '${t.message}'
|
|
Settings: ${JSON.stringify({...this.settings,username:"REDACTED",apikey:"REDACTED"})}
|
|
`;this.settings.username&&(r=r.replaceAll(this.settings.username,"<<username>>")),this.settings.apikey&&(r=r.replaceAll(this.settings.apikey,"<<username>>")),this.logs.push(r),this.logs.length>10&&this.logs.shift()}async loadSettings(){this.settings=Object.assign({},vi,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async onExternalSettingsChange(){this.settingTab.notifyEndpointChange(this.settings)}async syncDictionary(){if(!this.settings.syncDictionary||At(this.settings.serverUrl)!=="premium")return await this.saveSettings(),!1;try{let t=new Set(this.settings.remoteDictionary),r=new Set(this.settings.dictionary),i=new Set(await ie.words(this.settings)),u=Xe(t,r);u=Di(u,i);for(let h of u)await ie.wordsDel(this.settings,h);let o=Xe(t,i);i=Xe(i,u),r=Xe(r,o);let a=Xe(r,i);for(let h of a)await ie.wordsAdd(this.settings,h);let c=Hn(i,r),l=new Set(this.settings.dictionary),s=l.size!==c.size;return Hn(l,c).size,c.size,this.settings.dictionary=[...c].sort(Ge),this.settings.remoteDictionary=[...c].sort(Ge),await this.saveSettings(),s}catch(t){this.pushLogs(t),console.error("Failed sync spellcheck with LanguageTool",t)}return await this.saveSettings(),!1}};function Da(e,n){let t=null;if(n.from>0){t=(0,Ni.syntaxTree)(e.state);let r=t.resolveInner(n.from,-1);r.type.name.startsWith("list-")?n.from=r.from:n.from=e.state.doc.lineAt(n.from).from}else n.from=0;return n.to<e.state.doc.length?n.to=e.state.doc.lineAt(n.to).to:n.to=e.state.doc.length,n}
|
|
/*! Bundled license information:
|
|
|
|
is-buffer/index.js:
|
|
(*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*)
|
|
*/
|