@emblemvault/hustle-react 1.5.12 → 1.6.0
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/README.md +2 -2
- package/dist/browser/hustle-react.js +238 -207
- package/dist/browser/hustle-react.js.map +1 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.js.map +1 -1
- package/package.json +17 -17
|
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
));
|
|
33
33
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
34
|
|
|
35
|
-
// node_modules/highlight.js/lib/core.js
|
|
35
|
+
// ../../node_modules/highlight.js/lib/core.js
|
|
36
36
|
var require_core = __commonJS({
|
|
37
|
-
"node_modules/highlight.js/lib/core.js"(exports$1, module) {
|
|
37
|
+
"../../node_modules/highlight.js/lib/core.js"(exports$1, module) {
|
|
38
38
|
function deepFreeze(obj) {
|
|
39
39
|
if (obj instanceof Map) {
|
|
40
40
|
obj.clear = obj.delete = obj.set = function() {
|
|
@@ -1888,7 +1888,7 @@ function usePlugins(instanceId) {
|
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
1890
|
var HustleContext = createContext(void 0);
|
|
1891
|
-
var DEFAULT_HUSTLE_API_URL = "https://
|
|
1891
|
+
var DEFAULT_HUSTLE_API_URL = "https://emblemvault.ai";
|
|
1892
1892
|
var instanceCounter = 0;
|
|
1893
1893
|
var mountedAutoInstances = /* @__PURE__ */ new Set();
|
|
1894
1894
|
function HustleProvider({
|
|
@@ -4777,15 +4777,15 @@ var animations = `
|
|
|
4777
4777
|
}
|
|
4778
4778
|
`;
|
|
4779
4779
|
|
|
4780
|
-
// node_modules/marked/lib/marked.esm.js
|
|
4781
|
-
function
|
|
4780
|
+
// ../../node_modules/marked/lib/marked.esm.js
|
|
4781
|
+
function M() {
|
|
4782
4782
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
4783
4783
|
}
|
|
4784
|
-
var
|
|
4785
|
-
function
|
|
4786
|
-
|
|
4784
|
+
var O = M();
|
|
4785
|
+
function G(u3) {
|
|
4786
|
+
O = u3;
|
|
4787
4787
|
}
|
|
4788
|
-
var
|
|
4788
|
+
var _ = { exec: () => null };
|
|
4789
4789
|
function k(u3, e = "") {
|
|
4790
4790
|
let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
|
|
4791
4791
|
let s = typeof i == "string" ? i : i.source;
|
|
@@ -4793,82 +4793,85 @@ function k(u3, e = "") {
|
|
|
4793
4793
|
}, getRegex: () => new RegExp(t, e) };
|
|
4794
4794
|
return n;
|
|
4795
4795
|
}
|
|
4796
|
-
var
|
|
4796
|
+
var be = (() => {
|
|
4797
4797
|
try {
|
|
4798
4798
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
4799
4799
|
} catch {
|
|
4800
4800
|
return false;
|
|
4801
4801
|
}
|
|
4802
4802
|
})();
|
|
4803
|
-
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
|
|
4804
|
-
var
|
|
4805
|
-
var
|
|
4806
|
-
var
|
|
4807
|
-
var
|
|
4808
|
-
var
|
|
4809
|
-
var
|
|
4810
|
-
var
|
|
4811
|
-
var
|
|
4812
|
-
var
|
|
4813
|
-
var
|
|
4814
|
-
var
|
|
4803
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}>`) };
|
|
4804
|
+
var Re = /^(?:[ \t]*(?:\n|$))+/;
|
|
4805
|
+
var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
4806
|
+
var Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
4807
|
+
var C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
4808
|
+
var we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
4809
|
+
var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
|
|
4810
|
+
var se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
4811
|
+
var ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
4812
|
+
var ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
4813
|
+
var j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
4814
|
+
var Pe = /^[^\n]+/;
|
|
4815
4815
|
var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
4816
|
-
var
|
|
4817
|
-
var
|
|
4816
|
+
var Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
4817
|
+
var $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
|
|
4818
4818
|
var v = "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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
4819
|
-
var
|
|
4820
|
-
var
|
|
4821
|
-
var
|
|
4822
|
-
var
|
|
4823
|
-
var
|
|
4824
|
-
var
|
|
4825
|
-
var
|
|
4826
|
-
var
|
|
4827
|
-
]`).replace("lheading",
|
|
4828
|
-
var
|
|
4829
|
-
var
|
|
4830
|
-
var
|
|
4819
|
+
var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
4820
|
+
var _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
4821
|
+
var oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
4822
|
+
var Le = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex();
|
|
4823
|
+
var K = { blockquote: Le, code: Oe, def: Se, fences: Te, heading: we, hr: C, html: _e, lheading: ie, list: $e, newline: Re, paragraph: oe, table: _, text: Pe };
|
|
4824
|
+
var ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
4825
|
+
var Me = { ...K, lheading: ye, table: ne, paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() };
|
|
4826
|
+
var ze = { ...K, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
4827
|
+
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
4828
|
+
var Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
4829
|
+
var Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
4830
|
+
var ae = /^( {2,}|\\)\n(?!\s*$)/;
|
|
4831
4831
|
var Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
4832
|
-
var
|
|
4833
|
-
var
|
|
4834
|
-
var
|
|
4835
|
-
var Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g,
|
|
4832
|
+
var z = /[\p{P}\p{S}]/u;
|
|
4833
|
+
var H = /[\s\p{P}\p{S}]/u;
|
|
4834
|
+
var W = /[^\s\p{P}\p{S}]/u;
|
|
4835
|
+
var Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex();
|
|
4836
4836
|
var le = /(?!~)[\p{P}\p{S}]/u;
|
|
4837
|
-
var
|
|
4838
|
-
var
|
|
4839
|
-
var
|
|
4840
|
-
var ue = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))
|
|
4841
|
-
var
|
|
4842
|
-
var
|
|
4837
|
+
var Be = /(?!~)[\s\p{P}\p{S}]/u;
|
|
4838
|
+
var De = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
4839
|
+
var qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
|
|
4840
|
+
var ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
|
|
4841
|
+
var ve = k(ue, "u").replace(/punct/g, z).getRegex();
|
|
4842
|
+
var He = k(ue, "u").replace(/punct/g, le).getRegex();
|
|
4843
4843
|
var pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
4844
|
-
var
|
|
4845
|
-
var
|
|
4846
|
-
var
|
|
4847
|
-
var
|
|
4848
|
-
var
|
|
4849
|
-
var
|
|
4850
|
-
var
|
|
4851
|
-
var
|
|
4852
|
-
var
|
|
4844
|
+
var Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4845
|
+
var Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex();
|
|
4846
|
+
var Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4847
|
+
var Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex();
|
|
4848
|
+
var je = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
|
|
4849
|
+
var Fe = k(je, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4850
|
+
var Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex();
|
|
4851
|
+
var Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
4852
|
+
var We = k(U).replace("(?:-->|$)", "-->").getRegex();
|
|
4853
|
+
var Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
4854
|
+
var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
|
|
4855
|
+
var Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
4853
4856
|
var ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
|
|
4854
4857
|
var he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
|
|
4855
|
-
var
|
|
4856
|
-
var
|
|
4857
|
-
var
|
|
4858
|
-
var
|
|
4859
|
-
var
|
|
4860
|
-
var
|
|
4861
|
-
var
|
|
4862
|
-
var
|
|
4863
|
-
var
|
|
4864
|
-
var ke = (u3) =>
|
|
4865
|
-
function
|
|
4858
|
+
var Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex();
|
|
4859
|
+
var re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
4860
|
+
var X = { _backpedal: _, anyPunctuation: Ue, autolink: Ke, blockSkip: qe, br: ae, code: Ie, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: ve, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ee, link: Je, nolink: he, punctuation: Ce, reflink: ce, reflinkSearch: Ve, tag: Xe, text: Ae, url: _ };
|
|
4861
|
+
var Ye = { ...X, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
|
|
4862
|
+
var N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, delLDelim: Qe, delRDelim: Fe, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex() };
|
|
4863
|
+
var et = { ...N, br: k(ae).replace("{2,}", "*").getRegex(), text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
4864
|
+
var B = { normal: K, gfm: Me, pedantic: ze };
|
|
4865
|
+
var E = { normal: X, gfm: N, breaks: et, pedantic: Ye };
|
|
4866
|
+
var tt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
4867
|
+
var ke = (u3) => tt[u3];
|
|
4868
|
+
function T(u3, e) {
|
|
4866
4869
|
if (e) {
|
|
4867
4870
|
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ke);
|
|
4868
4871
|
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ke);
|
|
4869
4872
|
return u3;
|
|
4870
4873
|
}
|
|
4871
|
-
function
|
|
4874
|
+
function J(u3) {
|
|
4872
4875
|
try {
|
|
4873
4876
|
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
4874
4877
|
} catch {
|
|
@@ -4876,7 +4879,7 @@ function X(u3) {
|
|
|
4876
4879
|
}
|
|
4877
4880
|
return u3;
|
|
4878
4881
|
}
|
|
4879
|
-
function
|
|
4882
|
+
function V(u3, e) {
|
|
4880
4883
|
let t = u3.replace(m.findPipe, (i, s, a) => {
|
|
4881
4884
|
let o = false, l = s;
|
|
4882
4885
|
for (; --l >= 0 && a[l] === "\\"; ) o = !o;
|
|
@@ -4887,7 +4890,7 @@ function J(u3, e) {
|
|
|
4887
4890
|
for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
4888
4891
|
return n;
|
|
4889
4892
|
}
|
|
4890
|
-
function
|
|
4893
|
+
function I(u3, e, t) {
|
|
4891
4894
|
let n = u3.length;
|
|
4892
4895
|
if (n === 0) return "";
|
|
4893
4896
|
let r = 0;
|
|
@@ -4906,13 +4909,21 @@ function de(u3, e) {
|
|
|
4906
4909
|
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
4907
4910
|
return t > 0 ? -2 : -1;
|
|
4908
4911
|
}
|
|
4909
|
-
function ge(u3, e
|
|
4912
|
+
function ge(u3, e = 0) {
|
|
4913
|
+
let t = e, n = "";
|
|
4914
|
+
for (let r of u3) if (r === " ") {
|
|
4915
|
+
let i = 4 - t % 4;
|
|
4916
|
+
n += " ".repeat(i), t += i;
|
|
4917
|
+
} else n += r, t++;
|
|
4918
|
+
return n;
|
|
4919
|
+
}
|
|
4920
|
+
function fe(u3, e, t, n, r) {
|
|
4910
4921
|
let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
|
|
4911
4922
|
n.state.inLink = true;
|
|
4912
4923
|
let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
4913
4924
|
return n.state.inLink = false, o;
|
|
4914
4925
|
}
|
|
4915
|
-
function
|
|
4926
|
+
function nt(u3, e, t) {
|
|
4916
4927
|
let n = u3.match(t.other.indentCodeCompensation);
|
|
4917
4928
|
if (n === null) return e;
|
|
4918
4929
|
let r = n[1];
|
|
@@ -4925,12 +4936,12 @@ function Je(u3, e, t) {
|
|
|
4925
4936
|
}).join(`
|
|
4926
4937
|
`);
|
|
4927
4938
|
}
|
|
4928
|
-
var
|
|
4939
|
+
var w = class {
|
|
4929
4940
|
constructor(e) {
|
|
4930
4941
|
__publicField(this, "options");
|
|
4931
4942
|
__publicField(this, "rules");
|
|
4932
4943
|
__publicField(this, "lexer");
|
|
4933
|
-
this.options = e ||
|
|
4944
|
+
this.options = e || O;
|
|
4934
4945
|
}
|
|
4935
4946
|
space(e) {
|
|
4936
4947
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -4940,14 +4951,14 @@ var y = class {
|
|
|
4940
4951
|
let t = this.rules.block.code.exec(e);
|
|
4941
4952
|
if (t) {
|
|
4942
4953
|
let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
4943
|
-
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
4954
|
+
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : I(n, `
|
|
4944
4955
|
`) };
|
|
4945
4956
|
}
|
|
4946
4957
|
}
|
|
4947
4958
|
fences(e) {
|
|
4948
4959
|
let t = this.rules.block.fences.exec(e);
|
|
4949
4960
|
if (t) {
|
|
4950
|
-
let n = t[0], r =
|
|
4961
|
+
let n = t[0], r = nt(n, t[3] || "", this.rules);
|
|
4951
4962
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
4952
4963
|
}
|
|
4953
4964
|
}
|
|
@@ -4956,7 +4967,7 @@ var y = class {
|
|
|
4956
4967
|
if (t) {
|
|
4957
4968
|
let n = t[2].trim();
|
|
4958
4969
|
if (this.rules.other.endingHash.test(n)) {
|
|
4959
|
-
let r =
|
|
4970
|
+
let r = I(n, "#");
|
|
4960
4971
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
4961
4972
|
}
|
|
4962
4973
|
return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -4964,13 +4975,13 @@ var y = class {
|
|
|
4964
4975
|
}
|
|
4965
4976
|
hr(e) {
|
|
4966
4977
|
let t = this.rules.block.hr.exec(e);
|
|
4967
|
-
if (t) return { type: "hr", raw:
|
|
4978
|
+
if (t) return { type: "hr", raw: I(t[0], `
|
|
4968
4979
|
`) };
|
|
4969
4980
|
}
|
|
4970
4981
|
blockquote(e) {
|
|
4971
4982
|
let t = this.rules.block.blockquote.exec(e);
|
|
4972
4983
|
if (t) {
|
|
4973
|
-
let n =
|
|
4984
|
+
let n = I(t[0], `
|
|
4974
4985
|
`).split(`
|
|
4975
4986
|
`), r = "", i = "", s = [];
|
|
4976
4987
|
for (; n.length > 0; ) {
|
|
@@ -4985,21 +4996,21 @@ var y = class {
|
|
|
4985
4996
|
r = r ? `${r}
|
|
4986
4997
|
${p}` : p, i = i ? `${i}
|
|
4987
4998
|
${c}` : c;
|
|
4988
|
-
let
|
|
4989
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top =
|
|
4999
|
+
let d = this.lexer.state.top;
|
|
5000
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
|
|
4990
5001
|
let h = s.at(-1);
|
|
4991
5002
|
if (h?.type === "code") break;
|
|
4992
5003
|
if (h?.type === "blockquote") {
|
|
4993
5004
|
let R = h, f = R.raw + `
|
|
4994
5005
|
` + n.join(`
|
|
4995
|
-
`),
|
|
4996
|
-
s[s.length - 1] =
|
|
5006
|
+
`), S = this.blockquote(f);
|
|
5007
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
|
|
4997
5008
|
break;
|
|
4998
5009
|
} else if (h?.type === "list") {
|
|
4999
5010
|
let R = h, f = R.raw + `
|
|
5000
5011
|
` + n.join(`
|
|
5001
|
-
`),
|
|
5002
|
-
s[s.length - 1] =
|
|
5012
|
+
`), S = this.list(f);
|
|
5013
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
|
|
5003
5014
|
`);
|
|
5004
5015
|
continue;
|
|
5005
5016
|
}
|
|
@@ -5017,25 +5028,25 @@ ${c}` : c;
|
|
|
5017
5028
|
let l = false, p = "", c = "";
|
|
5018
5029
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
5019
5030
|
p = t[0], e = e.substring(p.length);
|
|
5020
|
-
let
|
|
5021
|
-
`, 1)[0]
|
|
5022
|
-
`, 1)[0], R = !
|
|
5023
|
-
if (this.options.pedantic ? (f = 2, c =
|
|
5031
|
+
let d = ge(t[2].split(`
|
|
5032
|
+
`, 1)[0], t[1].length), h = e.split(`
|
|
5033
|
+
`, 1)[0], R = !d.trim(), f = 0;
|
|
5034
|
+
if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
|
|
5024
5035
|
`, e = e.substring(h.length + 1), l = true), !l) {
|
|
5025
|
-
let
|
|
5036
|
+
let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
|
|
5026
5037
|
for (; e; ) {
|
|
5027
|
-
let
|
|
5038
|
+
let Z = e.split(`
|
|
5028
5039
|
`, 1)[0], A;
|
|
5029
|
-
if (h =
|
|
5040
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
|
|
5030
5041
|
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
5031
5042
|
` + A.slice(f);
|
|
5032
5043
|
else {
|
|
5033
|
-
if (R ||
|
|
5044
|
+
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
|
|
5034
5045
|
c += `
|
|
5035
5046
|
` + h;
|
|
5036
5047
|
}
|
|
5037
|
-
|
|
5038
|
-
`, e = e.substring(
|
|
5048
|
+
R = !h.trim(), p += Z + `
|
|
5049
|
+
`, e = e.substring(Z.length + 1), d = A.slice(f);
|
|
5039
5050
|
}
|
|
5040
5051
|
}
|
|
5041
5052
|
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), i.raw += p;
|
|
@@ -5060,7 +5071,7 @@ ${c}` : c;
|
|
|
5060
5071
|
}
|
|
5061
5072
|
}
|
|
5062
5073
|
if (!i.loose) {
|
|
5063
|
-
let p = l.tokens.filter((
|
|
5074
|
+
let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
|
|
5064
5075
|
i.loose = c;
|
|
5065
5076
|
}
|
|
5066
5077
|
}
|
|
@@ -5085,18 +5096,21 @@ ${c}` : c;
|
|
|
5085
5096
|
table(e) {
|
|
5086
5097
|
let t = this.rules.block.table.exec(e);
|
|
5087
5098
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
5088
|
-
let n =
|
|
5099
|
+
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5089
5100
|
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
5090
5101
|
if (n.length === r.length) {
|
|
5091
5102
|
for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
|
|
5092
5103
|
for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
|
|
5093
|
-
for (let a of i) s.rows.push(
|
|
5104
|
+
for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[l] })));
|
|
5094
5105
|
return s;
|
|
5095
5106
|
}
|
|
5096
5107
|
}
|
|
5097
5108
|
lheading(e) {
|
|
5098
5109
|
let t = this.rules.block.lheading.exec(e);
|
|
5099
|
-
if (t)
|
|
5110
|
+
if (t) {
|
|
5111
|
+
let n = t[1].trim();
|
|
5112
|
+
return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
5113
|
+
}
|
|
5100
5114
|
}
|
|
5101
5115
|
paragraph(e) {
|
|
5102
5116
|
let t = this.rules.block.paragraph.exec(e);
|
|
@@ -5124,7 +5138,7 @@ ${c}` : c;
|
|
|
5124
5138
|
let n = t[2].trim();
|
|
5125
5139
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5126
5140
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5127
|
-
let s =
|
|
5141
|
+
let s = I(n.slice(0, -1), "\\");
|
|
5128
5142
|
if ((n.length - s.length) % 2 === 0) return;
|
|
5129
5143
|
} else {
|
|
5130
5144
|
let s = de(t[2], "()");
|
|
@@ -5139,7 +5153,7 @@ ${c}` : c;
|
|
|
5139
5153
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
5140
5154
|
s && (r = s[1], i = s[3]);
|
|
5141
5155
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
5142
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
5156
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
5143
5157
|
}
|
|
5144
5158
|
}
|
|
5145
5159
|
reflink(e, t) {
|
|
@@ -5150,15 +5164,15 @@ ${c}` : c;
|
|
|
5150
5164
|
let s = n[0].charAt(0);
|
|
5151
5165
|
return { type: "text", raw: s, text: s };
|
|
5152
5166
|
}
|
|
5153
|
-
return
|
|
5167
|
+
return fe(n, i, n[0], this.lexer, this.rules);
|
|
5154
5168
|
}
|
|
5155
5169
|
}
|
|
5156
5170
|
emStrong(e, t, n = "") {
|
|
5157
5171
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
5158
|
-
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
5159
|
-
if (!(r[1] || r[
|
|
5172
|
+
if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
5173
|
+
if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
5160
5174
|
let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
5161
|
-
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t))
|
|
5175
|
+
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) !== null; ) {
|
|
5162
5176
|
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
5163
5177
|
if (o = [...a].length, r[3] || r[4]) {
|
|
5164
5178
|
l += o;
|
|
@@ -5169,7 +5183,7 @@ ${c}` : c;
|
|
|
5169
5183
|
}
|
|
5170
5184
|
if (l -= o, l > 0) continue;
|
|
5171
5185
|
o = Math.min(o, o + l + p);
|
|
5172
|
-
let
|
|
5186
|
+
let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
|
|
5173
5187
|
if (Math.min(s, o) % 2) {
|
|
5174
5188
|
let f = h.slice(1, -1);
|
|
5175
5189
|
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
@@ -5190,9 +5204,23 @@ ${c}` : c;
|
|
|
5190
5204
|
let t = this.rules.inline.br.exec(e);
|
|
5191
5205
|
if (t) return { type: "br", raw: t[0] };
|
|
5192
5206
|
}
|
|
5193
|
-
del(e) {
|
|
5194
|
-
let
|
|
5195
|
-
if (
|
|
5207
|
+
del(e, t, n = "") {
|
|
5208
|
+
let r = this.rules.inline.delLDelim.exec(e);
|
|
5209
|
+
if (!r) return;
|
|
5210
|
+
if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
5211
|
+
let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
|
|
5212
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) !== null; ) {
|
|
5213
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
|
|
5214
|
+
if (r[3] || r[4]) {
|
|
5215
|
+
l += o;
|
|
5216
|
+
continue;
|
|
5217
|
+
}
|
|
5218
|
+
if (l -= o, l > 0) continue;
|
|
5219
|
+
o = Math.min(o, o + l);
|
|
5220
|
+
let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
|
|
5221
|
+
return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
|
|
5222
|
+
}
|
|
5223
|
+
}
|
|
5196
5224
|
}
|
|
5197
5225
|
autolink(e) {
|
|
5198
5226
|
let t = this.rules.inline.autolink.exec(e);
|
|
@@ -5231,12 +5259,12 @@ var x = class u {
|
|
|
5231
5259
|
__publicField(this, "state");
|
|
5232
5260
|
__publicField(this, "inlineQueue");
|
|
5233
5261
|
__publicField(this, "tokenizer");
|
|
5234
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
5235
|
-
let t = { other: m, block:
|
|
5236
|
-
this.options.pedantic ? (t.block =
|
|
5262
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
5263
|
+
let t = { other: m, block: B.normal, inline: E.normal };
|
|
5264
|
+
this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
|
|
5237
5265
|
}
|
|
5238
5266
|
static get rules() {
|
|
5239
|
-
return { block:
|
|
5267
|
+
return { block: B, inline: E };
|
|
5240
5268
|
}
|
|
5241
5269
|
static lex(e, t) {
|
|
5242
5270
|
return new u(t).lex(e);
|
|
@@ -5254,7 +5282,7 @@ var x = class u {
|
|
|
5254
5282
|
return this.inlineQueue = [], this.tokens;
|
|
5255
5283
|
}
|
|
5256
5284
|
blockTokens(e, t = [], n = false) {
|
|
5257
|
-
for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
5285
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
5258
5286
|
let r;
|
|
5259
5287
|
if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
|
|
5260
5288
|
if (r = this.tokenizer.space(e)) {
|
|
@@ -5352,14 +5380,15 @@ var x = class u {
|
|
|
5352
5380
|
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
5353
5381
|
}
|
|
5354
5382
|
inlineTokens(e, t = []) {
|
|
5383
|
+
this.tokenizer.lexer = this;
|
|
5355
5384
|
let n = e, r = null;
|
|
5356
5385
|
if (this.tokens.links) {
|
|
5357
5386
|
let o = Object.keys(this.tokens.links);
|
|
5358
|
-
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n))
|
|
5387
|
+
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
5359
5388
|
}
|
|
5360
|
-
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n))
|
|
5389
|
+
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
5361
5390
|
let i;
|
|
5362
|
-
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n))
|
|
5391
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
5363
5392
|
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
5364
5393
|
let s = false, a = "";
|
|
5365
5394
|
for (; e; ) {
|
|
@@ -5396,7 +5425,7 @@ var x = class u {
|
|
|
5396
5425
|
e = e.substring(o.raw.length), t.push(o);
|
|
5397
5426
|
continue;
|
|
5398
5427
|
}
|
|
5399
|
-
if (o = this.tokenizer.del(e)) {
|
|
5428
|
+
if (o = this.tokenizer.del(e, n, a)) {
|
|
5400
5429
|
e = e.substring(o.raw.length), t.push(o);
|
|
5401
5430
|
continue;
|
|
5402
5431
|
}
|
|
@@ -5410,9 +5439,9 @@ var x = class u {
|
|
|
5410
5439
|
}
|
|
5411
5440
|
let l = e;
|
|
5412
5441
|
if (this.options.extensions?.startInline) {
|
|
5413
|
-
let p = 1 / 0, c = e.slice(1),
|
|
5442
|
+
let p = 1 / 0, c = e.slice(1), d;
|
|
5414
5443
|
this.options.extensions.startInline.forEach((h) => {
|
|
5415
|
-
|
|
5444
|
+
d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
|
|
5416
5445
|
}), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
|
|
5417
5446
|
}
|
|
5418
5447
|
if (o = this.tokenizer.inlineText(l)) {
|
|
@@ -5432,11 +5461,11 @@ var x = class u {
|
|
|
5432
5461
|
return t;
|
|
5433
5462
|
}
|
|
5434
5463
|
};
|
|
5435
|
-
var
|
|
5464
|
+
var y = class {
|
|
5436
5465
|
constructor(e) {
|
|
5437
5466
|
__publicField(this, "options");
|
|
5438
5467
|
__publicField(this, "parser");
|
|
5439
|
-
this.options = e ||
|
|
5468
|
+
this.options = e || O;
|
|
5440
5469
|
}
|
|
5441
5470
|
space(e) {
|
|
5442
5471
|
return "";
|
|
@@ -5444,8 +5473,8 @@ var P = class {
|
|
|
5444
5473
|
code({ text: e, lang: t, escaped: n }) {
|
|
5445
5474
|
let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
|
|
5446
5475
|
`;
|
|
5447
|
-
return r ? '<pre><code class="language-' +
|
|
5448
|
-
` : "<pre><code>" + (n ? i :
|
|
5476
|
+
return r ? '<pre><code class="language-' + T(r) + '">' + (n ? i : T(i, true)) + `</code></pre>
|
|
5477
|
+
` : "<pre><code>" + (n ? i : T(i, true)) + `</code></pre>
|
|
5449
5478
|
`;
|
|
5450
5479
|
}
|
|
5451
5480
|
blockquote({ tokens: e }) {
|
|
@@ -5523,7 +5552,7 @@ ${e}</tr>
|
|
|
5523
5552
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
5524
5553
|
}
|
|
5525
5554
|
codespan({ text: e }) {
|
|
5526
|
-
return `<code>${
|
|
5555
|
+
return `<code>${T(e, true)}</code>`;
|
|
5527
5556
|
}
|
|
5528
5557
|
br(e) {
|
|
5529
5558
|
return "<br>";
|
|
@@ -5532,22 +5561,22 @@ ${e}</tr>
|
|
|
5532
5561
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
5533
5562
|
}
|
|
5534
5563
|
link({ href: e, title: t, tokens: n }) {
|
|
5535
|
-
let r = this.parser.parseInline(n), i =
|
|
5564
|
+
let r = this.parser.parseInline(n), i = J(e);
|
|
5536
5565
|
if (i === null) return r;
|
|
5537
5566
|
e = i;
|
|
5538
5567
|
let s = '<a href="' + e + '"';
|
|
5539
|
-
return t && (s += ' title="' +
|
|
5568
|
+
return t && (s += ' title="' + T(t) + '"'), s += ">" + r + "</a>", s;
|
|
5540
5569
|
}
|
|
5541
5570
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
5542
5571
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5543
|
-
let i =
|
|
5544
|
-
if (i === null) return
|
|
5572
|
+
let i = J(e);
|
|
5573
|
+
if (i === null) return T(n);
|
|
5545
5574
|
e = i;
|
|
5546
|
-
let s = `<img src="${e}" alt="${n}"`;
|
|
5547
|
-
return t && (s += ` title="${
|
|
5575
|
+
let s = `<img src="${e}" alt="${T(n)}"`;
|
|
5576
|
+
return t && (s += ` title="${T(t)}"`), s += ">", s;
|
|
5548
5577
|
}
|
|
5549
5578
|
text(e) {
|
|
5550
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
5579
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : T(e.text);
|
|
5551
5580
|
}
|
|
5552
5581
|
};
|
|
5553
5582
|
var $ = class {
|
|
@@ -5587,7 +5616,7 @@ var b = class u2 {
|
|
|
5587
5616
|
__publicField(this, "options");
|
|
5588
5617
|
__publicField(this, "renderer");
|
|
5589
5618
|
__publicField(this, "textRenderer");
|
|
5590
|
-
this.options = e ||
|
|
5619
|
+
this.options = e || O, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
|
|
5591
5620
|
}
|
|
5592
5621
|
static parse(e, t) {
|
|
5593
5622
|
return new u2(t).parse(e);
|
|
@@ -5596,6 +5625,7 @@ var b = class u2 {
|
|
|
5596
5625
|
return new u2(t).parseInline(e);
|
|
5597
5626
|
}
|
|
5598
5627
|
parse(e) {
|
|
5628
|
+
this.renderer.parser = this;
|
|
5599
5629
|
let t = "";
|
|
5600
5630
|
for (let n = 0; n < e.length; n++) {
|
|
5601
5631
|
let r = e[n];
|
|
@@ -5666,6 +5696,7 @@ var b = class u2 {
|
|
|
5666
5696
|
return t;
|
|
5667
5697
|
}
|
|
5668
5698
|
parseInline(e, t = this.renderer) {
|
|
5699
|
+
this.renderer.parser = this;
|
|
5669
5700
|
let n = "";
|
|
5670
5701
|
for (let r = 0; r < e.length; r++) {
|
|
5671
5702
|
let i = e[r];
|
|
@@ -5733,11 +5764,11 @@ var b = class u2 {
|
|
|
5733
5764
|
}
|
|
5734
5765
|
};
|
|
5735
5766
|
var _a;
|
|
5736
|
-
var
|
|
5767
|
+
var P = (_a = class {
|
|
5737
5768
|
constructor(e) {
|
|
5738
5769
|
__publicField(this, "options");
|
|
5739
5770
|
__publicField(this, "block");
|
|
5740
|
-
this.options = e ||
|
|
5771
|
+
this.options = e || O;
|
|
5741
5772
|
}
|
|
5742
5773
|
preprocess(e) {
|
|
5743
5774
|
return e;
|
|
@@ -5751,25 +5782,25 @@ var S = (_a = class {
|
|
|
5751
5782
|
emStrongMask(e) {
|
|
5752
5783
|
return e;
|
|
5753
5784
|
}
|
|
5754
|
-
provideLexer() {
|
|
5755
|
-
return
|
|
5785
|
+
provideLexer(e = this.block) {
|
|
5786
|
+
return e ? x.lex : x.lexInline;
|
|
5756
5787
|
}
|
|
5757
|
-
provideParser() {
|
|
5758
|
-
return
|
|
5788
|
+
provideParser(e = this.block) {
|
|
5789
|
+
return e ? b.parse : b.parseInline;
|
|
5759
5790
|
}
|
|
5760
5791
|
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
5761
|
-
var
|
|
5792
|
+
var D = class {
|
|
5762
5793
|
constructor(...e) {
|
|
5763
|
-
__publicField(this, "defaults",
|
|
5794
|
+
__publicField(this, "defaults", M());
|
|
5764
5795
|
__publicField(this, "options", this.setOptions);
|
|
5765
5796
|
__publicField(this, "parse", this.parseMarkdown(true));
|
|
5766
5797
|
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
5767
5798
|
__publicField(this, "Parser", b);
|
|
5768
|
-
__publicField(this, "Renderer",
|
|
5799
|
+
__publicField(this, "Renderer", y);
|
|
5769
5800
|
__publicField(this, "TextRenderer", $);
|
|
5770
5801
|
__publicField(this, "Lexer", x);
|
|
5771
|
-
__publicField(this, "Tokenizer",
|
|
5772
|
-
__publicField(this, "Hooks",
|
|
5802
|
+
__publicField(this, "Tokenizer", w);
|
|
5803
|
+
__publicField(this, "Hooks", P);
|
|
5773
5804
|
this.use(...e);
|
|
5774
5805
|
}
|
|
5775
5806
|
walkTokens(e, t) {
|
|
@@ -5816,7 +5847,7 @@ var B = class {
|
|
|
5816
5847
|
}
|
|
5817
5848
|
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
5818
5849
|
}), r.extensions = t), n.renderer) {
|
|
5819
|
-
let i = this.defaults.renderer || new
|
|
5850
|
+
let i = this.defaults.renderer || new y(this.defaults);
|
|
5820
5851
|
for (let s in n.renderer) {
|
|
5821
5852
|
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
5822
5853
|
if (["options", "parser"].includes(s)) continue;
|
|
@@ -5829,7 +5860,7 @@ var B = class {
|
|
|
5829
5860
|
r.renderer = i;
|
|
5830
5861
|
}
|
|
5831
5862
|
if (n.tokenizer) {
|
|
5832
|
-
let i = this.defaults.tokenizer || new
|
|
5863
|
+
let i = this.defaults.tokenizer || new w(this.defaults);
|
|
5833
5864
|
for (let s in n.tokenizer) {
|
|
5834
5865
|
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
5835
5866
|
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
@@ -5842,22 +5873,22 @@ var B = class {
|
|
|
5842
5873
|
r.tokenizer = i;
|
|
5843
5874
|
}
|
|
5844
5875
|
if (n.hooks) {
|
|
5845
|
-
let i = this.defaults.hooks || new
|
|
5876
|
+
let i = this.defaults.hooks || new P();
|
|
5846
5877
|
for (let s in n.hooks) {
|
|
5847
5878
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
5848
5879
|
if (["options", "block"].includes(s)) continue;
|
|
5849
5880
|
let a = s, o = n.hooks[a], l = i[a];
|
|
5850
|
-
|
|
5851
|
-
if (this.defaults.async &&
|
|
5852
|
-
let
|
|
5853
|
-
return l.call(i,
|
|
5881
|
+
P.passThroughHooks.has(s) ? i[a] = (p) => {
|
|
5882
|
+
if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
5883
|
+
let d = await o.call(i, p);
|
|
5884
|
+
return l.call(i, d);
|
|
5854
5885
|
})();
|
|
5855
5886
|
let c = o.call(i, p);
|
|
5856
5887
|
return l.call(i, c);
|
|
5857
5888
|
} : i[a] = (...p) => {
|
|
5858
5889
|
if (this.defaults.async) return (async () => {
|
|
5859
|
-
let
|
|
5860
|
-
return
|
|
5890
|
+
let d = await o.apply(i, p);
|
|
5891
|
+
return d === false && (d = await l.apply(i, p)), d;
|
|
5861
5892
|
})();
|
|
5862
5893
|
let c = o.apply(i, p);
|
|
5863
5894
|
return c === false && (c = l.apply(i, p)), c;
|
|
@@ -5891,16 +5922,16 @@ var B = class {
|
|
|
5891
5922
|
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
5892
5923
|
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
5893
5924
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
5894
|
-
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
5925
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
5895
5926
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
5896
|
-
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
5927
|
+
let h = await (s.hooks ? await s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, s);
|
|
5897
5928
|
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
5898
5929
|
})().catch(a);
|
|
5899
5930
|
try {
|
|
5900
5931
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
5901
|
-
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
5932
|
+
let l = (s.hooks ? s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(n, s);
|
|
5902
5933
|
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
5903
|
-
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
5934
|
+
let c = (s.hooks ? s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(l, s);
|
|
5904
5935
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
5905
5936
|
} catch (o) {
|
|
5906
5937
|
return a(o);
|
|
@@ -5911,7 +5942,7 @@ var B = class {
|
|
|
5911
5942
|
return (n) => {
|
|
5912
5943
|
if (n.message += `
|
|
5913
5944
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
5914
|
-
let r = "<p>An error occurred:</p><pre>" +
|
|
5945
|
+
let r = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
|
|
5915
5946
|
return t ? Promise.resolve(r) : r;
|
|
5916
5947
|
}
|
|
5917
5948
|
if (t) return Promise.reject(n);
|
|
@@ -5919,44 +5950,44 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
5919
5950
|
};
|
|
5920
5951
|
}
|
|
5921
5952
|
};
|
|
5922
|
-
var
|
|
5923
|
-
function
|
|
5924
|
-
return
|
|
5953
|
+
var L = new D();
|
|
5954
|
+
function g(u3, e) {
|
|
5955
|
+
return L.parse(u3, e);
|
|
5925
5956
|
}
|
|
5926
|
-
|
|
5927
|
-
return
|
|
5957
|
+
g.options = g.setOptions = function(u3) {
|
|
5958
|
+
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5928
5959
|
};
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
return
|
|
5960
|
+
g.getDefaults = M;
|
|
5961
|
+
g.defaults = O;
|
|
5962
|
+
g.use = function(...u3) {
|
|
5963
|
+
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5933
5964
|
};
|
|
5934
|
-
|
|
5935
|
-
return
|
|
5965
|
+
g.walkTokens = function(u3, e) {
|
|
5966
|
+
return L.walkTokens(u3, e);
|
|
5936
5967
|
};
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5968
|
+
g.parseInline = L.parseInline;
|
|
5969
|
+
g.Parser = b;
|
|
5970
|
+
g.parser = b.parse;
|
|
5971
|
+
g.Renderer = y;
|
|
5972
|
+
g.TextRenderer = $;
|
|
5973
|
+
g.Lexer = x;
|
|
5974
|
+
g.lexer = x.lex;
|
|
5975
|
+
g.Tokenizer = w;
|
|
5976
|
+
g.Hooks = P;
|
|
5977
|
+
g.parse = g;
|
|
5978
|
+
g.options;
|
|
5979
|
+
g.setOptions;
|
|
5980
|
+
g.use;
|
|
5981
|
+
g.walkTokens;
|
|
5982
|
+
g.parseInline;
|
|
5952
5983
|
b.parse;
|
|
5953
5984
|
x.lex;
|
|
5954
5985
|
|
|
5955
|
-
// node_modules/highlight.js/es/core.js
|
|
5986
|
+
// ../../node_modules/highlight.js/es/core.js
|
|
5956
5987
|
var import_core = __toESM(require_core());
|
|
5957
5988
|
var core_default = import_core.default;
|
|
5958
5989
|
|
|
5959
|
-
// node_modules/highlight.js/es/languages/javascript.js
|
|
5990
|
+
// ../../node_modules/highlight.js/es/languages/javascript.js
|
|
5960
5991
|
var IDENT_RE = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
5961
5992
|
var KEYWORDS = [
|
|
5962
5993
|
"as",
|
|
@@ -6657,7 +6688,7 @@ function javascript(hljs) {
|
|
|
6657
6688
|
};
|
|
6658
6689
|
}
|
|
6659
6690
|
|
|
6660
|
-
// node_modules/highlight.js/es/languages/typescript.js
|
|
6691
|
+
// ../../node_modules/highlight.js/es/languages/typescript.js
|
|
6661
6692
|
var IDENT_RE2 = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
6662
6693
|
var KEYWORDS2 = [
|
|
6663
6694
|
"as",
|
|
@@ -7471,7 +7502,7 @@ function typescript(hljs) {
|
|
|
7471
7502
|
return tsLanguage;
|
|
7472
7503
|
}
|
|
7473
7504
|
|
|
7474
|
-
// node_modules/highlight.js/es/languages/python.js
|
|
7505
|
+
// ../../node_modules/highlight.js/es/languages/python.js
|
|
7475
7506
|
function python(hljs) {
|
|
7476
7507
|
const regex = hljs.regex;
|
|
7477
7508
|
const IDENT_RE3 = /[\p{XID_Start}_]\p{XID_Continue}*/u;
|
|
@@ -7886,7 +7917,7 @@ function python(hljs) {
|
|
|
7886
7917
|
};
|
|
7887
7918
|
}
|
|
7888
7919
|
|
|
7889
|
-
// node_modules/highlight.js/es/languages/json.js
|
|
7920
|
+
// ../../node_modules/highlight.js/es/languages/json.js
|
|
7890
7921
|
function json(hljs) {
|
|
7891
7922
|
const ATTRIBUTE = {
|
|
7892
7923
|
className: "attr",
|
|
@@ -7926,7 +7957,7 @@ function json(hljs) {
|
|
|
7926
7957
|
};
|
|
7927
7958
|
}
|
|
7928
7959
|
|
|
7929
|
-
// node_modules/highlight.js/es/languages/bash.js
|
|
7960
|
+
// ../../node_modules/highlight.js/es/languages/bash.js
|
|
7930
7961
|
function bash(hljs) {
|
|
7931
7962
|
const regex = hljs.regex;
|
|
7932
7963
|
const VAR = {};
|
|
@@ -8320,7 +8351,7 @@ function bash(hljs) {
|
|
|
8320
8351
|
};
|
|
8321
8352
|
}
|
|
8322
8353
|
|
|
8323
|
-
// node_modules/highlight.js/es/languages/shell.js
|
|
8354
|
+
// ../../node_modules/highlight.js/es/languages/shell.js
|
|
8324
8355
|
function shell(hljs) {
|
|
8325
8356
|
return {
|
|
8326
8357
|
name: "Shell Session",
|
|
@@ -8344,7 +8375,7 @@ function shell(hljs) {
|
|
|
8344
8375
|
};
|
|
8345
8376
|
}
|
|
8346
8377
|
|
|
8347
|
-
// node_modules/highlight.js/es/languages/css.js
|
|
8378
|
+
// ../../node_modules/highlight.js/es/languages/css.js
|
|
8348
8379
|
var MODES = (hljs) => {
|
|
8349
8380
|
return {
|
|
8350
8381
|
IMPORTANT: {
|
|
@@ -9281,7 +9312,7 @@ function css(hljs) {
|
|
|
9281
9312
|
};
|
|
9282
9313
|
}
|
|
9283
9314
|
|
|
9284
|
-
// node_modules/highlight.js/es/languages/xml.js
|
|
9315
|
+
// ../../node_modules/highlight.js/es/languages/xml.js
|
|
9285
9316
|
function xml(hljs) {
|
|
9286
9317
|
const regex = hljs.regex;
|
|
9287
9318
|
const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u);
|
|
@@ -9507,7 +9538,7 @@ function xml(hljs) {
|
|
|
9507
9538
|
};
|
|
9508
9539
|
}
|
|
9509
9540
|
|
|
9510
|
-
// node_modules/highlight.js/es/languages/markdown.js
|
|
9541
|
+
// ../../node_modules/highlight.js/es/languages/markdown.js
|
|
9511
9542
|
function markdown(hljs) {
|
|
9512
9543
|
const regex = hljs.regex;
|
|
9513
9544
|
const INLINE_HTML = {
|
|
@@ -9739,7 +9770,7 @@ function markdown(hljs) {
|
|
|
9739
9770
|
};
|
|
9740
9771
|
}
|
|
9741
9772
|
|
|
9742
|
-
// node_modules/highlight.js/es/languages/sql.js
|
|
9773
|
+
// ../../node_modules/highlight.js/es/languages/sql.js
|
|
9743
9774
|
function sql(hljs) {
|
|
9744
9775
|
const regex = hljs.regex;
|
|
9745
9776
|
const COMMENT_MODE = hljs.COMMENT("--", "$");
|
|
@@ -10382,7 +10413,7 @@ function sql(hljs) {
|
|
|
10382
10413
|
};
|
|
10383
10414
|
}
|
|
10384
10415
|
|
|
10385
|
-
// node_modules/highlight.js/es/languages/yaml.js
|
|
10416
|
+
// ../../node_modules/highlight.js/es/languages/yaml.js
|
|
10386
10417
|
function yaml(hljs) {
|
|
10387
10418
|
const LITERALS3 = "true false yes no null";
|
|
10388
10419
|
const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
|
|
@@ -10583,7 +10614,7 @@ function yaml(hljs) {
|
|
|
10583
10614
|
};
|
|
10584
10615
|
}
|
|
10585
10616
|
|
|
10586
|
-
// node_modules/highlight.js/es/languages/rust.js
|
|
10617
|
+
// ../../node_modules/highlight.js/es/languages/rust.js
|
|
10587
10618
|
function rust(hljs) {
|
|
10588
10619
|
const regex = hljs.regex;
|
|
10589
10620
|
const RAW_IDENTIFIER = /(r#)?/;
|
|
@@ -10896,7 +10927,7 @@ function rust(hljs) {
|
|
|
10896
10927
|
};
|
|
10897
10928
|
}
|
|
10898
10929
|
|
|
10899
|
-
// node_modules/highlight.js/es/languages/go.js
|
|
10930
|
+
// ../../node_modules/highlight.js/es/languages/go.js
|
|
10900
10931
|
function go(hljs) {
|
|
10901
10932
|
const LITERALS3 = [
|
|
10902
10933
|
"true",
|
|
@@ -11050,7 +11081,7 @@ function go(hljs) {
|
|
|
11050
11081
|
};
|
|
11051
11082
|
}
|
|
11052
11083
|
|
|
11053
|
-
// node_modules/highlight.js/es/languages/java.js
|
|
11084
|
+
// ../../node_modules/highlight.js/es/languages/java.js
|
|
11054
11085
|
var decimalDigits = "[0-9](_*[0-9])*";
|
|
11055
11086
|
var frac = `\\.(${decimalDigits})`;
|
|
11056
11087
|
var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -11304,7 +11335,7 @@ function java(hljs) {
|
|
|
11304
11335
|
};
|
|
11305
11336
|
}
|
|
11306
11337
|
|
|
11307
|
-
// node_modules/highlight.js/es/languages/cpp.js
|
|
11338
|
+
// ../../node_modules/highlight.js/es/languages/cpp.js
|
|
11308
11339
|
function cpp(hljs) {
|
|
11309
11340
|
const regex = hljs.regex;
|
|
11310
11341
|
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
@@ -11847,7 +11878,7 @@ function cpp(hljs) {
|
|
|
11847
11878
|
};
|
|
11848
11879
|
}
|
|
11849
11880
|
|
|
11850
|
-
// node_modules/highlight.js/es/languages/csharp.js
|
|
11881
|
+
// ../../node_modules/highlight.js/es/languages/csharp.js
|
|
11851
11882
|
function csharp(hljs) {
|
|
11852
11883
|
const BUILT_IN_KEYWORDS = [
|
|
11853
11884
|
"bool",
|
|
@@ -12247,7 +12278,7 @@ function csharp(hljs) {
|
|
|
12247
12278
|
};
|
|
12248
12279
|
}
|
|
12249
12280
|
|
|
12250
|
-
// node_modules/highlight.js/es/languages/php.js
|
|
12281
|
+
// ../../node_modules/highlight.js/es/languages/php.js
|
|
12251
12282
|
function php(hljs) {
|
|
12252
12283
|
const regex = hljs.regex;
|
|
12253
12284
|
const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
|
|
@@ -12848,7 +12879,7 @@ function php(hljs) {
|
|
|
12848
12879
|
};
|
|
12849
12880
|
}
|
|
12850
12881
|
|
|
12851
|
-
// node_modules/highlight.js/es/languages/ruby.js
|
|
12882
|
+
// ../../node_modules/highlight.js/es/languages/ruby.js
|
|
12852
12883
|
function ruby(hljs) {
|
|
12853
12884
|
const regex = hljs.regex;
|
|
12854
12885
|
const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)";
|
|
@@ -13261,7 +13292,7 @@ function ruby(hljs) {
|
|
|
13261
13292
|
};
|
|
13262
13293
|
}
|
|
13263
13294
|
|
|
13264
|
-
// node_modules/highlight.js/es/languages/swift.js
|
|
13295
|
+
// ../../node_modules/highlight.js/es/languages/swift.js
|
|
13265
13296
|
function source(re2) {
|
|
13266
13297
|
if (!re2) return null;
|
|
13267
13298
|
if (typeof re2 === "string") return re2;
|
|
@@ -14136,7 +14167,7 @@ function swift(hljs) {
|
|
|
14136
14167
|
};
|
|
14137
14168
|
}
|
|
14138
14169
|
|
|
14139
|
-
// node_modules/highlight.js/es/languages/kotlin.js
|
|
14170
|
+
// ../../node_modules/highlight.js/es/languages/kotlin.js
|
|
14140
14171
|
var decimalDigits2 = "[0-9](_*[0-9])*";
|
|
14141
14172
|
var frac2 = `\\.(${decimalDigits2})`;
|
|
14142
14173
|
var hexDigits2 = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -14606,7 +14637,7 @@ var scopedStyles = `
|
|
|
14606
14637
|
font-style: italic;
|
|
14607
14638
|
}
|
|
14608
14639
|
`;
|
|
14609
|
-
|
|
14640
|
+
g.use({
|
|
14610
14641
|
gfm: true,
|
|
14611
14642
|
breaks: false
|
|
14612
14643
|
});
|
|
@@ -14628,7 +14659,7 @@ function generateCodeBlockId() {
|
|
|
14628
14659
|
return `code-block-${++codeBlockCounter}`;
|
|
14629
14660
|
}
|
|
14630
14661
|
function renderMarkdown(content) {
|
|
14631
|
-
const html =
|
|
14662
|
+
const html = g.parse(content, { async: false });
|
|
14632
14663
|
const codeBlockRegex = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/g;
|
|
14633
14664
|
let result = html.replace(codeBlockRegex, (_2, lang, code2) => {
|
|
14634
14665
|
const decoded = code2.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"');
|
|
@@ -16629,7 +16660,7 @@ var STORAGE_KEYS = {
|
|
|
16629
16660
|
PLUGINS: "hustle-plugins"
|
|
16630
16661
|
};
|
|
16631
16662
|
var DEFAULTS = {
|
|
16632
|
-
HUSTLE_API_URL: "https://
|
|
16663
|
+
HUSTLE_API_URL: "https://emblemvault.ai",
|
|
16633
16664
|
EMBLEM_API_URL: "https://api.emblemvault.ai",
|
|
16634
16665
|
EMBLEM_MODAL_URL: "https://emblemvault.ai/connect"
|
|
16635
16666
|
};
|