@arcgis/coding-components 4.34.0-next.80 → 4.34.0-next.82
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/addons.js +1 -1
- package/dist/cdn/{TOMZIMG4.js → 2XI5HQG4.js} +1 -1
- package/dist/cdn/{FPRNXDBG.js → 3JK3BSPG.js} +2 -2
- package/dist/cdn/{QK7Q73XT.js → 4R26FJ2J.js} +2 -2
- package/dist/cdn/{W57KGVCU.js → 5KHKPMWJ.js} +2 -2
- package/dist/cdn/{4Y73AMXU.js → 6H6IBNAO.js} +2 -2
- package/dist/cdn/{VF4PFPHZ.js → AXYAWWJX.js} +2 -2
- package/dist/cdn/{G74PDVWS.js → BTR2WLZW.js} +1 -1
- package/dist/cdn/{4JMUV552.js → BZO7LHM2.js} +1 -1
- package/dist/cdn/{JVYVRBLC.js → DOXOXR5M.js} +2 -2
- package/dist/cdn/{EAMGHNH6.js → E3BGVWOJ.js} +2 -2
- package/dist/cdn/{WVFNCCMI.js → E54BEF33.js} +2 -2
- package/dist/cdn/{ZVIG4Y47.js → F3DFSE7Y.js} +2 -2
- package/dist/cdn/{2OS5X2XC.js → FE5VK3OI.js} +2 -2
- package/dist/cdn/{AQGYQUOQ.js → GMPZRGRO.js} +2 -2
- package/dist/cdn/{SCCNGSHM.js → GSKAS4W7.js} +2 -2
- package/dist/cdn/{2UYT4AIE.js → IJ7RS7OY.js} +2 -2
- package/dist/cdn/{PCK6VLVO.js → IVFZ7VQI.js} +2 -2
- package/dist/cdn/{AKPGUPVV.js → IY66GFJC.js} +2 -2
- package/dist/cdn/JIBYYQXS.js +6 -0
- package/dist/cdn/{YVIJYACH.js → JSHH33LU.js} +2 -2
- package/dist/cdn/{HRVU4WAP.js → JTK63CBV.js} +2 -2
- package/dist/cdn/{7IK425QK.js → K2TQPBTY.js} +2 -2
- package/dist/cdn/{U5WTJRL5.js → KLL2MHSX.js} +2 -2
- package/dist/cdn/{DLD53SME.js → L4OCMXM5.js} +2 -2
- package/dist/cdn/{REAEPLBS.js → M26IELRG.js} +2 -2
- package/dist/cdn/{YZNUF5RC.js → QSCFRYNH.js} +2 -2
- package/dist/cdn/{QUHAMH5S.js → QUSM7CUX.js} +1 -1
- package/dist/cdn/{OIP2MDAO.js → RTD7TCGZ.js} +2 -2
- package/dist/cdn/{SANE7NL4.js → SDA3GAWE.js} +2 -2
- package/dist/cdn/{HJFJB5HU.js → STOGMESR.js} +2 -2
- package/dist/cdn/{ZW47SU7N.js → SU2ZF27O.js} +1 -1
- package/dist/cdn/{LMNF6SPV.js → T3GRNXMR.js} +2 -2
- package/dist/cdn/{H2C3XTHM.js → U4OZGUNN.js} +2 -2
- package/dist/cdn/{7TB3DLFW.js → VHDR64H6.js} +1 -1
- package/dist/cdn/{EYGND5IK.js → WSLTUX3Q.js} +2 -2
- package/dist/cdn/{W6VLAWVY.js → XEBFZH7G.js} +2 -2
- package/dist/cdn/{MBU4K7CX.js → XLQDFADS.js} +31 -27
- package/dist/cdn/{QNK3SEAV.js → XXI6CZY3.js} +1 -1
- package/dist/cdn/{PLEGSLPL.js → YL5WFZFT.js} +4 -4
- package/dist/cdn/{JMV65XQ6.js → Z4PQQLNI.js} +2 -2
- package/dist/cdn/{NTXSDHBS.js → ZBFXBYVE.js} +2 -2
- package/dist/cdn/{WEUONTWC.js → ZKRRGED3.js} +2 -2
- package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +41151 -40966
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +23 -19
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +135 -176
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +87 -38
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/ERV3IHVW.js +0 -6
|
@@ -1,59 +1,63 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import{k as re}from"./
|
|
5
|
-
]`).replace("lheading",pe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ge=/^( {2,}|\\)\n(?!\s*$)/,De=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,E=/[\p{P}\p{S}]/u,
|
|
6
|
-
`).map(
|
|
3
|
+
v4.34.0-next.82 */
|
|
4
|
+
import{k as re}from"./YL5WFZFT.js";import{ck as ne,jk as D,kk as ye,pk as M}from"./5KHKPMWJ.js";ye();async function $e(n,e){return await(await re()).colorize(n,e,{tabSize:2})}async function ht(n,e){if(!n)return;let r=Array.from(n.querySelectorAll("code.language-arcade, code.language-sql"),async s=>await Se(s,s.textContent,e));await Promise.all(r)}async function Se(n,e,r){!n||n.tagName!=="CODE"||(n.innerHTML=await $e(e??"",r))}function pt(){let n=M.get(D).getColorTheme();return ne(n.tokenTheme.getColorMap())}function ut(n){return M.get(D).onDidColorThemeChange(()=>n())}function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var S=j();function ce(n){S=n}var A={exec:()=>null};function u(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var x={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Re=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ae=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,H=/(?:[*+-]|\d{1,9}[.)])/,he=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pe=u(he).replace(/bull/g,H).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(),_e=u(he).replace(/bull/g,H).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(),G=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,F=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ce=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",F).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ie=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,H).getRegex(),B="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",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Le=u("^ {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",W).replace("tag",B).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue=u(G).replace("hr",_).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),qe=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ue).getRegex(),X={blockquote:qe,code:Te,def:Ce,fences:ze,heading:Ae,hr:_,html:Le,lheading:pe,list:Ie,newline:Re,paragraph:ue,table:A,text:Pe},se=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),Be={...X,lheading:_e,table:se,paragraph:u(G).replace("hr",_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex()},Ee={...X,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).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:A,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(G).replace("hr",_).replace("heading",` *#{1,6} *[^
|
|
5
|
+
]`).replace("lheading",pe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ge=/^( {2,}|\\)\n(?!\s*$)/,De=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,E=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,ke=/[^\s\p{P}\p{S}]/u,Me=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),de=/(?!~)[\p{P}\p{S}]/u,Ne=/(?!~)[\s\p{P}\p{S}]/u,Oe=/(?:[^\s\p{P}\p{S}]|~)/u,Qe=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,fe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,je=u(fe,"u").replace(/punct/g,E).getRegex(),He=u(fe,"u").replace(/punct/g,de).getRegex(),xe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ge=u(xe,"gu").replace(/notPunctSpace/g,ke).replace(/punctSpace/g,U).replace(/punct/g,E).getRegex(),Fe=u(xe,"gu").replace(/notPunctSpace/g,Oe).replace(/punctSpace/g,Ne).replace(/punct/g,de).getRegex(),We=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ke).replace(/punctSpace/g,U).replace(/punct/g,E).getRegex(),Xe=u(/\\(punct)/,"gu").replace(/punct/g,E).getRegex(),Ue=u(/^<(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(),Je=u(W).replace("(?:-->|$)","-->").getRegex(),Ke=u("^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",Je).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),I=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ve=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",I).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),be=u(/^!?\[(label)\]\[(ref)\]/).replace("label",I).replace("ref",F).getRegex(),me=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",F).getRegex(),Ye=u("reflink|nolink(?!\\()","g").replace("reflink",be).replace("nolink",me).getRegex(),J={_backpedal:A,anyPunctuation:Xe,autolink:Ue,blockSkip:Qe,br:ge,code:Ze,del:A,emStrongLDelim:je,emStrongRDelimAst:Ge,emStrongRDelimUnd:We,escape:ve,link:Ve,nolink:me,punctuation:Me,reflink:be,reflinkSearch:Ye,tag:Ke,text:De,url:A},et={...J,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",I).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I).getRegex()},N={...J,emStrongRDelimAst:Fe,emStrongLDelim:He,url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tt={...N,br:u(ge).replace("{2,}","*").getRegex(),text:u(N.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},P={normal:X,gfm:Be,pedantic:Ee},T={normal:J,gfm:N,breaks:tt,pedantic:et},nt={"&":"&","<":"<",">":">",'"':""","'":"'"},ie=n=>nt[n];function m(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ie)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ie);return n}function le(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function ae(n,e){let r=n.replace(x.findPipe,(l,i,a)=>{let o=!1,c=i;for(;--c>=0&&a[c]==="\\";)o=!o;return o?"|":" |"}),s=r.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function z(n,e,r){let s=n.length;if(s===0)return"";let t=0;for(;t<s&&n.charAt(s-t-1)===e;)t++;return n.slice(0,s-t)}function rt(n,e){if(n.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function oe(n,e,r,s,t){let l=e.href,i=e.title||null,a=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,o}function st(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
6
|
+
`).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[a]=i;return a.length>=t.length?l.slice(t.length):l}).join(`
|
|
7
7
|
`)}var L=class{options;rules;lexer;constructor(n){this.options=n||S}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:z(r,`
|
|
8
8
|
`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let r=e[0],s=st(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let s=z(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:z(e[0],`
|
|
9
9
|
`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let r=z(e[0],`
|
|
10
10
|
`).split(`
|
|
11
|
-
`),s="",t="",
|
|
11
|
+
`),s="",t="",l=[];for(;r.length>0;){let i=!1,a=[],o;for(o=0;o<r.length;o++)if(this.rules.other.blockquoteStart.test(r[o]))a.push(r[o]),i=!0;else if(!i)a.push(r[o]);else break;r=r.slice(o);let c=a.join(`
|
|
12
12
|
`),h=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
13
13
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
14
14
|
${c}`:c,t=t?`${t}
|
|
15
|
-
${h}`:h;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,
|
|
15
|
+
${h}`:h;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=k,r.length===0)break;let g=l.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let f=g,d=f.raw+`
|
|
16
16
|
`+r.join(`
|
|
17
|
-
`),b=this.blockquote(d);
|
|
17
|
+
`),b=this.blockquote(d);l[l.length-1]=b,s=s.substring(0,s.length-f.raw.length)+b.raw,t=t.substring(0,t.length-f.text.length)+b.text;break}else if(g?.type==="list"){let f=g,d=f.raw+`
|
|
18
18
|
`+r.join(`
|
|
19
|
-
`),b=this.list(d);
|
|
20
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:
|
|
19
|
+
`),b=this.list(d);l[l.length-1]=b,s=s.substring(0,s.length-g.raw.length)+b.raw,t=t.substring(0,t.length-f.raw.length)+b.raw,r=d.substring(l.at(-1).raw.length).split(`
|
|
20
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:t}}}list(n){let e=this.rules.block.list.exec(n);if(e){let r=e[1].trim(),s=r.length>1,t={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),i=!1;for(;n;){let o=!1,c="",h="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;c=e[0],n=n.substring(c.length);let k=e[2].split(`
|
|
21
21
|
`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),g=n.split(`
|
|
22
22
|
`,1)[0],f=!k.trim(),d=0;if(this.options.pedantic?(d=2,h=k.trimStart()):f?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=k.slice(d),d+=e[1].length),f&&this.rules.other.blankLine.test(g)&&(c+=g+`
|
|
23
23
|
`,n=n.substring(g.length+1),o=!0),!o){let v=this.rules.other.nextBulletRegex(d),Y=this.rules.other.hrRegex(d),ee=this.rules.other.fencesBeginRegex(d),te=this.rules.other.headingBeginRegex(d),we=this.rules.other.htmlBeginRegex(d);for(;n;){let Z=n.split(`
|
|
24
24
|
`,1)[0],R;if(g=Z,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),R=g):R=g.replace(this.rules.other.tabCharGlobal," "),ee.test(g)||te.test(g)||we.test(g)||v.test(g)||Y.test(g))break;if(R.search(this.rules.other.nonSpaceChar)>=d||!g.trim())h+=`
|
|
25
25
|
`+R.slice(d);else{if(f||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(k)||te.test(k)||Y.test(k))break;h+=`
|
|
26
26
|
`+g}!f&&!g.trim()&&(f=!0),c+=Z+`
|
|
27
|
-
`,n=n.substring(Z.length+1),k=R.slice(d)}}t.loose||(
|
|
28
|
-
`):[],
|
|
29
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let
|
|
30
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],s=!1){for(this.options.pedantic&&(e=e.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(
|
|
31
|
-
`:r.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`+t.raw,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`+t.
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
`,n=n.substring(Z.length+1),k=R.slice(d)}}t.loose||(i?t.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let b=null,V;this.options.gfm&&(b=this.rules.other.listIsTask.exec(h),b&&(V=b[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:c,task:!!b,checked:V,loose:!1,text:h,tokens:[]}),t.raw+=c}let a=t.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let o=0;o<t.items.length;o++)if(this.lexer.state.top=!1,t.items[o].tokens=this.lexer.blockTokens(t.items[o].text,[]),!t.loose){let c=t.items[o].tokens.filter(k=>k.type==="space"),h=c.length>0&&c.some(k=>this.rules.other.anyLine.test(k.raw));t.loose=h}if(t.loose)for(let o=0;o<t.items.length;o++)t.items[o].loose=!0;return t}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:s,title:t}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=ae(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
28
|
+
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<r.length;i++)l.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:l.align[i]});for(let i of t)l.rows.push(ae(i,l.header.length).map((a,o)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:l.align[o]})));return l}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
29
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=z(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=rt(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],t="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],t=l[3])}else t=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),oe(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let r;if((r=this.rules.inline.reflink.exec(n))||(r=this.rules.inline.nolink.exec(n))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[s.toLowerCase()];if(!t){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return oe(r,t,r[0],this.lexer,this.rules)}}emStrong(n,e,r=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let t=[...s[0]].length-1,l,i,a=t,o=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*n.length+t);(s=c.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(i=[...l].length,s[3]||s[4]){a+=i;continue}else if((s[5]||s[6])&&t%3&&!((t+i)%3)){o+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+o);let h=[...s[0]][0].length,k=n.slice(0,t+s.index+h+i);if(Math.min(t,i)%2){let f=k.slice(1,-1);return{type:"em",raw:k,text:f,tokens:this.lexer.inlineTokens(f)}}let g=k.slice(2,-2);return{type:"strong",raw:k,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),t=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&t&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let r,s;return e[2]==="@"?(r=e[1],s="mailto:"+r):(r=e[1],s=r),{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let r,s;if(e[2]==="@")r=e[0],s="mailto:"+r;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);r=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},w=class O{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||S,this.options.tokenizer=this.options.tokenizer||new L,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:x,block:P.normal,inline:T.normal};this.options.pedantic?(r.block=P.pedantic,r.inline=T.pedantic):this.options.gfm&&(r.block=P.gfm,this.options.breaks?r.inline=T.breaks:r.inline=T.gfm),this.tokenizer.rules=r}static get rules(){return{block:P,inline:T}}static lex(e,r){return new O(r).lex(e)}static lexInline(e,r){return new O(r).inlineTokens(e)}lex(e){e=e.replace(x.carriageReturn,`
|
|
30
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],s=!1){for(this.options.pedantic&&(e=e.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(i=>(t=i.call({lexer:this},e,r))?(e=e.substring(t.raw.length),r.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let i=r.at(-1);t.raw.length===1&&i!==void 0?i.raw+=`
|
|
31
|
+
`:r.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
32
|
+
`)?"":`
|
|
33
|
+
`)+t.raw,i.text+=`
|
|
34
|
+
`+t.text,this.inlineQueue.at(-1).src=i.text):r.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+t.raw,i.text+=`
|
|
37
|
+
`+t.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),r.push(t);continue}let l=e;if(this.options.extensions?.startBlock){let i=1/0,a=e.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},a),typeof o=="number"&&o>=0&&(i=Math.min(i,o))}),i<1/0&&i>=0&&(l=e.substring(0,i+1))}if(this.state.top&&(t=this.tokenizer.paragraph(l))){let i=r.at(-1);s&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+t.raw,i.text+=`
|
|
40
|
+
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(t),s=l.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
41
|
+
`)?"":`
|
|
42
|
+
`)+t.raw,i.text+=`
|
|
43
|
+
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(t);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let s=e,t=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)a.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,t.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,i="";for(;e;){l||(i=""),l=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(e,s,i)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),r.push(a);continue}let o=e;if(this.options.extensions?.startInline){let c=1/0,h=e.slice(1),k;this.options.extensions.startInline.forEach(g=>{k=g.call({lexer:this},h),typeof k=="number"&&k>=0&&(c=Math.min(c,k))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),l=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},q=class{options;parser;constructor(n){this.options=n||S}space(n){return""}code({text:n,lang:e,escaped:r}){let s=(e||"").match(x.notSpaceStart)?.[0],t=n.replace(x.endingNewline,"")+`
|
|
40
44
|
`;return s?'<pre><code class="language-'+m(s)+'">'+(r?t:m(t,!0))+`</code></pre>
|
|
41
45
|
`:"<pre><code>"+(r?t:m(t,!0))+`</code></pre>
|
|
42
46
|
`}blockquote({tokens:n}){return`<blockquote>
|
|
43
47
|
${this.parser.parse(n)}</blockquote>
|
|
44
48
|
`}html({text:n}){return n}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
|
|
45
49
|
`}hr(n){return`<hr>
|
|
46
|
-
`}list(n){let e=n.ordered,r=n.start,s="";for(let
|
|
50
|
+
`}list(n){let e=n.ordered,r=n.start,s="";for(let i=0;i<n.items.length;i++){let a=n.items[i];s+=this.listitem(a)}let t=e?"ol":"ul",l=e&&r!==1?' start="'+r+'"':"";return"<"+t+l+`>
|
|
47
51
|
`+s+"</"+t+`>
|
|
48
52
|
`}listitem(n){let e="";if(n.task){let r=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=r+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=r+" "+m(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`<li>${e}</li>
|
|
49
53
|
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
|
50
|
-
`}table(n){let e="",r="";for(let t=0;t<n.header.length;t++)r+=this.tablecell(n.header[t]);e+=this.tablerow({text:r});let s="";for(let t=0;t<n.rows.length;t++){let
|
|
54
|
+
`}table(n){let e="",r="";for(let t=0;t<n.header.length;t++)r+=this.tablecell(n.header[t]);e+=this.tablerow({text:r});let s="";for(let t=0;t<n.rows.length;t++){let l=n.rows[t];r="";for(let i=0;i<l.length;i++)r+=this.tablecell(l[i]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
51
55
|
<thead>
|
|
52
56
|
`+e+`</thead>
|
|
53
57
|
`+s+`</table>
|
|
54
58
|
`}tablerow({text:n}){return`<tr>
|
|
55
59
|
${n}</tr>
|
|
56
60
|
`}tablecell(n){let e=this.parser.parseInline(n.tokens),r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+`</${r}>
|
|
57
|
-
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${m(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:r}){let s=this.parser.parseInline(r),t=
|
|
58
|
-
`+this.renderer.text(a);r?s+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):s+=o;continue}default:{let a='Token with "'+
|
|
59
|
-
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+m(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},$=new
|
|
61
|
+
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${m(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:r}){let s=this.parser.parseInline(r),t=le(n);if(t===null)return s;n=t;let l='<a href="'+n+'"';return e&&(l+=' title="'+m(e)+'"'),l+=">"+s+"</a>",l}image({href:n,title:e,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let t=le(n);if(t===null)return m(r);n=t;let l=`<img src="${n}" alt="${r}"`;return e&&(l+=` title="${m(e)}"`),l+=">",l}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:m(n.text)}},K=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},y=class Q{options;renderer;textRenderer;constructor(e){this.options=e||S,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new K}static parse(e,r){return new Q(r).parse(e)}static parseInline(e,r){return new Q(r).parseInline(e)}parse(e,r=!0){let s="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let a=l,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){s+=o||"";continue}}let i=l;switch(i.type){case"space":{s+=this.renderer.space(i);continue}case"hr":{s+=this.renderer.hr(i);continue}case"heading":{s+=this.renderer.heading(i);continue}case"code":{s+=this.renderer.code(i);continue}case"table":{s+=this.renderer.table(i);continue}case"blockquote":{s+=this.renderer.blockquote(i);continue}case"list":{s+=this.renderer.list(i);continue}case"html":{s+=this.renderer.html(i);continue}case"paragraph":{s+=this.renderer.paragraph(i);continue}case"text":{let a=i,o=this.renderer.text(a);for(;t+1<e.length&&e[t+1].type==="text";)a=e[++t],o+=`
|
|
62
|
+
`+this.renderer.text(a);r?s+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):s+=o;continue}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}parseInline(e,r=this.renderer){let s="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=a||"";continue}}let i=l;switch(i.type){case"escape":{s+=r.text(i);break}case"html":{s+=r.html(i);break}case"link":{s+=r.link(i);break}case"image":{s+=r.image(i);break}case"strong":{s+=r.strong(i);break}case"em":{s+=r.em(i);break}case"codespan":{s+=r.codespan(i);break}case"br":{s+=r.br(i);break}case"del":{s+=r.del(i);break}case"text":{s+=r.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},C=class{options;block;constructor(n){this.options=n||S}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?w.lex:w.lexInline}provideParser(){return this.block?y.parse:y.parseInline}},it=class{defaults=j();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=q;TextRenderer=K;Lexer=w;Tokenizer=L;Hooks=C;constructor(...n){this.use(...n)}walkTokens(n,e){let r=[];for(let s of n)switch(r=r.concat(e.call(this,s)),s.type){case"table":{let t=s;for(let l of t.header)r=r.concat(this.walkTokens(l.tokens,e));for(let l of t.rows)for(let i of l)r=r.concat(this.walkTokens(i.tokens,e));break}case"list":{let t=s;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=s;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(l=>{let i=t[l].flat(1/0);r=r.concat(this.walkTokens(i,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let l=e.renderers[t.name];l?e.renderers[t.name]=function(...i){let a=t.renderer.apply(this,i);return a===!1&&(a=l.apply(this,i)),a}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[t.level];l?l.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&(t.level==="block"?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:t.level==="inline"&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),s.extensions=e),r.renderer){let t=this.defaults.renderer||new q(this.defaults);for(let l in r.renderer){if(!(l in t))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,a=r.renderer[i],o=t[i];t[i]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=o.apply(t,c)),h||""}}s.renderer=t}if(r.tokenizer){let t=this.defaults.tokenizer||new L(this.defaults);for(let l in r.tokenizer){if(!(l in t))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,a=r.tokenizer[i],o=t[i];t[i]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=o.apply(t,c)),h}}s.tokenizer=t}if(r.hooks){let t=this.defaults.hooks||new C;for(let l in r.hooks){if(!(l in t))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,a=r.hooks[i],o=t[i];C.passThroughHooks.has(l)?t[i]=c=>{if(this.defaults.async)return Promise.resolve(a.call(t,c)).then(k=>o.call(t,k));let h=a.call(t,c);return o.call(t,h)}:t[i]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=o.apply(t,c)),h}}s.hooks=t}if(r.walkTokens){let t=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(i){let a=[];return a.push(l.call(this,i)),t&&(a=a.concat(t.call(this,i))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return w.lex(n,e??this.defaults)}parser(n,e){return y.parse(n,e??this.defaults)}parseMarkdown(n){return(e,r)=>{let s={...r},t={...this.defaults,...s},l=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&s.async===!1)return l(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."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));t.hooks&&(t.hooks.options=t,t.hooks.block=n);let i=t.hooks?t.hooks.provideLexer():n?w.lex:w.lexInline,a=t.hooks?t.hooks.provideParser():n?y.parse:y.parseInline;if(t.async)return Promise.resolve(t.hooks?t.hooks.preprocess(e):e).then(o=>i(o,t)).then(o=>t.hooks?t.hooks.processAllTokens(o):o).then(o=>t.walkTokens?Promise.all(this.walkTokens(o,t.walkTokens)).then(()=>o):o).then(o=>a(o,t)).then(o=>t.hooks?t.hooks.postprocess(o):o).catch(l);try{t.hooks&&(e=t.hooks.preprocess(e));let o=i(e,t);t.hooks&&(o=t.hooks.processAllTokens(o)),t.walkTokens&&this.walkTokens(o,t.walkTokens);let c=a(o,t);return t.hooks&&(c=t.hooks.postprocess(c)),c}catch(o){return l(o)}}}onError(n,e){return r=>{if(r.message+=`
|
|
63
|
+
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+m(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},$=new it;function p(n,e){return $.parse(n,e)}p.options=p.setOptions=function(n){return $.setOptions(n),p.defaults=$.defaults,ce(p.defaults),p};p.getDefaults=j;p.defaults=S;p.use=function(...n){return $.use(...n),p.defaults=$.defaults,ce(p.defaults),p};p.walkTokens=function(n,e){return $.walkTokens(n,e)};p.parseInline=$.parseInline;p.Parser=y;p.parser=y.parse;p.Renderer=q;p.TextRenderer=K;p.Lexer=w;p.lexer=w.lex;p.Tokenizer=L;p.Hooks=C;p.parse=p;p.options;p.setOptions;p.use;p.walkTokens;p.parseInline;y.parse;w.lex;p.use({gfm:!0,breaks:!0,async:!1,renderer:{link({href:n,title:e,tokens:r}){let s=this.parser.parseInline(r);return`<calcite-link href="${n}" title="${e??s}" target="Arcade Help">${s}</calcite-link>`}}});function gt(n){return n==null?"":p.parse(typeof n=="string"?n:n.value,{async:!1})}export{ht as a,Se as b,pt as c,ut as d,gt as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
3
|
+
v4.34.0-next.82 */
|
|
4
4
|
var E=(t,e)=>{let n=t;for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode}return!1},f=(t,e,n)=>{let o=v(e).subscribe;return o(s=>{s.some(r=>E(t,r.target))&&n()})},u={},v=t=>{let e=t.join(","),n=u[e];if(n!==void 0)return n;let o=new Set,s=new MutationObserver(r=>o.forEach(l=>l(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});let c={subscribe:r=>(o.add(r),()=>{o.delete(r),o.size===0&&(s.disconnect(),u[e]=void 0)})};return u[e]=c,c},h=(t,e)=>{let n=t;for(;n;){let o=n.closest?.(e);if(o)return o;let s=n.getRootNode?.();if(s===globalThis.document)return;n=s.host}};function S(t){let e=h(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var g=(t,e,n)=>h(t,`[${e}]`)?.getAttribute(e)??n,$=async t=>{t!=null&&(m(t)?await t.setFocus():t.focus())},m=t=>typeof t.setFocus=="function",k=(t,e)=>{if(t?.shadowRoot){if(t.hasAttribute("hydrated")||t.hasAttribute("calcite-hydrated")){i(t,e);return}Promise.resolve(t.componentOnReady?.()).then(()=>i(t,e))}},C=t=>t.nodeType===Node.ELEMENT_NODE,i=(t,e="")=>{if(!C(t))return!1;if(t.matches(e))return m(t)&&setTimeout(()=>void t.setFocus(),0),!0;for(let o of t.children)if(i(o,e))return!0;let n=t.shadowRoot;if(n){for(let o of n.children)if(i(o,e))return!0}return!1};var N="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),y=new Set(N),a="en",L={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},T=async(t,e,n="")=>{let o=`${e}/${n}`,s=`${o}${t}.json`;return d[s]??(d[s]=p(t,o)),await d[s]},d={},p=async(t,e)=>{let n=`${e}${t}.json`;try{let o=await fetch(n);if(o.ok)return await o.json()}catch(o){return console.error(o),{}}return t===a?{}:await p(a,e)},A=t=>{let e=g(t,"lang",globalThis.navigator?.language||a);return{lang:e,t9nLocale:b(e)}},b=t=>{let[e,n]=t.split("-"),o=e.toLowerCase(),s=o;return n&&(s=`${o}-${n.toUpperCase()}`),s=L[s]??s,y.has(s)?s:n?b(o):a},j=(t,e,n,o)=>{let s,c=()=>w(t,e(),o).then(r=>{(s?.lang!==r.lang||s.t9nLocale!==r.t9nLocale||s.t9nStrings!==r.t9nStrings)&&n(r),s=r}).catch(console.error);return queueMicrotask(c),f(t,["lang"],c)},w=async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:s}=A(t),c=`${e}/${n}/t9n`,l=n===null?{}:await T(s,c,"messages.");return{lang:o,t9nLocale:s,t9nStrings:l}};export{f as a,S as b,$ as c,k as d,y as e,T as f,A as g,b as h,j as i};
|