@shytv/ai-chart 0.0.11 → 0.0.12

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.
@@ -89,9 +89,9 @@ Check the top-level render call using <`+n+`>.`)}return t}function Ne(e,t){if(e.
89
89
  `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,A({before:l,after:`>`},o.current()))),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,A({before:l,after:typeof p==`string`?` `:`)`},o.current())))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,A({before:l,after:i},o.current()))),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function F4(e,t,n){return N4(e,n)?`<`:`[`}j(),I4.peek=L4;function I4(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,A({before:c,after:`]`},s.current()));c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),A({before:c,after:`]`},s.current()));return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function L4(){return`[`}function R4(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function z4(e){let t=R4(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function B4(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function V4(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function H4(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?B4(n):R4(n),s=e.ordered?o===`.`?`)`:`.`:z4(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),V4(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function U4(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function W4(e,t,n,r){let i=U4(n),a=n.bulletCurrent||R4(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function G4(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function K4(e,t,n,r){if(!e.children.some(function(e){return W2(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function q4(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}J4.attention=Y4,J4.peek=X4;function J4(e,t,n,r){let i=n.enter(`phrasing`),a=y4([_4(e,Y4,n,n.createTracker(r))],r.before,r.after);return i(),a}function Y4(e,t){return{construct:`strong`,markers:q4(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function X4(e,t,n){return n.options.strong||`*`}j();function Z4(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,A(A({},r),{},{afterNode:i[a+1],beforeNode:i[a-1]}))}function Q4(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $4(e,t,n){let r=(V4(n)+(n.options.ruleSpaces?` `:``)).repeat(Q4(n));return n.options.ruleSpaces?r.slice(0,-1):r}var e3={blockquote:G2,break:Y2,code:$2,definition:n4,emphasis:b4,hardBreak:Y2,heading:w4,html:T4,image:D4,imageReference:k4,inlineCode:j4,link:P4,linkReference:I4,list:H4,listItem:W4,paragraph:G4,root:K4,strong:J4,text:Z4,thematicBreak:$4};j();function t3(){return{enter:{table:n3,tableData:o3,tableHeader:o3,tableRow:i3},exit:{codeText:s3,table:r3,tableData:a3,tableHeader:a3,tableRow:a3}}}function n3(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function r3(e){this.exit(e),this.data.inTable=void 0}function i3(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function a3(e){this.exit(e)}function o3(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function s3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,c3));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function c3(e,t){return t===`|`?t:e}function l3(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[u3],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
90
90
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
91
91
  `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,A(A({},r),{},{before:i,after:i}));return o(),a(),s}function c(e,i){return V2(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=e3.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function u3(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&d3(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function d3(e,t){let n=!1;return w1(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&hX(e)&&(t.options.setext||n))}j();function f3(){return{exit:{taskListCheckValueChecked:m3,taskListCheckValueUnchecked:m3,paragraph:h3}}}function p3(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:g3}}}function m3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function h3(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function g3(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=e3.listItem(e,t,n,A(A({},r),s.current()));return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function _3(){return[i2(),O2(),N2(),t3(),f3()]}function v3(e){return{extensions:[a2(),k2(e),P2(),l3(e),p3()]}}var y3={tokenize:N3,partial:!0},b3={tokenize:P3,partial:!0},x3={tokenize:F3,partial:!0},S3={tokenize:I3,partial:!0},C3={tokenize:L3,partial:!0},w3={name:`wwwAutolink`,tokenize:j3,previous:R3},T3={name:`protocolAutolink`,tokenize:M3,previous:z3},E3={name:`emailAutolink`,tokenize:A3,previous:B3},D3={};function O3(){return{text:D3}}for(var k3=48;k3<123;)D3[k3]=E3,k3++,k3===58?k3=65:k3===91&&(k3=97);D3[43]=E3,D3[45]=E3,D3[46]=E3,D3[95]=E3,D3[72]=[E3,T3],D3[104]=[E3,T3],D3[87]=[E3,w3],D3[119]=[E3,w3];function A3(e,t,n){let r=this,i,a;return o;function o(t){return!V3(t)||!B3.call(r,r.previous)||H3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return V3(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(C3,u,l)(t):t===45||t===95||AX(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&kX(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function j3(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!R3.call(r,r.previous)||H3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(y3,e.attempt(b3,e.attempt(x3,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function M3(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&z3.call(r,r.previous)&&!H3(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(kX(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||MX(t)||LX(t)||BX(t)||zX(t)?n(t):e.attempt(b3,e.attempt(x3,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function N3(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function P3(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(S3,c,s)(t):t===null||LX(t)||BX(t)||t!==45&&zX(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function F3(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(S3,t,a)(o):o===null||LX(o)||BX(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function I3(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||LX(o)||BX(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||LX(e)||BX(e)?t(e):r(e)}function a(e){return kX(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):kX(t)?(e.consume(t),o):n(t)}}function L3(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return AX(e)?n(e):t(e)}}function R3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||LX(e)}function z3(e){return!kX(e)}function B3(e){return!(e===47||V3(e))}function V3(e){return e===43||e===45||e===46||e===95||AX(e)}function H3(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var U3={tokenize:Z3,partial:!0};function W3(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:J3,continuation:{tokenize:Y3},exit:X3}},text:{91:{name:`gfmFootnoteCall`,tokenize:q3},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:G3,resolveTo:K3}}}}function G3(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=OX(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function K3(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function q3(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||LX(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(OX(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return LX(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function J3(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||LX(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=OX(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return LX(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),UX(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Y3(e,t,n){return e.check(sZ,t,e.attempt(U3,t,n))}function X3(e){e.exit(`gfmFootnoteDefinition`)}function Z3(e,t,n){let r=this;return UX(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Q3(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&xX(o,o.length,0,eZ(s,e.slice(r+1,n),t)),xX(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),xX(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=$X(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=$X(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var $3=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){e6(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function e6(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function t6(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function n6(){return{flow:{null:{name:`table`,tokenize:r6,resolveAll:i6}}}}function r6(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):IX(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):RX(t)?UX(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||LX(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,RX(t)?UX(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return RX(t)?UX(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||IX(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return RX(t)?UX(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||IX(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||IX(n)?(e.exit(`tableRow`),t(n)):RX(n)?UX(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||LX(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function i6(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new $3;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(o6(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=a6(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=a6(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=a6(f,t,o,i,n,d)):(o[0]=o[1],d=a6(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&o6(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=t6(t.events,n))}return e}function a6(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},s6(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=s6(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=s6(t.events,n[2]),a=s6(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},s6(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function o6(e,t,n,r,i){let a=[],o=s6(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function s6(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var c6={name:`tasklistCheck`,tokenize:u6};function l6(){return{text:{91:c6}}}function u6(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return LX(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return IX(r)?t(r):RX(r)?e.check({tokenize:d6},t,n)(r):n(r)}}function d6(e,t,n){return UX(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function f6(e){return wX([O3(),W3(),Q3(e),n6(),l6()])}var p6={};function m6(e){let t=this,n=e||p6,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(f6(n)),a.push(_3()),o.push(v3(n))}var h6=({copiedDuration:e=3e3}={})=>{let[t,n]=(0,h.useState)(!1),r=(0,h.useRef)(void 0),i=(0,h.useRef)(0);return(0,h.useEffect)(()=>()=>{i.current+=1,r.current!==void 0&&(clearTimeout(r.current),r.current=void 0,n(!1))},[]),{isCopied:t,copyToClipboard:t=>{if(!t||typeof navigator>`u`||!navigator.clipboard)return;let a=i.current;navigator.clipboard.writeText(t).then(()=>{a===i.current&&(r.current!==void 0&&clearTimeout(r.current),n(!0),r.current=setTimeout(()=>{r.current=void 0,n(!1)},e))},()=>{})}}},g6=m(u(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n=n||{};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r=r||i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a=a||{};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code)i.hooks.run(`complete`,c),r&&r.call(c.element);else if(i.hooks.run(`before-highlight`,c),!c.grammar)l(i.util.encode(c.code));else if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof a)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var F=S.prev;M&&(F=l(t,F,M),C+=M.length),u(t,F,T);var I=new a(f,g?i.tokenize(j,g):j,y,j);if(S=l(t,F,I),N&&l(t,S,N),T>1){var L={cause:f+`,`+m,reach:P};s(e,t,n,S.prev,C,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
92
- `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),f=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))(),1);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};var _6=`mine`;j();var v6=[`className`,`children`],y6=[`className`],b6=[`className`],x6=[`className`],S6=[`className`],C6=[`className`],w6=[`className`],T6=[`className`],E6=[`className`],D6=[`className`],O6=[`className`],k6=[`className`],A6=[`className`],j6=[`className`],M6=[`className`],N6=[`className`],P6=[`className`],F6=[`className`],I6=[`className`],L6=[`className`],R6=[`className`],z6=e=>{let t=(0,h.useRef)(e);if(e!==t.current){let n=t.current;e!==void 0&&n!==void 0&&Object.keys(n).length===Object.keys(e).length&&Object.keys(e).every(t=>n[t]===e[t])||(t.current=e)}return t.current},B6=e=>{let{className:t,children:n}=e,r=G(e,v6),i=eJ(),a=/\blanguage-mine\b/.test(t==null?``:t)||!t,o=String(n==null?``:n).replace(/\n$/,``),s=(0,h.useMemo)(()=>{if(!i||!a)return null;let e=g6.default.languages.mine;return e?g6.default.highlight(o,e,_6):null},[o,i,a]),c=Q(`font-mono`,i?`tcc-code text-inherit`:Q(`aui-md-inline-code`,`rounded-md border border-border/60`,`bg-muted px-1.5 py-0.5`,`text-[0.85em] text-foreground`),t);return!i||!a||s===null?(0,X.jsx)(`code`,A(A({className:c},r),{},{children:n})):(0,X.jsx)(`code`,A(A({className:c},r),{},{dangerouslySetInnerHTML:{__html:s}}))},V6=(0,h.memo)(({components:e,componentsByLanguage:t})=>{let n=z6(e),r=z6(t),i=(0,h.useMemo)(()=>n?A(A({},H6),Zq(n)):H6,[n]);return(0,X.jsx)(Y0,{remarkPlugins:[m6],className:Q(`aui-md`,`min-w-0 break-words`,`text-[15px] leading-[1.75] text-foreground`,`[&_img]:max-w-full`,`[&_svg]:max-w-full`),components:i,componentsByLanguage:r,defer:!0})}),H6=Zq({h1:e=>{let{className:t}=e,n=G(e,y6);return(0,X.jsx)(`h1`,A({className:Q(`aui-md-h1`,`mt-7 mb-3 scroll-m-20`,`text-2xl font-semibold tracking-tight`,`leading-tight text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h2:e=>{let{className:t}=e,n=G(e,b6);return(0,X.jsx)(`h2`,A({className:Q(`aui-md-h2`,`mt-6 mb-3 scroll-m-20`,`text-xl font-semibold tracking-tight`,`leading-snug text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h3:e=>{let{className:t}=e,n=G(e,x6);return(0,X.jsx)(`h3`,A({className:Q(`aui-md-h3`,`mt-5 mb-2 scroll-m-20`,`text-lg font-semibold`,`leading-snug text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h4:e=>{let{className:t}=e,n=G(e,S6);return(0,X.jsx)(`h4`,A({className:Q(`aui-md-h4`,`mt-4 mb-2 scroll-m-20`,`text-base font-semibold text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h5:e=>{let{className:t}=e,n=G(e,C6);return(0,X.jsx)(`h5`,A({className:Q(`aui-md-h5`,`mt-3 mb-1`,`text-sm font-semibold text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h6:e=>{let{className:t}=e,n=G(e,w6);return(0,X.jsx)(`h6`,A({className:Q(`aui-md-h6`,`mt-3 mb-1`,`text-sm font-medium text-muted-foreground`,`first:mt-0 last:mb-0`,t)},n))},p:e=>{let{className:t}=e,n=G(e,T6);return(0,X.jsx)(`p`,A({className:Q(`aui-md-p`,`my-3`,`text-[15px] leading-[1.75] text-foreground`,`first:mt-0 last:mb-0`,t)},n))},a:e=>{let{className:t}=e,n=G(e,E6);return(0,X.jsx)(`a`,A({className:Q(`aui-md-a`,`text-primary underline decoration-primary/40`,`underline-offset-4 transition-colors`,`hover:decoration-primary`,t)},n))},blockquote:e=>{let{className:t}=e,n=G(e,D6);return(0,X.jsx)(`blockquote`,A({className:Q(`aui-md-blockquote`,`my-4 border-s-2 border-border ps-4`,`text-muted-foreground`,`[&>p]:my-1`,t)},n))},ul:e=>{let{className:t}=e,n=G(e,O6);return(0,X.jsx)(`ul`,A({className:Q(`aui-md-ul`,`my-3 ms-6 list-disc`,`space-y-1`,`marker:text-muted-foreground`,`[&_ul]:my-1`,t)},n))},ol:e=>{let{className:t}=e,n=G(e,k6);return(0,X.jsx)(`ol`,A({className:Q(`aui-md-ol`,`my-3 ms-6 list-decimal`,`space-y-1`,`marker:text-muted-foreground`,`[&_ol]:my-1`,t)},n))},hr:e=>{let{className:t}=e,n=G(e,A6);return(0,X.jsx)(`hr`,A({className:Q(`aui-md-hr`,`my-6 border-0 border-t border-border`,t)},n))},table:e=>{let{className:t}=e,n=G(e,j6);return(0,X.jsx)(`div`,{className:`aui-md-table-wrapper my-4 w-full overflow-x-auto rounded-lg border border-border`,children:(0,X.jsx)(`table`,A({className:Q(`aui-md-table`,`w-full border-collapse text-sm`,t)},n))})},th:e=>{let{className:t}=e,n=G(e,M6);return(0,X.jsx)(`th`,A({className:Q(`aui-md-th`,`border-b border-border`,`bg-muted/60 px-3 py-2.5`,`text-start text-sm font-semibold text-foreground`,`[[align=center]]:text-center`,`[[align=right]]:text-right`,t)},n))},td:e=>{let{className:t}=e,n=G(e,N6);return(0,X.jsx)(`td`,A({className:Q(`aui-md-td`,`border-b border-border/70`,`px-3 py-2.5`,`text-start text-foreground`,`[[align=center]]:text-center`,`[[align=right]]:text-right`,t)},n))},tr:e=>{let{className:t}=e,n=G(e,P6);return(0,X.jsx)(`tr`,A({className:Q(`aui-md-tr`,`transition-colors`,`last:[&>td]:border-b-0`,`hover:bg-muted/30`,t)},n))},li:e=>{let{className:t}=e,n=G(e,F6);return(0,X.jsx)(`li`,A({className:Q(`aui-md-li`,`ps-0 leading-[1.75] text-foreground`,`[&>p]:my-1`,t)},n))},strong:e=>{let{className:t}=e,n=G(e,I6);return(0,X.jsx)(`strong`,A({className:Q(`aui-md-strong`,`font-semibold text-foreground`,t)},n))},sup:e=>{let{className:t}=e,n=G(e,L6);return(0,X.jsx)(`sup`,A({className:Q(`aui-md-sup`,`text-muted-foreground`,`[&>a]:text-xs [&>a]:no-underline`,t)},n))},pre:e=>{let{className:t}=e,n=G(e,R6);return(0,X.jsx)(`pre`,A({className:Q(`aui-md-pre`,`my-0 overflow-x-auto`,`rounded-b-xl border border-border`,`bg-[#f4f4f4] px-4 py-4`,`font-mono text-[13px] leading-6`,`text-[#242424]`,`dark:bg-[#2f2f2f] dark:text-[#ededed]`,`[&>code]:bg-transparent`,`[&>code]:p-0`,`[&>code]:text-inherit`,`[&>code]:border-0`,t)},n))},code:B6,CodeHeader:({language:e,code:t})=>{let{isCopied:n,copyToClipboard:r}=h6();return(0,X.jsxs)(`div`,{className:Q(`aui-code-header-root`,`mt-4 flex items-center justify-between`,`rounded-t-xl border border-b-0 border-border`,`bg-[#f4f4f4] px-4 py-2`,`dark:bg-[#2f2f2f]`,`text-xs`),children:[(0,X.jsx)(`span`,{className:`aui-code-header-language font-medium text-muted-foreground`,children:e||`code`}),(0,X.jsx)(bK,{tooltip:n?`已复制`:`复制代码`,onClick:()=>{t&&!n&&r(t)},className:Q(`size-7 rounded-md`,`text-muted-foreground`,`hover:bg-black/5 hover:text-foreground`,`dark:hover:bg-white/10`),children:n?(0,X.jsx)(nI,{className:`size-4`}):(0,X.jsx)(gI,{className:`size-4`})})]})}});function U6({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=h.useRef(e!==void 0),[a,o]=h.useState(()=>t),s=i&&e!==void 0?e:a;if(process.env.NODE_ENV!==`production`){h.useEffect(()=>{i!==(e!==void 0)&&UW([`A component is changing the ${i?``:`un`}controlled ${r} state of ${n} to be ${i?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
93
- `))},[r,n,e]);let{current:a}=h.useRef(t);h.useEffect(()=>{!i&&W6(a)!==W6(t)&&UW([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
94
- `))},[t])}return[s,h.useCallback(e=>{i||o(e)},[])]}function W6(e){let t=0,n=new WeakMap;try{let r=JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}});return r==null?`__top__:${typeof e}`:r}catch(e){return`__unserializable__`}}function G6(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=U6({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=OV(a,!0,!0),u=JH(),[d,f]=h.useState(),p=d===null?void 0:d==null?u:d,m=fz(e=>{let t=!a,n=RR(BR,e.nativeEvent);r(t,n),n.isCanceled||o(t)});return h.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var K6=h.createContext(void 0);process.env.NODE_ENV!==`production`&&(K6.displayName=`CollapsibleRootContext`);function q6(){let e=h.useContext(K6);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?DL(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var J6=`data-open`,Y6=`data-closed`,X6=cR,Z6=`data-panel-open`,Q6={[J6]:``},$6={[Y6]:``},e8={open(e){return e?{[Z6]:``}:null}},t8={open(e){return e?Q6:$6}};j();var n8=A(A({},t8),fR);j();var r8=[`render`,`className`,`defaultOpen`,`disabled`,`onOpenChange`,`open`,`style`],i8=h.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c}=e,l=G(e,r8),u=fz(o),d=G6({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=h.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=h.useMemo(()=>A(A({},d),{},{onOpenChange:u,state:f}),[d,u,f]),m=zB(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:n8});return(0,X.jsx)(K6.Provider,{value:p,children:m})});process.env.NODE_ENV!==`production`&&(i8.displayName=`CollapsibleRoot`),j();var a8=[`className`,`disabled`,`render`,`nativeButton`,`style`],o8=A(A({},e8),fR),s8=h.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=q6(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d}=e,f=G(e,a8),{getButtonProps:p,buttonRef:m}=YW({disabled:c,native:u});return zB(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:o8})});process.env.NODE_ENV!==`production`&&(s8.displayName=`CollapsibleTrigger`),j();var c8={height:void 0,width:void 0};function l8(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=h.useRef(null),f=h.useRef(null),[p,m]=h.useState(c8),g=h.useRef(c8),_=h.useRef(!1),v=h.useRef(s),y=h.useRef(!1),[b,x]=h.useState(!1),S=h.useRef(null),C=tz(t,d),w=sz(s),T=MV(d),E=!s&&!a,D=b?`idle`:u,O=s&&(v.current||y.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?g.current:p,j=n&&E&&f.current!==`css-animation`,M=fz((e,t=!0)=>{t&&(g.current=e),m(e)}),N=fz(()=>{var e;(e=S.current)==null||e.call(S),S.current=null}),P=fz(e=>{N(),S.current=()=>{S.current=null,e()}}),F=fz(()=>{s&&a&&f.current===`css-animation`&&(y.current=!0)});TL(()=>{b&&u!==`starting`&&x(!1)},[b,u]),h.useEffect(()=>()=>{F(),N()},[F,N]),TL(()=>{s||(v.current=!1,y.current=!1);let e=d.current;if(!e)return;!s&&S.current&&N();let t=d8(e,O);if(f.current=t,s&&u===`idle`&&v.current&&t===`css-animation`){g.current=u8(e);return}if(s&&u===`starting`){let n=_.current;if(_.current=!1,t===`none`){M(u8(e)),x(!0);return}if(t===`css-transition`){let t=m8(e);if(M(u8(e)),!n)return t;let r=p8(e,`transition-duration`,`0s`);return P(r),x(!0),t}M(u8(e));let r=p8(e,`animation-name`,`none`);if(!n){r();return}let i=p8(e,`animation-duration`,`0s`);r(),P(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){M(c8,!1),c(!1);return}M(u8(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=u8(e);n.height>0||n.width>0?(M(n),t===`css-animation`&&p8(e,`animation-name`,`none`)()):c(!1)},[a,s,N,M,c,P,O,u]),NV({enabled:s&&a&&D===`idle`,open:!0,ref:d,onComplete(){s&&M(c8,!1)}}),h.useEffect(()=>{if(s||!a||D!==`ending`)return;if(!d.current){c(!1),M(c8,!1);return}let e=new AbortController,t=-1;function n(){w.current||(c(!1),M(c8,!1))}return t=vz.request(()=>{T(n,e.signal)}),()=>{vz.cancel(t),e.abort()}},[w,a,s,D,T,M,c]),TL(()=>{let e=d.current;e&&n&&E&&e.setAttribute(`hidden`,`until-found`)},[E,n]),h.useEffect(function(){let e=d.current;if(!e)return;let t=ML.create(),n=-1,r=(r,i)=>{t.start(0,()=>{w.current||(n=vz.request(()=>{w.current||(r&&(_.current=!1),i&&e.setAttribute(X6,``),e.setAttribute(`hidden`,`until-found`))}))})},i=$R(e,`beforematch`,t=>{let n=RR(zR,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}_.current=!0;let i=e.hasAttribute(X6);e.removeAttribute(X6),l(!0),r(!0,i)});return()=>{t.clear(),vz.cancel(n),i()}},[w,o,l]);let I=i||n||a||s;return{height:k.height,props:A(A({},j?{[X6]:``}:void 0),{},{hidden:E,id:r}),ref:C,shouldPreventOpenAnimation:O,shouldRender:I,transitionStatus:D,width:k.width}}function u8(e){return{height:e.scrollHeight,width:e.scrollWidth}}function d8(e,t){let n=KS(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&f8(n.animationDuration),i=f8(n.transitionDuration);return r&&i?(process.env.NODE_ENV!==`production`&&xB(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):i?`css-transition`:r?`css-animation`:`none`}function f8(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function p8(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function m8(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=vz.request(n);return()=>{vz.cancel(r),n()}}var h8=`--collapsible-panel-height`,g8=`--collapsible-panel-width`;j();var _8=[`className`,`hiddenUntilFound`,`keepMounted`,`render`,`id`,`style`],v8=h.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s}=e,c=G(e,_8);process.env.NODE_ENV!==`production`&&h.useEffect(()=>{r&&i===!1&&xB("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:g,state:_,transitionStatus:v}=q6(),y=r!=null&&r,b=i!=null&&i,x=o||void 0,S=x==null?l:x;TL(()=>(m(e=>x==null?e===null?void 0:e:x),()=>{m(e=>e===x?null:e)}),[x,m]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:k}=l8({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:g,transitionStatus:v}),j=A(A({},_),{},{transitionStatus:O}),M=wB(s,j),N=zB(`div`,A(A({},e),{},{style:void 0}),{state:j,ref:T,props:[w,{style:{[h8]:C===void 0?`auto`:`${C}px`,[g8]:k===void 0?`auto`:`${k}px`}},c,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:n8});return D?N:null});process.env.NODE_ENV!==`production`&&(v8.displayName=`CollapsiblePanel`),j();var y8=(0,h.forwardRef)(function(e,t){return(0,X.jsx)(i8,A({ref:t,"data-slot":`collapsible`},e))});function b8(e){let t=MW({},(jW(e),e));return(0,X.jsx)(s8,A({"data-slot":`collapsible-trigger`},t))}function x8(e){let t=MW({},(jW(e),e));return(0,X.jsx)(v8,A({"data-slot":`collapsible-content`},t))}j();var S8=[`className`,`variant`,`open`,`onOpenChange`,`defaultOpen`,`streaming`,`showContent`,`onAnimationStart`,`style`,`children`],C8=[`side`,`className`],w8=[`active`,`duration`,`className`],T8=[`className`,`children`],E8=[`className`,`children`],D8=(0,h.createContext)({isPreview:!1,showContent:!0}),O8=UG(`aui-reasoning-root mb-0 w-full`,{variants:{variant:{outline:`rounded-lg px-0 py-2`,ghost:``,muted:`bg-muted/50 rounded-lg px-3 py-2`}},defaultVariants:{variant:`outline`}}),k8=(0,h.forwardRef)(function(e,t){let{className:n,variant:r,open:i,onOpenChange:a,defaultOpen:o=!1,streaming:s,showContent:c=!0,onAnimationStart:l,style:u,children:d}=e,f=G(e,S8),[p]=(0,h.useState)(o),[m,g]=(0,h.useState)(null),_=i!==void 0,v=_?i:m==null?s||p:m,y=s===!0&&v,b=(0,h.useRef)(s);RK(()=>{b.current!==s&&(b.current=s,_||m!==null||p||l==null||l())},[s,_,m,p,l]);let x=(0,h.useCallback)(e=>{l==null||l(),_||g(e),a==null||a(e)},[l,_,a]),S={isPreview:c&&y,showContent:c};return c?(0,X.jsx)(y8,A(A({ref:t,"data-slot":`reasoning-root`,"data-variant":r,open:v,onOpenChange:x,className:Q(`group/reasoning-root`,O8({variant:r,className:n})),style:A({"--animation-duration":`200ms`},typeof u==`object`&&u||{})},f),{},{children:(0,X.jsx)(D8.Provider,{value:S,children:d})})):(0,X.jsx)(`div`,A(A({ref:t,"data-slot":`reasoning-root`,"data-variant":r,className:Q(`group/reasoning-root`,O8({variant:r,className:n})),style:typeof u==`function`?void 0:u},f),{},{children:(0,X.jsx)(D8.Provider,{value:S,children:d})}))});function A8(e){let{side:t=`bottom`,className:n}=e,r=G(e,C8);return t===`top`?(0,X.jsx)(`div`,A({"data-slot":`reasoning-fade`,className:Q(`aui-reasoning-fade pointer-events-none absolute inset-x-0 top-0 z-10 h-8`,`bg-[linear-gradient(to_bottom,var(--color-background),transparent)]`,`group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_bottom,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]`,`fade-in-0 animate-in`,`animation-duration-(--animation-duration)`,n)},r)):(0,X.jsx)(`div`,A({"data-slot":`reasoning-fade`,className:Q(`aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8`,`bg-[linear-gradient(to_top,var(--color-background),transparent)]`,`group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_top,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]`,`fade-in-0 animate-in`,`animation-duration-(--animation-duration)`,n)},r))}function j8(e){let{active:t,duration:n,className:r}=e,i=G(e,w8),{showContent:a}=(0,h.useContext)(D8),o=t?`正在思考...`:n===void 0?`思考过程`:`思考了 ${n} 秒`,s=Q(`aui-reasoning-trigger flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-sm text-muted-foreground`,t&&a&&`hover:text-foreground transition-colors active:scale-[0.98]`,r),c=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(eI,{"data-slot":`reasoning-trigger-icon`,className:`aui-reasoning-trigger-icon size-4 shrink-0`}),(0,X.jsx)(`span`,{"data-slot":`reasoning-trigger-label`,className:Q(`aui-reasoning-trigger-label-wrapper inline-block leading-none tabular-nums`,t&&`shimmer motion-reduce:animate-none`),children:o})]});return!a||!t?(0,X.jsx)(`div`,{"data-slot":`reasoning-trigger`,className:s,children:c}):(0,X.jsx)(b8,A(A({"data-slot":`reasoning-trigger`,className:s},i),{},{children:c}))}function M8(e){let{className:t,children:n}=e,r=G(e,T8),{showContent:i}=(0,h.useContext)(D8);return i?(0,X.jsx)(x8,A(A({"data-slot":`reasoning-content`,className:Q(`aui-reasoning-content relative overflow-hidden text-sm text-muted-foreground outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:n})):null}function N8(e){let{className:t,children:n}=e,r=G(e,E8),{showContent:i}=(0,h.useContext)(D8);return i?(0,X.jsx)(`div`,A(A({"data-slot":`reasoning-text`,className:Q(`aui-reasoning-text relative z-0 max-h-64 overflow-y-auto ps-6 pt-2 pb-2 leading-relaxed text-pretty`,`motion-reduce:animate-none`,t)},r),{},{children:(0,X.jsx)(`div`,{className:`aui-reasoning-text-content space-y-4`,children:n})})):null}j();var P8=[`onAnimationStart`],F8=(0,h.forwardRef)(function(e,t){let{onAnimationStart:n}=e,r=G(e,P8),i=(0,h.useRef)(null),a=$P(i,200),o=(0,h.useCallback)(()=>{a(),n==null||n()},[a,n]),s=(0,h.useCallback)(e=>{if(i.current=e,typeof t==`function`){let n=t(e);if(typeof n==`function`)return()=>{i.current=null,n()}}else t&&(t.current=e)},[t]);return(0,X.jsx)(k8,A({ref:s,onAnimationStart:o},r))}),I8=()=>(0,X.jsx)(V6,{}),L8=({children:e,startIndex:t,endIndex:n})=>{let r=Y(e=>{var r;if(((r=e.message.status)==null?void 0:r.type)!==`running`)return!1;for(let r=t;r<=n;r++){var i;if(((i=e.message.parts[r])==null?void 0:i.status.type)===`running`)return!0}return!1});return(0,X.jsxs)(F8,{streaming:r,showContent:!1,children:[(0,X.jsx)(j8,{active:r}),(0,X.jsx)(M8,{"aria-busy":r,"aria-label":`AI 思考过程`,children:(0,X.jsx)(N8,{children:e})})]})},R8=(0,h.memo)(I8);R8.displayName=`Reasoning`,R8.Root=F8,R8.Trigger=j8,R8.Content=M8,R8.Text=N8,R8.Fade=A8;var z8=(0,h.memo)(L8);z8.displayName=`ReasoningGroup`,j();var B8=[`className`];function V8(e){let{className:t}=e,n=G(e,B8);return(0,X.jsx)(`textarea`,A({"data-slot":`textarea`,className:Q(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,t)},n))}j();var H8=[`className`,`open`,`onOpenChange`,`defaultOpen`,`children`],U8=[`className`],W8=[`toolName`,`status`,`responseDeliveryStatus`,`className`],G8=[`className`,`children`],K8=[`argsText`,`className`],q8=[`result`,`className`],J8=[`status`,`className`],Y8=[`approval`,`className`,`focusReceiptRef`,`receiptRef`],X8=[`className`,`forwardedRef`,`carryFocusRef`,`addResult`,`resume`,`interrupt`,`approval`,`respondToApproval`,`status`],Z8=200,Q8=`active:scale-[0.98]`;function $8(e){let{className:t,open:n,onOpenChange:r,defaultOpen:i=!1,children:a}=e,o=G(e,H8),s=(0,h.useRef)(null),[c,l]=(0,h.useState)(i),u=$P(s,Z8),d=n!==void 0,f=d?n:c,p=(0,h.useCallback)(e=>{u(),d||l(e),r==null||r(e)},[u,d,r]);return(0,X.jsx)(y8,A(A({ref:s,"data-slot":`tool-fallback-root`,open:f,onOpenChange:p,className:Q(`aui-tool-fallback-root group/tool-fallback-root w-full`,t),style:{"--animation-duration":`${Z8}ms`}},o),{},{children:a}))}var e5={running:PI,complete:nI,incomplete:mI,"requires-action":uI},t5=e=>{if(e<1e3)return`<1秒`;let t=e/1e3;return t<10?`${(Math.floor(t*10)/10).toFixed(1)}秒`:t<60?`${Math.floor(t)}秒`:`${Math.floor(t/60)}分 ${Math.floor(t%60)}秒`};function n5(e){let{className:t}=e,n=G(e,U8),r=jy();return r===void 0?null:(0,X.jsx)(`span`,A(A({"data-slot":`tool-fallback-duration`,className:Q(`aui-tool-fallback-duration text-muted-foreground text-xs tabular-nums`,t)},n),{},{children:t5(r)}))}function r5(e){var t;let{toolName:n,status:r,responseDeliveryStatus:i,className:a}=e,o=G(e,W8),s=(t=r==null?void 0:r.type)==null?`complete`:t,c=s===`running`,l=(r==null?void 0:r.type)===`incomplete`&&r.reason===`cancelled`,u=e5[s],d=i===`queued`?`回复已排队,尚未发送`:s===`running`?`正在执行工具`:s===`requires-action`?`等待工具操作`:s===`incomplete`?l?`已取消工具调用`:`工具执行失败`:`已调用工具`;return(0,X.jsxs)(b8,A(A({"data-slot":`tool-fallback-trigger`,className:Q(`aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]`,a)},o),{},{children:[(0,X.jsx)(u,{"data-slot":`tool-fallback-trigger-icon`,className:Q(`aui-tool-fallback-trigger-icon size-4 shrink-0`,l&&`text-muted-foreground`,c&&`animate-spin [animation-duration:0.6s]`)}),(0,X.jsxs)(`span`,{"data-slot":`tool-fallback-trigger-label`,className:Q(`aui-tool-fallback-trigger-label-wrapper inline-block min-w-0 text-start leading-none wrap-anywhere`,l&&`text-muted-foreground line-through`,c&&`shimmer motion-reduce:animate-none`),children:[d,`:`,(0,X.jsx)(`b`,{children:n})]}),(0,X.jsx)(n5,{}),(0,X.jsx)(iI,{"data-slot":`tool-fallback-trigger-chevron`,className:Q(`aui-tool-fallback-trigger-chevron size-4 shrink-0`,`transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none`,`-rotate-90`,`group-data-open/trigger:rotate-0`,`group-data-panel-open/trigger:rotate-0`)})]}))}function i5(e){let{className:t,children:n}=e,r=G(e,G8);return(0,X.jsx)(x8,A(A({"data-slot":`tool-fallback-content`,className:Q(`aui-tool-fallback-content relative overflow-hidden text-sm outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:(0,X.jsx)(`div`,{className:Q(`flex flex-col gap-2 ps-6 pt-1 pb-2 ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`group-data-open/collapsible-content:animate-in group-data-open/collapsible-content:fade-in-0 group-data-open/collapsible-content:blur-in-[2px] group-data-open/collapsible-content:slide-in-from-top-1`,`group-data-closed/collapsible-content:animate-out group-data-closed/collapsible-content:fade-out-0 group-data-closed/collapsible-content:blur-out-[2px] group-data-closed/collapsible-content:slide-out-to-top-1`,`group-data-closed/collapsible-content:animation-duration-(--animation-duration) group-data-open/collapsible-content:animation-duration-(--animation-duration)`),children:n})}))}function a5(e){let{argsText:t,className:n}=e,r=G(e,K8);return t?(0,X.jsx)(`div`,A(A({"data-slot":`tool-fallback-args`,className:Q(`aui-tool-fallback-args`,n)},r),{},{children:(0,X.jsx)(`pre`,{className:`aui-tool-fallback-args-value bg-muted/50 text-foreground/90 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap`,children:t})})):null}var o5=(e,t)=>{if(typeof e==`string`)return e;try{if(e instanceof Error)return String(e);let n=JSON.stringify(e,null,t);if(n!==void 0)return n}catch(e){}try{return String(e)}catch(e){return`[无法序列化的数据]`}};function s5(e){let{result:t,className:n}=e,r=G(e,q8);return t===void 0?null:(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-result`,className:Q(`aui-tool-fallback-result`,n)},r),{},{children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-result-header text-muted-foreground text-xs font-medium`,children:`执行结果:`}),(0,X.jsx)(`pre`,{className:`aui-tool-fallback-result-content bg-muted/50 text-foreground/90 mt-1 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap`,children:o5(t,2)})]}))}function c5(e){let{status:t,className:n}=e,r=G(e,J8);if((t==null?void 0:t.type)!==`incomplete`)return null;let i=t.error,a=i==null?null:o5(i);if(!a)return null;let o=t.reason===`cancelled`?`取消原因:`:`错误信息:`;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-error`,className:Q(`aui-tool-fallback-error`,n)},r),{},{children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-error-header text-muted-foreground font-semibold`,children:o}),(0,X.jsx)(`p`,{className:`aui-tool-fallback-error-reason text-muted-foreground break-words whitespace-pre-line`,children:a})]}))}var l5=`Approved by user`,u5=`User denied tool execution`,d5={"allow-once":`允许一次`,"allow-always":`始终允许`,"reject-once":`拒绝一次`,"reject-always":`始终拒绝`},f5=e=>Object.hasOwn(d5,e),p5=e=>e===`allow-once`||e===`allow-always`,m5=e=>{var t,n;return(t=(n=e.label)==null?f5(e.kind)?d5[e.kind]:void 0:n)==null?e.id:t},h5=e=>(e==null?void 0:e.display)===`select`||(e==null?void 0:e.display)===`text`||(e==null?void 0:e.display)===`questions`,g5=e=>{var t;return!((t=e.options)!=null&&t.length)||e.allowFreeform===!0},_5=(e,t)=>{var n,r;return[...((n=t==null?void 0:t.optionIds)==null?[]:n).map(t=>{var n,r;return(n=(r=e.options)==null||(r=r.find(e=>e.id===t))==null?void 0:r.label)==null?t:n}),...t!=null&&(r=t.text)!=null&&r.trim()?[t.text]:[]]},v5=e=>e!=null&&(e.approved!==void 0||e.resolution!==void 0),y5=e=>{var t;if(e.resolution!==void 0)return{outcome:`closed`,label:e.resolution===`cancelled`?`已取消,未作出决定`:`已过期,未作出决定`};let n=e.optionId===void 0||(t=e.options)==null?void 0:t.find(t=>t.id===e.optionId),r=n===void 0?e.optionId===void 0?void 0:e.optionId:m5(n),i=h5(e)||n!==void 0&&!f5(n.kind),a=e.isAutomatic?`(自动处理)`:``;return e.approved?{outcome:`allowed`,label:`${i?`已回答`:`已允许`}${a}`,option:r}:{outcome:`refused`,label:`${i?`已关闭`:`已拒绝`}${a}`,option:r}},b5={allowed:nI,refused:mI,closed:fI};function x5(e){var t;let{approval:n,className:r,focusReceiptRef:i,receiptRef:a}=e,o=G(e,Y8);(0,h.useLayoutEffect)(()=>{var e;let t=i.current===n.id;i.current=null,t&&((e=a.current)==null||e.focus({preventScroll:!0}))},[n.id,i,a]);let s=y5(n),c=b5[s.outcome],l=[...new Set([n.text,n.reason].filter(e=>typeof e==`string`&&e!==``))];return(0,X.jsxs)(`div`,A(A({ref:a,"data-slot":`tool-fallback-approval-receipt`,"data-outcome":s.outcome,tabIndex:-1,className:Q(`aui-tool-fallback-approval-receipt flex flex-col gap-1.5 pt-1`,r)},o),{},{children:[n.prompt?(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-prompt text-muted-foreground whitespace-pre-line`,children:n.prompt}):null,(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-receipt-label flex items-center gap-1.5`,children:[(0,X.jsx)(c,{"aria-hidden":!0,className:`text-muted-foreground size-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`font-medium`,children:s.label}),s.option===void 0?null:(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· `,s.option]})]}),n.answers&&((t=n.questions)==null?void 0:t.map(e=>{var t;let r=_5(e,n.answers&&Object.hasOwn(n.answers,e.id)?n.answers[e.id]:void 0);return r.length===0?null:(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-receipt-answer whitespace-pre-line`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:(t=e.header)==null?e.prompt:t}),` `,`· `,r.join(`、`)]},e.id)})),l.map(e=>(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-receipt-note text-muted-foreground whitespace-pre-line`,children:e},e))]}))}function S5({questions:e,dismissible:t,locked:n,onSend:r,onDismiss:i}){let[a,o]=(0,h.useState)(()=>new Map),[s,c]=(0,h.useState)(()=>new Map),l=(e,t)=>o(n=>{var r;let i=(r=n.get(e.id))==null?[]:r,a=i.includes(t)?i.filter(e=>e!==t):e.multiple?[...i,t]:[t];return new Map(n).set(e.id,a)}),u=e=>{var t;let n=(t=a.get(e.id))==null?[]:t,r=s.get(e.id),i=r!=null&&r.trim()?r:void 0;return A(A({},n.length>0&&{optionIds:n}),i!==void 0&&{text:i})},d=e.length>0&&e.every(e=>{let t=u(e);return t.optionIds!==void 0||t.text!==void 0});return(0,X.jsxs)(X.Fragment,{children:[e.map(e=>{var t,r,i,o,u;let d=(t=a.get(e.id))==null?[]:t,f=(r=(i=e.options)==null?void 0:i.some(e=>e.description))!=null&&r;return(0,X.jsxs)(`div`,{role:`group`,"aria-label":e.prompt,"data-slot":`tool-fallback-approval-question`,className:`aui-tool-fallback-approval-question flex flex-col gap-2`,children:[(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-question-prompt text-foreground whitespace-pre-line`,children:[e.header?(0,X.jsx)(`span`,{className:`text-muted-foreground me-1.5 text-xs font-medium uppercase`,children:e.header}):null,e.prompt]}),e.options&&e.options.length>0?(0,X.jsx)(`div`,{className:Q(`flex gap-2`,f?`flex-col items-stretch`:`flex-wrap items-center`),children:e.options.map(t=>{let r=d.includes(t.id);return(0,X.jsxs)(KG,{size:`sm`,variant:r?`default`:`outline`,className:Q(Q8,f&&`h-auto flex-col items-start gap-0.5 py-2 text-start whitespace-normal`),"aria-pressed":r,onClick:()=>l(e,t.id),disabled:n,children:[(0,X.jsx)(`span`,{children:t.label}),t.description?(0,X.jsx)(`span`,{className:`text-xs font-normal opacity-80`,children:t.description}):null]},t.id)})}):null,g5(e)?(0,X.jsx)(V8,{value:(o=s.get(e.id))==null?``:o,onChange:t=>c(n=>new Map(n).set(e.id,t.target.value)),disabled:n,"aria-label":e.prompt,placeholder:(u=e.options)!=null&&u.length?`或者输入其他答案`:`请输入你的答案`}):null]},e.id)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:Q8,onClick:()=>{!n&&d&&r(Object.fromEntries(e.map(e=>[e.id,u(e)])))},disabled:n||!d,children:`发送`}),t?(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:Q8,onClick:i,disabled:n,children:`关闭`}):null]})]})}var C5=(e,t,n)=>(e==null?void 0:e.type)!==`requires-action`||e.reason!==`interrupt`||t!=null||n!=null,w5=(0,h.forwardRef)(function(e,t){var n;let r=(0,h.useRef)(!1);return(0,X.jsx)(T5,A({carryFocusRef:r,forwardedRef:t},e),(n=e.approval)==null?void 0:n.id)});function T5(e){var t;let{className:n,forwardedRef:r,carryFocusRef:i,addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l,status:u}=e,d=G(e,X8),[f,p]=(0,h.useState)(!1),m=Y(e=>e.thread.voice!==void 0),g=Y(e=>e.thread.capabilities.answerToolCall),_=f||m,[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)(``),[S,C]=(0,h.useState)(null),w=(u==null?void 0:u.type)===`requires-action`,[T,E]=(0,h.useState)(w),[D,k]=(0,h.useState)(0),j=(0,h.useRef)(D);(0,h.useLayoutEffect)(()=>{j.current=D},[D]),w!==T&&(E(w),w&&(p(!1),y(null),x(``),C(null),k(D+1)));let M=(0,h.useRef)(null),N=(0,h.useRef)(null),P=(0,h.useRef)(null);(0,h.useLayoutEffect)(()=>{if(i.current){var e;i.current=!1,(e=M.current)==null||e.focus({preventScroll:!0})}return()=>{var e,t;let n=(e=M.current)==null?N.current:e;i.current=(t=n==null?void 0:n.contains(n.ownerDocument.activeElement))!=null&&t}},[i]),(0,h.useImperativeHandle)(r,()=>{var e;return(e=M.current)==null?N.current:e});let F=(0,h.useCallback)(e=>{let t=M.current;P.current=!e&&t!=null&&t.contains(t.ownerDocument.activeElement)?c==null?void 0:c.id:null,M.current=e},[c==null?void 0:c.id]),I=c!=null&&!v5(c)&&u!==void 0&&u.type!==`requires-action`&&!(f&&u.type===`running`);(0,h.useLayoutEffect)(()=>{I&&(P.current=null)},[I]);let L=()=>{let e=M.current;e!=null&&e.contains(e.ownerDocument.activeElement)&&e.focus({preventScroll:!0})};if(c!=null&&v5(c))return(0,X.jsx)(x5,A({approval:c,receiptRef:N,focusReceiptRef:P,className:n},d));if(I||!C5(u,c,s))return null;let R=c!=null&&c.prompt?(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-prompt text-foreground whitespace-pre-line`,children:c.prompt}):null;if(!g)return R&&(0,X.jsx)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:R}));let z=l?c==null?void 0:c.options:void 0,B=c!=null&&l!=null&&ie(c),ee=e=>{L(),p(!0),y(null),C(null),O(function*(){try{yield e()}catch(e){if(j.current!==D)return;p(!1),C(e instanceof Error?e.message:String(e))}})()},V=e=>{if(!_){if(c!=null&&c.approved===void 0&&l)ee(()=>l(A({approved:e},ne())));else if(s)ee(()=>o==null?void 0:o({approved:e}));else if((u==null?void 0:u.type)===`requires-action`&&u.reason===`interrupt`)return;else ee(()=>a==null?void 0:a(e?l5:u5))}},te=e=>{_||ee(()=>l==null?void 0:l(f5(e.kind)?A({optionId:e.id},ne()):A({optionId:e.id,approved:!0},ne())))},ne=()=>b.trim()?{text:b}:{},H=()=>{_||ee(()=>l==null?void 0:l({text:b}))},U=()=>{_||ee(()=>l==null?void 0:l({approved:!1}))},re=e=>{e.confirm?(L(),y(e.id)):te(e)},W=v==null||z==null?void 0:z.find(e=>e.id===v),ae=h5(c),oe=ae&&l!=null&&(c==null?void 0:c.dismissible)===!0?(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:Q8,onClick:U,disabled:_,children:`关闭`}):null,se=S?(0,X.jsx)(`p`,{role:`alert`,className:`aui-tool-fallback-approval-error text-destructive text-xs whitespace-pre-line`,children:S}):null,ce=B?(0,X.jsxs)(`div`,{className:`aui-tool-fallback-approval-answer flex flex-col items-start gap-2`,children:[(0,X.jsx)(V8,{value:b,onChange:e=>x(e.target.value),disabled:_,"aria-label":ae?(t=c==null?void 0:c.prompt)==null?`答案`:t:`备注`,placeholder:ae?`请输入你的答案`:`填写决策备注`}),ae&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:Q8,onClick:H,disabled:_,children:`发送`}),oe]})]}):null;if((c==null?void 0:c.display)===`questions`&&l){var le;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-3 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsx)(S5,{questions:(le=c.questions)==null?[]:le,dismissible:c.dismissible===!0,locked:_,onSend:e=>ee(()=>l({answers:e})),onDismiss:U}),se]}))}if(W){var ue,de;let e=typeof W.confirm==`object`?W.confirm:void 0,t=(ue=e==null?void 0:e.description)==null?W.description:ue;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval-confirm`,tabIndex:-1,className:Q(`aui-tool-fallback-approval-confirm flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-confirm-title font-semibold`,children:(de=e==null?void 0:e.title)==null?`${m5(W)}?`:de}),t&&(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-confirm-description text-muted-foreground whitespace-pre-line`,children:t}),W.grants&&W.grants.length>0&&(0,X.jsx)(`ul`,{className:`aui-tool-fallback-approval-confirm-grants flex flex-col gap-1`,children:W.grants.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsx)(`code`,{className:`aui-tool-fallback-approval-confirm-grant bg-muted rounded px-1.5 py-0.5 text-xs`,children:e})},e))}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:Q8,onClick:()=>te(W),disabled:_,children:`确认`}),(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:Q8,onClick:()=>{L(),y(null)},disabled:_,children:`返回`})]})]}))}if(z&&z.length>0){let e=z.filter(e=>p5(e.kind)),t=z.filter(e=>!f5(e.kind)),r=z.filter(e=>f5(e.kind)&&!p5(e.kind));return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[[...e,...t,...r].map(t=>(0,X.jsx)(KG,{size:`sm`,variant:t===e[0]?`default`:`outline`,className:Q8,onClick:()=>re(t),disabled:_,children:m5(t)},t.id)),r.length===0&&!ae&&(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:Q8,onClick:()=>V(!1),disabled:_,children:`拒绝`}),!B&&oe]}),ce,se]}))}return ae?(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,ce,!B&&oe&&(0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:oe}),se]})):(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:Q8,onClick:()=>V(!0),disabled:_,children:`允许`}),(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:Q8,onClick:()=>V(!1),disabled:_,children:`拒绝`})]}),ce,se]}))}var E5=(0,h.memo)(({toolName:e,argsText:t,result:n,status:r,responseDeliveryStatus:i,addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l})=>{let u=(r==null?void 0:r.type)===`incomplete`&&r.reason===`cancelled`,d=(r==null?void 0:r.type)===`requires-action`,f=c!=null||d&&C5(r,c,s),[p,m]=(0,h.useState)(d),[g,_]=(0,h.useState)(d);d!==g&&(_(d),d&&m(!0));let v=(0,h.useRef)(!1),y=(0,h.useRef)(null),b=(0,h.useRef)(null);return(0,h.useLayoutEffect)(()=>{let e=y.current;if(!e||e.isConnected||d||!v.current)return;let t=c==null||!v5(c);v.current=!1;let{activeElement:n,body:r}=e.ownerDocument;if(t&&(n==null||n===r)){var i;(i=b.current)==null||i.focus({preventScroll:!0})}},[c,d,r==null?void 0:r.type]),(0,X.jsxs)($8,{open:p,onOpenChange:m,children:[(0,X.jsx)(r5,{toolName:e,status:r,responseDeliveryStatus:i}),(0,X.jsxs)(i5,{children:[(0,X.jsx)(c5,{status:r}),(0,X.jsx)(a5,{argsText:t,className:Q(u&&`opacity-60`)}),f&&(0,X.jsx)(w5,{addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l,status:r,onFocusCapture:e=>{var t;let n=e.currentTarget.closest(`[data-slot="tool-fallback-root"]`);b.current=(t=n==null?void 0:n.querySelector(`[data-slot="tool-fallback-trigger"]`))==null?null:t,y.current=e.currentTarget,v.current=!0},onBlurCapture:e=>{let t=e.relatedTarget;(t?e.currentTarget.contains(t):e.currentTarget.contains(e.currentTarget.ownerDocument.activeElement))||(v.current=!1)}}),(0,X.jsx)(s5,{result:n})]})]})});E5.displayName=`ToolFallback`,E5.Root=$8,E5.Trigger=r5,E5.Content=i5,E5.Args=a5,E5.Result=s5,E5.Error=c5,E5.Approval=w5,j();var D5=[`className`,`variant`,`open`,`onOpenChange`,`defaultOpen`,`children`],O5=[`count`,`active`,`className`],k5=[`className`,`children`],A5=200,j5=UG(`aui-tool-group-root group/tool-group w-full`,{variants:{variant:{outline:`rounded-lg border py-3`,ghost:``,muted:`border-muted-foreground/30 bg-muted/30 rounded-lg border py-3`}},defaultVariants:{variant:`outline`}});function M5(e){let{className:t,variant:n,open:r,onOpenChange:i,defaultOpen:a=!1,children:o}=e,s=G(e,D5),c=(0,h.useRef)(null),[l,u]=(0,h.useState)(a),d=$P(c,A5),f=r!==void 0,p=f?r:l,m=(0,h.useCallback)(e=>{d(),f||u(e),i==null||i(e)},[d,f,i]);return(0,X.jsx)(y8,A(A({ref:c,"data-slot":`tool-group-root`,"data-variant":n==null?`outline`:n,open:p,onOpenChange:m,className:Q(j5({variant:n}),`group/tool-group-root`,t),style:{"--animation-duration":`${A5}ms`}},s),{},{children:o}))}function N5(e){let{count:t,active:n=!1,className:r}=e,i=G(e,O5),a=`${t} 次工具调用`;return(0,X.jsxs)(b8,A(A({"data-slot":`tool-group-trigger`,className:Q(`aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 text-sm transition-[color,scale] active:scale-[0.98]`,`group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:py-1.5`,`group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4`,`group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4`,r)},i),{},{children:[n&&(0,X.jsx)(PI,{"data-slot":`tool-group-trigger-loader`,className:`aui-tool-group-trigger-loader size-3 shrink-0 animate-spin [animation-duration:0.6s]`}),(0,X.jsx)(`span`,{"data-slot":`tool-group-trigger-label`,className:Q(`aui-tool-group-trigger-label-wrapper inline-block text-start text-xs leading-none font-medium`,`group-data-[variant=ghost]/tool-group-root:font-normal`,`group-data-[variant=outline]/tool-group-root:grow`,`group-data-[variant=muted]/tool-group-root:grow`,n&&`shimmer motion-reduce:animate-none`),children:a}),(0,X.jsx)(iI,{"data-slot":`tool-group-trigger-chevron`,className:Q(`aui-tool-group-trigger-chevron size-3 shrink-0`,`transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none`,`-rotate-90`,`group-data-open/trigger:rotate-0`,`group-data-panel-open/trigger:rotate-0`)})]}))}function P5(e){let{className:t,children:n}=e,r=G(e,k5);return(0,X.jsx)(x8,A(A({"data-slot":`tool-group-content`,className:Q(`aui-tool-group-content relative overflow-hidden text-sm outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:(0,X.jsx)(`div`,{className:Q(`mt-2 flex flex-col gap-2`,`group-data-[variant=ghost]/tool-group-root:mt-1 group-data-[variant=ghost]/tool-group-root:gap-1`,`group-data-[variant=outline]/tool-group-root:mt-3 group-data-[variant=outline]/tool-group-root:border-t group-data-[variant=outline]/tool-group-root:px-4 group-data-[variant=outline]/tool-group-root:pt-3`,`group-data-[variant=muted]/tool-group-root:mt-3 group-data-[variant=muted]/tool-group-root:border-t group-data-[variant=muted]/tool-group-root:px-4 group-data-[variant=muted]/tool-group-root:pt-3`,`[&>*]:animate-in [&>*]:fade-in-0 [&>*]:blur-in-[2px] [&>*]:slide-in-from-top-1 [&>*]:animation-duration-(--animation-duration) [&>*]:ease-[cubic-bezier(0.32,0.72,0,1)]`,`[&>*]:motion-reduce:animate-none`,`[&>*:nth-child(2)]:[animation-delay:40ms]`,`[&>*:nth-child(3)]:[animation-delay:80ms]`,`[&>*:nth-child(4)]:[animation-delay:120ms]`,`[&>*:nth-child(n+5)]:[animation-delay:160ms]`),children:n})}))}var F5=(0,h.memo)(({children:e,startIndex:t,endIndex:n})=>{let r=n-t+1;return(0,X.jsxs)(M5,{children:[(0,X.jsx)(N5,{count:r}),(0,X.jsx)(P5,{children:e})]})});F5.displayName=`ToolGroup`,F5.Root=M5,F5.Trigger=N5,F5.Content=P5,j();var I5=[`className`];function L5(e){let{className:t}=e,n=G(e,I5);return(0,X.jsx)(`div`,A({"data-slot":`skeleton`,className:Q(`animate-pulse rounded-md bg-muted`,t)},n))}j();var R5=[`className`],z5=({group:e,children:t})=>{let[n,r]=(0,h.useState)(!1);return(0,X.jsxs)(M5,{variant:`ghost`,open:n||e.counts.requiresAction>0,onOpenChange:r,children:[(0,X.jsx)(N5,{count:e.indices.length,active:e.status.type===`running`}),(0,X.jsx)(P5,{children:t})]})},B5=e=>!!e.thread.canResume&&e.composer.type===`thread`&&e.composer.isEmpty,V5=e=>(e==null?void 0:e.completedAt)===void 0?void 0:Number(((e.completedAt-e.startedAt)/1e3).toFixed(1)),H5=__({reasoning:[`group-chainOfThought`,`group-reasoning`],"tool-call":[`group-chainOfThought`,`group-reasoning`],"standalone-tool-call":[]}),U5=[`group-chainOfThought`,`group-task`],W5=(e,t)=>{var n;let r=H5(e,t);return e.type===`tool-call`&&e.messages!==void 0&&r.length>0&&!(t!=null&&(n=t.toolUIs)!=null&&(n=n[e.toolName])!=null&&n.length)?U5:r},G5={},K5=(0,h.createContext)(G5),q5=e=>e.thread.messages.length===0&&(!e.thread.isLoading||e.threads.isLoading),J5=e=>e.thread.messages.length===0&&e.thread.isLoading&&!e.thread.isDisabled&&!e.threads.isLoading,Y5=()=>(0,X.jsxs)(`div`,{"data-slot":`aui_thread-history-skeleton`,role:`status`,className:`animate-in fade-in fill-mode-both flex flex-col gap-y-6 [animation-delay:150ms] [animation-duration:200ms]`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`正在加载对话`}),(0,X.jsx)(L5,{className:`ml-auto h-9 w-2/5 rounded-xl motion-reduce:animate-none`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,X.jsx)(L5,{className:`h-4 w-11/12 motion-reduce:animate-none`}),(0,X.jsx)(L5,{className:`h-4 w-4/5 motion-reduce:animate-none`}),(0,X.jsx)(L5,{className:`h-4 w-3/5 motion-reduce:animate-none`})]}),(0,X.jsx)(L5,{className:`ml-auto h-9 w-1/3 rounded-xl motion-reduce:animate-none`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,X.jsx)(L5,{className:`h-4 w-10/12 motion-reduce:animate-none`}),(0,X.jsx)(L5,{className:`h-4 w-2/3 motion-reduce:animate-none`})]})]}),X5=({components:e=G5,autoFocus:t=!0})=>{let n=Y(q5);return(0,X.jsx)(K5.Provider,{value:e,children:(0,X.jsx)(Z5,{isEmpty:n,autoFocus:t})})},Z5=({isEmpty:e,autoFocus:t})=>{let{Welcome:n=s7}=(0,h.useContext)(K5);return(0,X.jsx)(CP.Root,{className:`aui-root aui-thread-root bg-background @container flex h-full flex-col`,style:{"--thread-max-width":`704px`,"--composer-bg":`color-mix(in oklab, var(--color-muted) 30%, transparent)`,"--composer-radius":`16px`,"--composer-padding":`8px`},children:(0,X.jsx)(CP.Viewport,{turnAnchor:`top`,"data-slot":`aui_thread-viewport`,className:`relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth`,children:(0,X.jsxs)(`div`,{className:Q(`mx-auto flex w-full max-w-(--thread-max-width) flex-1 flex-col px-4 pt-4`,e&&`justify-center`),children:[(0,X.jsx)(Td,{condition:q5,children:(0,X.jsx)(n,{})}),(0,X.jsx)(Td,{condition:J5,children:(0,X.jsx)(Y5,{})}),(0,X.jsx)(a7,{}),(0,X.jsx)(`div`,{"data-slot":`aui_message-group`,className:`mb-14 flex flex-col gap-y-6 empty:hidden`,children:(0,X.jsx)(CP.Messages,{children:()=>(0,X.jsx)(Q5,{})})}),(0,X.jsxs)(CP.ViewportFooter,{className:Q(`aui-thread-viewport-footer bg-background flex flex-col gap-2 overflow-visible pb-4 md:pb-6`,!e&&`sticky bottom-0 mt-auto rounded-t-(--composer-radius)`),children:[(0,X.jsx)(o7,{}),(0,X.jsx)(yq,{}),!e&&(0,X.jsx)(`div`,{className:`mx-auto flex w-full max-w-(--thread-max-width) justify-start`,children:(0,X.jsxs)(HP.New,{render:(0,X.jsx)(`button`,{type:`button`,className:`inline-flex h-6 items-center gap-1 rounded text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`}),children:[(0,X.jsx)(XI,{className:`size-3`}),`新建对话`]})}),(0,X.jsx)(u7,{autoFocus:t}),(0,X.jsx)(Td,{condition:e=>q5(e)&&e.composer.isEmpty,children:(0,X.jsx)(c7,{})})]})]})})})},Q5=()=>{let{AssistantMessage:e=p7}=(0,h.useContext)(K5),t=Y(e=>e.message.role),n=Y(e=>e.message.composer.isEditing),r=Y(e=>e.message.metadata.modality===`voice`);return n?(0,X.jsx)(b7,{}):r?(0,X.jsx)(t7,{}):t===`user`?(0,X.jsx)(v7,{}):(0,X.jsx)(e,{})},$5=()=>Y(e=>{var t,n;let r=((t=e.thread.messages[e.message.index-1])==null?void 0:t.metadata.modality)===`voice`,i=((n=e.thread.messages[e.message.index+1])==null?void 0:n.metadata.modality)===`voice`;return r?i?`middle`:`end`:i?`start`:`single`}),e7=({text:e})=>(0,X.jsx)(`p`,{className:`aui-spoken-message-text m-0`,children:e}),t7=()=>{let e=Y(e=>e.message.role),t=$5(),n=Y(e=>{var t;return e.message.role===`assistant`&&((t=e.message.status)==null?void 0:t.type)===`running`}),r=t===`start`||t===`single`;return(0,X.jsxs)(MN.Root,{"data-slot":`aui_spoken-message-root`,"data-role":e,"data-voice-run":t,className:Q(`aui-spoken-message bg-muted/40 mx-2 px-3 py-1.5 [contain-intrinsic-size:auto_48px] [content-visibility:auto]`,t===`single`&&`rounded-xl py-2`,t===`start`&&`rounded-t-xl pt-2`,t===`middle`&&`-mt-6`,t===`end`&&`-mt-6 rounded-b-xl pb-2`),children:[r&&(0,X.jsxs)(`div`,{"data-slot":`aui_spoken-exchange-header`,className:`text-muted-foreground mb-1.5 flex items-center gap-1.5 text-xs`,children:[(0,X.jsx)(KI,{className:`size-3`,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:`语音对话`})]}),(0,X.jsxs)(`div`,{"data-slot":`aui_spoken-message-content`,className:`text-foreground flex items-start gap-2 text-sm leading-relaxed`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground mt-1 shrink-0`,"aria-hidden":!0,children:e===`user`?(0,X.jsx)(BI,{className:`size-3.5`}):(0,X.jsx)(XF,{className:`size-3.5`})}),(0,X.jsx)(`span`,{className:`sr-only`,children:e===`user`?`你说`:`助手说`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1 wrap-break-word`,children:[(0,X.jsx)(MN.Parts,{components:{Text:e7}}),n&&(0,X.jsx)(`span`,{"data-slot":`aui_spoken-message-indicator`,role:`status`,className:`text-muted-foreground ms-1 animate-pulse font-sans`,"aria-label":`助手正在说话`,children:`●`})]}),(0,X.jsx)(n7,{})]})]})},n7=()=>(0,X.jsx)(xk.Root,{hideWhenRunning:!0,autohide:`always`,className:`aui-spoken-action-bar text-muted-foreground flex shrink-0 gap-1`,children:(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`,className:`size-6`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]})}),r7=`a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1']):not([disabled])`,i7=e=>{for(let t=e.nextElementSibling;t;t=t.nextElementSibling){let e=t.matches(r7)?t:t.querySelector(r7);if(e instanceof HTMLElement)return e}return null},a7=()=>{let e=Xa(),t=Y(e=>e.thread.hasEarlier),n=Y(e=>e.thread.isLoadingEarlier),r=t||n,i=(0,h.useRef)(null),a=(0,h.useRef)(null),o=(0,h.useRef)(null),s=(0,h.useRef)(!1);return(0,h.useEffect)(()=>{if(!t||n){n||(s.current=!1);return}let r=a.current;if(!r)return;let i=r.closest(`[data-slot="aui_thread-viewport"]`);if(!i)return;let o=new IntersectionObserver(t=>{let n=t[0];n!=null&&n.isIntersecting&&!s.current&&(s.current=!0,e.thread.loadEarlier().catch(e=>{console.error(`加载更早的消息失败:`,e),s.current=!1}))},{root:i,rootMargin:`120px 0px 0px 0px`,threshold:0});return o.observe(r),()=>{o.disconnect()}},[e,t,n]),(0,h.useLayoutEffect)(()=>{var e;let t=o.current,n=i.current;if(r||!t||t.isConnected||!n)return;o.current=null;let a=document.activeElement;a&&a!==document.body||(e=i7(n))==null||e.focus()},[r]),(0,X.jsxs)(`div`,{ref:i,className:`contents`,onFocus:e=>{o.current=e.target},children:[(0,X.jsx)(`div`,{ref:a,"aria-hidden":`true`,className:`h-px w-full shrink-0`}),(0,X.jsx)(`span`,{role:`status`,className:`sr-only`,children:n?`正在加载更早的消息`:``}),r&&(0,X.jsx)(CP.LoadEarlier,{render:(0,X.jsx)(KG,{variant:`ghost`,size:`sm`,"data-slot":`aui_thread-load-earlier`,className:`aui-thread-load-earlier text-muted-foreground mb-6 self-center rounded-full`}),children:(0,X.jsx)(`span`,{className:Q(n&&`shimmer motion-reduce:animate-none`),children:n?`正在加载更早的消息...`:`加载更早的消息`})})]})},o7=()=>(0,X.jsx)(CP.ScrollToBottom,{render:(0,X.jsx)(bK,{tooltip:`滚动到底部`,variant:`outline`,className:`aui-thread-scroll-to-bottom dark:border-border dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible`}),children:(0,X.jsx)(KF,{})}),s7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-root mb-6 flex flex-col px-2`,children:(0,X.jsx)(`p`,{className:`aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-medium tracking-tight text-foreground duration-200 text-center`,children:`今天有什么可以帮你?`})}),c7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-suggestions flex w-full flex-col`,children:(0,X.jsx)(CP.Suggestions,{children:()=>(0,X.jsx)(l7,{})})}),l7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200`,children:(0,X.jsxs)(AP.Trigger,{send:!0,render:(0,X.jsx)(`button`,{type:`button`,className:`aui-thread-welcome-suggestion group hover:bg-foreground/[0.03] focus-visible:ring-ring/50 flex w-full items-baseline gap-2.5 rounded-md px-2 py-2 text-start text-sm transition-colors outline-none focus-visible:ring-1 motion-reduce:transition-none`}),children:[(0,X.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/60 group-hover:text-foreground font-mono text-xs transition-colors motion-reduce:transition-none`,children:`>`}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[(0,X.jsx)(AP.Title,{className:`aui-thread-welcome-suggestion-text-1 text-foreground`}),` `,(0,X.jsx)(AP.Description,{className:`aui-thread-welcome-suggestion-text-2 text-muted-foreground empty:hidden`})]})]})}),u7=({autoFocus:e})=>(0,X.jsx)(_M.Root,{className:`aui-composer-root relative flex w-full flex-col`,children:(0,X.jsxs)(_M.AttachmentDropzone,{render:(0,X.jsx)(`div`,{"data-slot":`aui_composer-shell`,className:`border-foreground/10 focus-within:border-foreground/25 data-[dragging=true]:border-ring flex w-full cursor-text flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) transition-[border-color] data-[dragging=true]:border-dashed data-[dragging=true]:bg-[color-mix(in_oklab,var(--color-accent)_50%,var(--color-background))]`}),children:[(0,X.jsx)(IK,{}),(0,X.jsx)(_M.Input,{placeholder:`请输入你的问题...`,className:`aui-composer-input text-foreground caret-primary placeholder:text-muted-foreground/60 max-h-48 min-h-10 w-full resize-none bg-transparent px-2.5 py-1 text-base leading-6 outline-none`,rows:1,autoFocus:e,enterKeyHint:`send`,"aria-label":`消息输入框`}),(0,X.jsx)(d7,{})]})}),d7=()=>{let{ComposerExtra:e}=(0,h.useContext)(K5),t=Y(e=>e.composer.submission!==void 0&&!(e.thread.isRunning&&e.thread.capabilities.cancel));return(0,X.jsxs)(`div`,{className:`aui-composer-action-wrapper relative flex items-center justify-between`,children:[e?(0,X.jsxs)(`div`,{className:`aui-composer-action-start flex items-center gap-1.5`,children:[(0,X.jsx)(LK,{}),(0,X.jsx)(e,{})]}):(0,X.jsx)(LK,{}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsxs)(Td,{condition:e=>e.thread.capabilities.dictation,children:[(0,X.jsx)(Td,{condition:e=>e.composer.dictation==null,children:(0,X.jsx)(_M.Dictate,{render:(0,X.jsx)(bK,{tooltip:`语音输入`,side:`bottom`,type:`button`,variant:`ghost`,size:`icon`,className:`aui-composer-dictate text-muted-foreground hover:text-foreground size-7 rounded-full`,"aria-label":`开始语音输入`}),children:(0,X.jsx)(BI,{className:`aui-composer-dictate-icon size-4`})})}),(0,X.jsx)(Td,{condition:e=>e.composer.dictation!=null,children:(0,X.jsx)(_M.StopDictation,{render:(0,X.jsx)(bK,{tooltip:`停止语音输入`,side:`bottom`,type:`button`,variant:`ghost`,size:`icon`,className:`aui-composer-stop-dictation text-destructive size-7 rounded-full`,"aria-label":`停止语音输入`}),children:(0,X.jsx)(nL,{className:`aui-composer-stop-dictation-icon size-3.5 animate-pulse fill-current`})})})]}),(0,X.jsx)(Td,{condition:e=>(!e.composer.canCancel||e.thread.voice!==void 0&&e.composer.submission===void 0)&&!B5(e),children:(0,X.jsx)(_M.Send,{render:(0,X.jsx)(bK,{tooltip:`发送消息`,side:`bottom`,type:`button`,variant:`default`,size:`icon`,className:`aui-composer-send size-7 rounded-full`,"aria-label":`发送消息`}),children:(0,X.jsx)(JF,{className:`aui-composer-send-icon size-4`})})}),(0,X.jsx)(Td,{condition:B5,children:(0,X.jsx)(_M.Resume,{render:(0,X.jsx)(bK,{tooltip:`继续生成`,side:`bottom`,type:`button`,variant:`default`,size:`icon`,className:`aui-composer-resume size-7 rounded-full`,"aria-label":`继续生成`}),children:(0,X.jsx)(JI,{className:`aui-composer-resume-icon size-4`})})}),(0,X.jsx)(Td,{condition:e=>e.composer.canCancel&&(e.thread.voice===void 0||e.composer.submission!==void 0),children:(0,X.jsx)(_M.Cancel,{render:(0,X.jsx)(KG,{type:`button`,variant:`default`,size:`icon`,className:`aui-composer-cancel size-7 rounded-full`,"aria-label":t?`取消发送`:`停止生成`}),children:(0,X.jsx)(nL,{className:`aui-composer-cancel-icon size-3.5 fill-current`})})})]})]})},f7=()=>(0,X.jsx)(MN.Error,{children:(0,X.jsx)(GM.Root,{className:`aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200`,children:(0,X.jsx)(GM.Message,{className:`aui-message-error-message line-clamp-2`})})}),p7=()=>{let{ToolFallback:e=E5,ToolGroup:t,ReasoningGroup:n,TaskGroup:r}=(0,h.useContext)(K5),i=r?W5:H5;return(0,X.jsxs)(MN.Root,{"data-slot":`aui_assistant-message-root`,"data-role":`assistant`,className:`fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]`,children:[(0,X.jsxs)(`div`,{"data-slot":`aui_assistant-message-content`,className:`text-foreground px-2 text-left leading-relaxed wrap-break-word`,children:[(0,X.jsx)(MN.GroupedParts,{groupBy:i,children:({part:i,children:a})=>{switch(i.type){case`group-chainOfThought`:return(0,X.jsx)(`div`,{"data-slot":`aui_chain-of-thought`,children:a});case`group-task`:return r?(0,X.jsx)(r,{group:i}):null;case`group-tool`:return t?(0,X.jsx)(t,{group:i,children:a}):(0,X.jsx)(z5,{group:i,children:a});case`group-reasoning`:{if(n)return(0,X.jsx)(n,{group:i,children:a});let e=i.status.type===`running`;return(0,X.jsxs)(F8,{streaming:e,children:[(0,X.jsx)(j8,{active:e,duration:V5(i.timing)}),(0,X.jsx)(M8,{"aria-busy":e,children:(0,X.jsx)(N8,{children:a})})]})}case`text`:return(0,X.jsx)(V6,{});case`reasoning`:return(0,X.jsx)(R8,A({},i));case`tool-call`:var o;return(o=i.toolUI)==null?(0,X.jsx)(e,A({},i)):o;case`data`:return i.dataRendererUI;case`file`:return(0,X.jsx)(`div`,{"data-slot":`aui_assistant-message-file`,className:`py-1`,children:(0,X.jsx)(h7,A({},i))});case`image`:return(0,X.jsx)(`div`,{"data-slot":`aui_assistant-message-image`,className:`py-1`,children:(0,X.jsx)(Kq,A({},i))});case`indicator`:return(0,X.jsx)(`span`,{"data-slot":`aui_assistant-message-indicator`,className:`animate-pulse font-sans`,"aria-label":`助手正在处理`,children:`●`});default:return null}}}),(0,X.jsx)(f7,{})]}),(0,X.jsxs)(`div`,{"data-slot":`aui_assistant-message-footer`,className:Q(`ms-2 flex items-center`,`min-h-7.5 pt-1.5`),children:[(0,X.jsx)(x7,{}),(0,X.jsx)(m7,{})]})]})},m7=()=>(0,X.jsxs)(xk.Root,{hideWhenRunning:!0,autohide:`not-last`,className:`aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-200`,children:[(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]}),(0,X.jsxs)(Td,{condition:e=>e.thread.capabilities.feedback,children:[(0,X.jsx)(xk.FeedbackPositive,{render:(0,X.jsx)(bK,{tooltip:`有帮助`,className:`data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground`}),children:(0,X.jsx)(iL,{})}),(0,X.jsx)(xk.FeedbackNegative,{render:(0,X.jsx)(bK,{tooltip:`没有帮助`,className:`data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground`}),children:(0,X.jsx)(oL,{})})]}),(0,X.jsx)(xk.Reload,{render:(0,X.jsx)(bK,{tooltip:`重新生成`}),children:(0,X.jsx)(QI,{})}),(0,X.jsxs)(Lk.Root,{children:[(0,X.jsx)(Lk.Trigger,{render:(0,X.jsx)(bK,{tooltip:`更多`,className:`data-[state=open]:bg-accent`}),children:(0,X.jsx)(SI,{})}),(0,X.jsx)(Lk.Content,{side:`bottom`,align:`start`,sideOffset:6,className:`aui-action-bar-more-content bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[128px] overflow-hidden rounded-xl border p-1.5`,children:(0,X.jsxs)(xk.ExportMarkdown,{render:(0,X.jsx)(Lk.Item,{className:`aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none`}),children:[(0,X.jsx)(vI,{className:`size-4`}),`导出为 Markdown`]})})]})]}),h7=e=>{let t=e.mimeType.toLowerCase().startsWith(`image/`)?aq(e.data,e.mimeType,e.sourceType):null;return t?(0,X.jsx)(Kq,A({type:`image`,image:t,status:e.status},e.filename!==void 0&&{filename:e.filename})):(0,X.jsx)(_q,A({},e))},g7=e=>(0,X.jsx)(`div`,{"data-slot":`aui_user-message-file`,className:`py-1`,children:(0,X.jsx)(h7,A({},e))}),_7=e=>(0,X.jsx)(`div`,{"data-slot":`aui_user-message-image`,className:`py-1`,children:(0,X.jsx)(Kq,A({},e))}),v7=()=>(0,X.jsxs)(MN.Root,{"data-slot":`aui_user-message-root`,className:`fade-in slide-in-from-bottom-1 animate-in grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto] [&:where(>*)]:col-start-2`,"data-role":`user`,children:[(0,X.jsx)(FK,{}),(0,X.jsx)(`div`,{className:`aui-user-message-content-wrapper relative col-start-2 min-w-0`,children:(0,X.jsx)(`div`,{className:`aui-user-message-content peer rounded-(--composer-radius) bg-muted px-4 py-2 text-foreground wrap-break-word empty:hidden`,children:(0,X.jsx)(MN.Parts,{components:{File:g7,Image:_7}})})}),(0,X.jsx)(`div`,{className:`col-start-2 -mt-1 flex justify-end min-h-8`,children:(0,X.jsx)(y7,{})}),(0,X.jsx)(x7,{"data-slot":`aui_user-branch-picker`,className:`col-span-full col-start-1 -me-1 justify-end`})]}),y7=()=>(0,X.jsxs)(xk.Root,{hideWhenRunning:!0,autohide:`not-last`,className:`aui-user-action-bar-root flex flex-row items-center gap-1`,children:[(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`,className:`aui-user-action-copy size-8 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]}),(0,X.jsx)(xk.Edit,{render:(0,X.jsx)(bK,{tooltip:`编辑`,className:`aui-user-action-edit size-8 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`}),children:(0,X.jsx)(WI,{className:`size-4`})})]}),b7=()=>(0,X.jsx)(MN.Root,{"data-slot":`aui_edit-composer-wrapper`,className:`flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]`,children:(0,X.jsxs)(_M.Root,{className:`aui-edit-composer-root border-foreground/10 focus-within:border-foreground/25 ms-auto flex w-full max-w-[85%] cursor-text flex-col rounded-(--composer-radius) border bg-(--composer-bg) transition-[border-color]`,children:[(0,X.jsx)(_M.Input,{className:`aui-edit-composer-input text-foreground min-h-14 w-full resize-none bg-transparent px-4 pt-3 pb-1 text-base outline-none`,autoFocus:!0}),(0,X.jsxs)(`div`,{className:`aui-edit-composer-footer mx-2.5 mb-2.5 flex items-center gap-1.5 self-end`,children:[(0,X.jsx)(_M.Cancel,{render:(0,X.jsx)(KG,{variant:`ghost`,size:`sm`,className:`h-8 px-3`}),children:`取消`}),(0,X.jsx)(_M.Send,{render:(0,X.jsx)(KG,{size:`sm`,className:`h-8 px-3`}),children:`更新`})]})]})}),x7=e=>{let{className:t}=e,n=G(e,R5);return(0,X.jsxs)(tA.Root,A(A({hideWhenSingleBranch:!0,className:Q(`aui-branch-picker-root text-muted-foreground -ms-2 me-2 inline-flex items-center text-xs`,t)},n),{},{children:[(0,X.jsx)(tA.Previous,{render:(0,X.jsx)(bK,{tooltip:`上一条回复`}),children:(0,X.jsx)(oI,{})}),(0,X.jsxs)(`span`,{className:`aui-branch-picker-state font-medium`,children:[(0,X.jsx)(tA.Number,{}),` /`,` `,(0,X.jsx)(tA.Count,{})]}),(0,X.jsx)(tA.Next,{render:(0,X.jsx)(bK,{tooltip:`下一条回复`}),children:(0,X.jsx)(cI,{})})]}))};function S7({onSelect:e}){return(0,X.jsxs)(`div`,{className:`flex h-full flex-col bg-background text-foreground`,children:[(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsxs)(HP.New,{render:(0,X.jsx)(`button`,{type:`button`,onClick:e,className:`\r
92
+ `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),f=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))(),1);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};var _6=`mine`,v6={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|table\.cell_set_text_formatting|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.direction|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|label\.set_text_formatting|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.close_all_short|strategy\.opentrades\.size|table\.cell_set_text_size|box\.set_text_formatting|matrix\.is_antisymmetric|strategy\.close_all_long|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|map\.new|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|table\.merge_cells|table\.set_bgcolor|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.new|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.security|timeframe\.change|array\.new|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|box\.set_xloc|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.enum|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|str\.repeat|ta\.falling|ta\.highest|table\.cell|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|str\.trim|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rci|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|enum|type|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,`comment`,`@comments`],[/\/\/.*(?!@).*/,`comment`],[/\'([^\'\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/\"/,{token:`string`,bracket:`@open`,next:`@stringDouble`}],[/(type|enum)\s+[a-zA-Z]\w*/,`entity.name.type`],[/'/,{token:`string`,bracket:`@open`,next:`@stringSingle`}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:`support.function`,next:`@template`}],[/@punctuation/,{token:`punctuation.operator`,next:`@property`}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:`keyword`},{token:`source`},{token:`entity.name.type`},{token:`paren`},{token:`source`},{token:`variable.other`}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:`support.type`,next:`@template`}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:`source`},{token:`entity.name.type`},{token:`paren`},{token:`source`},{token:`variable.other`},{token:`source`},{token:`keyword.equals`}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,`entity.name.type`],[/import(?=\s+@importName)/,{token:`keyword`,next:`@import`}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,`keyword`],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,`constant.numeric.float`],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,`constant.numeric.float`],[/([+-]?(\d+))(?!\w+)(?!\w+)/,`constant.numeric.integer`],[/(?:true|false)\b/,`constant.other.boolean`],[/#[0-9a-fA-F]{6,8}\b/,`constant.other.color`],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,`keyword.operator`],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,`keyword`],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,`entity.name.function`],[/[0-9]+\b/,`constant.numeric.integer`],[/=/,`keyword.equals`],[/\b(?:@builtinVariables)\b(?!\s*=\s*\w+)/,`support.variable`],[/[(|)|\[|\]]/,`paren`],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:`entity.name.method`}],[/\w+\b/,`variable.other`]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:`comment.annotation`,next:`@pop`}],[/@[A-Za-z]+(\s*=\s*)?/,{token:`comment.annotation`}],[/(?!\s*@[A-Za-z]+).+$/,{token:`comment`,next:`@pop`}]],stringDouble:[[/[^\\\"]+/,`string`],[/\\./,`string.invalid`],[/\"/,{token:`string.quote`,bracket:`@close`,next:`@pop`}]],stringSingle:[[/[^\\']+/,`string`],[/\\./,`string.invalid`],[/'/,{token:`string`,bracket:`@close`,next:`@pop`}]],template:[[/(@builtinTypes)/,{token:`support.type`}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,`entity.name.type`],[/\(|\)|\[|\]|\=|\>/,{token:`paren`,next:`@pop`}],[/(\,)(\s+)/,[`keyword.operator`,`source`]],[/(\,)/,{token:`keyword.operator`}],[/([\w.\d$]+)/,{token:`entity.name.type`}],[/(<|>)/,{token:`paren`}],[/\s(?=\w)|$/,{token:`source`,next:`@pop`}]],property:[[/@punctuation/,{token:`punctuation.operator`}],[/(@builtinTypes)(?=\s*[(])/,{token:`support.method`,next:`@pop`}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:`entity.name.method`,next:`@pop`}],[/[a-zA-Z0-9_]+/,{token:`variable.other.property`,next:`@pop`}],[/@empty/,{token:`source`,next:`@pop`}]],import:[[/\s+/,{token:`source`}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:`entity.name.module`},{token:`source`},{token:`keyword`},{token:`source`},{token:`entity.name.module.name`,next:`@pop`}]],[/@importName/,{token:`entity.name.module`,next:`@pop`}]]},builtinVariables:/strategy\.commission\.cash_per_contract|syminfo\.recommendations_sell_strong|strategy\.commission\.cash_per_order|strategy\.avg_winning_trade_percent|syminfo\.recommendations_buy_strong|strategy\.avg_losing_trade_percent|strategy\.closedtrades\.first_index|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|strategy\.opentrades\.capital_held|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|strategy\.max_drawdown_percent|syminfo\.recommendations_total|label\.style_label_lower_left|label\.style_label_upper_left|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|strategy\.position_size_short|strategy\.position_size_total|strategy\.price_highest_short|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|plot\.style_stepline_diamond|strategy\.commission\.percent|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|strategy\.position_size_long|strategy\.price_highest_long|strategy\.price_lowest_short|syminfo\.recommendations_buy|syminfo\.target_price_median|strategy\.percent_of_equity|session\.isfirstbar_regular|strategy\.avg_trade_percent|strategy\.avg_winning_trade|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.price_first_short|strategy\.price_lowest_long|dividends\.future_pay_date|session\.islastbar_regular|strategy\.account_currency|strategy\.avg_losing_trade|strategy\.openprofit_short|strategy\.opentrades_short|strategy\.price_first_long|strategy\.price_last_short|syminfo\.target_price_date|syminfo\.target_price_high|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|dividends\.future_ex_date|strategy\.avg_price_short|strategy\.initial_capital|strategy\.openprofit_long|strategy\.opentrades_long|strategy\.price_last_long|syminfo\.current_contract|syminfo\.target_price_low|alert\.freq_once_per_bar|label\.style_label_right|strategy\.direction\.long|dividends\.future_amount|earnings\.future_revenue|strategy\.avg_price_long|syminfo\.expiration_date|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.position_size|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|strategy\.closedtrades|strategy\.max_drawdown|syminfo\.main_tickerid|timeframe\.main_period|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades|syminfo\.description|syminfo\.mincontract|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|text\.format_italic|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.avg_trade|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|text\.format_bold|text\.format_none|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|strategy\.short|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|strategy\.long|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_kagi|last_bar_time|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.EGP|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.PKR|currency\.PLN|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|dayofmonth|ta\.accdist|time_close|weekofyear|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|bar_index|dayofweek|label\.all|table\.all|math\.phi|line\.all|math\.pi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.e|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|false|close|hlcc4|month|ohlc4|ta\.tr|true|high|hlc3|hour|open|time|year|ask|bid|hl2|low|na/,builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/},y6=e=>v6[e].source,b6=y6(`builtinFunctions`),x6=y6(`builtinVariables`),S6=y6(`builtinTypes`),C6=y6(`keywords`),w6=y6(`punctuation`),T6={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0,inside:{"comment-annotation":/@[a-zA-Z]+(?:\s*=\s*)?/}},string:{pattern:/"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/,greedy:!0},"builtin-function":{pattern:RegExp(`\\b(?:${b6})(?=\\s*(?:\\(|<))`),greedy:!0,alias:`function`},"builtin-variable":{pattern:RegExp(`\\b(?:${x6})\\b`),greedy:!0,alias:`variable`},"builtin-type":{pattern:RegExp(`\\b(?:${S6})\\b`),greedy:!0,alias:`class-name`},keyword:RegExp(`\\b(?:${C6})\\b`),boolean:/\b(?:true|false)\b/,number:{pattern:/[+-]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?/,greedy:!0},"color-hex":/#[0-9a-fA-F]{6,8}\b/,"function-definition":{pattern:/\b[a-zA-Z_]\w*(?=\s*\()/,alias:`function`},property:{pattern:/(\.)[a-zA-Z_]\w*/,lookbehind:!0,alias:`property`},operator:/\+=|-=|\*=|\/=|%=|==|!=|<=|>=|=>|:=|[+\-*/%<>=?:,]/,punctuation:new RegExp(w6),bracket:/[()[\]{}]/,identifier:/\b[a-zA-Z_]\w*\b/};g6.default.languages.mine=T6,j();var E6=[`className`,`children`],D6=[`className`],O6=[`className`],k6=[`className`],A6=[`className`],j6=[`className`],M6=[`className`],N6=[`className`],P6=[`className`],F6=[`className`],I6=[`className`],L6=[`className`],R6=[`className`],z6=[`className`],B6=[`className`],V6=[`className`],H6=[`className`],U6=[`className`],W6=[`className`],G6=[`className`],K6=[`className`],q6=e=>{let t=(0,h.useRef)(e);if(e!==t.current){let n=t.current;e!==void 0&&n!==void 0&&Object.keys(n).length===Object.keys(e).length&&Object.keys(e).every(t=>n[t]===e[t])||(t.current=e)}return t.current},J6=e=>{let{className:t,children:n}=e,r=G(e,E6),i=eJ(),a=/\blanguage-mine\b/.test(t==null?``:t)||!t,o=String(n==null?``:n).replace(/\n$/,``),s=(0,h.useMemo)(()=>!i||!a?null:g6.default.highlight(o,T6,_6),[o,i,a]),c=Q(`font-mono`,i?`tcc-code text-inherit`:Q(`aui-md-inline-code`,`rounded-md border border-border/60`,`bg-muted px-1.5 py-0.5`,`text-[0.85em] text-foreground`),t);return!i||!a||s===null?(0,X.jsx)(`code`,A(A({className:c},r),{},{children:n})):(0,X.jsx)(`code`,A(A({className:c},r),{},{dangerouslySetInnerHTML:{__html:s}}))},Y6=(0,h.memo)(({components:e,componentsByLanguage:t})=>{let n=q6(e),r=q6(t),i=(0,h.useMemo)(()=>n?A(A({},X6),Zq(n)):X6,[n]);return(0,X.jsx)(Y0,{remarkPlugins:[m6],className:Q(`aui-md`,`min-w-0 break-words`,`text-[15px] leading-[1.75] text-foreground`,`[&_img]:max-w-full`,`[&_svg]:max-w-full`),components:i,componentsByLanguage:r,defer:!0})}),X6=Zq({h1:e=>{let{className:t}=e,n=G(e,D6);return(0,X.jsx)(`h1`,A({className:Q(`aui-md-h1`,`mt-7 mb-3 scroll-m-20`,`text-2xl font-semibold tracking-tight`,`leading-tight text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h2:e=>{let{className:t}=e,n=G(e,O6);return(0,X.jsx)(`h2`,A({className:Q(`aui-md-h2`,`mt-6 mb-3 scroll-m-20`,`text-xl font-semibold tracking-tight`,`leading-snug text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h3:e=>{let{className:t}=e,n=G(e,k6);return(0,X.jsx)(`h3`,A({className:Q(`aui-md-h3`,`mt-5 mb-2 scroll-m-20`,`text-lg font-semibold`,`leading-snug text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h4:e=>{let{className:t}=e,n=G(e,A6);return(0,X.jsx)(`h4`,A({className:Q(`aui-md-h4`,`mt-4 mb-2 scroll-m-20`,`text-base font-semibold text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h5:e=>{let{className:t}=e,n=G(e,j6);return(0,X.jsx)(`h5`,A({className:Q(`aui-md-h5`,`mt-3 mb-1`,`text-sm font-semibold text-foreground`,`first:mt-0 last:mb-0`,t)},n))},h6:e=>{let{className:t}=e,n=G(e,M6);return(0,X.jsx)(`h6`,A({className:Q(`aui-md-h6`,`mt-3 mb-1`,`text-sm font-medium text-muted-foreground`,`first:mt-0 last:mb-0`,t)},n))},p:e=>{let{className:t}=e,n=G(e,N6);return(0,X.jsx)(`p`,A({className:Q(`aui-md-p`,`my-3`,`text-[15px] leading-[1.75] text-foreground`,`first:mt-0 last:mb-0`,t)},n))},a:e=>{let{className:t}=e,n=G(e,P6);return(0,X.jsx)(`a`,A({className:Q(`aui-md-a`,`text-primary underline decoration-primary/40`,`underline-offset-4 transition-colors`,`hover:decoration-primary`,t)},n))},blockquote:e=>{let{className:t}=e,n=G(e,F6);return(0,X.jsx)(`blockquote`,A({className:Q(`aui-md-blockquote`,`my-4 border-s-2 border-border ps-4`,`text-muted-foreground`,`[&>p]:my-1`,t)},n))},ul:e=>{let{className:t}=e,n=G(e,I6);return(0,X.jsx)(`ul`,A({className:Q(`aui-md-ul`,`my-3 ms-6 list-disc`,`space-y-1`,`marker:text-muted-foreground`,`[&_ul]:my-1`,t)},n))},ol:e=>{let{className:t}=e,n=G(e,L6);return(0,X.jsx)(`ol`,A({className:Q(`aui-md-ol`,`my-3 ms-6 list-decimal`,`space-y-1`,`marker:text-muted-foreground`,`[&_ol]:my-1`,t)},n))},hr:e=>{let{className:t}=e,n=G(e,R6);return(0,X.jsx)(`hr`,A({className:Q(`aui-md-hr`,`my-6 border-0 border-t border-border`,t)},n))},table:e=>{let{className:t}=e,n=G(e,z6);return(0,X.jsx)(`div`,{className:`aui-md-table-wrapper my-4 w-full overflow-x-auto rounded-lg border border-border`,children:(0,X.jsx)(`table`,A({className:Q(`aui-md-table`,`w-full border-collapse text-sm`,t)},n))})},th:e=>{let{className:t}=e,n=G(e,B6);return(0,X.jsx)(`th`,A({className:Q(`aui-md-th`,`border-b border-border`,`bg-muted/60 px-3 py-2.5`,`text-start text-sm font-semibold text-foreground`,`[[align=center]]:text-center`,`[[align=right]]:text-right`,t)},n))},td:e=>{let{className:t}=e,n=G(e,V6);return(0,X.jsx)(`td`,A({className:Q(`aui-md-td`,`border-b border-border/70`,`px-3 py-2.5`,`text-start text-foreground`,`[[align=center]]:text-center`,`[[align=right]]:text-right`,t)},n))},tr:e=>{let{className:t}=e,n=G(e,H6);return(0,X.jsx)(`tr`,A({className:Q(`aui-md-tr`,`transition-colors`,`last:[&>td]:border-b-0`,`hover:bg-muted/30`,t)},n))},li:e=>{let{className:t}=e,n=G(e,U6);return(0,X.jsx)(`li`,A({className:Q(`aui-md-li`,`ps-0 leading-[1.75] text-foreground`,`[&>p]:my-1`,t)},n))},strong:e=>{let{className:t}=e,n=G(e,W6);return(0,X.jsx)(`strong`,A({className:Q(`aui-md-strong`,`font-semibold text-foreground`,t)},n))},sup:e=>{let{className:t}=e,n=G(e,G6);return(0,X.jsx)(`sup`,A({className:Q(`aui-md-sup`,`text-muted-foreground`,`[&>a]:text-xs [&>a]:no-underline`,t)},n))},pre:e=>{let{className:t}=e,n=G(e,K6);return(0,X.jsx)(`pre`,A({className:Q(`aui-md-pre`,`my-0 overflow-x-auto`,`rounded-b-xl border border-border`,`bg-[#f4f4f4] px-4 py-4`,`font-mono text-[13px] leading-6`,`text-[#242424]`,`dark:bg-[#2f2f2f] dark:text-[#ededed]`,`[&>code]:bg-transparent`,`[&>code]:p-0`,`[&>code]:text-inherit`,`[&>code]:border-0`,t)},n))},code:J6,CodeHeader:({language:e,code:t})=>{let{isCopied:n,copyToClipboard:r}=h6();return(0,X.jsxs)(`div`,{className:Q(`aui-code-header-root`,`mt-4 flex items-center justify-between`,`rounded-t-xl border border-b-0 border-border`,`bg-[#f4f4f4] px-4 py-2`,`dark:bg-[#2f2f2f]`,`text-xs`),children:[(0,X.jsx)(`span`,{className:`aui-code-header-language font-medium text-muted-foreground`,children:e||`code`}),(0,X.jsx)(bK,{tooltip:n?`已复制`:`复制代码`,onClick:()=>{t&&!n&&r(t)},className:Q(`size-7 rounded-md`,`text-muted-foreground`,`hover:bg-black/5 hover:text-foreground`,`dark:hover:bg-white/10`),children:n?(0,X.jsx)(nI,{className:`size-4`}):(0,X.jsx)(gI,{className:`size-4`})})]})}});function Z6({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=h.useRef(e!==void 0),[a,o]=h.useState(()=>t),s=i&&e!==void 0?e:a;if(process.env.NODE_ENV!==`production`){h.useEffect(()=>{i!==(e!==void 0)&&UW([`A component is changing the ${i?``:`un`}controlled ${r} state of ${n} to be ${i?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
93
+ `))},[r,n,e]);let{current:a}=h.useRef(t);h.useEffect(()=>{!i&&Q6(a)!==Q6(t)&&UW([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
94
+ `))},[t])}return[s,h.useCallback(e=>{i||o(e)},[])]}function Q6(e){let t=0,n=new WeakMap;try{let r=JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}});return r==null?`__top__:${typeof e}`:r}catch(e){return`__unserializable__`}}function $6(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Z6({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=OV(a,!0,!0),u=JH(),[d,f]=h.useState(),p=d===null?void 0:d==null?u:d,m=fz(e=>{let t=!a,n=RR(BR,e.nativeEvent);r(t,n),n.isCanceled||o(t)});return h.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var e8=h.createContext(void 0);process.env.NODE_ENV!==`production`&&(e8.displayName=`CollapsibleRootContext`);function t8(){let e=h.useContext(e8);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?DL(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var n8=`data-open`,r8=`data-closed`,i8=cR,a8=`data-panel-open`,o8={[n8]:``},s8={[r8]:``},c8={open(e){return e?{[a8]:``}:null}},l8={open(e){return e?o8:s8}};j();var u8=A(A({},l8),fR);j();var d8=[`render`,`className`,`defaultOpen`,`disabled`,`onOpenChange`,`open`,`style`],f8=h.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c}=e,l=G(e,d8),u=fz(o),d=$6({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=h.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=h.useMemo(()=>A(A({},d),{},{onOpenChange:u,state:f}),[d,u,f]),m=zB(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:u8});return(0,X.jsx)(e8.Provider,{value:p,children:m})});process.env.NODE_ENV!==`production`&&(f8.displayName=`CollapsibleRoot`),j();var p8=[`className`,`disabled`,`render`,`nativeButton`,`style`],m8=A(A({},c8),fR),h8=h.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=t8(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d}=e,f=G(e,p8),{getButtonProps:p,buttonRef:m}=YW({disabled:c,native:u});return zB(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:m8})});process.env.NODE_ENV!==`production`&&(h8.displayName=`CollapsibleTrigger`),j();var g8={height:void 0,width:void 0};function _8(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=h.useRef(null),f=h.useRef(null),[p,m]=h.useState(g8),g=h.useRef(g8),_=h.useRef(!1),v=h.useRef(s),y=h.useRef(!1),[b,x]=h.useState(!1),S=h.useRef(null),C=tz(t,d),w=sz(s),T=MV(d),E=!s&&!a,D=b?`idle`:u,O=s&&(v.current||y.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?g.current:p,j=n&&E&&f.current!==`css-animation`,M=fz((e,t=!0)=>{t&&(g.current=e),m(e)}),N=fz(()=>{var e;(e=S.current)==null||e.call(S),S.current=null}),P=fz(e=>{N(),S.current=()=>{S.current=null,e()}}),F=fz(()=>{s&&a&&f.current===`css-animation`&&(y.current=!0)});TL(()=>{b&&u!==`starting`&&x(!1)},[b,u]),h.useEffect(()=>()=>{F(),N()},[F,N]),TL(()=>{s||(v.current=!1,y.current=!1);let e=d.current;if(!e)return;!s&&S.current&&N();let t=y8(e,O);if(f.current=t,s&&u===`idle`&&v.current&&t===`css-animation`){g.current=v8(e);return}if(s&&u===`starting`){let n=_.current;if(_.current=!1,t===`none`){M(v8(e)),x(!0);return}if(t===`css-transition`){let t=S8(e);if(M(v8(e)),!n)return t;let r=x8(e,`transition-duration`,`0s`);return P(r),x(!0),t}M(v8(e));let r=x8(e,`animation-name`,`none`);if(!n){r();return}let i=x8(e,`animation-duration`,`0s`);r(),P(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){M(g8,!1),c(!1);return}M(v8(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=v8(e);n.height>0||n.width>0?(M(n),t===`css-animation`&&x8(e,`animation-name`,`none`)()):c(!1)},[a,s,N,M,c,P,O,u]),NV({enabled:s&&a&&D===`idle`,open:!0,ref:d,onComplete(){s&&M(g8,!1)}}),h.useEffect(()=>{if(s||!a||D!==`ending`)return;if(!d.current){c(!1),M(g8,!1);return}let e=new AbortController,t=-1;function n(){w.current||(c(!1),M(g8,!1))}return t=vz.request(()=>{T(n,e.signal)}),()=>{vz.cancel(t),e.abort()}},[w,a,s,D,T,M,c]),TL(()=>{let e=d.current;e&&n&&E&&e.setAttribute(`hidden`,`until-found`)},[E,n]),h.useEffect(function(){let e=d.current;if(!e)return;let t=ML.create(),n=-1,r=(r,i)=>{t.start(0,()=>{w.current||(n=vz.request(()=>{w.current||(r&&(_.current=!1),i&&e.setAttribute(i8,``),e.setAttribute(`hidden`,`until-found`))}))})},i=$R(e,`beforematch`,t=>{let n=RR(zR,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}_.current=!0;let i=e.hasAttribute(i8);e.removeAttribute(i8),l(!0),r(!0,i)});return()=>{t.clear(),vz.cancel(n),i()}},[w,o,l]);let I=i||n||a||s;return{height:k.height,props:A(A({},j?{[i8]:``}:void 0),{},{hidden:E,id:r}),ref:C,shouldPreventOpenAnimation:O,shouldRender:I,transitionStatus:D,width:k.width}}function v8(e){return{height:e.scrollHeight,width:e.scrollWidth}}function y8(e,t){let n=KS(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&b8(n.animationDuration),i=b8(n.transitionDuration);return r&&i?(process.env.NODE_ENV!==`production`&&xB(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):i?`css-transition`:r?`css-animation`:`none`}function b8(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function x8(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function S8(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=vz.request(n);return()=>{vz.cancel(r),n()}}var C8=`--collapsible-panel-height`,w8=`--collapsible-panel-width`;j();var T8=[`className`,`hiddenUntilFound`,`keepMounted`,`render`,`id`,`style`],E8=h.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s}=e,c=G(e,T8);process.env.NODE_ENV!==`production`&&h.useEffect(()=>{r&&i===!1&&xB("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:g,state:_,transitionStatus:v}=t8(),y=r!=null&&r,b=i!=null&&i,x=o||void 0,S=x==null?l:x;TL(()=>(m(e=>x==null?e===null?void 0:e:x),()=>{m(e=>e===x?null:e)}),[x,m]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:k}=_8({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:g,transitionStatus:v}),j=A(A({},_),{},{transitionStatus:O}),M=wB(s,j),N=zB(`div`,A(A({},e),{},{style:void 0}),{state:j,ref:T,props:[w,{style:{[C8]:C===void 0?`auto`:`${C}px`,[w8]:k===void 0?`auto`:`${k}px`}},c,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:u8});return D?N:null});process.env.NODE_ENV!==`production`&&(E8.displayName=`CollapsiblePanel`),j();var D8=(0,h.forwardRef)(function(e,t){return(0,X.jsx)(f8,A({ref:t,"data-slot":`collapsible`},e))});function O8(e){let t=MW({},(jW(e),e));return(0,X.jsx)(h8,A({"data-slot":`collapsible-trigger`},t))}function k8(e){let t=MW({},(jW(e),e));return(0,X.jsx)(E8,A({"data-slot":`collapsible-content`},t))}j();var A8=[`className`,`variant`,`open`,`onOpenChange`,`defaultOpen`,`streaming`,`showContent`,`onAnimationStart`,`style`,`children`],j8=[`side`,`className`],M8=[`active`,`duration`,`className`],N8=[`className`,`children`],P8=[`className`,`children`],F8=(0,h.createContext)({isPreview:!1,showContent:!0}),I8=UG(`aui-reasoning-root mb-0 w-full`,{variants:{variant:{outline:`rounded-lg px-0 py-2`,ghost:``,muted:`bg-muted/50 rounded-lg px-3 py-2`}},defaultVariants:{variant:`outline`}}),L8=(0,h.forwardRef)(function(e,t){let{className:n,variant:r,open:i,onOpenChange:a,defaultOpen:o=!1,streaming:s,showContent:c=!0,onAnimationStart:l,style:u,children:d}=e,f=G(e,A8),[p]=(0,h.useState)(o),[m,g]=(0,h.useState)(null),_=i!==void 0,v=_?i:m==null?s||p:m,y=s===!0&&v,b=(0,h.useRef)(s);RK(()=>{b.current!==s&&(b.current=s,_||m!==null||p||l==null||l())},[s,_,m,p,l]);let x=(0,h.useCallback)(e=>{l==null||l(),_||g(e),a==null||a(e)},[l,_,a]),S={isPreview:c&&y,showContent:c};return c?(0,X.jsx)(D8,A(A({ref:t,"data-slot":`reasoning-root`,"data-variant":r,open:v,onOpenChange:x,className:Q(`group/reasoning-root`,I8({variant:r,className:n})),style:A({"--animation-duration":`200ms`},typeof u==`object`&&u||{})},f),{},{children:(0,X.jsx)(F8.Provider,{value:S,children:d})})):(0,X.jsx)(`div`,A(A({ref:t,"data-slot":`reasoning-root`,"data-variant":r,className:Q(`group/reasoning-root`,I8({variant:r,className:n})),style:typeof u==`function`?void 0:u},f),{},{children:(0,X.jsx)(F8.Provider,{value:S,children:d})}))});function R8(e){let{side:t=`bottom`,className:n}=e,r=G(e,j8);return t===`top`?(0,X.jsx)(`div`,A({"data-slot":`reasoning-fade`,className:Q(`aui-reasoning-fade pointer-events-none absolute inset-x-0 top-0 z-10 h-8`,`bg-[linear-gradient(to_bottom,var(--color-background),transparent)]`,`group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_bottom,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]`,`fade-in-0 animate-in`,`animation-duration-(--animation-duration)`,n)},r)):(0,X.jsx)(`div`,A({"data-slot":`reasoning-fade`,className:Q(`aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8`,`bg-[linear-gradient(to_top,var(--color-background),transparent)]`,`group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_top,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]`,`fade-in-0 animate-in`,`animation-duration-(--animation-duration)`,n)},r))}function z8(e){let{active:t,duration:n,className:r}=e,i=G(e,M8),{showContent:a}=(0,h.useContext)(F8),o=t?`正在思考...`:n===void 0?`思考过程`:`思考了 ${n} 秒`,s=Q(`aui-reasoning-trigger flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-sm text-muted-foreground`,t&&a&&`hover:text-foreground transition-colors active:scale-[0.98]`,r),c=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(eI,{"data-slot":`reasoning-trigger-icon`,className:`aui-reasoning-trigger-icon size-4 shrink-0`}),(0,X.jsx)(`span`,{"data-slot":`reasoning-trigger-label`,className:Q(`aui-reasoning-trigger-label-wrapper inline-block leading-none tabular-nums`,t&&`shimmer motion-reduce:animate-none`),children:o})]});return!a||!t?(0,X.jsx)(`div`,{"data-slot":`reasoning-trigger`,className:s,children:c}):(0,X.jsx)(O8,A(A({"data-slot":`reasoning-trigger`,className:s},i),{},{children:c}))}function B8(e){let{className:t,children:n}=e,r=G(e,N8),{showContent:i}=(0,h.useContext)(F8);return i?(0,X.jsx)(k8,A(A({"data-slot":`reasoning-content`,className:Q(`aui-reasoning-content relative overflow-hidden text-sm text-muted-foreground outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:n})):null}function V8(e){let{className:t,children:n}=e,r=G(e,P8),{showContent:i}=(0,h.useContext)(F8);return i?(0,X.jsx)(`div`,A(A({"data-slot":`reasoning-text`,className:Q(`aui-reasoning-text relative z-0 max-h-64 overflow-y-auto ps-6 pt-2 pb-2 leading-relaxed text-pretty`,`motion-reduce:animate-none`,t)},r),{},{children:(0,X.jsx)(`div`,{className:`aui-reasoning-text-content space-y-4`,children:n})})):null}j();var H8=[`onAnimationStart`],U8=(0,h.forwardRef)(function(e,t){let{onAnimationStart:n}=e,r=G(e,H8),i=(0,h.useRef)(null),a=$P(i,200),o=(0,h.useCallback)(()=>{a(),n==null||n()},[a,n]),s=(0,h.useCallback)(e=>{if(i.current=e,typeof t==`function`){let n=t(e);if(typeof n==`function`)return()=>{i.current=null,n()}}else t&&(t.current=e)},[t]);return(0,X.jsx)(L8,A({ref:s,onAnimationStart:o},r))}),W8=()=>(0,X.jsx)(Y6,{}),G8=({children:e,startIndex:t,endIndex:n})=>{let r=Y(e=>{var r;if(((r=e.message.status)==null?void 0:r.type)!==`running`)return!1;for(let r=t;r<=n;r++){var i;if(((i=e.message.parts[r])==null?void 0:i.status.type)===`running`)return!0}return!1});return(0,X.jsxs)(U8,{streaming:r,showContent:!1,children:[(0,X.jsx)(z8,{active:r}),(0,X.jsx)(B8,{"aria-busy":r,"aria-label":`AI 思考过程`,children:(0,X.jsx)(V8,{children:e})})]})},K8=(0,h.memo)(W8);K8.displayName=`Reasoning`,K8.Root=U8,K8.Trigger=z8,K8.Content=B8,K8.Text=V8,K8.Fade=R8;var q8=(0,h.memo)(G8);q8.displayName=`ReasoningGroup`,j();var J8=[`className`];function Y8(e){let{className:t}=e,n=G(e,J8);return(0,X.jsx)(`textarea`,A({"data-slot":`textarea`,className:Q(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,t)},n))}j();var X8=[`className`,`open`,`onOpenChange`,`defaultOpen`,`children`],Z8=[`className`],Q8=[`toolName`,`status`,`responseDeliveryStatus`,`className`],$8=[`className`,`children`],e5=[`argsText`,`className`],t5=[`result`,`className`],n5=[`status`,`className`],r5=[`approval`,`className`,`focusReceiptRef`,`receiptRef`],i5=[`className`,`forwardedRef`,`carryFocusRef`,`addResult`,`resume`,`interrupt`,`approval`,`respondToApproval`,`status`],a5=200,o5=`active:scale-[0.98]`;function s5(e){let{className:t,open:n,onOpenChange:r,defaultOpen:i=!1,children:a}=e,o=G(e,X8),s=(0,h.useRef)(null),[c,l]=(0,h.useState)(i),u=$P(s,a5),d=n!==void 0,f=d?n:c,p=(0,h.useCallback)(e=>{u(),d||l(e),r==null||r(e)},[u,d,r]);return(0,X.jsx)(D8,A(A({ref:s,"data-slot":`tool-fallback-root`,open:f,onOpenChange:p,className:Q(`aui-tool-fallback-root group/tool-fallback-root w-full`,t),style:{"--animation-duration":`${a5}ms`}},o),{},{children:a}))}var c5={running:PI,complete:nI,incomplete:mI,"requires-action":uI},l5=e=>{if(e<1e3)return`<1秒`;let t=e/1e3;return t<10?`${(Math.floor(t*10)/10).toFixed(1)}秒`:t<60?`${Math.floor(t)}秒`:`${Math.floor(t/60)}分 ${Math.floor(t%60)}秒`};function u5(e){let{className:t}=e,n=G(e,Z8),r=jy();return r===void 0?null:(0,X.jsx)(`span`,A(A({"data-slot":`tool-fallback-duration`,className:Q(`aui-tool-fallback-duration text-muted-foreground text-xs tabular-nums`,t)},n),{},{children:l5(r)}))}function d5(e){var t;let{toolName:n,status:r,responseDeliveryStatus:i,className:a}=e,o=G(e,Q8),s=(t=r==null?void 0:r.type)==null?`complete`:t,c=s===`running`,l=(r==null?void 0:r.type)===`incomplete`&&r.reason===`cancelled`,u=c5[s],d=i===`queued`?`回复已排队,尚未发送`:s===`running`?`正在执行工具`:s===`requires-action`?`等待工具操作`:s===`incomplete`?l?`已取消工具调用`:`工具执行失败`:`已调用工具`;return(0,X.jsxs)(O8,A(A({"data-slot":`tool-fallback-trigger`,className:Q(`aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]`,a)},o),{},{children:[(0,X.jsx)(u,{"data-slot":`tool-fallback-trigger-icon`,className:Q(`aui-tool-fallback-trigger-icon size-4 shrink-0`,l&&`text-muted-foreground`,c&&`animate-spin [animation-duration:0.6s]`)}),(0,X.jsxs)(`span`,{"data-slot":`tool-fallback-trigger-label`,className:Q(`aui-tool-fallback-trigger-label-wrapper inline-block min-w-0 text-start leading-none wrap-anywhere`,l&&`text-muted-foreground line-through`,c&&`shimmer motion-reduce:animate-none`),children:[d,`:`,(0,X.jsx)(`b`,{children:n})]}),(0,X.jsx)(u5,{}),(0,X.jsx)(iI,{"data-slot":`tool-fallback-trigger-chevron`,className:Q(`aui-tool-fallback-trigger-chevron size-4 shrink-0`,`transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none`,`-rotate-90`,`group-data-open/trigger:rotate-0`,`group-data-panel-open/trigger:rotate-0`)})]}))}function f5(e){let{className:t,children:n}=e,r=G(e,$8);return(0,X.jsx)(k8,A(A({"data-slot":`tool-fallback-content`,className:Q(`aui-tool-fallback-content relative overflow-hidden text-sm outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:(0,X.jsx)(`div`,{className:Q(`flex flex-col gap-2 ps-6 pt-1 pb-2 ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`group-data-open/collapsible-content:animate-in group-data-open/collapsible-content:fade-in-0 group-data-open/collapsible-content:blur-in-[2px] group-data-open/collapsible-content:slide-in-from-top-1`,`group-data-closed/collapsible-content:animate-out group-data-closed/collapsible-content:fade-out-0 group-data-closed/collapsible-content:blur-out-[2px] group-data-closed/collapsible-content:slide-out-to-top-1`,`group-data-closed/collapsible-content:animation-duration-(--animation-duration) group-data-open/collapsible-content:animation-duration-(--animation-duration)`),children:n})}))}function p5(e){let{argsText:t,className:n}=e,r=G(e,e5);return t?(0,X.jsx)(`div`,A(A({"data-slot":`tool-fallback-args`,className:Q(`aui-tool-fallback-args`,n)},r),{},{children:(0,X.jsx)(`pre`,{className:`aui-tool-fallback-args-value bg-muted/50 text-foreground/90 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap`,children:t})})):null}var m5=(e,t)=>{if(typeof e==`string`)return e;try{if(e instanceof Error)return String(e);let n=JSON.stringify(e,null,t);if(n!==void 0)return n}catch(e){}try{return String(e)}catch(e){return`[无法序列化的数据]`}};function h5(e){let{result:t,className:n}=e,r=G(e,t5);return t===void 0?null:(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-result`,className:Q(`aui-tool-fallback-result`,n)},r),{},{children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-result-header text-muted-foreground text-xs font-medium`,children:`执行结果:`}),(0,X.jsx)(`pre`,{className:`aui-tool-fallback-result-content bg-muted/50 text-foreground/90 mt-1 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap`,children:m5(t,2)})]}))}function g5(e){let{status:t,className:n}=e,r=G(e,n5);if((t==null?void 0:t.type)!==`incomplete`)return null;let i=t.error,a=i==null?null:m5(i);if(!a)return null;let o=t.reason===`cancelled`?`取消原因:`:`错误信息:`;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-error`,className:Q(`aui-tool-fallback-error`,n)},r),{},{children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-error-header text-muted-foreground font-semibold`,children:o}),(0,X.jsx)(`p`,{className:`aui-tool-fallback-error-reason text-muted-foreground break-words whitespace-pre-line`,children:a})]}))}var _5=`Approved by user`,v5=`User denied tool execution`,y5={"allow-once":`允许一次`,"allow-always":`始终允许`,"reject-once":`拒绝一次`,"reject-always":`始终拒绝`},b5=e=>Object.hasOwn(y5,e),x5=e=>e===`allow-once`||e===`allow-always`,S5=e=>{var t,n;return(t=(n=e.label)==null?b5(e.kind)?y5[e.kind]:void 0:n)==null?e.id:t},C5=e=>(e==null?void 0:e.display)===`select`||(e==null?void 0:e.display)===`text`||(e==null?void 0:e.display)===`questions`,w5=e=>{var t;return!((t=e.options)!=null&&t.length)||e.allowFreeform===!0},T5=(e,t)=>{var n,r;return[...((n=t==null?void 0:t.optionIds)==null?[]:n).map(t=>{var n,r;return(n=(r=e.options)==null||(r=r.find(e=>e.id===t))==null?void 0:r.label)==null?t:n}),...t!=null&&(r=t.text)!=null&&r.trim()?[t.text]:[]]},E5=e=>e!=null&&(e.approved!==void 0||e.resolution!==void 0),D5=e=>{var t;if(e.resolution!==void 0)return{outcome:`closed`,label:e.resolution===`cancelled`?`已取消,未作出决定`:`已过期,未作出决定`};let n=e.optionId===void 0||(t=e.options)==null?void 0:t.find(t=>t.id===e.optionId),r=n===void 0?e.optionId===void 0?void 0:e.optionId:S5(n),i=C5(e)||n!==void 0&&!b5(n.kind),a=e.isAutomatic?`(自动处理)`:``;return e.approved?{outcome:`allowed`,label:`${i?`已回答`:`已允许`}${a}`,option:r}:{outcome:`refused`,label:`${i?`已关闭`:`已拒绝`}${a}`,option:r}},O5={allowed:nI,refused:mI,closed:fI};function k5(e){var t;let{approval:n,className:r,focusReceiptRef:i,receiptRef:a}=e,o=G(e,r5);(0,h.useLayoutEffect)(()=>{var e;let t=i.current===n.id;i.current=null,t&&((e=a.current)==null||e.focus({preventScroll:!0}))},[n.id,i,a]);let s=D5(n),c=O5[s.outcome],l=[...new Set([n.text,n.reason].filter(e=>typeof e==`string`&&e!==``))];return(0,X.jsxs)(`div`,A(A({ref:a,"data-slot":`tool-fallback-approval-receipt`,"data-outcome":s.outcome,tabIndex:-1,className:Q(`aui-tool-fallback-approval-receipt flex flex-col gap-1.5 pt-1`,r)},o),{},{children:[n.prompt?(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-prompt text-muted-foreground whitespace-pre-line`,children:n.prompt}):null,(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-receipt-label flex items-center gap-1.5`,children:[(0,X.jsx)(c,{"aria-hidden":!0,className:`text-muted-foreground size-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`font-medium`,children:s.label}),s.option===void 0?null:(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· `,s.option]})]}),n.answers&&((t=n.questions)==null?void 0:t.map(e=>{var t;let r=T5(e,n.answers&&Object.hasOwn(n.answers,e.id)?n.answers[e.id]:void 0);return r.length===0?null:(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-receipt-answer whitespace-pre-line`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:(t=e.header)==null?e.prompt:t}),` `,`· `,r.join(`、`)]},e.id)})),l.map(e=>(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-receipt-note text-muted-foreground whitespace-pre-line`,children:e},e))]}))}function A5({questions:e,dismissible:t,locked:n,onSend:r,onDismiss:i}){let[a,o]=(0,h.useState)(()=>new Map),[s,c]=(0,h.useState)(()=>new Map),l=(e,t)=>o(n=>{var r;let i=(r=n.get(e.id))==null?[]:r,a=i.includes(t)?i.filter(e=>e!==t):e.multiple?[...i,t]:[t];return new Map(n).set(e.id,a)}),u=e=>{var t;let n=(t=a.get(e.id))==null?[]:t,r=s.get(e.id),i=r!=null&&r.trim()?r:void 0;return A(A({},n.length>0&&{optionIds:n}),i!==void 0&&{text:i})},d=e.length>0&&e.every(e=>{let t=u(e);return t.optionIds!==void 0||t.text!==void 0});return(0,X.jsxs)(X.Fragment,{children:[e.map(e=>{var t,r,i,o,u;let d=(t=a.get(e.id))==null?[]:t,f=(r=(i=e.options)==null?void 0:i.some(e=>e.description))!=null&&r;return(0,X.jsxs)(`div`,{role:`group`,"aria-label":e.prompt,"data-slot":`tool-fallback-approval-question`,className:`aui-tool-fallback-approval-question flex flex-col gap-2`,children:[(0,X.jsxs)(`p`,{className:`aui-tool-fallback-approval-question-prompt text-foreground whitespace-pre-line`,children:[e.header?(0,X.jsx)(`span`,{className:`text-muted-foreground me-1.5 text-xs font-medium uppercase`,children:e.header}):null,e.prompt]}),e.options&&e.options.length>0?(0,X.jsx)(`div`,{className:Q(`flex gap-2`,f?`flex-col items-stretch`:`flex-wrap items-center`),children:e.options.map(t=>{let r=d.includes(t.id);return(0,X.jsxs)(KG,{size:`sm`,variant:r?`default`:`outline`,className:Q(o5,f&&`h-auto flex-col items-start gap-0.5 py-2 text-start whitespace-normal`),"aria-pressed":r,onClick:()=>l(e,t.id),disabled:n,children:[(0,X.jsx)(`span`,{children:t.label}),t.description?(0,X.jsx)(`span`,{className:`text-xs font-normal opacity-80`,children:t.description}):null]},t.id)})}):null,w5(e)?(0,X.jsx)(Y8,{value:(o=s.get(e.id))==null?``:o,onChange:t=>c(n=>new Map(n).set(e.id,t.target.value)),disabled:n,"aria-label":e.prompt,placeholder:(u=e.options)!=null&&u.length?`或者输入其他答案`:`请输入你的答案`}):null]},e.id)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:o5,onClick:()=>{!n&&d&&r(Object.fromEntries(e.map(e=>[e.id,u(e)])))},disabled:n||!d,children:`发送`}),t?(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:o5,onClick:i,disabled:n,children:`关闭`}):null]})]})}var j5=(e,t,n)=>(e==null?void 0:e.type)!==`requires-action`||e.reason!==`interrupt`||t!=null||n!=null,M5=(0,h.forwardRef)(function(e,t){var n;let r=(0,h.useRef)(!1);return(0,X.jsx)(N5,A({carryFocusRef:r,forwardedRef:t},e),(n=e.approval)==null?void 0:n.id)});function N5(e){var t;let{className:n,forwardedRef:r,carryFocusRef:i,addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l,status:u}=e,d=G(e,i5),[f,p]=(0,h.useState)(!1),m=Y(e=>e.thread.voice!==void 0),g=Y(e=>e.thread.capabilities.answerToolCall),_=f||m,[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)(``),[S,C]=(0,h.useState)(null),w=(u==null?void 0:u.type)===`requires-action`,[T,E]=(0,h.useState)(w),[D,k]=(0,h.useState)(0),j=(0,h.useRef)(D);(0,h.useLayoutEffect)(()=>{j.current=D},[D]),w!==T&&(E(w),w&&(p(!1),y(null),x(``),C(null),k(D+1)));let M=(0,h.useRef)(null),N=(0,h.useRef)(null),P=(0,h.useRef)(null);(0,h.useLayoutEffect)(()=>{if(i.current){var e;i.current=!1,(e=M.current)==null||e.focus({preventScroll:!0})}return()=>{var e,t;let n=(e=M.current)==null?N.current:e;i.current=(t=n==null?void 0:n.contains(n.ownerDocument.activeElement))!=null&&t}},[i]),(0,h.useImperativeHandle)(r,()=>{var e;return(e=M.current)==null?N.current:e});let F=(0,h.useCallback)(e=>{let t=M.current;P.current=!e&&t!=null&&t.contains(t.ownerDocument.activeElement)?c==null?void 0:c.id:null,M.current=e},[c==null?void 0:c.id]),I=c!=null&&!E5(c)&&u!==void 0&&u.type!==`requires-action`&&!(f&&u.type===`running`);(0,h.useLayoutEffect)(()=>{I&&(P.current=null)},[I]);let L=()=>{let e=M.current;e!=null&&e.contains(e.ownerDocument.activeElement)&&e.focus({preventScroll:!0})};if(c!=null&&E5(c))return(0,X.jsx)(k5,A({approval:c,receiptRef:N,focusReceiptRef:P,className:n},d));if(I||!j5(u,c,s))return null;let R=c!=null&&c.prompt?(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-prompt text-foreground whitespace-pre-line`,children:c.prompt}):null;if(!g)return R&&(0,X.jsx)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:R}));let z=l?c==null?void 0:c.options:void 0,B=c!=null&&l!=null&&ie(c),ee=e=>{L(),p(!0),y(null),C(null),O(function*(){try{yield e()}catch(e){if(j.current!==D)return;p(!1),C(e instanceof Error?e.message:String(e))}})()},V=e=>{if(!_){if(c!=null&&c.approved===void 0&&l)ee(()=>l(A({approved:e},ne())));else if(s)ee(()=>o==null?void 0:o({approved:e}));else if((u==null?void 0:u.type)===`requires-action`&&u.reason===`interrupt`)return;else ee(()=>a==null?void 0:a(e?_5:v5))}},te=e=>{_||ee(()=>l==null?void 0:l(b5(e.kind)?A({optionId:e.id},ne()):A({optionId:e.id,approved:!0},ne())))},ne=()=>b.trim()?{text:b}:{},H=()=>{_||ee(()=>l==null?void 0:l({text:b}))},U=()=>{_||ee(()=>l==null?void 0:l({approved:!1}))},re=e=>{e.confirm?(L(),y(e.id)):te(e)},W=v==null||z==null?void 0:z.find(e=>e.id===v),ae=C5(c),oe=ae&&l!=null&&(c==null?void 0:c.dismissible)===!0?(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:o5,onClick:U,disabled:_,children:`关闭`}):null,se=S?(0,X.jsx)(`p`,{role:`alert`,className:`aui-tool-fallback-approval-error text-destructive text-xs whitespace-pre-line`,children:S}):null,ce=B?(0,X.jsxs)(`div`,{className:`aui-tool-fallback-approval-answer flex flex-col items-start gap-2`,children:[(0,X.jsx)(Y8,{value:b,onChange:e=>x(e.target.value),disabled:_,"aria-label":ae?(t=c==null?void 0:c.prompt)==null?`答案`:t:`备注`,placeholder:ae?`请输入你的答案`:`填写决策备注`}),ae&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:o5,onClick:H,disabled:_,children:`发送`}),oe]})]}):null;if((c==null?void 0:c.display)===`questions`&&l){var le;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-3 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsx)(A5,{questions:(le=c.questions)==null?[]:le,dismissible:c.dismissible===!0,locked:_,onSend:e=>ee(()=>l({answers:e})),onDismiss:U}),se]}))}if(W){var ue,de;let e=typeof W.confirm==`object`?W.confirm:void 0,t=(ue=e==null?void 0:e.description)==null?W.description:ue;return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval-confirm`,tabIndex:-1,className:Q(`aui-tool-fallback-approval-confirm flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-confirm-title font-semibold`,children:(de=e==null?void 0:e.title)==null?`${S5(W)}?`:de}),t&&(0,X.jsx)(`p`,{className:`aui-tool-fallback-approval-confirm-description text-muted-foreground whitespace-pre-line`,children:t}),W.grants&&W.grants.length>0&&(0,X.jsx)(`ul`,{className:`aui-tool-fallback-approval-confirm-grants flex flex-col gap-1`,children:W.grants.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsx)(`code`,{className:`aui-tool-fallback-approval-confirm-grant bg-muted rounded px-1.5 py-0.5 text-xs`,children:e})},e))}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:o5,onClick:()=>te(W),disabled:_,children:`确认`}),(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:o5,onClick:()=>{L(),y(null)},disabled:_,children:`返回`})]})]}))}if(z&&z.length>0){let e=z.filter(e=>x5(e.kind)),t=z.filter(e=>!b5(e.kind)),r=z.filter(e=>b5(e.kind)&&!x5(e.kind));return(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[[...e,...t,...r].map(t=>(0,X.jsx)(KG,{size:`sm`,variant:t===e[0]?`default`:`outline`,className:o5,onClick:()=>re(t),disabled:_,children:S5(t)},t.id)),r.length===0&&!ae&&(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:o5,onClick:()=>V(!1),disabled:_,children:`拒绝`}),!B&&oe]}),ce,se]}))}return ae?(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,ce,!B&&oe&&(0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:oe}),se]})):(0,X.jsxs)(`div`,A(A({"data-slot":`tool-fallback-approval`,tabIndex:-1,className:Q(`aui-tool-fallback-approval flex flex-col gap-2 pt-1`,n)},d),{},{ref:F,children:[R,(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(KG,{size:`sm`,className:o5,onClick:()=>V(!0),disabled:_,children:`允许`}),(0,X.jsx)(KG,{size:`sm`,variant:`outline`,className:o5,onClick:()=>V(!1),disabled:_,children:`拒绝`})]}),ce,se]}))}var P5=(0,h.memo)(({toolName:e,argsText:t,result:n,status:r,responseDeliveryStatus:i,addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l})=>{let u=(r==null?void 0:r.type)===`incomplete`&&r.reason===`cancelled`,d=(r==null?void 0:r.type)===`requires-action`,f=c!=null||d&&j5(r,c,s),[p,m]=(0,h.useState)(d),[g,_]=(0,h.useState)(d);d!==g&&(_(d),d&&m(!0));let v=(0,h.useRef)(!1),y=(0,h.useRef)(null),b=(0,h.useRef)(null);return(0,h.useLayoutEffect)(()=>{let e=y.current;if(!e||e.isConnected||d||!v.current)return;let t=c==null||!E5(c);v.current=!1;let{activeElement:n,body:r}=e.ownerDocument;if(t&&(n==null||n===r)){var i;(i=b.current)==null||i.focus({preventScroll:!0})}},[c,d,r==null?void 0:r.type]),(0,X.jsxs)(s5,{open:p,onOpenChange:m,children:[(0,X.jsx)(d5,{toolName:e,status:r,responseDeliveryStatus:i}),(0,X.jsxs)(f5,{children:[(0,X.jsx)(g5,{status:r}),(0,X.jsx)(p5,{argsText:t,className:Q(u&&`opacity-60`)}),f&&(0,X.jsx)(M5,{addResult:a,resume:o,interrupt:s,approval:c,respondToApproval:l,status:r,onFocusCapture:e=>{var t;let n=e.currentTarget.closest(`[data-slot="tool-fallback-root"]`);b.current=(t=n==null?void 0:n.querySelector(`[data-slot="tool-fallback-trigger"]`))==null?null:t,y.current=e.currentTarget,v.current=!0},onBlurCapture:e=>{let t=e.relatedTarget;(t?e.currentTarget.contains(t):e.currentTarget.contains(e.currentTarget.ownerDocument.activeElement))||(v.current=!1)}}),(0,X.jsx)(h5,{result:n})]})]})});P5.displayName=`ToolFallback`,P5.Root=s5,P5.Trigger=d5,P5.Content=f5,P5.Args=p5,P5.Result=h5,P5.Error=g5,P5.Approval=M5,j();var F5=[`className`,`variant`,`open`,`onOpenChange`,`defaultOpen`,`children`],I5=[`count`,`active`,`className`],L5=[`className`,`children`],R5=200,z5=UG(`aui-tool-group-root group/tool-group w-full`,{variants:{variant:{outline:`rounded-lg border py-3`,ghost:``,muted:`border-muted-foreground/30 bg-muted/30 rounded-lg border py-3`}},defaultVariants:{variant:`outline`}});function B5(e){let{className:t,variant:n,open:r,onOpenChange:i,defaultOpen:a=!1,children:o}=e,s=G(e,F5),c=(0,h.useRef)(null),[l,u]=(0,h.useState)(a),d=$P(c,R5),f=r!==void 0,p=f?r:l,m=(0,h.useCallback)(e=>{d(),f||u(e),i==null||i(e)},[d,f,i]);return(0,X.jsx)(D8,A(A({ref:c,"data-slot":`tool-group-root`,"data-variant":n==null?`outline`:n,open:p,onOpenChange:m,className:Q(z5({variant:n}),`group/tool-group-root`,t),style:{"--animation-duration":`${R5}ms`}},s),{},{children:o}))}function V5(e){let{count:t,active:n=!1,className:r}=e,i=G(e,I5),a=`${t} 次工具调用`;return(0,X.jsxs)(O8,A(A({"data-slot":`tool-group-trigger`,className:Q(`aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 text-sm transition-[color,scale] active:scale-[0.98]`,`group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:py-1.5`,`group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4`,`group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4`,r)},i),{},{children:[n&&(0,X.jsx)(PI,{"data-slot":`tool-group-trigger-loader`,className:`aui-tool-group-trigger-loader size-3 shrink-0 animate-spin [animation-duration:0.6s]`}),(0,X.jsx)(`span`,{"data-slot":`tool-group-trigger-label`,className:Q(`aui-tool-group-trigger-label-wrapper inline-block text-start text-xs leading-none font-medium`,`group-data-[variant=ghost]/tool-group-root:font-normal`,`group-data-[variant=outline]/tool-group-root:grow`,`group-data-[variant=muted]/tool-group-root:grow`,n&&`shimmer motion-reduce:animate-none`),children:a}),(0,X.jsx)(iI,{"data-slot":`tool-group-trigger-chevron`,className:Q(`aui-tool-group-trigger-chevron size-3 shrink-0`,`transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none`,`-rotate-90`,`group-data-open/trigger:rotate-0`,`group-data-panel-open/trigger:rotate-0`)})]}))}function H5(e){let{className:t,children:n}=e,r=G(e,L5);return(0,X.jsx)(k8,A(A({"data-slot":`tool-group-content`,className:Q(`aui-tool-group-content relative overflow-hidden text-sm outline-none`,`group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none`,`data-closed:animate-collapsible-up`,`data-open:animate-collapsible-down`,`data-closed:fill-mode-forwards`,`data-closed:pointer-events-none`,`[--tw-duration:var(--animation-duration)]`,t)},r),{},{children:(0,X.jsx)(`div`,{className:Q(`mt-2 flex flex-col gap-2`,`group-data-[variant=ghost]/tool-group-root:mt-1 group-data-[variant=ghost]/tool-group-root:gap-1`,`group-data-[variant=outline]/tool-group-root:mt-3 group-data-[variant=outline]/tool-group-root:border-t group-data-[variant=outline]/tool-group-root:px-4 group-data-[variant=outline]/tool-group-root:pt-3`,`group-data-[variant=muted]/tool-group-root:mt-3 group-data-[variant=muted]/tool-group-root:border-t group-data-[variant=muted]/tool-group-root:px-4 group-data-[variant=muted]/tool-group-root:pt-3`,`[&>*]:animate-in [&>*]:fade-in-0 [&>*]:blur-in-[2px] [&>*]:slide-in-from-top-1 [&>*]:animation-duration-(--animation-duration) [&>*]:ease-[cubic-bezier(0.32,0.72,0,1)]`,`[&>*]:motion-reduce:animate-none`,`[&>*:nth-child(2)]:[animation-delay:40ms]`,`[&>*:nth-child(3)]:[animation-delay:80ms]`,`[&>*:nth-child(4)]:[animation-delay:120ms]`,`[&>*:nth-child(n+5)]:[animation-delay:160ms]`),children:n})}))}var U5=(0,h.memo)(({children:e,startIndex:t,endIndex:n})=>{let r=n-t+1;return(0,X.jsxs)(B5,{children:[(0,X.jsx)(V5,{count:r}),(0,X.jsx)(H5,{children:e})]})});U5.displayName=`ToolGroup`,U5.Root=B5,U5.Trigger=V5,U5.Content=H5,j();var W5=[`className`];function G5(e){let{className:t}=e,n=G(e,W5);return(0,X.jsx)(`div`,A({"data-slot":`skeleton`,className:Q(`animate-pulse rounded-md bg-muted`,t)},n))}j();var K5=[`className`],q5=({group:e,children:t})=>{let[n,r]=(0,h.useState)(!1);return(0,X.jsxs)(B5,{variant:`ghost`,open:n||e.counts.requiresAction>0,onOpenChange:r,children:[(0,X.jsx)(V5,{count:e.indices.length,active:e.status.type===`running`}),(0,X.jsx)(H5,{children:t})]})},J5=e=>!!e.thread.canResume&&e.composer.type===`thread`&&e.composer.isEmpty,Y5=e=>(e==null?void 0:e.completedAt)===void 0?void 0:Number(((e.completedAt-e.startedAt)/1e3).toFixed(1)),X5=__({reasoning:[`group-chainOfThought`,`group-reasoning`],"tool-call":[`group-chainOfThought`,`group-reasoning`],"standalone-tool-call":[]}),Z5=[`group-chainOfThought`,`group-task`],Q5=(e,t)=>{var n;let r=X5(e,t);return e.type===`tool-call`&&e.messages!==void 0&&r.length>0&&!(t!=null&&(n=t.toolUIs)!=null&&(n=n[e.toolName])!=null&&n.length)?Z5:r},$5={},e7=(0,h.createContext)($5),t7=e=>e.thread.messages.length===0&&(!e.thread.isLoading||e.threads.isLoading),n7=e=>e.thread.messages.length===0&&e.thread.isLoading&&!e.thread.isDisabled&&!e.threads.isLoading,r7=()=>(0,X.jsxs)(`div`,{"data-slot":`aui_thread-history-skeleton`,role:`status`,className:`animate-in fade-in fill-mode-both flex flex-col gap-y-6 [animation-delay:150ms] [animation-duration:200ms]`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`正在加载对话`}),(0,X.jsx)(G5,{className:`ml-auto h-9 w-2/5 rounded-xl motion-reduce:animate-none`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,X.jsx)(G5,{className:`h-4 w-11/12 motion-reduce:animate-none`}),(0,X.jsx)(G5,{className:`h-4 w-4/5 motion-reduce:animate-none`}),(0,X.jsx)(G5,{className:`h-4 w-3/5 motion-reduce:animate-none`})]}),(0,X.jsx)(G5,{className:`ml-auto h-9 w-1/3 rounded-xl motion-reduce:animate-none`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,X.jsx)(G5,{className:`h-4 w-10/12 motion-reduce:animate-none`}),(0,X.jsx)(G5,{className:`h-4 w-2/3 motion-reduce:animate-none`})]})]}),i7=({components:e=$5,autoFocus:t=!0})=>{let n=Y(t7);return(0,X.jsx)(e7.Provider,{value:e,children:(0,X.jsx)(a7,{isEmpty:n,autoFocus:t})})},a7=({isEmpty:e,autoFocus:t})=>{let{Welcome:n=h7}=(0,h.useContext)(e7);return(0,X.jsx)(CP.Root,{className:`aui-root aui-thread-root bg-background @container flex h-full flex-col`,style:{"--thread-max-width":`704px`,"--composer-bg":`color-mix(in oklab, var(--color-muted) 30%, transparent)`,"--composer-radius":`16px`,"--composer-padding":`8px`},children:(0,X.jsx)(CP.Viewport,{turnAnchor:`top`,"data-slot":`aui_thread-viewport`,className:`relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth`,children:(0,X.jsxs)(`div`,{className:Q(`mx-auto flex w-full max-w-(--thread-max-width) flex-1 flex-col px-4 pt-4`,e&&`justify-center`),children:[(0,X.jsx)(Td,{condition:t7,children:(0,X.jsx)(n,{})}),(0,X.jsx)(Td,{condition:n7,children:(0,X.jsx)(r7,{})}),(0,X.jsx)(p7,{}),(0,X.jsx)(`div`,{"data-slot":`aui_message-group`,className:`mb-14 flex flex-col gap-y-6 empty:hidden`,children:(0,X.jsx)(CP.Messages,{children:()=>(0,X.jsx)(o7,{})})}),(0,X.jsxs)(CP.ViewportFooter,{className:Q(`aui-thread-viewport-footer bg-background flex flex-col gap-2 overflow-visible pb-4 md:pb-6`,!e&&`sticky bottom-0 mt-auto rounded-t-(--composer-radius)`),children:[(0,X.jsx)(m7,{}),(0,X.jsx)(yq,{}),!e&&(0,X.jsx)(`div`,{className:`mx-auto flex w-full max-w-(--thread-max-width) justify-start`,children:(0,X.jsxs)(HP.New,{render:(0,X.jsx)(`button`,{type:`button`,className:`inline-flex h-6 items-center gap-1 rounded text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`}),children:[(0,X.jsx)(XI,{className:`size-3`}),`新建对话`]})}),(0,X.jsx)(v7,{autoFocus:t}),(0,X.jsx)(Td,{condition:e=>t7(e)&&e.composer.isEmpty,children:(0,X.jsx)(g7,{})})]})]})})})},o7=()=>{let{AssistantMessage:e=x7}=(0,h.useContext)(e7),t=Y(e=>e.message.role),n=Y(e=>e.message.composer.isEditing),r=Y(e=>e.message.metadata.modality===`voice`);return n?(0,X.jsx)(O7,{}):r?(0,X.jsx)(l7,{}):t===`user`?(0,X.jsx)(E7,{}):(0,X.jsx)(e,{})},s7=()=>Y(e=>{var t,n;let r=((t=e.thread.messages[e.message.index-1])==null?void 0:t.metadata.modality)===`voice`,i=((n=e.thread.messages[e.message.index+1])==null?void 0:n.metadata.modality)===`voice`;return r?i?`middle`:`end`:i?`start`:`single`}),c7=({text:e})=>(0,X.jsx)(`p`,{className:`aui-spoken-message-text m-0`,children:e}),l7=()=>{let e=Y(e=>e.message.role),t=s7(),n=Y(e=>{var t;return e.message.role===`assistant`&&((t=e.message.status)==null?void 0:t.type)===`running`}),r=t===`start`||t===`single`;return(0,X.jsxs)(MN.Root,{"data-slot":`aui_spoken-message-root`,"data-role":e,"data-voice-run":t,className:Q(`aui-spoken-message bg-muted/40 mx-2 px-3 py-1.5 [contain-intrinsic-size:auto_48px] [content-visibility:auto]`,t===`single`&&`rounded-xl py-2`,t===`start`&&`rounded-t-xl pt-2`,t===`middle`&&`-mt-6`,t===`end`&&`-mt-6 rounded-b-xl pb-2`),children:[r&&(0,X.jsxs)(`div`,{"data-slot":`aui_spoken-exchange-header`,className:`text-muted-foreground mb-1.5 flex items-center gap-1.5 text-xs`,children:[(0,X.jsx)(KI,{className:`size-3`,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:`语音对话`})]}),(0,X.jsxs)(`div`,{"data-slot":`aui_spoken-message-content`,className:`text-foreground flex items-start gap-2 text-sm leading-relaxed`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground mt-1 shrink-0`,"aria-hidden":!0,children:e===`user`?(0,X.jsx)(BI,{className:`size-3.5`}):(0,X.jsx)(XF,{className:`size-3.5`})}),(0,X.jsx)(`span`,{className:`sr-only`,children:e===`user`?`你说`:`助手说`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1 wrap-break-word`,children:[(0,X.jsx)(MN.Parts,{components:{Text:c7}}),n&&(0,X.jsx)(`span`,{"data-slot":`aui_spoken-message-indicator`,role:`status`,className:`text-muted-foreground ms-1 animate-pulse font-sans`,"aria-label":`助手正在说话`,children:`●`})]}),(0,X.jsx)(u7,{})]})]})},u7=()=>(0,X.jsx)(xk.Root,{hideWhenRunning:!0,autohide:`always`,className:`aui-spoken-action-bar text-muted-foreground flex shrink-0 gap-1`,children:(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`,className:`size-6`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]})}),d7=`a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1']):not([disabled])`,f7=e=>{for(let t=e.nextElementSibling;t;t=t.nextElementSibling){let e=t.matches(d7)?t:t.querySelector(d7);if(e instanceof HTMLElement)return e}return null},p7=()=>{let e=Xa(),t=Y(e=>e.thread.hasEarlier),n=Y(e=>e.thread.isLoadingEarlier),r=t||n,i=(0,h.useRef)(null),a=(0,h.useRef)(null),o=(0,h.useRef)(null),s=(0,h.useRef)(!1);return(0,h.useEffect)(()=>{if(!t||n){n||(s.current=!1);return}let r=a.current;if(!r)return;let i=r.closest(`[data-slot="aui_thread-viewport"]`);if(!i)return;let o=new IntersectionObserver(t=>{let n=t[0];n!=null&&n.isIntersecting&&!s.current&&(s.current=!0,e.thread.loadEarlier().catch(e=>{console.error(`加载更早的消息失败:`,e),s.current=!1}))},{root:i,rootMargin:`120px 0px 0px 0px`,threshold:0});return o.observe(r),()=>{o.disconnect()}},[e,t,n]),(0,h.useLayoutEffect)(()=>{var e;let t=o.current,n=i.current;if(r||!t||t.isConnected||!n)return;o.current=null;let a=document.activeElement;a&&a!==document.body||(e=f7(n))==null||e.focus()},[r]),(0,X.jsxs)(`div`,{ref:i,className:`contents`,onFocus:e=>{o.current=e.target},children:[(0,X.jsx)(`div`,{ref:a,"aria-hidden":`true`,className:`h-px w-full shrink-0`}),(0,X.jsx)(`span`,{role:`status`,className:`sr-only`,children:n?`正在加载更早的消息`:``}),r&&(0,X.jsx)(CP.LoadEarlier,{render:(0,X.jsx)(KG,{variant:`ghost`,size:`sm`,"data-slot":`aui_thread-load-earlier`,className:`aui-thread-load-earlier text-muted-foreground mb-6 self-center rounded-full`}),children:(0,X.jsx)(`span`,{className:Q(n&&`shimmer motion-reduce:animate-none`),children:n?`正在加载更早的消息...`:`加载更早的消息`})})]})},m7=()=>(0,X.jsx)(CP.ScrollToBottom,{render:(0,X.jsx)(bK,{tooltip:`滚动到底部`,variant:`outline`,className:`aui-thread-scroll-to-bottom dark:border-border dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible`}),children:(0,X.jsx)(KF,{})}),h7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-root mb-6 flex flex-col px-2`,children:(0,X.jsx)(`p`,{className:`aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-medium tracking-tight text-foreground duration-200 text-center`,children:`今天有什么可以帮你?`})}),g7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-suggestions flex w-full flex-col`,children:(0,X.jsx)(CP.Suggestions,{children:()=>(0,X.jsx)(_7,{})})}),_7=()=>(0,X.jsx)(`div`,{className:`aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200`,children:(0,X.jsxs)(AP.Trigger,{send:!0,render:(0,X.jsx)(`button`,{type:`button`,className:`aui-thread-welcome-suggestion group hover:bg-foreground/[0.03] focus-visible:ring-ring/50 flex w-full items-baseline gap-2.5 rounded-md px-2 py-2 text-start text-sm transition-colors outline-none focus-visible:ring-1 motion-reduce:transition-none`}),children:[(0,X.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground/60 group-hover:text-foreground font-mono text-xs transition-colors motion-reduce:transition-none`,children:`>`}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[(0,X.jsx)(AP.Title,{className:`aui-thread-welcome-suggestion-text-1 text-foreground`}),` `,(0,X.jsx)(AP.Description,{className:`aui-thread-welcome-suggestion-text-2 text-muted-foreground empty:hidden`})]})]})}),v7=({autoFocus:e})=>(0,X.jsx)(_M.Root,{className:`aui-composer-root relative flex w-full flex-col`,children:(0,X.jsxs)(_M.AttachmentDropzone,{render:(0,X.jsx)(`div`,{"data-slot":`aui_composer-shell`,className:`border-foreground/10 focus-within:border-foreground/25 data-[dragging=true]:border-ring flex w-full cursor-text flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) transition-[border-color] data-[dragging=true]:border-dashed data-[dragging=true]:bg-[color-mix(in_oklab,var(--color-accent)_50%,var(--color-background))]`}),children:[(0,X.jsx)(IK,{}),(0,X.jsx)(_M.Input,{placeholder:`请输入你的问题...`,className:`aui-composer-input text-foreground caret-primary placeholder:text-muted-foreground/60 max-h-48 min-h-10 w-full resize-none bg-transparent px-2.5 py-1 text-base leading-6 outline-none`,rows:1,autoFocus:e,enterKeyHint:`send`,"aria-label":`消息输入框`}),(0,X.jsx)(y7,{})]})}),y7=()=>{let{ComposerExtra:e}=(0,h.useContext)(e7),t=Y(e=>e.composer.submission!==void 0&&!(e.thread.isRunning&&e.thread.capabilities.cancel));return(0,X.jsxs)(`div`,{className:`aui-composer-action-wrapper relative flex items-center justify-between`,children:[e?(0,X.jsxs)(`div`,{className:`aui-composer-action-start flex items-center gap-1.5`,children:[(0,X.jsx)(LK,{}),(0,X.jsx)(e,{})]}):(0,X.jsx)(LK,{}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsxs)(Td,{condition:e=>e.thread.capabilities.dictation,children:[(0,X.jsx)(Td,{condition:e=>e.composer.dictation==null,children:(0,X.jsx)(_M.Dictate,{render:(0,X.jsx)(bK,{tooltip:`语音输入`,side:`bottom`,type:`button`,variant:`ghost`,size:`icon`,className:`aui-composer-dictate text-muted-foreground hover:text-foreground size-7 rounded-full`,"aria-label":`开始语音输入`}),children:(0,X.jsx)(BI,{className:`aui-composer-dictate-icon size-4`})})}),(0,X.jsx)(Td,{condition:e=>e.composer.dictation!=null,children:(0,X.jsx)(_M.StopDictation,{render:(0,X.jsx)(bK,{tooltip:`停止语音输入`,side:`bottom`,type:`button`,variant:`ghost`,size:`icon`,className:`aui-composer-stop-dictation text-destructive size-7 rounded-full`,"aria-label":`停止语音输入`}),children:(0,X.jsx)(nL,{className:`aui-composer-stop-dictation-icon size-3.5 animate-pulse fill-current`})})})]}),(0,X.jsx)(Td,{condition:e=>(!e.composer.canCancel||e.thread.voice!==void 0&&e.composer.submission===void 0)&&!J5(e),children:(0,X.jsx)(_M.Send,{render:(0,X.jsx)(bK,{tooltip:`发送消息`,side:`bottom`,type:`button`,variant:`default`,size:`icon`,className:`aui-composer-send size-7 rounded-full`,"aria-label":`发送消息`}),children:(0,X.jsx)(JF,{className:`aui-composer-send-icon size-4`})})}),(0,X.jsx)(Td,{condition:J5,children:(0,X.jsx)(_M.Resume,{render:(0,X.jsx)(bK,{tooltip:`继续生成`,side:`bottom`,type:`button`,variant:`default`,size:`icon`,className:`aui-composer-resume size-7 rounded-full`,"aria-label":`继续生成`}),children:(0,X.jsx)(JI,{className:`aui-composer-resume-icon size-4`})})}),(0,X.jsx)(Td,{condition:e=>e.composer.canCancel&&(e.thread.voice===void 0||e.composer.submission!==void 0),children:(0,X.jsx)(_M.Cancel,{render:(0,X.jsx)(KG,{type:`button`,variant:`default`,size:`icon`,className:`aui-composer-cancel size-7 rounded-full`,"aria-label":t?`取消发送`:`停止生成`}),children:(0,X.jsx)(nL,{className:`aui-composer-cancel-icon size-3.5 fill-current`})})})]})]})},b7=()=>(0,X.jsx)(MN.Error,{children:(0,X.jsx)(GM.Root,{className:`aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200`,children:(0,X.jsx)(GM.Message,{className:`aui-message-error-message line-clamp-2`})})}),x7=()=>{let{ToolFallback:e=P5,ToolGroup:t,ReasoningGroup:n,TaskGroup:r}=(0,h.useContext)(e7),i=r?Q5:X5;return(0,X.jsxs)(MN.Root,{"data-slot":`aui_assistant-message-root`,"data-role":`assistant`,className:`fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]`,children:[(0,X.jsxs)(`div`,{"data-slot":`aui_assistant-message-content`,className:`text-foreground px-2 text-left leading-relaxed wrap-break-word`,children:[(0,X.jsx)(MN.GroupedParts,{groupBy:i,children:({part:i,children:a})=>{switch(i.type){case`group-chainOfThought`:return(0,X.jsx)(`div`,{"data-slot":`aui_chain-of-thought`,children:a});case`group-task`:return r?(0,X.jsx)(r,{group:i}):null;case`group-tool`:return t?(0,X.jsx)(t,{group:i,children:a}):(0,X.jsx)(q5,{group:i,children:a});case`group-reasoning`:{if(n)return(0,X.jsx)(n,{group:i,children:a});let e=i.status.type===`running`;return(0,X.jsxs)(U8,{streaming:e,children:[(0,X.jsx)(z8,{active:e,duration:Y5(i.timing)}),(0,X.jsx)(B8,{"aria-busy":e,children:(0,X.jsx)(V8,{children:a})})]})}case`text`:return(0,X.jsx)(Y6,{});case`reasoning`:return(0,X.jsx)(K8,A({},i));case`tool-call`:var o;return(o=i.toolUI)==null?(0,X.jsx)(e,A({},i)):o;case`data`:return i.dataRendererUI;case`file`:return(0,X.jsx)(`div`,{"data-slot":`aui_assistant-message-file`,className:`py-1`,children:(0,X.jsx)(C7,A({},i))});case`image`:return(0,X.jsx)(`div`,{"data-slot":`aui_assistant-message-image`,className:`py-1`,children:(0,X.jsx)(Kq,A({},i))});case`indicator`:return(0,X.jsx)(`span`,{"data-slot":`aui_assistant-message-indicator`,className:`animate-pulse font-sans`,"aria-label":`助手正在处理`,children:`●`});default:return null}}}),(0,X.jsx)(b7,{})]}),(0,X.jsxs)(`div`,{"data-slot":`aui_assistant-message-footer`,className:Q(`ms-2 flex items-center`,`min-h-7.5 pt-1.5`),children:[(0,X.jsx)(k7,{}),(0,X.jsx)(S7,{})]})]})},S7=()=>(0,X.jsxs)(xk.Root,{hideWhenRunning:!0,autohide:`not-last`,className:`aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-200`,children:[(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]}),(0,X.jsxs)(Td,{condition:e=>e.thread.capabilities.feedback,children:[(0,X.jsx)(xk.FeedbackPositive,{render:(0,X.jsx)(bK,{tooltip:`有帮助`,className:`data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground`}),children:(0,X.jsx)(iL,{})}),(0,X.jsx)(xk.FeedbackNegative,{render:(0,X.jsx)(bK,{tooltip:`没有帮助`,className:`data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground`}),children:(0,X.jsx)(oL,{})})]}),(0,X.jsx)(xk.Reload,{render:(0,X.jsx)(bK,{tooltip:`重新生成`}),children:(0,X.jsx)(QI,{})}),(0,X.jsxs)(Lk.Root,{children:[(0,X.jsx)(Lk.Trigger,{render:(0,X.jsx)(bK,{tooltip:`更多`,className:`data-[state=open]:bg-accent`}),children:(0,X.jsx)(SI,{})}),(0,X.jsx)(Lk.Content,{side:`bottom`,align:`start`,sideOffset:6,className:`aui-action-bar-more-content bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[128px] overflow-hidden rounded-xl border p-1.5`,children:(0,X.jsxs)(xk.ExportMarkdown,{render:(0,X.jsx)(Lk.Item,{className:`aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none`}),children:[(0,X.jsx)(vI,{className:`size-4`}),`导出为 Markdown`]})})]})]}),C7=e=>{let t=e.mimeType.toLowerCase().startsWith(`image/`)?aq(e.data,e.mimeType,e.sourceType):null;return t?(0,X.jsx)(Kq,A({type:`image`,image:t,status:e.status},e.filename!==void 0&&{filename:e.filename})):(0,X.jsx)(_q,A({},e))},w7=e=>(0,X.jsx)(`div`,{"data-slot":`aui_user-message-file`,className:`py-1`,children:(0,X.jsx)(C7,A({},e))}),T7=e=>(0,X.jsx)(`div`,{"data-slot":`aui_user-message-image`,className:`py-1`,children:(0,X.jsx)(Kq,A({},e))}),E7=()=>(0,X.jsxs)(MN.Root,{"data-slot":`aui_user-message-root`,className:`fade-in slide-in-from-bottom-1 animate-in grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto] [&:where(>*)]:col-start-2`,"data-role":`user`,children:[(0,X.jsx)(FK,{}),(0,X.jsx)(`div`,{className:`aui-user-message-content-wrapper relative col-start-2 min-w-0`,children:(0,X.jsx)(`div`,{className:`aui-user-message-content peer rounded-(--composer-radius) bg-muted px-4 py-2 text-foreground wrap-break-word empty:hidden`,children:(0,X.jsx)(MN.Parts,{components:{File:w7,Image:T7}})})}),(0,X.jsx)(`div`,{className:`col-start-2 -mt-1 flex justify-end min-h-8`,children:(0,X.jsx)(D7,{})}),(0,X.jsx)(k7,{"data-slot":`aui_user-branch-picker`,className:`col-span-full col-start-1 -me-1 justify-end`})]}),D7=()=>(0,X.jsxs)(xk.Root,{hideWhenRunning:!0,autohide:`not-last`,className:`aui-user-action-bar-root flex flex-row items-center gap-1`,children:[(0,X.jsxs)(xk.Copy,{render:(0,X.jsx)(bK,{tooltip:`复制`,className:`aui-user-action-copy size-8 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`}),children:[(0,X.jsx)(Td,{condition:e=>e.message.isCopied,children:(0,X.jsx)(nI,{className:`animate-in zoom-in-50 fade-in duration-200 ease-out`})}),(0,X.jsx)(Td,{condition:e=>!e.message.isCopied,children:(0,X.jsx)(gI,{className:`animate-in zoom-in-75 fade-in duration-150`})})]}),(0,X.jsx)(xk.Edit,{render:(0,X.jsx)(bK,{tooltip:`编辑`,className:`aui-user-action-edit size-8 rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`}),children:(0,X.jsx)(WI,{className:`size-4`})})]}),O7=()=>(0,X.jsx)(MN.Root,{"data-slot":`aui_edit-composer-wrapper`,className:`flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]`,children:(0,X.jsxs)(_M.Root,{className:`aui-edit-composer-root border-foreground/10 focus-within:border-foreground/25 ms-auto flex w-full max-w-[85%] cursor-text flex-col rounded-(--composer-radius) border bg-(--composer-bg) transition-[border-color]`,children:[(0,X.jsx)(_M.Input,{className:`aui-edit-composer-input text-foreground min-h-14 w-full resize-none bg-transparent px-4 pt-3 pb-1 text-base outline-none`,autoFocus:!0}),(0,X.jsxs)(`div`,{className:`aui-edit-composer-footer mx-2.5 mb-2.5 flex items-center gap-1.5 self-end`,children:[(0,X.jsx)(_M.Cancel,{render:(0,X.jsx)(KG,{variant:`ghost`,size:`sm`,className:`h-8 px-3`}),children:`取消`}),(0,X.jsx)(_M.Send,{render:(0,X.jsx)(KG,{size:`sm`,className:`h-8 px-3`}),children:`更新`})]})]})}),k7=e=>{let{className:t}=e,n=G(e,K5);return(0,X.jsxs)(tA.Root,A(A({hideWhenSingleBranch:!0,className:Q(`aui-branch-picker-root text-muted-foreground -ms-2 me-2 inline-flex items-center text-xs`,t)},n),{},{children:[(0,X.jsx)(tA.Previous,{render:(0,X.jsx)(bK,{tooltip:`上一条回复`}),children:(0,X.jsx)(oI,{})}),(0,X.jsxs)(`span`,{className:`aui-branch-picker-state font-medium`,children:[(0,X.jsx)(tA.Number,{}),` /`,` `,(0,X.jsx)(tA.Count,{})]}),(0,X.jsx)(tA.Next,{render:(0,X.jsx)(bK,{tooltip:`下一条回复`}),children:(0,X.jsx)(cI,{})})]}))};function A7({onSelect:e}){return(0,X.jsxs)(`div`,{className:`flex h-full flex-col bg-background text-foreground`,children:[(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsxs)(HP.New,{render:(0,X.jsx)(`button`,{type:`button`,onClick:e,className:`\r
95
95
  flex w-full items-center justify-center gap-2\r
96
96
  rounded-lg border border-border\r
97
97
  bg-background px-4 py-3\r
@@ -115,4 +115,4 @@ Check the top-level render call using <`+n+`>.`)}return t}function Ne(e,t){if(e.
115
115
  hover:text-destructive\r
116
116
  group-hover:opacity-100\r
117
117
  focus-visible:opacity-100\r
118
- `,title:`删除对话`}),children:(0,X.jsx)(cL,{className:`size-4`})})]},t.id)})]})]})}function C7(){let[e,t]=(0,h.useState)(`chat`),n=()=>{t(`chat`)};return(0,X.jsxs)(HP.Root,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center border-b bg-background px-2`,children:[(0,X.jsxs)(`button`,{type:`button`,onClick:n,className:`flex h-9 flex-1 items-center justify-center gap-2 rounded-md text-sm transition-colors ${e===`chat`?`bg-accent font-medium text-foreground`:`text-muted-foreground hover:bg-accent/50`}`,children:[(0,X.jsx)(II,{className:`size-4`}),`对话`]}),(0,X.jsxs)(`button`,{type:`button`,onClick:()=>t(`conversations`),className:`flex h-9 flex-1 items-center justify-center gap-2 rounded-md text-sm transition-colors ${e===`conversations`?`bg-accent font-medium text-foreground`:`text-muted-foreground hover:bg-accent/50`}`,children:[(0,X.jsx)(RI,{className:`size-4`}),`所有对话`]})]}),(0,X.jsx)(`div`,{className:`min-h-0 flex-1 flex-col overflow-hidden ${e===`chat`?`flex`:`hidden`}`,children:(0,X.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,X.jsx)(X5,{})})}),(0,X.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden ${e===`conversations`?`block`:`hidden`}`,children:(0,X.jsx)(S7,{onSelect:n})})]})}e.ChatApp=C7,e.ChatRuntimeProvider=OF});
118
+ `,title:`删除对话`}),children:(0,X.jsx)(cL,{className:`size-4`})})]},t.id)})]})]})}function j7(){let[e,t]=(0,h.useState)(`chat`),n=()=>{t(`chat`)};return(0,X.jsxs)(HP.Root,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center border-b bg-background px-2`,children:[(0,X.jsxs)(`button`,{type:`button`,onClick:n,className:`flex h-9 flex-1 items-center justify-center gap-2 rounded-md text-sm transition-colors ${e===`chat`?`bg-accent font-medium text-foreground`:`text-muted-foreground hover:bg-accent/50`}`,children:[(0,X.jsx)(II,{className:`size-4`}),`对话`]}),(0,X.jsxs)(`button`,{type:`button`,onClick:()=>t(`conversations`),className:`flex h-9 flex-1 items-center justify-center gap-2 rounded-md text-sm transition-colors ${e===`conversations`?`bg-accent font-medium text-foreground`:`text-muted-foreground hover:bg-accent/50`}`,children:[(0,X.jsx)(RI,{className:`size-4`}),`所有对话`]})]}),(0,X.jsx)(`div`,{className:`min-h-0 flex-1 flex-col overflow-hidden ${e===`chat`?`flex`:`hidden`}`,children:(0,X.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,X.jsx)(i7,{})})}),(0,X.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden ${e===`conversations`?`block`:`hidden`}`,children:(0,X.jsx)(A7,{onSelect:n})})]})}e.ChatApp=j7,e.ChatRuntimeProvider=OF});
@@ -1,3 +1,2 @@
1
1
  import { default as Prism } from 'prismjs';
2
- declare const _default: Record<string, Prism.GrammarValue>;
3
- export default _default;
2
+ export declare const mineGrammar: Prism.Grammar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shytv/ai-chart",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "./dist/ai-chart.umd.index.mjs",
6
6
  "module": "./dist/ai-chart.es.index.js",