@ktnpm_devops/react-component 0.15.0 → 0.16.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/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/data/HeatmapMatrix/HeatmapMatrix.d.ts.map +1 -1
- package/dist/data/HeatmapMatrix/HeatmapMatrix.types.d.ts +42 -0
- package/dist/data/HeatmapMatrix/HeatmapMatrix.types.d.ts.map +1 -1
- package/dist/data/HeatmapMatrix/HeatmapMatrixHeader.d.ts +9 -0
- package/dist/data/HeatmapMatrix/HeatmapMatrixHeader.d.ts.map +1 -0
- package/dist/data/HeatmapMatrix/getColumnRuns.d.ts +11 -0
- package/dist/data/HeatmapMatrix/getColumnRuns.d.ts.map +1 -0
- package/dist/data/HeatmapMatrix/getColumnRuns.test.d.ts +2 -0
- package/dist/data/HeatmapMatrix/getColumnRuns.test.d.ts.map +1 -0
- package/dist/data/HeatmapMatrix/index.d.ts +1 -1
- package/dist/data/HeatmapMatrix/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.cjs +32 -8
- package/dist/index100.cjs.map +1 -1
- package/dist/index100.js +33 -9
- package/dist/index100.js.map +1 -1
- package/dist/index101.cjs +53 -2
- package/dist/index101.cjs.map +1 -1
- package/dist/index101.js +54 -3
- package/dist/index101.js.map +1 -1
- package/dist/index102.cjs +39 -6
- package/dist/index102.cjs.map +1 -1
- package/dist/index102.js +38 -5
- package/dist/index102.js.map +1 -1
- package/dist/index103.cjs +92 -69
- package/dist/index103.cjs.map +1 -1
- package/dist/index103.js +91 -68
- package/dist/index103.js.map +1 -1
- package/dist/index104.cjs +34 -19
- package/dist/index104.cjs.map +1 -1
- package/dist/index104.js +35 -20
- package/dist/index104.js.map +1 -1
- package/dist/index105.cjs +116 -22
- package/dist/index105.cjs.map +1 -1
- package/dist/index105.js +115 -21
- package/dist/index105.js.map +1 -1
- package/dist/index106.cjs +43 -134
- package/dist/index106.cjs.map +1 -1
- package/dist/index106.js +42 -133
- package/dist/index106.js.map +1 -1
- package/dist/index107.cjs +16 -40
- package/dist/index107.cjs.map +1 -1
- package/dist/index107.js +16 -40
- package/dist/index107.js.map +1 -1
- package/dist/index108.cjs +4 -25
- package/dist/index108.cjs.map +1 -1
- package/dist/index108.js +5 -26
- package/dist/index108.js.map +1 -1
- package/dist/index109.cjs +35 -39
- package/dist/index109.cjs.map +1 -1
- package/dist/index109.js +34 -38
- package/dist/index109.js.map +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.cjs +43 -57
- package/dist/index110.cjs.map +1 -1
- package/dist/index110.js +42 -56
- package/dist/index110.js.map +1 -1
- package/dist/index111.cjs +24 -24
- package/dist/index111.cjs.map +1 -1
- package/dist/index111.js +23 -23
- package/dist/index111.js.map +1 -1
- package/dist/index112.cjs +20 -7
- package/dist/index112.cjs.map +1 -1
- package/dist/index112.js +19 -6
- package/dist/index112.js.map +1 -1
- package/dist/index113.cjs +14 -25
- package/dist/index113.cjs.map +1 -1
- package/dist/index113.js +13 -24
- package/dist/index113.js.map +1 -1
- package/dist/index114.cjs +57 -36
- package/dist/index114.cjs.map +1 -1
- package/dist/index114.js +57 -36
- package/dist/index114.js.map +1 -1
- package/dist/index115.cjs +21 -39
- package/dist/index115.cjs.map +1 -1
- package/dist/index115.js +20 -38
- package/dist/index115.js.map +1 -1
- package/dist/index116.cjs +18 -92
- package/dist/index116.cjs.map +1 -1
- package/dist/index116.js +17 -91
- package/dist/index116.js.map +1 -1
- package/dist/index117.cjs +15 -33
- package/dist/index117.cjs.map +1 -1
- package/dist/index117.js +16 -34
- package/dist/index117.js.map +1 -1
- package/dist/index118.cjs +16 -116
- package/dist/index118.cjs.map +1 -1
- package/dist/index118.js +15 -115
- package/dist/index118.js.map +1 -1
- package/dist/index119.cjs +32 -35
- package/dist/index119.cjs.map +1 -1
- package/dist/index119.js +32 -35
- package/dist/index119.js.map +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index120.cjs +48 -85
- package/dist/index120.cjs.map +1 -1
- package/dist/index120.js +47 -84
- package/dist/index120.js.map +1 -1
- package/dist/index121.cjs +18 -25
- package/dist/index121.cjs.map +1 -1
- package/dist/index121.js +17 -24
- package/dist/index121.js.map +1 -1
- package/dist/index122.cjs +37 -1164
- package/dist/index122.cjs.map +1 -1
- package/dist/index122.js +35 -1163
- package/dist/index122.js.map +1 -1
- package/dist/index123.cjs +42 -1575
- package/dist/index123.cjs.map +1 -1
- package/dist/index123.js +41 -1575
- package/dist/index123.js.map +1 -1
- package/dist/index124.cjs +1166 -0
- package/dist/index124.cjs.map +1 -0
- package/dist/index124.js +1167 -0
- package/dist/index124.js.map +1 -0
- package/dist/index125.cjs +1578 -0
- package/dist/index125.cjs.map +1 -0
- package/dist/index125.js +1579 -0
- package/dist/index125.js.map +1 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +2 -2
- package/dist/index16.js +2 -2
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index22.cjs +2 -2
- package/dist/index22.js +2 -2
- package/dist/index23.cjs +2 -2
- package/dist/index23.js +2 -2
- package/dist/index24.cjs +2 -2
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index30.cjs +7 -7
- package/dist/index30.js +7 -7
- package/dist/index31.cjs +4 -4
- package/dist/index31.js +4 -4
- package/dist/index32.cjs +78 -53
- package/dist/index32.cjs.map +1 -1
- package/dist/index32.js +79 -54
- package/dist/index32.js.map +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.cjs +2 -2
- package/dist/index34.js +2 -2
- package/dist/index35.cjs +2 -2
- package/dist/index35.js +2 -2
- package/dist/index36.cjs +2 -2
- package/dist/index36.js +2 -2
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.cjs +2 -2
- package/dist/index38.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +2 -2
- package/dist/index40.js +2 -2
- package/dist/index41.cjs +2 -2
- package/dist/index41.js +2 -2
- package/dist/index42.cjs +2 -2
- package/dist/index42.js +2 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +1 -1
- package/dist/index44.cjs +2 -2
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +4 -4
- package/dist/index45.js +4 -4
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.cjs +2 -2
- package/dist/index49.js +2 -2
- package/dist/index50.cjs +2 -2
- package/dist/index50.js +2 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.cjs +3 -3
- package/dist/index52.js +3 -3
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.cjs +3 -3
- package/dist/index55.js +3 -3
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +2 -2
- package/dist/index58.js +2 -2
- package/dist/index60.cjs +22 -10
- package/dist/index60.cjs.map +1 -1
- package/dist/index60.js +22 -10
- package/dist/index60.js.map +1 -1
- package/dist/index61.cjs +23 -5
- package/dist/index61.cjs.map +1 -1
- package/dist/index61.js +24 -6
- package/dist/index61.js.map +1 -1
- package/dist/index62.cjs +18 -17
- package/dist/index62.cjs.map +1 -1
- package/dist/index62.js +17 -16
- package/dist/index62.js.map +1 -1
- package/dist/index63.cjs +142 -6
- package/dist/index63.cjs.map +1 -1
- package/dist/index63.js +141 -5
- package/dist/index63.js.map +1 -1
- package/dist/index64.cjs +20 -2
- package/dist/index64.cjs.map +1 -1
- package/dist/index64.js +21 -3
- package/dist/index64.js.map +1 -1
- package/dist/index65.cjs +19 -141
- package/dist/index65.cjs.map +1 -1
- package/dist/index65.js +17 -139
- package/dist/index65.js.map +1 -1
- package/dist/index66.cjs +13 -16
- package/dist/index66.cjs.map +1 -1
- package/dist/index66.js +14 -17
- package/dist/index66.js.map +1 -1
- package/dist/index67.cjs +16 -46
- package/dist/index67.cjs.map +1 -1
- package/dist/index67.js +16 -46
- package/dist/index67.js.map +1 -1
- package/dist/index68.cjs +16 -52
- package/dist/index68.cjs.map +1 -1
- package/dist/index68.js +16 -52
- package/dist/index68.js.map +1 -1
- package/dist/index70.cjs +20 -2
- package/dist/index70.cjs.map +1 -1
- package/dist/index70.js +20 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.cjs +45 -12
- package/dist/index71.cjs.map +1 -1
- package/dist/index71.js +46 -13
- package/dist/index71.js.map +1 -1
- package/dist/index72.cjs +2 -35
- package/dist/index72.cjs.map +1 -1
- package/dist/index72.js +3 -36
- package/dist/index72.js.map +1 -1
- package/dist/index73.cjs +77 -26
- package/dist/index73.cjs.map +1 -1
- package/dist/index73.js +77 -26
- package/dist/index73.js.map +1 -1
- package/dist/index74.cjs +52 -13
- package/dist/index74.cjs.map +1 -1
- package/dist/index74.js +53 -14
- package/dist/index74.js.map +1 -1
- package/dist/index75.cjs +34 -10
- package/dist/index75.cjs.map +1 -1
- package/dist/index75.js +35 -11
- package/dist/index75.js.map +1 -1
- package/dist/index76.cjs +17 -21
- package/dist/index76.cjs.map +1 -1
- package/dist/index76.js +16 -20
- package/dist/index76.js.map +1 -1
- package/dist/index77.cjs +2 -5
- package/dist/index77.cjs.map +1 -1
- package/dist/index77.js +2 -5
- package/dist/index77.js.map +1 -1
- package/dist/index78.cjs +2 -38
- package/dist/index78.cjs.map +1 -1
- package/dist/index78.js +3 -39
- package/dist/index78.js.map +1 -1
- package/dist/index79.cjs +5 -29
- package/dist/index79.cjs.map +1 -1
- package/dist/index79.js +6 -30
- package/dist/index79.js.map +1 -1
- package/dist/index80.cjs +29 -17
- package/dist/index80.cjs.map +1 -1
- package/dist/index80.js +29 -17
- package/dist/index80.js.map +1 -1
- package/dist/index81.cjs +21 -22
- package/dist/index81.cjs.map +1 -1
- package/dist/index81.js +20 -21
- package/dist/index81.js.map +1 -1
- package/dist/index82.cjs +15 -69
- package/dist/index82.cjs.map +1 -1
- package/dist/index82.js +14 -68
- package/dist/index82.js.map +1 -1
- package/dist/index83.cjs +24 -7
- package/dist/index83.cjs.map +1 -1
- package/dist/index83.js +23 -6
- package/dist/index83.js.map +1 -1
- package/dist/index84.cjs +2 -35
- package/dist/index84.cjs.map +1 -1
- package/dist/index84.js +3 -36
- package/dist/index84.js.map +1 -1
- package/dist/index85.cjs +24 -35
- package/dist/index85.cjs.map +1 -1
- package/dist/index85.js +23 -34
- package/dist/index85.js.map +1 -1
- package/dist/index86.cjs +69 -43
- package/dist/index86.cjs.map +1 -1
- package/dist/index86.js +68 -42
- package/dist/index86.js.map +1 -1
- package/dist/index87.cjs +24 -24
- package/dist/index87.cjs.map +1 -1
- package/dist/index87.js +23 -23
- package/dist/index87.js.map +1 -1
- package/dist/index88.cjs +7 -20
- package/dist/index88.cjs.map +1 -1
- package/dist/index88.js +6 -19
- package/dist/index88.js.map +1 -1
- package/dist/index89.cjs +7 -14
- package/dist/index89.cjs.map +1 -1
- package/dist/index89.js +6 -13
- package/dist/index89.js.map +1 -1
- package/dist/index90.cjs +8 -53
- package/dist/index90.cjs.map +1 -1
- package/dist/index90.js +9 -54
- package/dist/index90.js.map +1 -1
- package/dist/index91.cjs +13 -19
- package/dist/index91.cjs.map +1 -1
- package/dist/index91.js +14 -20
- package/dist/index91.js.map +1 -1
- package/dist/index92.cjs +49 -13
- package/dist/index92.cjs.map +1 -1
- package/dist/index92.js +49 -13
- package/dist/index92.js.map +1 -1
- package/dist/index93.cjs +134 -55
- package/dist/index93.cjs.map +1 -1
- package/dist/index93.js +133 -54
- package/dist/index93.js.map +1 -1
- package/dist/index94.cjs +40 -22
- package/dist/index94.cjs.map +1 -1
- package/dist/index94.js +40 -22
- package/dist/index94.js.map +1 -1
- package/dist/index95.cjs +36 -15
- package/dist/index95.cjs.map +1 -1
- package/dist/index95.js +36 -15
- package/dist/index95.js.map +1 -1
- package/dist/index96.cjs +28 -13
- package/dist/index96.cjs.map +1 -1
- package/dist/index96.js +28 -13
- package/dist/index96.js.map +1 -1
- package/dist/index97.cjs +22 -27
- package/dist/index97.cjs.map +1 -1
- package/dist/index97.js +21 -26
- package/dist/index97.js.map +1 -1
- package/dist/index98.cjs +69 -21
- package/dist/index98.cjs.map +1 -1
- package/dist/index98.js +68 -20
- package/dist/index98.js.map +1 -1
- package/dist/index99.cjs +7 -21
- package/dist/index99.cjs.map +1 -1
- package/dist/index99.js +6 -20
- package/dist/index99.js.map +1 -1
- package/dist/style.css +19 -5
- package/package.json +1 -1
package/dist/index122.js
CHANGED
|
@@ -1,1167 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
})(), 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)}}>`) }, Re = /^(?:[ \t]*(?:\n|$))+/, Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, 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(), 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(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, 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(), $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), 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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _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(), 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(), Le = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), 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 }, 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(), 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() }, 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} *[^
|
|
27
|
-
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, H = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex(), le = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, De = /(?:[^\s\p{P}\p{S}]|~)/u, 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(), ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ve = k(ue, "u").replace(/punct/g, z).getRegex(), He = k(ue, "u").replace(/punct/g, le).getRegex(), pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex(), 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(), Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), je = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Fe = k(je, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), 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(), We = k(U).replace("(?:-->|$)", "-->").getRegex(), 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(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, 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(), ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(), he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex(), re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, 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: _ }, Ye = { ...X, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, 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() }, et = { ...N, br: k(ae).replace("{2,}", "*").getRegex(), text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, B = { normal: K, gfm: Me, pedantic: ze }, E = { normal: X, gfm: N, breaks: et, pedantic: Ye };
|
|
28
|
-
var tt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ke = (u3) => tt[u3];
|
|
29
|
-
function T(u3, e) {
|
|
30
|
-
if (e) {
|
|
31
|
-
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ke);
|
|
32
|
-
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ke);
|
|
33
|
-
return u3;
|
|
34
|
-
}
|
|
35
|
-
function J(u3) {
|
|
36
|
-
try {
|
|
37
|
-
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
38
|
-
} catch {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return u3;
|
|
42
|
-
}
|
|
43
|
-
function V(u3, e) {
|
|
44
|
-
var _a2;
|
|
45
|
-
let t = u3.replace(m.findPipe, (i, s, a) => {
|
|
46
|
-
let o = false, l = s;
|
|
47
|
-
for (; --l >= 0 && a[l] === "\\"; ) o = !o;
|
|
48
|
-
return o ? "|" : " |";
|
|
49
|
-
}), n = t.split(m.splitPipe), r = 0;
|
|
50
|
-
if (n[0].trim() || n.shift(), n.length > 0 && !((_a2 = n.at(-1)) == null ? void 0 : _a2.trim()) && n.pop(), e) if (n.length > e) n.splice(e);
|
|
51
|
-
else for (; n.length < e; ) n.push("");
|
|
52
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
53
|
-
return n;
|
|
54
|
-
}
|
|
55
|
-
function I(u3, e, t) {
|
|
56
|
-
let n = u3.length;
|
|
57
|
-
if (n === 0) return "";
|
|
58
|
-
let r = 0;
|
|
59
|
-
for (; r < n; ) {
|
|
60
|
-
let i = u3.charAt(n - r - 1);
|
|
61
|
-
if (i === e && true) r++;
|
|
62
|
-
else break;
|
|
63
|
-
}
|
|
64
|
-
return u3.slice(0, n - r);
|
|
65
|
-
}
|
|
66
|
-
function de(u3, e) {
|
|
67
|
-
if (u3.indexOf(e[1]) === -1) return -1;
|
|
68
|
-
let t = 0;
|
|
69
|
-
for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
|
|
70
|
-
else if (u3[n] === e[0]) t++;
|
|
71
|
-
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
72
|
-
return t > 0 ? -2 : -1;
|
|
73
|
-
}
|
|
74
|
-
function ge(u3, e = 0) {
|
|
75
|
-
let t = e, n = "";
|
|
76
|
-
for (let r of u3) if (r === " ") {
|
|
77
|
-
let i = 4 - t % 4;
|
|
78
|
-
n += " ".repeat(i), t += i;
|
|
79
|
-
} else n += r, t++;
|
|
80
|
-
return n;
|
|
81
|
-
}
|
|
82
|
-
function fe(u3, e, t, n, r) {
|
|
83
|
-
let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
|
|
84
|
-
n.state.inLink = true;
|
|
85
|
-
let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
86
|
-
return n.state.inLink = false, o;
|
|
87
|
-
}
|
|
88
|
-
function nt(u3, e, t) {
|
|
89
|
-
let n = u3.match(t.other.indentCodeCompensation);
|
|
90
|
-
if (n === null) return e;
|
|
91
|
-
let r = n[1];
|
|
92
|
-
return e.split(`
|
|
93
|
-
`).map((i) => {
|
|
94
|
-
let s = i.match(t.other.beginningSpace);
|
|
95
|
-
if (s === null) return i;
|
|
96
|
-
let [a] = s;
|
|
97
|
-
return a.length >= r.length ? i.slice(r.length) : i;
|
|
98
|
-
}).join(`
|
|
99
|
-
`);
|
|
100
|
-
}
|
|
101
|
-
var w = class {
|
|
102
|
-
constructor(e) {
|
|
103
|
-
__publicField(this, "options");
|
|
104
|
-
__publicField(this, "rules");
|
|
105
|
-
__publicField(this, "lexer");
|
|
106
|
-
this.options = e || O;
|
|
107
|
-
}
|
|
108
|
-
space(e) {
|
|
109
|
-
let t = this.rules.block.newline.exec(e);
|
|
110
|
-
if (t && t[0].length > 0) return { type: "space", raw: t[0] };
|
|
111
|
-
}
|
|
112
|
-
code(e) {
|
|
113
|
-
let t = this.rules.block.code.exec(e);
|
|
114
|
-
if (t) {
|
|
115
|
-
let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
116
|
-
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : I(n, `
|
|
117
|
-
`) };
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
fences(e) {
|
|
121
|
-
let t = this.rules.block.fences.exec(e);
|
|
122
|
-
if (t) {
|
|
123
|
-
let n = t[0], r = nt(n, t[3] || "", this.rules);
|
|
124
|
-
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
heading(e) {
|
|
128
|
-
let t = this.rules.block.heading.exec(e);
|
|
129
|
-
if (t) {
|
|
130
|
-
let n = t[2].trim();
|
|
131
|
-
if (this.rules.other.endingHash.test(n)) {
|
|
132
|
-
let r = I(n, "#");
|
|
133
|
-
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
134
|
-
}
|
|
135
|
-
return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
hr(e) {
|
|
139
|
-
let t = this.rules.block.hr.exec(e);
|
|
140
|
-
if (t) return { type: "hr", raw: I(t[0], `
|
|
141
|
-
`) };
|
|
142
|
-
}
|
|
143
|
-
blockquote(e) {
|
|
144
|
-
let t = this.rules.block.blockquote.exec(e);
|
|
145
|
-
if (t) {
|
|
146
|
-
let n = I(t[0], `
|
|
147
|
-
`).split(`
|
|
148
|
-
`), r = "", i = "", s = [];
|
|
149
|
-
for (; n.length > 0; ) {
|
|
150
|
-
let a = false, o = [], l;
|
|
151
|
-
for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = true;
|
|
152
|
-
else if (!a) o.push(n[l]);
|
|
153
|
-
else break;
|
|
154
|
-
n = n.slice(l);
|
|
155
|
-
let p = o.join(`
|
|
156
|
-
`), c = p.replace(this.rules.other.blockquoteSetextReplace, `
|
|
157
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
158
|
-
r = r ? `${r}
|
|
159
|
-
${p}` : p, i = i ? `${i}
|
|
160
|
-
${c}` : c;
|
|
161
|
-
let d = this.lexer.state.top;
|
|
162
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
|
|
163
|
-
let h = s.at(-1);
|
|
164
|
-
if ((h == null ? void 0 : h.type) === "code") break;
|
|
165
|
-
if ((h == null ? void 0 : h.type) === "blockquote") {
|
|
166
|
-
let R = h, f = R.raw + `
|
|
167
|
-
` + n.join(`
|
|
168
|
-
`), S = this.blockquote(f);
|
|
169
|
-
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;
|
|
170
|
-
break;
|
|
171
|
-
} else if ((h == null ? void 0 : h.type) === "list") {
|
|
172
|
-
let R = h, f = R.raw + `
|
|
173
|
-
` + n.join(`
|
|
174
|
-
`), S = this.list(f);
|
|
175
|
-
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(`
|
|
176
|
-
`);
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
return { type: "blockquote", raw: r, tokens: s, text: i };
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
list(e) {
|
|
184
|
-
var _a2, _b;
|
|
185
|
-
let t = this.rules.block.list.exec(e);
|
|
186
|
-
if (t) {
|
|
187
|
-
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
188
|
-
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
189
|
-
let s = this.rules.other.listItemRegex(n), a = false;
|
|
190
|
-
for (; e; ) {
|
|
191
|
-
let l = false, p = "", c = "";
|
|
192
|
-
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
193
|
-
p = t[0], e = e.substring(p.length);
|
|
194
|
-
let d = ge(t[2].split(`
|
|
195
|
-
`, 1)[0], t[1].length), h = e.split(`
|
|
196
|
-
`, 1)[0], R = !d.trim(), f = 0;
|
|
197
|
-
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 + `
|
|
198
|
-
`, e = e.substring(h.length + 1), l = true), !l) {
|
|
199
|
-
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);
|
|
200
|
-
for (; e; ) {
|
|
201
|
-
let Z = e.split(`
|
|
202
|
-
`, 1)[0], A;
|
|
203
|
-
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;
|
|
204
|
-
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
205
|
-
` + A.slice(f);
|
|
206
|
-
else {
|
|
207
|
-
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
|
|
208
|
-
c += `
|
|
209
|
-
` + h;
|
|
210
|
-
}
|
|
211
|
-
R = !h.trim(), p += Z + `
|
|
212
|
-
`, e = e.substring(Z.length + 1), d = A.slice(f);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
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;
|
|
216
|
-
}
|
|
217
|
-
let o = i.items.at(-1);
|
|
218
|
-
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
219
|
-
else return;
|
|
220
|
-
i.raw = i.raw.trimEnd();
|
|
221
|
-
for (let l of i.items) {
|
|
222
|
-
if (this.lexer.state.top = false, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
|
|
223
|
-
if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), ((_a2 = l.tokens[0]) == null ? void 0 : _a2.type) === "text" || ((_b = l.tokens[0]) == null ? void 0 : _b.type) === "paragraph") {
|
|
224
|
-
l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
|
|
225
|
-
for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
|
|
226
|
-
this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
let p = this.rules.other.listTaskCheckbox.exec(l.raw);
|
|
231
|
-
if (p) {
|
|
232
|
-
let c = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
|
|
233
|
-
l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : l.tokens.unshift(c);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (!i.loose) {
|
|
237
|
-
let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
|
|
238
|
-
i.loose = c;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
if (i.loose) for (let l of i.items) {
|
|
242
|
-
l.loose = true;
|
|
243
|
-
for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
|
|
244
|
-
}
|
|
245
|
-
return i;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
html(e) {
|
|
249
|
-
let t = this.rules.block.html.exec(e);
|
|
250
|
-
if (t) return { type: "html", block: true, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] };
|
|
251
|
-
}
|
|
252
|
-
def(e) {
|
|
253
|
-
let t = this.rules.block.def.exec(e);
|
|
254
|
-
if (t) {
|
|
255
|
-
let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
256
|
-
return { type: "def", tag: n, raw: t[0], href: r, title: i };
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
table(e) {
|
|
260
|
-
var _a2;
|
|
261
|
-
let t = this.rules.block.table.exec(e);
|
|
262
|
-
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
263
|
-
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = ((_a2 = t[3]) == null ? void 0 : _a2.trim()) ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
264
|
-
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
265
|
-
if (n.length === r.length) {
|
|
266
|
-
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);
|
|
267
|
-
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] });
|
|
268
|
-
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] })));
|
|
269
|
-
return s;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
lheading(e) {
|
|
273
|
-
let t = this.rules.block.lheading.exec(e);
|
|
274
|
-
if (t) {
|
|
275
|
-
let n = t[1].trim();
|
|
276
|
-
return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
paragraph(e) {
|
|
280
|
-
let t = this.rules.block.paragraph.exec(e);
|
|
281
|
-
if (t) {
|
|
282
|
-
let n = t[1].charAt(t[1].length - 1) === `
|
|
283
|
-
` ? t[1].slice(0, -1) : t[1];
|
|
284
|
-
return { type: "paragraph", raw: t[0], text: n, tokens: this.lexer.inline(n) };
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
text(e) {
|
|
288
|
-
let t = this.rules.block.text.exec(e);
|
|
289
|
-
if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) };
|
|
290
|
-
}
|
|
291
|
-
escape(e) {
|
|
292
|
-
let t = this.rules.inline.escape.exec(e);
|
|
293
|
-
if (t) return { type: "escape", raw: t[0], text: t[1] };
|
|
294
|
-
}
|
|
295
|
-
tag(e) {
|
|
296
|
-
let t = this.rules.inline.tag.exec(e);
|
|
297
|
-
if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t[0] };
|
|
298
|
-
}
|
|
299
|
-
link(e) {
|
|
300
|
-
let t = this.rules.inline.link.exec(e);
|
|
301
|
-
if (t) {
|
|
302
|
-
let n = t[2].trim();
|
|
303
|
-
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
304
|
-
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
305
|
-
let s = I(n.slice(0, -1), "\\");
|
|
306
|
-
if ((n.length - s.length) % 2 === 0) return;
|
|
307
|
-
} else {
|
|
308
|
-
let s = de(t[2], "()");
|
|
309
|
-
if (s === -2) return;
|
|
310
|
-
if (s > -1) {
|
|
311
|
-
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
312
|
-
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
let r = t[2], i = "";
|
|
316
|
-
if (this.options.pedantic) {
|
|
317
|
-
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
318
|
-
s && (r = s[1], i = s[3]);
|
|
319
|
-
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
320
|
-
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);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
reflink(e, t) {
|
|
324
|
-
let n;
|
|
325
|
-
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
326
|
-
let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t[r.toLowerCase()];
|
|
327
|
-
if (!i) {
|
|
328
|
-
let s = n[0].charAt(0);
|
|
329
|
-
return { type: "text", raw: s, text: s };
|
|
330
|
-
}
|
|
331
|
-
return fe(n, i, n[0], this.lexer, this.rules);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
emStrong(e, t, n = "") {
|
|
335
|
-
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
336
|
-
if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
337
|
-
if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
338
|
-
let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
339
|
-
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) !== null; ) {
|
|
340
|
-
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
341
|
-
if (o = [...a].length, r[3] || r[4]) {
|
|
342
|
-
l += o;
|
|
343
|
-
continue;
|
|
344
|
-
} else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
|
|
345
|
-
p += o;
|
|
346
|
-
continue;
|
|
347
|
-
}
|
|
348
|
-
if (l -= o, l > 0) continue;
|
|
349
|
-
o = Math.min(o, o + l + p);
|
|
350
|
-
let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
|
|
351
|
-
if (Math.min(s, o) % 2) {
|
|
352
|
-
let f = h.slice(1, -1);
|
|
353
|
-
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
354
|
-
}
|
|
355
|
-
let R = h.slice(2, -2);
|
|
356
|
-
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
codespan(e) {
|
|
361
|
-
let t = this.rules.inline.code.exec(e);
|
|
362
|
-
if (t) {
|
|
363
|
-
let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
|
|
364
|
-
return r && i && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t[0], text: n };
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
br(e) {
|
|
368
|
-
let t = this.rules.inline.br.exec(e);
|
|
369
|
-
if (t) return { type: "br", raw: t[0] };
|
|
370
|
-
}
|
|
371
|
-
del(e, t, n = "") {
|
|
372
|
-
let r = this.rules.inline.delLDelim.exec(e);
|
|
373
|
-
if (!r) return;
|
|
374
|
-
if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
375
|
-
let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
|
|
376
|
-
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) !== null; ) {
|
|
377
|
-
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
|
|
378
|
-
if (r[3] || r[4]) {
|
|
379
|
-
l += o;
|
|
380
|
-
continue;
|
|
381
|
-
}
|
|
382
|
-
if (l -= o, l > 0) continue;
|
|
383
|
-
o = Math.min(o, o + l);
|
|
384
|
-
let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
|
|
385
|
-
return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
autolink(e) {
|
|
390
|
-
let t = this.rules.inline.autolink.exec(e);
|
|
391
|
-
if (t) {
|
|
392
|
-
let n, r;
|
|
393
|
-
return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
url(e) {
|
|
397
|
-
var _a2;
|
|
398
|
-
let t;
|
|
399
|
-
if (t = this.rules.inline.url.exec(e)) {
|
|
400
|
-
let n, r;
|
|
401
|
-
if (t[2] === "@") n = t[0], r = "mailto:" + n;
|
|
402
|
-
else {
|
|
403
|
-
let i;
|
|
404
|
-
do
|
|
405
|
-
i = t[0], t[0] = ((_a2 = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : _a2[0]) ?? "";
|
|
406
|
-
while (i !== t[0]);
|
|
407
|
-
n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
|
|
408
|
-
}
|
|
409
|
-
return { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
inlineText(e) {
|
|
413
|
-
let t = this.rules.inline.text.exec(e);
|
|
414
|
-
if (t) {
|
|
415
|
-
let n = this.lexer.state.inRawBlock;
|
|
416
|
-
return { type: "text", raw: t[0], text: t[0], escaped: n };
|
|
417
|
-
}
|
|
418
|
-
}
|
|
1
|
+
const wrap = "krc-wrap-JRsc1";
|
|
2
|
+
const root = "krc-root-k9ocd";
|
|
3
|
+
const colh = "krc-colh-Fi0Kr";
|
|
4
|
+
const group = "krc-group-rVQPU";
|
|
5
|
+
const groupStart = "krc-groupStart-bu8S4";
|
|
6
|
+
const rowh = "krc-rowh-bTG4G";
|
|
7
|
+
const corner = "krc-corner-MNGJd";
|
|
8
|
+
const cell = "krc-cell-i0lDG";
|
|
9
|
+
const bad = "krc-bad-Hb1F3";
|
|
10
|
+
const ok = "krc-ok-hx6Lc";
|
|
11
|
+
const clickable = "krc-clickable-Q8fZg";
|
|
12
|
+
const styles = {
|
|
13
|
+
wrap,
|
|
14
|
+
root,
|
|
15
|
+
colh,
|
|
16
|
+
group,
|
|
17
|
+
groupStart,
|
|
18
|
+
rowh,
|
|
19
|
+
corner,
|
|
20
|
+
cell,
|
|
21
|
+
bad,
|
|
22
|
+
ok,
|
|
23
|
+
clickable
|
|
419
24
|
};
|
|
420
|
-
var x = class u {
|
|
421
|
-
constructor(e) {
|
|
422
|
-
__publicField(this, "tokens");
|
|
423
|
-
__publicField(this, "options");
|
|
424
|
-
__publicField(this, "state");
|
|
425
|
-
__publicField(this, "inlineQueue");
|
|
426
|
-
__publicField(this, "tokenizer");
|
|
427
|
-
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 };
|
|
428
|
-
let t = { other: m, block: B.normal, inline: E.normal };
|
|
429
|
-
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;
|
|
430
|
-
}
|
|
431
|
-
static get rules() {
|
|
432
|
-
return { block: B, inline: E };
|
|
433
|
-
}
|
|
434
|
-
static lex(e, t) {
|
|
435
|
-
return new u(t).lex(e);
|
|
436
|
-
}
|
|
437
|
-
static lexInline(e, t) {
|
|
438
|
-
return new u(t).inlineTokens(e);
|
|
439
|
-
}
|
|
440
|
-
lex(e) {
|
|
441
|
-
e = e.replace(m.carriageReturn, `
|
|
442
|
-
`), this.blockTokens(e, this.tokens);
|
|
443
|
-
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
444
|
-
let n = this.inlineQueue[t];
|
|
445
|
-
this.inlineTokens(n.src, n.tokens);
|
|
446
|
-
}
|
|
447
|
-
return this.inlineQueue = [], this.tokens;
|
|
448
|
-
}
|
|
449
|
-
blockTokens(e, t = [], n = false) {
|
|
450
|
-
var _a2, _b, _c;
|
|
451
|
-
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
452
|
-
let r;
|
|
453
|
-
if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.block) == null ? void 0 : _b.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
|
|
454
|
-
if (r = this.tokenizer.space(e)) {
|
|
455
|
-
e = e.substring(r.raw.length);
|
|
456
|
-
let s = t.at(-1);
|
|
457
|
-
r.raw.length === 1 && s !== void 0 ? s.raw += `
|
|
458
|
-
` : t.push(r);
|
|
459
|
-
continue;
|
|
460
|
-
}
|
|
461
|
-
if (r = this.tokenizer.code(e)) {
|
|
462
|
-
e = e.substring(r.raw.length);
|
|
463
|
-
let s = t.at(-1);
|
|
464
|
-
(s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
|
|
465
|
-
`) ? "" : `
|
|
466
|
-
`) + r.raw, s.text += `
|
|
467
|
-
` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
468
|
-
continue;
|
|
469
|
-
}
|
|
470
|
-
if (r = this.tokenizer.fences(e)) {
|
|
471
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
472
|
-
continue;
|
|
473
|
-
}
|
|
474
|
-
if (r = this.tokenizer.heading(e)) {
|
|
475
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
476
|
-
continue;
|
|
477
|
-
}
|
|
478
|
-
if (r = this.tokenizer.hr(e)) {
|
|
479
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
480
|
-
continue;
|
|
481
|
-
}
|
|
482
|
-
if (r = this.tokenizer.blockquote(e)) {
|
|
483
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
if (r = this.tokenizer.list(e)) {
|
|
487
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
488
|
-
continue;
|
|
489
|
-
}
|
|
490
|
-
if (r = this.tokenizer.html(e)) {
|
|
491
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
492
|
-
continue;
|
|
493
|
-
}
|
|
494
|
-
if (r = this.tokenizer.def(e)) {
|
|
495
|
-
e = e.substring(r.raw.length);
|
|
496
|
-
let s = t.at(-1);
|
|
497
|
-
(s == null ? void 0 : s.type) === "paragraph" || (s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
|
|
498
|
-
`) ? "" : `
|
|
499
|
-
`) + r.raw, s.text += `
|
|
500
|
-
` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }, t.push(r));
|
|
501
|
-
continue;
|
|
502
|
-
}
|
|
503
|
-
if (r = this.tokenizer.table(e)) {
|
|
504
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
505
|
-
continue;
|
|
506
|
-
}
|
|
507
|
-
if (r = this.tokenizer.lheading(e)) {
|
|
508
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
509
|
-
continue;
|
|
510
|
-
}
|
|
511
|
-
let i = e;
|
|
512
|
-
if ((_c = this.options.extensions) == null ? void 0 : _c.startBlock) {
|
|
513
|
-
let s = 1 / 0, a = e.slice(1), o;
|
|
514
|
-
this.options.extensions.startBlock.forEach((l) => {
|
|
515
|
-
o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
|
|
516
|
-
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
517
|
-
}
|
|
518
|
-
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
519
|
-
let s = t.at(-1);
|
|
520
|
-
n && (s == null ? void 0 : s.type) === "paragraph" ? (s.raw += (s.raw.endsWith(`
|
|
521
|
-
`) ? "" : `
|
|
522
|
-
`) + r.raw, s.text += `
|
|
523
|
-
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
|
|
524
|
-
continue;
|
|
525
|
-
}
|
|
526
|
-
if (r = this.tokenizer.text(e)) {
|
|
527
|
-
e = e.substring(r.raw.length);
|
|
528
|
-
let s = t.at(-1);
|
|
529
|
-
(s == null ? void 0 : s.type) === "text" ? (s.raw += (s.raw.endsWith(`
|
|
530
|
-
`) ? "" : `
|
|
531
|
-
`) + r.raw, s.text += `
|
|
532
|
-
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
if (e) {
|
|
536
|
-
let s = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
537
|
-
if (this.options.silent) {
|
|
538
|
-
console.error(s);
|
|
539
|
-
break;
|
|
540
|
-
} else throw new Error(s);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
return this.state.top = true, t;
|
|
544
|
-
}
|
|
545
|
-
inline(e, t = []) {
|
|
546
|
-
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
547
|
-
}
|
|
548
|
-
inlineTokens(e, t = []) {
|
|
549
|
-
var _a2, _b, _c, _d, _e2;
|
|
550
|
-
this.tokenizer.lexer = this;
|
|
551
|
-
let n = e, r = null;
|
|
552
|
-
if (this.tokens.links) {
|
|
553
|
-
let o = Object.keys(this.tokens.links);
|
|
554
|
-
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));
|
|
555
|
-
}
|
|
556
|
-
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
557
|
-
let i;
|
|
558
|
-
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);
|
|
559
|
-
n = ((_b = (_a2 = this.options.hooks) == null ? void 0 : _a2.emStrongMask) == null ? void 0 : _b.call({ lexer: this }, n)) ?? n;
|
|
560
|
-
let s = false, a = "";
|
|
561
|
-
for (; e; ) {
|
|
562
|
-
s || (a = ""), s = false;
|
|
563
|
-
let o;
|
|
564
|
-
if ((_d = (_c = this.options.extensions) == null ? void 0 : _c.inline) == null ? void 0 : _d.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
|
|
565
|
-
if (o = this.tokenizer.escape(e)) {
|
|
566
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
567
|
-
continue;
|
|
568
|
-
}
|
|
569
|
-
if (o = this.tokenizer.tag(e)) {
|
|
570
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
if (o = this.tokenizer.link(e)) {
|
|
574
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
if (o = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
578
|
-
e = e.substring(o.raw.length);
|
|
579
|
-
let p = t.at(-1);
|
|
580
|
-
o.type === "text" && (p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
|
|
581
|
-
continue;
|
|
582
|
-
}
|
|
583
|
-
if (o = this.tokenizer.emStrong(e, n, a)) {
|
|
584
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
585
|
-
continue;
|
|
586
|
-
}
|
|
587
|
-
if (o = this.tokenizer.codespan(e)) {
|
|
588
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
589
|
-
continue;
|
|
590
|
-
}
|
|
591
|
-
if (o = this.tokenizer.br(e)) {
|
|
592
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
593
|
-
continue;
|
|
594
|
-
}
|
|
595
|
-
if (o = this.tokenizer.del(e, n, a)) {
|
|
596
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
597
|
-
continue;
|
|
598
|
-
}
|
|
599
|
-
if (o = this.tokenizer.autolink(e)) {
|
|
600
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
601
|
-
continue;
|
|
602
|
-
}
|
|
603
|
-
if (!this.state.inLink && (o = this.tokenizer.url(e))) {
|
|
604
|
-
e = e.substring(o.raw.length), t.push(o);
|
|
605
|
-
continue;
|
|
606
|
-
}
|
|
607
|
-
let l = e;
|
|
608
|
-
if ((_e2 = this.options.extensions) == null ? void 0 : _e2.startInline) {
|
|
609
|
-
let p = 1 / 0, c = e.slice(1), d;
|
|
610
|
-
this.options.extensions.startInline.forEach((h) => {
|
|
611
|
-
d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
|
|
612
|
-
}), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
|
|
613
|
-
}
|
|
614
|
-
if (o = this.tokenizer.inlineText(l)) {
|
|
615
|
-
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
|
|
616
|
-
let p = t.at(-1);
|
|
617
|
-
(p == null ? void 0 : p.type) === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
|
|
618
|
-
continue;
|
|
619
|
-
}
|
|
620
|
-
if (e) {
|
|
621
|
-
let p = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
622
|
-
if (this.options.silent) {
|
|
623
|
-
console.error(p);
|
|
624
|
-
break;
|
|
625
|
-
} else throw new Error(p);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
return t;
|
|
629
|
-
}
|
|
630
|
-
};
|
|
631
|
-
var y = class {
|
|
632
|
-
constructor(e) {
|
|
633
|
-
__publicField(this, "options");
|
|
634
|
-
__publicField(this, "parser");
|
|
635
|
-
this.options = e || O;
|
|
636
|
-
}
|
|
637
|
-
space(e) {
|
|
638
|
-
return "";
|
|
639
|
-
}
|
|
640
|
-
code({ text: e, lang: t, escaped: n }) {
|
|
641
|
-
var _a2;
|
|
642
|
-
let r = (_a2 = (t || "").match(m.notSpaceStart)) == null ? void 0 : _a2[0], i = e.replace(m.endingNewline, "") + `
|
|
643
|
-
`;
|
|
644
|
-
return r ? '<pre><code class="language-' + T(r) + '">' + (n ? i : T(i, true)) + `</code></pre>
|
|
645
|
-
` : "<pre><code>" + (n ? i : T(i, true)) + `</code></pre>
|
|
646
|
-
`;
|
|
647
|
-
}
|
|
648
|
-
blockquote({ tokens: e }) {
|
|
649
|
-
return `<blockquote>
|
|
650
|
-
${this.parser.parse(e)}</blockquote>
|
|
651
|
-
`;
|
|
652
|
-
}
|
|
653
|
-
html({ text: e }) {
|
|
654
|
-
return e;
|
|
655
|
-
}
|
|
656
|
-
def(e) {
|
|
657
|
-
return "";
|
|
658
|
-
}
|
|
659
|
-
heading({ tokens: e, depth: t }) {
|
|
660
|
-
return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
661
|
-
`;
|
|
662
|
-
}
|
|
663
|
-
hr(e) {
|
|
664
|
-
return `<hr>
|
|
665
|
-
`;
|
|
666
|
-
}
|
|
667
|
-
list(e) {
|
|
668
|
-
let t = e.ordered, n = e.start, r = "";
|
|
669
|
-
for (let a = 0; a < e.items.length; a++) {
|
|
670
|
-
let o = e.items[a];
|
|
671
|
-
r += this.listitem(o);
|
|
672
|
-
}
|
|
673
|
-
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
674
|
-
return "<" + i + s + `>
|
|
675
|
-
` + r + "</" + i + `>
|
|
676
|
-
`;
|
|
677
|
-
}
|
|
678
|
-
listitem(e) {
|
|
679
|
-
return `<li>${this.parser.parse(e.tokens)}</li>
|
|
680
|
-
`;
|
|
681
|
-
}
|
|
682
|
-
checkbox({ checked: e }) {
|
|
683
|
-
return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
|
|
684
|
-
}
|
|
685
|
-
paragraph({ tokens: e }) {
|
|
686
|
-
return `<p>${this.parser.parseInline(e)}</p>
|
|
687
|
-
`;
|
|
688
|
-
}
|
|
689
|
-
table(e) {
|
|
690
|
-
let t = "", n = "";
|
|
691
|
-
for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
|
|
692
|
-
t += this.tablerow({ text: n });
|
|
693
|
-
let r = "";
|
|
694
|
-
for (let i = 0; i < e.rows.length; i++) {
|
|
695
|
-
let s = e.rows[i];
|
|
696
|
-
n = "";
|
|
697
|
-
for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
|
|
698
|
-
r += this.tablerow({ text: n });
|
|
699
|
-
}
|
|
700
|
-
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
701
|
-
<thead>
|
|
702
|
-
` + t + `</thead>
|
|
703
|
-
` + r + `</table>
|
|
704
|
-
`;
|
|
705
|
-
}
|
|
706
|
-
tablerow({ text: e }) {
|
|
707
|
-
return `<tr>
|
|
708
|
-
${e}</tr>
|
|
709
|
-
`;
|
|
710
|
-
}
|
|
711
|
-
tablecell(e) {
|
|
712
|
-
let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
|
|
713
|
-
return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
|
|
714
|
-
`;
|
|
715
|
-
}
|
|
716
|
-
strong({ tokens: e }) {
|
|
717
|
-
return `<strong>${this.parser.parseInline(e)}</strong>`;
|
|
718
|
-
}
|
|
719
|
-
em({ tokens: e }) {
|
|
720
|
-
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
721
|
-
}
|
|
722
|
-
codespan({ text: e }) {
|
|
723
|
-
return `<code>${T(e, true)}</code>`;
|
|
724
|
-
}
|
|
725
|
-
br(e) {
|
|
726
|
-
return "<br>";
|
|
727
|
-
}
|
|
728
|
-
del({ tokens: e }) {
|
|
729
|
-
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
730
|
-
}
|
|
731
|
-
link({ href: e, title: t, tokens: n }) {
|
|
732
|
-
let r = this.parser.parseInline(n), i = J(e);
|
|
733
|
-
if (i === null) return r;
|
|
734
|
-
e = i;
|
|
735
|
-
let s = '<a href="' + e + '"';
|
|
736
|
-
return t && (s += ' title="' + T(t) + '"'), s += ">" + r + "</a>", s;
|
|
737
|
-
}
|
|
738
|
-
image({ href: e, title: t, text: n, tokens: r }) {
|
|
739
|
-
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
740
|
-
let i = J(e);
|
|
741
|
-
if (i === null) return T(n);
|
|
742
|
-
e = i;
|
|
743
|
-
let s = `<img src="${e}" alt="${T(n)}"`;
|
|
744
|
-
return t && (s += ` title="${T(t)}"`), s += ">", s;
|
|
745
|
-
}
|
|
746
|
-
text(e) {
|
|
747
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : T(e.text);
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
var $ = class {
|
|
751
|
-
strong({ text: e }) {
|
|
752
|
-
return e;
|
|
753
|
-
}
|
|
754
|
-
em({ text: e }) {
|
|
755
|
-
return e;
|
|
756
|
-
}
|
|
757
|
-
codespan({ text: e }) {
|
|
758
|
-
return e;
|
|
759
|
-
}
|
|
760
|
-
del({ text: e }) {
|
|
761
|
-
return e;
|
|
762
|
-
}
|
|
763
|
-
html({ text: e }) {
|
|
764
|
-
return e;
|
|
765
|
-
}
|
|
766
|
-
text({ text: e }) {
|
|
767
|
-
return e;
|
|
768
|
-
}
|
|
769
|
-
link({ text: e }) {
|
|
770
|
-
return "" + e;
|
|
771
|
-
}
|
|
772
|
-
image({ text: e }) {
|
|
773
|
-
return "" + e;
|
|
774
|
-
}
|
|
775
|
-
br() {
|
|
776
|
-
return "";
|
|
777
|
-
}
|
|
778
|
-
checkbox({ raw: e }) {
|
|
779
|
-
return e;
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
var b = class u2 {
|
|
783
|
-
constructor(e) {
|
|
784
|
-
__publicField(this, "options");
|
|
785
|
-
__publicField(this, "renderer");
|
|
786
|
-
__publicField(this, "textRenderer");
|
|
787
|
-
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 $();
|
|
788
|
-
}
|
|
789
|
-
static parse(e, t) {
|
|
790
|
-
return new u2(t).parse(e);
|
|
791
|
-
}
|
|
792
|
-
static parseInline(e, t) {
|
|
793
|
-
return new u2(t).parseInline(e);
|
|
794
|
-
}
|
|
795
|
-
parse(e) {
|
|
796
|
-
var _a2, _b;
|
|
797
|
-
this.renderer.parser = this;
|
|
798
|
-
let t = "";
|
|
799
|
-
for (let n = 0; n < e.length; n++) {
|
|
800
|
-
let r = e[n];
|
|
801
|
-
if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.renderers) == null ? void 0 : _b[r.type]) {
|
|
802
|
-
let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
|
|
803
|
-
if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(s.type)) {
|
|
804
|
-
t += a || "";
|
|
805
|
-
continue;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
let i = r;
|
|
809
|
-
switch (i.type) {
|
|
810
|
-
case "space": {
|
|
811
|
-
t += this.renderer.space(i);
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
case "hr": {
|
|
815
|
-
t += this.renderer.hr(i);
|
|
816
|
-
break;
|
|
817
|
-
}
|
|
818
|
-
case "heading": {
|
|
819
|
-
t += this.renderer.heading(i);
|
|
820
|
-
break;
|
|
821
|
-
}
|
|
822
|
-
case "code": {
|
|
823
|
-
t += this.renderer.code(i);
|
|
824
|
-
break;
|
|
825
|
-
}
|
|
826
|
-
case "table": {
|
|
827
|
-
t += this.renderer.table(i);
|
|
828
|
-
break;
|
|
829
|
-
}
|
|
830
|
-
case "blockquote": {
|
|
831
|
-
t += this.renderer.blockquote(i);
|
|
832
|
-
break;
|
|
833
|
-
}
|
|
834
|
-
case "list": {
|
|
835
|
-
t += this.renderer.list(i);
|
|
836
|
-
break;
|
|
837
|
-
}
|
|
838
|
-
case "checkbox": {
|
|
839
|
-
t += this.renderer.checkbox(i);
|
|
840
|
-
break;
|
|
841
|
-
}
|
|
842
|
-
case "html": {
|
|
843
|
-
t += this.renderer.html(i);
|
|
844
|
-
break;
|
|
845
|
-
}
|
|
846
|
-
case "def": {
|
|
847
|
-
t += this.renderer.def(i);
|
|
848
|
-
break;
|
|
849
|
-
}
|
|
850
|
-
case "paragraph": {
|
|
851
|
-
t += this.renderer.paragraph(i);
|
|
852
|
-
break;
|
|
853
|
-
}
|
|
854
|
-
case "text": {
|
|
855
|
-
t += this.renderer.text(i);
|
|
856
|
-
break;
|
|
857
|
-
}
|
|
858
|
-
default: {
|
|
859
|
-
let s = 'Token with "' + i.type + '" type was not found.';
|
|
860
|
-
if (this.options.silent) return console.error(s), "";
|
|
861
|
-
throw new Error(s);
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
return t;
|
|
866
|
-
}
|
|
867
|
-
parseInline(e, t = this.renderer) {
|
|
868
|
-
var _a2, _b;
|
|
869
|
-
this.renderer.parser = this;
|
|
870
|
-
let n = "";
|
|
871
|
-
for (let r = 0; r < e.length; r++) {
|
|
872
|
-
let i = e[r];
|
|
873
|
-
if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.renderers) == null ? void 0 : _b[i.type]) {
|
|
874
|
-
let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
875
|
-
if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
876
|
-
n += a || "";
|
|
877
|
-
continue;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
let s = i;
|
|
881
|
-
switch (s.type) {
|
|
882
|
-
case "escape": {
|
|
883
|
-
n += t.text(s);
|
|
884
|
-
break;
|
|
885
|
-
}
|
|
886
|
-
case "html": {
|
|
887
|
-
n += t.html(s);
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
case "link": {
|
|
891
|
-
n += t.link(s);
|
|
892
|
-
break;
|
|
893
|
-
}
|
|
894
|
-
case "image": {
|
|
895
|
-
n += t.image(s);
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
case "checkbox": {
|
|
899
|
-
n += t.checkbox(s);
|
|
900
|
-
break;
|
|
901
|
-
}
|
|
902
|
-
case "strong": {
|
|
903
|
-
n += t.strong(s);
|
|
904
|
-
break;
|
|
905
|
-
}
|
|
906
|
-
case "em": {
|
|
907
|
-
n += t.em(s);
|
|
908
|
-
break;
|
|
909
|
-
}
|
|
910
|
-
case "codespan": {
|
|
911
|
-
n += t.codespan(s);
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
case "br": {
|
|
915
|
-
n += t.br(s);
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
case "del": {
|
|
919
|
-
n += t.del(s);
|
|
920
|
-
break;
|
|
921
|
-
}
|
|
922
|
-
case "text": {
|
|
923
|
-
n += t.text(s);
|
|
924
|
-
break;
|
|
925
|
-
}
|
|
926
|
-
default: {
|
|
927
|
-
let a = 'Token with "' + s.type + '" type was not found.';
|
|
928
|
-
if (this.options.silent) return console.error(a), "";
|
|
929
|
-
throw new Error(a);
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
return n;
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
var P = (_a = class {
|
|
937
|
-
constructor(e) {
|
|
938
|
-
__publicField(this, "options");
|
|
939
|
-
__publicField(this, "block");
|
|
940
|
-
this.options = e || O;
|
|
941
|
-
}
|
|
942
|
-
preprocess(e) {
|
|
943
|
-
return e;
|
|
944
|
-
}
|
|
945
|
-
postprocess(e) {
|
|
946
|
-
return e;
|
|
947
|
-
}
|
|
948
|
-
processAllTokens(e) {
|
|
949
|
-
return e;
|
|
950
|
-
}
|
|
951
|
-
emStrongMask(e) {
|
|
952
|
-
return e;
|
|
953
|
-
}
|
|
954
|
-
provideLexer(e = this.block) {
|
|
955
|
-
return e ? x.lex : x.lexInline;
|
|
956
|
-
}
|
|
957
|
-
provideParser(e = this.block) {
|
|
958
|
-
return e ? b.parse : b.parseInline;
|
|
959
|
-
}
|
|
960
|
-
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
961
|
-
var D = class {
|
|
962
|
-
constructor(...e) {
|
|
963
|
-
__publicField(this, "defaults", M());
|
|
964
|
-
__publicField(this, "options", this.setOptions);
|
|
965
|
-
__publicField(this, "parse", this.parseMarkdown(true));
|
|
966
|
-
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
967
|
-
__publicField(this, "Parser", b);
|
|
968
|
-
__publicField(this, "Renderer", y);
|
|
969
|
-
__publicField(this, "TextRenderer", $);
|
|
970
|
-
__publicField(this, "Lexer", x);
|
|
971
|
-
__publicField(this, "Tokenizer", w);
|
|
972
|
-
__publicField(this, "Hooks", P);
|
|
973
|
-
this.use(...e);
|
|
974
|
-
}
|
|
975
|
-
walkTokens(e, t) {
|
|
976
|
-
var _a2, _b;
|
|
977
|
-
let n = [];
|
|
978
|
-
for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
|
|
979
|
-
case "table": {
|
|
980
|
-
let i = r;
|
|
981
|
-
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
982
|
-
for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
|
|
983
|
-
break;
|
|
984
|
-
}
|
|
985
|
-
case "list": {
|
|
986
|
-
let i = r;
|
|
987
|
-
n = n.concat(this.walkTokens(i.items, t));
|
|
988
|
-
break;
|
|
989
|
-
}
|
|
990
|
-
default: {
|
|
991
|
-
let i = r;
|
|
992
|
-
((_b = (_a2 = this.defaults.extensions) == null ? void 0 : _a2.childTokens) == null ? void 0 : _b[i.type]) ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
993
|
-
let a = i[s].flat(1 / 0);
|
|
994
|
-
n = n.concat(this.walkTokens(a, t));
|
|
995
|
-
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
return n;
|
|
999
|
-
}
|
|
1000
|
-
use(...e) {
|
|
1001
|
-
let t = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
1002
|
-
return e.forEach((n) => {
|
|
1003
|
-
let r = { ...n };
|
|
1004
|
-
if (r.async = this.defaults.async || r.async || false, n.extensions && (n.extensions.forEach((i) => {
|
|
1005
|
-
if (!i.name) throw new Error("extension name required");
|
|
1006
|
-
if ("renderer" in i) {
|
|
1007
|
-
let s = t.renderers[i.name];
|
|
1008
|
-
s ? t.renderers[i.name] = function(...a) {
|
|
1009
|
-
let o = i.renderer.apply(this, a);
|
|
1010
|
-
return o === false && (o = s.apply(this, a)), o;
|
|
1011
|
-
} : t.renderers[i.name] = i.renderer;
|
|
1012
|
-
}
|
|
1013
|
-
if ("tokenizer" in i) {
|
|
1014
|
-
if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
|
|
1015
|
-
let s = t[i.level];
|
|
1016
|
-
s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
|
|
1017
|
-
}
|
|
1018
|
-
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
1019
|
-
}), r.extensions = t), n.renderer) {
|
|
1020
|
-
let i = this.defaults.renderer || new y(this.defaults);
|
|
1021
|
-
for (let s in n.renderer) {
|
|
1022
|
-
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
1023
|
-
if (["options", "parser"].includes(s)) continue;
|
|
1024
|
-
let a = s, o = n.renderer[a], l = i[a];
|
|
1025
|
-
i[a] = (...p) => {
|
|
1026
|
-
let c = o.apply(i, p);
|
|
1027
|
-
return c === false && (c = l.apply(i, p)), c || "";
|
|
1028
|
-
};
|
|
1029
|
-
}
|
|
1030
|
-
r.renderer = i;
|
|
1031
|
-
}
|
|
1032
|
-
if (n.tokenizer) {
|
|
1033
|
-
let i = this.defaults.tokenizer || new w(this.defaults);
|
|
1034
|
-
for (let s in n.tokenizer) {
|
|
1035
|
-
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
1036
|
-
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
1037
|
-
let a = s, o = n.tokenizer[a], l = i[a];
|
|
1038
|
-
i[a] = (...p) => {
|
|
1039
|
-
let c = o.apply(i, p);
|
|
1040
|
-
return c === false && (c = l.apply(i, p)), c;
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
r.tokenizer = i;
|
|
1044
|
-
}
|
|
1045
|
-
if (n.hooks) {
|
|
1046
|
-
let i = this.defaults.hooks || new P();
|
|
1047
|
-
for (let s in n.hooks) {
|
|
1048
|
-
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
1049
|
-
if (["options", "block"].includes(s)) continue;
|
|
1050
|
-
let a = s, o = n.hooks[a], l = i[a];
|
|
1051
|
-
P.passThroughHooks.has(s) ? i[a] = (p) => {
|
|
1052
|
-
if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
1053
|
-
let d = await o.call(i, p);
|
|
1054
|
-
return l.call(i, d);
|
|
1055
|
-
})();
|
|
1056
|
-
let c = o.call(i, p);
|
|
1057
|
-
return l.call(i, c);
|
|
1058
|
-
} : i[a] = (...p) => {
|
|
1059
|
-
if (this.defaults.async) return (async () => {
|
|
1060
|
-
let d = await o.apply(i, p);
|
|
1061
|
-
return d === false && (d = await l.apply(i, p)), d;
|
|
1062
|
-
})();
|
|
1063
|
-
let c = o.apply(i, p);
|
|
1064
|
-
return c === false && (c = l.apply(i, p)), c;
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
r.hooks = i;
|
|
1068
|
-
}
|
|
1069
|
-
if (n.walkTokens) {
|
|
1070
|
-
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
1071
|
-
r.walkTokens = function(a) {
|
|
1072
|
-
let o = [];
|
|
1073
|
-
return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
|
|
1074
|
-
};
|
|
1075
|
-
}
|
|
1076
|
-
this.defaults = { ...this.defaults, ...r };
|
|
1077
|
-
}), this;
|
|
1078
|
-
}
|
|
1079
|
-
setOptions(e) {
|
|
1080
|
-
return this.defaults = { ...this.defaults, ...e }, this;
|
|
1081
|
-
}
|
|
1082
|
-
lexer(e, t) {
|
|
1083
|
-
return x.lex(e, t ?? this.defaults);
|
|
1084
|
-
}
|
|
1085
|
-
parser(e, t) {
|
|
1086
|
-
return b.parse(e, t ?? this.defaults);
|
|
1087
|
-
}
|
|
1088
|
-
parseMarkdown(e) {
|
|
1089
|
-
return (n, r) => {
|
|
1090
|
-
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
1091
|
-
if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
1092
|
-
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
1093
|
-
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
1094
|
-
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
1095
|
-
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;
|
|
1096
|
-
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
1097
|
-
let h = await (s.hooks ? await s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, s);
|
|
1098
|
-
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
1099
|
-
})().catch(a);
|
|
1100
|
-
try {
|
|
1101
|
-
s.hooks && (n = s.hooks.preprocess(n));
|
|
1102
|
-
let l = (s.hooks ? s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(n, s);
|
|
1103
|
-
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
1104
|
-
let c = (s.hooks ? s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(l, s);
|
|
1105
|
-
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
1106
|
-
} catch (o) {
|
|
1107
|
-
return a(o);
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
onError(e, t) {
|
|
1112
|
-
return (n) => {
|
|
1113
|
-
if (n.message += `
|
|
1114
|
-
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
1115
|
-
let r = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
|
|
1116
|
-
return t ? Promise.resolve(r) : r;
|
|
1117
|
-
}
|
|
1118
|
-
if (t) return Promise.reject(n);
|
|
1119
|
-
throw n;
|
|
1120
|
-
};
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
var L = new D();
|
|
1124
|
-
function g(u3, e) {
|
|
1125
|
-
return L.parse(u3, e);
|
|
1126
|
-
}
|
|
1127
|
-
g.options = g.setOptions = function(u3) {
|
|
1128
|
-
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
1129
|
-
};
|
|
1130
|
-
g.getDefaults = M;
|
|
1131
|
-
g.defaults = O;
|
|
1132
|
-
g.use = function(...u3) {
|
|
1133
|
-
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
1134
|
-
};
|
|
1135
|
-
g.walkTokens = function(u3, e) {
|
|
1136
|
-
return L.walkTokens(u3, e);
|
|
1137
|
-
};
|
|
1138
|
-
g.parseInline = L.parseInline;
|
|
1139
|
-
g.Parser = b;
|
|
1140
|
-
g.parser = b.parse;
|
|
1141
|
-
g.Renderer = y;
|
|
1142
|
-
g.TextRenderer = $;
|
|
1143
|
-
g.Lexer = x;
|
|
1144
|
-
g.lexer = x.lex;
|
|
1145
|
-
g.Tokenizer = w;
|
|
1146
|
-
g.Hooks = P;
|
|
1147
|
-
g.parse = g;
|
|
1148
|
-
g.options;
|
|
1149
|
-
g.setOptions;
|
|
1150
|
-
g.use;
|
|
1151
|
-
g.walkTokens;
|
|
1152
|
-
g.parseInline;
|
|
1153
|
-
b.parse;
|
|
1154
|
-
x.lex;
|
|
1155
25
|
export {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
26
|
+
bad,
|
|
27
|
+
cell,
|
|
28
|
+
clickable,
|
|
29
|
+
colh,
|
|
30
|
+
corner,
|
|
31
|
+
styles as default,
|
|
32
|
+
group,
|
|
33
|
+
groupStart,
|
|
34
|
+
ok,
|
|
35
|
+
root,
|
|
36
|
+
rowh,
|
|
37
|
+
wrap
|
|
1166
38
|
};
|
|
1167
39
|
//# sourceMappingURL=index122.js.map
|