@kitn.ai/ui 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -13
- package/dist/components/chat-thread.d.ts +2 -4
- package/dist/components/choice-card.d.ts +1 -0
- package/dist/components/dismissed-stub.d.ts +22 -0
- package/dist/components/message.d.ts +59 -2
- package/dist/components/response-compare-types.d.ts +66 -0
- package/dist/components/response-compare.d.ts +51 -0
- package/dist/components/tasks-card.d.ts +1 -0
- package/dist/components/toast.d.ts +48 -0
- package/dist/components/use-card-resolution.d.ts +10 -6
- package/dist/custom-elements.json +260 -11
- package/dist/elements/artifact.js +1 -0
- package/dist/elements/attachments.js +1 -0
- package/dist/elements/autoloader.d.ts +2 -0
- package/dist/elements/autoloader.js +1 -0
- package/dist/elements/card.js +1 -0
- package/dist/elements/cards.d.ts +1 -0
- package/dist/elements/cards.js +1 -0
- package/dist/elements/chain-of-thought.d.ts +0 -12
- package/dist/elements/chain-of-thought.js +1 -0
- package/dist/elements/chat-scope-picker.js +1 -0
- package/dist/elements/chat-workspace.js +1 -0
- package/dist/elements/chat.js +1 -0
- package/dist/elements/checkpoint.js +1 -0
- package/dist/elements/choice.js +1 -0
- package/dist/elements/chunks/Icon-D_Zmwmwh.js +1 -0
- package/dist/elements/chunks/action-icons-PVfIvcuG.js +1 -0
- package/dist/elements/chunks/attachments-Dp6vqtrc.js +1 -0
- package/dist/elements/chunks/bash-InADTalH.js +1 -0
- package/dist/elements/chunks/button-CKyYD9G4.js +1 -0
- package/dist/elements/chunks/card-Cjho-PYk.js +1 -0
- package/dist/elements/chunks/card-routing-C986KuUA.js +1 -0
- package/dist/elements/chunks/chat-thread-RT808iPf.js +1 -0
- package/dist/elements/chunks/check-CDYaMYrM.js +1 -0
- package/dist/elements/chunks/chevron-down-3SBiq8HF.js +1 -0
- package/dist/elements/chunks/chevron-right-k2UFlIVK.js +1 -0
- package/dist/elements/chunks/cn-Dogu6PbV.js +1 -0
- package/dist/elements/chunks/code-block-BYUmfFSd.js +1 -0
- package/dist/elements/chunks/collapsible-BiNwdOn6.js +1 -0
- package/dist/elements/chunks/context-18g6oi4J.js +1 -0
- package/dist/elements/chunks/conversation-list-D9Y0NVdo.js +1 -0
- package/dist/elements/chunks/core-AYMC6_lb.js +12 -0
- package/dist/elements/chunks/css-M7EaDHN_.js +1 -0
- package/dist/elements/chunks/default-input-CSAoYYMd.js +1 -0
- package/dist/elements/chunks/download-D8K0Je8r.js +1 -0
- package/dist/elements/chunks/dropdown-bUs2iTia.js +1 -0
- package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +141 -0
- package/dist/elements/chunks/external-link-6mA0wxab.js +1 -0
- package/dist/elements/chunks/file-text-DnaYk3Dm.js +1 -0
- package/dist/elements/chunks/file-tree-CgtRLlxK.js +1 -0
- package/dist/elements/chunks/github-dark-dimmed-DUshB20C.js +1 -0
- package/dist/elements/chunks/github-light-JYsPkUQd.js +1 -0
- package/dist/elements/chunks/hover-card-CIGw62gP.js +1 -0
- package/dist/elements/chunks/html-CPZ3oZQ7.js +1 -0
- package/dist/elements/chunks/index-CTBEJeo6.js +1 -0
- package/dist/elements/chunks/javascript-C25yR2R2.js +1 -0
- package/dist/elements/chunks/json-DxJze_jm.js +1 -0
- package/dist/elements/chunks/link-BlGSeoPy.js +1 -0
- package/dist/elements/chunks/loader-DvhR4qa0.js +1 -0
- package/dist/elements/chunks/markdown-CMTGx9r8.js +64 -0
- package/dist/elements/chunks/message-CDZwXjhL.js +1 -0
- package/dist/elements/chunks/message-feedback-CYx81QiA.js +1 -0
- package/dist/elements/chunks/model-switcher-O_tUhoOT.js +1 -0
- package/dist/elements/chunks/overlay-DydXYMQW.js +1 -0
- package/dist/elements/chunks/prompt-suggestion-ldlWV5kd.js +1 -0
- package/dist/elements/chunks/reasoning-2PUnHlmr.js +1 -0
- package/dist/elements/chunks/resizable-B5WNbSeb.js +1 -0
- package/dist/elements/chunks/star-t9tI-P0q.js +1 -0
- package/dist/elements/chunks/store-C6rIooZz.js +1 -0
- package/dist/elements/chunks/svelte--5p79yCD.js +1 -0
- package/dist/elements/chunks/text-shimmer-uh9V_KUh.js +1 -0
- package/dist/elements/chunks/textarea-3nm6Ia9U.js +1 -0
- package/dist/elements/chunks/thumbs-up-BBtguGld.js +1 -0
- package/dist/elements/chunks/toast-store-D8cL3fWl.js +1 -0
- package/dist/elements/chunks/tool-GJ3vwp1U.js +1 -0
- package/dist/elements/chunks/tooltip-DwKAz4XR.js +1 -0
- package/dist/elements/chunks/triangle-alert-Ct1zt2JL.js +1 -0
- package/dist/elements/chunks/tsx-B8rCNbgL.js +1 -0
- package/dist/elements/chunks/typescript-RycA9KXf.js +1 -0
- package/dist/elements/chunks/use-card-resolution-D-_0Alzy.js +1 -0
- package/dist/elements/chunks/video-mVYiM99-.js +1 -0
- package/dist/elements/chunks/vue-BmIZj4XD.js +1 -0
- package/dist/elements/chunks/x-CzxL27Ch.js +1 -0
- package/dist/elements/code-block.js +1 -0
- package/dist/elements/compare.js +1 -0
- package/dist/elements/confirm-card.js +1 -0
- package/dist/elements/context-meter.js +1 -0
- package/dist/elements/conversation-list.d.ts +1 -11
- package/dist/elements/conversation-list.js +1 -0
- package/dist/elements/embed.js +1 -0
- package/dist/elements/empty.js +1 -0
- package/dist/elements/feedback-bar.js +1 -0
- package/dist/elements/file-tree.js +1 -0
- package/dist/elements/file-upload.js +1 -0
- package/dist/elements/form.js +1 -0
- package/dist/elements/image.js +1 -0
- package/dist/elements/link-preview.js +1 -0
- package/dist/elements/loader.js +1 -0
- package/dist/elements/markdown.js +1 -0
- package/dist/elements/message-skills.d.ts +0 -16
- package/dist/elements/message-skills.js +1 -0
- package/dist/elements/message.js +1 -0
- package/dist/elements/model-switcher.d.ts +1 -11
- package/dist/elements/model-switcher.js +1 -0
- package/dist/elements/popover.js +1 -0
- package/dist/elements/prompt-input.d.ts +1 -9
- package/dist/elements/prompt-input.js +1 -0
- package/dist/elements/prompt-suggestions.d.ts +0 -6
- package/dist/elements/prompt-suggestions.js +1 -0
- package/dist/elements/reasoning.js +1 -0
- package/dist/elements/resizable.d.ts +1 -17
- package/dist/elements/resizable.js +1 -0
- package/dist/elements/response-stream.js +14 -0
- package/dist/elements/scroll-button.js +1 -0
- package/dist/elements/source.d.ts +0 -17
- package/dist/elements/source.js +1 -0
- package/dist/elements/switch.js +1 -0
- package/dist/elements/tasks.js +1 -0
- package/dist/elements/text-shimmer.js +1 -0
- package/dist/elements/thinking-bar.js +1 -0
- package/dist/elements/toast.d.ts +1 -0
- package/dist/elements/toast.js +1 -0
- package/dist/elements/tool.js +1 -0
- package/dist/elements/voice-input.js +1 -0
- package/dist/elements.d.ts +41 -5
- package/dist/index.d.ts +12 -0
- package/dist/index.js +11832 -9790
- package/dist/kitn-chat.es.js +1 -1
- package/dist/llms/llms-full.txt +57 -12
- package/dist/llms/llms.txt +3 -3
- package/dist/mcp.es.js +157 -1
- package/dist/primitives/card-contract.d.ts +20 -4
- package/dist/primitives/card-recovery.d.ts +55 -0
- package/dist/primitives/message-feedback.d.ts +35 -0
- package/dist/primitives/toast-store.d.ts +88 -0
- package/dist/react/index.d.ts +83 -3
- package/dist/react.js +90 -80
- package/dist/register-JyTglR6m.js +1 -0
- package/dist/register-impl-C6wlSsts.js +77 -0
- package/dist/schemas/choice.schema.json +5 -0
- package/dist/schemas/tasks.schema.json +5 -0
- package/dist/ui/tooltip.d.ts +1 -0
- package/frameworks/react/index.tsx +63 -11
- package/llms-full.txt +57 -12
- package/llms.txt +3 -3
- package/package.json +15 -6
- package/src/agent-tooling/mcp/tools/debug.ts +184 -0
- package/src/agent-tooling/mcp/tools/scaffold.ts +133 -1
- package/src/components/chat-thread.tsx +27 -35
- package/src/components/choice-card.tsx +33 -4
- package/src/components/component-meta.json +250 -26
- package/src/components/confirm-card.tsx +15 -1
- package/src/components/dismissed-stub.tsx +80 -0
- package/src/components/form.tsx +21 -3
- package/src/components/message.tsx +151 -10
- package/src/components/response-compare-types.ts +127 -0
- package/src/components/response-compare.tsx +431 -0
- package/src/components/tasks-card.tsx +33 -3
- package/src/components/toast.tsx +398 -0
- package/src/components/use-card-resolution.ts +24 -8
- package/src/elements/autoloader.ts +89 -0
- package/src/elements/chat-types.ts +7 -0
- package/src/elements/chat-workspace.tsx +4 -2
- package/src/elements/chat.tsx +4 -2
- package/src/elements/compare.tsx +88 -0
- package/src/elements/compiled.css +1 -1
- package/src/elements/element-manifest.json +182 -0
- package/src/elements/element-meta.json +191 -68
- package/src/elements/element-types.d.ts +41 -5
- package/src/elements/framework-usage.json +25 -0
- package/src/elements/message.tsx +27 -45
- package/src/elements/register-impl.ts +3 -0
- package/src/elements/register.ts +9 -0
- package/src/elements/remote.tsx +4 -0
- package/src/elements/styles.css +19 -0
- package/src/elements/toast.tsx +74 -0
- package/src/index.ts +30 -0
- package/src/primitives/card-contract.ts +14 -5
- package/src/primitives/card-recovery.ts +149 -0
- package/src/primitives/card-routing.ts +3 -0
- package/src/primitives/card-schemas/choice.schema.json +5 -0
- package/src/primitives/card-schemas/tasks.schema.json +5 -0
- package/src/primitives/message-feedback.ts +123 -0
- package/src/primitives/toast-store.ts +235 -0
- package/src/ui/tooltip.tsx +8 -2
- package/dist/elements/chat-types.d.ts +0 -41
- package/dist/elements/css.d.ts +0 -1
- package/dist/elements/default-input.d.ts +0 -40
- package/dist/elements/define.d.ts +0 -42
- package/dist/elements/register-impl.d.ts +0 -0
- package/dist/elements/register.d.ts +0 -3
- package/dist/register-impl-wCsFPoh9.js +0 -77
- package/dist/register-ujhr1nBS.js +0 -1
- /package/dist/elements/{remote.d.ts → compare.d.ts} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var ze=Object.defineProperty,Ae=(n,e,t)=>e in n?ze(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,f=(n,e,t)=>Ae(n,typeof e!="symbol"?e+"":e,t);import{s as ve,x as Pe,e as se,i as _e,c as z,B as Le,M as le,F as Ie,h as ie,k as Ce,j as Ee,H as Be,t as qe}from"./cn-Dogu6PbV.js";import{C as Ze,a as De}from"./code-block-BYUmfFSd.js";function X(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=X();function ae(n){A=n}var v={exec:()=>null};function _(n){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),r=e[s];return r||(r=n(s),e[s]=r),r}}function k(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(w.caret,"$1"),t=t.replace(r,a),s},getRegex:()=>new RegExp(t,e)};return s}var Me=((n="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+n)}catch{return!1}})(),w={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(n=>new RegExp(`^ {0,${n}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(n=>new RegExp(`^ {0,${n}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:_(n=>new RegExp(`^ {0,${n}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(n=>new RegExp(`^ {0,${n}}#`)),htmlBeginRegex:_(n=>new RegExp(`^ {0,${n}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:_(n=>new RegExp(`^ {0,${n}}>`))},Qe=/^(?:[ \t]*(?:\n|$))+/,je=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,He=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,C=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,F=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=k(oe).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ne=k(oe).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),W=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ge=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Xe=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),Z="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",J=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,We=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",J).replace("tag",Z).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=k(W).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex(),Ue=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",he).getRegex(),K={blockquote:Ue,code:je,def:Xe,fences:He,heading:Oe,hr:C,html:We,lheading:ce,list:Fe,newline:Qe,paragraph:he,table:v,text:Ge},pe=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex(),Je={...K,lheading:Ne,table:pe,paragraph:k(W).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex()},Ke={...K,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",J).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:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(W).replace("hr",C).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ye=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,et=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,L=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,tt=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),ge=/(?!~)[\p{P}\p{S}]/u,nt=/(?!~)[\s\p{P}\p{S}]/u,rt=/(?:[^\s\p{P}\p{S}]|~)/u,st=k(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Me?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ke=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,lt=k(ke,"u").replace(/punct/g,L).getRegex(),it=k(ke,"u").replace(/punct/g,ge).getRegex(),de="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",at=k(de,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,D).replace(/punct/g,L).getRegex(),ot=k(de,"gu").replace(/notPunctSpace/g,rt).replace(/punctSpace/g,nt).replace(/punct/g,ge).getRegex(),ct=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,D).replace(/punct/g,L).getRegex(),ht=k(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,L).getRegex(),pt="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ut=k(pt,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,D).replace(/punct/g,L).getRegex(),gt=k(/\\(punct)/,"gu").replace(/punct/g,L).getRegex(),kt=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),dt=k(J).replace("(?:-->|$)","-->").getRegex(),ft=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",dt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),M=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,xt=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",M).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fe=k(/^!?\[(label)\]\[(ref)\]/).replace("label",M).replace("ref",U).getRegex(),xe=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),bt=k("reflink|nolink(?!\\()","g").replace("reflink",fe).replace("nolink",xe).getRegex(),be=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Y={_backpedal:v,anyPunctuation:gt,autolink:kt,blockSkip:st,br:ue,code:Ye,del:v,delLDelim:v,delRDelim:v,emStrongLDelim:lt,emStrongRDelimAst:at,emStrongRDelimUnd:ct,escape:Ve,link:xt,nolink:xe,punctuation:tt,reflink:fe,reflinkSearch:bt,tag:ft,text:et,url:v},wt={...Y,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",M).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",M).getRegex()},ee={...Y,emStrongRDelimAst:ot,emStrongLDelim:it,delLDelim:ht,delRDelim:ut,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",be).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",be).getRegex()},mt={...ee,br:k(ue).replace("{2,}","*").getRegex(),text:k(ee.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:K,gfm:Je,pedantic:Ke},E={normal:Y,gfm:ee,breaks:mt,pedantic:wt},yt={"&":"&","<":"<",">":">",'"':""","'":"'"},we=n=>yt[n];function S(n,e){if(e){if(w.escapeTest.test(n))return n.replace(w.escapeReplace,we)}else if(w.escapeTestNoEncode.test(n))return n.replace(w.escapeReplaceNoEncode,we);return n}function me(n){try{n=encodeURI(n).replace(w.percentDecode,"%")}catch{return null}return n}function ye(n,e){var t;let s=n.replace(w.findPipe,(a,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),r=s.split(w.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((t=r.at(-1))!=null&&t.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(w.slashPipe,"|");return r}function R(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s&&n.charAt(s-r-1)===e;)r++;return n.slice(0,s-r)}function $e(n){let e=n.split(`
|
|
3
|
+
`),t=e.length-1;for(;t>=0&&w.blankLine.test(e[t]);)t--;return e.length-t<=2?n:e.slice(0,t+1).join(`
|
|
4
|
+
`)}function $t(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function St(n,e=0){let t=e,s="";for(let r of n)if(r===" "){let i=4-t%4;s+=" ".repeat(i),t+=i}else s+=r,t++;return s}function Se(n,e,t,s,r){let i=e.href,a=e.title||null,o=n[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:a,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,l}function Rt(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
5
|
+
`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=r.length?i.slice(r.length):i}).join(`
|
|
6
|
+
`)}var j=class{constructor(n){f(this,"options"),f(this,"rules"),f(this,"lexer"),this.options=n||A}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=this.options.pedantic?e[0]:$e(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],s=Rt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=R(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:R(e[0],`
|
|
7
|
+
`),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:R(e[0],`
|
|
8
|
+
`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=R(e[0],`
|
|
9
|
+
`).split(`
|
|
10
|
+
`),s="",r="",i=[];for(;t.length>0;){let a=!1,o=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))o.push(t[l]),a=!0;else if(!a)o.push(t[l]);else break;t=t.slice(l);let h=o.join(`
|
|
11
|
+
`),c=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
12
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
13
|
+
${h}`:h,r=r?`${r}
|
|
14
|
+
${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=u,t.length===0)break;let g=i.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let b=g,p=b.raw+`
|
|
15
|
+
`+t.join(`
|
|
16
|
+
`),m=this.blockquote(p);i[i.length-1]=m,s=s.substring(0,s.length-b.raw.length)+m.raw,r=r.substring(0,r.length-b.text.length)+m.text;break}else if(g?.type==="list"){let b=g,p=b.raw+`
|
|
17
|
+
`+t.join(`
|
|
18
|
+
`),m=this.list(p);i[i.length-1]=m,s=s.substring(0,s.length-g.raw.length)+m.raw,r=r.substring(0,r.length-b.raw.length)+m.raw,t=p.substring(i.at(-1).raw.length).split(`
|
|
19
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),s=t.length>1,r={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let i=this.rules.other.listItemRegex(t),a=!1;for(;n;){let l=!1,h="",c="";if(!(e=i.exec(n))||this.rules.block.hr.test(n))break;h=e[0],n=n.substring(h.length);let u=St(e[2].split(`
|
|
20
|
+
`,1)[0],e[1].length),g=n.split(`
|
|
21
|
+
`,1)[0],b=!u.trim(),p=0;if(this.options.pedantic?(p=2,c=u.trimStart()):b?p=e[1].length+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,c=u.slice(p),p+=e[1].length),b&&this.rules.other.blankLine.test(g)&&(h+=g+`
|
|
22
|
+
`,n=n.substring(g.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(p),x=this.rules.other.hrRegex(p),q=this.rules.other.fencesBeginRegex(p),T=this.rules.other.headingBeginRegex(p),N=this.rules.other.htmlBeginRegex(p),Te=this.rules.other.blockquoteBeginRegex(p);for(;n;){let G=n.split(`
|
|
23
|
+
`,1)[0],I;if(g=G,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),I=g):I=g.replace(this.rules.other.tabCharGlobal," "),q.test(g)||T.test(g)||N.test(g)||Te.test(g)||m.test(g)||x.test(g))break;if(I.search(this.rules.other.nonSpaceChar)>=p||!g.trim())c+=`
|
|
24
|
+
`+I.slice(p);else{if(b||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||q.test(u)||T.test(u)||x.test(u))break;c+=`
|
|
25
|
+
`+g}b=!g.trim(),h+=G+`
|
|
26
|
+
`,n=n.substring(G.length+1),u=I.slice(p)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0)),r.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=h}let o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let h=l.tokens[0];if(l.task&&(h?.type==="text"||h?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let u={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=u.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=u.raw+l.tokens[0].raw,l.tokens[0].text=u.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(u)):l.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):l.tokens.unshift(u)}}else l.task&&(l.task=!1);if(!r.loose){let c=l.tokens.filter(g=>g.type==="space"),u=c.length>0&&c.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=u}}if(r.loose)for(let l of r.items){l.loose=!0;for(let h of l.tokens)h.type==="text"&&(h.type="paragraph")}return r}}html(n){let e=this.rules.block.html.exec(n);if(e){let t=$e(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:R(e[0],`
|
|
27
|
+
`),href:s,title:r}}}table(n){var e;let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=ye(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(e=t[3])!=null&&e.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
28
|
+
`):[],a={type:"table",raw:R(t[0],`
|
|
29
|
+
`),header:[],align:[],rows:[]};if(s.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<s.length;o++)a.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:a.align[o]});for(let o of i)a.rows.push(ye(o,a.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[h]})));return a}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e){let t=e[1].trim();return{type:"heading",raw:R(e[0],`
|
|
30
|
+
`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
31
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=R(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=$t(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Se(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Se(t,r,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,i,a,o=r,l=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*n.length+r);(s=h.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){o+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let c=[...s[0]][0].length,u=n.slice(0,r+s.index+c+a);if(Math.min(r,a)%2){let b=u.slice(1,-1);return{type:"em",raw:u,text:b,tokens:this.lexer.inlineTokens(b)}}let g=u.slice(2,-2);return{type:"strong",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n,e,t=""){let s=this.rules.inline.delLDelim.exec(n);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let r=[...s[0]].length-1,i,a,o=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*n.length+r);(s=l.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==r))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let h=[...s[0]][0].length,c=n.slice(0,r+s.index+h+a),u=c.slice(r,-r);return{type:"del",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(n){var e;let t;if(t=this.rules.inline.url.exec(n)){let s,r;if(t[2]==="@")s=t[0],r="mailto:"+s;else{let i;do i=t[0],t[0]=((e=this.rules.inline._backpedal.exec(t[0]))==null?void 0:e[0])??"";while(i!==t[0]);s=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class ne{constructor(e){f(this,"tokens"),f(this,"options"),f(this,"state"),f(this,"inlineQueue"),f(this,"tokenizer"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||A,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:w,block:Q.normal,inline:E.normal};this.options.pedantic?(t.block=Q.pedantic,t.inline=E.pedantic):this.options.gfm&&(t.block=Q.gfm,this.options.breaks?t.inline=E.breaks:t.inline=E.gfm),this.tokenizer.rules=t}static get rules(){return{block:Q,inline:E}}static lex(e,t){return new ne(t).lex(e)}static lexInline(e,t){return new ne(t).inlineTokens(e)}lex(e){e=e.replace(w.carriageReturn,`
|
|
32
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var r,i,a;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(w.tabCharGlobal," ").replace(w.spaceLine,""));let o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let l;if((i=(r=this.options.extensions)==null?void 0:r.block)!=null&&i.some(c=>(l=c.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let c=t.at(-1);l.raw.length===1&&c!==void 0?c.raw+=`
|
|
33
|
+
`:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let c=t.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
34
|
+
`)?"":`
|
|
35
|
+
`)+l.raw,c.text+=`
|
|
36
|
+
`+l.text,this.inlineQueue.at(-1).src=c.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let c=t.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
37
|
+
`)?"":`
|
|
38
|
+
`)+l.raw,c.text+=`
|
|
39
|
+
`+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let h=e;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,u=e.slice(1),g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},u),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(h=e.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(h))){let c=t.at(-1);s&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
40
|
+
`)?"":`
|
|
41
|
+
`)+l.raw,c.text+=`
|
|
42
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):t.push(l),s=h.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let c=t.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
43
|
+
`)?"":`
|
|
44
|
+
`)+l.raw,c.text+=`
|
|
45
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var s,r,i,a,o;this.tokenizer.lexer=this;let l=e,h=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(h=this.tokenizer.rules.inline.reflinkSearch.exec(l))!==null;)p.includes(h[0].slice(h[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,h.index)+"["+"a".repeat(h[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(h=this.tokenizer.rules.inline.anyPunctuation.exec(l))!==null;)l=l.slice(0,h.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let c;for(;(h=this.tokenizer.rules.inline.blockSkip.exec(l))!==null;)c=h[2]?h[2].length:0,l=l.slice(0,h.index+c)+"["+"a".repeat(h[0].length-c-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=((r=(s=this.options.hooks)==null?void 0:s.emStrongMask)==null?void 0:r.call({lexer:this},l))??l;let u=!1,g="",b=1/0;for(;e;){if(e.length<b)b=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}u||(g=""),u=!1;let p;if((a=(i=this.options.extensions)==null?void 0:i.inline)!=null&&a.some(x=>(p=x.call({lexer:this},e,t))?(e=e.substring(p.raw.length),t.push(p),!0):!1))continue;if(p=this.tokenizer.escape(e)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.tag(e)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.link(e)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(p.raw.length);let x=t.at(-1);p.type==="text"&&x?.type==="text"?(x.raw+=p.raw,x.text+=p.text):t.push(p);continue}if(p=this.tokenizer.emStrong(e,l,g)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.codespan(e)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.br(e)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.del(e,l,g)){e=e.substring(p.raw.length),t.push(p);continue}if(p=this.tokenizer.autolink(e)){e=e.substring(p.raw.length),t.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(e))){e=e.substring(p.raw.length),t.push(p);continue}let m=e;if((o=this.options.extensions)!=null&&o.startInline){let x=1/0,q=e.slice(1),T;this.options.extensions.startInline.forEach(N=>{T=N.call({lexer:this},q),typeof T=="number"&&T>=0&&(x=Math.min(x,T))}),x<1/0&&x>=0&&(m=e.substring(0,x+1))}if(p=this.tokenizer.inlineText(m)){e=e.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(g=p.raw.slice(-1)),u=!0;let x=t.at(-1);x?.type==="text"?(x.raw+=p.raw,x.text+=p.text):t.push(p);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},H=class{constructor(n){f(this,"options"),f(this,"parser"),this.options=n||A}space(n){return""}code({text:n,lang:e,escaped:t}){var s;let r=(s=(e||"").match(w.notSpaceStart))==null?void 0:s[0],i=n.replace(w.endingNewline,"")+`
|
|
46
|
+
`;return r?'<pre><code class="language-'+S(r)+'">'+(t?i:S(i,!0))+`</code></pre>
|
|
47
|
+
`:"<pre><code>"+(t?i:S(i,!0))+`</code></pre>
|
|
48
|
+
`}blockquote({tokens:n}){return`<blockquote>
|
|
49
|
+
${this.parser.parse(n)}</blockquote>
|
|
50
|
+
`}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
|
|
51
|
+
`}hr(n){return`<hr>
|
|
52
|
+
`}list(n){let e=n.ordered,t=n.start,s="";for(let a=0;a<n.items.length;a++){let o=n.items[a];s+=this.listitem(o)}let r=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+r+i+`>
|
|
53
|
+
`+s+"</"+r+`>
|
|
54
|
+
`}listitem(n){return`<li>${this.parser.parse(n.tokens)}</li>
|
|
55
|
+
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
|
56
|
+
`}table(n){let e="",t="";for(let r=0;r<n.header.length;r++)t+=this.tablecell(n.header[r]);e+=this.tablerow({text:t});let s="";for(let r=0;r<n.rows.length;r++){let i=n.rows[r];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
57
|
+
<thead>
|
|
58
|
+
`+e+`</thead>
|
|
59
|
+
`+s+`</table>
|
|
60
|
+
`}tablerow({text:n}){return`<tr>
|
|
61
|
+
${n}</tr>
|
|
62
|
+
`}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
|
|
63
|
+
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${S(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let s=this.parser.parseInline(t),r=me(n);if(r===null)return s;n=r;let i='<a href="'+n+'"';return e&&(i+=' title="'+S(e)+'"'),i+=">"+s+"</a>",i}image({href:n,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let r=me(n);if(r===null)return S(t);n=r;let i=`<img src="${n}" alt="${S(t)}"`;return e&&(i+=` title="${S(e)}"`),i+=">",i}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:S(n.text)}},te=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},$=class re{constructor(e){f(this,"options"),f(this,"renderer"),f(this,"textRenderer"),this.options=e||A,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new te}static parse(e,t){return new re(t).parse(e)}static parseInline(e,t){return new re(t).parseInline(e)}parse(e){var t,s;this.renderer.parser=this;let r="";for(let i=0;i<e.length;i++){let a=e[i];if((s=(t=this.options.extensions)==null?void 0:t.renderers)!=null&&s[a.type]){let l=a,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){r+=h||"";continue}}let o=a;switch(o.type){case"space":{r+=this.renderer.space(o);break}case"hr":{r+=this.renderer.hr(o);break}case"heading":{r+=this.renderer.heading(o);break}case"code":{r+=this.renderer.code(o);break}case"table":{r+=this.renderer.table(o);break}case"blockquote":{r+=this.renderer.blockquote(o);break}case"list":{r+=this.renderer.list(o);break}case"checkbox":{r+=this.renderer.checkbox(o);break}case"html":{r+=this.renderer.html(o);break}case"def":{r+=this.renderer.def(o);break}case"paragraph":{r+=this.renderer.paragraph(o);break}case"text":{r+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(e,t=this.renderer){var s,r;this.renderer.parser=this;let i="";for(let a=0;a<e.length;a++){let o=e[a];if((r=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&r[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let l=o;switch(l.type){case"escape":{i+=t.text(l);break}case"html":{i+=t.html(l);break}case"link":{i+=t.link(l);break}case"image":{i+=t.image(l);break}case"checkbox":{i+=t.checkbox(l);break}case"strong":{i+=t.strong(l);break}case"em":{i+=t.em(l);break}case"codespan":{i+=t.codespan(l);break}case"br":{i+=t.br(l);break}case"del":{i+=t.del(l);break}case"text":{i+=t.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},O,B=(O=class{constructor(n){f(this,"options"),f(this,"block"),this.options=n||A}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(n=this.block){return n?y.lex:y.lexInline}provideParser(n=this.block){return n?$.parse:$.parseInline}},f(O,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),f(O,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),O),Tt=class{constructor(...n){f(this,"defaults",X()),f(this,"options",this.setOptions),f(this,"parse",this.parseMarkdown(!0)),f(this,"parseInline",this.parseMarkdown(!1)),f(this,"Parser",$),f(this,"Renderer",H),f(this,"TextRenderer",te),f(this,"Lexer",y),f(this,"Tokenizer",j),f(this,"Hooks",B),this.use(...n)}walkTokens(n,e){var t,s;let r=[];for(let i of n)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of a.rows)for(let l of o)r=r.concat(this.walkTokens(l.tokens,e));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,e));break}default:{let a=i;(s=(t=this.defaults.extensions)==null?void 0:t.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);r=r.concat(this.walkTokens(l,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),t.renderer){let r=this.defaults.renderer||new H(this.defaults);for(let i in t.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=t.renderer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c||""}}s.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new j(this.defaults);for(let i in t.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=t.tokenizer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}s.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new B;for(let i in t.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,o=t.hooks[a],l=r[a];B.passThroughHooks.has(i)?r[a]=h=>{if(this.defaults.async&&B.passThroughHooksRespectAsync.has(i))return(async()=>{let u=await o.call(r,h);return l.call(r,u)})();let c=o.call(r,h);return l.call(r,c)}:r[a]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await o.apply(r,h);return u===!1&&(u=await l.apply(r,h)),u})();let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}s.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(a){let o=[];return o.push(i.call(this,a)),r&&(o=o.concat(r.call(this,a))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return y.lex(n,e??this.defaults)}parser(n,e){return $.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let s={...t},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=n),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,o=await(r.hooks?await r.hooks.provideLexer(n):n?y.lex:y.lexInline)(a,r),l=r.hooks?await r.hooks.processAllTokens(o):o;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let h=await(r.hooks?await r.hooks.provideParser(n):n?$.parse:$.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(h):h})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(n):n?y.lex:y.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let o=(r.hooks?r.hooks.provideParser(n):n?$.parse:$.parseInline)(a,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(a){return i(a)}}}onError(n,e){return t=>{if(t.message+=`
|
|
64
|
+
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+S(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},P=new Tt;function d(n,e){return P.parse(n,e)}d.options=d.setOptions=function(n){return P.setOptions(n),d.defaults=P.defaults,ae(d.defaults),d},d.getDefaults=X,d.defaults=A,d.use=function(...n){return P.use(...n),d.defaults=P.defaults,ae(d.defaults),d},d.walkTokens=function(n,e){return P.walkTokens(n,e)},d.parseInline=P.parseInline,d.Parser=$,d.parser=$.parse,d.Renderer=H,d.TextRenderer=te,d.Lexer=y,d.lexer=y.lex,d.Tokenizer=j,d.Hooks=B,d.parse=d,d.options,d.setOptions,d.use,d.walkTokens,d.parseInline,$.parse,y.lex;var Re=qe("<div>");d.setOptions({gfm:!0,breaks:!0});function zt(n){return d.lexer(n).map(e=>e.type==="code"?{type:"code",content:e.text,language:e.lang||void 0}:{type:"markdown",content:e.raw})}function At(n){const e=se(()=>{try{return d.parse(n.content,{async:!1})}catch{return n.content}});return(()=>{var t=Re();return ie(()=>t.innerHTML=e()),t})()}function vt(n){const[e]=ve(n,["content","id","class","codeTheme"]),t=Pe(),s=se(()=>zt(e.content));return(()=>{var r=Re();return _e(r,z(Ie,{get each(){return s()},children:i=>z(Le,{get children(){return[z(le,{get when(){return i.type==="code"},get children(){return z(Ze,{class:"my-4",get children(){return z(De,{get code(){return i.content},get language(){return i.language},get theme(){return e.codeTheme??t.codeTheme()}})}})}}),z(le,{get when(){return i.type==="markdown"},get children(){return z(At,{get content(){return i.content}})}})]}})})),ie(()=>Ce(r,Ee("chat-markdown max-w-none break-words whitespace-normal [&>div:first-child>p:first-child]:mt-0 [&>div:last-child>p:last-child]:mb-0",Be(t.proseSize()),e.class))),r})()}export{vt as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as B,c as t,S as c,F as m,s as v,f as p,m as b,j as s,i as u,h as w,g as k,k as A,x as M,t as h,H as S,n as T}from"./cn-Dogu6PbV.js";import{T as U}from"./tooltip-DwKAz4XR.js";import{M as H}from"./markdown-CMTGx9r8.js";import{B as P}from"./button-CKyYD9G4.js";import{B as q,a as I}from"./action-icons-PVfIvcuG.js";import{R as D,a as E,b as G}from"./reasoning-2PUnHlmr.js";import{T as J}from"./tool-GJ3vwp1U.js";import{A as K,a as L,d as N,e as O}from"./attachments-Dp6vqtrc.js";import{c as Q}from"./check-CDYaMYrM.js";var f=h("<div>"),V=h('<img class="h-full w-full object-cover">'),W=h('<div class="flex h-full w-full items-center justify-center bg-muted text-xs font-medium text-muted-foreground">'),X=h('<span class="px-1 text-xs">'),Y=h('<span><span class="min-w-0 overflow-hidden">');function Z(r){const[e,n]=v(r,["children","class"]);return(()=>{var a=f();return p(a,b({get class(){return s("flex items-start gap-3",e.class)}},n),!1,!0),u(a,()=>e.children),a})()}function _(r){return(()=>{var e=f();return u(e,t(c,{get when(){return r.src},get fallback(){return t(c,{get when(){return r.fallback},get children(){var n=W();return u(n,()=>r.fallback),n}})},get children(){var n=V();return w(a=>{var l=r.src,i=r.alt;return l!==a.e&&k(n,"src",a.e=l),i!==a.t&&k(n,"alt",a.t=i),a},{e:void 0,t:void 0}),n}})),w(()=>A(e,s("h-8 w-8 shrink-0 overflow-hidden rounded-full",r.class))),e})()}function $(r){const[e,n]=v(r,["children","markdown","class"]),a=M(),l=()=>s("min-w-0 rounded-lg p-2 text-foreground bg-secondary max-w-none break-words whitespace-normal",S(a.proseSize()),e.class);return t(c,{get when(){return e.markdown},get fallback(){return(()=>{var i=f();return p(i,b({get class(){return l()}},n),!1,!0),u(i,()=>e.children),i})()},get children(){return t(H,{get content(){return e.children},get class(){return l()}})}})}function rr(r){const[e,n]=v(r,["children","class"]);return(()=>{var a=f();return p(a,b({get class(){return s("flex items-center gap-0.5 mt-0.5",e.class)}},n),!1,!0),u(a,()=>e.children),a})()}function er(r){return typeof r=="string"?{id:r,label:q[r],Icon:I(r)}:{id:r.id,label:r.label,Icon:I(r.icon)}}function tr(r){return r==="like"||r==="dislike"?r:void 0}function nr(r){return t(rr,{get class(){return s("mt-1 flex gap-0",r.reveal==="hover"&&"opacity-0 transition-opacity group-hover:opacity-100",r.class)},get children(){return t(m,{get each(){return r.actions},children:e=>{const n=er(e),a=()=>typeof e!="string"&&e.tooltip?e.tooltip:n.label,l=tr(e),i=()=>l!==void 0&&r.activeFeedback===l,C=n.id==="copy",x=()=>C&&r.copied===!0,y=()=>t(P,{variant:"ghost",size:"icon-sm",get class(){return s("rounded-full",i()&&"text-primary")},get"data-action"(){return n.id},get"aria-label"(){return T(()=>!!x())()?"Copied":n.label},get"aria-pressed"(){return l!==void 0?i():void 0},onClick:()=>r.onAction(n.id),get children(){return t(c,{get when(){return x()},get fallback(){return t(c,{get when(){return n.Icon},get fallback(){return(()=>{var o=X();return u(o,()=>n.label),o})()},children:o=>{const d=o();return t(d,{get class(){return s("size-3.5",i()&&"fill-current")}})}})},get children(){return t(Q,{class:"size-3.5 text-emerald-400"})}})}}),F=()=>t(c,{get when(){return n.Icon},get fallback(){return y()},get children(){return t(U,{get content(){return a()},get children(){return y()}})}});return t(c,{when:l!==void 0,get fallback(){return F()},get children(){return(()=>{const o=()=>r.activeFeedback===void 0||r.activeFeedback===l;return(()=>{var d=Y(),R=d.firstChild;return u(R,F),w(g=>{var j=o()?void 0:"",z=s("grid transition-[grid-template-columns,opacity] duration-300 ease-out",o()?"grid-cols-[1fr] opacity-100":"grid-cols-[0fr] opacity-0");return j!==g.e&&k(d,"data-feedback-collapsed",g.e=j),z!==g.t&&A(d,g.t=z),g},{e:void 0,t:void 0}),d})()})()}})}})}})}function ar(r){return[t(c,{get when(){return r.reasoning},children:e=>t(D,{class:"mb-2 w-full",get children(){return[t(E,{get children(){return e().label??"Reasoning"}}),t(G,{markdown:!0,get children(){return e().text}})]}})}),t(m,{get each(){return r.tools??[]},children:e=>t(J,{toolPart:e,class:"mb-2 w-full"})}),t(c,{get when(){var e;return(e=r.attachments)==null?void 0:e.length},get children(){return t(K,{variant:"inline",get class(){return r.isUser?"mb-2 justify-end":"mb-2"},get children(){return t(m,{get each(){return r.attachments},children:e=>t(L,{data:e,get children(){return[t(N,{}),t(O,{})]}})})}})}}),t($,{get markdown(){return r.markdown},get class(){return r.isUser?"bg-muted text-primary max-w-[85%] rounded-2xl px-4 py-2":"bg-transparent p-0"},get children(){return r.content}}),t(c,{get when(){var e;return(((e=r.actions)==null?void 0:e.length)??0)>0},get children(){return t(nr,{get actions(){return r.actions},get reveal(){return r.actionsReveal==="hover"?"hover":"always"},get activeFeedback(){return r.activeFeedback},get copied(){return r.copied},onAction:e=>{var n;return(n=r.onAction)==null?void 0:n.call(r,e)}})}})]}B(["click"]);export{ar as M,Z as a,_ as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,p as v}from"./cn-Dogu6PbV.js";import{t as u}from"./toast-store-D8cL3fWl.js";const b=2e3;function T(r){const[m,f]=l({}),[g,a]=l(new Set),p=r.copiedDuration??b,n=new Map;v(()=>{n.forEach(e=>clearTimeout(e)),n.clear()});const d=e=>e.feedback??m()[e.id],h=e=>g().has(e),k=e=>{a(o=>{const i=new Set(o);return i.add(e),i});const t=n.get(e);t&&clearTimeout(t),n.set(e,setTimeout(()=>{n.delete(e),a(o=>{if(!o.has(e))return o;const i=new Set(o);return i.delete(e),i})},p))},c=(e,t)=>{f(o=>{const i={...o};return t===void 0?delete i[e]:i[e]=t,i})};return{resolveFeedback:d,isCopied:h,handleAction:(e,t)=>{var o,i,s;if(t==="copy"){try{(o=navigator.clipboard)==null||o.writeText(e.content)}catch{}k(e.id),u("Copied to clipboard",{target:(i=r.target)==null?void 0:i.call(r)}),r.emit({messageId:e.id,action:t});return}if(t==="like"||t==="dislike"){d(e)===t?(c(e.id,void 0),r.emit({messageId:e.id,action:t,state:"off"})):(c(e.id,t),u("Thanks for your feedback",{target:(s=r.target)==null?void 0:s.call(r)}),r.emit({messageId:e.id,action:t,state:"on"}));return}r.emit({messageId:e.id,action:t})}}}export{T as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as b,s as I,c as r,m as y,n as k,j as m,F as h,a as j,i as d,S as p,h as f,g as M,k as B,t as a}from"./cn-Dogu6PbV.js";import{c as S,D as z,a as D,b as F}from"./dropdown-bUs2iTia.js";import{B as $}from"./button-CKyYD9G4.js";var A=a('<svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><polyline points="6 9 12 15 18 9">'),E=a('<span class="text-caption text-muted-foreground">'),P=a('<div class="flex flex-col"><span>'),R=a("<div class=pl-2>"),T=a('<div><button type=button class="flex w-full items-center justify-between rounded-md px-2 py-1.5 text-body outline-none transition-colors hover:bg-muted focus:bg-muted">');const x=o=>(()=>{var e=A();return f(()=>M(e,"class",o.class)),e})();function w(o){const e=()=>o.model.description??o.model.provider;return r(F,{onSelect:()=>o.onModelChange(o.model.id),get children(){var s=P(),u=s.firstChild;return d(u,()=>o.model.name),d(s,r(p,{get when(){return e()},get children(){var c=E();return d(c,e),c}}),null),f(()=>B(u,m("text-body",o.model.id===o.currentModelId&&"font-medium text-foreground"))),s}})}function _(o){const[e]=I(o,["models","currentModelId","onModelChange","class"]),s=()=>e.models.find(t=>t.id===e.currentModelId),u=()=>e.models.filter(t=>!t.group),c=()=>{const t=[],n=new Map;for(const l of e.models)l.group&&(n.has(l.group)||(n.set(l.group,[]),t.push(l.group)),n.get(l.group).push(l));return t.map(l=>({name:l,models:n.get(l)}))};return r(p,{get when(){return e.models.length>1},get children(){return r(S,{get children(){return[r(z,{as:t=>r($,y({variant:"ghost",size:"sm",get class(){return m("gap-1 text-meta text-muted-foreground",e.class)}},t,{get children(){return[k(()=>{var n;return((n=s())==null?void 0:n.name)??e.currentModelId}),r(x,{})]}}))}),r(D,{get children(){return[r(h,{get each(){return u()},children:t=>r(w,{model:t,get currentModelId(){return e.currentModelId},get onModelChange(){return e.onModelChange}})}),r(h,{get each(){return c()},children:t=>{const[n,l]=j(!1);return(()=>{var g=T(),i=g.firstChild;return i.$$click=()=>l(!n()),d(i,()=>t.name,null),d(i,r(x,{get class(){return m("transition-transform",n()&&"rotate-180")}}),null),d(g,r(p,{get when(){return n()},get children(){var v=R();return d(v,r(h,{get each(){return t.models},children:C=>r(w,{model:C,get currentModelId(){return e.currentModelId},get onModelChange(){return e.onModelChange}})})),v}}),null),f(()=>M(i,"aria-expanded",n())),g})()}})]}})]}})}})}b(["click"]);export{_ as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as It,c as _t,m as jt,D as Xt,a as Q,b as ut,p as dt}from"./cn-Dogu6PbV.js";const Yt=["top","right","bottom","left"],j=Math.min,$=Math.max,ot=Math.round,it=Math.floor,A=t=>({x:t,y:t}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t,e,n){return $(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Et(t){return t==="x"?"y":"x"}function ht(t){return t==="y"?"height":"width"}function W(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function pt(t){return Et(W(t))}function Kt(t,e,n){n===void 0&&(n=!1);const o=tt(t),i=pt(t),c=ht(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[c]>e.floating[c]&&(r=rt(r)),[r,rt(r)]}function Ut(t){const e=rt(t);return[gt(t),e,gt(e)]}function gt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Lt=["left","right"],Ot=["right","left"],Zt=["top","bottom"],Jt=["bottom","top"];function Qt(t,e,n){switch(t){case"top":case"bottom":return n?e?Ot:Lt:e?Lt:Ot;case"left":case"right":return e?Zt:Jt;default:return[]}}function te(t,e,n,o){const i=tt(t);let c=Qt(q(t),n==="start",o);return i&&(c=c.map(r=>r+"-"+i),e&&(c=c.concat(c.map(gt)))),c}function rt(t){const e=q(t);return Gt[e]+t.slice(e.length)}function ee(t){return{top:0,right:0,bottom:0,left:0,...t}}function Tt(t){return typeof t!="number"?ee(t):{top:t,right:t,bottom:t,left:t}}function ct(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function At(t,e,n){let{reference:o,floating:i}=t;const c=W(e),r=pt(e),l=ht(r),s=q(e),a=c==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[l]/2-i[l]/2;let f;switch(s){case"top":f={x:u,y:o.y-i.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-i.width,y:d};break;default:f={x:o.x,y:o.y}}switch(tt(e)){case"start":f[r]-=m*(n&&a?-1:1);break;case"end":f[r]+=m*(n&&a?-1:1);break}return f}async function ne(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:c,rects:r,elements:l,strategy:s}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:f=0}=X(e,t),h=Tt(f),p=l[m?d==="floating"?"reference":"floating":d],w=ct(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(p)))==null||n?p:p.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:s})),y=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l.floating)),x=await(c.isElement==null?void 0:c.isElement(g))?await(c.getScale==null?void 0:c.getScale(g))||{x:1,y:1}:{x:1,y:1},v=ct(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:g,strategy:s}):y);return{top:(w.top-v.top+h.top)/x.y,bottom:(v.bottom-w.bottom+h.bottom)/x.y,left:(w.left-v.left+h.left)/x.x,right:(v.right-w.right+h.right)/x.x}}const oe=50,ie=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:c=[],platform:r}=n,l=r.detectOverflow?r:{...r,detectOverflow:ne},s=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=At(a,o,s),m=o,f=0;const h={};for(let p=0;p<c.length;p++){const w=c[p];if(!w)continue;const{name:y,fn:g}=w,{x,y:v,data:F,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:a,platform:l,elements:{reference:t,floating:e}});u=x??u,d=v??d,h[y]={...h[y],...F},b&&f<oe&&(f++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(a=b.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:u,y:d}=At(a,m,s)),p=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:h}},re=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:c,platform:r,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=X(t,e)||{};if(a==null)return{};const d=Tt(u),m={x:n,y:o},f=pt(i),h=ht(f),p=await r.getDimensions(a),w=f==="y",y=w?"top":"left",g=w?"bottom":"right",x=w?"clientHeight":"clientWidth",v=c.reference[h]+c.reference[f]-m[f]-c.floating[h],F=m[f]-c.reference[f],b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let M=b?b[x]:0;(!M||!await(r.isElement==null?void 0:r.isElement(b)))&&(M=l.floating[x]||c.floating[h]);const U=v/2-F/2,V=M/2-p[h]/2-1,C=j(d[y],V),Z=j(d[g],V),N=C,J=M-p[h]-Z,R=M/2-p[h]/2+U,z=mt(N,R,J),S=!s.arrow&&tt(i)!=null&&R!==z&&c.reference[h]/2-(R<N?C:Z)-p[h]/2<0,E=S?R<N?R-N:R-J:0;return{[f]:m[f]+E,data:{[f]:z,centerOffset:R-z-E,...S&&{alignmentOffset:E}},reset:S}}}),ce=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:c,rects:r,initialPlacement:l,platform:s,elements:a}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...w}=X(t,e);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const y=q(i),g=W(l),x=q(l)===l,v=await(s.isRTL==null?void 0:s.isRTL(a.floating)),F=m||(x||!p?[rt(l)]:Ut(l)),b=h!=="none";!m&&b&&F.push(...te(l,p,h,v));const M=[l,...F],U=await s.detectOverflow(e,w),V=[];let C=((o=c.flip)==null?void 0:o.overflows)||[];if(u&&V.push(U[y]),d){const R=Kt(i,r,v);V.push(U[R[0]],U[R[1]])}if(C=[...C,{placement:i,overflows:V}],!V.every(R=>R<=0)){var Z,N;const R=(((Z=c.flip)==null?void 0:Z.index)||0)+1,z=M[R];if(z&&(!(d==="alignment"&&g!==W(z))||C.every(E=>W(E.placement)===g?E.overflows[0]>0:!0)))return{data:{index:R,overflows:C},reset:{placement:z}};let S=(N=C.filter(E=>E.overflows[0]<=0).sort((E,P)=>E.overflows[1]-P.overflows[1])[0])==null?void 0:N.placement;if(!S)switch(f){case"bestFit":{var J;const E=(J=C.filter(P=>{if(b){const H=W(P.placement);return H===g||H==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(H=>H>0).reduce((H,qt)=>H+qt,0)]).sort((P,H)=>P[1]-H[1])[0])==null?void 0:J[0];E&&(S=E);break}case"initialPlacement":S=l;break}if(i!==S)return{reset:{placement:S}}}return{}}}};function Dt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ct(t){return Yt.some(e=>t[e]>=0)}const le=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...c}=X(t,e);switch(i){case"referenceHidden":{const r=await o.detectOverflow(e,{...c,elementContext:"reference"}),l=Dt(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Ct(l)}}}case"escaped":{const r=await o.detectOverflow(e,{...c,altBoundary:!0}),l=Dt(r,n.floating);return{data:{escapedOffsets:l,escaped:Ct(l)}}}default:return{}}}}},se=new Set(["left","top"]);async function ae(t,e){const{placement:n,platform:o,elements:i}=t,c=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=q(n),l=tt(n),s=W(n)==="y",a=se.has(r)?-1:1,u=c&&s?-1:1,d=X(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(f=l==="end"?h*-1:h),s?{x:f*u,y:m*a}:{x:m*a,y:f*u}}const fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:c,placement:r,middlewareData:l}=e,s=await ae(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+s.x,y:c+s.y,data:{...s,placement:r}}}}},ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:c}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:y=>{let{x:g,y:x}=y;return{x:g,y:x}}},...a}=X(t,e),u={x:n,y:o},d=await c.detectOverflow(e,a),m=W(q(i)),f=Et(m);let h=u[f],p=u[m];if(r){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=h+d[y],v=h-d[g];h=mt(x,h,v)}if(l){const y=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=p+d[y],v=p-d[g];p=mt(x,p,v)}const w=s.fn({...e,[f]:h,[m]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[f]:r,[m]:l}}}}}};function lt(){return typeof window<"u"}function Y(t){return St(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function D(t){var e;return(e=(St(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function St(t){return lt()?t instanceof Node||t instanceof L(t).Node:!1}function O(t){return lt()?t instanceof Element||t instanceof L(t).Element:!1}function k(t){return lt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function kt(t){return!lt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function de(t){return/^(table|td|th)$/.test(Y(t))}function st(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const me=/transform|translate|scale|rotate|perspective|filter/,he=/paint|layout|strict|content/,I=t=>!!t&&t!=="none";let yt;function wt(t){const e=O(t)?T(t):t;return I(e.transform)||I(e.translate)||I(e.scale)||I(e.rotate)||I(e.perspective)||!xt()&&(I(e.backdropFilter)||I(e.filter))||me.test(e.willChange||"")||he.test(e.contain||"")}function pe(t){let e=B(t);for(;k(e)&&!G(e);){if(wt(e))return e;if(st(e))return null;e=B(e)}return null}function xt(){return yt==null&&(yt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yt}function G(t){return/^(html|body|#document)$/.test(Y(t))}function T(t){return L(t).getComputedStyle(t)}function at(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B(t){if(Y(t)==="html")return t;const e=t.assignedSlot||t.parentNode||kt(t)&&t.host||D(t);return kt(e)?e.host:e}function Ft(t){const e=B(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&et(e)?e:Ft(e)}function nt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ft(t),c=i===((o=t.ownerDocument)==null?void 0:o.body),r=L(i);if(c){const l=vt(r);return e.concat(r,r.visualViewport||[],et(i)?i:[],l&&n?nt(l):[])}else return e.concat(i,nt(i,[],n))}function vt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Pt(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=k(t),c=i?t.offsetWidth:n,r=i?t.offsetHeight:o,l=ot(n)!==c||ot(o)!==r;return l&&(n=c,o=r),{width:n,height:o,$:l}}function bt(t){return O(t)?t:t.contextElement}function K(t){const e=bt(t);if(!k(e))return A(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:c}=Pt(e);let r=(c?ot(n.width):n.width)/o,l=(c?ot(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ge=A(0);function Ht(t){const e=L(t);return!xt()||!e.visualViewport?ge:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ye(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function _(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),c=bt(t);let r=A(1);e&&(o?O(o)&&(r=K(o)):r=K(t));const l=ye(c,n,o)?Ht(c):A(0);let s=(i.left+l.x)/r.x,a=(i.top+l.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(c){const m=L(c),f=o&&O(o)?L(o):o;let h=m,p=vt(h);for(;p&&o&&f!==h;){const w=K(p),y=p.getBoundingClientRect(),g=T(p),x=y.left+(p.clientLeft+parseFloat(g.paddingLeft))*w.x,v=y.top+(p.clientTop+parseFloat(g.paddingTop))*w.y;s*=w.x,a*=w.y,u*=w.x,d*=w.y,s+=x,a+=v,h=L(p),p=vt(h)}}return ct({width:u,height:d,x:s,y:a})}function ft(t,e){const n=at(t).scrollLeft;return e?e.left+n:_(D(t)).left+n}function Wt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ft(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function we(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const c=i==="fixed",r=D(o),l=e?st(e.floating):!1;if(o===r||l&&c)return n;let s={scrollLeft:0,scrollTop:0},a=A(1);const u=A(0),d=k(o);if((d||!d&&!c)&&((Y(o)!=="body"||et(r))&&(s=at(o)),d)){const f=_(o);a=K(o),u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}const m=r&&!d&&!c?Wt(r,s):A(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-s.scrollTop*a.y+u.y+m.y}}function xe(t){return Array.from(t.getClientRects())}function ve(t){const e=D(t),n=at(t),o=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),c=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ft(t);const l=-n.scrollTop;return T(o).direction==="rtl"&&(r+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:c,x:r,y:l}}const Bt=25;function be(t,e){const n=L(t),o=D(t),i=n.visualViewport;let c=o.clientWidth,r=o.clientHeight,l=0,s=0;if(i){c=i.width,r=i.height;const u=xt();(!u||u&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}const a=ft(o);if(a<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-d.clientWidth-f);h<=Bt&&(c-=h)}else a<=Bt&&(c+=a);return{width:c,height:r,x:l,y:s}}function Re(t,e){const n=_(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,c=k(t)?K(t):A(1),r=t.clientWidth*c.x,l=t.clientHeight*c.y,s=i*c.x,a=o*c.y;return{width:r,height:l,x:s,y:a}}function Mt(t,e,n){let o;if(e==="viewport")o=be(t,n);else if(e==="document")o=ve(D(t));else if(O(e))o=Re(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ct(o)}function Vt(t,e){const n=B(t);return n===e||!O(n)||G(n)?!1:T(n).position==="fixed"||Vt(n,e)}function Ee(t,e){const n=e.get(t);if(n)return n;let o=nt(t,[],!1).filter(l=>O(l)&&Y(l)!=="body"),i=null;const c=T(t).position==="fixed";let r=c?B(t):t;for(;O(r)&&!G(r);){const l=T(r),s=wt(r);!s&&l.position==="fixed"&&(i=null),(c?!s&&!i:!s&&l.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||et(r)&&!s&&Vt(t,r))?o=o.filter(a=>a!==r):i=l,r=B(r)}return e.set(t,o),o}function Le(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const c=[...n==="clippingAncestors"?st(e)?[]:Ee(e,this._c):[].concat(n),o],r=Mt(e,c[0],i);let l=r.top,s=r.right,a=r.bottom,u=r.left;for(let d=1;d<c.length;d++){const m=Mt(e,c[d],i);l=$(m.top,l),s=j(m.right,s),a=j(m.bottom,a),u=$(m.left,u)}return{width:s-u,height:a-l,x:u,y:l}}function Oe(t){const{width:e,height:n}=Pt(t);return{width:e,height:n}}function Te(t,e,n){const o=k(e),i=D(e),c=n==="fixed",r=_(t,!0,c,e);let l={scrollLeft:0,scrollTop:0};const s=A(0);function a(){s.x=ft(i)}if(o||!o&&!c)if((Y(e)!=="body"||et(i))&&(l=at(e)),o){const f=_(e,!0,c,e);s.x=f.x+e.clientLeft,s.y=f.y+e.clientTop}else i&&a();c&&!o&&i&&a();const u=i&&!o&&!c?Wt(i,l):A(0),d=r.left+l.scrollLeft-s.x-u.x,m=r.top+l.scrollTop-s.y-u.y;return{x:d,y:m,width:r.width,height:r.height}}function Rt(t){return T(t).position==="static"}function Nt(t,e){if(!k(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return D(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=L(t);if(st(t))return n;if(!k(t)){let i=B(t);for(;i&&!G(i);){if(O(i)&&!Rt(i))return i;i=B(i)}return n}let o=Nt(t,e);for(;o&&de(o)&&Rt(o);)o=Nt(o,e);return o&&G(o)&&Rt(o)&&!wt(o)?n:o||pe(t)||n}const Ae=async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:Te(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function De(t){return T(t).direction==="rtl"}const Ce={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:D,getClippingRect:Le,getOffsetParent:zt,getElementRects:Ae,getClientRects:xe,getDimensions:Oe,getScale:K,isElement:O,isRTL:De};function $t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Se(t,e){let n=null,o;const i=D(t);function c(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function r(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),c();const a=t.getBoundingClientRect(),{left:u,top:d,width:m,height:f}=a;if(l||e(),!m||!f)return;const h=it(d),p=it(i.clientWidth-(u+m)),w=it(i.clientHeight-(d+f)),y=it(u),g={rootMargin:-h+"px "+-p+"px "+-w+"px "+-y+"px",threshold:$(0,j(1,s))||1};let x=!0;function v(F){const b=F[0].intersectionRatio;if(b!==s){if(!x)return r();b?r(!1,b):o=setTimeout(()=>{r(!1,1e-7)},1e3)}b===1&&!$t(a,t.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(v,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,g)}n.observe(t)}return r(!0),c}function ke(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,a=bt(t),u=i||c?[...a?nt(a):[],...e?nt(e):[]]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),c&&y.addEventListener("resize",n)});const d=a&&l?Se(a,n):null;let m=-1,f=null;r&&(f=new ResizeObserver(y=>{let[g]=y;g&&g.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),a&&!s&&f.observe(a),e&&f.observe(e));let h,p=s?_(t):null;s&&w();function w(){const y=_(t);p&&!$t(p,y)&&n(),p=y,h=requestAnimationFrame(w)}return n(),()=>{var y;u.forEach(g=>{i&&g.removeEventListener("scroll",n),c&&g.removeEventListener("resize",n)}),d?.(),(y=f)==null||y.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const Fe=fe,Pe=ue,He=ce,We=le,Be=re,Me=(t,e,n)=>{const o=new Map,i={platform:Ce,...n},c={...i.platform,_c:o};return ie(t,e,{...i,platform:c})};function Ve(t){const[e,n]=Q(t()),[o,i]=Q(t()?"open":"closed");let c,r=0;const l=s=>{c=s};return ut(s=>{const a=t();if(a)r++,n(!0),i("open");else if(s){i("closed");const u=c,d=u&&(()=>{const h=getComputedStyle(u);return h.animationName!=="none"&&parseFloat(h.animationDuration||"0")>0})();if(!u||!d){const h=++r;return queueMicrotask(()=>{h===r&&n(!1)}),a}const m=u,f=h=>{h.target===m&&(m.removeEventListener("animationend",f),n(!1))};m.addEventListener("animationend",f),dt(()=>m.removeEventListener("animationend",f))}return a}),{present:e,state:o,setRef:l}}function Ne(t){const[e,n]=It(t,["as"]);return typeof e.as=="function"?e.as(n):_t(Xt,jt({get component(){return e.as??"span"}},n))}function ze(t,e,n={}){const[o,i]=Q({x:0,y:0,placement:n.placement??"bottom"}),[c,r]=Q({}),[l,s]=Q(!1);return ut(()=>{const a=t(),u=e();if(!a||!u)return;const d=ke(a,u,()=>{var m;const f=[Fe(n.gutter??8),He(),Pe({padding:8})],h=(m=n.arrowEl)==null?void 0:m.call(n);h&&f.push(Be({element:h})),f.push(We()),Me(a,u,{placement:n.placement??"bottom",strategy:"fixed",middleware:f}).then(({x:p,y:w,placement:y,middlewareData:g})=>{var x;i({x:p,y:w,placement:y}),g.arrow&&r({x:g.arrow.x,y:g.arrow.y}),s(!!((x=g.hide)!=null&&x.referenceHidden))})});dt(d)}),{pos:o,arrowPos:c,hidden:l}}function $e(t){ut(()=>{if(!t.enabled())return;const e=o=>{o.key==="Escape"&&t.onDismiss("escape")},n=o=>{const i=o.target;t.refs().some(c=>c&&c.contains(i))||t.onDismiss("outside")};document.addEventListener("keydown",e),document.addEventListener("pointerdown",n,!0),dt(()=>{document.removeEventListener("keydown",e),document.removeEventListener("pointerdown",n,!0)})})}export{Ne as A,$e as a,Ve as c,ze as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as w,c as e,S as l,m as u,j as g,i as c,t as m}from"./cn-Dogu6PbV.js";import{B as h}from"./button-CKyYD9G4.js";var d=m('<span class="text-foreground/70 whitespace-pre-wrap">'),x=m('<span class="text-primary font-medium whitespace-pre-wrap">');function b(n){const[r,s]=w(n,["children","variant","size","class","highlight","block"]),o=()=>r.highlight!==void 0&&r.highlight.trim()!=="",i=()=>typeof r.children=="string"?r.children:"";return e(l,{get when(){return o()},get fallback(){return e(l,{get when(){return r.block},get fallback(){return e(h,u({get variant(){return r.variant??"outline"},get size(){return r.size??"lg"},get class(){return g("rounded-full",r.class)}},s,{get children(){return r.children}}))},get children(){return e(h,u({get variant(){return r.variant??"outline"},get size(){return r.size??"md"},get class(){return g("h-auto w-full cursor-pointer justify-start rounded-xl px-4 py-2.5","text-left text-sm leading-snug whitespace-normal text-pretty",r.class)}},s,{get children(){return r.children}}))}})},get children(){return e(l,{get when(){return i()},get fallback(){return e(h,u({get variant(){return r.variant??"ghost"},get size(){return r.size??"sm"},get class(){return g("w-full cursor-pointer justify-start rounded-xl py-2","hover:bg-accent",r.class)}},s,{get children(){return r.children}}))},get children(){return e(h,u({get variant(){return r.variant??"ghost"},get size(){return r.size??"sm"},get class(){return g("w-full cursor-pointer justify-start gap-0 rounded-xl py-2","hover:bg-accent",r.class)}},s,{get children(){return y(i(),r.highlight)}}))}})}})}function y(n,r){const s=r.trim(),o=n.toLowerCase(),i=s.toLowerCase(),a=o.indexOf(i);if(a===-1)return(()=>{var t=d();return c(t,n),t})();const p=n.substring(0,a),f=n.substring(a,a+i.length),v=n.substring(a+f.length);return[e(l,{when:p,get children(){var t=d();return c(t,p),t}}),(()=>{var t=x();return c(t,f),t})(),e(l,{when:v,get children(){var t=d();return c(t,v),t}})]}export{b as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as R,s as g,a as x,b,c as u,i as h,h as p,k as f,f as C,m as w,j as d,S as H,t as m,v as S,w as $,p as z,u as y}from"./cn-Dogu6PbV.js";import{M}from"./markdown-CMTGx9r8.js";import{c as j}from"./chevron-down-3SBiq8HF.js";const E=1;function P(i,e){let o=-1;const s=new ResizeObserver(r=>{var t;const n=((t=r[r.length-1])==null?void 0:t.contentRect.height)??i.getBoundingClientRect().height;(o<0||Math.abs(n-o)>E)&&(o=n,e(n))});return s.observe(i),()=>s.disconnect()}var A=m("<div>"),B=m("<button><span class=text-primary></span><div>"),L=m("<div style=max-height:0px><div>");const O=S();function k(){const i=$(O);if(!i)throw new Error("useReasoningContext must be used within a Reasoning provider");return i}function N(i){const[e]=g(i,["children","class","open","onOpenChange","isStreaming"]),[o,s]=x(!1),[r,t]=x(!1),n=()=>e.open!==void 0,c=()=>n()?e.open:o(),l=a=>{var v;n()||s(a),(v=e.onOpenChange)==null||v.call(e,a)};return b(()=>{const a=e.isStreaming;a&&!r()&&(n()||s(!0),t(!0)),!a&&r()&&(n()||s(!1),t(!1))}),u(O.Provider,{value:{isOpen:c,onOpenChange:l},get children(){var a=A();return h(a,()=>e.children),p(()=>f(a,e.class)),a}})}function T(i){const[e,o]=g(i,["children","class"]),{isOpen:s,onOpenChange:r}=k();return(()=>{var t=B(),n=t.firstChild,c=n.nextSibling;return t.$$click=()=>r(!s()),C(t,w({get class(){return d("flex cursor-pointer items-center gap-2 text-meta",e.class)}},o),!1,!0),h(n,()=>e.children),h(c,u(j,{class:"size-4"})),p(()=>f(c,d("transform transition-transform",s()?"rotate-180":""))),t})()}function W(i){const[e,o]=g(i,["children","class","contentClass","markdown"]),{isOpen:s}=k();let r,t;return b(()=>{if(!r||!t)return;const n=P(t,()=>{r&&t&&s()&&(r.style.maxHeight=`${t.scrollHeight}px`)});s()?r.style.maxHeight=`${t.scrollHeight}px`:r.style.maxHeight="0px",z(n)}),(()=>{var n=L(),c=n.firstChild,l=r;typeof l=="function"?y(l,n):r=n,C(n,w({get class(){return d("overflow-hidden transition-[max-height] duration-150 ease-out",e.class)}},o),!1,!0);var a=t;return typeof a=="function"?y(a,c):t=c,h(c,u(H,{get when(){return e.markdown},get fallback(){return e.children},get children(){return u(M,{get content(){return e.children}})}})),p(()=>f(c,d("text-muted-foreground text-body",e.contentClass))),n})()}R(["click"]);export{N as R,T as a,W as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as _,s as E,c as A,f as F,m as P,j as B,i as M,w as ee,a as D,h as te,k as ne,g as ie,S as re,t as N,v as le}from"./cn-Dogu6PbV.js";var W=N("<div>"),oe=N('<div><svg viewBox="0 0 4 8"fill=currentColor><circle cx=1 cy=1.5 r=0.6></circle><circle cx=3 cy=1.5 r=0.6></circle><circle cx=1 cy=4 r=0.6></circle><circle cx=3 cy=4 r=0.6></circle><circle cx=1 cy=6.5 r=0.6></circle><circle cx=3 cy=6.5 r=0.6>'),ae=N("<div role=separator aria-valuemin=0 aria-valuemax=100>");const H=le();function T(s){if(s==null||s==="")return;if(typeof s=="number")return Number.isFinite(s)?`${s}%`:void 0;const t=s.trim();if(t==="")return;if(t.endsWith("%")||t.endsWith("px"))return t;const m=Number(t);return Number.isFinite(m)?`${m}%`:void 0}function se(s){const[t,m]=E(s,["orientation","children","class"]),g=()=>t.orientation??"horizontal";return A(H.Provider,{get value(){return{orientation:g()}},get children(){var c=W();return F(c,P({get class(){return B("flex h-full w-full",g()==="vertical"?"flex-col":"flex-row",t.class)},get"data-orientation"(){return g()}},m),!1,!0),M(c,()=>t.children),c}})}function ce(s){const[t,m]=E(s,["defaultSize","minSize","maxSize","locked","hidden","children","class","style"]),g=()=>{const l=T(t.defaultSize);return{...l!==void 0?{"flex-basis":l,"flex-grow":"0","flex-shrink":"0"}:{flex:"1 1 0%"},display:"grid","grid-template-rows":"minmax(0, 1fr)","grid-template-columns":"minmax(0, 1fr)","min-width":"0","min-height":"0"}},c=()=>{const l={},u=(d,$,n)=>{if(d==null||d==="")return;if(typeof d=="number"){l[n]=String(d);return}const r=d.trim();r.endsWith("px")?l[$]=String(parseFloat(r)):r.endsWith("%")?l[n]=String(parseFloat(r)):Number.isFinite(Number(r))&&(l[n]=r)};return u(t.minSize,"data-min-size","data-min-size-pct"),u(t.maxSize,"data-max-size","data-max-size-pct"),u(t.defaultSize,"data-default-size","data-default-size-pct"),l};return(()=>{var l=W();return F(l,P({get class(){return B("overflow-hidden",t.class)},get style(){return{...g(),...typeof t.style=="object"?t.style:{}}},get"data-locked"(){return t.locked?"":void 0},get hidden(){return t.hidden||void 0}},c,m),!1,!0),M(l,()=>t.children),l})()}function b(s,t,m,g){const c=s.dataset[t==="min"?"minSize":"maxSize"];if(c!==void 0&&c!==""){const u=parseFloat(c);if(Number.isFinite(u))return u}const l=s.dataset[t==="min"?"minSizePct":"maxSizePct"];if(l!==void 0&&l!==""){const u=parseFloat(l);if(Number.isFinite(u))return u/100*m}return g}function ue(s){const[t,m]=E(s,["withHandle","onPanelResize","class","keyboardStep","static","orientation"]),g=ee(H),c=()=>t.orientation??g?.orientation??"horizontal",[l,u]=D(!1),d=()=>!!t.static;let $=0,n=null,r=null,w=0,k=0;const p=()=>c()==="horizontal",f=()=>p()?"width":"height",I=e=>{if(d())return;const i=e.currentTarget;n=i.previousElementSibling,r=i.nextElementSibling,!(!n||!r)&&(e.preventDefault(),u(!0),i.setPointerCapture(e.pointerId),$=p()?e.clientX:e.clientY,w=n.getBoundingClientRect()[f()],k=r.getBoundingClientRect()[f()])},X=e=>{if(!l()||!n||!r)return;const i=(p()?e.clientX:e.clientY)-$;R(i)};function R(e){var i;if(!n||!r)return!1;const o=n.parentElement,a=o?o.getBoundingClientRect()[f()]:0,v=b(n,"min",a,0),z=b(n,"max",a,999999),y=b(r,"min",a,0),S=b(r,"max",a,999999);let x=-1/0,h=1/0;if(x=Math.max(x,v-w),h=Math.min(h,z-w),x=Math.max(x,k-S),h=Math.min(h,k-y),x>h)return!1;const C=Math.max(x,Math.min(h,e)),V=w+C,Z=k-C;return n.style.flexBasis=`${V}px`,n.style.flexGrow="0",n.style.flexShrink="0",r.style.flexBasis=`${Z}px`,r.style.flexGrow="0",r.style.flexShrink="0",(i=t.onPanelResize)==null||i.call(t,C),!0}function G(){if(!n||!r)return;const e=n.parentElement;if(!e)return;const i=e.getBoundingClientRect()[f()];if(i<=0)return;const o=n.getBoundingClientRect()[f()]/i*100,a=r.getBoundingClientRect()[f()]/i*100;n.style.flexBasis=`${o}%`,r.style.flexBasis=`${a}%`}const Y=()=>{G(),u(!1),n=null,r=null};function j(e){const i=e.dataset.defaultSize,o=e.dataset.defaultSizePct;i!==void 0&&i!==""?(e.style.flexBasis=`${i}px`,e.style.flexGrow="0",e.style.flexShrink="0"):o!==void 0&&o!==""?(e.style.flexBasis=`${o}%`,e.style.flexGrow="0",e.style.flexShrink="0"):(e.style.flexBasis="",e.style.flexGrow="1",e.style.flexShrink="1")}const L=e=>{var i;if(d())return;const o=e.currentTarget,a=o.previousElementSibling,v=o.nextElementSibling;!a||!v||(e.preventDefault(),j(a),j(v),(i=t.onPanelResize)==null||i.call(t,0))},U=D(50),[q,J]=U;function K(e){return n=e.previousElementSibling,r=e.nextElementSibling,!n||!r?!1:(w=n.getBoundingClientRect()[f()],k=r.getBoundingClientRect()[f()],!0)}function O(){if(!n)return;const e=n.parentElement;if(!e)return;const i=e.getBoundingClientRect()[f()];if(i<=0)return;const o=n.getBoundingClientRect()[f()]/i*100;J(Math.round(o))}const Q=e=>{if(d())return;const i=e.currentTarget,o=t.keyboardStep??16,a=p(),v=a?"ArrowLeft":"ArrowUp",z=a?"ArrowRight":"ArrowDown";let y=null;if(e.key===v)y=-o;else if(e.key===z)y=o;else if(e.key==="Home")y="min";else if(e.key==="End")y="max";else return;if(e.preventDefault(),!!K(i)){if(y==="min"){const S=n.parentElement,x=S?S.getBoundingClientRect()[f()]:0,h=b(n,"min",x,0);R(h-w)}else if(y==="max"){const S=n.parentElement,x=S?S.getBoundingClientRect()[f()]:0,h=b(n,"max",x,999999);R(h-w)}else R(y);O(),G(),n=null,r=null}};return(()=>{var e=ae();return e.$$keydown=Q,e.$$dblclick=L,e.$$pointerup=Y,e.$$pointermove=X,e.$$pointerdown=I,F(e,P({get class(){return B("relative flex items-center justify-center",t.class)},get style(){return{cursor:d()?"default":p()?"col-resize":"row-resize",[p()?"width":"height"]:"8px",background:l()?"var(--color-muted-foreground, #98989f)":"transparent",opacity:l()?"0.3":"1"}},get tabIndex(){return d()?void 0:0},get"data-orientation"(){return c()},get"data-static"(){return d()?"":void 0},get"aria-orientation"(){return p()?"vertical":"horizontal"},get"aria-valuenow"(){return q()}},m),!1,!0),M(e,A(re,{get when(){return t.withHandle},get children(){var i=oe(),o=i.firstChild;return te(a=>{var v=B("z-10 flex items-center justify-center",p()?"h-6 w-3 flex-col":"h-3 w-6 flex-row"),z=B("text-muted-foreground/40",p()?"h-3 w-2":"h-2 w-3 rotate-90");return v!==a.e&&ne(i,a.e=v),z!==a.t&&ie(o,"class",a.t=z),a},{e:void 0,t:void 0}),i}})),e})()}_(["pointerdown","pointermove","pointerup","dblclick","keydown"]);export{se as R,ce as a,ue as b,T as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as r}from"./Icon-D_Zmwmwh.js";import{c as a,m}from"./cn-Dogu6PbV.js";var p=[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]],s=o=>a(r,m(o,{name:"Star",iconNode:p})),t=s;export{t as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as u,L as z,N as P,O as w,a as F}from"./cn-Dogu6PbV.js";const h=Symbol("store-raw"),y=Symbol("store-node"),f=Symbol("store-has"),m=Symbol("store-self");function v(t){let r=t[u];if(!r&&(Object.defineProperty(t,u,{value:r=new Proxy(t,L)}),!Array.isArray(t))){const o=Object.keys(t),e=Object.getOwnPropertyDescriptors(t),c=Object.getPrototypeOf(t),n=c!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&c!==Object.prototype;if(n){const i=Object.getOwnPropertyDescriptors(c);o.push(...Object.keys(i)),Object.assign(e,i)}for(let i=0,l=o.length;i<l;i++){const s=o[i];n&&s==="constructor"||e[s].get&&Object.defineProperty(t,s,{configurable:!0,enumerable:e[s].enumerable,get:e[s].get.bind(r)})}}return r}function g(t){let r;return t!=null&&typeof t=="object"&&(t[u]||!(r=Object.getPrototypeOf(t))||r===Object.prototype||Array.isArray(t))}function a(t,r=new Set){let o,e,c,n;if(o=t!=null&&t[h])return o;if(!g(t)||r.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):r.add(t);for(let i=0,l=t.length;i<l;i++)c=t[i],(e=a(c,r))!==c&&(t[i]=e)}else{Object.isFrozen(t)?t=Object.assign({},t):r.add(t);const i=Object.keys(t),l=Object.getOwnPropertyDescriptors(t);for(let s=0,d=i.length;s<d;s++)n=i[s],!l[n].get&&(c=t[n],(e=a(c,r))!==c&&(t[n]=e))}return t}function _(t,r){let o=t[r];return o||Object.defineProperty(t,r,{value:o=Object.create(null)}),o}function b(t,r,o){if(t[r])return t[r];const[e,c]=F(o,{equals:!1,internal:!0});return e.$=c,t[r]=e}function K(t,r){const o=Reflect.getOwnPropertyDescriptor(t,r);return!o||o.get||!o.configurable||r===u||r===y||(delete o.value,delete o.writable,o.get=()=>t[u][r]),o}function $(t){w()&&b(_(t,y),m)()}function R(t){return $(t),Reflect.ownKeys(t)}const L={get(t,r,o){if(r===h)return t;if(r===u)return o;if(r===P)return $(t),o;const e=_(t,y),c=e[r];let n=c?c():t[r];if(r===y||r===f||r==="__proto__")return n;if(!c){const i=Object.getOwnPropertyDescriptor(t,r);w()&&(typeof n!="function"||t.hasOwnProperty(r))&&!(i&&i.get)&&(n=b(e,r,n)())}return g(n)?v(n):n},has(t,r){return r===h||r===u||r===P||r===y||r===f||r==="__proto__"?!0:(w()&&b(_(t,f),r)(),r in t)},set(){return!0},deleteProperty(){return!0},ownKeys:R,getOwnPropertyDescriptor:K};function p(t,r,o,e=!1){if(r==="__proto__"||!e&&t[r]===o)return;const c=t[r],n=t.length;o===void 0?(delete t[r],t[f]&&t[f][r]&&c!==void 0&&t[f][r].$()):(t[r]=o,t[f]&&t[f][r]&&c===void 0&&t[f][r].$());let i=_(t,y),l;if((l=b(i,r,c))&&l.$(()=>o),Array.isArray(t)&&t.length!==n){for(let s=t.length;s<n;s++)(l=i[s])&&l.$();(l=b(i,"length",n))&&l.$(t.length)}(l=i[m])&&l.$()}function D(t,r){const o=Object.keys(r);for(let e=0;e<o.length;e+=1){const c=o[e];k(c)||p(t,c,r[c])}}function k(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function M(t,r){if(typeof r=="function"&&(r=r(t)),r=a(r),Array.isArray(r)){if(t===r)return;let o=0,e=r.length;for(;o<e;o++){const c=r[o];t[o]!==c&&p(t,o,c)}p(t,"length",e)}else D(t,r)}function O(t,r,o=[]){let e,c=t;if(r.length>1){e=r.shift();const i=typeof e,l=Array.isArray(t);if(i==="string"&&(e==="__proto__"||r.length>1&&k(e)))return;if(Array.isArray(e)){for(let s=0;s<e.length;s++)O(t,[e[s]].concat(r),o);return}else if(l&&i==="function"){for(let s=0;s<t.length;s++)e(t[s],s)&&O(t,[s].concat(r),o);return}else if(l&&i==="object"){const{from:s=0,to:d=t.length-1,by:x=1}=e;for(let A=s;A<=d;A+=x)O(t,[A].concat(r),o);return}else if(r.length>1){O(t[e],r,[e].concat(o));return}c=t[e],o=[e].concat(o)}let n=r[0];typeof n=="function"&&(n=n(c,o),n===c)||e===void 0&&n==null||(n=a(n),e===void 0||g(c)&&g(n)&&!Array.isArray(n)?D(c,n):p(t,e,n))}function N(...[t,r]){const o=a(t||{}),e=Array.isArray(o),c=v(o);function n(...i){z(()=>{e&&i.length===1?M(o,i[0]):O(o,i)})}return[c,n]}const j=new WeakMap,S={get(t,r){if(r===h)return t;const o=t[r];if(r===u||r===P||r===y||r===f||r==="__proto__")return o;let e;return g(o)?j.get(o)||(j.set(o,e=new Proxy(o,S)),e):o},set(t,r,o){return p(t,r,a(o)),!0},deleteProperty(t,r){return p(t,r,void 0,!0),!0}};function W(t){return r=>{if(g(r)){let o;(o=j.get(r))||j.set(r,o=new Proxy(r,S)),t(o)}return r}}export{N as c,W as p,a as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./javascript-C25yR2R2.js";import t from"./typescript-RycA9KXf.js";import n from"./css-M7EaDHN_.js";const s=Object.freeze(JSON.parse(`{"displayName":"PostCSS","fileTypes":["pcss","postcss"],"foldingStartMarker":"/\\\\*|^#|^\\\\*|^\\\\b|^\\\\.","foldingStopMarker":"\\\\*/|^\\\\s*$","name":"postcss","patterns":[{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.postcss","patterns":[{"include":"#comment-tag"}]},{"include":"#double-slash"},{"include":"#double-quoted"},{"include":"#single-quoted"},{"include":"#interpolation"},{"include":"#placeholder-selector"},{"include":"#variable"},{"include":"#variable-root-css"},{"include":"#numeric"},{"include":"#unit"},{"include":"#flag"},{"include":"#dotdotdot"},{"begin":"@include","captures":{"0":{"name":"keyword.control.at-rule.css.postcss"}},"end":"(?=[\\\\n(;{])","name":"support.function.name.postcss.library"},{"begin":"@(?:mixin|function)","captures":{"0":{"name":"keyword.control.at-rule.css.postcss"}},"end":"$\\\\n?|(?=[({])","name":"support.function.name.postcss.no-completions","patterns":[{"match":"[-\\\\w]+","name":"entity.name.function"}]},{"match":"(?<=@import)\\\\s[-*./\\\\w]+","name":"string.quoted.double.css.postcss"},{"begin":"@","end":"$\\\\n?|\\\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)([,\\\\s]))|(?=;)","name":"keyword.control.at-rule.css.postcss"},{"begin":"#","end":"$\\\\n?|(?=[(),.;>\\\\[{\\\\s])","name":"entity.other.attribute-name.id.css.postcss","patterns":[{"include":"#interpolation"},{"include":"#pseudo-class"}]},{"begin":"\\\\.|(?<=&)([-_])","end":"$\\\\n?|(?=[(),;>\\\\[{\\\\s])","name":"entity.other.attribute-name.class.css.postcss","patterns":[{"include":"#interpolation"},{"include":"#pseudo-class"}]},{"begin":"\\\\[","end":"]","name":"entity.other.attribute-selector.postcss","patterns":[{"include":"#double-quoted"},{"include":"#single-quoted"},{"match":"[$*^~]","name":"keyword.other.regex.postcss"}]},{"match":"(?<=[])]|not\\\\(|[*>]|>\\\\s):[-:a-z]+|(:[-:])[-:a-z]+","name":"entity.other.attribute-name.pseudo-class.css.postcss"},{"begin":":","end":"$\\\\n?|(?=;|\\\\s\\\\(|and\\\\(|[{}]|\\\\),)","name":"meta.property-list.css.postcss","patterns":[{"include":"#double-slash"},{"include":"#double-quoted"},{"include":"#single-quoted"},{"include":"#interpolation"},{"include":"#variable"},{"include":"#rgb-value"},{"include":"#numeric"},{"include":"#unit"},{"include":"#flag"},{"include":"#function"},{"include":"#function-content"},{"include":"#function-content-var"},{"include":"#operator"},{"include":"#parent-selector"},{"include":"#property-value"}]},{"include":"#rgb-value"},{"include":"#function"},{"include":"#function-content"},{"begin":"(?<![-(])\\\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|[ux])\\\\b(?![-)]|:\\\\s)|&","end":"(?=[-(),.;>\\\\[_{\\\\s])","name":"entity.name.tag.css.postcss.symbol","patterns":[{"include":"#interpolation"},{"include":"#pseudo-class"}]},{"include":"#operator"},{"match":"[-a-z]+((?=:|#\\\\{))","name":"support.type.property-name.css.postcss"},{"include":"#reserved-words"},{"include":"#property-value"}],"repository":{"comment-tag":{"begin":"\\\\{\\\\{","end":"}}","name":"comment.tags.postcss","patterns":[{"match":"[-\\\\w]+","name":"comment.tag.postcss"}]},"dotdotdot":{"match":"\\\\.{3}","name":"variable.other"},"double-quoted":{"begin":"\\"","end":"\\"","name":"string.quoted.double.css.postcss","patterns":[{"include":"#quoted-interpolation"}]},"double-slash":{"begin":"//","end":"$","name":"comment.line.postcss","patterns":[{"include":"#comment-tag"}]},"flag":{"match":"!(important|default|optional|global)","name":"keyword.other.important.css.postcss"},"function":{"match":"(?<=[(,:|\\\\s])(?!url|format|attr)[-\\\\w][-\\\\w]*(?=\\\\()","name":"support.function.name.postcss"},"function-content":{"match":"(?<=url\\\\(|format\\\\(|attr\\\\().+?(?=\\\\))","name":"string.quoted.double.css.postcss"},"function-content-var":{"match":"(?<=var\\\\()[-\\\\w]+(?=\\\\))","name":"variable.parameter.postcss"},"interpolation":{"begin":"#\\\\{","end":"}","name":"support.function.interpolation.postcss","patterns":[{"include":"#variable"},{"include":"#numeric"},{"include":"#operator"},{"include":"#unit"},{"include":"#double-quoted"},{"include":"#single-quoted"}]},"numeric":{"match":"([-.])?[0-9]+(\\\\.[0-9]+)?","name":"constant.numeric.css.postcss"},"operator":{"match":"\\\\+|\\\\s-\\\\s|\\\\s-(?=\\\\$)|(?<=\\\\()-(?=\\\\$)|\\\\s-(?=\\\\()|[!%*/<=>~]","name":"keyword.operator.postcss"},"parent-selector":{"match":"&","name":"entity.name.tag.css.postcss"},"placeholder-selector":{"begin":"(?<!\\\\d)%(?!\\\\d)","end":"$\\\\n?|\\\\s|(?=[;{])","name":"entity.other.attribute-name.placeholder-selector.postcss"},"property-value":{"match":"[-\\\\w]+","name":"meta.property-value.css.postcss, support.constant.property-value.css.postcss"},"pseudo-class":{"match":":[-:a-z]+","name":"entity.other.attribute-name.pseudo-class.css.postcss"},"quoted-interpolation":{"begin":"#\\\\{","end":"}","name":"support.function.interpolation.postcss","patterns":[{"include":"#variable"},{"include":"#numeric"},{"include":"#operator"},{"include":"#unit"}]},"reserved-words":{"match":"\\\\b(false|from|in|not|null|through|to|true)\\\\b","name":"support.type.property-name.css.postcss"},"rgb-value":{"match":"(#)(\\\\h{3}|\\\\h{6})\\\\b","name":"constant.other.color.rgb-value.css.postcss"},"single-quoted":{"begin":"'","end":"'","name":"string.quoted.single.css.postcss","patterns":[{"include":"#quoted-interpolation"}]},"unit":{"match":"(?<=[}\\\\d])(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)","name":"keyword.other.unit.css.postcss"},"variable":{"match":"\\\\$[-\\\\w]+","name":"variable.parameter.postcss"},"variable-root-css":{"match":"(?<!&)--[-\\\\w]+","name":"variable.parameter.postcss"}},"scopeName":"source.css.postcss"}`)),a=[s],i=Object.freeze(JSON.parse(`{"displayName":"Svelte","fileTypes":["svelte"],"injections":{"L:(meta.script.svelte | meta.style.svelte) (meta.lang.js | meta.lang.javascript) - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.js","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.js"}]}]},"L:(meta.script.svelte | meta.style.svelte) (meta.lang.ts | meta.lang.typescript) - (meta source)":{"patterns":[{"begin":"(?<=>)(?=[^\\\\n]+</(s(?:cript|tyle))[>\\\\s])","contentName":"source.ts","end":"(?=</(s(?:cript|tyle))[>\\\\s])","name":"meta.embedded.block.svelte","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>)(?!</)","contentName":"source.ts","name":"meta.embedded.block.svelte","patterns":[{"include":"source.ts"}],"while":"^(?!\\\\s*</(s(?:cript|tyle))[>\\\\s])"}]},"L:(meta.script.svelte | meta.style.svelte) meta.lang.coffee - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.coffee","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.coffee"}]}]},"L:(source.ts, source.js, source.coffee)":{"patterns":[{"match":"(?<![\\"$'./_[:alnum:]])\\\\$(?=[_[:alpha:]][$_[:alnum:]]*)","name":"punctuation.definition.variable.svelte"},{"match":"(?<![\\"$'./_[:alnum:]])(\\\\$\\\\$)(?=props|restProps|slots)","name":"punctuation.definition.variable.svelte"}]},"L:meta.script.svelte - meta.lang - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.js","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.js"}]}]},"L:meta.style.svelte - meta.lang - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.css","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.css"}]}]},"L:meta.style.svelte meta.lang.css - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.css","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.css"}]}]},"L:meta.style.svelte meta.lang.less - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.css.less","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.css.less"}]}]},"L:meta.style.svelte meta.lang.postcss - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.css.postcss","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.css.postcss"}]}]},"L:meta.style.svelte meta.lang.sass - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.sass","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.sass"}]}]},"L:meta.style.svelte meta.lang.scss - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.css.scss","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.css.scss"}]}]},"L:meta.style.svelte meta.lang.stylus - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"source.stylus","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"source.stylus"}]}]},"L:meta.template.svelte - meta.lang - (meta source)":{"patterns":[{"begin":"(?<=>)\\\\s","end":"(?=</template)","patterns":[{"include":"#scope"}]}]},"L:meta.template.svelte meta.lang.pug - (meta source)":{"patterns":[{"begin":"(?<=>)(?!</)","contentName":"text.pug","end":"(?=</)","name":"meta.embedded.block.svelte","patterns":[{"include":"text.pug"}]}]}},"name":"svelte","patterns":[{"include":"#scope"}],"repository":{"attributes":{"patterns":[{"include":"#attributes-comments"},{"include":"#attributes-directives"},{"include":"#attributes-keyvalue"},{"include":"#attributes-attach"},{"include":"#attributes-interpolated"}]},"attributes-attach":{"begin":"(?<![:=])\\\\s*(\\\\{@attach\\\\s)","captures":{"1":{"name":"entity.other.attribute-name.svelte"}},"contentName":"meta.embedded.expression.svelte source.ts","end":"(})","patterns":[{"include":"source.ts"}]},"attributes-comments":{"patterns":[{"match":"//.*$","name":"comment.line.double-slash.svelte"},{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.svelte"}]},"attributes-directives":{"begin":"(?<!<)(on|use|bind|transition|in|out|animate|let|class|style)(:)(?:((?:--)?[$_[:alpha:]][-$_[:alnum:]]*(?=\\\\s*=))|((?:--)?[$_[:alpha:]][-$_[:alnum:]]*))((\\\\|\\\\w+)*)","beginCaptures":{"1":{"patterns":[{"include":"#attributes-directives-keywords"}]},"2":{"name":"punctuation.definition.keyword.svelte"},"3":{"patterns":[{"include":"#attributes-directives-types-assigned"}]},"4":{"patterns":[{"include":"#attributes-directives-types"}]},"5":{"patterns":[{"match":"\\\\w+","name":"support.function.svelte"},{"match":"\\\\|","name":"punctuation.separator.svelte"}]}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.directive.$1.svelte","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.svelte"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"include":"#attributes-value"}]}]},"attributes-directives-keywords":{"patterns":[{"match":"on|use|bind","name":"keyword.control.svelte"},{"match":"transition|in|out|animate","name":"keyword.other.animation.svelte"},{"match":"let","name":"storage.type.svelte"},{"match":"class|style","name":"entity.other.attribute-name.svelte"}]},"attributes-directives-types":{"patterns":[{"match":"(?<=(on):).*$","name":"entity.name.type.svelte"},{"match":"(?<=(bind):).*$","name":"variable.parameter.svelte"},{"match":"(?<=(use|transition|in|out|animate):).*$","name":"variable.function.svelte"},{"match":"(?<=(let|class|style):).*$","name":"variable.parameter.svelte"}]},"attributes-directives-types-assigned":{"patterns":[{"match":"(?<=(bind):)this$","name":"variable.language.svelte"},{"match":"(?<=(bind):).*$","name":"entity.name.type.svelte"},{"match":"(?<=(class):).*$","name":"entity.other.attribute-name.class.svelte"},{"match":"(?<=(style):).*$","name":"support.type.property-name.svelte"},{"include":"#attributes-directives-types"}]},"attributes-generics":{"begin":"(generics)(=)([\\"'])","beginCaptures":{"1":{"name":"entity.other.attribute-name.svelte"},"2":{"name":"punctuation.separator.key-value.svelte"},"3":{"name":"punctuation.definition.string.begin.svelte"}},"contentName":"meta.embedded.expression.svelte source.ts","end":"(\\\\3)","endCaptures":{"1":{"name":"punctuation.definition.string.end.svelte"}},"patterns":[{"include":"#type-parameters"}]},"attributes-interpolated":{"begin":"(?<![:=])\\\\s*(\\\\{)","captures":{"1":{"name":"entity.other.attribute-name.svelte"}},"contentName":"meta.embedded.expression.svelte source.ts","end":"(})","patterns":[{"include":"source.ts"}]},"attributes-keyvalue":{"begin":"((?:--)?[$_[:alpha:]][-$_[:alnum:]]*)","beginCaptures":{"0":{"patterns":[{"match":"--.*","name":"support.type.property-name.svelte"},{"match":".*","name":"entity.other.attribute-name.svelte"}]}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.svelte","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.svelte"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"include":"#attributes-value"}]}]},"attributes-value":{"patterns":[{"include":"#interpolation"},{"captures":{"1":{"name":"punctuation.definition.string.begin.svelte"},"2":{"name":"constant.numeric.decimal.svelte"},"3":{"name":"punctuation.definition.string.end.svelte"},"4":{"name":"constant.numeric.decimal.svelte"}},"match":"([\\"'])([.0-9_]+[%\\\\w]{0,4})(\\\\1)|([.0-9_]+[%\\\\w]{0,4})(?=\\\\s|/?>)"},{"match":"([^\\"'/<=>\`\\\\s]|/(?!>))+","name":"string.unquoted.svelte","patterns":[{"include":"#interpolation"}]},{"begin":"([\\"'])","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.svelte"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.definition.string.end.svelte"}},"name":"string.quoted.svelte","patterns":[{"include":"#interpolation"}]}]},"comments":{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.svelte"}},"end":"-->","name":"comment.block.svelte","patterns":[{"begin":"(@)(component)","beginCaptures":{"1":{"name":"punctuation.definition.keyword.svelte"},"2":{"name":"storage.type.class.component.svelte keyword.declaration.class.component.svelte"}},"contentName":"comment.block.documentation.svelte","end":"(?=-->)","patterns":[{"captures":{"0":{"patterns":[{"include":"text.html.markdown"}]}},"match":".*?(?=-->)"},{"include":"text.html.markdown"}]},{"match":"\\\\G-?>|<!--(?!>)|<!-(?=-->)|--!>","name":"invalid.illegal.characters-not-allowed-here.svelte"}]},"destructuring":{"patterns":[{"begin":"(?=\\\\{)","end":"(?<=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts#object-binding-pattern"}]},{"begin":"(?=\\\\[)","end":"(?<=])","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts#array-binding-pattern"}]}]},"destructuring-const":{"patterns":[{"begin":"(?=\\\\{)","end":"(?<=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts#object-binding-pattern-const"}]},{"begin":"(?=\\\\[)","end":"(?<=])","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts#array-binding-pattern-const"}]}]},"interpolation":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.svelte"}},"contentName":"meta.embedded.expression.svelte source.ts","end":"}","endCaptures":{"0":{"name":"punctuation.section.embedded.end.svelte"}},"patterns":[{"begin":"\\\\G\\\\s*(?=\\\\{)","end":"(?<=})","patterns":[{"include":"source.ts#object-literal"}]},{"include":"source.ts"}]}]},"scope":{"patterns":[{"include":"#comments"},{"include":"#special-tags"},{"include":"#tags"},{"include":"#interpolation"},{"begin":"(?<=[>}])","end":"(?=[<{])","name":"text.svelte"}]},"special-tags":{"patterns":[{"include":"#special-tags-void"},{"include":"#special-tags-block-begin"},{"include":"#special-tags-block-end"}]},"special-tags-block-begin":{"begin":"(\\\\{)\\\\s*(#([a-z]*))","beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"end":"(})","endCaptures":{"0":{"name":"punctuation.definition.block.end.svelte"}},"name":"meta.special.$3.svelte meta.special.start.svelte","patterns":[{"include":"#special-tags-modes"}]},"special-tags-block-end":{"begin":"(\\\\{)\\\\s*(/([a-z]*))","beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"end":"(})","endCaptures":{"1":{"name":"punctuation.definition.block.end.svelte"}},"name":"meta.special.$3.svelte meta.special.end.svelte"},"special-tags-keywords":{"captures":{"1":{"name":"punctuation.definition.keyword.svelte"},"2":{"patterns":[{"match":"if|else\\\\s+if|else","name":"keyword.control.conditional.svelte"},{"match":"each|key","name":"keyword.control.svelte"},{"match":"await|then|catch","name":"keyword.control.flow.svelte"},{"match":"snippet","name":"keyword.control.svelte"},{"match":"html","name":"keyword.other.svelte"},{"match":"render","name":"keyword.other.svelte"},{"match":"debug","name":"keyword.other.debugger.svelte"},{"match":"const","name":"storage.type.svelte"}]}},"match":"([#/:@])(else\\\\s+if|[a-z]*)"},"special-tags-modes":{"patterns":[{"begin":"(?<=(if|key|then|catch|html|render).*?)\\\\G","end":"(?=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]},{"begin":"(?<=snippet.*?)\\\\G","end":"(?=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"captures":{"1":{"name":"entity.name.function.ts"}},"match":"\\\\G\\\\s*([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(?=<)"},{"begin":"(?<=<)","contentName":"meta.type.parameters.ts","end":"(?=>)","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>\\\\s*\\\\()","end":"(?=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]},{"begin":"\\\\G","end":"(?=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}]},{"begin":"(?<=const.*?)\\\\G","end":"(?=})","patterns":[{"include":"#destructuring-const"},{"begin":"\\\\G\\\\s*([$_[:alpha:]][$_[:alnum:]]+)\\\\s*","beginCaptures":{"1":{"name":"variable.other.constant.svelte"}},"end":"(?=[:=])"},{"begin":"(?=:)","end":"(?==)","name":"meta.type.annotation.svelte","patterns":[{"include":"source.ts"}]},{"begin":"(?==)","end":"(?=})","name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}]},{"begin":"(?<=each.*?)\\\\G","end":"(?=})","patterns":[{"begin":"\\\\G\\\\s*?(?=\\\\S)","contentName":"meta.embedded.expression.svelte source.ts","end":"(?=(?:^\\\\s*|\\\\s+)(as)|\\\\s*([,}]))","patterns":[{"include":"source.ts"}]},{"begin":"(as)|(?=[,}])","beginCaptures":{"1":{"name":"keyword.control.as.svelte"}},"end":"(?=})","patterns":[{"include":"#destructuring"},{"begin":"\\\\(","captures":{"0":{"name":"meta.brace.round.svelte"}},"contentName":"meta.embedded.expression.svelte source.ts","end":"\\\\)|(?=})","patterns":[{"include":"source.ts"}]},{"captures":{"1":{"name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}},"match":"(\\\\s*([$_[:alpha:]][$_[:alnum:]]*)\\\\s*)"},{"match":",","name":"punctuation.separator.svelte"}]}]},{"begin":"(?<=await.*?)\\\\G","end":"(?=})","patterns":[{"begin":"\\\\G\\\\s*?(?=\\\\S)","contentName":"meta.embedded.expression.svelte source.ts","end":"\\\\s+(then)|(?=})","endCaptures":{"1":{"name":"keyword.control.flow.svelte"}},"patterns":[{"include":"source.ts"}]},{"begin":"(?<=then\\\\b)","contentName":"meta.embedded.expression.svelte source.ts","end":"(?=})","patterns":[{"include":"source.ts"}]}]},{"begin":"(?<=debug.*?)\\\\G","end":"(?=})","patterns":[{"captures":{"0":{"name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}},"match":"[$_[:alpha:]][$_[:alnum:]]*"},{"match":",","name":"punctuation.separator.svelte"}]}]},"special-tags-void":{"begin":"(\\\\{)\\\\s*([:@](else\\\\s+if|[a-z]*))","beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.end.svelte"}},"name":"meta.special.$3.svelte","patterns":[{"include":"#special-tags-modes"}]},"tags":{"patterns":[{"include":"#tags-lang"},{"include":"#tags-void"},{"include":"#tags-general-end"},{"include":"#tags-general-start"}]},"tags-end-node":{"captures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.begin.svelte"},"2":{"name":"meta.tag.end.svelte","patterns":[{"include":"#tags-name"}]},"3":{"name":"meta.tag.end.svelte punctuation.definition.tag.end.svelte"},"4":{"name":"meta.tag.start.svelte punctuation.definition.tag.end.svelte"}},"match":"(</)(.*?)\\\\s*(>)|(/>)"},"tags-general-end":{"begin":"(</)([^/>\\\\s]*)","beginCaptures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.begin.svelte"},"2":{"name":"meta.tag.end.svelte","patterns":[{"include":"#tags-name"}]}},"end":"(>)","endCaptures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.end.svelte"}},"name":"meta.scope.tag.$2.svelte"},"tags-general-start":{"begin":"(<)([^/>\\\\s]*)","beginCaptures":{"0":{"patterns":[{"include":"#tags-start-node"}]}},"end":"(/?>)","endCaptures":{"1":{"name":"meta.tag.start.svelte punctuation.definition.tag.end.svelte"}},"name":"meta.scope.tag.$2.svelte","patterns":[{"include":"#tags-start-attributes"}]},"tags-lang":{"begin":"<(script|style|template)","beginCaptures":{"0":{"patterns":[{"include":"#tags-start-node"}]}},"end":"</\\\\1\\\\s*>|/>","endCaptures":{"0":{"patterns":[{"include":"#tags-end-node"}]}},"name":"meta.$1.svelte","patterns":[{"begin":"\\\\G(?=\\\\s*[^>]*?(type|lang)\\\\s*=\\\\s*([\\"']?)(?:text/)?(\\\\w+)\\\\2)","end":"(?=</|/>)","name":"meta.lang.$3.svelte","patterns":[{"include":"#tags-lang-start-attributes"}]},{"include":"#tags-lang-start-attributes"}]},"tags-lang-start-attributes":{"begin":"\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.svelte"}},"name":"meta.tag.start.svelte","patterns":[{"include":"#attributes-generics"},{"include":"#attributes"}]},"tags-name":{"patterns":[{"captures":{"1":{"name":"keyword.control.svelte"},"2":{"name":"punctuation.definition.keyword.svelte"},"3":{"name":"entity.name.tag.svelte"}},"match":"(svelte)(:)([a-z][-:\\\\w]*)"},{"match":"slot","name":"keyword.control.svelte"},{"captures":{"1":{"patterns":[{"match":"\\\\w+","name":"support.class.component.svelte"},{"match":"\\\\.","name":"punctuation.definition.keyword.svelte"}]},"2":{"name":"support.class.component.svelte"}},"match":"(\\\\w+(?:\\\\.\\\\w+)+)|([A-Z]\\\\w*)"},{"match":"[a-z][0-:\\\\w]*-[-0-:\\\\w]*","name":"meta.tag.custom.svelte entity.name.tag.svelte"},{"match":"[a-z][-0-:\\\\w]*","name":"entity.name.tag.svelte"}]},"tags-start-attributes":{"begin":"\\\\G","end":"(?=/?>)","name":"meta.tag.start.svelte","patterns":[{"include":"#attributes"}]},"tags-start-node":{"captures":{"1":{"name":"punctuation.definition.tag.begin.svelte"},"2":{"patterns":[{"include":"#tags-name"}]}},"match":"(<)([^/>\\\\s]*)","name":"meta.tag.start.svelte"},"tags-void":{"begin":"(<)(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.svelte"},"2":{"name":"entity.name.tag.svelte"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.begin.svelte"}},"name":"meta.tag.void.svelte","patterns":[{"include":"#attributes"}]},"type-parameters":{"name":"meta.type.parameters.ts","patterns":[{"include":"source.ts#comment"},{"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(extends|in|out|const)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))","name":"storage.modifier.ts"},{"include":"source.ts#type"},{"include":"source.ts#punctuation-comma"},{"match":"(=)(?!>)","name":"keyword.operator.assignment.ts"}]}},"scopeName":"source.svelte","embeddedLangs":["javascript","typescript","css","postcss"],"embeddedLangsLazy":["coffee","stylus","sass","scss","less","pug","markdown"]}`)),r=[...e,...t,...n,...a,i];export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as o,c as s,m as i,j as u,D as c}from"./cn-Dogu6PbV.js";function d(a){const[r,e]=o(a,["as","class","duration","spread","children"]),t=()=>Math.min(Math.max(r.spread??20,5),45),n=()=>r.as??"span";return s(c,i({get component(){return n()},get class(){return u("bg-size-[200%_auto] bg-clip-text font-medium text-transparent","animate-[shimmer_4s_infinite_linear]",r.class)},get style(){return{"background-image":`linear-gradient(to right, var(--color-muted-foreground) ${50-t()}%, var(--color-foreground) 50%, var(--color-muted-foreground) ${50+t()}%)`,"animation-duration":`${r.duration??4}s`}}},e,{get children(){return r.children}}))}export{d as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as o,s as a,u,f as l,m as f,j as g,t as c}from"./cn-Dogu6PbV.js";function h(i={}){let e;function s(){if(!e)return;e.style.height="auto";const t=e.scrollHeight;i.maxHeight&&t>i.maxHeight?(e.style.height=`${i.maxHeight}px`,e.style.overflowY="auto"):(e.style.height=`${t}px`,e.style.overflowY="hidden")}function n(t){e=t,t.addEventListener("input",s),requestAnimationFrame(s),o(()=>t.removeEventListener("input",s))}return{ref:n,resize:s}}var m=c("<textarea rows=1>");function x(i){const[e,s]=a(i,["class","maxHeight","autoResize"]),{ref:n}=h({maxHeight:e.maxHeight});return(()=>{var t=m(),r=e.autoResize!==!1?n:void 0;return typeof r=="function"&&u(r,t),l(t,f({get class(){return g("w-full resize-none rounded-md bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e.class)}},s),!1,!1),t})()}export{x as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as m}from"./Icon-D_Zmwmwh.js";import{c as e,m as o}from"./cn-Dogu6PbV.js";var h=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],t=a=>e(m,o(a,{name:"ThumbsDown",iconNode:h})),n=t,p=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],r=a=>e(m,o(a,{name:"ThumbsUp",iconNode:p})),d=r;export{n as a,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as m,a as f}from"./cn-Dogu6PbV.js";import{c as p,p as v}from"./store-C6rIooZz.js";let e={};function g(s){e.stack&&s.setAttribute("stack",e.stack),e.position&&s.setAttribute("position",e.position),e.max!==void 0&&s.setAttribute("max",String(e.max))}const b=5e3,x=7e3,{toasts:a,setToasts:o,mounted:R,setMounted:k}=m(()=>{const[s,t]=p([]),[i,n]=f(!1);return{toasts:s,setToasts:t,mounted:i,setMounted:n}});let u=0;function M(){return u+=1,`toast-${u}`}function h(s){const t=s.duration??b;return t===0?0:s.action?Math.max(t,x):t}const r=new Map;function A(s=null){if(typeof document>"u")return;const t=r.get(s);if(t&&t.isConnected)return t;const i=document.createElement("kai-toast-region");return document.body.appendChild(i),i.toasts=a,s&&(i.target=s),g(i),r.set(s,i),k(!0),i}function I(s){const t=a.findIndex(i=>i.id===s.id);t>=0?o(t,s):o(v(i=>{i.push(s)}))}function d(s){o(t=>t.filter(i=>i.id!==s))}function T(s){return{id:s,dismiss:()=>d(s),update:t=>{const i=a.findIndex(n=>n.id===s);i>=0&&o(i,n=>({...n,...t}))}}}function c(s,t,i){A(t?.target??null);const n=t?.id??M(),l={id:n,message:s,variant:t?.variant??i,action:t?.action,duration:t?.duration,dismissible:t?.dismissible,target:t?.target};return I(l),T(n)}const y=Object.assign((s,t)=>c(s,t,"neutral"),{success:(s,t)=>c(s,t,"success"),dismiss:d,clear:()=>o([])});export{h as r,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,m as c,s as M,a as V,i as n,j as z,S as l,F as B,n as P,h as p,k as E,t as o,G as g}from"./cn-Dogu6PbV.js";import{a as L,b as T,C as $}from"./collapsible-BiNwdOn6.js";import{B as D}from"./button-CKyYD9G4.js";import{c as F}from"./chevron-down-3SBiq8HF.js";import{I as h}from"./Icon-D_Zmwmwh.js";var G=[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],J=t=>e(h,c(t,{name:"CircleCheckBig",iconNode:G})),R=J,X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],A=t=>e(h,c(t,{name:"CircleX",iconNode:X})),H=A,K=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Q=t=>e(h,c(t,{name:"LoaderCircle",iconNode:K})),U=Q,W=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Y=t=>e(h,c(t,{name:"Settings",iconNode:W})),Z=Y,_=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Processing'),tt=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Ready'),et=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Completed'),rt=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Error'),at=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Input</h4><div class="rounded bg-muted/50 p-2 font-mono text-sm">'),nt=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Output</h4><div tabindex=0 class="max-h-60 overflow-auto rounded bg-muted/50 p-2 font-mono text-sm"><pre class=whitespace-pre-wrap>'),lt=o('<div><h4 class="mb-2 text-sm font-medium text-red-600 dark:text-red-400">Error</h4><div class="rounded bg-red-500/10 p-2 text-sm">'),ot=o('<div class="text-muted-foreground text-sm">Processing tool call...'),st=o('<div class="text-muted-foreground pt-2 text-xs"><span class=font-mono>Call ID: '),it=o('<div class="space-y-3 p-3">'),ut=o("<div>"),dt=o('<div class="flex items-center gap-2"><span class="font-mono text-sm font-medium">'),ct=o("<div class=mb-1><span class=text-muted-foreground>:</span> <span>");function S(t){return t===null?"null":t===void 0?"undefined":typeof t=="string"?t:typeof t=="object"?JSON.stringify(t,null,2):String(t)}function pt(t){return[e(l,{get when(){return t.state==="input-streaming"},get children(){return e(U,{class:"size-4 animate-spin text-blue-500"})}}),e(l,{get when(){return t.state==="input-available"},get children(){return e(Z,{class:"size-4 text-orange-500"})}}),e(l,{get when(){return t.state==="output-available"},get children(){return e(R,{class:"size-4 text-green-500"})}}),e(l,{get when(){return t.state==="output-error"},get children(){return e(H,{class:"size-4 text-red-500"})}})]}const mt={"input-streaming":"var(--color-tool-blue)","input-available":"var(--color-tool-amber)","output-available":"var(--color-tool-green)","output-error":"var(--color-tool-red)"},gt={"input-streaming":"hsl(217 91% 60%)","input-available":"hsl(38 92% 50%)","output-available":"hsl(142 71% 45%)","output-error":"hsl(0 84% 60%)"};function f(t){return{color:mt[t],background:`color-mix(in oklab, ${gt[t]} 15%, transparent)`}}function ht(t){return[e(l,{get when(){return t.state==="input-streaming"},get children(){var r=_();return p(i=>g(r,f("input-streaming"),i)),r}}),e(l,{get when(){return t.state==="input-available"},get children(){var r=tt();return p(i=>g(r,f("input-available"),i)),r}}),e(l,{get when(){return t.state==="output-available"},get children(){var r=et();return p(i=>g(r,f("output-available"),i)),r}}),e(l,{get when(){return t.state==="output-error"},get children(){var r=rt();return p(i=>g(r,f("output-error"),i)),r}})]}function ft(t){const[r,i]=M(t,["toolPart","defaultOpen","class"]),[w,O]=V(r.defaultOpen??!1),m=()=>r.toolPart.state,v=()=>r.toolPart.input,C=()=>r.toolPart.output;return(()=>{var x=ut();return n(x,e($,{get open(){return w()},onOpenChange:O,get children(){return[e(L,{as:u=>e(D,c({variant:"ghost",class:"h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal"},u,{get children(){return[(()=>{var a=dt(),s=a.firstChild;return n(a,e(pt,{get state(){return m()}}),s),n(s,()=>r.toolPart.type),n(a,e(ht,{get state(){return m()}}),null),a})(),e(F,{get class(){return z("size-4 transition-transform",w()&&"rotate-180")}})]}}))}),e(T,{class:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",get children(){var u=it();return n(u,e(l,{get when(){return P(()=>!!v())()&&Object.keys(v()).length>0},get children(){var a=at(),s=a.firstChild,d=s.nextSibling;return n(d,e(B,{get each(){return Object.entries(v())},children:([b,j])=>(()=>{var k=ct(),y=k.firstChild,I=y.firstChild,N=y.nextSibling,q=N.nextSibling;return n(y,b,I),n(q,()=>S(j)),k})()})),a}}),null),n(u,e(l,{get when(){return C()},get children(){var a=nt(),s=a.firstChild,d=s.nextSibling,b=d.firstChild;return n(b,()=>S(C())),a}}),null),n(u,e(l,{get when(){return P(()=>m()==="output-error")()&&r.toolPart.errorText},get children(){var a=lt(),s=a.firstChild,d=s.nextSibling;return n(d,()=>r.toolPart.errorText),a}}),null),n(u,e(l,{get when(){return m()==="input-streaming"},get children(){return ot()}}),null),n(u,e(l,{get when(){return r.toolPart.toolCallId},get children(){var a=st(),s=a.firstChild;return s.firstChild,n(s,()=>r.toolPart.toolCallId,null),a}}),null),u}})]}})),p(()=>E(x,z("mt-3 overflow-hidden rounded-lg bg-muted/30",r.class))),x})()}export{ft as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as E,x as I,y as L,a as n,p as M,c as m,P as R,u as S,g as v,i as q,h as B,j as G,A as g,k as H,S as J,t as K}from"./cn-Dogu6PbV.js";import{c as N,u as Q,a as U,A as V}from"./overlay-DydXYMQW.js";var W=K("<div role=tooltip style=position:fixed;pointer-events:none>");function X(C){const[o]=E(C,["content","children","class","openDelay","dismissOnClick"]),O=I(),f=L(),[i,r]=n(!1),[d,A]=n(),[x,F]=n();let a;const[$,c]=n(!1),[j,l]=n(!1),h=(e=0)=>{clearTimeout(a),e?a=window.setTimeout(()=>r(!0),e):r(!0)},u=()=>{clearTimeout(a),r(!1)},y=()=>{!$()&&!j()&&u()},b=()=>{o.dismissOnClick!==!1&&(c(!1),l(!1),u())};M(()=>clearTimeout(a));const s=N(i),p=Q(d,x,{placement:"top",gutter:6});return U({enabled:i,onDismiss:u,refs:()=>[d(),x()]}),[m(V,{as:"span",ref:A,get"aria-describedby"(){return i()?f:void 0},onPointerEnter:()=>{c(!0),h(o.openDelay??600)},onPointerLeave:()=>{c(!1),y()},onPointerDown:b,onClick:b,onFocusIn:()=>{l(!0),h()},onFocusOut:e=>{const t=d();t&&t.contains(e.relatedTarget)||(l(!1),y())},get children(){return o.children}}),m(J,{get when(){return s.present()},get children(){return m(R,{get mount(){return O.portalMount()},get children(){var e=W();return S(t=>{F(t),s.setRef(t)},e),v(e,"id",f),q(e,()=>o.content),B(t=>{var T=s.state()==="open"?"":void 0,w=s.state()==="closed"?"":void 0,k=`${p.pos().x}px`,D=`${p.pos().y}px`,P=p.hidden()?"hidden":"visible",z=G("z-50 rounded-md bg-foreground px-2.5 py-1 text-xs text-background shadow-md","animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95",o.class);return T!==t.e&&v(e,"data-expanded",t.e=T),w!==t.t&&v(e,"data-closed",t.t=w),k!==t.a&&g(e,"left",t.a=k),D!==t.o&&g(e,"top",t.o=D),P!==t.i&&g(e,"visibility",t.i=P),z!==t.n&&H(e,t.n=z),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}})}})]}export{X as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e}from"./Icon-D_Zmwmwh.js";import{c as p,m as o}from"./cn-Dogu6PbV.js";var r=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],t=a=>p(e,o(a,{name:"TriangleAlert",iconNode:r})),m=t;export{m as t};
|