UPLOAD
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- assets/CodeHighlight-4c4CQtL4.js +0 -0
- assets/CodeHighlight-BUcyVq1B.css +1 -0
- assets/Input-3pgIU4b0.js +62 -0
- assets/Input-Dx33p2my.css +1 -0
- assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
assets/CodeHighlight-4c4CQtL4.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
assets/CodeHighlight-BUcyVq1B.css
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
html:not(.dark) pre code.hljs{display:block;overflow-x:auto;padding:1em}html:not(.dark) code.hljs{padding:3px 5px}html:not(.dark) .hljs{color:#545454}html:not(.dark) .hljs-comment,html:not(.dark) .hljs-quote{color:#696969}html:not(.dark) .hljs-deletion,html:not(.dark) .hljs-name,html:not(.dark) .hljs-regexp,html:not(.dark) .hljs-selector-class,html:not(.dark) .hljs-selector-id,html:not(.dark) .hljs-tag,html:not(.dark) .hljs-template-variable,html:not(.dark) .hljs-variable{color:#d91e18}html:not(.dark) .hljs-attribute,html:not(.dark) .hljs-built_in,html:not(.dark) .hljs-link,html:not(.dark) .hljs-literal,html:not(.dark) .hljs-meta,html:not(.dark) .hljs-number,html:not(.dark) .hljs-params,html:not(.dark) .hljs-type{color:#aa5d00}html:not(.dark) .hljs-addition,html:not(.dark) .hljs-bullet,html:not(.dark) .hljs-string,html:not(.dark) .hljs-symbol{color:green}html:not(.dark) .hljs-section,html:not(.dark) .hljs-title{color:#007faa}html:not(.dark) .hljs-keyword,html:not(.dark) .hljs-selector-tag{color:#7928a1}html:not(.dark) .hljs-emphasis{font-style:italic}html:not(.dark) .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){html:not(.dark) .hljs-addition,html:not(.dark) .hljs-attribute,html:not(.dark) .hljs-built_in,html:not(.dark) .hljs-bullet,html:not(.dark) .hljs-comment,html:not(.dark) .hljs-link,html:not(.dark) .hljs-literal,html:not(.dark) .hljs-meta,html:not(.dark) .hljs-number,html:not(.dark) .hljs-params,html:not(.dark) .hljs-quote,html:not(.dark) .hljs-string,html:not(.dark) .hljs-symbol,html:not(.dark) .hljs-type{color:highlight}html:not(.dark) .hljs-keyword,html:not(.dark) .hljs-selector-tag{font-weight:700}}html.dark pre code.hljs{display:block;overflow-x:auto;padding:1em}html.dark code.hljs{padding:3px 5px}html.dark .hljs{color:#f8f8f2}html.dark .hljs-comment,html.dark .hljs-quote{color:#d4d0ab}html.dark .hljs-deletion,html.dark .hljs-name,html.dark .hljs-regexp,html.dark .hljs-selector-class,html.dark .hljs-selector-id,html.dark .hljs-tag,html.dark .hljs-template-variable,html.dark .hljs-variable{color:#ffa07a}html.dark .hljs-built_in,html.dark .hljs-link,html.dark .hljs-literal,html.dark .hljs-meta,html.dark .hljs-number,html.dark .hljs-params,html.dark .hljs-type{color:#f5ab35}html.dark .hljs-attribute{color:gold}html.dark .hljs-addition,html.dark .hljs-bullet,html.dark .hljs-string,html.dark .hljs-symbol{color:#abe338}html.dark .hljs-section,html.dark .hljs-title{color:#00e0e0}html.dark .hljs-keyword,html.dark .hljs-selector-tag{color:#dcc6e0}html.dark .hljs-emphasis{font-style:italic}html.dark .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){html.dark .hljs-addition,html.dark .hljs-attribute,html.dark .hljs-built_in,html.dark .hljs-bullet,html.dark .hljs-comment,html.dark .hljs-link,html.dark .hljs-literal,html.dark .hljs-meta,html.dark .hljs-number,html.dark .hljs-params,html.dark .hljs-quote,html.dark .hljs-string,html.dark .hljs-symbol,html.dark .hljs-type{color:highlight}html.dark .hljs-keyword,html.dark .hljs-selector-tag{font-weight:700}}
|
assets/Input-3pgIU4b0.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CodeHighlight-4c4CQtL4.js","./index-CJX4CBLi.js","./index-DpIqjKa_.css","./CodeHighlight-BUcyVq1B.css","./KatexRender-Bqan3cGk.js","./KatexRender-CiSVvk-1.css"])))=>i.map(i=>d[i]);
|
2 |
+
var vt=Object.defineProperty;var Oe=s=>{throw TypeError(s)};var Et=(s,e,n)=>e in s?vt(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n;var E=(s,e,n)=>Et(s,typeof e!="symbol"?e+"":e,n),St=(s,e,n)=>e.has(s)||Oe("Cannot "+n);var qe=(s,e,n)=>e.has(s)?Oe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,n);var I=(s,e,n)=>(St(s,e,"access private method"),n);import{r as g,j as p,K as $t,L as Rt,N as L,O as pe,u as _t,b as Tt,i as It,v as T,M as jt,h as Nt,T as K,P as Ct,Q as Lt,S as Ze,U as At,_ as et,g as Pt}from"./index-CJX4CBLi.js";function _e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let F=_e();function tt(s){F=s}const le={exec:()=>null};function $(s,e=""){let n=typeof s=="string"?s:s.source;const t={replace:(r,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(z.caret,"$1"),n=n.replace(r,l),t},getRegex:()=>new RegExp(n,e)};return t}const z={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:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},zt=/^(?:[ \t]*(?:\n|$))+/,Bt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ce=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nt=/(?:[*+-]|\d{1,9}[.)])/,st=$(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,nt).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/).getRegex(),Te=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ot=/^[^\n]+/,Ie=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qt=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ie).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zt=$(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nt).getRegex(),be="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",je=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ht=$("^ {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",je).replace("tag",be).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rt=$(Te).replace("hr",ce).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",be).getRegex(),Ut=$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rt).getRegex(),Ne={blockquote:Ut,code:Bt,def:qt,fences:Mt,heading:Dt,hr:ce,html:Ht,lheading:st,list:Zt,newline:zt,paragraph:rt,table:le,text:Ot},He=$("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ce).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",be).getRegex(),Gt={...Ne,table:He,paragraph:$(Te).replace("hr",ce).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",He).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",be).getRegex()},Kt={...Ne,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je).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:le,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(Te).replace("hr",ce).replace("heading",` *#{1,6} *[^
|
3 |
+
]`).replace("lheading",st).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Wt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,it=/^( {2,}|\\)\n(?!\s*$)/,Ft=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,we=/[\p{P}\p{S}]/u,Ce=/[\s\p{P}\p{S}]/u,lt=/[^\s\p{P}\p{S}]/u,Qt=$(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ce).getRegex(),ot=/(?!~)[\p{P}\p{S}]/u,Xt=/(?!~)[\s\p{P}\p{S}]/u,Jt=/(?:[^\s\p{P}\p{S}]|~)/u,Yt=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,at=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,en=$(at,"u").replace(/punct/g,we).getRegex(),tn=$(at,"u").replace(/punct/g,ot).getRegex(),ct="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nn=$(ct,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Ce).replace(/punct/g,we).getRegex(),sn=$(ct,"gu").replace(/notPunctSpace/g,Jt).replace(/punctSpace/g,Xt).replace(/punct/g,ot).getRegex(),rn=$("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Ce).replace(/punct/g,we).getRegex(),ln=$(/\\(punct)/,"gu").replace(/punct/g,we).getRegex(),on=$(/^<(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(),an=$(je).replace("(?:-->|$)","-->").getRegex(),cn=$("^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",an).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ge=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,un=$(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ge).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ut=$(/^!?\[(label)\]\[(ref)\]/).replace("label",ge).replace("ref",Ie).getRegex(),pt=$(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ie).getRegex(),pn=$("reflink|nolink(?!\\()","g").replace("reflink",ut).replace("nolink",pt).getRegex(),Le={_backpedal:le,anyPunctuation:ln,autolink:on,blockSkip:Yt,br:it,code:Wt,del:le,emStrongLDelim:en,emStrongRDelimAst:nn,emStrongRDelimUnd:rn,escape:Vt,link:un,nolink:pt,punctuation:Qt,reflink:ut,reflinkSearch:pn,tag:cn,text:Ft,url:le},hn={...Le,link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",ge).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge).getRegex()},ve={...Le,emStrongRDelimAst:sn,emStrongLDelim:tn,url:$(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},dn={...ve,br:$(it).replace("{2,}","*").getRegex(),text:$(ve.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},he={normal:Ne,gfm:Gt,pedantic:Kt},se={normal:Le,gfm:ve,breaks:dn,pedantic:hn},fn={"&":"&","<":"<",">":">",'"':""","'":"'"},Ue=s=>fn[s];function q(s,e){if(e){if(z.escapeTest.test(s))return s.replace(z.escapeReplace,Ue)}else if(z.escapeTestNoEncode.test(s))return s.replace(z.escapeReplaceNoEncode,Ue);return s}function Ge(s){try{s=encodeURI(s).replace(z.percentDecode,"%")}catch{return null}return s}function Ke(s,e){var i;const n=s.replace(z.findPipe,(l,o,a)=>{let c=!1,u=o;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),t=n.split(z.splitPipe);let r=0;if(t[0].trim()||t.shift(),t.length>0&&!((i=t.at(-1))!=null&&i.trim())&&t.pop(),e)if(t.length>e)t.splice(e);else for(;t.length<e;)t.push("");for(;r<t.length;r++)t[r]=t[r].trim().replace(z.slashPipe,"|");return t}function re(s,e,n){const t=s.length;if(t===0)return"";let r=0;for(;r<t&&s.charAt(t-r-1)===e;)r++;return s.slice(0,t-r)}function gn(s,e){if(s.indexOf(e[1])===-1)return-1;let n=0;for(let t=0;t<s.length;t++)if(s[t]==="\\")t++;else if(s[t]===e[0])n++;else if(s[t]===e[1]&&(n--,n<0))return t;return-1}function Ve(s,e,n,t,r){const i=e.href,l=e.title||null,o=s[1].replace(r.other.outputLinkReplace,"$1");if(s[0].charAt(0)!=="!"){t.state.inLink=!0;const a={type:"link",raw:n,href:i,title:l,text:o,tokens:t.inlineTokens(o)};return t.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:l,text:o}}function mn(s,e,n){const t=s.match(n.other.indentCodeCompensation);if(t===null)return e;const r=t[1];return e.split(`
|
4 |
+
`).map(i=>{const l=i.match(n.other.beginningSpace);if(l===null)return i;const[o]=l;return o.length>=r.length?i.slice(r.length):i}).join(`
|
5 |
+
`)}class me{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||F}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const t=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:re(t,`
|
6 |
+
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const t=n[0],r=mn(t,n[3]||"",this.rules);return{type:"code",raw:t,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let t=n[2].trim();if(this.rules.other.endingHash.test(t)){const r=re(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:re(n[0],`
|
7 |
+
`)}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let t=re(n[0],`
|
8 |
+
`).split(`
|
9 |
+
`),r="",i="";const l=[];for(;t.length>0;){let o=!1;const a=[];let c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))a.push(t[c]),o=!0;else if(!o)a.push(t[c]);else break;t=t.slice(c);const u=a.join(`
|
10 |
+
`),h=u.replace(this.rules.other.blockquoteSetextReplace,`
|
11 |
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
12 |
+
${u}`:u,i=i?`${i}
|
13 |
+
${h}`:h;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=d,t.length===0)break;const f=l.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const v=f,x=v.raw+`
|
14 |
+
`+t.join(`
|
15 |
+
`),w=this.blockquote(x);l[l.length-1]=w,r=r.substring(0,r.length-v.raw.length)+w.raw,i=i.substring(0,i.length-v.text.length)+w.text;break}else if((f==null?void 0:f.type)==="list"){const v=f,x=v.raw+`
|
16 |
+
`+t.join(`
|
17 |
+
`),w=this.list(x);l[l.length-1]=w,r=r.substring(0,r.length-f.raw.length)+w.raw,i=i.substring(0,i.length-v.raw.length)+w.raw,t=x.substring(l.at(-1).raw.length).split(`
|
18 |
+
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:i}}}list(e){let n=this.rules.block.list.exec(e);if(n){let t=n[1].trim();const r=t.length>1,i={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");const l=this.rules.other.listItemRegex(t);let o=!1;for(;e;){let c=!1,u="",h="";if(!(n=l.exec(e))||this.rules.block.hr.test(e))break;u=n[0],e=e.substring(u.length);let d=n[2].split(`
|
19 |
+
`,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),f=e.split(`
|
20 |
+
`,1)[0],v=!d.trim(),x=0;if(this.options.pedantic?(x=2,h=d.trimStart()):v?x=n[1].length+1:(x=n[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,h=d.slice(x),x+=n[1].length),v&&this.rules.other.blankLine.test(f)&&(u+=f+`
|
21 |
+
`,e=e.substring(f.length+1),c=!0),!c){const S=this.rules.other.nextBulletRegex(x),j=this.rules.other.hrRegex(x),y=this.rules.other.fencesBeginRegex(x),k=this.rules.other.headingBeginRegex(x),C=this.rules.other.htmlBeginRegex(x);for(;e;){const b=e.split(`
|
22 |
+
`,1)[0];let P;if(f=b,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),P=f):P=f.replace(this.rules.other.tabCharGlobal," "),y.test(f)||k.test(f)||C.test(f)||S.test(f)||j.test(f))break;if(P.search(this.rules.other.nonSpaceChar)>=x||!f.trim())h+=`
|
23 |
+
`+P.slice(x);else{if(v||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(d)||k.test(d)||j.test(d))break;h+=`
|
24 |
+
`+f}!v&&!f.trim()&&(v=!0),u+=b+`
|
25 |
+
`,e=e.substring(b.length+1),d=P.slice(x)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let w=null,m;this.options.gfm&&(w=this.rules.other.listIsTask.exec(h),w&&(m=w[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!w,checked:m,loose:!1,text:h,tokens:[]}),i.raw+=u}const a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const u=i.items[c].tokens.filter(d=>d.type==="space"),h=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(e){const n=this.rules.block.def.exec(e);if(n){const t=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:t,raw:n[0],href:r,title:i}}}table(e){var o;const n=this.rules.block.table.exec(e);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const t=Ke(n[1]),r=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(o=n[3])!=null&&o.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
26 |
+
`):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(t.length===r.length){for(const a of r)this.rules.other.tableAlignRight.test(a)?l.align.push("right"):this.rules.other.tableAlignCenter.test(a)?l.align.push("center"):this.rules.other.tableAlignLeft.test(a)?l.align.push("left"):l.align.push(null);for(let a=0;a<t.length;a++)l.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:l.align[a]});for(const a of i)l.rows.push(Ke(a,l.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[u]})));return l}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const t=n[1].charAt(n[1].length-1)===`
|
27 |
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:t,tokens:this.lexer.inline(t)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const t=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const l=re(t.slice(0,-1),"\\");if((t.length-l.length)%2===0)return}else{const l=gn(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let r=n[2],i="";if(this.options.pedantic){const l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),Ve(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(e,n){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){const r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=n[r.toLowerCase()];if(!i){const l=t[0].charAt(0);return{type:"text",raw:l,text:l}}return Ve(t,i,t[0],this.lexer,this.rules)}}emStrong(e,n,t=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const l=[...r[0]].length-1;let o,a,c=l,u=0;const h=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,n=n.slice(-1*e.length+l);(r=h.exec(n))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){c+=a;continue}else if((r[5]||r[6])&&l%3&&!((l+a)%3)){u+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+u);const d=[...r[0]][0].length,f=e.slice(0,l+r.index+d+a);if(Math.min(l,a)%2){const x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}const v=f.slice(2,-2);return{type:"strong",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let t=n[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:n[0],text:t}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let t,r;return n[2]==="@"?(t=n[1],r="mailto:"+t):(t=n[1],r=t),{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(e){var t;let n;if(n=this.rules.inline.url.exec(e)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let l;do l=n[0],n[0]=((t=this.rules.inline._backpedal.exec(n[0]))==null?void 0:t[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){const t=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:t}}}}class D{constructor(e){E(this,"tokens");E(this,"options");E(this,"state");E(this,"tokenizer");E(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||F,this.options.tokenizer=this.options.tokenizer||new me,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:z,block:he.normal,inline:se.normal};this.options.pedantic?(n.block=he.pedantic,n.inline=se.pedantic):this.options.gfm&&(n.block=he.gfm,this.options.breaks?n.inline=se.breaks:n.inline=se.gfm),this.tokenizer.rules=n}static get rules(){return{block:he,inline:se}}static lex(e,n){return new D(n).lex(e)}static lexInline(e,n){return new D(n).inlineTokens(e)}lex(e){e=e.replace(z.carriageReturn,`
|
28 |
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const t=this.inlineQueue[n];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],t=!1){var r,i,l;for(this.options.pedantic&&(e=e.replace(z.tabCharGlobal," ").replace(z.spaceLine,""));e;){let o;if((i=(r=this.options.extensions)==null?void 0:r.block)!=null&&i.some(c=>(o=c.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);const c=n.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
|
29 |
+
`:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
30 |
+
`+o.raw,c.text+=`
|
31 |
+
`+o.text,this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
32 |
+
`+o.raw,c.text+=`
|
33 |
+
`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let a=e;if((l=this.options.extensions)!=null&&l.startBlock){let c=1/0;const u=e.slice(1);let h;this.options.extensions.startBlock.forEach(d=>{h=d.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(a=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){const c=n.at(-1);t&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
34 |
+
`+o.raw,c.text+=`
|
35 |
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o),t=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
|
36 |
+
`+o.raw,c.text+=`
|
37 |
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var o,a,c;let t=e,r=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(t))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(t=t.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(t))!=null;)t=t.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(t))!=null;)t=t.slice(0,r.index)+"++"+t.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,l="";for(;e;){i||(l=""),i=!1;let u;if((a=(o=this.options.extensions)==null?void 0:o.inline)!=null&&a.some(d=>(u=d.call({lexer:this},e,n))?(e=e.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const d=n.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(e,t,l)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),n.push(u);continue}let h=e;if((c=this.options.extensions)!=null&&c.startInline){let d=1/0;const f=e.slice(1);let v;this.options.extensions.startInline.forEach(x=>{v=x.call({lexer:this},f),typeof v=="number"&&v>=0&&(d=Math.min(d,v))}),d<1/0&&d>=0&&(h=e.substring(0,d+1))}if(u=this.tokenizer.inlineText(h)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(l=u.raw.slice(-1)),i=!0;const d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}}class xe{constructor(e){E(this,"options");E(this,"parser");this.options=e||F}space(e){return""}code({text:e,lang:n,escaped:t}){var l;const r=(l=(n||"").match(z.notSpaceStart))==null?void 0:l[0],i=e.replace(z.endingNewline,"")+`
|
38 |
+
`;return r?'<pre><code class="language-'+q(r)+'">'+(t?i:q(i,!0))+`</code></pre>
|
39 |
+
`:"<pre><code>"+(t?i:q(i,!0))+`</code></pre>
|
40 |
+
`}blockquote({tokens:e}){return`<blockquote>
|
41 |
+
${this.parser.parse(e)}</blockquote>
|
42 |
+
`}html({text:e}){return e}heading({tokens:e,depth:n}){return`<h${n}>${this.parser.parseInline(e)}</h${n}>
|
43 |
+
`}hr(e){return`<hr>
|
44 |
+
`}list(e){const n=e.ordered,t=e.start;let r="";for(let o=0;o<e.items.length;o++){const a=e.items[o];r+=this.listitem(a)}const i=n?"ol":"ul",l=n&&t!==1?' start="'+t+'"':"";return"<"+i+l+`>
|
45 |
+
`+r+"</"+i+`>
|
46 |
+
`}listitem(e){var t;let n="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?((t=e.tokens[0])==null?void 0:t.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+q(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`<li>${n}</li>
|
47 |
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
48 |
+
`}table(e){let n="",t="";for(let i=0;i<e.header.length;i++)t+=this.tablecell(e.header[i]);n+=this.tablerow({text:t});let r="";for(let i=0;i<e.rows.length;i++){const l=e.rows[i];t="";for(let o=0;o<l.length;o++)t+=this.tablecell(l[o]);r+=this.tablerow({text:t})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
49 |
+
<thead>
|
50 |
+
`+n+`</thead>
|
51 |
+
`+r+`</table>
|
52 |
+
`}tablerow({text:e}){return`<tr>
|
53 |
+
${e}</tr>
|
54 |
+
`}tablecell(e){const n=this.parser.parseInline(e.tokens),t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+n+`</${t}>
|
55 |
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${q(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:n,tokens:t}){const r=this.parser.parseInline(t),i=Ge(e);if(i===null)return r;e=i;let l='<a href="'+e+'"';return n&&(l+=' title="'+q(n)+'"'),l+=">"+r+"</a>",l}image({href:e,title:n,text:t}){const r=Ge(e);if(r===null)return q(t);e=r;let i=`<img src="${e}" alt="${t}"`;return n&&(i+=` title="${q(n)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:q(e.text)}}class Ae{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class O{constructor(e){E(this,"options");E(this,"renderer");E(this,"textRenderer");this.options=e||F,this.options.renderer=this.options.renderer||new xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ae}static parse(e,n){return new O(n).parse(e)}static parseInline(e,n){return new O(n).parseInline(e)}parse(e,n=!0){var r,i;let t="";for(let l=0;l<e.length;l++){const o=e[l];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[o.type]){const c=o,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){t+=u||"";continue}}const a=o;switch(a.type){case"space":{t+=this.renderer.space(a);continue}case"hr":{t+=this.renderer.hr(a);continue}case"heading":{t+=this.renderer.heading(a);continue}case"code":{t+=this.renderer.code(a);continue}case"table":{t+=this.renderer.table(a);continue}case"blockquote":{t+=this.renderer.blockquote(a);continue}case"list":{t+=this.renderer.list(a);continue}case"html":{t+=this.renderer.html(a);continue}case"paragraph":{t+=this.renderer.paragraph(a);continue}case"text":{let c=a,u=this.renderer.text(c);for(;l+1<e.length&&e[l+1].type==="text";)c=e[++l],u+=`
|
56 |
+
`+this.renderer.text(c);n?t+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):t+=u;continue}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return t}parseInline(e,n=this.renderer){var r,i;let t="";for(let l=0;l<e.length;l++){const o=e[l];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[o.type]){const c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){t+=c||"";continue}}const a=o;switch(a.type){case"escape":{t+=n.text(a);break}case"html":{t+=n.html(a);break}case"link":{t+=n.link(a);break}case"image":{t+=n.image(a);break}case"strong":{t+=n.strong(a);break}case"em":{t+=n.em(a);break}case"codespan":{t+=n.codespan(a);break}case"br":{t+=n.br(a);break}case"del":{t+=n.del(a);break}case"text":{t+=n.text(a);break}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return t}}class oe{constructor(e){E(this,"options");E(this,"block");this.options=e||F}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?D.lex:D.lexInline}provideParser(){return this.block?O.parse:O.parseInline}}E(oe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class ht{constructor(...e){E(this,"defaults",_e());E(this,"options",this.setOptions);E(this,"parse",this.parseMarkdown(!0));E(this,"parseInline",this.parseMarkdown(!1));E(this,"Parser",O);E(this,"Renderer",xe);E(this,"TextRenderer",Ae);E(this,"Lexer",D);E(this,"Tokenizer",me);E(this,"Hooks",oe);this.use(...e)}walkTokens(e,n){var r,i;let t=[];for(const l of e)switch(t=t.concat(n.call(this,l)),l.type){case"table":{const o=l;for(const a of o.header)t=t.concat(this.walkTokens(a.tokens,n));for(const a of o.rows)for(const c of a)t=t.concat(this.walkTokens(c.tokens,n));break}case"list":{const o=l;t=t.concat(this.walkTokens(o.items,n));break}default:{const o=l;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{const c=o[a].flat(1/0);t=t.concat(this.walkTokens(c,n))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,n)))}}return t}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=l.apply(this,o)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),r.extensions=n),t.renderer){const i=this.defaults.renderer||new xe(this.defaults);for(const l in t.renderer){if(!(l in i))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;const o=l,a=t.renderer[o],c=i[o];i[o]=(...u)=>{let h=a.apply(i,u);return h===!1&&(h=c.apply(i,u)),h||""}}r.renderer=i}if(t.tokenizer){const i=this.defaults.tokenizer||new me(this.defaults);for(const l in t.tokenizer){if(!(l in i))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;const o=l,a=t.tokenizer[o],c=i[o];i[o]=(...u)=>{let h=a.apply(i,u);return h===!1&&(h=c.apply(i,u)),h}}r.tokenizer=i}if(t.hooks){const i=this.defaults.hooks||new oe;for(const l in t.hooks){if(!(l in i))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;const o=l,a=t.hooks[o],c=i[o];oe.passThroughHooks.has(l)?i[o]=u=>{if(this.defaults.async)return Promise.resolve(a.call(i,u)).then(d=>c.call(i,d));const h=a.call(i,u);return c.call(i,h)}:i[o]=(...u)=>{let h=a.apply(i,u);return h===!1&&(h=c.apply(i,u)),h}}r.hooks=i}if(t.walkTokens){const i=this.defaults.walkTokens,l=t.walkTokens;r.walkTokens=function(o){let a=[];return a.push(l.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return D.lex(e,n??this.defaults)}parser(e,n){return O.parse(e,n??this.defaults)}parseMarkdown(e){return(t,r)=>{const i={...r},l={...this.defaults,...i},o=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&i.async===!1)return o(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 t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));l.hooks&&(l.hooks.options=l,l.hooks.block=e);const a=l.hooks?l.hooks.provideLexer():e?D.lex:D.lexInline,c=l.hooks?l.hooks.provideParser():e?O.parse:O.parseInline;if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(t):t).then(u=>a(u,l)).then(u=>l.hooks?l.hooks.processAllTokens(u):u).then(u=>l.walkTokens?Promise.all(this.walkTokens(u,l.walkTokens)).then(()=>u):u).then(u=>c(u,l)).then(u=>l.hooks?l.hooks.postprocess(u):u).catch(o);try{l.hooks&&(t=l.hooks.preprocess(t));let u=a(t,l);l.hooks&&(u=l.hooks.processAllTokens(u)),l.walkTokens&&this.walkTokens(u,l.walkTokens);let h=c(u,l);return l.hooks&&(h=l.hooks.postprocess(h)),h}catch(u){return o(u)}}}onError(e,n){return t=>{if(t.message+=`
|
57 |
+
Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+q(t.message+"",!0)+"</pre>";return n?Promise.resolve(r):r}if(n)return Promise.reject(t);throw t}}}const W=new ht;function R(s,e){return W.parse(s,e)}R.options=R.setOptions=function(s){return W.setOptions(s),R.defaults=W.defaults,tt(R.defaults),R};R.getDefaults=_e;R.defaults=F;R.use=function(...s){return W.use(...s),R.defaults=W.defaults,tt(R.defaults),R};R.walkTokens=function(s,e){return W.walkTokens(s,e)};R.parseInline=W.parseInline;R.Parser=O;R.parser=O.parse;R.Renderer=xe;R.TextRenderer=Ae;R.Lexer=D;R.lexer=D.lex;R.Tokenizer=me;R.Hooks=oe;R.parse=R;R.options;R.setOptions;R.use;R.walkTokens;R.parseInline;O.parse;D.lex;const xn={"&":"&","<":"<",">":">",""":'"',"'":"'"},dt=/&(?:amp|lt|gt|quot|#(?:0+)?39);/g,kn=RegExp(dt.source),We=(s="")=>kn.test(s)?s.replace(dt,e=>xn[e]||"'"):s,Fe=(s,e)=>{if(!e)return s;try{return new URL(s,e).href}catch{return s}};class bn{constructor(e){E(this,"renderer");this.renderer=e.renderer}parse(e){this.renderer.elIdList.push(0);const n=e.map(t=>{switch(t.type){case"space":return null;case"heading":{const r=t.depth;return this.renderer.heading(this.parseInline(t.tokens),r)}case"paragraph":return this.renderer.paragraph(this.parseInline(t.tokens));case"text":{const r=t;return r.tokens?this.parseInline(r.tokens):t.text}case"blockquote":{const r=t,i=this.parse(r.tokens);return this.renderer.blockquote(i)}case"list":{const r=t;this.renderer.elIdList.push(0);const i=r.items.map(l=>{const o=[];return l.task&&o.push(this.renderer.checkbox(l.checked??!1)),o.push(this.parse(l.tokens)),this.renderer.listItem(o)});return this.renderer.elIdList.pop(),this.renderer.list(i,t.ordered,t.ordered?t.start:void 0)}case"code":return this.renderer.code(t.text,t.lang);case"html":return this.renderer.html(t.text);case"table":{const r=t;this.renderer.elIdList.push(0);const i=r.header.map((u,h)=>this.renderer.tableCell(this.parseInline(u.tokens),{header:!0,align:t.align[h]}));this.renderer.elIdList.pop();const l=this.renderer.tableRow(i),o=this.renderer.tableHeader(l);this.renderer.elIdList.push(0);const a=r.rows.map(u=>{this.renderer.elIdList.push(0);const h=u.map((d,f)=>this.renderer.tableCell(this.parseInline(d.tokens),{header:!1,align:t.align[f]}));return this.renderer.elIdList.pop(),this.renderer.tableRow(h)});this.renderer.elIdList.pop();const c=this.renderer.tableBody(a);return this.renderer.table([o,c])}case"hr":return this.renderer.hr();case"blockKatex":return this.renderer.blockKatex(t.text);case"thinkBlock":{const r=t,i=this.parse(r.tokens);return this.renderer.thinkBlock(i,r.isThinking)}default:return console.warn(`Token with "${t.type}" type was not found`),null}});return this.renderer.elIdList.pop(),n}parseInline(e=[]){this.renderer.elIdList.push(0);const n=e.map(t=>{switch(t.type){case"text":return this.renderer.text(We(t.text));case"strong":return this.renderer.strong(this.parseInline(t.tokens));case"em":return this.renderer.em(this.parseInline(t.tokens));case"del":return this.renderer.del(this.parseInline(t.tokens));case"codespan":return this.renderer.codespan(We(t.text));case"link":return this.renderer.link(t.href,this.parseInline(t.tokens));case"image":return this.renderer.image(t.href,t.text,t.title);case"html":return this.renderer.html(t.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(t.text);case"inlineKatex":return this.renderer.inlineKatex(t.text);default:return console.warn(`Token with "${t.type}" type was not found`),null}});return this.renderer.elIdList.pop(),n}}var _,N,Ee;class wn{constructor(e={}){qe(this,_);E(this,"elIdList",[]);E(this,"options");E(this,"keyPrefix","md");const{renderer:n,keyPrefix:t}=e;this.options=e,this.keyPrefix=t||"md",n&&typeof n=="object"&&Object.entries(n).forEach(([r,i])=>{const l=r,o=i;!this[l]||l==="elementId"||l==="elIdList"||l==="keyPrefix"||l==="options"||typeof o!="function"||(this[l],this[l]=(...a)=>(I(this,_,Ee).call(this),o.apply(this,a)))})}get elementId(){return`${this.keyPrefix}-${this.elIdList.join("-")}`}heading(e,n){return I(this,_,N).call(this,`h${n}`,e)}paragraph(e){return I(this,_,N).call(this,"p",e)}link(e,n){const t=Fe(e,this.options.baseURL),r=this.options.openLinksInNewTab?"_blank":null;return I(this,_,N).call(this,"a",n,{href:t,target:r})}image(e,n,t=null){const r=Fe(e,this.options.baseURL);return I(this,_,N).call(this,"img",null,{src:r,alt:n,title:t})}codespan(e,n=null){const t=n?`${this.options.langPrefix}${n}`:null;return I(this,_,N).call(this,"code",e,{className:t})}code(e,n){return I(this,_,N).call(this,"pre",this.codespan(e,n))}blockquote(e){return I(this,_,N).call(this,"blockquote",e)}list(e,n,t){return I(this,_,N).call(this,n?"ol":"ul",e,n&&t!==1?{start:t}:{})}listItem(e){return I(this,_,N).call(this,"li",e)}checkbox(e){return I(this,_,N).call(this,"input",null,{type:"checkbox",disabled:!0,checked:e})}table(e){return I(this,_,N).call(this,"table",e)}tableHeader(e){return I(this,_,N).call(this,"thead",e)}tableBody(e){return I(this,_,N).call(this,"tbody",e)}tableRow(e){return I(this,_,N).call(this,"tr",e)}tableCell(e,n){const t=n.header?"th":"td";return I(this,_,N).call(this,t,e,{align:n.align})}strong(e){return I(this,_,N).call(this,"strong",e)}em(e){return I(this,_,N).call(this,"em",e)}del(e){return I(this,_,N).call(this,"del",e)}text(e){return e}html(e){return e}hr(){return I(this,_,N).call(this,"hr")}br(){return I(this,_,N).call(this,"br")}inlineKatex(e){return e}blockKatex(e){return e}thinkBlock(e,n){return e}}_=new WeakSet,N=function(e,n=null,t={}){const r={key:`${this.keyPrefix}-${this.elementId}`};return I(this,_,Ee).call(this),g.createElement(e,{...t,...r},n)},Ee=function(){this.elIdList[this.elIdList.length-1]+=1};function yn(s={}){return{extensions:[vn(),En(),Sn()]}}function vn(s){return{name:"inlineKatex",level:"inline",start(e){const n=e.indexOf("$"),t=e.indexOf("\\[");return Math.min(n===-1?1/0:n,t===-1?1/0:t)},tokenizer(e,n){const t=e.match(new RegExp("^\\$+((?:[^$]|(?<!\\\\)\\$)*?)(?:\\$+|$)"));if(t)return{type:"inlineKatex",raw:t[0],text:t[1].trim()};const r=e.match(/\\\[((?:[^\\]|\\[^\]])*?)(?:\\\]|$)/);if(r)return{type:"inlineKatex",raw:r[0],text:r[1].trim()}}}}function En(s){return{name:"blockKatex",level:"block",start(e){return e.indexOf("$$")},tokenizer(e,n){const t=e.match(/^\$\$+\n([^$]+?)\n\$\$/);if(t)return{type:"blockKatex",raw:t[0],text:t[1].trim()}}}}function Sn(){return{name:"thinkBlock",level:"block",start(s){return s.indexOf("<think>")},tokenizer(s,e){const n=s.match(/<think>([\s\S]*?)(<\/think>|$)/);if(n){const t={type:"thinkBlock",raw:n[0],text:n[1].trim(),tokens:[],isThinking:n[2]===""};return this.lexer.blockTokens(t.text,t.tokens),t}}}}const $n=s=>{if(s.value&&typeof s.value!="string")throw new TypeError(`[marked-react]: Expected value to be of type string but got ${typeof s.value}`);if(s.children&&typeof s.children!="string")throw new TypeError(`[marked-react]: Expected children to be of type string but got ${typeof s.children}`)},Rn={isInline:!1,breaks:!1,gfm:!0,baseURL:void 0,openLinksInNewTab:!0,langPrefix:"language-",renderer:void 0},ft=new ht;ft.use(yn({strict:!1}));const _n=s=>{$n(s);const e={...Rn,...s},n=e.instance??ft,t={breaks:e.breaks,gfm:e.gfm,extensions:n.defaults.extensions},r=e.value??e.children??"",i=e.isInline?n.Lexer.lexInline(r,t):n.lexer(r,t),l={renderer:new wn({renderer:e.renderer,baseURL:e.baseURL,openLinksInNewTab:e.openLinksInNewTab,langPrefix:e.langPrefix})},o=new bn(l),a=e.isInline?o.parseInline(i):o.parse(i);return g.createElement(g.Fragment,null,a)},Tn="_PromptEditor_1nlf9_1",In="_PromptEditorInner_1nlf9_17",jn="_promptAction_1nlf9_135",Nn="_promptActionLeft_1nlf9_151",Cn="_promptActionRight_1nlf9_153",Ln="_promptEmotion_1nlf9_191",An="_promptEmotionLeft_1nlf9_207",Pn="_promptEmotionRight_1nlf9_209",zn="_invisibleScrollbar_1nlf9_269",U={PromptEditor:Tn,PromptEditorInner:In,promptAction:jn,promptActionLeft:Nn,promptActionRight:Cn,promptEmotion:Ln,promptEmotionLeft:An,promptEmotionRight:Pn,invisibleScrollbar:zn},Bn={cover:!0},Mn=[{re:/\*\[(.*?)\]\*/g,replace:`<span class="${U.promptAction}"><span class=${U.promptActionLeft}>*[</span>$1<span class=${U.promptActionRight}>]*</span></span>`},{re:/\*\((.*?)\)\*/g,replace:`<span class="${U.promptEmotion}"><span class=${U.promptEmotionLeft}>*[</span>$1<span class=${U.promptEmotionRight}>]*</span></span>`}],Dn=({value:s,onChange:e=()=>{},style:n={},editable:t=!1,placeholder:r=void 0,disabled:i=!1,innerRef:l,invisibleScrollbar:o=!1,isFocus:a=!1,setIsFocus:c=d=>{},isKeepFocus:u,className:h})=>{const[d,f]=g.useState(s),[v,x]=g.useState(Bn),w=g.useRef(null),m=b=>([{re:/</g,replace:"<"},{re:/>/g,replace:">"},{re:/\n/g,replace:"<br>"},{re:/<br>$/,replace:"<br><br>"},...v.cover?Mn:[]].forEach(P=>{b=b.replace(P.re,P.replace)}),b===""?"<br>":b),S=(b,P,J,H)=>{if(w.current.selectionStart||w.current.selectionStart==0){const Y=Math.min(w.current.selectionStart,w.current.selectionEnd),ue=Math.max(w.current.selectionStart,w.current.selectionEnd);f(ee=>{const te=`${ee.substring(0,Y)}${b}${J}${P}${ee.substring(ue,ee.length)}`;return setTimeout(()=>{e(te)},0),te}),setTimeout(()=>{w.current.selectionEnd=Y+J.length,w.current.focus()},0)}},j=(b,P)=>S("","",b),y=b=>{(b.ctrlKey||b.altKey)&&b.key==="Enter"&&(b.stopPropagation(),j(`
|
58 |
+
`))};g.useEffect(()=>{f(s)},[s]),g.useEffect(()=>{var b;a&&((b=w.current)==null||b.focus())},[a]);const k=()=>{c(!0)},C=()=>{var b;u!=null&&u.current?(b=w.current)==null||b.focus():c(!1)};return p.jsx("div",{style:n,className:`${U.PromptEditor} ${o?U.invisibleScrollbar:""} ${h||""}`,children:p.jsxs("div",{className:U.PromptEditorInner,style:{opacity:i?"0.5":void 0},children:[t===!0&&p.jsx("textarea",{value:d,onChange:b=>{f(b.target.value),e(b.target.value)},placeholder:r,disabled:i,ref:w,onFocus:k,onBlur:C,onKeyDown:y}),p.jsx("div",{dangerouslySetInnerHTML:{__html:m(d)},ref:l})]})})},On=""+new URL("new-sug-B5WwJXWJ.json",import.meta.url).href,qn=$t()(Rt(s=>({cachedSuggestions:null,lastFetchTime:null,setCachedSuggestions:e=>s({cachedSuggestions:e,lastFetchTime:Date.now()}),clearCache:()=>s({cachedSuggestions:null,lastFetchTime:null})}),{name:"suggestion-storage"}));async function Qe(){const s=await fetch(On);if(!s.ok)throw new Error("Failed to fetch suggestions");return await s.json()}function Se(){return Se=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)({}).hasOwnProperty.call(n,t)&&(s[t]=n[t])}return s},Se.apply(null,arguments)}function gt(s,e){if(s==null)return{};var n={};for(var t in s)if({}.hasOwnProperty.call(s,t)){if(e.includes(t))continue;n[t]=s[t]}return n}function $e(s,e){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},$e(s,e)}function Pe(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,$e(s,e)}function Zn(s,e){return s.classList?!!e&&s.classList.contains(e):(" "+(s.className.baseVal||s.className)+" ").indexOf(" "+e+" ")!==-1}function Hn(s,e){s.classList?s.classList.add(e):Zn(s,e)||(typeof s.className=="string"?s.className=s.className+" "+e:s.setAttribute("class",(s.className&&s.className.baseVal||"")+" "+e))}function Xe(s,e){return s.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Un(s,e){s.classList?s.classList.remove(e):typeof s.className=="string"?s.className=Xe(s.className,e):s.setAttribute("class",Xe(s.className&&s.className.baseVal||"",e))}const Je={disabled:!1},ze=L.createContext(null);var mt=function(e){return e.scrollTop},ie="unmounted",V="exited",M="entering",Z="entered",ae="exiting",G=function(s){Pe(e,s);function e(t,r){var i;i=s.call(this,t,r)||this;var l=r,o=l&&!l.isMounting?t.enter:t.appear,a;return i.appearStatus=null,t.in?o?(a=V,i.appearStatus=M):a=Z:t.unmountOnExit||t.mountOnEnter?a=ie:a=V,i.state={status:a},i.nextCallback=null,i}e.getDerivedStateFromProps=function(r,i){var l=r.in;return l&&i.status===ie?{status:V}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var l=this.state.status;this.props.in?l!==M&&l!==Z&&(i=M):(l===M||l===Z)&&(i=ae)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,l,o;return i=l=o=r,r!=null&&typeof r!="number"&&(i=r.exit,l=r.enter,o=r.appear!==void 0?r.appear:l),{exit:i,enter:l,appear:o}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===M){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:pe.findDOMNode(this);l&&mt(l)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===V&&this.setState({status:ie})},n.performEnter=function(r){var i=this,l=this.props.enter,o=this.context?this.context.isMounting:r,a=this.props.nodeRef?[o]:[pe.findDOMNode(this),o],c=a[0],u=a[1],h=this.getTimeouts(),d=o?h.appear:h.enter;if(!r&&!l||Je.disabled){this.safeSetState({status:Z},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:M},function(){i.props.onEntering(c,u),i.onTransitionEnd(d,function(){i.safeSetState({status:Z},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var r=this,i=this.props.exit,l=this.getTimeouts(),o=this.props.nodeRef?void 0:pe.findDOMNode(this);if(!i||Je.disabled){this.safeSetState({status:V},function(){r.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:ae},function(){r.props.onExiting(o),r.onTransitionEnd(l.exit,function(){r.safeSetState({status:V},function(){r.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,l=!0;return this.nextCallback=function(o){l&&(l=!1,i.nextCallback=null,r(o))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var l=this.props.nodeRef?this.props.nodeRef.current:pe.findDOMNode(this),o=r==null&&!this.props.addEndListener;if(!l||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ie)return null;var i=this.props,l=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var o=gt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L.createElement(ze.Provider,{value:null},typeof l=="function"?l(r,o):L.cloneElement(L.Children.only(l),o))},e}(L.Component);G.contextType=ze;G.propTypes={};function Q(){}G.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Q,onEntering:Q,onEntered:Q,onExit:Q,onExiting:Q,onExited:Q};G.UNMOUNTED=ie;G.EXITED=V;G.ENTERING=M;G.ENTERED=Z;G.EXITING=ae;var Gn=function(e,n){return e&&n&&n.split(" ").forEach(function(t){return Hn(e,t)})},ye=function(e,n){return e&&n&&n.split(" ").forEach(function(t){return Un(e,t)})},Be=function(s){Pe(e,s);function e(){for(var t,r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return t=s.call.apply(s,[this].concat(i))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(o,a){var c=t.resolveArguments(o,a),u=c[0],h=c[1];t.removeClasses(u,"exit"),t.addClass(u,h?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(o,a)},t.onEntering=function(o,a){var c=t.resolveArguments(o,a),u=c[0],h=c[1],d=h?"appear":"enter";t.addClass(u,d,"active"),t.props.onEntering&&t.props.onEntering(o,a)},t.onEntered=function(o,a){var c=t.resolveArguments(o,a),u=c[0],h=c[1],d=h?"appear":"enter";t.removeClasses(u,d),t.addClass(u,d,"done"),t.props.onEntered&&t.props.onEntered(o,a)},t.onExit=function(o){var a=t.resolveArguments(o),c=a[0];t.removeClasses(c,"appear"),t.removeClasses(c,"enter"),t.addClass(c,"exit","base"),t.props.onExit&&t.props.onExit(o)},t.onExiting=function(o){var a=t.resolveArguments(o),c=a[0];t.addClass(c,"exit","active"),t.props.onExiting&&t.props.onExiting(o)},t.onExited=function(o){var a=t.resolveArguments(o),c=a[0];t.removeClasses(c,"exit"),t.addClass(c,"exit","done"),t.props.onExited&&t.props.onExited(o)},t.resolveArguments=function(o,a){return t.props.nodeRef?[t.props.nodeRef.current,o]:[o,a]},t.getClassNames=function(o){var a=t.props.classNames,c=typeof a=="string",u=c&&a?a+"-":"",h=c?""+u+o:a[o],d=c?h+"-active":a[o+"Active"],f=c?h+"-done":a[o+"Done"];return{baseClassName:h,activeClassName:d,doneClassName:f}},t}var n=e.prototype;return n.addClass=function(r,i,l){var o=this.getClassNames(i)[l+"ClassName"],a=this.getClassNames("enter"),c=a.doneClassName;i==="appear"&&l==="done"&&c&&(o+=" "+c),l==="active"&&r&&mt(r),o&&(this.appliedClasses[i][l]=o,Gn(r,o))},n.removeClasses=function(r,i){var l=this.appliedClasses[i],o=l.base,a=l.active,c=l.done;this.appliedClasses[i]={},o&&ye(r,o),a&&ye(r,a),c&&ye(r,c)},n.render=function(){var r=this.props;r.classNames;var i=gt(r,["classNames"]);return L.createElement(G,Se({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(L.Component);Be.defaultProps={classNames:""};Be.propTypes={};var de,fe;function Kn(s,e){return!(s===e||L.isValidElement(s)&&L.isValidElement(e)&&s.key!=null&&s.key===e.key)}var X={out:"out-in",in:"in-out"},ke=function(e,n,t){return function(){var r;e.props[n]&&(r=e.props)[n].apply(r,arguments),t()}},Vn=(de={},de[X.out]=function(s){var e=s.current,n=s.changeState;return L.cloneElement(e,{in:!1,onExited:ke(e,"onExited",function(){n(M,null)})})},de[X.in]=function(s){var e=s.current,n=s.changeState,t=s.children;return[e,L.cloneElement(t,{in:!0,onEntered:ke(t,"onEntered",function(){n(M)})})]},de),Wn=(fe={},fe[X.out]=function(s){var e=s.children,n=s.changeState;return L.cloneElement(e,{in:!0,onEntered:ke(e,"onEntered",function(){n(Z,L.cloneElement(e,{in:!0}))})})},fe[X.in]=function(s){var e=s.current,n=s.children,t=s.changeState;return[L.cloneElement(e,{in:!1,onExited:ke(e,"onExited",function(){t(Z,L.cloneElement(n,{in:!0}))})}),L.cloneElement(n,{in:!0})]},fe),Me=function(s){Pe(e,s);function e(){for(var t,r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return t=s.call.apply(s,[this].concat(i))||this,t.state={status:Z,current:null},t.appeared=!1,t.changeState=function(o,a){a===void 0&&(a=t.state.current),t.setState({status:o,current:a})},t}var n=e.prototype;return n.componentDidMount=function(){this.appeared=!0},e.getDerivedStateFromProps=function(r,i){return r.children==null?{current:null}:i.status===M&&r.mode===X.in?{status:M}:i.current&&Kn(i.current,r.children)?{status:ae}:{current:L.cloneElement(r.children,{in:!0})}},n.render=function(){var r=this.props,i=r.children,l=r.mode,o=this.state,a=o.status,c=o.current,u={children:i,current:c,changeState:this.changeState,status:a},h;switch(a){case M:h=Wn[l](u);break;case ae:h=Vn[l](u);break;case Z:h=c}return L.createElement(ze.Provider,{value:{isMounting:!this.appeared}},h)},e}(L.Component);Me.propTypes={};Me.defaultProps={mode:X.out};function Re({enableReasoning:s,...e}){return p.jsxs("svg",{...e,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",className:T("size-5",e.className),strokeWidth:1.5,children:[p.jsx("path",{d:"M874.496 385.109333c-93.141333-39.68-218.282667-65.28-352-72.32-21.333333-1.28-42.112-1.706667-61.866667-1.706666 98.901333-120.746667 204.885333-201.813333 274.645334-204.373334 13.738667-0.554667 25.386667 2.346667 34.688 8.362667 30.122667 19.541333 38.613333 75.434667 23.253333 153.173333-1.706667 10.666667 5.12 21.034667 15.36 23.04 10.666667 2.133333 20.906667-4.693333 23.04-15.36 19.2-97.28 5.12-164.096-40.106667-193.621333-16.213333-10.581333-35.84-15.573333-57.6-14.762667-87.466667 3.285333-210.773333 98.133333-323.84 244.053334-49.237333 1.493333-95.573333 5.546667-137.898666 12.245333-27.562667-123.605333-16.64-212.352 25.344-233.685333 5.888-3.114667 12.16-4.693333 19.498666-5.290667 29.738667-2.304 70.826667 16.853333 115.626667 54.186667 8.277333 6.826667 20.736 5.973333 27.562667-2.56a19.541333 19.541333 0 0 0-2.56-27.52C403.882667 64.426667 354.304 42.666667 313.770667 45.653333a95.744 95.744 0 0 0-34.261334 9.386667c-50.773333 25.898667-71.253333 99.285333-58.453333 206.421333 2.986667 22.186667 6.826667 45.312 12.373333 69.12C93.44 358.570667 4.266667 414.634667 0.426667 485.205333c-2.56 49.92 36.906667 97.450667 114.346666 137.472a19.626667 19.626667 0 1 0 17.92-34.816C70.826667 556.032 37.546667 520.106667 39.552 487.253333c2.133333-46.08 75.605333-93.44 203.093333-118.613333 11.52 42.410667 26.453333 86.698667 44.8 131.84-43.434667 80.554667-74.922667 159.872-91.178666 230.4-23.893333 105.173333-11.093333 180.053333 36.693333 211.114667 15.36 9.984 33.28 14.933333 53.205333 14.933333 39.893333 0 88.192-19.626667 142.805334-58.538667a19.541333 19.541333 0 1 0-22.613334-31.829333c-65.877333 47.061333-121.344 62.805333-151.978666 42.794667-32.426667-21.12-39.509333-82.901333-19.626667-169.642667 13.653333-59.136 38.698667-125.013333 72.874667-192.853333 8.533333 18.688 17.493333 37.376 26.88 56.021333 60.8 119.296 135.253333 223.018667 209.493333 292.053333 59.136 55.04 114.090667 83.754667 159.36 83.754667 14.933333 0 29.013333-3.2 41.642667-9.514667 48.853333-24.96 69.973333-94.293333 59.648-195.2-9.557333-94.421333-45.226667-209.493333-100.437334-324.266666a19.626667 19.626667 0 1 0-35.413333 16.896c114.773333 239.018667 122.88 434.773333 58.453333 467.626666-67.84 34.688-231.424-100.48-357.973333-349.013333-14.506667-27.946667-27.178667-55.466667-38.4-82.346667 14.506667-25.941333 29.866667-52.053333 46.72-78.08 16.853333-25.770667 34.389333-50.688 52.224-74.453333h16.810667c23.04 0 48.042667 0.426667 73.984 2.048 278.613333 14.634667 468.266667 109.226667 464.384 184.917333-1.706667 32.64-39.424 65.621333-103.466667 90.453334a19.797333 19.797333 0 0 0-11.093333 25.429333 19.413333 19.413333 0 0 0 25.301333 11.178667c81.28-31.573333 125.866667-74.922667 128.426667-125.013334 2.986667-56.746667-49.92-111.36-149.333334-153.6v-0.426666zM344.746667 403.2c-11.52 17.706667-22.186667 35.285333-32.597334 53.077333a1009.493333 1009.493333 0 0 1-30.848-94.506666c30.421333-4.693333 63.36-8.106667 98.56-10.24-11.946667 16.64-23.637333 33.877333-34.986666 51.626666v-0.426666z",fill:"currentColor",className:T("transition-all duration-500",s?"text-yellow-500":"text-gray-500 dark:text-zinc-300")}),p.jsx("path",{d:"M512.213333 512m-58.666666 0a58.666667 58.666667 0 1 0 117.333333 0 58.666667 58.666667 0 1 0-117.333333 0Z",fill:"currentColor",className:"text-yellow-400"})]})}function Fn({promptContent:s,children:e,onClick:n,className:t,style:r,isKeepFocus:i,...l}){return p.jsxs("button",{className:T("flex rounded-2xl p-2 text-left text-sm md:hover:bg-gray-100 md:dark:hover:bg-zinc-600/50",t),onClick:o=>{n(s)},onTouchStart:()=>{i&&(i.current=!0,setTimeout(()=>{i.current=!1},500))},onMouseDown:()=>{i&&(i.current=!0,setTimeout(()=>{i.current=!1},500))},style:r,...l,children:[p.jsx("div",{className:"p-0.5",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-4",children:p.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06l7.22 7.22H6.75a.75.75 0 0 0 0 1.5h7.5a.747.747 0 0 0 .75-.75v-7.5a.75.75 0 0 0-1.5 0v5.69L6.28 5.22Z"})})}),p.jsx("div",{className:"flex-1",children:e})]})}function Qn({setValue:s,isPannelExpaned:e,isKeepFocus:n}){var w;const[t,r]=g.useState([]),{cachedSuggestions:i,setCachedSuggestions:l}=qn(),[o,a]=g.useState(null),c=g.useRef(!0),u=g.useRef(null),h=g.useRef(null),{i18n:d}=Ct();g.useEffect(()=>{(async()=>{var S;a(null);try{let j=i;j||(j=await Qe(),l(j),c.current=!1);const y=At()||"zh",k=((S=j[y])==null?void 0:S.chat)||[];r(k),c.current&&(j=await Qe(),l(j),c.current=!1)}catch(j){console.error("Failed to load suggestions:",j)}})()},[d.locale]),g.useEffect(()=>{e||a(null)},[e]);const{contextSafe:f}=Lt({scope:h}),v=f(m=>{let S=Ze.timeline();S.to(m,{y:1,duration:.07}),S.to(m,{y:-8,duration:.3,ease:"power4.out"}),S.to(m,{y:2,duration:.09}),S.to(m,{y:0,duration:.08})}),x=f(m=>{let S=Ze.timeline();S.to(m,{y:2,duration:.1}),S.to(m,{y:0,duration:.17})});return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:T("max-h-[20vh] overflow-hidden transition-all duration-300 [mask-image:linear-gradient(00deg,#0000_0,#ffff_1rem,#ffff_calc(100%-1rem),#0000_100%)] md:max-h-none",o?"h-60":"h-0"),children:p.jsx(Me,{children:p.jsx(Be,{nodeRef:u,addEndListener:m=>{var S;(S=u.current)==null||S.addEventListener("transitionend",m,!1)},classNames:{enter:"opacity-0",enterActive:"!opacity-100 transition-opacity duration-75",exit:"opacity-100",exitActive:"!opacity-0 transition-opacity duration-300 test"},children:p.jsx("div",{ref:u,className:T("invisibleScrollbar hideScrollbar flex h-full flex-col gap-2 overflow-auto p-2",o?"":"!duration-75"),children:o?(w=t.find(m=>m.name===o))==null?void 0:w.items.map((m,S)=>p.jsx(Fn,{promptContent:m.prompt,onClick:()=>{s(m.prompt&&m.prompt!==""?m.prompt:m.display||m.prompt)},className:T("motion-duration-300",S<8?"motion-translate-y-in-[30px] motion-opacity-in-0":"intersect:motion-translate-y-in-[30px] intersect:motion-opacity-in-0"),style:{...S<8?{"--motion-delay":`${S*100}ms`}:{}},isKeepFocus:n,children:m.display||m.prompt},`${m.prompt}-${S}`)):null},o||"none")},o||"none")})}),p.jsx("div",{ref:h,className:T("invisibleScrollbar hideScrollbar relative flex flex-nowrap items-center gap-3 overflow-auto overflow-y-hidden text-nowrap px-3 transition-all duration-500 md:px-5",e?"h-12 md:h-16":"h-0"),children:t.map((m,S)=>p.jsx("button",{className:T("h-7 flex-shrink-0 select-none rounded-3xl px-2 py-1.5 text-xs outline outline-1 outline-slate-400 transition-[opacity,background-color] duration-300 md:hover:bg-gray-100 md:dark:hover:bg-zinc-600/50",e?"opacity-100":"opacity-0",o===m.name&&"shadow-md",`sg-select-${m.name.replaceAll(/[^\w\u4e00-\u9fff]/g,"-")}`),style:{transitionDelay:e?`${Math.min(400+S*50,2e3)}ms,0ms`:void 0},onClick:j=>{o!==m.name?(a(m.name),v(`.sg-select-${m.name.replaceAll(/[^\w\u4e00-\u9fff]/g,"-")}`)):(x(`.sg-select-${m.name.replaceAll(/[^\w\u4e00-\u9fff]/g,"-")}`),a(null))},onTouchStart:()=>{n&&(n.current=!0,setTimeout(()=>{n.current=!1},500))},onMouseDown:()=>{n&&(n.current=!0,setTimeout(()=>{n.current=!1},500))},children:m.name},m.name))})]})}function cs({className:s,maxLines:e=8,onSubmit:n=()=>{},submitShortcutOnMobile:t=!1,currentModelName:r,...i}){const[l,o]=g.useState(""),a=g.useRef(null),[c,u]=g.useState(1),[h,d]=g.useState(!1),[f,v]=g.useState(!1),{llmModel:x,loadingModelTitle:w}=_t(A=>A),{selectedModelTitle:m,unloadModel:S,supportReasoning:j,currentInferPort:y}=Tt(x),[k,C]=g.useState(x.isEnableReasoning),[b,P]=g.useState(It._({id:"s1jQ2s"}));g.useRef(null);const J=g.useRef(null),H=g.useRef(!1),Y=24;g.useEffect(()=>{setTimeout(()=>{a.current&&u(a.current.scrollHeight/Y)},0)},[l]);const ue=A=>{A.trim()!==""&&(n(A.trim(),k),o(""),De(0),v(!1),d(!1))},ee=A=>{A.key==="Enter"&&!A.shiftKey&&window.matchMedia("(min-width: 768px)").matches&&(A.stopPropagation(),A.preventDefault(),ue(l))},te=()=>{J.current.setIsModalOpen(!0)},ne=g.useRef(),De=A=>{clearTimeout(ne.current),ne.current=setTimeout(()=>{v(!1),ne.current=void 0},A)};return g.useEffect(()=>{clearTimeout(ne.current),h?(v(!0),ne.current=void 0):l===""&&De(300)},[h,l]),g.useEffect(()=>{x.isEnableReasoning=k},[k]),g.useEffect(()=>{x.supportReasoning?(x.isEnableReasoning=x.isEnableReasoning?!0:k,C(x.isEnableReasoning)):C(!1)},[x]),p.jsxs("div",{className:T("relative flex flex-col overflow-hidden rounded-[1.75rem] outline outline-1 outline-slate-400 transition-[height] ease-out",s),children:[p.jsx(jt,{ref:J,children:({close:A})=>p.jsx(Nt,{close:A})}),p.jsx(Qn,{setValue:o,isKeepFocus:H,isPannelExpaned:f}),p.jsxs("div",{className:T("flex flex-shrink-0 rounded-[1.75rem] transition-[height] ease-out"),style:{height:`${(c>1?32:56)+(Math.min(Math.max(1,c),e)-1)*Y}px`},onKeyDown:A=>ee(A),children:[p.jsx("div",{className:T("flex justify-end gap-1 transition-all duration-500",f?"pointer-events-none w-0 opacity-0":"w-[52px]",!j&&"pointer-events-none w-0 opacity-0"),children:p.jsx("button",{className:T("my-2 mr-1 h-10 w-10 self-end rounded-full p-2.5 text-slate-500 transition-[color,background-color] duration-500 dark:text-zinc-200",k?"md:hover:bg-yellow-500/10 dark:md:hover:bg-yellow-500/20":"md:hover:bg-slate-100 dark:md:hover:bg-slate-200/20"),onClick:()=>C(!k),children:p.jsx(Re,{enableReasoning:k})})}),p.jsx("div",{className:T("flex-1 cursor-text overflow-auto py-4 transition-all duration-500",!j&&"pl-5",f&&"pl-3 md:pl-5",c>1&&"py-0"),onClick:()=>{d(!0)},children:p.jsx(Dn,{value:l,onChange:A=>{o(A)},placeholder:b,editable:!0,innerRef:a,invisibleScrollbar:c<=e,isFocus:h,setIsFocus:d,isKeepFocus:H,className:"caret-black dark:caret-zinc-300"})}),p.jsx("button",{className:T("absolute bottom-0 right-0 m-2 h-10 w-10 self-end rounded-full p-2.5 text-slate-400 transition-[background-color,margin] duration-[200ms,500ms] dark:text-zinc-400 md:hover:bg-slate-100",l.trim()!==""&&"text-slate-600 dark:text-zinc-300",f?"max-md:my-0":""),onClick:()=>{ue(l)},children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:p.jsx("path",{d:"M3.105 2.288a.75.75 0 0 0-.826.95l1.414 4.926A1.5 1.5 0 0 0 5.135 9.25h6.115a.75.75 0 0 1 0 1.5H5.135a1.5 1.5 0 0 0-1.442 1.086l-1.414 4.926a.75.75 0 0 0 .826.95 28.897 28.897 0 0 0 15.293-7.155.75.75 0 0 0 0-1.114A28.897 28.897 0 0 0 3.105 2.288Z"})})})]}),p.jsxs("div",{className:T("center invisibleScrollbar mr-11 flex gap-1 overflow-hidden overflow-x-auto pl-3 pr-3 transition-all duration-500 [mask-image:linear-gradient(90deg,#ffff_calc(100%_-_1rem),_#0000_100%)] md:pl-5"),children:[p.jsx("div",{className:T("flex h-10 flex-shrink-0 items-center transition-all duration-500 md:h-14",j&&f?"":"-mb-10 md:-mb-14"),children:p.jsxs("button",{className:T("flex h-6 items-center gap-2 rounded-full border px-2 text-slate-500 transition-all duration-500 dark:text-slate-300 md:hover:bg-slate-100 dark:md:hover:bg-zinc-600/70",j&&f?"":"pointer-events-none opacity-0",k?"border-yellow-600 bg-yellow-500/10 text-yellow-600 dark:text-yellow-600 md:hover:bg-yellow-500/20 dark:md:hover:bg-yellow-500/30":"border-slate-400 text-slate-500"),onTouchStart:()=>{H&&(H.current=!0,setTimeout(()=>{H.current=!1},500))},onMouseDown:()=>{H&&(H.current=!0,setTimeout(()=>{H.current=!1},500))},onClick:()=>C(!k),children:[p.jsx(Re,{enableReasoning:k}),p.jsx("span",{children:p.jsx(K,{id:"wUf2OL"})})]})}),p.jsx("div",{className:T("items-transition-all ml-auto flex h-10 flex-shrink-0 items-center text-sm text-gray-500/50 duration-500 dark:text-zinc-400 md:h-14",f?"":"-mb-10 md:-mb-14"),children:p.jsxs("span",{className:T("flex h-8 items-center text-nowrap transition-all",f?"opacity-100":"opacity-0"),children:[r?p.jsx("span",{className:"motion-preset-slide-left-sm",children:p.jsx(K,{id:"Kwc7rD",values:{currentModelName:r},components:{0:p.jsx("span",{className:"font-semibold"})}})},0):p.jsx("span",{className:"motion-preset-slide-right-sm",children:p.jsx(K,{id:"VCOI02",values:{0:y.current&&(k&&y.current.portType==="api"?y.current.reasoningModelName:y.current.selectedModelTitle)}})},1),p.jsx("button",{className:"pl-2",onClick:te,children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"size-4",children:p.jsx("path",{fillRule:"evenodd",d:"M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z",clipRule:"evenodd"})})})]})})]}),p.jsxs("div",{className:T("group absolute bottom-0 left-0 right-0 top-0 flex cursor-pointer items-center backdrop-blur-sm transition-all duration-300",m===null?"":"pointer-events-none scale-95 opacity-0"),onClick:()=>{w===null&&te()},children:[p.jsx("div",{className:T("m-2 flex h-10 w-10 items-center justify-center self-end rounded-full text-slate-800 dark:text-zinc-300"),children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"size-6",children:p.jsx("path",{fillRule:"evenodd",d:"M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})}),p.jsx("div",{className:"flex h-14 w-0 flex-1 cursor-pointer items-center self-end p-2",children:m===null&&(w===null?p.jsx("span",{className:"transition-all group-active:scale-95 max-md:text-xs",children:p.jsx(K,{id:"pG1YQf"})}):p.jsx(p.Fragment,{children:p.jsx(K,{id:"GFKKZL",values:{loadingModelTitle:w},components:{0:p.jsx("span",{className:"font-semibold underline transition-all group-active:scale-95"}),1:p.jsx("span",{className:"ml-2 text-xs text-slate-300 transition-all group-active:scale-95 md:static"})}})}))})]})]})}const Xn=g.lazy(()=>et(()=>import("./CodeHighlight-4c4CQtL4.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),xt=g.lazy(()=>et(()=>import("./KatexRender-Bqan3cGk.js"),__vite__mapDeps([4,1,2,5]),import.meta.url));function Jn({children:s,className:e,...n}){const[t,r]=g.useState(!!e);return t?p.jsx("span",{...n,className:e,onAnimationEnd:()=>r(!1),children:s}):s}function kt({children:s,animate:e=!1}){const[n,t]=g.useState([]),r=g.useRef(0),i=g.useRef(""),l=g.useRef([]),o=g.useRef(Math.random());return g.useEffect(()=>{if(s.startsWith(i.current)&&s.length>r.current)l.current=[...l.current,p.jsx(Jn,{className:`${e&&"motion-opacity-in-0 motion-duration-1000"||""}`,children:s.slice(r.current)},`${s.length}-${o.current}`)],r.current=s.length,i.current=s;else if(i.current.startsWith(s)&&s.length<r.current){const a=l.current.filter(c=>parseInt(c.key)<=s.length);a.length>0&&parseInt(a[a.length-1].key)<s.length&&a.push(g.cloneElement(l.current[a.length],{...l.current[a.length].props},s.slice(parseInt(a[a.length-1].key)))),l.current=a,r.current=s.length,i.current=s}else o.current=Math.random(),l.current.length>0?l.current=[g.cloneElement(l.current[0],{...l.current[0].props,key:`${s.length}-${o.current}`},s)]:l.current=[],r.current=s.length,i.current=s;t(l.current)},[s]),p.jsx(p.Fragment,{children:n})}function bt({children:s,isThinking:e}){const{showReasoningContentByDefault:n,setShowReasoningContentByDefault:t}=Pt(h=>h),[r,i]=g.useState(n!==!1),[l,o]=g.useState(0),[a,c]=g.useState(e),u=g.useRef(null);return g.useEffect(()=>{const h=new ResizeObserver(()=>{var d;o(((d=u.current)==null?void 0:d.clientHeight)||0)});return u.current&&h.observe(u.current),()=>{h.disconnect()}},[]),p.jsxs("div",{className:"mb-4 rounded-2xl md:mt-3",children:[p.jsx("div",{className:"flex",children:p.jsxs("div",{className:T("flex w-48 cursor-pointer select-none items-center gap-2 rounded-3xl p-2 pr-2 text-sm font-semibold transition-all duration-200 md:hover:bg-yellow-500/20 md:active:bg-yellow-500/30 dark:md:hover:bg-yellow-500/10 dark:md:active:bg-yellow-500/20",e&&"animate-pulse"),onClick:()=>{c(!0),i(!r)},children:[p.jsx(Re,{enableReasoning:!0})," ",e?p.jsx("span",{className:"motion-preset-slide-down-md",children:p.jsx(K,{id:"Ed99mE"})},10):r?p.jsx("span",{className:"motion-preset-slide-down-md",children:p.jsx(K,{id:"7Z1zBq"})},0):p.jsx("span",{className:"motion-preset-slide-up-md",children:p.jsx(K,{id:"7qPtNp"})},1),r?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"motion-preset-slide-up-md ml-auto size-5",children:p.jsx("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"})},2):p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"motion-preset-slide-down-md ml-auto size-5",children:p.jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})},3)]})}),p.jsx("div",{className:T("overflow-hidden",r?"opacity-100":"opacity-0",a&&"transition-[opacity,height] duration-300",a&&e&&"transition-[opacity]"),style:{height:r?l>0?`${l}px`:void 0:"0px"},children:p.jsx("div",{className:T("ml-[18px] overflow-hidden border-l pl-4 [mask-image:linear-gradient(180deg,#ffff_calc(100%_-_8px),_#0000_100%)]",a&&e&&"transition-[height] duration-300"),style:{height:l>0?`${l}px`:void 0},children:p.jsx("div",{ref:u,className:"-mt-4 text-slate-600 dark:text-zinc-400",children:s})})})]})}function Yn({snippet:s,lang:e}){return p.jsx("div",{className:"group/code z-20 flex w-full flex-1 flex-col rounded-2xl bg-neutral-100 will-change-scroll dark:bg-neutral-700",children:p.jsx("div",{className:"flex w-full overflow-auto",children:p.jsx(g.Suspense,{fallback:p.jsx("pre",{className:"w-0 flex-1",children:p.jsx("code",{className:"block overflow-x-auto p-4",children:s})}),children:p.jsx(Xn,{snippet:s,lang:e})})})})}function es({children:s}){return p.jsx("span",{children:p.jsx(g.Suspense,{fallback:p.jsx("code",{children:s}),children:p.jsx(xt,{katexOptions:wt,children:s})})})}function ts({children:s}){return p.jsx("p",{children:p.jsx(g.Suspense,{fallback:p.jsx("code",{children:s}),children:p.jsx(xt,{katexOptions:wt,children:s})})})}const wt={strict:!1,throwOnError:!1,macros:{"\\f":"#1f(#2)"}},yt={heading(s,e){switch(e){case 1:return p.jsx("h1",{className:"mb-2 mt-7 text-2xl font-semibold",children:s},this.elementId);case 2:return p.jsx("h2",{className:"mb-2 mt-7 text-xl font-semibold",children:s},this.elementId);case 3:return p.jsx("h3",{className:"mb-2 mt-7 text-lg font-semibold",children:s},this.elementId);case 4:return p.jsx("h4",{className:"mb-2 mt-7 font-semibold",children:s},this.elementId);case 5:return p.jsx("h5",{className:"mb-2 mt-7 font-semibold",children:s},this.elementId);case 6:return p.jsx("h6",{className:"mb-2 mt-7 font-semibold",children:s},this.elementId)}},text(s){return p.jsx(kt,{animate:!1,children:s},this.elementId)},paragraph(s){return p.jsx("p",{className:"my-4 text-base/7",children:s},this.elementId)},list(s,e,n){return e?p.jsx("ol",{start:n,className:"list-inside list-decimal",children:s},this.elementId):p.jsx("ul",{className:"list-inside list-disc",children:s},this.elementId)},listItem(s){return p.jsx("li",{className:"my-4",children:s},this.elementId)},hr(){return p.jsx("hr",{className:"border-[1px]"},this.elementId)},blockquote(s){return p.jsx("blockquote",{className:"border-l-2 pl-3",children:s},this.elementId)},codespan(s,e=null){var t;const n=e?`${(t=this.options)==null?void 0:t.langPrefix}${e}`:null;return p.jsx("code",{className:T("mx-0.5 text-wrap break-words rounded-md bg-stone-200 box-decoration-clone px-0.5 text-stone-800/90 dark:bg-neutral-700 dark:text-stone-300",n),children:s},this.elementId)},code(s,e){return p.jsx(Yn,{snippet:s,lang:e},this.elementId)},inlineKatex(s){return p.jsx(es,{children:s},this.elementId)},blockKatex(s){return p.jsx(ts,{children:s},this.elementId)},thinkBlock(s,e){return p.jsx(bt,{isThinking:!1,children:s},this.elementId)}},ns={...yt,text(s){return p.jsx(kt,{animate:!0,children:s},this.elementId)},thinkBlock(s,e){return p.jsx(bt,{isThinking:e,children:s},this.elementId)}};function us({stream:s=!1,...e}){return p.jsx(_n,{isInline:!1,breaks:!0,gfm:!0,baseURL:void 0,openLinksInNewTab:!0,langPrefix:"language-",renderer:s?ns:yt,...e,children:e.children})}function ps(s){const e={},n=[{regex:/```[\s\S]*?(```|$)/g,suffix:"\n```"},{regex:/\$\$[\s\S]*?(\$\$|$)/g,suffix:`
|
59 |
+
$$`},{regex:/\\\[[\s\S]*?(\\\]|$)/g,suffix:`
|
60 |
+
\\]`}];let t=s;t=ss(t,e,n);let r=t.split(`
|
61 |
+
`);return r=is(r),t=r.join(`
|
62 |
+
`),t=rs(t,s,e,n),t}function ss(s,e,n){let t=s;return n.forEach((r,i)=>{const{regex:l,suffix:o}=r,a=[],c=`__BLOCK_${i}_`;e[c]=a,t=t.replace(l,u=>{const d=(o?u.endsWith(o):!0)?u:u+o;return a.push(d),`${c}${a.length-1}__`})}),t}function rs(s,e,n,t){let r=s;return t.forEach((i,l)=>{const{suffix:o}=i,a=`__BLOCK_${l}_`;n[a].forEach((u,h)=>{const d=u.endsWith(o)&&!e.includes(u)?u.slice(0,-1*o.length):u;r=r.replace(`${a}${h}__`,d.replace(/\$/g,"$$$$"))})}),r}function is(s){let e=null,n=0;for(;n<s.length;){const t=s[n],r=Ye(t);if(r==="empty"){n++;continue}e!==null&&(r!==e||r==="paragraph")&&n>0&&Ye(s[n-1])!=="empty"&&(s.splice(n,0,""),n++),r!=="empty"&&(e=r),n++}return s}function Ye(s){const e=s.trim();return e===""?"empty":/^#{1,6}\s/.test(e)?"heading":/^\d+\.\s/.test(e)||/^[-*+]\s/.test(e)?"list":/^>/.test(e)?"blockquote":/^\|/.test(e)?"table":e.startsWith("```")?"code":"paragraph"}const B={"input-range-root":"_input-range-root_ogway_5","input-range":"_input-range_ogway_5","input-range-number":"_input-range-number_ogway_23","input-text-error":"_input-text-error_ogway_157","input-list-input":"_input-list-input_ogway_169","input-list-control":"_input-list-control_ogway_185","input-list-items":"_input-list-items_ogway_201","input-list-item":"_input-list-item_ogway_201","input-list-delete":"_input-list-delete_ogway_245","input-list-edit":"_input-list-edit_ogway_267","input-list-edit-label":"_input-list-edit-label_ogway_289","input-list-counter":"_input-list-counter_ogway_297"};function hs({min:s,showMin:e=!0,max:n,showMax:t=!0,step:r,value:i,showValueWhenChange:l=!1,onChange:o,className:a,...c}){return p.jsxs("div",{className:`${B["input-range-root"]} ${a||""}`,children:[e&&p.jsx("span",{className:B["input-range-number"],children:s}),p.jsx("input",{...c,value:i,onChange:u=>o==null?void 0:o(parseFloat(u.target.value)),min:s,max:n,step:r,type:"range",className:B["input-range"]}),t&&p.jsx("span",{className:B["input-range-number"],children:n})]})}function ls({value:s,className:e,onChange:n,verification:t,ref:r,...i}){const[l,o]=g.useState(s||""),[a,c]=g.useState(!1),u=h=>{const d=h.target.value;if(o(d),t){const f=t(d);c(!f),f&&n&&n(d)}else c(!1),n&&n(d)};return g.useEffect(()=>{o(s||"")},[s]),p.jsx("input",{...i,ref:r,type:"text",className:a?`${e||""} ${B["input-text-error"]}`:e,value:l,onChange:u})}function ds({value:s,onChange:e,max:n=1/0,verification:t,className:r,classNameItem:i,classNameItemEdit:l}){const[o,a]=g.useState(""),[c,u]=g.useState(null),[h,d]=g.useState(""),f=g.useRef(null),v=g.useRef(null),x=y=>{var k;y.target===f.current&&((k=v.current)==null||k.focus())},w=y=>{if(y.key==="Enter"){y.preventDefault();const k=o.trim();k&&s.length<n&&(!t||t(k))&&(e==null||e([...s,k]),a(""))}else y.key==="Backspace"&&!o&&s.length>0&&(e==null||e(s.slice(0,-1)))},m=y=>k=>{k.dataTransfer.setData("index",y.toString())},S=y=>k=>{k.preventDefault();const C=parseInt(k.dataTransfer.getData("index"));if(C!==y){const b=[...s],[P]=b.splice(C,1);b.splice(y,0,P),e==null||e(b)}},j=()=>{if(c!==null)if(h.trim()){if(!t||t(h.trim())){const y=[...s];y[c]=h.trim(),e==null||e(y)}}else e==null||e(s.filter((y,k)=>k!==c));u(null)};return p.jsxs("div",{className:`${B["input-list-items"]} ${r||""}`,ref:f,onClick:x,children:[s.map((y,k)=>p.jsx("div",{className:`${B["input-list-item"]} ${i||""}`,draggable:c!==k,onDragStart:m(k),onDragOver:C=>C.preventDefault(),onDrop:S(k),onClick:()=>{u(k),d(y)},children:c===k?p.jsxs(p.Fragment,{children:[p.jsx("label",{className:B["input-list-edit-label"],children:h}),p.jsx("input",{type:"text",value:h,onChange:C=>d(C.target.value),onKeyDown:C=>{C.key==="Enter"?j():C.key==="Backspace"&&!h&&(e==null||e(s.filter((b,P)=>P!==c)),u(null))},onBlur:j,autoFocus:!0,className:`${B["input-list-edit"]} ${l||""}`})]}):p.jsxs(p.Fragment,{children:[p.jsx("span",{children:y}),p.jsx("button",{className:B["input-list-delete"],onClick:()=>e==null?void 0:e(s.filter((C,b)=>b!==k)),children:"×"})]})},`${s.length}-${k}`)),p.jsxs("div",{className:B["input-list-control"],children:[p.jsx(ls,{value:o,onChange:a,verification:y=>!t||t(y),onKeyDown:w,className:`${B["input-list-input"]}`,ref:v}),n<1/0&&p.jsxs("div",{className:B["input-list-counter"],children:[s.length,"/",n]})]})]})}export{Be as C,ds as I,Dn as P,us as R,Me as S,ps as a,hs as b,ls as c,cs as d};
|
assets/Input-Dx33p2my.css
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
._PromptEditor_1nlf9_1{overflow-y:auto;scrollbar-gutter:stable;min-height:1rem;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}._PromptEditorInner_1nlf9_17{position:relative;overflow:hidden;min-height:100%}._PromptEditorInner_1nlf9_17>div{white-space:pre-wrap;word-break:break-all;border-radius:inherit;overflow:hidden;font-family:inherit;font-size:1rem;font-weight:400;line-height:inherit;min-width:2px}._PromptEditorInner_1nlf9_17>textarea{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;font-family:inherit;font-size:1rem;font-weight:400;line-height:inherit;overflow:hidden;resize:none;outline:none;border:none;background-color:transparent;color:transparent;word-break:break-all;padding:inherit;border-radius:inherit;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}._PromptEditorInner_1nlf9_17>textarea::-moz-selection{background-color:#7eccf953}._PromptEditorInner_1nlf9_17>textarea::selection{background-color:#7eccf953}._PromptEditorInner_1nlf9_17 *{overflow-wrap:break-word;word-break:break-all;word-spacing:0px}._promptAction_1nlf9_135{font-weight:600}._promptActionLeft_1nlf9_151,._promptActionRight_1nlf9_153{color:transparent}._promptActionLeft_1nlf9_151:before,._promptActionRight_1nlf9_153:after{content:"AC";color:#aaa;position:absolute;font-size:.5em;padding:.4rem 0rem .3rem .1rem;min-width:.7rem;word-break:keep-all}._promptActionRight_1nlf9_153:after{padding:.4rem .2rem .3rem 0rem;margin-left:-.7rem}._promptEmotion_1nlf9_191{font-style:italic}._promptEmotionLeft_1nlf9_207,._promptEmotionRight_1nlf9_209{color:transparent}._promptEmotionLeft_1nlf9_207:before,._promptEmotionRight_1nlf9_209:after{content:"EM";color:#aaa;position:absolute;font-size:.5em;padding:.4rem 0rem .3rem .1rem;word-break:keep-all;min-width:.7rem}._promptEmotionRight_1nlf9_209:after{padding:.4rem .2rem .3rem 0;margin-left:-.7rem}._promptAction_1nlf9_135>span::-moz-selection,._promptEmotion_1nlf9_191>span::-moz-selection{color:transparent!important}._promptAction_1nlf9_135>span::selection,._promptEmotion_1nlf9_191>span::selection{color:transparent!important}._PromptEditor_1nlf9_1._invisibleScrollbar_1nlf9_269::-webkit-scrollbar{width:16px;background-color:transparent}._PromptEditor_1nlf9_1._invisibleScrollbar_1nlf9_269::-webkit-scrollbar-thumb{background-color:transparent}._PromptEditor_1nlf9_1._invisibleScrollbar_1nlf9_269{scrollbar-width:thin;scrollbar-color:transparent transparent}._input-range-root_ogway_5{display:flex;align-items:center}._input-range_ogway_5{flex:1}._input-range-number_ogway_23{min-width:30px;text-align:center}._input-range-root_ogway_5 input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;width:25rem}._input-range-root_ogway_5 input[type=range]:focus{outline:none}._input-range-root_ogway_5 input[type=range]::-webkit-slider-runnable-track{background-color:#e3e3e3;border-radius:.5rem;height:4px}._input-range-root_ogway_5 input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:-4px;background-color:gray;border-radius:.5rem;height:12px;width:12px}._input-range-root_ogway_5 input[type=range]:active::-webkit-slider-thumb{outline:3px solid #808080;outline-offset:.125rem}._input-range-root_ogway_5 input[type=range]::-moz-range-track{background-color:#e3e3e3;border-radius:.5rem;height:4px}._input-range-root_ogway_5 input[type=range]::-moz-range-thumb{background-color:gray;border:none;border-radius:.5rem;height:12px;width:12px}._input-range-root_ogway_5 input[type=range]:active::-moz-range-thumb{outline:3px solid #808080;outline-offset:.125rem}._input-text-error_ogway_157{background-color:#ffa2a2}._input-list-input_ogway_169{flex:1;width:0;height:100%;border-radius:inherit;background-color:transparent}._input-list-control_ogway_185{display:flex;gap:8px;align-items:center;width:0;flex:1}._input-list-items_ogway_201{display:flex;flex-wrap:wrap;gap:4px}._input-list-item_ogway_201{position:relative;background-color:#fff9;border-radius:4px;padding:4px 24px 4px 8px;cursor:move;transition:all .2s;overflow:hidden;border:.5px solid #666;border-radius:.5rem}._input-list-item_ogway_201:hover{background:#e0e0e0}._input-list-delete_ogway_245{position:absolute;right:4px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:#f44}._input-list-edit_ogway_267{position:absolute;left:0;top:0;bottom:0;right:0;border:none;border-radius:4px;padding:4px 24px 4px 8px}._input-list-edit-label_ogway_289{opacity:0}._input-list-counter_ogway_297{font-size:.9em;color:#666}
|
assets/KaTeX_AMS-Regular-BQhdFMY1.woff2
ADDED
Binary file (28.1 kB). View file
|
|
assets/KaTeX_AMS-Regular-DMm9YOAa.woff
ADDED
Binary file (33.5 kB). View file
|
|
assets/KaTeX_AMS-Regular-DRggAlZN.ttf
ADDED
Binary file (63.6 kB). View file
|
|
assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf
ADDED
Binary file (12.4 kB). View file
|
|
assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff
ADDED
Binary file (7.72 kB). View file
|
|
assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2
ADDED
Binary file (6.91 kB). View file
|
|
assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff
ADDED
Binary file (7.66 kB). View file
|
|
assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2
ADDED
Binary file (6.91 kB). View file
|
|
assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf
ADDED
Binary file (12.3 kB). View file
|
|
assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf
ADDED
Binary file (19.6 kB). View file
|
|
assets/KaTeX_Fraktur-Bold-BsDP51OF.woff
ADDED
Binary file (13.3 kB). View file
|
|
assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2
ADDED
Binary file (11.3 kB). View file
|
|
assets/KaTeX_Fraktur-Regular-CB_wures.ttf
ADDED
Binary file (19.6 kB). View file
|
|
assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2
ADDED
Binary file (11.3 kB). View file
|
|
assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff
ADDED
Binary file (13.2 kB). View file
|
|
assets/KaTeX_Main-Bold-Cx986IdX.woff2
ADDED
Binary file (25.3 kB). View file
|
|
assets/KaTeX_Main-Bold-Jm3AIy58.woff
ADDED
Binary file (29.9 kB). View file
|
|
assets/KaTeX_Main-Bold-waoOVXN0.ttf
ADDED
Binary file (51.3 kB). View file
|
|
assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2
ADDED
Binary file (16.8 kB). View file
|
|
assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf
ADDED
Binary file (33 kB). View file
|
|
assets/KaTeX_Main-BoldItalic-SpSLRI95.woff
ADDED
Binary file (19.4 kB). View file
|
|
assets/KaTeX_Main-Italic-3WenGoN9.ttf
ADDED
Binary file (33.6 kB). View file
|
|
assets/KaTeX_Main-Italic-BMLOBm91.woff
ADDED
Binary file (19.7 kB). View file
|
|
assets/KaTeX_Main-Italic-NWA7e6Wa.woff2
ADDED
Binary file (17 kB). View file
|
|
assets/KaTeX_Main-Regular-B22Nviop.woff2
ADDED
Binary file (26.3 kB). View file
|
|
assets/KaTeX_Main-Regular-Dr94JaBh.woff
ADDED
Binary file (30.8 kB). View file
|
|
assets/KaTeX_Main-Regular-ypZvNtVU.ttf
ADDED
Binary file (53.6 kB). View file
|
|
assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf
ADDED
Binary file (31.2 kB). View file
|
|
assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2
ADDED
Binary file (16.4 kB). View file
|
|
assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff
ADDED
Binary file (18.7 kB). View file
|
|
assets/KaTeX_Math-Italic-DA0__PXp.woff
ADDED
Binary file (18.7 kB). View file
|
|
assets/KaTeX_Math-Italic-flOr_0UB.ttf
ADDED
Binary file (31.3 kB). View file
|
|
assets/KaTeX_Math-Italic-t53AETM-.woff2
ADDED
Binary file (16.4 kB). View file
|
|
assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf
ADDED
Binary file (24.5 kB). View file
|
|
assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2
ADDED
Binary file (12.2 kB). View file
|
|
assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff
ADDED
Binary file (14.4 kB). View file
|
|
assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2
ADDED
Binary file (12 kB). View file
|
|
assets/KaTeX_SansSerif-Italic-DN2j7dab.woff
ADDED
Binary file (14.1 kB). View file
|
|
assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf
ADDED
Binary file (22.4 kB). View file
|
|
assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf
ADDED
Binary file (19.4 kB). View file
|
|
assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff
ADDED
Binary file (12.3 kB). View file
|
|
assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2
ADDED
Binary file (10.3 kB). View file
|
|
assets/KaTeX_Script-Regular-C5JkGWo-.ttf
ADDED
Binary file (16.6 kB). View file
|
|
assets/KaTeX_Script-Regular-D3wIWfF6.woff2
ADDED
Binary file (9.64 kB). View file
|
|
assets/KaTeX_Script-Regular-D5yQViql.woff
ADDED
Binary file (10.6 kB). View file
|
|
assets/KaTeX_Size1-Regular-C195tn64.woff
ADDED
Binary file (6.5 kB). View file
|
|