@topwrite/cli 1.0.9-alpha.0 → 1.0.9-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ttx.js +1 -1
- package/package.json +2 -2
package/bin/ttx.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @license MIT
|
|
8
8
|
*/var Mn=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},zn=Object.prototype.hasOwnProperty,Nn=Object.prototype.toString,Bn=Object.defineProperty,$n=Object.getOwnPropertyDescriptor,Un=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Nn.call(e)},Hn=function(e){if(!e||"[object Object]"!==Nn.call(e))return!1;var t,r=zn.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&zn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||zn.call(e,t)},Vn=function(e,t){Bn&&"__proto__"===t.name?Bn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Qn=function(e,t){if("__proto__"===t){if(!zn.call(e,t))return;if($n)return $n(e,t).value}return e[t]},Gn=function e(){var t,r,n,i,a,o,s=arguments[0],c=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<l;++c)if(null!=(t=arguments[c]))for(r in t)n=Qn(s,r),s!==(i=Qn(t,r))&&(u&&i&&(Hn(i)||(a=Un(i)))?(a?(a=!1,o=n&&Un(n)?n:[]):o=n&&Hn(n)?n:{},Vn(s,{name:r,newValue:e(u,o,i)})):void 0!==i&&Vn(s,{name:r,newValue:i}));return s};function Wn(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function Kn(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(a,...o){const s=e[++r];let c=-1;if(a)n(a);else{for(;++c<t.length;)null!==o[c]&&void 0!==o[c]||(o[c]=t[c]);t=o,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let o;n&&t.push(i);try{o=e(...t)}catch(e){const t=e;if(n&&r)throw t;return i(t)}n||(o instanceof Promise?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...n){r||(r=!0,t(e,...n))}function a(e){i(null,e)}}(s,i)(...o):n(null,...o)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}var Yn={}.hasOwnProperty;function Jn(e){return e&&"object"==typeof e?Yn.call(e,"position")||Yn.call(e,"type")?Xn(e.position):Yn.call(e,"start")||Yn.call(e,"end")?Xn(e):Yn.call(e,"line")||Yn.call(e,"column")?Zn(e):"":""}function Zn(e){return ei(e&&e.line)+":"+ei(e&&e.column)}function Xn(e){return Zn(e&&e.start)+"-"+Zn(e&&e.end)}function ei(e){return e&&"number"==typeof e?e:1}class ti extends Error{constructor(e,t,r){var n,i=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(r=t,t=null),"string"==typeof r&&(-1===(n=r.indexOf(":"))?i[1]=r:(i[0]=r.slice(0,n),i[1]=r.slice(n+1))),t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=Jn(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.line=a.start.line,this.column=a.start.column,this.source=i[0],this.ruleId=i[1],this.position=a,this.file,this.fatal,this.url,this.note}}ti.prototype.file="",ti.prototype.name="",ti.prototype.reason="",ti.prototype.message="",ti.prototype.stack="",ti.prototype.fatal=null,ti.prototype.column=null,ti.prototype.line=null,ti.prototype.source=null,ti.prototype.ruleId=null,ti.prototype.position=null;const ri=q.default;function ni(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const ii=["history","path","basename","stem","extname","dirname"];class ai{constructor(e){let t;t=e?"string"==typeof e||Mn(e)?{value:e}:ni(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=ri.cwd(),this.value,this.stored,this.result,this.map;let r,n=-1;for(;++n<ii.length;){const e=ii[n];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)ii.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){ni(e)&&(e=s.fileURLToPath(e)),si(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?j.default.dirname(this.path):void 0}set dirname(e){ci(this.basename,"dirname"),this.path=j.default.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?j.default.basename(this.path):void 0}set basename(e){si(e,"basename"),oi(e,"basename"),this.path=j.default.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?j.default.extname(this.path):void 0}set extname(e){if(oi(e,"extname"),ci(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=j.default.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?j.default.basename(this.path,this.extname):void 0}set stem(e){si(e,"stem"),oi(e,"stem"),this.path=j.default.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,r){const n=new ti(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=null,n}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}}function oi(e,t){if(e&&e.includes(j.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+j.default.sep+"`")}function si(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ci(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const li=function e(){const t=Kn(),r=[];let n,i={},a=-1;return o.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(di("data",n),i[e]=t,o):ui.call(i,e)&&i[e]||null;if(e)return di("data",n),i=e,o;return i},o.Parser=void 0,o.Compiler=void 0,o.freeze=function(){if(n)return o;for(;++a<r.length;){const[e,...n]=r[a];if(!1===n[0])continue;!0===n[0]&&(n[1]=void 0);const i=e.call(o,...n);"function"==typeof i&&t.use(i)}return n=!0,a=Number.POSITIVE_INFINITY,o},o.attachers=r,o.use=function(e,...t){let a;if(di("use",n),null==e);else if("function"==typeof e)u(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):c(e)}a&&(i.settings=Object.assign(i.settings||{},a));return o;function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;u(t,...r)}else c(e)}}function c(e){l(e.plugins),e.settings&&(a=Object.assign(a||{},e.settings))}function l(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function u(e,t){let n,i=-1;for(;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Wn(n[1])&&Wn(t)&&(t=Gn(!0,n[1],t)),n[1]=t):r.push([...arguments])}},o.parse=function(e){o.freeze();const t=vi(e),r=o.Parser;if(hi("parse",r),fi(r,"parse"))return new r(String(t),t).parse();return r(String(t),t)},o.stringify=function(e,t){o.freeze();const r=vi(t),n=o.Compiler;if(pi("stringify",n),mi(e),fi(n,"compile"))return new n(e,r).compile();return n(e,r)},o.run=function(e,r,n){mi(e),o.freeze(),n||"function"!=typeof r||(n=r,r=void 0);if(!n)return new Promise(i);function i(i,a){function o(t,r,o){r=r||e,t?a(t):i?i(r):n(null,r,o)}t.run(e,vi(r),o)}i(null,n)},o.runSync=function(e,t){let r,n;return o.run(e,t,i),gi("runSync","run",n),r;function i(e,t){qn(e),r=t,n=!0}},o.process=function(e,t){if(o.freeze(),hi("process",o.Parser),pi("process",o.Compiler),!t)return new Promise(r);function r(r,n){const i=vi(e);function a(e,i){e||!i?n(e):r?r(i):t(null,i)}o.run(o.parse(i),i,((e,t,r)=>{if(!e&&t&&r){const n=o.stringify(t,r);null==n||(!function(e){return"string"==typeof e||Mn(e)}(n)?r.result=n:r.value=n),a(e,r)}else a(e)}))}r(null,t)},o.processSync=function(e){let t;o.freeze(),hi("processSync",o.Parser),pi("processSync",o.Compiler);const r=vi(e);return o.process(r,n),gi("processSync","process",t),r;function n(e){t=!0,qn(e)}},o;function o(){const t=e();let n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data(Gn(!0,{},i)),t}}().freeze(),ui={}.hasOwnProperty;function fi(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(ui.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function hi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function pi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function di(e,t){if(t)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(!Wn(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function gi(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ai(e)}var yi=oe(Object.freeze({__proto__:null,unified:li}));function bi(e,t){var{includeImageAlt:r=!0}=t||{};return wi(e,r)}function wi(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&xi(e.children,t)||Array.isArray(e)&&xi(e,t))||""}function xi(e,t){for(var r=[],n=-1;++n<e.length;)r[n]=wi(e[n],t);return r.join("")}function ki(e,t,r,n){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),[].splice.apply(e,a);else for(r&&[].splice.apply(e,[t,r]);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function Ei(e,t){return e.length>0?(ki(e,e.length,0,t),e):t}const Si={}.hasOwnProperty;function Ci(e){const t={};let r=-1;for(;++r<e.length;)Pi(t,e[r]);return t}function Pi(e,t){let r;for(r in t){const n=(Si.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;for(a in i){Si.call(n,a)||(n[a]=[]);const e=i[a];Ai(n[a],Array.isArray(e)?e:e?[e]:[])}}}function Ai(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);ki(e,0,0,n)}function _i(e,t){let r;for(r in t){const n=(Si.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i)n[a]=i[a]}}const Fi=Bi(/[A-Za-z]/),Oi=Bi(/\d/),Ii=Bi(/[\dA-Fa-f]/),Di=Bi(/[\dA-Za-z]/),ji=Bi(/[!-/:-@[-`{-~]/),Ri=Bi(/[#-'*+\--9=?A-Z^-~]/);function Ti(e){return null!==e&&(e<32||127===e)}function Li(e){return null!==e&&(e<0||32===e)}function qi(e){return null!==e&&e<-2}function Mi(e){return-2===e||-1===e||32===e}const zi=Bi(/\s/),Ni=Bi(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\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\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\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]/);function Bi(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}var $i=Object.freeze({__proto__:null,asciiAlpha:Fi,asciiDigit:Oi,asciiHexDigit:Ii,asciiAlphanumeric:Di,asciiPunctuation:ji,asciiAtext:Ri,asciiControl:Ti,markdownLineEndingOrSpace:Li,markdownLineEnding:qi,markdownSpace:Mi,unicodeWhitespace:zi,unicodePunctuation:Ni});function Ui(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(n){if(Mi(n))return e.enter(r),o(n);return t(n)};function o(n){return Mi(n)&&a++<i?(e.consume(n),o):(e.exit(r),t(n))}}var Hi=Object.freeze({__proto__:null,factorySpace:Ui});const Vi={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ui(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):qi(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const Qi={tokenize:function(e){const t=this,r=[];let n,i,a,o=0;return s;function s(n){if(o<r.length){const i=r[o];return t.containerState=i[1],e.attempt(i[0].continuation,c,l)(n)}return l(n)}function c(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,a=r;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}v(o);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return ki(t.events,a+1,0,t.events.slice(r)),t.events.length=s,l(e)}return s(e)}function l(i){if(o===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct)}return t.containerState={},e.check(Gi,u,f)(i)}function u(e){return n&&y(),v(o),h(e)}function f(e){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(Gi,p,d)(r)}function p(e){return o++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):qi(r)?(e.consume(r),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<a&&(!n.events[e][1].end||n.events[e][1].end.offset>a))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(o),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;ki(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Gi={tokenize:function(e,t,r){return Ui(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Wi(e){return null===e||Li(e)||zi(e)?1:Ni(e)?2:void 0}function Ki(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Yi={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Wi(n);let a;return function(t){return e.enter("attentionSequence"),a=t,o(t)};function o(s){if(s===a)return e.consume(s),o;const c=e.exit("attentionSequence"),l=Wi(s),u=!l||2===l&&i||r.includes(s),f=!i||2===i&&l||r.includes(n);return c._open=Boolean(42===a?u:u&&(i||!f)),c._close=Boolean(42===a?f:f&&(l||!u)),t(s)}},resolveAll:function(e,t){let r,n,i,a,o,s,c,l,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(r=u;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[r][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[u][1].start);Ji(f,-s),Ji(h,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[u][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},a.start),e[u][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ei(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ei(c,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=Ei(c,Ki(t.parser.constructs.insideSpan.null,e.slice(r+1,u),t)),c=Ei(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[u][1].end.offset-e[u][1].start.offset?(l=2,c=Ei(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):l=0,ki(e,r-1,u-r+3,c),u=r+c.length-l-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function Ji(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Zi={name:"autolink",tokenize:function(e,t,r){let n=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Fi(t)?(e.consume(t),a):Ri(t)?c(t):r(t)}function a(e){return 43===e||45===e||46===e||Di(e)?o(e):c(e)}function o(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||Di(t))&&n++<32?(e.consume(t),o):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||Ti(t)?r(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),n=0,l):Ri(t)?(e.consume(t),c):r(t)}function l(e){return Di(e)?u(e):r(e)}function u(t){return 46===t?(e.consume(t),n=0,l):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):f(t)}function f(t){return(45===t||Di(t))&&n++<63?(e.consume(t),45===t?f:u):r(t)}function h(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};const Xi={tokenize:function(e,t,r){return Ui(e,(function(e){return null===e||qi(e)?t(e):r(e)}),"linePrefix")},partial:!0};const ea={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return Mi(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return Ui(e,e.attempt(ea,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};const ta={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return ji(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};var ra={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},na={}.hasOwnProperty;function ia(e){return!!na.call(ra,e)&&ra[e]}const aa={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Di,l(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Ii,l):(e.enter("characterReferenceValue"),i=7,a=Oi,l(t))}function l(s){let c;return 59===s&&o?(c=e.exit("characterReferenceValue"),a!==Di||ia(n.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):a(s)&&o++<i?(e.consume(s),l):r(s)}}};const oa={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let n=0;return Ui(e,i,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}function a(t){return t===c?(e.consume(t),n++,a):n<l?r(t):(e.exit("codeFencedFenceSequence"),Ui(e,o,"whitespace")(t))}function o(n){return null===n||qi(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},a={tokenize:function(e,t,r){const n=this;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a}function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},o=this.events[this.events.length-1],s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let c,l=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c=t,u(t)};function u(t){return t===c?(e.consume(t),l++,u):(e.exit("codeFencedFenceSequence"),l<3?r(t):Ui(e,f,"whitespace")(t))}function f(t){return null===t||qi(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Li(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ui(e,p,"whitespace")(t)):96===t&&t===c?r(t):(e.consume(t),h)}function p(t){return null===t||qi(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===c?r(t):(e.consume(t),d)}function m(r){return e.exit("codeFencedFence"),n.interrupt?t(r):g(r)}function g(t){return null===t?y(t):qi(t)?e.attempt(a,e.attempt(i,y,s?Ui(e,g,"linePrefix",s+1):g),y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||qi(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const sa={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Ui(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):r(e)}function a(t){return null===t?s(t):qi(t)?e.attempt(ca,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||qi(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(r){return e.exit("codeIndented"),t(r)}}},ca={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Ui(e,a,"linePrefix",5)(t)}function a(e){const a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):qi(e)?i(e):r(e)}},partial:!0};const la={name:"codeText",tokenize:function(e,t,r){let n,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),n=0,l(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||qi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function l(r){return 96===r?(e.consume(r),n++,l):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function ua(e){const t={};let r,n,i,a,o,s,c,l=-1;for(;++l<e.length;){for(;l in t;)l=t[l];if(r=e[l],l&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[l-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,fa(e,l)),l=t[l],c=!0);else if(r[1]._container){for(i=l,n=void 0;i--&&(a=e[i],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(n&&(e[n][1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),o=e.slice(n,l),o.unshift(r),ki(e,n,l-n+1,o))}}return!c}function fa(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,c=[],l={};let u,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);a.push(i),p._tokenizer||(u=n.sliceStream(p),p.next||u.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=a.pop();c.unshift([r,r+t.length-1]),ki(e,r,2,t)}for(h=-1;++h<c.length;)l[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return l}const ha={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):qi(t)?e.check(pa,a,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function a(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return ua(e),e}},pa={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,i,"linePrefix")};function i(i){if(null===i||qi(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function da(e,t,r,n,i,a,o,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f;if(null===t||41===t||Ti(t))return r(t);return e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(a),e.consume(r),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||qi(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return 40===i?++u>l?r(i):(e.consume(i),d):41===i?u--?(e.consume(i),d):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):null===i||Li(i)?u?r(i):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):Ti(i)?r(i):(e.consume(i),92===i?m:d)}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}var ma=Object.freeze({__proto__:null,factoryDestination:da});function ga(e,t,r,n,i,a){const o=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(a),l};function l(f){return null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs||c>999?r(f):93===f?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):qi(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(t){return null===t||91===t||93===t||qi(t)||c++>999?(e.exit("chunkString"),l(t)):(e.consume(t),s=s||!Mi(t),92===t?f:u)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}var va=Object.freeze({__proto__:null,factoryLabel:ga});function ya(e,t,r,n,i,a){let o;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s};function s(r){return r===o?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),c(r))}function c(t){return t===o?(e.exit(a),s(o)):null===t?r(t):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===o||null===t||qi(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:l)}function u(t){return t===o||92===t?(e.consume(t),l):l(t)}}var ba=Object.freeze({__proto__:null,factoryTitle:ya});function wa(e,t){let r;return function n(i){if(qi(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(Mi(i))return Ui(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}var xa=Object.freeze({__proto__:null,factoryWhitespace:wa});function ka(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ea=Object.freeze({__proto__:null,normalizeIdentifier:ka});const Sa={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),ga.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function a(t){return i=ka(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),wa(e,da(e,e.attempt(Ca,Ui(e,o,"whitespace"),Ui(e,o,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function o(a){return null===a||qi(a)?(e.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),t(a)):r(a)}}},Ca={tokenize:function(e,t,r){return function(t){return Li(t)?wa(e,n)(t):r(t)};function n(t){return 34===t||39===t||40===t?ya(e,Ui(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||qi(e)?t(e):r(e)}},partial:!0};const Pa={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return qi(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}};const Aa={name:"headingAtx",tokenize:function(e,t,r){const n=this;let i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(t)};function a(s){return 35===s&&i++<6?(e.consume(s),a):null===s||Li(s)?(e.exit("atxHeadingSequence"),n.interrupt?t(s):o(s)):r(s)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||qi(r)?(e.exit("atxHeading"),t(r)):Mi(r)?Ui(e,o,"whitespace")(r):(e.enter("atxHeadingText"),c(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function c(t){return null===t||35===t||Li(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),c)}},resolve:function(e,t){let r,n,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},n={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},ki(e,a,i-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const _a=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fa=["pre","script","style","textarea"],Oa={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,a,o,s,c;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l};function l(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),p):63===s?(e.consume(s),i=3,n.interrupt?t:R):Fi(s)?(e.consume(s),o=String.fromCharCode(s),a=!0,d):r(s)}function u(a){return 45===a?(e.consume(a),i=2,f):91===a?(e.consume(a),i=5,o="CDATA[",s=0,h):Fi(a)?(e.consume(a),i=4,n.interrupt?t:R):r(a)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:R):r(i)}function h(i){return i===o.charCodeAt(s++)?(e.consume(i),s===o.length?n.interrupt?t:P:h):r(i)}function p(t){return Fi(t)?(e.consume(t),o=String.fromCharCode(t),d):r(t)}function d(s){return null===s||47===s||62===s||Li(s)?47!==s&&a&&Fa.includes(o.toLowerCase())?(i=1,n.interrupt?t(s):P(s)):_a.includes(o.toLowerCase())?(i=6,47===s?(e.consume(s),m):n.interrupt?t(s):P(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):a?v(s):g(s)):45===s||Di(s)?(e.consume(s),o+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:P):r(i)}function g(t){return Mi(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||Fi(t)?(e.consume(t),y):Mi(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||Di(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):Mi(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):Mi(t)?(e.consume(t),w):(c=null,k(t))}function x(t){return null===t||qi(t)?r(t):t===c?(e.consume(t),E):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Li(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||Mi(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),C):r(t)}function C(t){return Mi(t)?(e.consume(t),C):null===t||qi(t)?P(t):r(t)}function P(t){return 45===t&&2===i?(e.consume(t),O):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),T):63===t&&3===i?(e.consume(t),R):93===t&&5===i?(e.consume(t),j):!qi(t)||6!==i&&7!==i?null===t||qi(t)?A(t):(e.consume(t),P):e.check(Ia,T,A)(t)}function A(t){return e.exit("htmlFlowData"),_(t)}function _(t){return null===t?L(t):qi(t)?e.attempt({tokenize:F,partial:!0},_,L)(t):(e.enter("htmlFlowData"),P(t))}function F(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}function O(t){return 45===t?(e.consume(t),R):P(t)}function I(t){return 47===t?(e.consume(t),o="",D):P(t)}function D(t){return 62===t&&Fa.includes(o.toLowerCase())?(e.consume(t),T):Fi(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):P(t)}function j(t){return 93===t?(e.consume(t),R):P(t)}function R(t){return 62===t?(e.consume(t),T):P(t)}function T(t){return null===t||qi(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),T)}function L(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},Ia={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(Xi,t,r)}},partial:!0};const Da={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,a,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),c};function c(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),w):Fi(t)?(e.consume(t),C):r(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),a="CDATA[",o=0,m):Fi(t)?(e.consume(t),b):r(t)}function u(t){return 45===t?(e.consume(t),f):r(t)}function f(t){return null===t||62===t?r(t):45===t?(e.consume(t),h):p(t)}function h(e){return null===e||62===e?r(e):p(e)}function p(t){return null===t?r(t):45===t?(e.consume(t),d):qi(t)?(s=p,j(t)):(e.consume(t),p)}function d(t){return 45===t?(e.consume(t),T):p(t)}function m(t){return t===a.charCodeAt(o++)?(e.consume(t),o===a.length?g:m):r(t)}function g(t){return null===t?r(t):93===t?(e.consume(t),v):qi(t)?(s=g,j(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),y):g(t)}function y(t){return 62===t?T(t):93===t?(e.consume(t),y):g(t)}function b(t){return null===t||62===t?T(t):qi(t)?(s=b,j(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),x):qi(t)?(s=w,j(t)):(e.consume(t),w)}function x(e){return 62===e?T(e):w(e)}function k(t){return Fi(t)?(e.consume(t),E):r(t)}function E(t){return 45===t||Di(t)?(e.consume(t),E):S(t)}function S(t){return qi(t)?(s=S,j(t)):Mi(t)?(e.consume(t),S):T(t)}function C(t){return 45===t||Di(t)?(e.consume(t),C):47===t||62===t||Li(t)?P(t):r(t)}function P(t){return 47===t?(e.consume(t),T):58===t||95===t||Fi(t)?(e.consume(t),A):qi(t)?(s=P,j(t)):Mi(t)?(e.consume(t),P):T(t)}function A(t){return 45===t||46===t||58===t||95===t||Di(t)?(e.consume(t),A):_(t)}function _(t){return 61===t?(e.consume(t),F):qi(t)?(s=_,j(t)):Mi(t)?(e.consume(t),_):P(t)}function F(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,O):qi(t)?(s=F,j(t)):Mi(t)?(e.consume(t),F):(e.consume(t),i=void 0,D)}function O(t){return t===i?(e.consume(t),I):null===t?r(t):qi(t)?(s=O,j(t)):(e.consume(t),O)}function I(e){return 62===e||47===e||Li(e)?P(e):r(e)}function D(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||Li(t)?P(t):(e.consume(t),D)}function j(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,R,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function R(t){return e.enter("htmlTextData"),s(t)}function T(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};const ja={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if(("labelImage"===n.events[o][1].type||"labelLink"===n.events[o][1].type)&&!n.events[o][1]._balanced){i=n.events[o][1];break}return function(t){if(!i)return r(t);return i._inactive?c(t):(a=n.parser.defined.includes(ka(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(r){return 40===r?e.attempt(Ra,t,a?t:c)(r):91===r?e.attempt(Ta,t,a?e.attempt(La,t,c):c)(r):a?t(r):c(r)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,a,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=o);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return a=[["enter",c,t],["enter",l,t]],a=Ei(a,e.slice(n+1,n+s+3)),a=Ei(a,[["enter",u,t]]),a=Ei(a,Ki(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),a=Ei(a,[["exit",u,t],e[i-2],e[i-1],["exit",l,t]]),a=Ei(a,e.slice(i+1)),a=Ei(a,[["exit",c,t]]),ki(e,n,e.length,a),e},resolveAll:function(e){let t,r=-1;for(;++r<e.length;)t=e[r][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}},Ra={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),wa(e,n)};function n(t){return 41===t?o(t):da(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return Li(t)?wa(e,a)(t):o(t)}function a(t){return 34===t||39===t||40===t?ya(e,wa(e,o),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):o(t)}function o(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Ta={tokenize:function(e,t,r){const n=this;return function(t){return ga.call(n,e,i,r,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(ka(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}}},La={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const qa={name:"labelStartImage",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):r(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:ja.resolveAll};const Ma={name:"labelStartLink",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:ja.resolveAll};const za={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ui(e,t,"linePrefix")}}};const Na={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),n=t,a(t)};function a(s){return s===n?(e.enter("thematicBreakSequence"),o(s)):Mi(s)?Ui(e,a,"whitespace")(s):i<3||null!==s&&!qi(s)?r(s):(e.exit("thematicBreak"),t(s))}function o(t){return t===n?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),a(t))}}};const Ba={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:Oi(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Na,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return Oi(t)&&++o<10?(e.consume(t),s):(!n.interrupt||o<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(Xi,n.interrupt?r:l,e.attempt($a,f,u))}function l(e){return n.containerState.initialBlankLine=!0,a++,f(e)}function u(t){return Mi(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Xi,i,a);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ui(e,t,"listItemIndent",n.containerState.size+1)(r)}function a(r){return n.containerState.furtherBlankLines||!Mi(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Ua,t,o)(r))}function o(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ui(e,e.attempt(Ba,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},$a={tokenize:function(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return!Mi(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Ua={tokenize:function(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const Ha={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if("lineEnding"!==n.events[o][1].type&&"linePrefix"!==n.events[o][1].type&&"content"!==n.events[o][1].type){a="paragraph"===n.events[o][1].type;break}return function(t){if(!n.parser.lazy[n.now().line]&&(n.interrupt||a))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,s(t);return r(t)};function s(t){return t===i?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Ui(e,c,"lineSuffix")(t))}function c(n){return null===n||qi(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(n=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=o;return e.push(["exit",o,t]),e}};var Va=Object.freeze({__proto__:null,attention:Yi,autolink:Zi,blankLine:Xi,blockQuote:ea,characterEscape:ta,characterReference:aa,codeFenced:oa,codeIndented:sa,codeText:la,content:ha,definition:Sa,hardBreakEscape:Pa,headingAtx:Aa,htmlFlow:Oa,htmlText:Da,labelEnd:ja,labelStartImage:qa,labelStartLink:Ma,lineEnding:za,list:Ba,setextUnderline:Ha,thematicBreak:Na});const Qa={tokenize:function(e){const t=this,r=e.attempt(Xi,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Ui(e,e.attempt(this.parser.constructs.flow,n,e.attempt(ha,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Ga={resolveAll:Ja()},Wa=Ya("string"),Ka=Ya("text");function Ya(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:Ja("text"===e?Za:void 0)}}function Ja(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function Za(e,t){let r=-1;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let a,o=i.length,s=-1,c=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)a=!0,c++;else if(-1!==e){o++;break}}if(c){const i={type:r===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+o,_bufferIndex:o?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function Xa(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const c={consume:function(e){qi(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++));l.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),l.events.push(["enter",r,l]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),l.events.push(["exit",t,l]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,n.push(o)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(o=Ei(o,e),p(),null!==o[o.length-1])return[];return v(t,0),l.events=Ki(a,l.events,l),l.events}};let u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;r===i?o=[e[r].slice(n,a)]:(o=e.slice(r,i),n>-1&&(o[0]=o[0].slice(n)),a>0&&o.push(e[i].slice(0,a)));return o}(o,e)}function h(){return Object.assign({},n)}function p(){let e;for(;n._index<o.length;){const t=o[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,a){let o,u,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return o=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(r){p=function(){const e=h(),t=l.previous,r=l.currentConstruct,i=l.events.length,a=Array.from(s);return{restore:o,from:i};function o(){n=e,l.previous=t,l.currentConstruct=r,l.events.length=i,s=a,y()}}(),f=e,e.partial||(l.currentConstruct=e);if(e.name&&l.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++u<o.length?m(o[u]):a}}}function v(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ki(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const eo={42:Ba,43:Ba,45:Ba,48:Ba,49:Ba,50:Ba,51:Ba,52:Ba,53:Ba,54:Ba,55:Ba,56:Ba,57:Ba,62:ea},to={91:Sa},ro={[-2]:sa,[-1]:sa,32:sa},no={35:Aa,42:Na,45:[Ha,Na],60:Oa,61:Ha,95:Na,96:oa,126:oa},io={38:aa,92:ta},ao={[-5]:za,[-4]:za,[-3]:za,33:qa,38:aa,42:Yi,60:[Zi,Da],91:Ma,92:[Pa,ta],93:ja,95:Yi,96:la},oo={null:[Yi,Ga]};var so=Object.freeze({__proto__:null,document:eo,contentInitial:to,flowInitial:ro,flow:no,string:io,text:ao,insideSpan:oo,attentionMarkers:{null:[42,95]},disable:{null:[]}});const co=/[\0\t\n\r]/g;const lo={}.hasOwnProperty,uo=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e={}){const t=fo({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ne),autolinkProtocol:_,autolinkEmail:_,atxHeading:c(X),blockQuote:c(W),characterEscape:_,characterReference:_,codeFenced:c(K),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:c(K,l),codeText:c(Y,l),codeTextData:_,data:_,codeFlowValue:_,definition:c(J),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:c(Z),hardBreakEscape:c(ee),hardBreakTrailing:c(ee),htmlFlow:c(te,l),htmlFlowData:_,htmlText:c(te,l),htmlTextData:_,image:c(re),label:l,link:c(ne),listItem:c(ae),listItemValue:m,listOrdered:c(ie,d),listUnordered:c(ie),paragraph:c(oe),reference:$,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:c(X),strong:c(se),thematicBreak:c(le)},exit:{atxHeading:f(),atxHeadingSequence:S,autolink:f(),autolinkEmail:G,autolinkProtocol:Q,blockQuote:f(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:V,codeFenced:f(b),codeFencedFence:y,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:F,codeIndented:f(w),codeText:f(R),codeTextData:F,data:F,definition:f(),definitionDestinationString:E,definitionLabelString:x,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(I),hardBreakTrailing:f(I),htmlFlow:f(D),htmlFlowData:F,htmlText:f(j),htmlTextData:F,image:f(L),label:M,labelText:q,lineEnding:O,link:f(T),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:U,resourceDestinationString:z,resourceTitleString:N,resource:B,setextHeading:f(A),setextHeadingLineSequence:P,setextHeadingText:C,strong:f(),thematicBreak:f()}},e.mdastExtensions||[]),r={};return n;function n(e){let r={type:"root",children:[]};const n=[],c=[],f={stack:[r],tokenStack:n,config:t,enter:u,exit:h,buffer:l,resume:p,setData:a,getData:o};let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])c.push(d);else{d=i(e,c.pop(),d)}for(d=-1;++d<e.length;){const r=t[e[d][0]];lo.call(r,e[d][1].type)&&r[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},f),e[d][1])}if(n.length>0)throw new Error("Cannot close document, a token (`"+n[n.length-1].type+"`, "+Jn({start:n[n.length-1].start,end:n[n.length-1].end})+") is still open");for(r.position={start:s(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:s(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,r){let n,i,a,o,s=t-1,c=-1,l=!1;for(;++s<=r;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,o=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||o||c||a||(a=s),o=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(o=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(s,0,["enter",n,t[2]]),s++,r++,a=void 0,o=!0)}}return e[t][1]._spread=l,r}function a(e,t){r[e]=t}function o(e){return r[e]}function s(e){return{line:e.line,column:e.column,offset:e.offset}}function c(e,t){return r;function r(r){u.call(this,e(r),r),t&&t.call(this,r)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:s(t.start)},e}function f(e){return t;function t(t){e&&e.call(this,t),h.call(this,t)}}function h(e){const t=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Jn({start:e.start,end:e.end})+"): it’s not open");if(r.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+Jn({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Jn({start:r.start,end:r.end})+") is open");return t.position.end=s(e.end),t}function p(){return bi(this.stack.pop())}function d(){a("expectingFirstListItemValue",!0)}function m(e){o("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue"))}function g(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function v(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function y(){o("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function w(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function x(e){const t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=ka(this.sliceSerialize(e)).toLowerCase()}function k(){const e=this.resume();this.stack[this.stack.length-1].title=e}function E(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)}function C(){a("setextHeadingSlurpLineEnding",!0)}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function A(){a("setextHeadingSlurpLineEnding")}function _(e){const t=this.stack[this.stack.length-1];let r=t.children[t.children.length-1];r&&"text"===r.type||(r=ce(),r.position={start:s(e.start)},t.children.push(r)),this.stack.push(r)}function F(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=s(e.end)}function O(e){const r=this.stack[this.stack.length-1];if(o("atHardBreak")){return r.children[r.children.length-1].position.end=s(e.end),void a("atHardBreak")}!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(r.type)&&(_.call(this,e),F.call(this,e))}function I(){a("atHardBreak",!0)}function D(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),a("referenceType")}function L(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),a("referenceType")}function q(e){this.stack[this.stack.length-2].identifier=ka(this.sliceSerialize(e)).toLowerCase()}function M(){const e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,a("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function z(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function B(){a("inReference")}function $(){a("referenceType","collapsed")}function U(e){const t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=ka(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")}function H(e){a("characterReferenceType",e.type)}function V(e){const t=this.sliceSerialize(e),r=o("characterReferenceType");let n;r?(n=function(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCharCode(r)}(t,"characterReferenceMarkerNumeric"===r?10:16),a("characterReferenceType")):n=ia(t);const i=this.stack.pop();i.value+=n,i.position.end=s(e.end)}function Q(e){F.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){F.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Z(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:void 0,children:[]}}function ee(){return{type:"break"}}function te(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function ie(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ae(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function ce(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(r)(function(e){for(;!ua(e););return e}(function(e={}){const t={defined:[],lazy:{},constructs:Ci([so].concat(e.extensions||[])),content:r(Vi),document:r(Qi),flow:r(Qa),string:r(Wa),text:r(Ka)};return t;function r(e){return function(r){return Xa(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,a,o){const s=[];let c,l,u,f,h;for(i=r+i.toString(a),u=0,r="",n&&(65279===i.charCodeAt(0)&&u++,n=void 0);u<i.length;){if(co.lastIndex=u,c=co.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(u);break}if(10===h&&u===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<f&&(s.push(i.slice(u,f)),t+=f-u),h){case 0:s.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),s.push(-2);t++<l;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=f+1}return o&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))};function fo(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?fo(e,n):ho(e,n)}return e}function ho(e,t){let r;for(r in t)if(lo.call(t,r)){const n="canContainEols"===r||"transforms"===r,i=(lo.call(e,r)?e[r]:void 0)||(e[r]=n?[]:{}),a=t[r];a&&(n?e[r]=[...i,...a]:Object.assign(i,a))}}var po=oe(Object.freeze({__proto__:null,default:function(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return uo(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}}));const mo={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),i):r(t)}function i(t){return 87===t||119===t?(e.consume(t),a):r(t)}function a(t){return 46===t?(e.consume(t),o):r(t)}function o(e){return null===e||qi(e)?r(e):t(e)}},partial:!0},go={tokenize:function(e,t,r){let n,i;return a;function a(t){return 38===t?e.check(bo,s,o)(t):46===t||95===t?e.check(yo,s,o)(t):null===t||Ti(t)||zi(t)||45!==t&&Ni(t)?s(t):(e.consume(t),a)}function o(t){return 46===t?(i=n,n=void 0,e.consume(t),a):(95===t&&(n=!0),e.consume(t),a)}function s(e){return i||n?r(e):t(e)}},partial:!0},vo={tokenize:function(e,t){let r=0;return n;function n(o){return 38===o?e.check(bo,t,i)(o):(40===o&&r++,41===o?e.check(yo,a,i)(o):Ao(o)?t(o):Po(o)?e.check(yo,t,i)(o):(e.consume(o),n))}function i(t){return e.consume(t),n}function a(e){return r--,r<0?t(e):i(e)}},partial:!0},yo={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(i){return Po(i)?(e.consume(i),n):Ao(i)?t(i):r(i)}},partial:!0},bo={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return Fi(t)?(e.consume(t),n):59===t?(e.consume(t),i):r(t)}function i(e){return Ao(e)?t(e):r(e)}},partial:!0},wo={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!Fo(n.previous)||Do(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mo,e.attempt(go,e.attempt(vo,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:Fo},xo={tokenize:function(e,t,r){const n=this;return function(t){if(72!==t&&104!==t||!Oo(n.previous)||Do(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i};function i(t){return 84===t||116===t?(e.consume(t),a):r(t)}function a(t){return 84===t||116===t?(e.consume(t),o):r(t)}function o(t){return 80===t||112===t?(e.consume(t),s):r(t)}function s(t){return 83===t||115===t?(e.consume(t),c):c(t)}function c(t){return 58===t?(e.consume(t),l):r(t)}function l(t){return 47===t?(e.consume(t),u):r(t)}function u(t){return 47===t?(e.consume(t),f):r(t)}function f(t){return null===t||Ti(t)||zi(t)||Ni(t)?r(t):e.attempt(go,e.attempt(vo,h),r)(t)}function h(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:Oo},ko={tokenize:function(e,t,r){const n=this;let i,a;return function(t){if(!_o(t)||!Io(n.previous)||Do(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return _o(t)?(e.consume(t),o):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(yo,f,c)(t):45===t||95===t?e.check(yo,r,l)(t):Di(t)?(!a&&Oi(t)&&(a=!0),e.consume(t),s):f(t)}function c(t){return e.consume(t),i=!0,a=void 0,s}function l(t){return e.consume(t),u}function u(t){return 46===t?e.check(yo,r,c)(t):s(t)}function f(n){return i&&!a?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:Io},Eo={},So={text:Eo};let Co=48;for(;Co<123;)Eo[Co]=ko,Co++,58===Co?Co=65:91===Co&&(Co=97);function Po(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Ao(e){return null===e||60===e||Li(e)}function _o(e){return 43===e||45===e||46===e||95===e||Di(e)}function Fo(e){return null===e||40===e||42===e||95===e||126===e||Li(e)}function Oo(e){return null===e||!Fi(e)}function Io(e){return 47!==e&&Oo(e)}function Do(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Eo[43]=ko,Eo[45]=ko,Eo[46]=ko,Eo[95]=ko,Eo[72]=[ko,xo],Eo[104]=[ko,xo],Eo[87]=[ko,wo],Eo[119]=[ko,wo];const jo={'"':"quot","&":"amp","<":"lt",">":"gt"};function Ro(e,t){const r=function(e){return e.replace(/["&<>]/g,(function(e){return"&"+jo[e]+";"}))}(function(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(37===a&&Di(e.charCodeAt(r+1))&&Di(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(r+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}(e||""));if(!t)return r;const n=r.indexOf(":"),i=r.indexOf("?"),a=r.indexOf("#"),o=r.indexOf("/");return n<0||o>-1&&n>o||i>-1&&n>i||a>-1&&n>a||t.test(r.slice(0,n))?r:""}const To={exit:{literalAutolinkEmail:function(e){Lo.call(this,e,"mailto:")},literalAutolinkHttp:function(e){Lo.call(this,e)},literalAutolinkWww:function(e){Lo.call(this,e,"http://")}}};function Lo(e,t){const r=this.sliceSerialize(e);this.tag('<a href="'+Ro((t||"")+r)+'">'),this.raw(this.encode(r)),this.tag("</a>")}const qo={enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}};function Mo(e={}){let t=e.singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,a=this.events;let o=0;return function(t){if(126!==t||126===i&&"characterEscape"!==a[a.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const c=Wi(i);if(126===a)return o>1?n(a):(e.consume(a),o++,s);if(o<2&&!t)return n(a);const l=e.exit("strikethroughSequenceTemporary"),u=Wi(a);return l._open=!u||2===u&&Boolean(c),l._close=!c||2===c&&Boolean(u),r(a)}},resolveAll:function(e,t){let r,n,i,a,o=-1;for(;++o<e.length;)if("enter"===e[o][0]&&"strikethroughSequenceTemporary"===e[o][1].type&&e[o][1]._close)for(i=o;i--;)if("exit"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._open&&e[o][1].end.offset-e[o][1].start.offset==e[i][1].end.offset-e[i][1].start.offset){e[o][1].type="strikethroughSequence",e[i][1].type="strikethroughSequence",r={type:"strikethrough",start:Object.assign({},e[i][1].start),end:Object.assign({},e[o][1].end)},n={type:"strikethroughText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[o][1].start)},a=[["enter",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["enter",n,t]],ki(a,a.length,0,Ki(t.parser.constructs.insideSpan.null,e.slice(i+1,o),t)),ki(a,a.length,0,[["exit",n,t],["enter",e[o][1],t],["exit",e[o][1],t],["exit",r,t]]),ki(e,i-1,o-i+3,a),o=i+a.length-2;break}o=-1;for(;++o<e.length;)"strikethroughSequenceTemporary"===e[o][1].type&&(e[o][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}const zo={null:"",left:' align="left"',right:' align="right"',center:' align="center"'},No={enter:{table(e){this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",e._align)},tableBody(){this.setData("slurpOneLineEnding"),this.tag("<tbody>")},tableData(){const e=zo[this.getData("tableAlign")[this.getData("tableColumn")]];void 0===e?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+e+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){this.lineEndingIfNeeded(),this.tag("<th"+zo[this.getData("tableAlign")[this.getData("tableColumn")]]+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(e){let t=this.sliceSerialize(e);this.getData("tableAlign")&&(t=t.replace(/\\([\\|])/g,Bo)),this.raw(this.encode(t))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){const e=this.getData("tableColumn");e in this.getData("tableAlign")?(this.tag("</td>"),this.setData("tableColumn",e+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>"),this.setData("slurpOneLineEnding",!0)},tableHeader(){this.tag("</th>"),this.setData("tableColumn",this.getData("tableColumn")+1)},tableRow(){const e=this.getData("tableAlign");let t=this.getData("tableColumn");for(;t<e.length;)this.lineEndingIfNeeded(),this.tag("<td"+zo[e[t]]+"></td>"),t++;this.setData("tableColumn",t),this.lineEndingIfNeeded(),this.tag("</tr>")}}};function Bo(e,t){return"|"===t?t:e}const $o={flow:{null:{tokenize:function(e,t,r){const n=this,i=[];let a,o,s=0;return function(t){if(e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),124===t)return c(t);return s++,e.enter("temporaryTableCellContent"),f(t)};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l}function l(t){return null===t||qi(t)?function(t){if(null===t)return r(t);return e.exit("tableRow"),e.exit("tableHead"),e.attempt({tokenize:O,partial:!0},p,r)(t)}(t):Mi(t)?(e.enter("whitespace"),e.consume(t),u):(a&&(a=void 0,s++),124===t?c(t):(e.enter("temporaryTableCellContent"),f(t)))}function u(t){return Mi(t)?(e.consume(t),u):(e.exit("whitespace"),l(t))}function f(t){return null===t||124===t||Li(t)?(e.exit("temporaryTableCellContent"),l(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function p(t){return e.check(Uo,r,Ui(e,d,"linePrefix",4))(t)}function d(t){return null===t||Li(t)?r(t):(e.enter("tableDelimiterRow"),m(t))}function m(t){return null===t||qi(t)?w(t):Mi(t)?(e.enter("whitespace"),e.consume(t),g):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,i.push(null),v):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i.push("left"),y):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):r(t)}function g(t){return Mi(t)?(e.consume(t),g):(e.exit("whitespace"),m(t))}function v(t){return 45===t?(e.consume(t),v):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i[i.length-1]="left"===i[i.length-1]?"center":"right",b):m(t))}function y(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,v):r(t)}function b(t){return null===t||qi(t)?w(t):Mi(t)?(e.enter("whitespace"),e.consume(t),g):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):r(t)}function w(t){return e.exit("tableDelimiterRow"),o&&s===i.length?null===t?x(t):e.check(Ho,x,e.attempt({tokenize:O,partial:!0},Ui(e,k,"linePrefix",4),x))(t):r(t)}function x(r){return e.exit("table"),t(r)}function k(t){return e.enter("tableBody"),E(t)}function E(t){return e.enter("tableRow"),124===t?S(t):(e.enter("temporaryTableCellContent"),A(t))}function S(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),C}function C(t){return null===t||qi(t)?function(t){if(e.exit("tableRow"),null===t)return F(t);return e.check(Ho,F,e.attempt({tokenize:O,partial:!0},Ui(e,E,"linePrefix",4),F))(t)}(t):Mi(t)?(e.enter("whitespace"),e.consume(t),P):124===t?S(t):(e.enter("temporaryTableCellContent"),A(t))}function P(t){return Mi(t)?(e.consume(t),P):(e.exit("whitespace"),C(t))}function A(t){return null===t||124===t||Li(t)?(e.exit("temporaryTableCellContent"),C(t)):(e.consume(t),92===t?_:A)}function _(t){return 92===t||124===t?(e.consume(t),A):A(t)}function F(t){return e.exit("tableBody"),x(t)}function O(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},resolve:function(e,t){let r,n,i,a,o,s,c,l,u,f,h=-1;for(;++h<e.length;)r=e[h][1],a&&("temporaryTableCellContent"===r.type&&(l=l||h,u=h),"tableCellDivider"!==r.type&&"tableRow"!==r.type||!u||(s={type:"tableContent",start:e[l][1].start,end:e[u][1].end},c={type:"chunkText",start:s.start,end:s.end,contentType:"text"},e.splice(l,u-l+1,["enter",s,t],["enter",c,t],["exit",c,t],["exit",s,t]),h-=u-l-3,l=void 0,u=void 0)),"exit"===e[h][0]&&f&&f+1<h&&("tableCellDivider"===r.type||"tableRow"===r.type&&(f+3<h||"whitespace"!==e[f][1].type))&&(o={type:i?"tableDelimiter":n?"tableHeader":"tableData",start:e[f][1].start,end:e[h][1].end},e.splice(h+("tableCellDivider"===r.type?1:0),0,["exit",o,t]),e.splice(f,0,["enter",o,t]),h+=2,f=h+1),"tableRow"===r.type&&(a="enter"===e[h][0],a&&(f=h+1)),"tableDelimiterRow"===r.type&&(i="enter"===e[h][0],i&&(f=h+1)),"tableHead"===r.type&&(n="enter"===e[h][0]);return e}}}},Uo={tokenize:function(e,t,r){return function(t){if(45!==t)return r(t);return e.enter("setextUnderline"),n(t)};function n(t){return 45===t?(e.consume(t),n):i(t)}function i(n){return null===n||qi(n)?t(n):Mi(n)?(e.consume(n),i):r(n)}},partial:!0},Ho={tokenize:function(e,t,r){let n=0;return function(t){return e.enter("check"),e.consume(t),i};function i(a){return-1===a||32===a?(e.consume(a),n++,4===n?t:i):null===a||Li(a)?t(a):r(a)}},partial:!0};const Vo=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,Qo=new RegExp("^"+Vo.source,"i");function Go(e,t){let r=this.sliceSerialize(e);this.options.allowDangerousHtml&&(r=r.replace(t,"<$1$2")),this.raw(this.encode(r))}const Wo={text:{91:{tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Mi(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):r(t)}function a(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:Ko},t,r)):r(n)}}}}};function Ko(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return i&&"whitespace"===i[1].type&&null!==e&&!Li(e)?t(e):r(e)}),"whitespace")}function Yo(e,t){var r,n=String(e),i=0;if("string"!=typeof t)throw new Error("Expected character");for(r=n.indexOf(t);-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}function Jo(e){return"[33m"+e+"[39m"}!function(e){const t={};let r=-1;for(;++r<e.length;)_i(t,e[r])}([To,qo,No,{exit:{htmlFlowData(e){Go.call(this,e,Vo)},htmlTextData(e){Go.call(this,e,Qo)}}},{enter:{taskListCheck(){this.tag("<input ")}},exit:{taskListCheck(){this.tag('disabled="" type="checkbox">')},taskListCheckValueChecked(){this.tag('checked="" ')}}}]);const Zo=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);var i=Wr(t),a=n?-1:1;!function e(o,s,c){var l,u="object"==typeof o&&null!==o?o:{};"string"==typeof u.type&&(l="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(f,"name",{value:"node ("+Jo(u.type+(l?"<"+l+">":""))+")"}));return f;function f(){var l,u,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&false===(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)))[0])return h;if(o.children&&"skip"!==h[0])for(u=(n?o.children.length:-1)+a,f=c.concat(o);u>-1&&u<o.children.length;){if(false===(l=e(o.children[u],u,f)())[0])return l;u="number"==typeof l[1]?l[1]:u+a}return h}}(e,null,[])()};const Xo={}.hasOwnProperty,es=function(e,t,r,n){let i,a;"string"==typeof t||t instanceof RegExp?(a=[[t,r]],i=n):(a=t,i=r),i||(i={});const o=Wr(i.ignore||[]),s=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([ts(e[r][0]),rs(e[r][1])])}else{let r;for(r in e)Xo.call(e,r)&&t.push([ts(r),rs(e[r])])}return t}(a);let c=-1;for(;++c<s.length;)Zo(e,"text",l);return e;function l(e,t){let r,n=-1;for(;++n<t.length;){const e=t[n];if(o(e,r?r.children.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=s[c][0],n=s[c][1];let i,a=0,o=t.children.indexOf(e),l=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){i=u.index;let t=n(...u,{index:u.index,input:u.input});if("string"==typeof t&&(t=t.length>0?{type:"text",value:t}:void 0),!1!==t&&(a!==i&&l.push({type:"text",value:e.value.slice(a,i)}),Array.isArray(t)?l.push(...t):t&&l.push(t),a=i+u[0].length),!r.global)break;u=r.exec(e.value)}void 0===i?(l=[e],o--):(a<e.value.length&&l.push({type:"text",value:e.value.slice(a)}),t.children.splice(o,1,...l));return o+l.length+1}(e,r)}};function ts(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function rs(e){return"function"==typeof e?e:()=>e}const ns=["autolink","link","image","label"],is={transforms:[function(e){es(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ss],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,cs]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:os,literalAutolinkHttp:os,literalAutolinkWww:os},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},as={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:ns},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:ns},{character:":",before:"[ps]",after:"\\/",inConstruct:"phrasing",notInConstruct:ns}]};function os(e){this.config.enter.autolinkProtocol.call(this,e)}function ss(e,t,r,n,i){let a="";if(!ls(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);let r,n,i,a;if(t)for(e=e.slice(0,t.index),a=t[0],r=a.indexOf(")"),n=Yo(e,"("),i=Yo(e,")");-1!==r&&n>i;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),i++;return[e,a]}(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function cs(e,t,r,n){return!(!ls(n,!0)||/[_-]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function ls(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||zi(r)||Ni(r))&&(!t||47!==r)}function us(e,t,r){const n=t.indexStack,i=e.children||[],a=[];let o=-1,s=r.before;for(n.push(-1);++o<i.length;){const c=i[o];let l;if(n[n.length-1]=o,o+1<i.length){let r=t.handle.handlers[i[o+1].type];r&&r.peek&&(r=r.peek),l=r?r(i[o+1],e,t,{before:"",after:""}).charAt(0):""}else l=r.after;a.length>0&&("\r"===s||"\n"===s)&&"html"===c.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" "),a.push(t.handle(c,e,t,{before:s,after:l})),s=a[a.length-1].slice(-1)}return n.pop(),a.join("")}const fs={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},hs={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:ps}};function ps(e,t,r){const n=r.enter("emphasis"),i=us(e,r,{before:"~",after:"~"});return n(),"~~"+i+"~~"}function ds(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function ms(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const e=r.unsafe[a],t=ds(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function gs(e){return null==e?"":String(e)}function vs(e){return e.length}function ys(e){const t="string"==typeof e?e.charCodeAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}ps.peek=function(){return"~"},ms.peek=function(){return"`"};function bs(e){this.exit(e)}function ws(e){this.enter({type:"tableCell",children:[]},e)}function xs(e,t){return"|"===t?t:e}function ks(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r){return s(function(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("table");for(;++n<r.length;)i[n]=c(r[n],t);return a(),i}(e,r),e.align)},tableRow:function(e,t,r){const n=s([c(e,r)]);return n.slice(0,n.indexOf("\n"))},tableCell:o,inlineCode:function(e,t,r){let n=ms(e,0,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n}}};function o(e,t,r){const n=r.enter("tableCell"),i=r.enter("phrasing"),o=us(e,r,{before:a,after:a});return i(),n(),o}function s(e,t){return function(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||vs,a=[];let o=-1;const s=[],c=[],l=[];let u,f,h,p,d,m,g,v,y,b=0;for(;++o<e.length;){for(u=-1,f=[],h=[],e[o].length>b&&(b=e[o].length);++u<e[o].length;)d=gs(e[o][u]),!1!==r.alignDelimiters&&(p=i(d),h[u]=p,(void 0===l[u]||p>l[u])&&(l[u]=p)),f.push(d);s[o]=f,c[o]=h}if(u=-1,"object"==typeof n&&"length"in n)for(;++u<b;)a[u]=ys(n[u]);else for(y=ys(n);++u<b;)a[u]=y;for(u=-1,f=[],h=[];++u<b;)y=a[u],g="",v="",99===y?(g=":",v=":"):108===y?g=":":114===y&&(v=":"),p=!1===r.alignDelimiters?1:Math.max(1,l[u]-g.length-v.length),d=g+"-".repeat(p)+v,!1!==r.alignDelimiters&&(p=g.length+p+v.length,p>l[u]&&(l[u]=p),h[u]=p),f[u]=d;s.splice(1,0,f),c.splice(1,0,h),o=-1;const w=[];for(;++o<s.length;){for(f=s[o],h=c[o],u=-1,m=[];++u<b;)d=f[u]||"",g="",v="",!1!==r.alignDelimiters&&(p=l[u]-(h[u]||0),y=a[u],114===y?g=" ".repeat(p):99===y?p%2?(g=" ".repeat(p/2+.5),v=" ".repeat(p/2-.5)):(g=" ".repeat(p/2),v=g):v=" ".repeat(p)),!1===r.delimiterStart||u||m.push("|"),!1===r.padding||!1===r.alignDelimiters&&""===d||!1===r.delimiterStart&&!u||m.push(" "),!1!==r.alignDelimiters&&m.push(g),m.push(d),!1!==r.alignDelimiters&&m.push(v),!1!==r.padding&&m.push(" "),!1===r.delimiterEnd&&u===b-1||m.push("|");w.push(!1===r.delimiterEnd?m.join("").replace(/ +$/,""):m.join(""))}return w.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("tableRow");for(;++n<r.length;)i[n]=o(r[n],0,t);return a(),i}}function Es(e,t){const r=t.indexStack,n=e.children||[],i=[];let a=-1;for(r.push(-1);++a<n.length;){const s=n[a];r[r.length-1]=a,i.push(t.handle(s,e,t,{before:"\n",after:"\n"})),"list"!==s.type&&(t.bulletLastUsed=void 0),a<n.length-1&&i.push(o(s,n[a+1]))}return r.pop(),i.join("");function o(r,n){let i=t.join.length;for(;i--;){const a=t.join[i](r,n,e,t);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}}const Ss=/\r?\n|\r/g;function Cs(e,t){const r=[];let n,i=0,a=0;for(;n=Ss.exec(e);)o(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,a++;return o(e.slice(i)),r.join("");function o(e){r.push(t(e,a,!e))}}function Ps(e,t,r){const n=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let i=r.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===n||"mixed"===n&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const o=r.enter("listItem"),s=Cs(Es(e,r),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?i:i+" ".repeat(a-i.length))+e}));return o(),s}const As={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,r){const n=e.children[0];let i=Ps(e,t,r);"boolean"==typeof e.checked&&n&&"paragraph"===n.type&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "})));return i}}};function _s(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}const Fs=[is,fs,{enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t,children:[]},e),this.setData("inTable",!0)},tableData:ws,tableHeader:ws,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,xs));this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:bs,tableHeader:bs,tableRow:bs}},{exit:{taskListCheckValueChecked:_s,taskListCheckValueUnchecked:_s,paragraph:function(e){const t=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],n=t.children,i=r.children[0];let a,o=-1;if(t&&"listItem"===t.type&&"boolean"==typeof t.checked&&i&&"text"===i.type){for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){a=e;break}}a===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}}];var Os=oe(Object.freeze({__proto__:null,default:function(e={}){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return Ci([So,Mo(e),$o,Wo])}(e)),r("fromMarkdownExtensions",Fs),r("toMarkdownExtensions",function(e){return{extensions:[as,hs,ks(e),As]}}(e))}}));function Is(e){return"[33m"+e+"[39m"}const Ds=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Wr(t),a=n?-1:1;!function e(o,s,c){const l="object"==typeof o&&null!==o?o:{};let u;"string"==typeof l.type&&(u="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0,Object.defineProperty(f,"name",{value:"node ("+Is(l.type+(u?"<"+u+">":""))+")"}));return f;function f(){let l,u,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(u=(n?o.children.length:-1)+a,f=c.concat(o);u>-1&&u<o.children.length;){if(l=e(o.children[u],u,f)(),false===l[0])return l;u="number"==typeof l[1]?l[1]:u+a}return h}}(e,null,[])()};const js=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),Ds(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)};var Rs=Object.freeze({__proto__:null,CONTINUE:true,SKIP:"skip",EXIT:false,visit:js});const Ts=/[\t ]*(?:\r?\n|\r)/g;var Ls=oe(Object.freeze({__proto__:null,default:function(){return e=>{js(e,"text",((e,t,r)=>{const n=[];let i=0;Ts.lastIndex=0;let a=Ts.exec(e.value);for(;a;){const t=a.index;i!==t&&n.push({type:"text",value:e.value.slice(i,t)}),n.push({type:"break"}),i=t+a[0].length,a=Ts.exec(e.value)}if(n.length>0&&r&&"number"==typeof t)return i<e.value.length&&n.push({type:"text",value:e.value.slice(i)}),r.children.splice(t,1,...n),t+n.length}))}}})),qs={},Ms={};function zs(e,t,r){var n,i,a,o,s,c="";for("string"!=typeof t&&(r=t,t=zs.defaultChars),void 0===r&&(r=!0),s=function(e){var t,r,n=Ms[e];if(n)return n;for(n=Ms[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),n=0,i=e.length;n<i;n++)if(a=e.charCodeAt(n),r&&37===a&&n+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(n+1,n+3)))c+=e.slice(n,n+3),n+=2;else if(a<128)c+=s[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=e.charCodeAt(n+1))>=56320&&o<=57343){c+=encodeURIComponent(e[n]+e[n+1]),n++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[n]);return c}zs.defaultChars=";/?:@&=+$,-_.!~*'()#",zs.componentChars="-_.!~*'()";var Ns=zs,Bs={};function $s(e,t){var r;return"string"!=typeof t&&(t=$s.defaultChars),r=function(e){var t,r,n=Bs[e];if(n)return n;for(n=Bs[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,i,a,o,s,c,l="";for(t=0,n=e.length;t<n;t+=3)(i=parseInt(e.slice(t+1,t+3),16))<128?l+=r[i]:192==(224&i)&&t+3<n&&128==(192&(a=parseInt(e.slice(t+4,t+6),16)))?(l+=(c=i<<6&1984|63&a)<128?"��":String.fromCharCode(c),t+=3):224==(240&i)&&t+6<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&a)&&128==(192&o))?(l+=(c=i<<12&61440|a<<6&4032|63&o)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&i)&&t+9<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&a)&&128==(192&o)&&128==(192&s))?((c=i<<18&1835008|a<<12&258048|o<<6&4032|63&s)<65536||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):l+="�";return l}))}$s.defaultChars=";/?:@&=+$,#",$s.componentChars="";var Us=$s;function Hs(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Vs=/^([a-z0-9.+-]+:)/i,Qs=/:[0-9]*$/,Gs=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ws=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Ks=["'"].concat(Ws),Ys=["%","/","?",";","#"].concat(Ks),Js=["/","?","#"],Zs=/^[+a-z0-9A-Z_-]{0,63}$/,Xs=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ec={javascript:!0,"javascript:":!0},tc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Hs.prototype.parse=function(e,t){var r,n,i,a,o,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var c=Gs.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var l=Vs.exec(s);if(l&&(i=(l=l[0]).toLowerCase(),this.protocol=l,s=s.substr(l.length)),(t||l||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(o="//"===s.substr(0,2))||l&&ec[l]||(s=s.substr(2),this.slashes=!0)),!ec[l]&&(o||l&&!tc[l])){var u,f,h=-1;for(r=0;r<Js.length;r++)-1!==(a=s.indexOf(Js[r]))&&(-1===h||a<h)&&(h=a);for(-1!==(f=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(u=s.slice(0,f),s=s.slice(f+1),this.auth=u),h=-1,r=0;r<Ys.length;r++)-1!==(a=s.indexOf(Ys[r]))&&(-1===h||a<h)&&(h=a);-1===h&&(h=s.length),":"===s[h-1]&&h--;var p=s.slice(0,h);s=s.slice(h),this.parseHost(p),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d){var m=this.hostname.split(/\./);for(r=0,n=m.length;r<n;r++){var g=m[r];if(g&&!g.match(Zs)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(Zs)){var w=m.slice(0,r),x=m.slice(r+1),k=g.match(Xs);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var E=s.indexOf("#");-1!==E&&(this.hash=s.substr(E),s=s.slice(0,E));var S=s.indexOf("?");return-1!==S&&(this.search=s.substr(S),s=s.slice(0,S)),s&&(this.pathname=s),tc[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Hs.prototype.parseHost=function(e){var t=Qs.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var rc=function(e,t){if(e&&e instanceof Hs)return e;var r=new Hs;return r.parse(e,t),r};function nc(e,t){return ic(e,t.inConstruct,!0)&&!ic(e,t.notInConstruct,!1)}function ic(e,t,r){if(!t)return r;"string"==typeof t&&(t=[t]);let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function ac(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],a=[],o={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!nc(e.stack,t))continue;const r=ds(t);let a;for(;a=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=a.index+(e?a[1].length:0);i.includes(n)?(o[n].before&&!e&&(o[n].before=!1),o[n].after&&!r&&(o[n].after=!1)):(i.push(n),o[n]={before:e,after:r})}}i.sort(oc);let c=r.before?r.before.length:0;const l=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=l||(e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(sc(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(a.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):a.push("\\")))}return a.push(sc(n.slice(c,l),r.after)),a.join("")}function oc(e,t){return e-t}function sc(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],a=e+t;let o,s=-1,c=0;for(;o=r.exec(a);)n.push(o.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}function cc(e,t,r){const n=function(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}(r),i='"'===n?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label"),s="!["+ac(r,e.alt,{before:"[",after:"]"})+"](";return o(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(o=r.enter("destinationLiteral"),s+="<"+ac(r,e.url,{before:"<",after:">"})+">"):(o=r.enter("destinationRaw"),s+=ac(r,e.url,{before:"(",after:e.title?" ":")"})),o(),e.title&&(o=r.enter("title"+i),s+=" "+n+ac(r,e.title,{before:n,after:n})+n,o()),s+=")",a(),s}qs.encode=Ns,qs.decode=Us,qs.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},qs.parse=rc,cc.peek=function(){return"!"};var lc=oe(Object.freeze({__proto__:null,image:cc})),uc=oe(Va);var fc=oe(Object.freeze({__proto__:null,types:{data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"}}));var hc=oe(Object.freeze({__proto__:null,codes:{carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533}}));var pc=oe(Object.freeze({__proto__:null,constants:{attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:3,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}})),dc=oe(Ea),mc=oe(xa),gc=oe(ma),vc=oe($i),yc=oe(va),bc=oe(ba),wc=oe(Rs);var xc=oe(Object.freeze({__proto__:null,paragraph:function(e,t,r){const n=r.enter("paragraph"),i=r.enter("phrasing"),a=us(e,r,{before:"\n",after:"\n"});return i(),n(),a}}));var kc=oe(Object.freeze({__proto__:null,heading:function(e,t,r){const n=Math.max(Math.min(6,e.depth||1),1);if(function(e,t){let r=!1;return js(e,(e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,!1})),Boolean((!e.depth||e.depth<3)&&bi(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),i=r.enter("phrasing"),a=us(e,r,{before:"\n",after:"\n"});return i(),t(),a+"\n"+(1===n?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const i="#".repeat(n),a=r.enter("headingAtx"),o=r.enter("phrasing");let s=us(e,r,{before:"# ",after:"\n"});return/^[\t ]/.test(s)&&(s="&#x"+s.charCodeAt(0).toString(16).toUpperCase()+";"+s.slice(1)),s=s?i+" "+s:i,r.options.closeAtx&&(s+=" "+i),o(),a(),s}})),Ec=oe(Hi);function Sc(e,t,r){return">"+(r?"":" ")+e}var Cc,Pc=oe(Object.freeze({__proto__:null,blockquote:function(e,t,r){const n=r.enter("blockquote"),i=Cs(Es(e,r),Sc);return n(),i}})),Ac={exports:{}};Cc=Ac,function(){var e;function t(e){for(var t,r,n,i,a=1,o=[].slice.call(arguments),s=0,c=e.length,l="",u=!1,f=!1,h=function(){return o[a++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):null};s<c;++s)if(t=e[s],u)switch(u=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=p(),t){case"b":l+=parseInt(h(),10).toString(2);break;case"c":l+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":l+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),l+=f?n:n.replace(/^0/,"");break;case"j":l+=JSON.stringify(h());break;case"o":l+="0"+parseInt(h(),10).toString(8);break;case"s":l+=h();break;case"x":l+="0x"+parseInt(h(),10).toString(16);break;case"X":l+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:l+=t}else"%"===t?u=!0:l+=t;return l}(e=Cc.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var _c=Ac.exports,Fc=Object.assign(Oc(Error),{eval:Oc(EvalError),range:Oc(RangeError),reference:Oc(ReferenceError),syntax:Oc(SyntaxError),type:Oc(TypeError),uri:Oc(URIError)});function Oc(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){var n=t?_c(t,...r):t;return new e(n)}}const Ic={}.hasOwnProperty,Dc={yaml:"-",toml:"+"};function jc(e="yaml"){const t=[];let r=-1;for(Array.isArray(e)||(e=[e]);++r<e.length;)t[r]=Rc(e[r]);return t}function Rc(e){let t=e;if("string"==typeof t){if(!Ic.call(Dc,t))throw Fc("Missing matter definition for `%s`",t);t={type:t,marker:Dc[t]}}else if("object"!=typeof t)throw Fc("Expected matter to be an object, not `%j`",t);if(!Ic.call(t,"type"))throw Fc("Missing `type` in matter `%j`",t);if(!Ic.call(t,"fence")&&!Ic.call(t,"marker"))throw Fc("Missing `marker` or `fence` in matter `%j`",t);return t}function Tc(e){const t=e.type,r=e.anywhere,n=t+"Value",i=t+"Fence",a=i+"Sequence",o={tokenize:function(e,t,r){let n=0;return function(t){if(t===s.charCodeAt(n))return e.enter(i),e.enter(a),o(t);return r(t)};function o(t){return n===s.length?(e.exit(a),Mi(t)?(e.enter("whitespace"),c(t)):l(t)):t===s.charCodeAt(n++)?(e.consume(t),o):r(t)}function c(t){return Mi(t)?(e.consume(t),c):(e.exit("whitespace"),l(t))}function l(n){return null===n||qi(n)?(e.exit(i),t(n)):r(n)}},partial:!0};let s;return{tokenize:function(i,a,c){const l=this;return function(n){const a=l.now();if(1!==a.column||!r&&1!==a.line)return c(n);return i.enter(t),s=Lc(e,"open"),i.attempt(o,u,c)(n)};function u(t){return s=Lc(e,"close"),p(t)}function f(e){return null===e||qi(e)?p(e):(i.enter(n),h(e))}function h(e){return null===e||qi(e)?(i.exit(n),p(e)):(i.consume(e),h)}function p(e){return null===e?c(e):(i.enter("lineEnding"),i.consume(e),i.exit("lineEnding"),i.attempt(o,d,f))}function d(e){return i.exit(t),a(e)}},concrete:!0}}function Lc(e,t){return e.marker?qc(e.marker,t).repeat(3):qc(e.fence,t)}function qc(e,t){return"string"==typeof e?e:e[t]}function Mc(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function zc(e){const t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Nc(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Bc(e){const t=$c(e,"open"),r=$c(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function $c(e,t){return e.marker?Uc(e.marker,t).repeat(3):Uc(e.fence,t)}function Uc(e,t){return"string"==typeof e?e:e[t]}var Hc=oe(Object.freeze({__proto__:null,default:function(e="yaml"){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){const t=jc(e),r={};let n,i,a=-1;for(;++a<t.length;)n=t[a],i=Lc(n,"open").charCodeAt(0),i in r?r[i].push(Tc(n)):r[i]=[Tc(n)];return{flow:r}}(e)),r("fromMarkdownExtensions",function(e){const t=jc(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=Mc(e),n[e.type]=zc,n[e.type+"Value"]=Nc}return{enter:r,exit:n}}(e)),r("toMarkdownExtensions",function(e){const t=[],r={},n=jc(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=Bc(e),t.push({atBreak:!0,character:$c(e,"open").charAt(0)})}return{unsafe:t,handlers:r}}(e))}})),Vc=oe(Jr),Qc={exports:{}},Gc=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Wc=Gc,Kc=Object.prototype.toString;function Yc(e){return"[object Array]"===Kc.call(e)}function Jc(e){return void 0===e}function Zc(e){return null!==e&&"object"==typeof e}function Xc(e){if("[object Object]"!==Kc.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function el(e){return"[object Function]"===Kc.call(e)}function tl(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Yc(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var rl={isArray:Yc,isArrayBuffer:function(e){return"[object ArrayBuffer]"===Kc.call(e)},isBuffer:function(e){return null!==e&&!Jc(e)&&null!==e.constructor&&!Jc(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:Zc,isPlainObject:Xc,isUndefined:Jc,isDate:function(e){return"[object Date]"===Kc.call(e)},isFile:function(e){return"[object File]"===Kc.call(e)},isBlob:function(e){return"[object Blob]"===Kc.call(e)},isFunction:el,isStream:function(e){return Zc(e)&&el(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:tl,merge:function e(){var t={};function r(r,n){Xc(t[n])&&Xc(r)?t[n]=e(t[n],r):Xc(r)?t[n]=e({},r):Yc(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)tl(arguments[n],r);return t},extend:function(e,t,r){return tl(t,(function(t,n){e[n]=r&&"function"==typeof t?Wc(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},nl=rl;function il(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var al=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(nl.isURLSearchParams(t))n=t.toString();else{var i=[];nl.forEach(t,(function(e,t){null!=e&&(nl.isArray(e)?t+="[]":e=[e],nl.forEach(e,(function(e){nl.isDate(e)?e=e.toISOString():nl.isObject(e)&&(e=JSON.stringify(e)),i.push(il(t)+"="+il(e))})))})),n=i.join("&")}if(n){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},ol=rl;function sl(){this.handlers=[]}sl.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},sl.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},sl.prototype.forEach=function(e){ol.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var cl=sl,ll=rl,ul=function(e){return!(!e||!e.__CANCEL__)},fl=rl,hl=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e},pl=hl,dl=function(e,t,r,n,i){var a=new Error(e);return pl(a,t,r,n,i)},ml=dl,gl=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(ml("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},vl=rl,yl=vl.isStandardBrowserEnv()?{write:function(e,t,r,n,i,a){var o=[];o.push(e+"="+encodeURIComponent(t)),vl.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),vl.isString(n)&&o.push("path="+n),vl.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},bl=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},wl=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},xl=function(e,t){return e&&!bl(t)?wl(e,t):t},kl=rl,El=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Sl=rl,Cl=Sl.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=Sl.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},Pl=rl,Al=gl,_l=yl,Fl=al,Ol=xl,Il=function(e){var t,r,n,i={};return e?(kl.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=kl.trim(e.substr(0,n)).toLowerCase(),r=kl.trim(e.substr(n+1)),t){if(i[t]&&El.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},Dl=Cl,jl=dl,Rl=function(e){return new Promise((function(t,r){var n=e.data,i=e.headers;Pl.isFormData(n)&&delete i["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",s=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(o+":"+s)}var c=Ol(e.baseURL,e.url);if(a.open(e.method.toUpperCase(),Fl(c,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in a?Il(a.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:n,config:e,request:a};Al(t,r,i),a=null}},a.onabort=function(){a&&(r(jl("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){r(jl("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(jl(t,e,"ECONNABORTED",a)),a=null},Pl.isStandardBrowserEnv()){var l=(e.withCredentials||Dl(c))&&e.xsrfCookieName?_l.read(e.xsrfCookieName):void 0;l&&(i[e.xsrfHeaderName]=l)}if("setRequestHeader"in a&&Pl.forEach(i,(function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete i[t]:a.setRequestHeader(t,e)})),Pl.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){a&&(a.abort(),r(e),a=null)})),n||(n=null),a.send(n)}))},Tl={exports:{}},Ll={exports:{}},ql={exports:{}},Ml=1e3,zl=60*Ml,Nl=60*zl,Bl=24*Nl,$l=7*Bl,Ul=365.25*Bl,Hl=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*Ul;case"weeks":case"week":case"w":return r*$l;case"days":case"day":case"d":return r*Bl;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Nl;case"minutes":case"minute":case"mins":case"min":case"m":return r*zl;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ml;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=Bl)return Vl(e,t,Bl,"day");if(t>=Nl)return Vl(e,t,Nl,"hour");if(t>=zl)return Vl(e,t,zl,"minute");if(t>=Ml)return Vl(e,t,Ml,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=Bl)return Math.round(e/Bl)+"d";if(t>=Nl)return Math.round(e/Nl)+"h";if(t>=zl)return Math.round(e/zl)+"m";if(t>=Ml)return Math.round(e/Ml)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Vl(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var Ql=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=Hl,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Ql(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ql,ql.exports);var Gl={exports:{}};const Wl=V.default,Kl=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)},Yl=process.env;let Jl;function Zl(e){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(function(e){if(!1===Jl)return 0;if(Kl("color=16m")||Kl("color=full")||Kl("color=truecolor"))return 3;if(Kl("color=256"))return 2;if(e&&!e.isTTY&&!0!==Jl)return 0;const t=Jl?1:0;if("win32"===process.platform){const e=Wl.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Yl)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in Yl))||"codeship"===Yl.CI_NAME?1:t;if("TEAMCITY_VERSION"in Yl)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Yl.TEAMCITY_VERSION)?1:0;if("truecolor"===Yl.COLORTERM)return 3;if("TERM_PROGRAM"in Yl){const e=parseInt((Yl.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Yl.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Yl.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Yl.TERM)||"COLORTERM"in Yl?1:(Yl.TERM,t)}(e))}Kl("no-color")||Kl("no-colors")||Kl("color=false")?Jl=!1:(Kl("color")||Kl("colors")||Kl("color=true")||Kl("color=always"))&&(Jl=!0),"FORCE_COLOR"in Yl&&(Jl=0===Yl.FORCE_COLOR.length||0!==parseInt(Yl.FORCE_COLOR,10));var Xl,eu={supportsColor:Zl,stdout:Zl(process.stdout),stderr:Zl(process.stderr)};!function(e,t){const r=U.default,n=H.default;t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${n} [0m`;r[0]=a+r[0].split("\n").join("\n"+a),r.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=eu;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=Ql(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}}(Gl,Gl.exports),"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Ll.exports=ql.exports:Ll.exports=Gl.exports;var tu=M.default,ru=tu.URL,nu=N.default,iu=B.default,au=$.default.Writable,ou=z.default,su=function(){if(!Xl){try{Xl=Ll.exports("follow-redirects")}catch(e){}"function"!=typeof Xl&&(Xl=function(){})}Xl.apply(null,arguments)},cu=["abort","aborted","connect","error","socket","timeout"],lu=Object.create(null);cu.forEach((function(e){lu[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var uu=bu("ERR_FR_REDIRECTION_FAILURE",""),fu=bu("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),hu=bu("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),pu=bu("ERR_STREAM_WRITE_AFTER_END","write after end");function du(e,t){au.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function mu(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],o=t[n]=Object.create(a);Object.defineProperties(o,{request:{value:function(e,n,a){if("string"==typeof e){var o=e;try{e=vu(new ru(o))}catch(t){e=tu.parse(o)}}else ru&&e instanceof ru?e=vu(e):(a=n,n=e,e={protocol:i});return"function"==typeof n&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,ou.equal(n.protocol,i,"protocol mismatch"),su("options",n),new du(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=o.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function gu(){}function vu(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function yu(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r}function bu(e,t){function r(e){Error.captureStackTrace(this,this.constructor),this.message=e||t}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r.prototype.code=e,r}function wu(e){for(var t=0;t<cu.length;t++)e.removeListener(cu[t],lu[cu[t]]);e.on("error",gu),e.abort()}du.prototype=Object.create(au.prototype),du.prototype.abort=function(){wu(this._currentRequest),this.emit("abort")},du.prototype.write=function(e,t,r){if(this._ending)throw new pu;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new hu),this.abort()):r&&r()},du.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},du.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},du.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},du.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),a()}),e),n(t)}function a(){clearTimeout(this._timeout),t&&r.removeListener("timeout",t),this.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.once("response",a),this.once("error",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){du.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(du.prototype,e,{get:function(){return this._currentRequest[e]}})})),du.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},du.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=tu.format(this._options),n._redirectable=this;for(var i=0;i<cu.length;i++)n.on(cu[i],lu[cu[i]]);if(this._isRedirect){var a=0,o=this,s=this._requestBodyBuffers;!function e(t){if(n===o._currentRequest)if(t)o.emit("error",t);else if(a<s.length){var r=s[a++];n.finished||n.write(r.data,r.encoding,e)}else o._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},du.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(r&&!1!==this._options.followRedirects&&t>=300&&t<400){if(wu(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new fu);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],yu(/^content-/i,this._options.headers));var n=yu(/^host$/i,this._options.headers)||tu.parse(this._currentUrl).hostname,i=tu.resolve(this._currentUrl,r);su("redirecting to",i),this._isRedirect=!0;var a=tu.parse(i);if(Object.assign(this._options,a),a.hostname!==n&&yu(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var o={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,o)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){var s=new uu("Redirected request failed: "+e.message);s.cause=e,this.emit("error",s)}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},Tl.exports=mu({http:nu,https:iu}),Tl.exports.wrap=mu;var xu={name:"axios",version:"0.21.1",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://github.com/axios/axios",devDependencies:{bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.10.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},ku=rl,Eu=gl,Su=xl,Cu=al,Pu=N.default,Au=B.default,_u=Tl.exports.http,Fu=Tl.exports.https,Ou=M.default,Iu=Q.default,Du=xu,ju=dl,Ru=hl,Tu=/https:?/;function Lu(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,Lu(e,t,e.href)}}var qu=function(e){return new Promise((function(t,r){var n=function(e){t(e)},i=function(e){r(e)},a=e.data,o=e.headers;if(o["User-Agent"]||o["user-agent"]||(o["User-Agent"]="axios/"+Du.version),a&&!ku.isStream(a)){if(Buffer.isBuffer(a));else if(ku.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else{if(!ku.isString(a))return i(ju("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));a=Buffer.from(a,"utf-8")}o["Content-Length"]=a.length}var s=void 0;e.auth&&(s=(e.auth.username||"")+":"+(e.auth.password||""));var c=Su(e.baseURL,e.url),l=Ou.parse(c),u=l.protocol||"http:";if(!s&&l.auth){var f=l.auth.split(":");s=(f[0]||"")+":"+(f[1]||"")}s&&delete o.Authorization;var h=Tu.test(u),p=h?e.httpsAgent:e.httpAgent,d={path:Cu(l.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:o,agent:p,agents:{http:e.httpAgent,https:e.httpsAgent},auth:s};e.socketPath?d.socketPath=e.socketPath:(d.hostname=l.hostname,d.port=l.port);var m,g=e.proxy;if(!g&&!1!==g){var v=u.slice(0,-1)+"_proxy",y=process.env[v]||process.env[v.toUpperCase()];if(y){var b=Ou.parse(y),w=process.env.no_proxy||process.env.NO_PROXY,x=!0;if(w)x=!w.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&l.hostname.substr(l.hostname.length-e.length)===e||l.hostname===e))}));if(x&&(g={host:b.hostname,port:b.port,protocol:b.protocol},b.auth)){var k=b.auth.split(":");g.auth={username:k[0],password:k[1]}}}}g&&(d.headers.host=l.hostname+(l.port?":"+l.port:""),Lu(d,g,u+"//"+l.hostname+(l.port?":"+l.port:"")+d.path));var E=h&&(!g||Tu.test(g.protocol));e.transport?m=e.transport:0===e.maxRedirects?m=E?Au:Pu:(e.maxRedirects&&(d.maxRedirects=e.maxRedirects),m=E?Fu:_u),e.maxBodyLength>-1&&(d.maxBodyLength=e.maxBodyLength);var S=m.request(d,(function(t){if(!S.aborted){var r=t,a=t.req||S;if(204!==t.statusCode&&"HEAD"!==a.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(Iu.createUnzip()),delete t.headers["content-encoding"]}var o={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:a};if("stream"===e.responseType)o.data=r,Eu(n,i,o);else{var s=[];r.on("data",(function(t){s.push(t),e.maxContentLength>-1&&Buffer.concat(s).length>e.maxContentLength&&(r.destroy(),i(ju("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,a)))})),r.on("error",(function(t){S.aborted||i(Ru(t,e,null,a))})),r.on("end",(function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=ku.stripBOM(t))),o.data=t,Eu(n,i,o)}))}}}));S.on("error",(function(t){S.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||i(Ru(t,e,null,S))})),e.timeout&&S.setTimeout(e.timeout,(function(){S.abort(),i(ju("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",S))})),e.cancelToken&&e.cancelToken.promise.then((function(e){S.aborted||(S.abort(),i(e))})),ku.isStream(a)?a.on("error",(function(t){i(Ru(t,e,null,S))})).pipe(S):S.end(a)}))},Mu=rl,zu=function(e,t){fl.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},Nu={"Content-Type":"application/x-www-form-urlencoded"};function Bu(e,t){!Mu.isUndefined(e)&&Mu.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var $u,Uu={adapter:("undefined"!=typeof XMLHttpRequest?$u=Rl:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&($u=qu),$u),transformRequest:[function(e,t){return zu(t,"Accept"),zu(t,"Content-Type"),Mu.isFormData(e)||Mu.isArrayBuffer(e)||Mu.isBuffer(e)||Mu.isStream(e)||Mu.isFile(e)||Mu.isBlob(e)?e:Mu.isArrayBufferView(e)?e.buffer:Mu.isURLSearchParams(e)?(Bu(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Mu.isObject(e)?(Bu(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Uu.headers={common:{Accept:"application/json, text/plain, */*"}},Mu.forEach(["delete","get","head"],(function(e){Uu.headers[e]={}})),Mu.forEach(["post","put","patch"],(function(e){Uu.headers[e]=Mu.merge(Nu)}));var Hu=Uu,Vu=rl,Qu=function(e,t,r){return ll.forEach(r,(function(r){e=r(e,t)})),e},Gu=ul,Wu=Hu;function Ku(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Yu=rl,Ju=function(e,t){t=t||{};var r={},n=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function s(e,t){return Yu.isPlainObject(e)&&Yu.isPlainObject(t)?Yu.merge(e,t):Yu.isPlainObject(t)?Yu.merge({},t):Yu.isArray(t)?t.slice():t}function c(n){Yu.isUndefined(t[n])?Yu.isUndefined(e[n])||(r[n]=s(void 0,e[n])):r[n]=s(e[n],t[n])}Yu.forEach(n,(function(e){Yu.isUndefined(t[e])||(r[e]=s(void 0,t[e]))})),Yu.forEach(i,c),Yu.forEach(a,(function(n){Yu.isUndefined(t[n])?Yu.isUndefined(e[n])||(r[n]=s(void 0,e[n])):r[n]=s(void 0,t[n])})),Yu.forEach(o,(function(n){n in t?r[n]=s(e[n],t[n]):n in e&&(r[n]=s(void 0,e[n]))}));var l=n.concat(i).concat(a).concat(o),u=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return Yu.forEach(u,c),r},Zu=rl,Xu=al,ef=cl,tf=function(e){return Ku(e),e.headers=e.headers||{},e.data=Qu(e.data,e.headers,e.transformRequest),e.headers=Vu.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Vu.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Wu.adapter)(e).then((function(t){return Ku(e),t.data=Qu(t.data,t.headers,e.transformResponse),t}),(function(t){return Gu(t)||(Ku(e),t&&t.response&&(t.response.data=Qu(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},rf=Ju;function nf(e){this.defaults=e,this.interceptors={request:new ef,response:new ef}}nf.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=rf(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[tf,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},nf.prototype.getUri=function(e){return e=rf(this.defaults,e),Xu(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Zu.forEach(["delete","get","head","options"],(function(e){nf.prototype[e]=function(t,r){return this.request(rf(r||{},{method:e,url:t,data:(r||{}).data}))}})),Zu.forEach(["post","put","patch"],(function(e){nf.prototype[e]=function(t,r,n){return this.request(rf(n||{},{method:e,url:t,data:r}))}}));var af=nf;function of(e){this.message=e}of.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},of.prototype.__CANCEL__=!0;var sf=of,cf=sf;function lf(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new cf(e),t(r.reason))}))}lf.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},lf.source=function(){var e;return{token:new lf((function(t){e=t})),cancel:e}};var uf=lf,ff=rl,hf=Gc,pf=af,df=Ju;function mf(e){var t=new pf(e),r=hf(pf.prototype.request,t);return ff.extend(r,pf.prototype,t),ff.extend(r,t),r}var gf=mf(Hu);gf.Axios=pf,gf.create=function(e){return mf(df(gf.defaults,e))},gf.Cancel=sf,gf.CancelToken=uf,gf.isCancel=ul,gf.all=function(e){return Promise.all(e)},gf.spread=function(e){return function(t){return e.apply(null,t)}},gf.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError},Qc.exports=gf,Qc.exports.default=gf;var vf=Qc.exports;!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=T.default,r=pr,n=_r.exports,i=Lr.exports,a=Ln,o=yi,s=po,c=Os,l=Ls,u=qs,f=lc,h=uc,p=fc,d=hc,m=pc,g=z.default,v=dc,y=mc,b=gc,w=vc,x=yc,k=bc,E=wc,S=xc,C=kc,P=Ec,A=Pc,_=Hc,F=Vc,O=j.default,I=vf;function D(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=D(r),L=D(n),q=D(i),M=D(s),N=D(c),B=D(l),$=D(g),U=D(_),H=D(O),V=D(I);function Q(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function G(e,t){return L.default.encrypt(e,t).toString()}function W(e,t){try{return L.default.decrypt(e,t).toString(q.default)}catch{return""}}var K=Object.freeze({__proto__:null,encrypt:G,decrypt:W});class Y{constructor(e,t){this.key=void 0,this.values=void 0,this.schema=void 0,this.values=e,this.schema=t}setKey(e){this.key=e}getValues(){return this.values}setValues(e){const r=new R.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});r.addKeyword("encrypt",{validate:(e,r,n,i,a,o)=>(this.key&&e&&!Q(r)&&a&&o&&t.set(a,o,`@encrypted:${G(r,this.key)}`),!0),modifying:!0,errors:!1}),r.compile(this.schema)(e=t.cloneDeep(e)),this.values=e}getValue(e,r){const n=t.get(this.values,e,r);return this.key&&Q(n)?W(n.substr(11),this.key):n}setValue(e,r){return t.set(this.values,e,r)}toObject(){const e=new R.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});e.removeKeyword("default"),e.addKeyword("default",{validate:(e,r,n,i,a,o,s)=>(t.isEqual(e,r)&&(delete a[o],t.isEmpty(a)&&function(e,r){const n=[];let i=e;for(let e=0;e<r.length-1;e++)n.push(i),i=i[r[e]];for(let e=r.length-2;e>=0;e--)t.isEmpty(n[e][r[e]])&&delete n[e][r[e]]}(s,t.toPath(i.substr(1)))),!0),modifying:!0,errors:!1});const r=e.compile(this.schema),n=t.cloneDeep(this.values);return r(n),n}static createFromObject(e,r){const n=new R.default({removeAdditional:!0,useDefaults:!0,allErrors:!0}).compile(r);if(!n(e))for(const r of n.errors)e=t.omit(e,r.dataPath.substr(1).split("/"));return new this(e,r)}}class J extends Y{constructor(...e){super(...e),this.pluginsConfig={}}getStructure(e){return this.getValue(["structure",e])}getPluginConfig(e,r){if(!this.pluginsConfig[e]){const n=this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=Y.createFromObject(t.cloneDeep(n),r),this.pluginsConfig[e].setKey(`${this.key}:${e}`)}return this.pluginsConfig[e]}setPluginConfig(e,r){const n=r.toObject();t.isEmpty(n)?t.unset(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],n),delete this.pluginsConfig[e]}static createFromObject(e){return super.createFromObject(e,J.schema)}}J.file="book.json",J.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode form theme",default:"light"},primaryColor:{type:"string",title:"Primary Color form theme",default:"#3c60ff"}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},structure:{type:"object",properties:{langs:{default:"LANGS.md",type:"string",title:"File to use as languages index",pattern:"^[a-zA-Z-._\\d,\\s]+$"},readme:{default:"README.md",type:"string",title:"File to use as preface",pattern:"^[a-zA-Z-._\\d,\\s]+$"},summary:{default:"SUMMARY.md",type:"string",title:"File to use as table of contents",pattern:"^[a-zA-Z-._\\d,\\s]+$"}},default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}}},required:[]};class Z{constructor(e=[]){this.data=void 0,this.data="string"==typeof e?e.split(".").map((e=>parseInt(e,10))):e}getParent(){return new Z(this.data.slice(0,-1))}createChild(e){return new Z(this.data.concat(e))}isDescendant(e){return e.toString().startsWith(`${this.toString()}.`)}getNext(){const e=[...this.data];return e[e.length-1]++,new Z(e)}getDepth(){return this.data.length-1}eq(e){return this.toString()===e.toString()}getLeafIndex(){return this.data[this.data.length-1]-1}toString(){return this.data.join(".")}static compare(e,t){for(let r=0;r<Math.max(e.data.length,t.data.length);r++){let n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0}}class X{constructor({title:e,ref:t,path:r,children:n=[]}){this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.title=e,this.ref=t,this.path=r,this.children=n,this.level=new Z}getLevel(){return this.level}getTitle(){return this.title}getRef(){return this.ref}getPath(){return this.path?this.path:this.ref}getArticles(){return this.children}getDepth(){return this.getLevel().getDepth()}createChildLevel(){return this.level.createChild(this.children.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.children.entries())r.indexLevels(e.createChild(t+1))}static findArticle(e,t){return e.getArticles().reduce(((e,r)=>e||(t(r)?r:X.findArticle(r,t))),void 0)}static createFromObject(e){const t=e.children.map((e=>X.createFromObject(e)));return new X({...e,children:t})}}class ee{constructor(e,t=[]){this.level=void 0,this.title=void 0,this.articles=void 0,this.level=new Z,this.title=e,this.articles=t}getLevel(){return this.level}getTitle(){return this.title}getArticles(){return this.articles}createChildLevel(){return this.level.createChild(this.articles.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.articles.entries())r.indexLevels(e.createChild(t+1))}static createFormObject(e){return new ee(e.title,e.articles.map((e=>X.createFromObject(e))))}}const te={tokenize:function(e,t,r){function n(t){return t===d.codes.rightParenthesis?f(t):b.factoryDestination(e,i,r,p.types.resourceDestination,p.types.resourceDestinationLiteral,p.types.resourceDestinationLiteralMarker,p.types.resourceDestinationRaw,p.types.resourceDestinationString,m.constants.linkResourceDestinationBalanceMax)(t)}function i(t){return w.markdownLineEndingOrSpace(t)?y.factoryWhitespace(e,a)(t):f(t)}function a(t){return t===d.codes.quotationMark||t===d.codes.apostrophe||t===d.codes.leftParenthesis?k.factoryTitle(e,y.factoryWhitespace(e,o),r,p.types.resourceTitle,p.types.resourceTitleMarker,p.types.resourceTitleString)(t):o(t)}function o(t){return t===d.codes.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),s):f(t)}function s(t){return t===d.codes.lowercaseX?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),l):t===d.codes.rightParenthesis||w.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),y.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeWidth"),e.enter(p.types.chunkString,{contentType:"string"}),c(t))}function c(t){return t===d.codes.rightParenthesis||w.markdownLineEndingOrSpace(t)?(e.exit(p.types.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),y.factoryWhitespace(e,f)(t)):t===d.codes.lowercaseX?(e.exit(p.types.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),l):(e.consume(t),c)}function l(t){return t===d.codes.rightParenthesis||w.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),y.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeHeight"),e.enter(p.types.chunkString,{contentType:"string"}),u(t))}function u(t){return t===d.codes.rightParenthesis||w.markdownLineEndingOrSpace(t)?(e.exit(p.types.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),y.factoryWhitespace(e,f)(t)):(e.consume(t),u)}function f(n){return n===d.codes.rightParenthesis?(e.enter(p.types.resourceMarker),e.consume(n),e.exit(p.types.resourceMarker),e.exit(p.types.resource),t):r(n)}return function(t){return e.enter(p.types.resource),e.enter(p.types.resourceMarker),e.consume(t),e.exit(p.types.resourceMarker),y.factoryWhitespace(e,n)}}},re={tokenize:function(e,t,r){const n=this;function i(e){return n.parser.defined.includes(v.normalizeIdentifier(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}return function(t){return $.default.strictEqual(t,d.codes.leftSquareBracket,"expected left bracket"),x.factoryLabel.call(n,e,i,r,p.types.reference,p.types.referenceMarker,p.types.referenceString)(t)}}},ne={tokenize:function(e,t,r){function n(n){return 93===n?(e.enter(p.types.referenceMarker),e.consume(n),e.exit(p.types.referenceMarker),e.exit(p.types.reference),t):r(n)}return function(t){return e.enter(p.types.reference),e.enter(p.types.referenceMarker),e.consume(t),e.exit(p.types.referenceMarker),n}}};var ie={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if((n.events[o][1].type===p.types.labelImage||n.events[o][1].type===p.types.labelLink)&&!n.events[o][1]._balanced){i=n.events[o][1];break}function s(e){return i._balanced=!0,r(e)}function c(r){return r===d.codes.leftParenthesis?e.attempt(te,t,a?t:s)(r):r===d.codes.leftSquareBracket?e.attempt(re,t,a?e.attempt(ne,t,s):s)(r):a?t(r):s(r)}return function(t){return $.default(t===d.codes.rightSquareBracket,"expected `]`"),i?i._inactive?s(t):(a=n.parser.defined.indexOf(v.normalizeIdentifier(n.sliceSerialize({start:i.end,end:n.now()})))>-1,e.enter(p.types.labelEnd),e.enter(p.types.labelMarker),e.consume(t),e.exit(p.types.labelMarker),e.exit(p.types.labelEnd),c):r(t)}},resolveTo:h.labelEnd.resolveTo,resolveAll:h.labelEnd.resolveAll};const ae=(e,t,r)=>{const n=f.image(e,t,r);return e.width||e.height?n.replace(/\)$/,` =${e.width||""}${e.height?`x${e.height}`:""})`):n};ae.peek=f.image.peek;const oe=e=>{let t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},se={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(t===d.codes.greaterThan){const r=n.containerState;return $.default(r,"expected `containerState` to be defined in container"),r.open||(e.enter(p.types.blockQuote,{_container:!0}),r.open=!0),e.enter(p.types.blockQuotePrefix),e.enter(p.types.blockQuoteMarker),e.consume(t),e.exit(p.types.blockQuoteMarker),P.factorySpace(e,i,p.types.whitespace)}return r(t)};function i(t){return t===d.codes.leftSquareBracket?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),a):s(t)}function a(t){return t===d.codes.rightSquareBracket||w.markdownLineEndingOrSpace(t)?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.enter("blockQuoteType"),e.enter(p.types.chunkString,{contentType:"string"}),o(t))}function o(t){return t===d.codes.rightSquareBracket||w.markdownLineEndingOrSpace(t)?(e.exit(p.types.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.consume(t),o)}function s(r){return w.markdownSpace(r)?(e.enter(p.types.blockQuotePrefixWhitespace),e.consume(r),e.exit(p.types.blockQuotePrefixWhitespace),e.exit(p.types.blockQuotePrefix),t):(e.exit(p.types.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){return P.factorySpace(e,e.attempt(se,t,r),p.types.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:m.constants.tabSize)}},exit:h.blockQuote.exit},ce=e=>{let t="";return E.visit(e,"text",(function(e){t+=e.value})),t},le=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,ue=o.unified().use(M.default).use((function(){const e=this.data();e.micromarkExtensions=[],e.fromMarkdownExtensions=[],e.toMarkdownExtensions=[],e.toHastExtensions=[]})).use(U.default,["yaml"]).use(N.default).use(B.default).use((function(){return this.data().toHastExtensions.push({xBlock:(e,t)=>e({},"x-block",{name:t.name,value:t.value,parameter:t.parameter}),xInline:(e,t)=>e({},"x-inline",{name:t.name,value:t.value})}),function(e){const t=(e,t,r)=>{if(null!==t&&null!==r)if("code"===e.type&&e.lang){const n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){const i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if("inlineCode"===e.type){const n=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(n){const i={type:"xInline",name:n[1],value:n[2],position:e.position};r.children.splice(t,1,i)}}};E.visit(e,"code",t),E.visit(e,"inlineCode",t)}})).use((function(){const e=this.data();e.micromarkExtensions.push({text:{[d.codes.rightSquareBracket]:ie}}),e.fromMarkdownExtensions.push({enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){const e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){const e=this.resume();this.stack[this.stack.length-1].height=e}}}),e.toMarkdownExtensions.push({handlers:{image:ae}}),e.toHastExtensions.push({image:(e,t)=>{const r={src:u.encode(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(r.title=t.title),r.width=t.width,r.height=t.height,e(t,"img",r)}})})).use((function(){return this.data().toMarkdownExtensions.push({handlers:{paragraph:(e,t,r)=>{const n=S.paragraph(e,t,r);return oe(e.align)+n},heading:(e,t,r)=>C.heading(e,t,r).replace(/^#+\s/,`$&${oe(e.align)}`)}}),function(e){const t=(e,t,r)=>{const n=a.select("text",e);if(n){const t=n.value;t.startsWith("--: ")?e.align="right":t.startsWith(":-: ")?e.align="center":t.startsWith(":-- ")&&(e.align="left"),e.align&&(n.value=t.substr(4),r&&"listItem"===r.type?r.data={...r.data,hProperties:{className:`align-${e.align}`}}:e.data={...e.data,hProperties:{className:`align-${e.align}`}})}};E.visit(e,"paragraph",t),E.visit(e,"heading",t)}})).use((function(){const e=this.data();return e.toMarkdownExtensions.push({handlers:{blockquote:(e,t,r)=>{const n=A.blockquote(e,t,r);return e.variant?n.replace(/(^|\s+)>\s/,`$1> [${e.variant}] `):n}}}),e.micromarkExtensions.push({document:{[d.codes.greaterThan]:se}}),e.fromMarkdownExtensions.push({enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){const e=this.resume();this.stack[this.stack.length-1].variant=e}}}),function(e){E.visit(e,"blockquote",(e=>{e.variant&&(e.data={...e.data,hProperties:{className:e.variant}})}))}})).use((function(){return function(e){E.visit(e,((e,t,r)=>{if(r&&"root"===r.type&&null!==t&&ce(e).match(le))return r.children.splice(t,1),[E.SKIP,t]}))}}));function fe(e){const t=[];for(const r of e.children){const e=r.children,n=a.select("paragraph:first-child>*",r);if(!n)continue;const i=he.stringify(n);if(!i)continue;const o=n.url?decodeURI(n.url):void 0;if(o&&o.match(/[\\:*?"<>|]/))continue;let s={title:i,ref:o,children:[]};if(e.length>1){const t=e[e.length-1];F.is(t,"list")&&(s.children=fe(t))}t.push(s)}return t}const he=ue().use((function(){this.Compiler=function(e){return ce(e)}}));class pe{constructor(e=[]){this.parts=void 0,this.parts=e,this.indexLevels()}getParts(){return this.parts}getPart(e){return this.parts[e]}getLastPart(){return this.parts[this.parts.length-1]}getArticles(){const e=[];return this.getArticle((t=>(e.push(t),!1))),e}getArticle(e){return this.parts.reduce(((t,r)=>t||X.findArticle(r,e)),void 0)}getByLevel(e){const t=t=>t.getLevel().eq(e);return this.parts.reduce(((e,r)=>e||(t(r)?r:X.findArticle(r,t))),void 0)}getFirstPath(){const e=this.getArticle((e=>!!e.getPath()));if(e)return e.getPath()}getNextArticle(e){const t=e instanceof X?e.getLevel():e;let r=!1;return this.getArticle((e=>!!r||(r=e.getLevel()==t,!1)))}getPrevArticle(e){const t=e instanceof X?e.getLevel():e;let r;return this.getArticle((e=>e.getLevel()==t||(r=e,!1))),r}getParent(e){const t=(e instanceof X?e.getLevel():e).getParent();if(t)return this.getByLevel(t)}indexLevels(){for(const[e,t]of this.parts.entries()){const r=new Z(String(e+1));t.indexLevels(r)}}static createFromObject(e){return new pe(e.map((e=>ee.createFormObject(e))))}static createFromText(e){const t=function(e){const t=he.parse(e),r=[];let n;for(const e of t.children)if(F.is(e,"heading")&&[2,3].includes(e.depth)&&(n&&r.push(n),n={title:he.stringify(e),articles:[]}),F.is(e,"list")){const t=fe(e);n?n.articles=n.articles.concat(t):n={title:"",articles:t}}return n?r.push(n):r.push({title:"",articles:[]}),r}(e);return pe.createFromObject(t)}}class de{constructor(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}toDataUrl(){return this.canvas.toDataURL()}generate(){const e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");const t=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[t.charCodeAt(0)%this.flatColors.length],e.fillRect(0,0,this.size,this.size),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}static create(e,t,r){return r||(r=function(e){const t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(t)),new de(e,t,r)}}const me=/^(?:\w+:)?\/\/(\S+)$/,ge=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,ve=/^[^\s\.]+\.\S{2,}$/;V.default.defaults.maxContentLength=1/0,V.default.defaults.maxBodyLength=1/0,Object.defineProperty(e,"request",{enumerable:!0,get:function(){return V.default}}),e.BaseConfig=Y,e.Book=class{constructor(e,t,r){this.id=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.summary=r,this.config=t}get config(){return this._config}set config(e){e.setKey(`${this.id}:config`),this._config=e}},e.Config=J,e.File=class{constructor({path:e,content:t,meta:r={}}){this.path=void 0,this.content=void 0,this.meta=void 0,this.path=e,this.content=t,this.meta=r}getMeta(e,r){return t.get(this.meta,e,r)}relative(e){const t="/"===e.slice(-1);return(e=H.default.posix.relative(H.default.posix.dirname(this.path),e)||".")+(t?"/":"")}},e.LetterAvatar=de,e.Level=Z,e.Summary=pe,e.SummaryArticle=X,e.SummaryPart=ee,e.aes=K,e.isEncryptedData=Q,e.isUrl=function(e){const t=e.match(me);if(!t)return!1;const r=t[1];return!!r&&(ge.test(r)||ve.test(r))},e.markdown=ue,e.validatePlugins=async function(e,t){const{config:r}=e,n=[`theme-${r.getValue("theme")}`,...r.getValue("plugins")];return(await V.default.get(`${t.host}/api/installed`,{params:{book:e.id,plugins:n.join(",")}}).catch((e=>{throw new Error("Plugins Check Failed:"+e.message)}))).data}}(se);class yf{name;path;hooks;config;constructor(e,t,r,n){this.name=e,this.path=t,this.hooks=r,this.config=n}getHook(e){return this.hooks[e]}getContext(e){return{...e,getConfig:()=>e.book.config.getPluginConfig(this.name,this.config)}}}async function bf(e,t){ne.info(`installing plugin "${e.name}"`);const r=`npm install ${e.host}.tgz`,{error:n}=G.default.sync(r,{stdio:["inherit"],cwd:t,shell:!0});if(n)throw n;const i=j.default.join(t,"node_modules","topwrite-plugin-"+e.name),a=j.default.join(i,"dist","hooks.js");let o={};if(W.existsSync(a)){o=(new y.NodeVM).runFile(a)}const s=j.default.join(i,"config.json");let c={};return W.existsSync(s)&&(c=require(s)),ne.info(`plugin "${e.name}@${e.version}" installed with success`),new yf(e.name,i,o,c)}
|
|
9
9
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
10
|
-
function wf(e){return null==e}var xf={isNothing:wf,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:wf(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var r,n,i,a;if(t)for(r=0,n=(a=Object.keys(t)).length;r<n;r+=1)e[i=a[r]]=t[i];return e}};function kf(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function Ef(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=kf(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Ef.prototype=Object.create(Error.prototype),Ef.prototype.constructor=Ef,Ef.prototype.toString=function(e){return this.name+": "+kf(this,e)};var Sf=Ef;function Cf(e,t,r,n,i){var a="",o="",s=Math.floor(i/2)-1;return n-t>s&&(t=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+a.length}}function Pf(e,t){return xf.repeat(" ",t-e.length)+e}var Af=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,c,l="",u=Math.min(e.line+t.linesAfter,a.length).toString().length,f=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(o-s<0);s++)c=Cf(e.buffer,i[o-s],a[o-s],e.position-(i[o]-i[o-s]),f),l=xf.repeat(" ",t.indent)+Pf((e.line-s+1).toString(),u)+" | "+c.str+"\n"+l;for(c=Cf(e.buffer,i[o],a[o],e.position,f),l+=xf.repeat(" ",t.indent)+Pf((e.line+1).toString(),u)+" | "+c.str+"\n",l+=xf.repeat("-",t.indent+u+3+c.pos)+"^\n",s=1;s<=t.linesAfter&&!(o+s>=a.length);s++)c=Cf(e.buffer,i[o+s],a[o+s],e.position-(i[o]-i[o+s]),f),l+=xf.repeat(" ",t.indent)+Pf((e.line+s+1).toString(),u)+" | "+c.str+"\n";return l.replace(/\n$/,"")},_f=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ff=["scalar","sequence","mapping"];var Of=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===_f.indexOf(t))throw new Sf('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===Ff.indexOf(this.kind))throw new Sf('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function If(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function Df(e){return this.extend(e)}Df.prototype.extend=function(e){var t=[],r=[];if(e instanceof Of)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Sf("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof Of))throw new Sf("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Sf("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new Sf("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof Of))throw new Sf("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(Df.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=If(n,"implicit"),n.compiledExplicit=If(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(n.compiledImplicit,n.compiledExplicit),n};var jf=Df,Rf=new Of("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),Tf=new Of("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),Lf=new Of("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),qf=new jf({explicit:[Rf,Tf,Lf]});var Mf=new Of("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var zf=new Of("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Nf(e){return 48<=e&&e<=55}function Bf(e){return 48<=e&&e<=57}var $f=new Of("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,i=0,a=!1;if(!n)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===n)return!0;if("b"===(t=e[++i])){for(i++;i<n;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;a=!0}return a&&"_"!==t}if("x"===t){for(i++;i<n;i++)if("_"!==(t=e[i])){if(!(48<=(r=e.charCodeAt(i))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;a=!0}return a&&"_"!==t}if("o"===t){for(i++;i<n;i++)if("_"!==(t=e[i])){if(!Nf(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}}if("_"===t)return!1;for(;i<n;i++)if("_"!==(t=e[i])){if(!Bf(e.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!xf.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Uf=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Hf=/^[-+]?[0-9]+e/;var Vf=new Of("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!Uf.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||xf.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xf.isNegativeZero(e))return"-0.0";return r=e.toString(10),Hf.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),Qf=qf.extend({implicit:[Mf,zf,$f,Vf]}),Gf=Qf,Wf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Yf=new Of("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Wf.exec(e)||null!==Kf.exec(e))},construct:function(e){var t,r,n,i,a,o,s,c,l=0,u=null;if(null===(t=Wf.exec(e))&&(t=Kf.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var Jf=new Of("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),Zf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Xf=new Of("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,i=e.length,a=Zf;for(r=0;r<i;r++)if(!((t=a.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=Zf,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",i=0,a=e.length,o=Zf;for(t=0;t<a;t++)t%3==0&&t&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),eh=Object.prototype.hasOwnProperty,th=Object.prototype.toString;var rh=new Of("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],a=!1,"[object Object]"!==th.call(n))return!1;for(i in n)if(eh.call(n,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0},construct:function(e){return null!==e?e:[]}}),nh=Object.prototype.toString;var ih=new Of("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(n=o[t],"[object Object]"!==nh.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;a[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)n=o[t],i=Object.keys(n),a[t]=[i[0],n[i[0]]];return a}}),ah=Object.prototype.hasOwnProperty;var oh=new Of("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(ah.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),sh=Gf.extend({implicit:[Yf,Jf],explicit:[Xf,rh,ih,oh]}),ch=Object.prototype.hasOwnProperty,lh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uh=/[\x85\u2028\u2029]/,fh=/[,\[\]\{\}]/,hh=/^(?:!|!!|![a-z\-]+!)$/i,ph=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function dh(e){return Object.prototype.toString.call(e)}function mh(e){return 10===e||13===e}function gh(e){return 9===e||32===e}function vh(e){return 9===e||32===e||10===e||13===e}function yh(e){return 44===e||91===e||93===e||123===e||125===e}function bh(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function wh(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function xh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var kh=new Array(256),Eh=new Array(256),Sh=0;Sh<256;Sh++)kh[Sh]=wh(Sh)?1:0,Eh[Sh]=wh(Sh);function Ch(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||sh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ph(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Af(r),new Sf(t,r)}function Ah(e,t){throw Ph(e,t)}function _h(e,t){e.onWarning&&e.onWarning.call(null,Ph(e,t))}var Fh={YAML:function(e,t,r){var n,i,a;null!==e.version&&Ah(e,"duplication of %YAML directive"),1!==r.length&&Ah(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ah(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Ah(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&_h(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&Ah(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],hh.test(n)||Ah(e,"ill-formed tag handle (first argument) of the TAG directive"),ch.call(e.tagMap,n)&&Ah(e,'there is a previously declared suffix for "'+n+'" tag handle'),ph.test(i)||Ah(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){Ah(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function Oh(e,t,r,n){var i,a,o,s;if(t<r){if(s=e.input.slice(t,r),n)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||Ah(e,"expected valid JSON character");else lh.test(s)&&Ah(e,"the stream contains non-printable characters");e.result+=s}}function Ih(e,t,r,n){var i,a,o,s;for(xf.isObject(r)||Ah(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(r)).length;o<s;o+=1)a=i[o],ch.call(t,a)||(t[a]=r[a],n[a]=!0)}function Dh(e,t,r,n,i,a,o,s,c){var l,u;if(Array.isArray(i))for(l=0,u=(i=Array.prototype.slice.call(i)).length;l<u;l+=1)Array.isArray(i[l])&&Ah(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===dh(i[l])&&(i[l]="[object Object]");if("object"==typeof i&&"[object Object]"===dh(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)Ih(e,t,a[l],r);else Ih(e,t,a,r);else e.json||ch.call(r,i)||!ch.call(t,i)||(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,Ah(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete r[i];return t}function jh(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):Ah(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Rh(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;gh(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!mh(i))break;for(jh(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&_h(e,"deficient indentation"),n}function Th(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!vh(t)))}function Lh(e,t){1===t?e.result+=" ":t>1&&(e.result+=xf.repeat("\n",t-1))}function qh(e,t){var r,n,i=e.tag,a=e.anchor,o=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Ah(e,"tab characters must not be used in indentation")),45===n)&&vh(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Rh(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Nh(e,t,3,!1,!0),o.push(e.result),Rh(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)Ah(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=a,e.kind="sequence",e.result=o,!0)}function Mh(e){var t,r,n,i,a=!1,o=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&Ah(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(a=!0,i=e.input.charCodeAt(++e.position)):33===i?(o=!0,r="!!",i=e.input.charCodeAt(++e.position)):r="!",t=e.position,a){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):Ah(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!vh(i);)33===i&&(o?Ah(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),hh.test(r)||Ah(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),fh.test(n)&&Ah(e,"tag suffix cannot contain flow indicator characters")}n&&!ph.test(n)&&Ah(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){Ah(e,"tag name is malformed: "+n)}return a?e.tag=n:ch.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:Ah(e,'undeclared tag handle "'+r+'"'),!0}function zh(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&Ah(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!vh(r)&&!yh(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ah(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Nh(e,t,r,n,i){var a,o,s,c,l,u,f,h,p,d=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=4===r||3===r,n&&Rh(e,!0,-1)&&(m=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;Mh(e)||zh(e);)Rh(e,!0,-1)?(m=!0,s=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s&&(s=m||i),1!==d&&4!==r||(h=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===d?s&&(qh(e,p)||function(e,t,r){var n,i,a,o,s,c,l,u=e.tag,f=e.anchor,h={},p=Object.create(null),d=null,m=null,g=null,v=!1,y=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=h),l=e.input.charCodeAt(e.position);0!==l;){if(v||-1===e.firstTabInLine||(e.position=e.firstTabInLine,Ah(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,63!==l&&58!==l||!vh(n)){if(o=e.line,s=e.lineStart,c=e.position,!Nh(e,r,2,!1,!0))break;if(e.line===a){for(l=e.input.charCodeAt(e.position);gh(l);)l=e.input.charCodeAt(++e.position);if(58===l)vh(l=e.input.charCodeAt(++e.position))||Ah(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Dh(e,h,p,d,m,null,o,s,c),d=m=g=null),y=!0,v=!1,i=!1,d=e.tag,m=e.result;else{if(!y)return e.tag=u,e.anchor=f,!0;Ah(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return e.tag=u,e.anchor=f,!0;Ah(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===l?(v&&(Dh(e,h,p,d,m,null,o,s,c),d=m=g=null),y=!0,v=!0,i=!0):v?(v=!1,i=!0):Ah(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=n;if((e.line===a||e.lineIndent>t)&&(v&&(o=e.line,s=e.lineStart,c=e.position),Nh(e,t,4,!0,i)&&(v?m=e.result:g=e.result),v||(Dh(e,h,p,d,m,g,o,s,c),d=m=g=null),Rh(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==l)Ah(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&Dh(e,h,p,d,m,null,o,s,c),y&&(e.tag=u,e.anchor=f,e.kind="mapping",e.result=h),y}(e,p,h))||function(e,t){var r,n,i,a,o,s,c,l,u,f,h,p,d=!0,m=e.tag,g=e.anchor,v=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))o=93,l=!1,a=[];else{if(123!==p)return!1;o=125,l=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),p=e.input.charCodeAt(++e.position);0!==p;){if(Rh(e,!0,t),(p=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=m,e.anchor=g,e.kind=l?"mapping":"sequence",e.result=a,!0;d?44===p&&Ah(e,"expected the node content, but found ','"):Ah(e,"missed comma between flow collection entries"),h=null,s=c=!1,63===p&&vh(e.input.charCodeAt(e.position+1))&&(s=c=!0,e.position++,Rh(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Nh(e,t,1,!1,!0),f=e.tag,u=e.result,Rh(e,!0,t),p=e.input.charCodeAt(e.position),!c&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),Rh(e,!0,t),Nh(e,t,1,!1,!0),h=e.result),l?Dh(e,a,v,f,u,h,r,n,i):s?a.push(Dh(e,null,v,f,u,h,r,n,i)):a.push(u),Rh(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(d=!0,p=e.input.charCodeAt(++e.position)):d=!1}Ah(e,"unexpected end of the stream within a flow collection")}(e,h)?g=!0:(o&&function(e,t){var r,n,i,a,o,s=1,c=!1,l=!1,u=t,f=0,h=!1;if(124===(a=e.input.charCodeAt(e.position)))n=!1;else{if(62!==a)return!1;n=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===s?s=43===a?3:2:Ah(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(o=a)&&o<=57?o-48:-1)>=0))break;0===i?Ah(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ah(e,"repeat of an indentation width identifier"):(u=t+i-1,l=!0)}if(gh(a)){do{a=e.input.charCodeAt(++e.position)}while(gh(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!mh(a)&&0!==a)}for(;0!==a;){for(jh(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndent<u)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>u&&(u=e.lineIndent),mh(a))f++;else{if(e.lineIndent<u){3===s?e.result+=xf.repeat("\n",c?1+f:f):1===s&&c&&(e.result+="\n");break}for(n?gh(a)?(h=!0,e.result+=xf.repeat("\n",c?1+f:f)):h?(h=!1,e.result+=xf.repeat("\n",f+1)):0===f?c&&(e.result+=" "):e.result+=xf.repeat("\n",f):e.result+=xf.repeat("\n",c?1+f:f),c=!0,l=!0,f=0,r=e.position;!mh(a)&&0!==a;)a=e.input.charCodeAt(++e.position);Oh(e,r,e.position,!1)}}return!0}(e,h)||function(e,t){var r,n,i;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(Oh(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else mh(r)?(Oh(e,n,i,!0),Lh(e,Rh(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Th(e)?Ah(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Ah(e,"unexpected end of the stream within a single quoted scalar")}(e,h)||function(e,t){var r,n,i,a,o,s,c;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return Oh(e,r,e.position,!0),e.position++,!0;if(92===s){if(Oh(e,r,e.position,!0),mh(s=e.input.charCodeAt(++e.position)))Rh(e,!1,t);else if(s<256&&kh[s])e.result+=Eh[s],e.position++;else if((o=120===(c=s)?2:117===c?4:85===c?8:0)>0){for(i=o,a=0;i>0;i--)(o=bh(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+o:Ah(e,"expected hexadecimal character");e.result+=xh(a),e.position++}else Ah(e,"unknown escape sequence");r=n=e.position}else mh(s)?(Oh(e,r,n,!0),Lh(e,Rh(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Th(e)?Ah(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Ah(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!vh(n)&&!yh(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ah(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ch.call(e.anchorMap,r)||Ah(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Rh(e,!0,-1),!0}(e)?function(e,t,r){var n,i,a,o,s,c,l,u,f=e.kind,h=e.result;if(vh(u=e.input.charCodeAt(e.position))||yh(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(vh(n=e.input.charCodeAt(e.position+1))||r&&yh(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;0!==u;){if(58===u){if(vh(n=e.input.charCodeAt(e.position+1))||r&&yh(n))break}else if(35===u){if(vh(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Th(e)||r&&yh(u))break;if(mh(u)){if(s=e.line,c=e.lineStart,l=e.lineIndent,Rh(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=c,e.lineIndent=l;break}}o&&(Oh(e,i,a,!1),Lh(e,e.line-s),i=a=e.position,o=!1),gh(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Oh(e,i,a,!1),!!e.result||(e.kind=f,e.result=h,!1)}(e,h,1===r)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||Ah(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=s&&qh(e,p))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Ah(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((f=e.implicitTypes[c]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ch.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,c=0,l=(u=e.typeMap.multi[e.kind||"fallback"]).length;c<l;c+=1)if(e.tag.slice(0,u[c].tag.length)===u[c].tag){f=u[c];break}f||Ah(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&Ah(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Ah(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Bh(e){var t,r,n,i,a=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(Rh(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!vh(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&Ah(e,"directive name must not be less than one character in length");0!==i;){for(;gh(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!mh(i));break}if(mh(i))break;for(t=e.position;0!==i&&!vh(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&jh(e),ch.call(Fh,r)?Fh[r](e,r,n):_h(e,'unknown document directive "'+r+'"')}Rh(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Rh(e,!0,-1)):o&&Ah(e,"directives end mark is expected"),Nh(e,e.lineIndent-1,4,!1,!0),Rh(e,!0,-1),e.checkLineBreaks&&uh.test(e.input.slice(a,e.position))&&_h(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Th(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Rh(e,!0,-1)):e.position<e.length-1&&Ah(e,"end of the stream or a document separator is expected")}function $h(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new Ch(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,Ah(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Bh(r);return r.documents}var Uh={loadAll:function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=$h(e,r);if("function"!=typeof t)return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])},load:function(e,t){var r=$h(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Sf("expected a single document in the stream, but found more")}}},Hh=Object.prototype.toString,Vh=Object.prototype.hasOwnProperty,Qh={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Gh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Wh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Kh(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new Sf("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+xf.repeat("0",n-t.length)+t}function Yh(e){this.schema=e.schema||sh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xf.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,i,a,o,s,c;if(null===t)return{};for(r={},i=0,a=(n=Object.keys(t)).length;i<a;i+=1)o=n[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(c=e.compiledTypeMap.fallback[o])&&Vh.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Jh(e,t){for(var r,n=xf.repeat(" ",t),i=0,a=-1,o="",s=e.length;i<s;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=s):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(o+=n),o+=r;return o}function Zh(e,t){return"\n"+xf.repeat(" ",e.indent*t)}function Xh(e){return 32===e||9===e}function ep(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function tp(e){return ep(e)&&65279!==e&&13!==e&&10!==e}function rp(e,t,r){var n=tp(e),i=n&&!Xh(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||tp(t)&&!Xh(t)&&35===e||58===t&&i}function np(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function ip(e){return/^\n* /.test(e)}function ap(e,t,r,n,i,a,o,s){var c,l,u=0,f=null,h=!1,p=!1,d=-1!==n,m=-1,g=ep(l=np(e,0))&&65279!==l&&!Xh(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&function(e){return!Xh(e)&&58!==e}(np(e,e.length-1));if(t||o)for(c=0;c<e.length;u>=65536?c+=2:c++){if(!ep(u=np(e,c)))return 5;g=g&&rp(u,f,s),f=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(10===(u=np(e,c)))h=!0,d&&(p=p||c-m-1>n&&" "!==e[m+1],m=c);else if(!ep(u))return 5;g=g&&rp(u,f,s),f=u}p=p||d&&c-m-1>n&&" "!==e[m+1]}return h||p?r>9&&ip(e)?5:o?2===a?5:2:p?4:3:!g||o||i(e)?2===a?5:2:1}function op(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Gh.indexOf(t)||Wh.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=n||e.flowLevel>-1&&r>=e.flowLevel;switch(ap(t,s,e.indent,o,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+sp(t,e.indent)+cp(Jh(t,a));case 4:return">"+sp(t,e.indent)+cp(Jh(function(e,t){var r,n,i=/(\n+)([^\n]*)/g,a=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,lp(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];var s;for(;n=i.exec(e);){var c=n[1],l=n[2];r=" "===l[0],a+=c+(o||r||""===l?"":"\n")+lp(l,t),o=r}return a}(t,o),a));case 5:return'"'+function(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=np(e,i),!(t=Qh[n])&&ep(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Kh(n);return r}(t)+'"';default:throw new Sf("impossible error: invalid scalar style")}}()}function sp(e,t){var r=ip(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function cp(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function lp(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,c="";r=i.exec(e);)(s=r.index)-a>t&&(n=o>a?o:s,c+="\n"+e.slice(a,n),a=n+1),o=s;return c+="\n",e.length-a>t&&o>a?c+=e.slice(a,o)+"\n"+e.slice(o+1):c+=e.slice(a),c.slice(1)}function up(e,t,r,n){var i,a,o,s="",c=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(hp(e,t+1,o,!0,!0,!1,!0)||void 0===o&&hp(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Zh(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=c,e.dump=s||"[]"}function fp(e,t,r){var n,i,a,o,s,c;for(a=0,o=(i=r?e.explicitTypes:e.implicitTypes).length;a<o;a+=1)if(((s=i[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Hh.call(s.represent))n=s.represent(t,c);else{if(!Vh.call(s.represent,c))throw new Sf("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');n=s.represent[c](t,c)}e.dump=n}return!0}return!1}function hp(e,t,r,n,i,a,o){e.tag=null,e.dump=r,fp(e,r,!1)||fp(e,r,!0);var s,c=Hh.call(e.dump),l=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var u,f,h="[object Object]"===c||"[object Array]"===c;if(h&&(f=-1!==(u=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(i=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var i,a,o,s,c,l,u="",f=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new Sf("sortKeys must be a boolean or a function");for(i=0,a=h.length;i<a;i+=1)l="",n&&""===u||(l+=Zh(e,t)),s=r[o=h[i]],e.replacer&&(s=e.replacer.call(r,o,s)),hp(e,t+1,o,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=Zh(e,t)),hp(e,t+1,s,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",u+=l+=e.dump));e.tag=f,e.dump=u||"{}"}(e,t,e.dump,i),f&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,r){var n,i,a,o,s,c="",l=e.tag,u=Object.keys(r);for(n=0,i=u.length;n<i;n+=1)s="",""!==c&&(s+=", "),e.condenseFlow&&(s+='"'),o=r[a=u[n]],e.replacer&&(o=e.replacer.call(r,a,o)),hp(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),hp(e,t,o,!1,!1)&&(c+=s+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?up(e,t-1,e.dump,i):up(e,t,e.dump,i),f&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,r){var n,i,a,o="",s=e.tag;for(n=0,i=r.length;n<i;n+=1)a=r[n],e.replacer&&(a=e.replacer.call(r,String(n),a)),(hp(e,t,a,!1,!1)||void 0===a&&hp(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=s,e.dump="["+o+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new Sf("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&op(e,e.dump,t,a,l)}null!==e.tag&&"?"!==e.tag&&(s=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),s="!"===e.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",e.dump=s+" "+e.dump)}return!0}function pp(e,t){var r,n,i=[],a=[];for(dp(e,i,a),r=0,n=a.length;r<n;r+=1)t.duplicates.push(i[a[r]]);t.usedDuplicates=new Array(n)}function dp(e,t,r){var n,i,a;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)dp(e[i],t,r);else for(i=0,a=(n=Object.keys(e)).length;i<a;i+=1)dp(e[n[i]],t,r)}function mp(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var gp={Type:Of,Schema:jf,FAILSAFE_SCHEMA:qf,JSON_SCHEMA:Qf,CORE_SCHEMA:Gf,DEFAULT_SCHEMA:sh,load:Uh.load,loadAll:Uh.loadAll,dump:{dump:function(e,t){var r=new Yh(t=t||{});r.noRefs||pp(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),hp(r,0,n,!0,!0)?r.dump+"\n":""}}.dump,YAMLException:Sf,types:{binary:Xf,float:Vf,map:Lf,null:Mf,pairs:ih,set:oh,timestamp:Yf,bool:zf,int:$f,merge:Jf,omap:rh,seq:Tf,str:Rf},safeLoad:mp("safeLoad","load"),safeLoadAll:mp("safeLoadAll","loadAll"),safeDump:mp("safeDump","dump")};const vp=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class yp extends class{book;sourceFS;tmpFS;dest;options;plugins=[];context;constructor(e,t,r,n,i){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.context={book:e,sourceFS:t,tmpFS:r,request:se.request,logger:ne}}async generate(){await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.generateLogo(),await this.onSummary(),await this.callHook("summary"),await this.generateArticles(),await this.callHook("articles"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),ne.success("generation finished with success!")}async generateLogo(){if(!this.tmpFS.exist("logo.png")){const e=this.book.config.getValue("title","Untitled"),t=b.createCanvas(60,60);se.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile("logo.png",r)}}async generateArticles(){ne.info("generate articles ...");const e=this.book.summary.getArticles();ne.info(`found ${e.length} articles`);for(const t of e)if(t.ref){ne.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?ne.warn(`article file [${t.ref}] not exist`):ne.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async initPlugins(){this.plugins=await async function(e,t,r){const n=await se.validatePlugins(e,r),i=[];ne.info(`installing ${n.length} plugins from registry`);for(let e of n)try{if(e.disabled){ne.warn('plugin "'+e.name+'" has been disabled');continue}i.push(await bf(e,t))}catch(t){ne.warn('plugin "'+e.name+'" installed with fail'),ne.warn(t.message)}return i}(this.book,this.tmpFS.root,this.options.plugins)}async callHook(e,...t){return ne.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.context),t)}))}async makeFile(e,t){const r=await this.tmpFS.readAsString(t),n=this.parseFileMeta(t,r);return new se.File({path:e,...n})}parseFileMeta(e,t){const r=t.match(vp);let n={};if(r){if(void 0!==r[2])try{n=gp.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=j.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}{async onInit(){this.processSummary()}processSummary(){this.book.summary.getArticle((e=>(e.ref&&(e.path=function(e,t){e=r.posix.normalize(e);const n=r.posix.parse(e);return n.ext=t,n.base="",r.posix.format(n)}(e.ref,".json")),!1)))}async onArticle(e){if(e.ref){const t=await this.tmpFS.readAsString(e.ref);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.getPath(),JSON.stringify({title:e.title,content:t},null,4))}}async onSummary(){const e=this.book.summary;await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.writeFile("SUMMARY.json",JSON.stringify(e.toObject(),null,4))}async onFinish(){await this.packBook()}async packBook(){return ne.info("pack book ..."),new Promise(((e,t)=>{w.pack(this.tmpFS.root,{fromBase:!0,ignoreFiles:[".bookignore"]}).pipe(v.createWriteStream(this.dest)).on("error",(e=>{t(e)})).on("close",(()=>{e()}))}))}}class bp{root;constructor(e){this.root=e}readFileMTime(e){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=G.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n}async readFile(e){return await Y.default.readFile(this.resolve(e))}async readAsObject(e){try{return await Y.default.readJSON(this.resolve(e))}catch{return{}}}async readAsString(e){try{return await Y.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return Y.default.writeFile(this.resolve(e),t)}async appendFile(e,t){return Y.default.appendFile(this.resolve(e),t)}exist(e){return Y.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await Y.default.unlink(this.resolve(e))}catch{}}async readDir({path:e="",ignoreFiles:t=[".gitignore",".bookignore"]}={}){const r=[];return new Promise((n=>{J.default({path:this.resolve(e),ignoreFiles:t}).on("child",(function(e){r.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{n(r)}))}))}resolve(...e){return j.default.join(this.root,...e)}}class wp extends yp{template;scripts=["https://jsdelivr.topthink.com/npm/lodash@4.17/lodash.min.js","https://jsdelivr.topthink.com/npm/react@17/umd/react.production.min.js","https://jsdelivr.topthink.com/npm/react-dom@17/umd/react-dom.production.min.js"];stylesheets=[];headScripts=[];async onInit(){await super.onInit(),await this.installReader(),await this.copyPluginsAssets(),await this.initTemplate()}initTemplate(){const e=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Z.default.compile(e)}processSummary(){this.book.summary.getArticle((e=>{if(e.ref){const t=r.posix.parse(e.ref);e.path=r.posix.format({...t,name:S.pinyin(t.name,{toneType:"none",type:"array"}).join("-"),ext:".html",base:""})}return!1}))}async installReader(){ne.info("installing package @topwrite/reader ...");const{error:e}=G.default.sync("npm link @topwrite/reader",{stdio:["inherit"],cwd:this.tmpFS.root,shell:!0});if(e)throw e;await Y.default.copy(j.default.join(this.tmpFS.root,"node_modules","@topwrite","reader","dist"),j.default.join(this.tmpFS.root,"asset")),this.scripts.push("asset/index.js");const t=require(j.default.join(this.tmpFS.root,"node_modules","@topwrite","reader","package.json"));ne.info(`package @topwrite/reader@${t.version} installed with success`)}async copyPluginsAssets(){for(const e of this.plugins)await Y.default.copy(j.default.join(e.path,"dist"),j.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js`)}async onArticle(e){if(e.ref){const t=e.getPath(),r=await this.makeFile(t,e.ref),n=await this.renderFile(r,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(t,n)}}async onSummary(){const e=await this.makeFile("index.html","README.md"),t=await this.renderFile(e);await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t)}async renderFile(e,t){const r={book:{id:this.book.id},summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,options:{}},n=this.scripts.map((t=>se.isUrl(t)?t:e.relative(t))),i=this.headScripts.map((t=>se.isUrl(t)?t:e.relative(t))),a=this.stylesheets.map((t=>se.isUrl(t)?t:e.relative(t))),o=this.book.config.getValue("title","Untitled"),s=e.getMeta("title",t);return this.template({title:(s?`${s} - `:"")+o,keywords:e.getMeta("keywords"),description:e.getMeta("description"),stylesheets:a,headScripts:i,scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const xp=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class kp extends X.default.ResourceLoader{fs;constructor(e){super(),this.fs=e}fetch(e,t){return super.fetch(e,t)}}const Ep={json:yp,html:wp,ebook:class extends wp{async initPlugins(){this.book.config.setValue("theme","ebook"),await super.initPlugins()}createDOM(e,t){const r=new kp(this.tmpFS),n=new P.VirtualConsole;return n.sendTo(console,{omitJSDOMErrors:!0}),new P.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0})}async renderHtml(e,t){const r=this.createDOM(e,t);return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),a=(t,o)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?o(e):a(t,o)}}),r)};return new Promise(a)}((()=>{const e=r.window.document.getElementById("root");if(e&&e.innerHTML){for(const e of Array.from(r.window.document.scripts))e.remove();return r.serialize()}throw new Error("render html timeout")}),{stopAfter:2e3,tryEvery:100})}getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-title')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-1 ')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-2 ')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-3 ')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-header.ejs"),"utf-8"),n=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-footer.ejs"),"utf-8");r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=e,r["pdf-footer-template"]=n}return r}async packBook(){const e=j.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await C.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const a=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",a=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+a,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},o=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=a;if((!Array.isArray(t.excludes)||!xp(t.excludes,r))&&(!Array.isArray(t.includes)||xp(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=o),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(this.getConvertOptions(e));return r.unshift(this.tmpFS.resolve("index.html"),this.dest),new Promise(((e,n)=>{ne.info("convert book ...");const i=G.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root});i.stdout?.on("data",(e=>{console.debug(e.toString().trimEnd())})),i.stderr?.on("data",(e=>{console.error(e.toString().trimEnd())})),i.on("close",(t=>{0!==t?n("Convert failed"):e()}))}))}}};var Sp=ee.default,Cp=process.cwd,Pp=null,Ap=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Pp||(Pp=Cp.call(process)),Pp};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var _p=process.chdir;process.chdir=function(e){Pp=null,_p.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,_p)}var Fp=function(e){Sp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,Sp.O_WRONLY|Sp.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,Sp.O_WRONLY|Sp.O_SYMLINK,r),a=!0;try{n=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){Sp.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,n,i){e.open(t,Sp.O_SYMLINK,(function(t,a){t?i&&i(t):e.futimes(a,r,n,(function(t){e.close(a,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,a=e.openSync(t,Sp.O_SYMLINK),o=!0;try{i=e.futimesSync(a,r,n),o=!1}finally{if(o)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=s(e.statSync),e.fstatSync=s(e.fstatSync),e.lstatSync=s(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Ap&&(e.rename=(t=e.rename,function(r,n,i){var a=Date.now(),o=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-a<6e4)return setTimeout((function(){e.stat(n,(function(e,a){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}));var t;function r(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){c(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!c(e))throw e}}:t}function i(t){return t?function(r,n,i,a){return t.call(e,r,n,i,(function(e){c(e)&&(e=null),a&&a.apply(this,arguments)}))}:t}function a(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!c(e))throw e}}:t}function o(t){return t?function(r,n,i){function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,a):t.call(e,r,a)}:t}function s(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:t}function c(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function r(r,n,i,a,o,s){var c;if(s&&"function"==typeof s){var l=0;c=function(u,f,h){if(u&&"EAGAIN"===u.code&&l<10)return l++,t.call(e,r,n,i,a,o,c);s.apply(this,arguments)}}return t.call(e,r,n,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync=(l=e.readSync,function(t,r,n,i,a){for(var o=0;;)try{return l.call(e,t,r,n,i,a)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var l};var Op=$.default.Stream,Ip=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Op.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var a=Object.keys(n),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Op.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),a=0,o=i.length;a<o;a++){var s=i[a];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Dp=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:jp(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},jp=Object.getPrototypeOf||function(e){return e.__proto__};var Rp,Tp,Lp=K.default,qp=Fp,Mp=Ip,zp=Dp,Np=H.default;function Bp(e,t){Object.defineProperty(e,Rp,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Rp=Symbol.for("graceful-fs.queue"),Tp=Symbol.for("graceful-fs.previous")):(Rp="___graceful-fs.queue",Tp="___graceful-fs.previous");var $p=function(){};if(Np.debuglog?$p=Np.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&($p=function(){var e=Np.format.apply(Np,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Lp[Rp]){var Up=ie[Rp]||[];Bp(Lp,Up),Lp.close=function(e){function t(t,r){return e.call(Lp,t,(function(e){e||Wp(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Tp,{value:e}),t}(Lp.close),Lp.closeSync=function(e){function t(t){e.apply(Lp,arguments),Wp()}return Object.defineProperty(t,Tp,{value:e}),t}(Lp.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){$p(Lp[Rp]),z.default.equal(Lp[Rp].length,0)}))}ie[Rp]||Bp(ie,Lp[Rp]);var Hp,Vp=Qp(zp(Lp));function Qp(e){qp(e),e.gracefulify=Qp,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Gp([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):Gp([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var o=Mp(e);f=o.ReadStream,h=o.WriteStream}var s=e.ReadStream;s&&(f.prototype=Object.create(s.prototype),f.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var c=e.WriteStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0});var l=f;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var u=h;function f(e,t){return this instanceof f?(s.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var p=e.open;function d(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return p(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):Gp([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=d,e}function Gp(e){$p("ENQUEUE",e[0].name,e[1]),Lp[Rp].push(e),Kp()}function Wp(){for(var e=Date.now(),t=0;t<Lp[Rp].length;++t)Lp[Rp][t].length>2&&(Lp[Rp][t][3]=e,Lp[Rp][t][4]=e);Kp()}function Kp(){if(clearTimeout(Hp),Hp=void 0,0!==Lp[Rp].length){var e=Lp[Rp].shift(),t=e[0],r=e[1],n=e[2],i=e[3],a=e[4];if(void 0===i)$p("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){$p("TIMEOUT",t.name,r);var o=r.pop();"function"==typeof o&&o.call(null,n)}else{var s=Date.now()-a,c=Math.max(a-i,1);s>=Math.min(1.2*c,100)?($p("RETRY",t.name,r),t.apply(null,r.concat([i]))):Lp[Rp].push(e)}void 0===Hp&&(Hp=setTimeout(Kp,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Lp.__patched&&(Vp=Qp(Lp),Lp.__patched=!0);var Yp=Vp;const Jp=V.default.homedir(),{env:Zp}=process,Xp=Zp.XDG_DATA_HOME||(Jp?j.default.join(Jp,".local","share"):void 0),ed=Zp.XDG_CONFIG_HOME||(Jp?j.default.join(Jp,".config"):void 0);Zp.XDG_STATE_HOME||Jp&&j.default.join(Jp,".local","state"),Zp.XDG_CACHE_HOME||Jp&&j.default.join(Jp,".cache"),Zp.XDG_RUNTIME_DIR;const td=(Zp.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Xp&&td.unshift(Xp);const rd=(Zp.XDG_CONFIG_DIRS||"/etc/xdg").split(":");ed&&rd.unshift(ed);var nd={exports:{}},id={exports:{}};
|
|
10
|
+
function wf(e){return null==e}var xf={isNothing:wf,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:wf(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var r,n,i,a;if(t)for(r=0,n=(a=Object.keys(t)).length;r<n;r+=1)e[i=a[r]]=t[i];return e}};function kf(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function Ef(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=kf(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Ef.prototype=Object.create(Error.prototype),Ef.prototype.constructor=Ef,Ef.prototype.toString=function(e){return this.name+": "+kf(this,e)};var Sf=Ef;function Cf(e,t,r,n,i){var a="",o="",s=Math.floor(i/2)-1;return n-t>s&&(t=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+a.length}}function Pf(e,t){return xf.repeat(" ",t-e.length)+e}var Af=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,c,l="",u=Math.min(e.line+t.linesAfter,a.length).toString().length,f=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(o-s<0);s++)c=Cf(e.buffer,i[o-s],a[o-s],e.position-(i[o]-i[o-s]),f),l=xf.repeat(" ",t.indent)+Pf((e.line-s+1).toString(),u)+" | "+c.str+"\n"+l;for(c=Cf(e.buffer,i[o],a[o],e.position,f),l+=xf.repeat(" ",t.indent)+Pf((e.line+1).toString(),u)+" | "+c.str+"\n",l+=xf.repeat("-",t.indent+u+3+c.pos)+"^\n",s=1;s<=t.linesAfter&&!(o+s>=a.length);s++)c=Cf(e.buffer,i[o+s],a[o+s],e.position-(i[o]-i[o+s]),f),l+=xf.repeat(" ",t.indent)+Pf((e.line+s+1).toString(),u)+" | "+c.str+"\n";return l.replace(/\n$/,"")},_f=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ff=["scalar","sequence","mapping"];var Of=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===_f.indexOf(t))throw new Sf('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===Ff.indexOf(this.kind))throw new Sf('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function If(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function Df(e){return this.extend(e)}Df.prototype.extend=function(e){var t=[],r=[];if(e instanceof Of)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Sf("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof Of))throw new Sf("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Sf("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new Sf("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof Of))throw new Sf("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(Df.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=If(n,"implicit"),n.compiledExplicit=If(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(n.compiledImplicit,n.compiledExplicit),n};var jf=Df,Rf=new Of("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),Tf=new Of("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),Lf=new Of("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),qf=new jf({explicit:[Rf,Tf,Lf]});var Mf=new Of("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var zf=new Of("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Nf(e){return 48<=e&&e<=55}function Bf(e){return 48<=e&&e<=57}var $f=new Of("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,i=0,a=!1;if(!n)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===n)return!0;if("b"===(t=e[++i])){for(i++;i<n;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;a=!0}return a&&"_"!==t}if("x"===t){for(i++;i<n;i++)if("_"!==(t=e[i])){if(!(48<=(r=e.charCodeAt(i))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;a=!0}return a&&"_"!==t}if("o"===t){for(i++;i<n;i++)if("_"!==(t=e[i])){if(!Nf(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}}if("_"===t)return!1;for(;i<n;i++)if("_"!==(t=e[i])){if(!Bf(e.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!xf.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Uf=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Hf=/^[-+]?[0-9]+e/;var Vf=new Of("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!Uf.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||xf.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xf.isNegativeZero(e))return"-0.0";return r=e.toString(10),Hf.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),Qf=qf.extend({implicit:[Mf,zf,$f,Vf]}),Gf=Qf,Wf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Yf=new Of("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Wf.exec(e)||null!==Kf.exec(e))},construct:function(e){var t,r,n,i,a,o,s,c,l=0,u=null;if(null===(t=Wf.exec(e))&&(t=Kf.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var Jf=new Of("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),Zf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Xf=new Of("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,i=e.length,a=Zf;for(r=0;r<i;r++)if(!((t=a.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=Zf,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",i=0,a=e.length,o=Zf;for(t=0;t<a;t++)t%3==0&&t&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),eh=Object.prototype.hasOwnProperty,th=Object.prototype.toString;var rh=new Of("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],a=!1,"[object Object]"!==th.call(n))return!1;for(i in n)if(eh.call(n,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0},construct:function(e){return null!==e?e:[]}}),nh=Object.prototype.toString;var ih=new Of("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(n=o[t],"[object Object]"!==nh.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;a[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)n=o[t],i=Object.keys(n),a[t]=[i[0],n[i[0]]];return a}}),ah=Object.prototype.hasOwnProperty;var oh=new Of("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(ah.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),sh=Gf.extend({implicit:[Yf,Jf],explicit:[Xf,rh,ih,oh]}),ch=Object.prototype.hasOwnProperty,lh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uh=/[\x85\u2028\u2029]/,fh=/[,\[\]\{\}]/,hh=/^(?:!|!!|![a-z\-]+!)$/i,ph=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function dh(e){return Object.prototype.toString.call(e)}function mh(e){return 10===e||13===e}function gh(e){return 9===e||32===e}function vh(e){return 9===e||32===e||10===e||13===e}function yh(e){return 44===e||91===e||93===e||123===e||125===e}function bh(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function wh(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function xh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var kh=new Array(256),Eh=new Array(256),Sh=0;Sh<256;Sh++)kh[Sh]=wh(Sh)?1:0,Eh[Sh]=wh(Sh);function Ch(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||sh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ph(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Af(r),new Sf(t,r)}function Ah(e,t){throw Ph(e,t)}function _h(e,t){e.onWarning&&e.onWarning.call(null,Ph(e,t))}var Fh={YAML:function(e,t,r){var n,i,a;null!==e.version&&Ah(e,"duplication of %YAML directive"),1!==r.length&&Ah(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ah(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Ah(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&_h(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&Ah(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],hh.test(n)||Ah(e,"ill-formed tag handle (first argument) of the TAG directive"),ch.call(e.tagMap,n)&&Ah(e,'there is a previously declared suffix for "'+n+'" tag handle'),ph.test(i)||Ah(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){Ah(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function Oh(e,t,r,n){var i,a,o,s;if(t<r){if(s=e.input.slice(t,r),n)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||Ah(e,"expected valid JSON character");else lh.test(s)&&Ah(e,"the stream contains non-printable characters");e.result+=s}}function Ih(e,t,r,n){var i,a,o,s;for(xf.isObject(r)||Ah(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(r)).length;o<s;o+=1)a=i[o],ch.call(t,a)||(t[a]=r[a],n[a]=!0)}function Dh(e,t,r,n,i,a,o,s,c){var l,u;if(Array.isArray(i))for(l=0,u=(i=Array.prototype.slice.call(i)).length;l<u;l+=1)Array.isArray(i[l])&&Ah(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===dh(i[l])&&(i[l]="[object Object]");if("object"==typeof i&&"[object Object]"===dh(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)Ih(e,t,a[l],r);else Ih(e,t,a,r);else e.json||ch.call(r,i)||!ch.call(t,i)||(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,Ah(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete r[i];return t}function jh(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):Ah(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Rh(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;gh(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!mh(i))break;for(jh(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&_h(e,"deficient indentation"),n}function Th(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!vh(t)))}function Lh(e,t){1===t?e.result+=" ":t>1&&(e.result+=xf.repeat("\n",t-1))}function qh(e,t){var r,n,i=e.tag,a=e.anchor,o=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Ah(e,"tab characters must not be used in indentation")),45===n)&&vh(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Rh(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Nh(e,t,3,!1,!0),o.push(e.result),Rh(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)Ah(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=a,e.kind="sequence",e.result=o,!0)}function Mh(e){var t,r,n,i,a=!1,o=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&Ah(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(a=!0,i=e.input.charCodeAt(++e.position)):33===i?(o=!0,r="!!",i=e.input.charCodeAt(++e.position)):r="!",t=e.position,a){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):Ah(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!vh(i);)33===i&&(o?Ah(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),hh.test(r)||Ah(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),fh.test(n)&&Ah(e,"tag suffix cannot contain flow indicator characters")}n&&!ph.test(n)&&Ah(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){Ah(e,"tag name is malformed: "+n)}return a?e.tag=n:ch.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:Ah(e,'undeclared tag handle "'+r+'"'),!0}function zh(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&Ah(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!vh(r)&&!yh(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ah(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Nh(e,t,r,n,i){var a,o,s,c,l,u,f,h,p,d=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=4===r||3===r,n&&Rh(e,!0,-1)&&(m=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;Mh(e)||zh(e);)Rh(e,!0,-1)?(m=!0,s=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s&&(s=m||i),1!==d&&4!==r||(h=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===d?s&&(qh(e,p)||function(e,t,r){var n,i,a,o,s,c,l,u=e.tag,f=e.anchor,h={},p=Object.create(null),d=null,m=null,g=null,v=!1,y=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=h),l=e.input.charCodeAt(e.position);0!==l;){if(v||-1===e.firstTabInLine||(e.position=e.firstTabInLine,Ah(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,63!==l&&58!==l||!vh(n)){if(o=e.line,s=e.lineStart,c=e.position,!Nh(e,r,2,!1,!0))break;if(e.line===a){for(l=e.input.charCodeAt(e.position);gh(l);)l=e.input.charCodeAt(++e.position);if(58===l)vh(l=e.input.charCodeAt(++e.position))||Ah(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Dh(e,h,p,d,m,null,o,s,c),d=m=g=null),y=!0,v=!1,i=!1,d=e.tag,m=e.result;else{if(!y)return e.tag=u,e.anchor=f,!0;Ah(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return e.tag=u,e.anchor=f,!0;Ah(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===l?(v&&(Dh(e,h,p,d,m,null,o,s,c),d=m=g=null),y=!0,v=!0,i=!0):v?(v=!1,i=!0):Ah(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=n;if((e.line===a||e.lineIndent>t)&&(v&&(o=e.line,s=e.lineStart,c=e.position),Nh(e,t,4,!0,i)&&(v?m=e.result:g=e.result),v||(Dh(e,h,p,d,m,g,o,s,c),d=m=g=null),Rh(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==l)Ah(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&Dh(e,h,p,d,m,null,o,s,c),y&&(e.tag=u,e.anchor=f,e.kind="mapping",e.result=h),y}(e,p,h))||function(e,t){var r,n,i,a,o,s,c,l,u,f,h,p,d=!0,m=e.tag,g=e.anchor,v=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))o=93,l=!1,a=[];else{if(123!==p)return!1;o=125,l=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),p=e.input.charCodeAt(++e.position);0!==p;){if(Rh(e,!0,t),(p=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=m,e.anchor=g,e.kind=l?"mapping":"sequence",e.result=a,!0;d?44===p&&Ah(e,"expected the node content, but found ','"):Ah(e,"missed comma between flow collection entries"),h=null,s=c=!1,63===p&&vh(e.input.charCodeAt(e.position+1))&&(s=c=!0,e.position++,Rh(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Nh(e,t,1,!1,!0),f=e.tag,u=e.result,Rh(e,!0,t),p=e.input.charCodeAt(e.position),!c&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),Rh(e,!0,t),Nh(e,t,1,!1,!0),h=e.result),l?Dh(e,a,v,f,u,h,r,n,i):s?a.push(Dh(e,null,v,f,u,h,r,n,i)):a.push(u),Rh(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(d=!0,p=e.input.charCodeAt(++e.position)):d=!1}Ah(e,"unexpected end of the stream within a flow collection")}(e,h)?g=!0:(o&&function(e,t){var r,n,i,a,o,s=1,c=!1,l=!1,u=t,f=0,h=!1;if(124===(a=e.input.charCodeAt(e.position)))n=!1;else{if(62!==a)return!1;n=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===s?s=43===a?3:2:Ah(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(o=a)&&o<=57?o-48:-1)>=0))break;0===i?Ah(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ah(e,"repeat of an indentation width identifier"):(u=t+i-1,l=!0)}if(gh(a)){do{a=e.input.charCodeAt(++e.position)}while(gh(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!mh(a)&&0!==a)}for(;0!==a;){for(jh(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndent<u)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>u&&(u=e.lineIndent),mh(a))f++;else{if(e.lineIndent<u){3===s?e.result+=xf.repeat("\n",c?1+f:f):1===s&&c&&(e.result+="\n");break}for(n?gh(a)?(h=!0,e.result+=xf.repeat("\n",c?1+f:f)):h?(h=!1,e.result+=xf.repeat("\n",f+1)):0===f?c&&(e.result+=" "):e.result+=xf.repeat("\n",f):e.result+=xf.repeat("\n",c?1+f:f),c=!0,l=!0,f=0,r=e.position;!mh(a)&&0!==a;)a=e.input.charCodeAt(++e.position);Oh(e,r,e.position,!1)}}return!0}(e,h)||function(e,t){var r,n,i;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(Oh(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else mh(r)?(Oh(e,n,i,!0),Lh(e,Rh(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Th(e)?Ah(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Ah(e,"unexpected end of the stream within a single quoted scalar")}(e,h)||function(e,t){var r,n,i,a,o,s,c;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return Oh(e,r,e.position,!0),e.position++,!0;if(92===s){if(Oh(e,r,e.position,!0),mh(s=e.input.charCodeAt(++e.position)))Rh(e,!1,t);else if(s<256&&kh[s])e.result+=Eh[s],e.position++;else if((o=120===(c=s)?2:117===c?4:85===c?8:0)>0){for(i=o,a=0;i>0;i--)(o=bh(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+o:Ah(e,"expected hexadecimal character");e.result+=xh(a),e.position++}else Ah(e,"unknown escape sequence");r=n=e.position}else mh(s)?(Oh(e,r,n,!0),Lh(e,Rh(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Th(e)?Ah(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Ah(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!vh(n)&&!yh(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ah(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ch.call(e.anchorMap,r)||Ah(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Rh(e,!0,-1),!0}(e)?function(e,t,r){var n,i,a,o,s,c,l,u,f=e.kind,h=e.result;if(vh(u=e.input.charCodeAt(e.position))||yh(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(vh(n=e.input.charCodeAt(e.position+1))||r&&yh(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;0!==u;){if(58===u){if(vh(n=e.input.charCodeAt(e.position+1))||r&&yh(n))break}else if(35===u){if(vh(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Th(e)||r&&yh(u))break;if(mh(u)){if(s=e.line,c=e.lineStart,l=e.lineIndent,Rh(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=c,e.lineIndent=l;break}}o&&(Oh(e,i,a,!1),Lh(e,e.line-s),i=a=e.position,o=!1),gh(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Oh(e,i,a,!1),!!e.result||(e.kind=f,e.result=h,!1)}(e,h,1===r)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||Ah(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=s&&qh(e,p))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Ah(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((f=e.implicitTypes[c]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ch.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,c=0,l=(u=e.typeMap.multi[e.kind||"fallback"]).length;c<l;c+=1)if(e.tag.slice(0,u[c].tag.length)===u[c].tag){f=u[c];break}f||Ah(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&Ah(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Ah(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Bh(e){var t,r,n,i,a=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(Rh(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!vh(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&Ah(e,"directive name must not be less than one character in length");0!==i;){for(;gh(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!mh(i));break}if(mh(i))break;for(t=e.position;0!==i&&!vh(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&jh(e),ch.call(Fh,r)?Fh[r](e,r,n):_h(e,'unknown document directive "'+r+'"')}Rh(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Rh(e,!0,-1)):o&&Ah(e,"directives end mark is expected"),Nh(e,e.lineIndent-1,4,!1,!0),Rh(e,!0,-1),e.checkLineBreaks&&uh.test(e.input.slice(a,e.position))&&_h(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Th(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Rh(e,!0,-1)):e.position<e.length-1&&Ah(e,"end of the stream or a document separator is expected")}function $h(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new Ch(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,Ah(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Bh(r);return r.documents}var Uh={loadAll:function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=$h(e,r);if("function"!=typeof t)return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])},load:function(e,t){var r=$h(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Sf("expected a single document in the stream, but found more")}}},Hh=Object.prototype.toString,Vh=Object.prototype.hasOwnProperty,Qh={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Gh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Wh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Kh(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new Sf("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+xf.repeat("0",n-t.length)+t}function Yh(e){this.schema=e.schema||sh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xf.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,i,a,o,s,c;if(null===t)return{};for(r={},i=0,a=(n=Object.keys(t)).length;i<a;i+=1)o=n[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(c=e.compiledTypeMap.fallback[o])&&Vh.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Jh(e,t){for(var r,n=xf.repeat(" ",t),i=0,a=-1,o="",s=e.length;i<s;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=s):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(o+=n),o+=r;return o}function Zh(e,t){return"\n"+xf.repeat(" ",e.indent*t)}function Xh(e){return 32===e||9===e}function ep(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function tp(e){return ep(e)&&65279!==e&&13!==e&&10!==e}function rp(e,t,r){var n=tp(e),i=n&&!Xh(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||tp(t)&&!Xh(t)&&35===e||58===t&&i}function np(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function ip(e){return/^\n* /.test(e)}function ap(e,t,r,n,i,a,o,s){var c,l,u=0,f=null,h=!1,p=!1,d=-1!==n,m=-1,g=ep(l=np(e,0))&&65279!==l&&!Xh(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&function(e){return!Xh(e)&&58!==e}(np(e,e.length-1));if(t||o)for(c=0;c<e.length;u>=65536?c+=2:c++){if(!ep(u=np(e,c)))return 5;g=g&&rp(u,f,s),f=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(10===(u=np(e,c)))h=!0,d&&(p=p||c-m-1>n&&" "!==e[m+1],m=c);else if(!ep(u))return 5;g=g&&rp(u,f,s),f=u}p=p||d&&c-m-1>n&&" "!==e[m+1]}return h||p?r>9&&ip(e)?5:o?2===a?5:2:p?4:3:!g||o||i(e)?2===a?5:2:1}function op(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Gh.indexOf(t)||Wh.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=n||e.flowLevel>-1&&r>=e.flowLevel;switch(ap(t,s,e.indent,o,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+sp(t,e.indent)+cp(Jh(t,a));case 4:return">"+sp(t,e.indent)+cp(Jh(function(e,t){var r,n,i=/(\n+)([^\n]*)/g,a=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,lp(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];var s;for(;n=i.exec(e);){var c=n[1],l=n[2];r=" "===l[0],a+=c+(o||r||""===l?"":"\n")+lp(l,t),o=r}return a}(t,o),a));case 5:return'"'+function(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=np(e,i),!(t=Qh[n])&&ep(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Kh(n);return r}(t)+'"';default:throw new Sf("impossible error: invalid scalar style")}}()}function sp(e,t){var r=ip(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function cp(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function lp(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,c="";r=i.exec(e);)(s=r.index)-a>t&&(n=o>a?o:s,c+="\n"+e.slice(a,n),a=n+1),o=s;return c+="\n",e.length-a>t&&o>a?c+=e.slice(a,o)+"\n"+e.slice(o+1):c+=e.slice(a),c.slice(1)}function up(e,t,r,n){var i,a,o,s="",c=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(hp(e,t+1,o,!0,!0,!1,!0)||void 0===o&&hp(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Zh(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=c,e.dump=s||"[]"}function fp(e,t,r){var n,i,a,o,s,c;for(a=0,o=(i=r?e.explicitTypes:e.implicitTypes).length;a<o;a+=1)if(((s=i[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Hh.call(s.represent))n=s.represent(t,c);else{if(!Vh.call(s.represent,c))throw new Sf("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');n=s.represent[c](t,c)}e.dump=n}return!0}return!1}function hp(e,t,r,n,i,a,o){e.tag=null,e.dump=r,fp(e,r,!1)||fp(e,r,!0);var s,c=Hh.call(e.dump),l=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var u,f,h="[object Object]"===c||"[object Array]"===c;if(h&&(f=-1!==(u=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(i=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var i,a,o,s,c,l,u="",f=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new Sf("sortKeys must be a boolean or a function");for(i=0,a=h.length;i<a;i+=1)l="",n&&""===u||(l+=Zh(e,t)),s=r[o=h[i]],e.replacer&&(s=e.replacer.call(r,o,s)),hp(e,t+1,o,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=Zh(e,t)),hp(e,t+1,s,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",u+=l+=e.dump));e.tag=f,e.dump=u||"{}"}(e,t,e.dump,i),f&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,r){var n,i,a,o,s,c="",l=e.tag,u=Object.keys(r);for(n=0,i=u.length;n<i;n+=1)s="",""!==c&&(s+=", "),e.condenseFlow&&(s+='"'),o=r[a=u[n]],e.replacer&&(o=e.replacer.call(r,a,o)),hp(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),hp(e,t,o,!1,!1)&&(c+=s+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?up(e,t-1,e.dump,i):up(e,t,e.dump,i),f&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,r){var n,i,a,o="",s=e.tag;for(n=0,i=r.length;n<i;n+=1)a=r[n],e.replacer&&(a=e.replacer.call(r,String(n),a)),(hp(e,t,a,!1,!1)||void 0===a&&hp(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=s,e.dump="["+o+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new Sf("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&op(e,e.dump,t,a,l)}null!==e.tag&&"?"!==e.tag&&(s=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),s="!"===e.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",e.dump=s+" "+e.dump)}return!0}function pp(e,t){var r,n,i=[],a=[];for(dp(e,i,a),r=0,n=a.length;r<n;r+=1)t.duplicates.push(i[a[r]]);t.usedDuplicates=new Array(n)}function dp(e,t,r){var n,i,a;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)dp(e[i],t,r);else for(i=0,a=(n=Object.keys(e)).length;i<a;i+=1)dp(e[n[i]],t,r)}function mp(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var gp={Type:Of,Schema:jf,FAILSAFE_SCHEMA:qf,JSON_SCHEMA:Qf,CORE_SCHEMA:Gf,DEFAULT_SCHEMA:sh,load:Uh.load,loadAll:Uh.loadAll,dump:{dump:function(e,t){var r=new Yh(t=t||{});r.noRefs||pp(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),hp(r,0,n,!0,!0)?r.dump+"\n":""}}.dump,YAMLException:Sf,types:{binary:Xf,float:Vf,map:Lf,null:Mf,pairs:ih,set:oh,timestamp:Yf,bool:zf,int:$f,merge:Jf,omap:rh,seq:Tf,str:Rf},safeLoad:mp("safeLoad","load"),safeLoadAll:mp("safeLoadAll","loadAll"),safeDump:mp("safeDump","dump")};const vp=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class yp extends class{book;sourceFS;tmpFS;dest;options;plugins=[];context;constructor(e,t,r,n,i){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.context={book:e,sourceFS:t,tmpFS:r,request:se.request,logger:ne}}async generate(){await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.generateLogo(),await this.onSummary(),await this.callHook("summary"),await this.generateArticles(),await this.callHook("articles"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),ne.success("generation finished with success!")}async generateLogo(){if(!this.tmpFS.exist("logo.png")){const e=this.book.config.getValue("title","Untitled"),t=b.createCanvas(60,60);se.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile("logo.png",r)}}async generateArticles(){ne.info("generate articles ...");const e=this.book.summary.getArticles();ne.info(`found ${e.length} articles`);for(const t of e)if(t.ref){ne.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?ne.warn(`article file [${t.ref}] not exist`):ne.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async initPlugins(){this.plugins=await async function(e,t,r){const n=await se.validatePlugins(e,r),i=[];ne.info(`installing ${n.length} plugins from registry`);for(let e of n)try{if(e.disabled){ne.warn('plugin "'+e.name+'" has been disabled');continue}i.push(await bf(e,t))}catch(t){ne.warn('plugin "'+e.name+'" installed with fail'),ne.warn(t.message)}return i}(this.book,this.tmpFS.root,this.options.plugins)}async callHook(e,...t){return ne.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.context),t)}))}async makeFile(e,t){const r=await this.tmpFS.readAsString(t),n=this.parseFileMeta(t,r);return new se.File({path:e,...n})}parseFileMeta(e,t){const r=t.match(vp);let n={};if(r){if(void 0!==r[2])try{n=gp.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=j.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}{async onInit(){this.processSummary()}processSummary(){this.book.summary.getArticle((e=>(e.ref&&(e.path=function(e,t){e=r.posix.normalize(e);const n=r.posix.parse(e);return n.ext=t,n.base="",r.posix.format(n)}(e.ref,".json")),!1)))}async onArticle(e){if(e.ref){const t=await this.tmpFS.readAsString(e.ref);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.getPath(),JSON.stringify({title:e.title,content:t},null,4))}}async onSummary(){const e=this.book.summary;await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.writeFile("SUMMARY.json",JSON.stringify(e.toObject(),null,4))}async onFinish(){await this.packBook()}async packBook(){return ne.info("pack book ..."),new Promise(((e,t)=>{w.pack(this.tmpFS.root,{fromBase:!0,ignoreFiles:[".bookignore"]}).pipe(v.createWriteStream(this.dest)).on("error",(e=>{t(e)})).on("close",(()=>{e()}))}))}}class bp{root;constructor(e){this.root=e}readFileMTime(e){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=G.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n}async readFile(e){return await Y.default.readFile(this.resolve(e))}async readAsObject(e){try{return await Y.default.readJSON(this.resolve(e))}catch{return{}}}async readAsString(e){try{return await Y.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return Y.default.writeFile(this.resolve(e),t)}async appendFile(e,t){return Y.default.appendFile(this.resolve(e),t)}exist(e){return Y.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await Y.default.unlink(this.resolve(e))}catch{}}async readDir({path:e="",ignoreFiles:t=[".gitignore",".bookignore"]}={}){const r=[];return new Promise((n=>{J.default({path:this.resolve(e),ignoreFiles:t}).on("child",(function(e){r.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{n(r)}))}))}resolve(...e){return j.default.join(this.root,...e)}}class wp extends yp{template;scripts=["https://jsdelivr.topthink.com/npm/lodash@4.17/lodash.min.js","https://jsdelivr.topthink.com/npm/react@17/umd/react.production.min.js","https://jsdelivr.topthink.com/npm/react-dom@17/umd/react-dom.production.min.js"];stylesheets=[];headScripts=[];async onInit(){await super.onInit(),await this.installReader(),await this.copyPluginsAssets(),await this.initTemplate()}initTemplate(){const e=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Z.default.compile(e)}processSummary(){this.book.summary.getArticle((e=>{if(e.ref){const t=r.posix.parse(e.ref);e.path=r.posix.format({...t,name:S.pinyin(t.name,{toneType:"none",type:"array"}).join("-"),ext:".html",base:""})}return!1}))}async installReader(){ne.info("installing package @topwrite/reader ...");const{error:e}=G.default.sync("npm link @topwrite/reader",{stdio:["inherit"],cwd:this.tmpFS.root,shell:!0});if(e)throw e;await Y.default.copy(j.default.join(this.tmpFS.root,"node_modules","@topwrite","reader","dist"),j.default.join(this.tmpFS.root,"asset")),this.scripts.push("asset/index.js");const t=require(j.default.join(this.tmpFS.root,"node_modules","@topwrite","reader","package.json"));ne.info(`package @topwrite/reader@${t.version} installed with success`)}async copyPluginsAssets(){for(const e of this.plugins)await Y.default.copy(j.default.join(e.path,"dist"),j.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js`)}async onArticle(e){if(e.ref){const t=e.getPath(),r=await this.makeFile(t,e.ref),n=await this.renderFile(r,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(t,n)}}async onSummary(){const e=await this.makeFile("index.html","README.md"),t=await this.renderFile(e);await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t)}async renderFile(e,t){const r={id:this.book.id,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,options:{}},n=this.scripts.map((t=>se.isUrl(t)?t:e.relative(t))),i=this.headScripts.map((t=>se.isUrl(t)?t:e.relative(t))),a=this.stylesheets.map((t=>se.isUrl(t)?t:e.relative(t))),o=this.book.config.getValue("title","Untitled"),s=e.getMeta("title",t);return this.template({title:(s?`${s} - `:"")+o,keywords:e.getMeta("keywords"),description:e.getMeta("description"),stylesheets:a,headScripts:i,scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const xp=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class kp extends X.default.ResourceLoader{fs;constructor(e){super(),this.fs=e}fetch(e,t){return super.fetch(e,t)}}const Ep={json:yp,html:wp,ebook:class extends wp{async initPlugins(){this.book.config.setValue("theme","ebook"),await super.initPlugins()}createDOM(e,t){const r=new kp(this.tmpFS),n=new P.VirtualConsole;return n.sendTo(console,{omitJSDOMErrors:!0}),new P.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0})}async renderHtml(e,t){const r=this.createDOM(e,t);return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),a=(t,o)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?o(e):a(t,o)}}),r)};return new Promise(a)}((()=>{const e=r.window.document.getElementById("root");if(e&&e.innerHTML){for(const e of Array.from(r.window.document.scripts))e.remove();return r.serialize()}throw new Error("render html timeout")}),{stopAfter:2e3,tryEvery:100})}getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-title')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-1 ')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-2 ')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-title-3 ')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-header.ejs"),"utf-8"),n=Y.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-footer.ejs"),"utf-8");r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=e,r["pdf-footer-template"]=n}return r}async packBook(){const e=j.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await C.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const a=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",a=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+a,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},o=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=a;if((!Array.isArray(t.excludes)||!xp(t.excludes,r))&&(!Array.isArray(t.includes)||xp(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=o),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(this.getConvertOptions(e));return r.unshift(this.tmpFS.resolve("index.html"),this.dest),new Promise(((e,n)=>{ne.info("convert book ...");const i=G.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root});i.stdout?.on("data",(e=>{console.debug(e.toString().trimEnd())})),i.stderr?.on("data",(e=>{console.error(e.toString().trimEnd())})),i.on("close",(t=>{0!==t?n("Convert failed"):e()}))}))}}};var Sp=ee.default,Cp=process.cwd,Pp=null,Ap=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Pp||(Pp=Cp.call(process)),Pp};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var _p=process.chdir;process.chdir=function(e){Pp=null,_p.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,_p)}var Fp=function(e){Sp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,Sp.O_WRONLY|Sp.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,Sp.O_WRONLY|Sp.O_SYMLINK,r),a=!0;try{n=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){Sp.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,n,i){e.open(t,Sp.O_SYMLINK,(function(t,a){t?i&&i(t):e.futimes(a,r,n,(function(t){e.close(a,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,a=e.openSync(t,Sp.O_SYMLINK),o=!0;try{i=e.futimesSync(a,r,n),o=!1}finally{if(o)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=s(e.statSync),e.fstatSync=s(e.fstatSync),e.lstatSync=s(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Ap&&(e.rename=(t=e.rename,function(r,n,i){var a=Date.now(),o=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-a<6e4)return setTimeout((function(){e.stat(n,(function(e,a){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}));var t;function r(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){c(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!c(e))throw e}}:t}function i(t){return t?function(r,n,i,a){return t.call(e,r,n,i,(function(e){c(e)&&(e=null),a&&a.apply(this,arguments)}))}:t}function a(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!c(e))throw e}}:t}function o(t){return t?function(r,n,i){function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,a):t.call(e,r,a)}:t}function s(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:t}function c(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function r(r,n,i,a,o,s){var c;if(s&&"function"==typeof s){var l=0;c=function(u,f,h){if(u&&"EAGAIN"===u.code&&l<10)return l++,t.call(e,r,n,i,a,o,c);s.apply(this,arguments)}}return t.call(e,r,n,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync=(l=e.readSync,function(t,r,n,i,a){for(var o=0;;)try{return l.call(e,t,r,n,i,a)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var l};var Op=$.default.Stream,Ip=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Op.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var a=Object.keys(n),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Op.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),a=0,o=i.length;a<o;a++){var s=i[a];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Dp=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:jp(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},jp=Object.getPrototypeOf||function(e){return e.__proto__};var Rp,Tp,Lp=K.default,qp=Fp,Mp=Ip,zp=Dp,Np=H.default;function Bp(e,t){Object.defineProperty(e,Rp,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Rp=Symbol.for("graceful-fs.queue"),Tp=Symbol.for("graceful-fs.previous")):(Rp="___graceful-fs.queue",Tp="___graceful-fs.previous");var $p=function(){};if(Np.debuglog?$p=Np.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&($p=function(){var e=Np.format.apply(Np,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Lp[Rp]){var Up=ie[Rp]||[];Bp(Lp,Up),Lp.close=function(e){function t(t,r){return e.call(Lp,t,(function(e){e||Wp(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Tp,{value:e}),t}(Lp.close),Lp.closeSync=function(e){function t(t){e.apply(Lp,arguments),Wp()}return Object.defineProperty(t,Tp,{value:e}),t}(Lp.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){$p(Lp[Rp]),z.default.equal(Lp[Rp].length,0)}))}ie[Rp]||Bp(ie,Lp[Rp]);var Hp,Vp=Qp(zp(Lp));function Qp(e){qp(e),e.gracefulify=Qp,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Gp([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):Gp([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):Gp([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var o=Mp(e);f=o.ReadStream,h=o.WriteStream}var s=e.ReadStream;s&&(f.prototype=Object.create(s.prototype),f.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var c=e.WriteStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0});var l=f;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var u=h;function f(e,t){return this instanceof f?(s.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var p=e.open;function d(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return p(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):Gp([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=d,e}function Gp(e){$p("ENQUEUE",e[0].name,e[1]),Lp[Rp].push(e),Kp()}function Wp(){for(var e=Date.now(),t=0;t<Lp[Rp].length;++t)Lp[Rp][t].length>2&&(Lp[Rp][t][3]=e,Lp[Rp][t][4]=e);Kp()}function Kp(){if(clearTimeout(Hp),Hp=void 0,0!==Lp[Rp].length){var e=Lp[Rp].shift(),t=e[0],r=e[1],n=e[2],i=e[3],a=e[4];if(void 0===i)$p("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){$p("TIMEOUT",t.name,r);var o=r.pop();"function"==typeof o&&o.call(null,n)}else{var s=Date.now()-a,c=Math.max(a-i,1);s>=Math.min(1.2*c,100)?($p("RETRY",t.name,r),t.apply(null,r.concat([i]))):Lp[Rp].push(e)}void 0===Hp&&(Hp=setTimeout(Kp,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Lp.__patched&&(Vp=Qp(Lp),Lp.__patched=!0);var Yp=Vp;const Jp=V.default.homedir(),{env:Zp}=process,Xp=Zp.XDG_DATA_HOME||(Jp?j.default.join(Jp,".local","share"):void 0),ed=Zp.XDG_CONFIG_HOME||(Jp?j.default.join(Jp,".config"):void 0);Zp.XDG_STATE_HOME||Jp&&j.default.join(Jp,".local","state"),Zp.XDG_CACHE_HOME||Jp&&j.default.join(Jp,".cache"),Zp.XDG_RUNTIME_DIR;const td=(Zp.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Xp&&td.unshift(Xp);const rd=(Zp.XDG_CONFIG_DIRS||"/etc/xdg").split(":");ed&&rd.unshift(ed);var nd={exports:{}},id={exports:{}};
|
|
11
11
|
/**
|
|
12
12
|
* @preserve
|
|
13
13
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topwrite/cli",
|
|
3
|
-
"version": "1.0.9-alpha.
|
|
3
|
+
"version": "1.0.9-alpha.1+b332121",
|
|
4
4
|
"author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
|
|
5
5
|
"files": [
|
|
6
6
|
"bin",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"bin": {
|
|
58
58
|
"ttx": "./bin/ttx.js"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "b332121a7a8513d282ead8f6d35502efeaa141af"
|
|
61
61
|
}
|