@alifd/chat 0.3.61 → 0.3.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/ai-loading/main.js +1 -1
- package/dist/docs/balloon/main.js +1 -1
- package/dist/docs/button/main.js +1 -1
- package/dist/docs/card/main.js +1 -1
- package/dist/docs/card-loading/main.js +1 -1
- package/dist/docs/checkbox/main.js +1 -1
- package/dist/docs/checkbox-group/main.js +1 -1
- package/dist/docs/code-view/main.js +1 -1
- package/dist/docs/collapse/main.js +1 -1
- package/dist/docs/date-picker/main.js +1 -1
- package/dist/docs/document/main.js +1 -1
- package/dist/docs/drawer/main.js +1 -1
- package/dist/docs/error-notice/main.js +1 -1
- package/dist/docs/feedback/main.js +1 -1
- package/dist/docs/flip/main.js +1 -1
- package/dist/docs/float-button/main.js +1 -1
- package/dist/docs/form/main.js +1 -1
- package/dist/docs/html-render/main.js +1 -1
- package/dist/docs/icon/main.js +1 -1
- package/dist/docs/image-preview/main.js +1 -1
- package/dist/docs/img/main.js +1 -1
- package/dist/docs/input/main.js +1 -1
- package/dist/docs/list/main.js +1 -1
- package/dist/docs/loading/main.js +1 -1
- package/dist/docs/markdown/main.js +1 -1
- package/dist/docs/mermaid-view/main.js +1 -1
- package/dist/docs/message/main.js +1 -1
- package/dist/docs/origin/main.js +1 -1
- package/dist/docs/person-picker/main.js +1 -1
- package/dist/docs/radio/main.js +1 -1
- package/dist/docs/radio-group/main.js +1 -1
- package/dist/docs/recommend/main.js +1 -1
- package/dist/docs/reference/main.js +1 -1
- package/dist/docs/rich-text-input/main.js +1 -1
- package/dist/docs/select/main.js +1 -1
- package/dist/docs/step/main.js +1 -1
- package/dist/docs/stop-generate/main.js +1 -1
- package/dist/docs/table/main.js +1 -1
- package/dist/docs/tag/main.js +1 -1
- package/dist/docs/text/main.js +1 -1
- package/dist/docs/time-picker/main.js +1 -1
- package/dist/docs/tool-status/main.js +1 -1
- package/es/index.js +1 -1
- package/es/markdown/index.js +3 -2
- package/lib/index.js +1 -1
- package/lib/markdown/index.js +3 -2
- package/package.json +1 -1
package/dist/docs/card/main.js
CHANGED
|
@@ -133,4 +133,4 @@ ${t.map(e=>{let{variableName:t,uniqueLocalName:n}=e;return` reactHotLoader.regi
|
|
|
133
133
|
\`\`\`
|
|
134
134
|
${l}
|
|
135
135
|
\`\`\`
|
|
136
|
-
如何解决这个问题?如果你能提供修复方案,请保持简洁。`;i&&i(e)}},children:"使用对话修复"})})]})})}):(0,e3.jsx)("div",{className:"ct-mermaid-view-content",children:(0,e3.jsx)("div",{ref:a,className:"ct-mermaid-view-chart"})}),d&&(0,e3.jsx)("div",{className:"ct-mermaid-view-loading",children:(0,e3.jsx)(E4,{size:"medium"})})]})});jc.displayName="MermaidView";let ju=p8.config(jc),jd=[{emotionVersion:"75",emotionId:"emotion_180001",dynamicEmotionId:"",showType:1,skinList:[],name:"[魔法棒]",names:{en_US:"[Magic Wand]",ja_JP:"[魔棒]",vi_VN:"[đũa ph\xe9p]",zh_CN:"[魔法棒]",zh_HK:"[魔法棒]",zh_TW:"[魔法棒]"},url:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",staticURL:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",fallbacks:[]}],jp="",jm=["img","code","pre","link-reference","link-reference-group"],jh=["link-reference-group"],jf=AG((0,e5.forwardRef)(e=>{let{className:t,onReady:n,content:o,needCodeHeader:i=!0,theme:a="light",enableSourcePos:s=!1,sendTextMessage:l,...u}=e,[d,p]=(0,e5.useState)([]);function m(e,t){let n;if(!e)return[];let o=[...jm,...t||[]],i=/\[[^\]]*\]\([^)]*\)/g,a=o.length>0?RegExp(`<(${o.join("|")}).*?>.*?<\\/\\1>`,"gs"):null,s=[],l=0,u=[];for(;null!==(n=i.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});if(a)for(a.lastIndex=0;null!==(n=a.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});for(let t of(u.sort((e,t)=>e.start-t.start),u))t.start>l&&s.push(...e.substring(l,t.start).split("")),s.push(t.content),l=t.end;return l<e.length&&s.push(...e.substring(l).split("")),s}(0,e5.useEffect)(()=>{Y7(),je().then(e=>{p(()=>[...jd,...e])}),null==n||n()},[n]);let h=(0,e5.useRef)(null),[f,_]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?jp:o),[g,y]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?m(o,u.whitelistTags):[]),[b,E]=(0,e5.useState)(0),S=(0,e5.useRef)(null),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)};(0,e5.useEffect)(()=>{if(T(),!(null==u?void 0:u.typewriterEffect)){_(o),y([]);return}let e=m(o,u.whitelistTags);if(b>=e.length)_(o),E(e.length),y([]);else{let t=e.slice(0,b),n=e.slice(b);_(t.join("")),y(n)}},[o,null==u?void 0:u.typewriterEffect,null==u?void 0:u.whitelistTags]),(0,e5.useEffect)(()=>{if(!(null==u?void 0:u.typewriterEffect)||0===g.length)return void T();let e=Math.max(Math.floor(g.length/10),2),t=()=>{y(t=>{if(0===t.length)return t;let n=t.slice(0,e),o=t.slice(e);return _(e=>e+n.join("")),E(t=>t+e),o})};return T(),t(),S.current=setTimeout(()=>{let e=()=>{t(),S.current=setTimeout(e,50)};e()},50),T},[g.length,null==u?void 0:u.typewriterEffect]);let C=(0,e5.useMemo)(()=>{jp=f;let e={common_hypertitle_text_style__font_size:"h1",common_largetitle_text_style__font_size:"h1",common_h1_text_style__font_size:"h1",common_h2_text_style__font_size:"h2",common_h3_text_style__font_size:"h3",common_h4_text_style__font_size:"h4",common_h5_text_style__font_size:"h5",common_body_text_style__font_size:"span",common_footnote_text_style__font_size:"span"};return f.replace(/<font\s+([^>]+)>([^<]+)<\/font>/g,(t,n,o)=>{let i="",a="",s="",l=n.match(/sizeToken=([\w_]+)/),u=n.match(/colorTokenV2=([\w_]+)/),d=n.match(/color=([\w_]+)/),p=n.match(/color=(?:"|')?(#[0-9a-fA-F]{3,8})(?:"|')?/);l&&(i=l[1].replace(/-/g,"_")),u&&(a=u[1].replace(/-/g,"_")),!a&&d&&(a=d[1].replace(/-/g,"_")),!a&&p&&(s=p[1]);let m=[];i&&m.push(`font-size: var(--${i})`),a?m.push(`color: var(--${a})`):s&&m.push(`color: ${s}`);let h=m.join("; "),f=e[i]||"span";return`<${f} style="${h}" class="markdownFont">${o}</${f}>`})},[f]),k=(0,e5.useMemo)(()=>jt(C,{genFrame:(e,t)=>({htmlTag:"img",selfClose:!0,attr:{draggable:"false",style:"vertical-align: text-center; display: inline-block; pointer-events: none;",class:"emoji",title:`[${e}]`,src:t.url||t.staticURL||"",alt:e}}),emotionList:d}),[C,d]),x=(0,e5.useMemo)(()=>{let e=new Fp({html:!0,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&(null==jr?void 0:jr.getLanguage(t)))try{return null==jr?void 0:jr.highlight(t,e,!0).value}catch(e){}return""}});if(s&&e.use(e=>{e.core.ruler.push("add_source_pos",e=>{e.tokens.forEach(e=>{if(e.map){let[t,n]=e.map;e.attrSet("data-source-start-line",String(t)),e.attrSet("data-source-end-line",String(n))}})})}),e.linkify.add("dingtalk:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),e.linkify.add("dtmd:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),k=(k=(k=k.replace(///g,"/")).replace(/'/g,"'")).replace(/(!\[[^\]]*\]\((\/\/[^\s)]+)\))/g,(e,t,n)=>e.replace(n,`https:${n}`)),!i)return{html:e.render(k),codeBlocks:[]};let t=[],n=0;return e.renderer.rules.fence=(e,o)=>{let i=e[o],a=i.info.trim()||"plaintext",s=i.content,l=`code-block-${n++}`,u=!0,d=i.map;d&&(k.split("\n")[d[1]-1].trim().endsWith("```")||(u=!1));let p="mermaid"===a?"mermaid":"code";return t.push({language:a,code:s,id:l,isComplete:u}),`<div data-code-block-id="${l}" data-block-type="${p}"></div>`},{html:(e=>{let t=e;try{jh.forEach(e=>{t=t.replace(RegExp(`<${e}[^>]*\\/>`,"g"),`<${e} ...></${e}>`)})}catch(e){}return t})(e.render(k)),codeBlocks:t}},[k,i,s]),w=(null==u?void 0:u.generating)?"ct-markdown generating":"ct-markdown";return(0,e3.jsxs)("div",{ref:h,className:uj()(w,`ct-hljs-${a}`,t),children:[(()=>{if(!i||0===x.codeBlocks.length)return(0,e3.jsx)(Lr,{...u,children:x.html});let e=x.html.split(/(<div[^>]*data-code-block-id="[^"]*"[^>]*><\/div>)/),t=[],n=0;for(let o of e)if(o.includes("data-code-block-id")){let e=x.codeBlocks[n];e&&("mermaid"===e.language?t.push((0,e3.jsxs)("div",{children:[e.isComplete&&(0,e3.jsx)(ju,{code:e.code,showCopyButton:!1,theme:a,sendTextMessage:l}),(0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)]},e.id)):t.push((0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)),n++)}else o.trim()&&t.push((0,e3.jsx)(Lr,{...u,children:o},`html-${t.length}`));return(0,e3.jsx)(e3.Fragment,{children:t})})(),(()=>{let{generating:e}=u||{};return!e||x.html?null:(0,e3.jsx)("img",{width:20,height:10,src:"https://img.alicdn.com/imgextra/i1/O1CN01wdlADU1WCvOLNSB3w_!!6000000002753-1-tps-530-255.gif",alt:""})})()]})}),{displayName:"Markdown"}),j_=p8.config(jf),jg=AG((0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()("ct-card-loading",n),children:"卡片加载中"})}),{displayName:"CardLoading"}),jy=p8.config(jg),jb=AG((0,e5.forwardRef)((e,t)=>{let{className:n,text:o}=e;return(0,e3.jsx)("div",{className:uj()("ct-origin",n),children:(0,e3.jsx)("div",{className:"origin-tip-inner",children:o})})}),{displayName:"Origin"}),jv=p8.config(jb),jE=AG((0,e5.forwardRef)((e,t)=>{let{className:n,indicator:o,shape:i="default",size:a="large",...s}=e,l={...s,size:a};if(!o&&i&&"default"!==i){let e=`load-container ${i}`;l.indicator=(0,e3.jsx)("div",{className:e,children:(0,e3.jsx)("div",{className:"loader"})})}return(0,e3.jsx)(E4,{...l,ref:t,className:uj()(`ct-loading ${a} ${i}`,n)})}),{displayName:"Loading"}),jS=p8.config(jE),jT=AG((0,e5.forwardRef)((e,t)=>{let{className:n,headerStyle:o,children:i,footer:a,footerClassName:s,placement:l,...u}=e;return(0,e3.jsxs)(vB,{...u,v2:!0,ref:t,placement:l,headerStyle:{"border-bottom:":"1px solid var(--40gmM)",...o},className:uj()(`ct-drawer ${l}`,n),children:[i,a&&a.length&&(0,e3.jsx)("div",{className:uj()("draw-footer",s),children:a})]})}),{displayName:"Drawer"}),jC=p8.config(jT),jk=AG((0,e5.forwardRef)((e,t)=>{let{className:n,shape:o="dot",showStatus:i=!0,current:a=0,stepsList:s=[],defaultCollapsed:l=!1,collapsedSteps:u=1,collapsedMore:d=(0,e3.jsxs)("div",{children:["查看更多",(0,e3.jsx)(h2,{type:"arrow-down",size:"xxs",style:{marginLeft:2}})]}),size:p="large",...m}=e,[h,f]=(0,e5.useState)([]),[_,g]=(0,e5.useState)(l);return((0,e5.useEffect)(()=>{f(s.map((e,t)=>_&&u<t+1?null:(0,e3.jsx)(TK.Item,{title:e.title,content:e.content,status:i?void 0:"wait"},t)))},[_,u,s]),0===s.length)?null:(0,e3.jsx)("div",{className:uj()("ct-step",`ct-step-${p}`,n,_&&"ct-step-collapsed"),...m,ref:t,children:(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(TK,{current:a,shape:o,labelPlacement:"hoz",direction:"ver",readOnly:!0,children:h}),_&&s.length>u&&(0,e3.jsx)("div",{className:"ct-step-collapsed-more",onClick:()=>g(!_),children:(0,e3.jsx)("div",{className:"ct-step-collapsed-more-content",children:d})})]})})}),{displayName:"Step"}),jx=p8.config(jk);var jw=((eC={}).Generating="generating",eC.Stopped="stopped",eC);let jN="停止生成",jD=AG((0,e5.forwardRef)((e,t)=>{let{className:n,show:o=!0,status:i=jw.Generating,stopText:a=jN,stopIcon:s,stoppedText:l,onStop:u}=e;return o?(0,e3.jsxs)("div",{className:uj()("ct-stop-generate",n),children:[i===jw.Generating&&(0,e3.jsxs)("div",{className:"stop-generate-area",onClick:()=>{u&&u()},children:[(0,e3.jsx)("img",{src:s||"https://img.alicdn.com/imgextra/i2/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg"}),a||jN]}),i===jw.Stopped&&(0,e3.jsx)("div",{className:"stopped-generate-text",children:l||"已停止生成"})]}):null}),{displayName:"StopGenerate"}),jO=p8.config(jD),jM=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i,listItems:a=[],onExpandedClick:s,onItemClick:l,mode:u="simple",onHeaderClose:d,onHeaderClick:p,onContentClick:m,expanded:h}=e,[f,_]=(0,e5.useState)(h||o);(0,e5.useEffect)(()=>{void 0!==h&&h!==f&&_(h)},[h]);let g=(e,t,n)=>{if(n.stopPropagation(),l){null==l||l(e,t);return}(null==e?void 0:e.url)&&window.open(null==e?void 0:e.url,"_blank")},y=f?"expand":"";return(0,e3.jsxs)("div",{className:uj()(`ct-reference ${u} ${y}`,n),ref:t,children:[(()=>{if(!1===i)return null;if("detail"===u){if(!1===i)return null;let e=(null==i?void 0:i.icon)||"close",t=(null==i?void 0:i.title)||"引用信息";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,children:[(0,e3.jsx)("div",{className:"reference-text",children:t}),(0,e3.jsx)("div",{className:"reference-close",onClick:()=>{null==d||d()},children:AX(e,"xs")})]})}let e=(null==i?void 0:i.icon)||"https://img.alicdn.com/imgextra/i3/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,onClick:e=>{(e.stopPropagation(),p)?p(!f):_(!f)},children:[(0,e3.jsxs)("div",{className:"reference-name",children:[AX(e),(0,e3.jsx)("div",{className:"reference-title",children:null==i?void 0:i.title})]}),(0,e3.jsx)("div",{className:"reference-operate",onClick:e=>{(e.stopPropagation(),s)?s(!f):_(!f)},children:(0,e3.jsx)(AJ,{type:f?"arrow-up":"arrow-down",size:"xs"})})]})})(),a&&0!==a.length&&(f||"simple"!==u)?(0,e3.jsxs)("div",{className:`reference-list ${u}`,onClick:e=>{e.stopPropagation(),null==m||m(f)},children:[f&&"simple"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("div",{className:"reference-text",onClick:n=>g(e,t,n),children:null==e?void 0:e.name}),(null==e?void 0:e.modifyTime)&&!1]},t)),"detail"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",onClick:n=>g(e,t,n),children:[(0,e3.jsxs)("div",{className:"reference-title",children:[(0,e3.jsxs)("div",{className:"reference-name",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("span",{children:null==e?void 0:e.name})]}),(null==e?void 0:e.modifyTime)&&!1]}),(null==e?void 0:e.content)&&(0,e3.jsx)("div",{className:"reference-content",children:null==e?void 0:e.content})]},t))]}):null]})}),jA=p8.config(jM),jR=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsxs)("div",{children:["相关问题",(0,e3.jsx)(h2,{type:"arrow-right",size:"xxs",style:{marginLeft:2}})]}),expanded:a,recommendList:s=[],onToggle:l,onItemClick:u}=e,[d,p]=(0,e5.useState)(o),m=void 0!==a?a:d;return(0,e3.jsxs)("div",{className:uj()("ct-recommend",n),ref:t,children:[(0,e3.jsx)("div",{className:"recommend-header",onClick:()=>{void 0===a&&p(!m),null==l||l(!m)},children:i}),(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:0,exit:400},classNames:"recommend-list",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:"recommend-list",children:s.map((e,t)=>(0,e3.jsx)("div",{className:"recommend-container",children:(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:100*t,exit:0},classNames:"recommend-item",unmountOnExit:!0,appear:!0,children:(0,e3.jsx)("div",{className:"recommend-item",onClick:()=>{null==u||u(e,t)},children:e.title||e.name||e.text})},t)}))})})]})}),jI=p8.config(jR),jL=(0,e5.forwardRef)((e,t)=>{let{className:n,header:o,footer:i,position:a="bottom",value:s,onChange:l,onFocus:u,onBlur:d,onKeyDown:p,enableQuerySug:m,querySugList:h,onQuerySugClick:f}=e,[_,g]=(0,e5.useState)(!1),y=m&&_&&h&&h.length>0;return(0,e3.jsxs)("div",{ref:t,className:uj()("ct-rich-text-input",n),children:[(0,e3.jsx)("div",{className:"header",children:o}),(0,e3.jsxs)("div",{className:uj()("input-container",{focus:_}),children:[(0,e3.jsx)("div",{className:"rich-text-input",contentEditable:!0,onFocus:e=>{g(!0),null==u||u(e)},onBlur:e=>{g(!1),null==d||d(e)},onChange:e=>{null==l||l(e.target.innerText)}}),(0,e3.jsx)("div",{className:"input-footer",children:i}),(0,e3.jsx)(hk.CSSTransition,{in:y,timeout:300,classNames:"query-sug",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:uj()("query-sug",a),children:(0,e3.jsx)("div",{className:"query-sug-list",children:null==h?void 0:h.map((e,t)=>(0,e3.jsx)("div",{className:"query-sug-item",onClick:()=>{null==f||f(e,t)},children:e.label},e.value))})})})]})]})}),jP=(0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()(n,"ct-ai-loading"),ref:t,children:(0,e3.jsxs)("div",{className:uj()("loading-container","short-container"),children:[(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"0s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"1s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"2s"}})]})})}),jF=p8.config(jP),jY=()=>(0,e3.jsx)("div",{className:"radio-item-icon",children:(0,e3.jsx)("div",{className:"radio-item-circle"})}),jj=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-radio",{"ct-radio-disabled":o},a),style:s,...l,children:t.map(e=>(0,e3.jsx)("div",{className:uj()("radio-item",{active:e.value===n,disabled:o||e.disabled}),onClick:()=>{var t;return t=e.value,void(!o&&!e.disabled&&i&&i(t))},onKeyDown:t=>{var n;return n=e.value,void(!o&&!e.disabled&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),i&&i(n)))},role:"radio",tabIndex:o||e.disabled?-1:0,"aria-checked":e.value===n,"aria-disabled":o||e.disabled,children:(0,e3.jsxs)("div",{className:"radio-item-content",children:[(0,e3.jsx)("div",{className:"radio-item-icon-column",children:(0,e3.jsx)(jY,{})}),(0,e3.jsx)("div",{className:"radio-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"radio-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"radio-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"radio-item-text-column",children:[(0,e3.jsx)("div",{className:"radio-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"radio-item-desc",children:e.description})]})]})},e.value))}):null}),{displayName:"Radio"}),jB=p8.config(jj),jU=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||"");e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=!!t,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-radio-group ct-radio-group-list ${i?"ct-radio-group-disabled":""}`,children:[(0,e3.jsx)(jB,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"RadioGroup"}),jz=p8.config(jU),jV=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-checkbox",{"ct-checkbox-disabled":o},a),style:s,...l,children:t.map(e=>{let t=(n||[]).indexOf(e.value)>-1;return(0,e3.jsx)("div",{className:uj()("checkbox-item",{active:t,disabled:o||e.disabled}),onClick:()=>((e,t)=>{if(o||t.disabled)return;let a=n||[],s=a.indexOf(e)>-1?a.filter(t=>t!==e):[...a,e];i&&i(s)})(e.value,e),children:(0,e3.jsxs)("div",{className:"checkbox-item-content",children:[(0,e3.jsx)("div",{className:"checkbox-item-checkbox-column",children:(0,e3.jsx)(f7,{className:"checkbox-item-checkbox",checked:t,disabled:o||e.disabled})}),(0,e3.jsx)("div",{className:"checkbox-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"checkbox-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"checkbox-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"checkbox-item-text-column",children:[(0,e3.jsx)("div",{className:"checkbox-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"checkbox-item-desc",children:e.description})]})]})},e.value)})}):null}),{displayName:"Checkbox"}),jH=p8.config(jV),jG=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||[]);e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=t.length>0,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-checkbox-group ct-checkbox-group-list ${i?"ct-checkbox-group-disabled":""}`,children:[(0,e3.jsx)(jH,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t.length>0&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"CheckboxGroup"}),jW=p8.config(jG),jK=RF(e=>{let{className:t,dataSource:n,mode:o="single",buttonCols:i=2,value:a,size:s="medium",onChange:l}=e,[u,d]=(0,e5.useState)(a),p=Array.from({length:Math.ceil(((null==n?void 0:n.length)||0)/i)},(e,t)=>{let a=t*i,p=Math.min(a+i,(null==n?void 0:n.length)||0),m=null==n?void 0:n.slice(a,p);return(null==m?void 0:m.length)?(0,e3.jsx)("div",{className:"select-row-container",children:m&&m.length?m.map((e,t)=>{if(!e)return null;let{value:n,label:a,disabled:p}=e,m="normal";"string"==typeof u&&u===n||Array.isArray(u)&&u.includes(n)?m="selected":"object"==typeof u&&"value"in u&&u.value===n&&(m="selected");let h=p;return u&&"single"===o&&"normal"===m&&(h=!0),(0,e3.jsx)(_A,{onClick:()=>((e,t)=>{if("multiple"===o)if(Array.isArray(u)){let n="normal"===t?[...u,null==e?void 0:e.value]:u.filter(t=>t!==(null==e?void 0:e.value));d(n),null==l||l(n,"itemClick")}else{let t=[null==e?void 0:e.value];d(t),null==l||l(t,"itemClick")}if("single"===o){let n="normal"===t?e:void 0;d(n),null==l||l(n,"itemClick")}})(e,m),type:"normal",disabled:h,className:`select-item ${m} row${i}`,size:s,children:a},`select_${t}`)}):null},`row_${t}`):null});return(0,e3.jsx)("div",{className:uj()("ct-select",t),children:p})},{coverStyle:!1,labelLayout:"vertical",enableHoverState:!1}),jq=RF((0,e5.forwardRef)((e,t)=>{let{className:n,size:o="medium",mode:i="single",onChange:a,...s}=e;return(0,e3.jsx)(gU,{...s,className:uj()("ct-select",n),size:o,ref:t,mode:i,onChange:a})})),j$=AG((0,e5.forwardRef)((e,t)=>{let{className:n,display:o="select",buttonCols:i=2,dataSource:a,mode:s="single",onChange:l,...u}=e;return"button"===((null==a?void 0:a.length)&&(null==a?void 0:a.length)>6?"select":o)?(0,e3.jsx)(jK,{className:n,dataSource:a,mode:s,buttonCols:i,value:u.value,onChange:l,label:u.label,required:u.required,size:"medium"}):(0,e3.jsx)(jq,{...u,className:uj()("ct-select",n),dataSource:a,ref:t,mode:s,onChange:l,label:u.label,required:u.required,size:"medium",popupClassName:uj()("ct-select-popup",u.popupClassName)})}),{displayName:"Select"}),jQ=p8.config(j$),jJ=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsx)("div",{children:"折叠面板头部"}),customHeader:a,expanded:s,onToggle:l,animated:u=!0,children:d=(0,e3.jsxs)("div",{children:[(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"})]})}=e,p=(0,e5.useRef)(null),m=(0,e5.useRef)(null),[h,f]=(0,e5.useState)(o),[_,g]=(0,e5.useState)(o),y=void 0!==s?s:h,b=(e,t)=>{var n;if(!u)return void(t?(e.style.height="auto",e.style.width="auto",g(!0)):(e.style.height="0",g(!1)));let o=e.getBoundingClientRect().height,i=e.getBoundingClientRect().width,a=(null==(n=m.current)?void 0:n.getBoundingClientRect().width)||i;if(t){e.style.height="0",e.style.width=`${a}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),e.style.height="auto";let t=e.getBoundingClientRect().height,n=e.getBoundingClientRect().width;e.style.height="0",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height=`${t}px`,e.style.width=`${n}px`});let o=()=>{e.style.height="auto",e.style.width="auto",g(!0),e.removeEventListener("transitionend",o)};e.addEventListener("transitionend",o)}else{e.style.height=`${o}px`,e.style.width=`${i}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height="0",e.style.width=`${a}px`});let t=()=>{g(!1),e.removeEventListener("transitionend",t)};e.addEventListener("transitionend",t)}};return(0,e5.useEffect)(()=>{let e=p.current;e&&(y?(g(!0),u?Promise.resolve().then(()=>{b(e,!0)}):(e.style.height="auto",e.style.width="auto")):u?b(e,!1):(e.style.height="0",g(!1)))},[y,u]),(0,e3.jsxs)("div",{className:uj()("ct-flip",n),ref:t,children:[(0,e3.jsx)("div",{className:"flip-header-container",ref:m,children:a||(0,e3.jsxs)("div",{className:"flip-header",onClick:()=>{let e=!y;null==l||l(e),void 0===s&&f(e)},children:[i,(0,e3.jsx)("span",{className:"flip-header-icon",children:(0,e3.jsx)(AJ,{type:y?"arrow-up":"arrow-down",size:"xs"})})]})}),(0,e3.jsx)("div",{className:"flip-content",ref:p,style:{height:o?"auto":0,width:o?"auto":"100%",overflow:"hidden",transition:u?void 0:"none"},children:_&&d})]})}),jX=p8.config(jJ),jZ=(0,e5.forwardRef)((e,t)=>{let{useText:n="使用",name:o,className:i,selected:a=!1,status:s,onToolClick:l,authInfo:u,fullWidth:d,param:p,groupName:m,disabled:h=!1}=e,f=a?"selected":"";return f=d?`${f} full-width`:`${f}`,f=l?`${f} enable-click`:`${f}`,(0,e3.jsxs)("div",{className:uj()(`ct-tool-status ${f} ${s} ${h?"disabled":""}`,i),ref:t,onClick:t=>{h||(t.stopPropagation(),null==l||l(e))},children:[(0,e3.jsx)(AJ,{size:"xs",type:"failed"===s?"icon-cross1":"completed"===s?"icon-check":"loading"}),u&&"auth"===s&&(0,e3.jsx)("div",{className:"next-btn-text next-btn-primary",onClick:t=>{var n;t.stopPropagation(),null==u||null==(n=u.onAuthClick)||n.call(u,e)},children:null==u?void 0:u.content}),(0,e3.jsxs)("div",{className:"content-container",children:[(0,e3.jsx)("div",{className:"content-use-tips",children:n}),m&&(0,e3.jsx)("div",{className:"content-group",children:m}),o&&(0,e3.jsx)("div",{className:"content-name",children:o}),p&&(0,e3.jsx)("div",{className:"content-detail",children:p})]})]})}),j1=p8.config(jZ),j0=AG((0,e5.forwardRef)(e=>{let{className:t,children:n,...o}=e;return(0,e3.jsx)(yJ,{...o,className:uj()("ct-collapse",t),children:n})}),{displayName:"Collapse",Panel:yJ.Panel}),j2=p8.config(j0),j3=(0,e5.forwardRef)((e,t)=>{let{className:n,size:o="small",hasBorder:i=!0,title:a,showCopyButton:s,...l}=e,[u,d]=(0,e5.useState)(!1);return(0,e3.jsxs)("div",{className:"ct-table-container",children:[a?(0,e3.jsxs)("div",{className:"ct-table-header",children:[a&&(0,e3.jsx)("div",{className:"ct-table-title",children:a}),s?(0,e3.jsx)("div",{className:"ct-table-copy-button",onClick:()=>{d(!0),setTimeout(()=>{d(!1)},3e3)},children:(0,e3.jsx)(AJ,{size:16,type:u?"icon-check":"fuzhi3"})}):null]}):null,(0,e3.jsx)(ko,{...l,ref:t,className:uj()("ct-table",{[`ct-table-${o}`]:o,"ct-table-no-border":!i},n),size:o})]})});j3.displayName="Table";let j5=p8.config(j3),j4=(0,e5.forwardRef)((e,t)=>{let{className:n,text:o,...i}=e;return(0,e3.jsxs)("div",{...i,className:uj()("ct-error-notice",n),ref:t,children:[(0,e3.jsx)("div",{className:"ct-error-notice-icon",children:(0,e3.jsx)(h2,{size:16,type:"prompt"})}),(0,e3.jsx)("span",{className:"ct-error-notice-text",children:o})]})});j4.displayName="ErrorNotice";let j6=p8.config(j4),j9=(0,e5.forwardRef)((e,t)=>{let{className:n,...o}=e;return(0,e3.jsx)("div",{...o,className:uj()("ct-document-empty",n),ref:t,children:Array.from({length:4},(e,t)=>(0,e3.jsx)("div",{className:"ct-empty-line"},t))})});j9.displayName="Empty";let j8=p8.config(j9),j7=(0,e5.forwardRef)((e,t)=>{let{className:n,title:o="",content:i,generating:a=!0,onPreview:s,onCopy:l,onDownload:u,renderDownloadAction:d,showPreviewButton:p=!0,showCopyButton:m=!0,showDownloadButton:h=!0,contentHeight:f=128,..._}=e,g=f-25,y=(0,e5.useRef)(null),[b,E]=(0,e5.useState)(0),[S,T]=(0,e5.useState)(!1),[C,k]=(0,e5.useState)(()=>f>128?128:f),x=e=>{let t=Array.from(e.children);return 0===t.length?e:x(t[t.length-1])},w=(0,e5.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),n=x(e);if(!n)return;let o=n.getBoundingClientRect(),i=o.top-t.top,s=a?i+o.height:i+o.height+20;if(f>128&&C<f){let e=C-25;if(s>e)return void k(Math.min(f,C+(s-e)))}if(!(s+b<g&&i+b>0))return void E(-i)},[b,f,C,a]),N=Rv(w,200);(0,e5.useEffect)(()=>{w()},[a]),(0,e5.useEffect)(()=>{if("string"==typeof i)return void N();if(!y.current)return;let e=new MutationObserver(()=>{N()});return e.observe(y.current,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[i,N]);let D=e=>{o&&p&&s&&(e.stopPropagation(),null==s||s())},O=e=>{e.stopPropagation()};return(0,e3.jsxs)("div",{..._,className:uj()("ct-document",{"ct-document-generating":a},n),ref:t,onClick:D,children:[o?(0,e3.jsxs)("div",{className:"ct-document-header",children:[(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)(AJ,{type:"document",className:"ct-document-header-icon"}),(0,e3.jsx)("span",{className:uj()("ct-document-header-title"),children:o})]}),(0,e3.jsxs)("div",{className:uj()("ct-document-header-actions"),children:[(0,e3.jsxs)("div",{className:uj()("ct-document-header-preview",{"ct-document-header-preview-display-none":!p||!s,"ct-document-header-preview-generating":a}),onClick:D,children:[(0,e3.jsx)(AJ,{type:"preview",className:"ct-document-header-preview-icon"}),(0,e3.jsx)("span",{className:"ct-document-header-preview-text",children:"预览"})]}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-copy",{"ct-document-header-action-copy-generating":a,"ct-document-header-action-copy-display-none":!m||!l}),onClick:e=>{e.stopPropagation(),null==l||l(),T(!0),setTimeout(()=>{T(!1)},3e3)},title:"复制",children:(0,e3.jsx)(AJ,{type:S?"icon-check":"fuzhi3",className:"ct-document-header-action-icon"})}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-download",{"ct-document-header-action-download-generating":a,"ct-document-header-action-download-display-none":!h||!d&&!u}),onClick:d?O:e=>{e.stopPropagation(),null==u||u()},title:d?void 0:"下载",children:d?d():(0,e3.jsx)(AJ,{type:"download",className:"ct-document-header-action-icon"})})]})]}):(0,e3.jsx)("div",{className:"ct-document-header",children:(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)("div",{className:"ct-document-header-left-icon-empty"}),(0,e3.jsx)("div",{className:"ct-document-header-left-title-empty"})]})}),i?(0,e3.jsxs)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),style:{height:C},children:[(0,e3.jsx)("div",{className:"ct-document-mask"}),(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)("div",{ref:y,className:"ct-document-content-text",style:{transform:`translateY(${a?b:0}px)`},onClick:O,children:i})})]}):(0,e3.jsx)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),children:(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)(j8,{})})})]})});j7.displayName="Document";let Be=p8.config(j7),Bt="0.3.61",Bn=e=>{let{globalExpandCode:t}=e,[n,o]=(0,e5.useState)(!1),[i,a]=(0,e5.useState)(t);(0,e5.useEffect)(()=>{o(!0)},[]),(0,e5.useEffect)(()=>{a(t)},[t]);let s=e.docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{}),l=(0,iZ.kebabCase)(e.demoKey),d=`${l}-container`;return(0,e3.jsxs)("div",{id:d,className:"next-demo-item scroll-count-item",children:[(0,e3.jsxs)("div",{id:`${l}-desc`,className:"demo-item-desc markdown",children:[(0,e3.jsx)(i1,{id:d,title:s["@demo"],component:"h3"}),(0,e3.jsx)("div",{className:"demo-item-desc-body markdown",children:(0,e3.jsx)(ob,{remarkPlugins:[iA],children:s["@remarks"]})})]}),(0,e3.jsxs)(uR,{disabled:e.disabled,code:e.sourceCode,scope:{mountNode:document.querySelector(`#${l}-mount`),require:e=>{let t={"@alifd/chat":e2,"@alifd/next":e$,"react-dom":e6,"styled-components":eQ,react:e4(),classnames:uj()},n=e.match(/^@alifd\/chat\/(es|lib)\/(.*)\/style$/);return n&&u(64615)(`./${n[2]}/style`),t[e]}},noInline:!0,children:[(0,e3.jsx)("div",{id:`${l}-mount`,className:"next-demo-mount",children:n?(0,e3.jsx)(uL,{}):null}),n?(0,e3.jsx)(uF,{}):null,(0,e3.jsx)("div",{id:`${l}-operations`,className:"demo-item-operations",style:{borderBottom:"1px dashed rgb(238, 238, 238)"},children:(0,e3.jsx)("div",{id:`${l}-fold-code`,className:"code-box-code-action code-expand-icon-hide",children:(0,e3.jsxs)(fl.Tooltip,{align:"b",style:{maxWidth:400},trigger:(0,e3.jsx)("span",{id:`${l}-icon-hide`,onClick:()=>{a(!i)},children:(0,e3.jsx)("svg",{width:20,height:20,viewBox:"0 0 20 20",style:{fill:"#3B9AFF"},children:(0,e3.jsx)("path",{transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961)",d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z"})})}),children:["收起代码",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),"小提示:",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"1. 点击一下代码,试一试在线编辑预览吧!"}),(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"2. 页面右上方 有 全局代码展开 及 开启在线编辑 模式哟~"})]})})}),(0,e3.jsx)("div",{id:`${l}-body`,className:"next-demo-body",style:{display:i?"block":"none"},children:(0,e3.jsx)("div",{id:`${l}-live-editor`,children:(0,e3.jsx)("div",{id:`${l}-live-body`,className:"react-live-body",children:(0,e3.jsx)(uI,{theme:{plain:{},styles:[{types:[],style:{}}]}})})})})]})]})},Br=e=>{let{defaultLiveDemo:t=!0,defaultExpandCode:n=!0,onToggleExpandCode:o,onToggleLiveDemo:i,data:a=[]}=e,[s,l]=(0,e5.useState)(n),[u,d]=(0,e5.useState)(t),p={viewBox:"0 0 16 16",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","aria-haspopup":"true","aria-expanded":"false",style:{width:20,height:20,padding:2}};return(0,e3.jsxs)("div",{className:"demo-index",children:[(0,e3.jsxs)("span",{id:"global-control",className:"all-demo-box-controls",children:[(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"live-demo",role:"img","aria-label":"edit",className:"code-box-expand-trigger",onClick:()=>{d(!u),"function"==typeof i&&i(!u)},children:[(0,e3.jsx)("svg",{...p,"data-icon":"edit",id:"live-on",style:{...p.style,display:u?"none":"block"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})}),(0,e3.jsx)("svg",{...p,id:"live-off","data-icon":"edit",style:{...p.style,display:u?"block":"none"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})})]}),children:"使用预览模式"}),(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"expand-all",role:"img","aria-label":"code",className:"code-box-expand-trigger","aria-haspopup":"true","aria-expanded":"false",onClick:()=>{l(!s),"function"==typeof o&&o(!s)},children:[(0,e3.jsx)("svg",{...p,id:"all-not-expand","data-icon":"code",style:{...p.style,display:s?"none":"block"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})}),(0,e3.jsx)("svg",{...p,id:"all-expanded","data-icon":"code",style:{...p.style,display:s?"block":"none"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})})]}),children:"展开所有代码"})]}),(0,e3.jsx)("ul",{className:"demo-index-list",children:a.map(e=>(0,e3.jsx)("li",{className:"demo-index-item","data-id":e.id,children:(0,e3.jsx)("a",{href:`#${e.id}`,children:e.title})},e.id))})]})};e6.render((0,e3.jsx)(()=>{var e;let[t,n]=(0,e5.useState)(!0),[o,i]=(0,e5.useState)(!1),a={basic:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Feedback } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nimport "@alifd/chat/es/feedback/style";\nReactDOM.render(\n <div>\n <h3>普通</h3>\n <Card style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带 Title</h3>\n <Card title="提案概览" style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带 Footer</h3>\n <Card title="提案概览" footer={<Feedback />} style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带分隔线</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n titleLine\n footerLine\n >\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"最简单的用法。\n-\nA simple card with title and sub-title."},{tag:"@demo",content:"基本使用"},{tag:"@en",content:"Basic"},{tag:"@order",content:"1"}]}},collapsable:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Button } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nconst { Collapsable } = Card;\nconst DemoGroup = ({ triggerType }) => (\n <div style={{ marginBottom: 24 }}>\n <h5 style={{ marginBottom: 16 }}>\n {triggerType === "hover" ? "鼠标悬浮触发" : "点击触发"}\n </h5>\n <Collapsable\n title="产品信息"\n triggerType={triggerType}\n renderContent={({ visible, onVisibleChange, children }) => (\n <div>\n <div style={{ padding: "12px 16px" }}>\n {visible ? "完整的产品描述信息" : "简短的产品描述..."}\n </div>\n {!visible && (\n <div\n style={{\n borderTop: "1px solid #eee",\n padding: "8px 16px",\n textAlign: "center",\n }}\n >\n <Button text onClick={() => onVisibleChange(true)}>\n 查看更多\n </Button>\n </div>\n )}\n </div>\n )}\n />\n </div>\n);\nReactDOM.render(\n <div>\n <DemoGroup triggerType="hover" />\n <DemoGroup triggerType="click" />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"展示卡片的展开收起功能,支持悬浮和点击两种触发方式。"},{tag:"@demo",content:"基础展开收起"},{tag:"@en",content:"Basic Collapsable Card"},{tag:"@order",content:"1"}]}},"collapsable-advanced":{sourceCode:'import React, { useState } from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Button } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nconst { Collapsable } = Card;\nconst content = {\n title: "智能助手使用指南",\n brief: "智能助手可以帮助您快速完成各种任务...",\n detail: `智能助手是一个功能强大的AI工具,可以:\n\n1. 自动回答问题\n2. 协助编写代码\n3. 提供建议和解决方案\n4. 帮助整理文档\n\n您可以通过简单的对话来使用这些功能。`,\n};\nconst Demo = () => {\n const [visible, setVisible] = useState(false);\n return (\n <Collapsable\n title={content.title}\n triggerType="click"\n visible={visible}\n onVisibleChange={setVisible}\n renderContent={({ visible, onVisibleChange }) => (\n <div style={{ padding: 16 }}>\n <div\n style={{\n fontSize: visible ? 14 : 12,\n lineHeight: "1.5",\n }}\n >\n {visible ? content.detail : content.brief}\n </div>\n <div\n style={{\n marginTop: 16,\n textAlign: "right",\n }}\n >\n <Button text onClick={() => onVisibleChange(!visible)}>\n {visible ? "收起" : "展开详情"}\n </Button>\n </div>\n </div>\n )}\n footer={\n <div\n style={{\n padding: "8px 16px",\n borderTop: "1px solid #eee",\n fontSize: 12,\n }}\n >\n 最后更新时间:2025-06-18\n </div>\n }\n />\n );\n};\nReactDOM.render(<Demo />, mountNode);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"展示卡片的复杂交互场景,包括自定义展开内容、状态控制等。"},{tag:"@demo",content:"复杂交互"},{tag:"@en",content:"Advanced Interaction"},{tag:"@order",content:"2"}]}},"demo-legal-affairs":{sourceCode:'import React, { useState } from "react";\nimport ReactDOM from "react-dom";\nimport cs from "classnames";\nimport {\n Card,\n Feedback,\n Text,\n Tag,\n Tab,\n FloatButton,\n Button,\n} from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nimport "@alifd/chat/es/feedback/style";\nimport "@alifd/chat/es/text/style";\nimport "@alifd/chat/es/tag/style";\nimport "@alifd/chat/es/tab/style";\nimport "@alifd/chat/es/float-button/style";\nimport "@alifd/chat/es/button/style";\nimport { createGlobalStyle } from "styled-components";\nconst GlobalStyle = createGlobalStyle`\n.card-legal-affairs {\n .ct-card-header-title {\n background-image: radial-gradient(\n ellipse 160px 90px at 20px -20px,\n rgb(from var(--color-brand1-6, #5584ff) r g b / 0.15) 0%,\n transparent 100%\n );\n color: var(--color-brand1-6, #5584ff);\n }\n}\n\n.my-trigger {\n width: 42px;\n height: 42px;\n border-radius: 50%;\n overflow: hidden;\n box-shadow: 0 2px 10px 0 rgba(31, 56, 88, 0.15);\n cursor: pointer;\n\n &--active {\n background: linear-gradient(0deg, #ff6f00 0%, #ff9616 100%);\n }\n\n &-img {\n width: 100%;\n height: 100%;\n background: url(\'https://img.alicdn.com/imgextra/i3/O1CN01HV78sy1Q8Rieq3nI2_!!6000000001931-0-tps-84-84.jpg\')\n center / contain no-repeat;\n }\n\n &-close {\n width: 100%;\n height: 100%;\n background: url(\'https://img.alicdn.com/tfs/TB1yEj_qhD1gK0jSZFsXXbldVXa-96-96.png\') center /\n contain no-repeat;\n }\n}\n\n.my-popup {\n width: 200px;\n height: 200px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n`;\nfunction FloatButtonDemo() {\n const [active, setActive] = useState(false);\n const [active2, setActive2] = useState(false);\n const [target, setTarget] = useState(".card-legal-affairs");\n const [show, setShow] = useState(true);\n return (\n <div>\n <button onClick={() => setShow(!show)}>toggle</button>\n <button\n onClick={() => {\n setTarget(\n target === ".card-legal-affairs"\n ? "#demo-legal-affairs-mount"\n : ".card-legal-affairs",\n );\n }}\n >\n change target\n </button>\n {show && (\n <FloatButton.InnerDrawer\n dragable\n target={target}\n align="tl"\n autoAlign\n title="Title"\n showClose\n autoHide\n defaultPosition={[0.8, 0.8]}\n onVisibleChange={(v) => setActive(v)}\n trigger={\n <div className={cs("my-trigger", { "my-trigger--active": active })}>\n {active ? (\n <div className="my-trigger-close" />\n ) : (\n <div className="my-trigger-img" />\n )}\n </div>\n }\n >\n <div className="my-popup">Content</div>\n </FloatButton.InnerDrawer>\n )}\n <FloatButton.Drawer\n dragable\n align="tl"\n autoAlign\n title="Title"\n showClose\n defaultPosition={[0.8, 0.6]}\n onVisibleChange={(v) => setActive2(v)}\n trigger={\n <div className={cs("my-trigger", { "my-trigger--active": active2 })}>\n {active2 ? (\n <div className="my-trigger-close" />\n ) : (\n <div className="my-trigger-img" />\n )}\n </div>\n }\n >\n <div className="my-popup">Content</div>\n </FloatButton.Drawer>\n </div>\n );\n}\nReactDOM.render(\n <div className="card-legal-affairs">\n <GlobalStyle />\n <h3>普通文本卡片</h3>\n <Card title="提案概览" style={{ width: 300 }}>\n <Text maxLine={4}>\n 关键词:xxx xxx xxx <br />\n <Tag color="green" type="normal">\n 123\n </Tag>\n <Tag color="green" type="primary">\n xxx\n </Tag>\n {new Array(101)\n .fill("")\n .map((_, i) => `${i}`)\n .join(",")}\n </Text>\n </Card>\n <h3>普通文本卡片带赞踩</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n >\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>hover 展示全貌</h3>\n <Card.Collapsable\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n renderContent={({ visible, onVisibleChange, children }) => {\n return (\n <Text\n maxLine={4}\n visible={visible}\n onVisibleChange={onVisibleChange}\n showTrigger={false}\n triggerType="hover"\n >\n {children}\n </Text>\n );\n }}\n >\n 关键词:xxx xxx xxx <br />\n {new Array(15).fill("这是一段创新提案摘要").join(",")}\n </Card.Collapsable>\n <h3>Tab card</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n >\n <Tab contentStyle={{ paddingTop: 8 }}>\n <Tab.Item title="Tab1">\n <div>\n <Button>按钮</Button>\n <Button type="primary">按钮</Button>\n 关键词:xxx xxx xxx1 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n <Tab.Item title="Tab2">\n <div>\n 关键词:xxx xxx xxx2 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n <Tab.Item title="Tab3">\n <div>\n 关键词:xxx xxx xxx3 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n </Tab>\n </Card>\n <h3>Inner drawer float button</h3>\n <FloatButtonDemo />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"法务机器人卡片组件"},{tag:"@demo",content:"法务交付样例"},{tag:"@order",content:"2"}]}}},s=[{tag:"@remarks",content:"一个通用的卡片组件。\n- A card is a piece of paper with unique related data taht servers as an entry point to more detailed information."},{tag:"@component",content:"卡片"},{tag:"@en",content:"Card"},{tag:"@type",content:"通用 - General"},{tag:"@when",content:"当一个模块的同类信息不能自然形成区块感,可借助 Card 组件将信息整合,帮助界面信息模块感更强。\n-\nA card could contain a photo, text, and a link about a single subject."}].reduce((e,t)=>(e[t.tag]=t.content,e),{}),l={id:"demo-list",title:"代码演示"},u=Object.keys(a).sort((e,t)=>{var n,o,i,s;return parseInt((null==(o=a[e].docInfo.tags)||null==(n=o.find(e=>"@order"===e.tag))?void 0:n.content)||"0")-parseInt((null==(s=a[t].docInfo.tags)||null==(i=s.find(e=>"@order"===e.tag))?void 0:i.content)||"0")}),d=[...s["@when"]?[{id:"何时使用",title:"何时使用"}]:[],l,...u.map(e=>{let t=(0,iZ.kebabCase)(e);return{id:`${t}-container`,title:a[e].docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{})["@demo"]}})];return(0,e3.jsxs)("div",{className:"demo-wrapper",children:[(0,e3.jsx)("div",{className:"demo-title markdown",children:(0,e3.jsx)("h1",{children:s["@en"]})}),(0,e3.jsx)(Br,{defaultExpandCode:o,defaultLiveDemo:t,onToggleLiveDemo:n,onToggleExpandCode:i,data:d}),(0,e3.jsx)("div",{className:"demo-head",children:(0,e3.jsxs)("div",{id:"demo-area",className:"next-demo-section",children:[(0,e3.jsxs)("div",{id:"md-area-former",className:"markdown-body markdown",children:[(0,e3.jsx)("div",{id:"demo-guide",className:"scroll-count-item active"}),(0,e3.jsx)("p",{children:i2(s["@remarks"])}),(e=s["@when"])?(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(i1,{id:"何时使用",title:"何时使用"}),(0,e3.jsx)("ul",{children:(0,e3.jsx)("li",{children:i2(e)})})]}):null,(0,e3.jsx)(i1,{...l})]}),u.map((e,n)=>(0,e5.createElement)(Bn,{disabled:!t,globalExpandCode:o,...a[e],demoKey:e,key:n})),(0,e3.jsx)("div",{id:"md-area-latter",className:"markdown-body markdown",children:(0,e3.jsxs)("div",{id:"demo-api","data-scroll-id":"demo-api",className:"scroll-count-item active",children:[(0,e3.jsx)(i1,{id:"API",title:"API"}),[].map(e=>(0,e5.createElement)(i0,{...e,key:e.title})),s["@others"]?(0,e3.jsx)(ob,{remarkPlugins:[iA],rehypePlugins:[iq,[ij,{behavior:"append",content:()=>[iX("span",{},["#"])],properties:{className:"header-anchor scroll-count-item"}}]],children:s["@others"]}):null]})})]})})]})},{}),document.getElementById("root"))})()})();
|
|
136
|
+
如何解决这个问题?如果你能提供修复方案,请保持简洁。`;i&&i(e)}},children:"使用对话修复"})})]})})}):(0,e3.jsx)("div",{className:"ct-mermaid-view-content",children:(0,e3.jsx)("div",{ref:a,className:"ct-mermaid-view-chart"})}),d&&(0,e3.jsx)("div",{className:"ct-mermaid-view-loading",children:(0,e3.jsx)(E4,{size:"medium"})})]})});jc.displayName="MermaidView";let ju=p8.config(jc),jd=[{emotionVersion:"75",emotionId:"emotion_180001",dynamicEmotionId:"",showType:1,skinList:[],name:"[魔法棒]",names:{en_US:"[Magic Wand]",ja_JP:"[魔棒]",vi_VN:"[đũa ph\xe9p]",zh_CN:"[魔法棒]",zh_HK:"[魔法棒]",zh_TW:"[魔法棒]"},url:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",staticURL:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",fallbacks:[]}],jp="",jm=["img","code","pre","link-reference","link-reference-group"],jh=["link-reference-group"],jf=AG((0,e5.forwardRef)(e=>{let{className:t,onReady:n,content:o,needCodeHeader:i=!0,theme:a="light",enableSourcePos:s=!1,sendTextMessage:l,...u}=e,[d,p]=(0,e5.useState)([]);function m(e,t){let n;if(!e)return[];let o=[...jm,...t||[]],i=/\[[^\]]*\]\([^)]*\)/g,a=o.length>0?RegExp(`<(${o.join("|")}).*?>.*?<\\/\\1>`,"gs"):null,s=[],l=0,u=[];for(;null!==(n=i.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});if(a)for(a.lastIndex=0;null!==(n=a.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});for(let t of(u.sort((e,t)=>e.start-t.start),u))t.start>l&&s.push(...e.substring(l,t.start).split("")),s.push(t.content),l=t.end;return l<e.length&&s.push(...e.substring(l).split("")),s}(0,e5.useEffect)(()=>{Y7(),je().then(e=>{p(()=>[...jd,...e])}),null==n||n()},[n]);let h=(0,e5.useRef)(null),[f,_]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?jp:o),[g,y]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?m(o,u.whitelistTags):[]),[b,E]=(0,e5.useState)(0),S=(0,e5.useRef)(null),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)};(0,e5.useEffect)(()=>{if(T(),!(null==u?void 0:u.typewriterEffect)){_(o),y([]);return}let e=m(o,u.whitelistTags);if(b>=e.length)_(o),E(e.length),y([]);else{let t=e.slice(0,b),n=e.slice(b);_(t.join("")),y(n)}},[o,null==u?void 0:u.typewriterEffect,null==u?void 0:u.whitelistTags]),(0,e5.useEffect)(()=>{if(!(null==u?void 0:u.typewriterEffect)||0===g.length)return void T();let e=Math.max(Math.floor(g.length/10),2),t=()=>{y(t=>{if(0===t.length)return t;let n=t.slice(0,e),o=t.slice(e);return _(e=>e+n.join("")),E(t=>t+e),o})};return T(),t(),S.current=setTimeout(()=>{let e=()=>{t(),S.current=setTimeout(e,50)};e()},50),T},[g.length,null==u?void 0:u.typewriterEffect]);let C=(0,e5.useMemo)(()=>{jp=f;let e={common_hypertitle_text_style__font_size:"h1",common_largetitle_text_style__font_size:"h1",common_h1_text_style__font_size:"h1",common_h2_text_style__font_size:"h2",common_h3_text_style__font_size:"h3",common_h4_text_style__font_size:"h4",common_h5_text_style__font_size:"h5",common_body_text_style__font_size:"span",common_footnote_text_style__font_size:"span"};return f.replace(/<font\s+([^>]+)>([^<]+)<\/font>/g,(t,n,o)=>{let i="",a="",s="",l=n.match(/sizeToken=([\w_]+)/),u=n.match(/colorTokenV2=([\w_]+)/),d=n.match(/color=([\w_]+)/),p=n.match(/color=(?:"|')?(#[0-9a-fA-F]{3,8})(?:"|')?/);l&&(i=l[1].replace(/-/g,"_")),u&&(a=u[1].replace(/-/g,"_")),!a&&d&&(a=d[1].replace(/-/g,"_")),!a&&p&&(s=p[1]);let m=[];i&&m.push(`font-size: var(--${i})`),a?m.push(`color: var(--${a})`):s&&m.push(`color: ${s}`);let h=m.join("; "),f=e[i]||"span";return`<${f} style="${h}" class="markdownFont">${o}</${f}>`})},[f]),k=(0,e5.useMemo)(()=>jt(C,{genFrame:(e,t)=>({htmlTag:"img",selfClose:!0,attr:{draggable:"false",style:"vertical-align: text-center; display: inline-block; pointer-events: none;",class:"emoji",title:`[${e}]`,src:t.url||t.staticURL||"",alt:e}}),emotionList:d}),[C,d]),x=(0,e5.useMemo)(()=>{let e=new Fp({html:!0,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&(null==jr?void 0:jr.getLanguage(t)))try{return null==jr?void 0:jr.highlight(t,e,!0).value}catch(e){}return""}});if(s&&e.use(e=>{e.core.ruler.push("add_source_pos",e=>{e.tokens.forEach(e=>{if(e.map){let[t,n]=e.map;e.attrSet("data-source-start-line",String(t)),e.attrSet("data-source-end-line",String(n))}})})}),e.linkify.add("dingtalk:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),e.linkify.add("dtmd:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),k=(k=(k=k.replace(///g,"/")).replace(/'/g,"'")).replace(/(!\[[^\]]*\]\((\/\/[^\s)]+)\))/g,(e,t,n)=>e.replace(n,`https:${n}`)),!i)return{html:e.render(k),codeBlocks:[]};let t=[],n=0;return e.renderer.rules.fence=(e,o)=>{let i=e[o],a=i.info.trim()||"plaintext",s=i.content,l=`code-block-${n++}`,u=!0,d=i.map;d&&(k.split("\n")[d[1]-1].trim().endsWith("```")||(u=!1));let p="mermaid"===a?"mermaid":"code";return t.push({language:a,code:s,id:l,isComplete:u}),`<div data-code-block-id="${l}" data-block-type="${p}"></div>`},{html:(e=>{let t=e;try{jh.forEach(e=>{t=t.replace(RegExp(`<${e}([^>]*)\\/?>`,"g"),`<${e}$1></${e}>`)})}catch(e){}return t})(e.render(k)),codeBlocks:t}},[k,i,s]),w=(null==u?void 0:u.generating)?"ct-markdown generating":"ct-markdown";return(0,e3.jsxs)("div",{ref:h,className:uj()(w,`ct-hljs-${a}`,t),children:[(()=>{if(!i||0===x.codeBlocks.length)return(0,e3.jsx)(Lr,{...u,children:x.html});let e=x.html.split(/(<div[^>]*data-code-block-id="[^"]*"[^>]*><\/div>)/),t=[],n=0;for(let o of e)if(o.includes("data-code-block-id")){let e=x.codeBlocks[n];e&&("mermaid"===e.language?t.push((0,e3.jsxs)("div",{children:[e.isComplete&&(0,e3.jsx)(ju,{code:e.code,showCopyButton:!1,theme:a,sendTextMessage:l}),(0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)]},e.id)):t.push((0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)),n++)}else o.trim()&&t.push((0,e3.jsx)(Lr,{...u,children:o},`html-${t.length}`));return(0,e3.jsx)(e3.Fragment,{children:t})})(),(()=>{let{generating:e}=u||{};return!e||x.html?null:(0,e3.jsx)("img",{width:20,height:10,src:"https://img.alicdn.com/imgextra/i1/O1CN01wdlADU1WCvOLNSB3w_!!6000000002753-1-tps-530-255.gif",alt:""})})()]})}),{displayName:"Markdown"}),j_=p8.config(jf),jg=AG((0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()("ct-card-loading",n),children:"卡片加载中"})}),{displayName:"CardLoading"}),jy=p8.config(jg),jb=AG((0,e5.forwardRef)((e,t)=>{let{className:n,text:o}=e;return(0,e3.jsx)("div",{className:uj()("ct-origin",n),children:(0,e3.jsx)("div",{className:"origin-tip-inner",children:o})})}),{displayName:"Origin"}),jv=p8.config(jb),jE=AG((0,e5.forwardRef)((e,t)=>{let{className:n,indicator:o,shape:i="default",size:a="large",...s}=e,l={...s,size:a};if(!o&&i&&"default"!==i){let e=`load-container ${i}`;l.indicator=(0,e3.jsx)("div",{className:e,children:(0,e3.jsx)("div",{className:"loader"})})}return(0,e3.jsx)(E4,{...l,ref:t,className:uj()(`ct-loading ${a} ${i}`,n)})}),{displayName:"Loading"}),jS=p8.config(jE),jT=AG((0,e5.forwardRef)((e,t)=>{let{className:n,headerStyle:o,children:i,footer:a,footerClassName:s,placement:l,...u}=e;return(0,e3.jsxs)(vB,{...u,v2:!0,ref:t,placement:l,headerStyle:{"border-bottom:":"1px solid var(--40gmM)",...o},className:uj()(`ct-drawer ${l}`,n),children:[i,a&&a.length&&(0,e3.jsx)("div",{className:uj()("draw-footer",s),children:a})]})}),{displayName:"Drawer"}),jC=p8.config(jT),jk=AG((0,e5.forwardRef)((e,t)=>{let{className:n,shape:o="dot",showStatus:i=!0,current:a=0,stepsList:s=[],defaultCollapsed:l=!1,collapsedSteps:u=1,collapsedMore:d=(0,e3.jsxs)("div",{children:["查看更多",(0,e3.jsx)(h2,{type:"arrow-down",size:"xxs",style:{marginLeft:2}})]}),size:p="large",...m}=e,[h,f]=(0,e5.useState)([]),[_,g]=(0,e5.useState)(l);return((0,e5.useEffect)(()=>{f(s.map((e,t)=>_&&u<t+1?null:(0,e3.jsx)(TK.Item,{title:e.title,content:e.content,status:i?void 0:"wait"},t)))},[_,u,s]),0===s.length)?null:(0,e3.jsx)("div",{className:uj()("ct-step",`ct-step-${p}`,n,_&&"ct-step-collapsed"),...m,ref:t,children:(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(TK,{current:a,shape:o,labelPlacement:"hoz",direction:"ver",readOnly:!0,children:h}),_&&s.length>u&&(0,e3.jsx)("div",{className:"ct-step-collapsed-more",onClick:()=>g(!_),children:(0,e3.jsx)("div",{className:"ct-step-collapsed-more-content",children:d})})]})})}),{displayName:"Step"}),jx=p8.config(jk);var jw=((eC={}).Generating="generating",eC.Stopped="stopped",eC);let jN="停止生成",jD=AG((0,e5.forwardRef)((e,t)=>{let{className:n,show:o=!0,status:i=jw.Generating,stopText:a=jN,stopIcon:s,stoppedText:l,onStop:u}=e;return o?(0,e3.jsxs)("div",{className:uj()("ct-stop-generate",n),children:[i===jw.Generating&&(0,e3.jsxs)("div",{className:"stop-generate-area",onClick:()=>{u&&u()},children:[(0,e3.jsx)("img",{src:s||"https://img.alicdn.com/imgextra/i2/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg"}),a||jN]}),i===jw.Stopped&&(0,e3.jsx)("div",{className:"stopped-generate-text",children:l||"已停止生成"})]}):null}),{displayName:"StopGenerate"}),jO=p8.config(jD),jM=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i,listItems:a=[],onExpandedClick:s,onItemClick:l,mode:u="simple",onHeaderClose:d,onHeaderClick:p,onContentClick:m,expanded:h}=e,[f,_]=(0,e5.useState)(h||o);(0,e5.useEffect)(()=>{void 0!==h&&h!==f&&_(h)},[h]);let g=(e,t,n)=>{if(n.stopPropagation(),l){null==l||l(e,t);return}(null==e?void 0:e.url)&&window.open(null==e?void 0:e.url,"_blank")},y=f?"expand":"";return(0,e3.jsxs)("div",{className:uj()(`ct-reference ${u} ${y}`,n),ref:t,children:[(()=>{if(!1===i)return null;if("detail"===u){if(!1===i)return null;let e=(null==i?void 0:i.icon)||"close",t=(null==i?void 0:i.title)||"引用信息";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,children:[(0,e3.jsx)("div",{className:"reference-text",children:t}),(0,e3.jsx)("div",{className:"reference-close",onClick:()=>{null==d||d()},children:AX(e,"xs")})]})}let e=(null==i?void 0:i.icon)||"https://img.alicdn.com/imgextra/i3/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,onClick:e=>{(e.stopPropagation(),p)?p(!f):_(!f)},children:[(0,e3.jsxs)("div",{className:"reference-name",children:[AX(e),(0,e3.jsx)("div",{className:"reference-title",children:null==i?void 0:i.title})]}),(0,e3.jsx)("div",{className:"reference-operate",onClick:e=>{(e.stopPropagation(),s)?s(!f):_(!f)},children:(0,e3.jsx)(AJ,{type:f?"arrow-up":"arrow-down",size:"xs"})})]})})(),a&&0!==a.length&&(f||"simple"!==u)?(0,e3.jsxs)("div",{className:`reference-list ${u}`,onClick:e=>{e.stopPropagation(),null==m||m(f)},children:[f&&"simple"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("div",{className:"reference-text",onClick:n=>g(e,t,n),children:null==e?void 0:e.name}),(null==e?void 0:e.modifyTime)&&!1]},t)),"detail"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",onClick:n=>g(e,t,n),children:[(0,e3.jsxs)("div",{className:"reference-title",children:[(0,e3.jsxs)("div",{className:"reference-name",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("span",{children:null==e?void 0:e.name})]}),(null==e?void 0:e.modifyTime)&&!1]}),(null==e?void 0:e.content)&&(0,e3.jsx)("div",{className:"reference-content",children:null==e?void 0:e.content})]},t))]}):null]})}),jA=p8.config(jM),jR=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsxs)("div",{children:["相关问题",(0,e3.jsx)(h2,{type:"arrow-right",size:"xxs",style:{marginLeft:2}})]}),expanded:a,recommendList:s=[],onToggle:l,onItemClick:u}=e,[d,p]=(0,e5.useState)(o),m=void 0!==a?a:d;return(0,e3.jsxs)("div",{className:uj()("ct-recommend",n),ref:t,children:[(0,e3.jsx)("div",{className:"recommend-header",onClick:()=>{void 0===a&&p(!m),null==l||l(!m)},children:i}),(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:0,exit:400},classNames:"recommend-list",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:"recommend-list",children:s.map((e,t)=>(0,e3.jsx)("div",{className:"recommend-container",children:(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:100*t,exit:0},classNames:"recommend-item",unmountOnExit:!0,appear:!0,children:(0,e3.jsx)("div",{className:"recommend-item",onClick:()=>{null==u||u(e,t)},children:e.title||e.name||e.text})},t)}))})})]})}),jI=p8.config(jR),jL=(0,e5.forwardRef)((e,t)=>{let{className:n,header:o,footer:i,position:a="bottom",value:s,onChange:l,onFocus:u,onBlur:d,onKeyDown:p,enableQuerySug:m,querySugList:h,onQuerySugClick:f}=e,[_,g]=(0,e5.useState)(!1),y=m&&_&&h&&h.length>0;return(0,e3.jsxs)("div",{ref:t,className:uj()("ct-rich-text-input",n),children:[(0,e3.jsx)("div",{className:"header",children:o}),(0,e3.jsxs)("div",{className:uj()("input-container",{focus:_}),children:[(0,e3.jsx)("div",{className:"rich-text-input",contentEditable:!0,onFocus:e=>{g(!0),null==u||u(e)},onBlur:e=>{g(!1),null==d||d(e)},onChange:e=>{null==l||l(e.target.innerText)}}),(0,e3.jsx)("div",{className:"input-footer",children:i}),(0,e3.jsx)(hk.CSSTransition,{in:y,timeout:300,classNames:"query-sug",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:uj()("query-sug",a),children:(0,e3.jsx)("div",{className:"query-sug-list",children:null==h?void 0:h.map((e,t)=>(0,e3.jsx)("div",{className:"query-sug-item",onClick:()=>{null==f||f(e,t)},children:e.label},e.value))})})})]})]})}),jP=(0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()(n,"ct-ai-loading"),ref:t,children:(0,e3.jsxs)("div",{className:uj()("loading-container","short-container"),children:[(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"0s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"1s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"2s"}})]})})}),jF=p8.config(jP),jY=()=>(0,e3.jsx)("div",{className:"radio-item-icon",children:(0,e3.jsx)("div",{className:"radio-item-circle"})}),jj=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-radio",{"ct-radio-disabled":o},a),style:s,...l,children:t.map(e=>(0,e3.jsx)("div",{className:uj()("radio-item",{active:e.value===n,disabled:o||e.disabled}),onClick:()=>{var t;return t=e.value,void(!o&&!e.disabled&&i&&i(t))},onKeyDown:t=>{var n;return n=e.value,void(!o&&!e.disabled&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),i&&i(n)))},role:"radio",tabIndex:o||e.disabled?-1:0,"aria-checked":e.value===n,"aria-disabled":o||e.disabled,children:(0,e3.jsxs)("div",{className:"radio-item-content",children:[(0,e3.jsx)("div",{className:"radio-item-icon-column",children:(0,e3.jsx)(jY,{})}),(0,e3.jsx)("div",{className:"radio-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"radio-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"radio-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"radio-item-text-column",children:[(0,e3.jsx)("div",{className:"radio-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"radio-item-desc",children:e.description})]})]})},e.value))}):null}),{displayName:"Radio"}),jB=p8.config(jj),jU=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||"");e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=!!t,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-radio-group ct-radio-group-list ${i?"ct-radio-group-disabled":""}`,children:[(0,e3.jsx)(jB,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"RadioGroup"}),jz=p8.config(jU),jV=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-checkbox",{"ct-checkbox-disabled":o},a),style:s,...l,children:t.map(e=>{let t=(n||[]).indexOf(e.value)>-1;return(0,e3.jsx)("div",{className:uj()("checkbox-item",{active:t,disabled:o||e.disabled}),onClick:()=>((e,t)=>{if(o||t.disabled)return;let a=n||[],s=a.indexOf(e)>-1?a.filter(t=>t!==e):[...a,e];i&&i(s)})(e.value,e),children:(0,e3.jsxs)("div",{className:"checkbox-item-content",children:[(0,e3.jsx)("div",{className:"checkbox-item-checkbox-column",children:(0,e3.jsx)(f7,{className:"checkbox-item-checkbox",checked:t,disabled:o||e.disabled})}),(0,e3.jsx)("div",{className:"checkbox-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"checkbox-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"checkbox-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"checkbox-item-text-column",children:[(0,e3.jsx)("div",{className:"checkbox-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"checkbox-item-desc",children:e.description})]})]})},e.value)})}):null}),{displayName:"Checkbox"}),jH=p8.config(jV),jG=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||[]);e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=t.length>0,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-checkbox-group ct-checkbox-group-list ${i?"ct-checkbox-group-disabled":""}`,children:[(0,e3.jsx)(jH,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t.length>0&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"CheckboxGroup"}),jW=p8.config(jG),jK=RF(e=>{let{className:t,dataSource:n,mode:o="single",buttonCols:i=2,value:a,size:s="medium",onChange:l}=e,[u,d]=(0,e5.useState)(a),p=Array.from({length:Math.ceil(((null==n?void 0:n.length)||0)/i)},(e,t)=>{let a=t*i,p=Math.min(a+i,(null==n?void 0:n.length)||0),m=null==n?void 0:n.slice(a,p);return(null==m?void 0:m.length)?(0,e3.jsx)("div",{className:"select-row-container",children:m&&m.length?m.map((e,t)=>{if(!e)return null;let{value:n,label:a,disabled:p}=e,m="normal";"string"==typeof u&&u===n||Array.isArray(u)&&u.includes(n)?m="selected":"object"==typeof u&&"value"in u&&u.value===n&&(m="selected");let h=p;return u&&"single"===o&&"normal"===m&&(h=!0),(0,e3.jsx)(_A,{onClick:()=>((e,t)=>{if("multiple"===o)if(Array.isArray(u)){let n="normal"===t?[...u,null==e?void 0:e.value]:u.filter(t=>t!==(null==e?void 0:e.value));d(n),null==l||l(n,"itemClick")}else{let t=[null==e?void 0:e.value];d(t),null==l||l(t,"itemClick")}if("single"===o){let n="normal"===t?e:void 0;d(n),null==l||l(n,"itemClick")}})(e,m),type:"normal",disabled:h,className:`select-item ${m} row${i}`,size:s,children:a},`select_${t}`)}):null},`row_${t}`):null});return(0,e3.jsx)("div",{className:uj()("ct-select",t),children:p})},{coverStyle:!1,labelLayout:"vertical",enableHoverState:!1}),jq=RF((0,e5.forwardRef)((e,t)=>{let{className:n,size:o="medium",mode:i="single",onChange:a,...s}=e;return(0,e3.jsx)(gU,{...s,className:uj()("ct-select",n),size:o,ref:t,mode:i,onChange:a})})),j$=AG((0,e5.forwardRef)((e,t)=>{let{className:n,display:o="select",buttonCols:i=2,dataSource:a,mode:s="single",onChange:l,...u}=e;return"button"===((null==a?void 0:a.length)&&(null==a?void 0:a.length)>6?"select":o)?(0,e3.jsx)(jK,{className:n,dataSource:a,mode:s,buttonCols:i,value:u.value,onChange:l,label:u.label,required:u.required,size:"medium"}):(0,e3.jsx)(jq,{...u,className:uj()("ct-select",n),dataSource:a,ref:t,mode:s,onChange:l,label:u.label,required:u.required,size:"medium",popupClassName:uj()("ct-select-popup",u.popupClassName)})}),{displayName:"Select"}),jQ=p8.config(j$),jJ=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsx)("div",{children:"折叠面板头部"}),customHeader:a,expanded:s,onToggle:l,animated:u=!0,children:d=(0,e3.jsxs)("div",{children:[(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"})]})}=e,p=(0,e5.useRef)(null),m=(0,e5.useRef)(null),[h,f]=(0,e5.useState)(o),[_,g]=(0,e5.useState)(o),y=void 0!==s?s:h,b=(e,t)=>{var n;if(!u)return void(t?(e.style.height="auto",e.style.width="auto",g(!0)):(e.style.height="0",g(!1)));let o=e.getBoundingClientRect().height,i=e.getBoundingClientRect().width,a=(null==(n=m.current)?void 0:n.getBoundingClientRect().width)||i;if(t){e.style.height="0",e.style.width=`${a}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),e.style.height="auto";let t=e.getBoundingClientRect().height,n=e.getBoundingClientRect().width;e.style.height="0",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height=`${t}px`,e.style.width=`${n}px`});let o=()=>{e.style.height="auto",e.style.width="auto",g(!0),e.removeEventListener("transitionend",o)};e.addEventListener("transitionend",o)}else{e.style.height=`${o}px`,e.style.width=`${i}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height="0",e.style.width=`${a}px`});let t=()=>{g(!1),e.removeEventListener("transitionend",t)};e.addEventListener("transitionend",t)}};return(0,e5.useEffect)(()=>{let e=p.current;e&&(y?(g(!0),u?Promise.resolve().then(()=>{b(e,!0)}):(e.style.height="auto",e.style.width="auto")):u?b(e,!1):(e.style.height="0",g(!1)))},[y,u]),(0,e3.jsxs)("div",{className:uj()("ct-flip",n),ref:t,children:[(0,e3.jsx)("div",{className:"flip-header-container",ref:m,children:a||(0,e3.jsxs)("div",{className:"flip-header",onClick:()=>{let e=!y;null==l||l(e),void 0===s&&f(e)},children:[i,(0,e3.jsx)("span",{className:"flip-header-icon",children:(0,e3.jsx)(AJ,{type:y?"arrow-up":"arrow-down",size:"xs"})})]})}),(0,e3.jsx)("div",{className:"flip-content",ref:p,style:{height:o?"auto":0,width:o?"auto":"100%",overflow:"hidden",transition:u?void 0:"none"},children:_&&d})]})}),jX=p8.config(jJ),jZ=(0,e5.forwardRef)((e,t)=>{let{useText:n="使用",name:o,className:i,selected:a=!1,status:s,onToolClick:l,authInfo:u,fullWidth:d,param:p,groupName:m,disabled:h=!1}=e,f=a?"selected":"";return f=d?`${f} full-width`:`${f}`,f=l?`${f} enable-click`:`${f}`,(0,e3.jsxs)("div",{className:uj()(`ct-tool-status ${f} ${s} ${h?"disabled":""}`,i),ref:t,onClick:t=>{h||(t.stopPropagation(),null==l||l(e))},children:[(0,e3.jsx)(AJ,{size:"xs",type:"failed"===s?"icon-cross1":"completed"===s?"icon-check":"loading"}),u&&"auth"===s&&(0,e3.jsx)("div",{className:"next-btn-text next-btn-primary",onClick:t=>{var n;t.stopPropagation(),null==u||null==(n=u.onAuthClick)||n.call(u,e)},children:null==u?void 0:u.content}),(0,e3.jsxs)("div",{className:"content-container",children:[(0,e3.jsx)("div",{className:"content-use-tips",children:n}),m&&(0,e3.jsx)("div",{className:"content-group",children:m}),o&&(0,e3.jsx)("div",{className:"content-name",children:o}),p&&(0,e3.jsx)("div",{className:"content-detail",children:p})]})]})}),j1=p8.config(jZ),j0=AG((0,e5.forwardRef)(e=>{let{className:t,children:n,...o}=e;return(0,e3.jsx)(yJ,{...o,className:uj()("ct-collapse",t),children:n})}),{displayName:"Collapse",Panel:yJ.Panel}),j2=p8.config(j0),j3=(0,e5.forwardRef)((e,t)=>{let{className:n,size:o="small",hasBorder:i=!0,title:a,showCopyButton:s,...l}=e,[u,d]=(0,e5.useState)(!1);return(0,e3.jsxs)("div",{className:"ct-table-container",children:[a?(0,e3.jsxs)("div",{className:"ct-table-header",children:[a&&(0,e3.jsx)("div",{className:"ct-table-title",children:a}),s?(0,e3.jsx)("div",{className:"ct-table-copy-button",onClick:()=>{d(!0),setTimeout(()=>{d(!1)},3e3)},children:(0,e3.jsx)(AJ,{size:16,type:u?"icon-check":"fuzhi3"})}):null]}):null,(0,e3.jsx)(ko,{...l,ref:t,className:uj()("ct-table",{[`ct-table-${o}`]:o,"ct-table-no-border":!i},n),size:o})]})});j3.displayName="Table";let j5=p8.config(j3),j4=(0,e5.forwardRef)((e,t)=>{let{className:n,text:o,...i}=e;return(0,e3.jsxs)("div",{...i,className:uj()("ct-error-notice",n),ref:t,children:[(0,e3.jsx)("div",{className:"ct-error-notice-icon",children:(0,e3.jsx)(h2,{size:16,type:"prompt"})}),(0,e3.jsx)("span",{className:"ct-error-notice-text",children:o})]})});j4.displayName="ErrorNotice";let j6=p8.config(j4),j9=(0,e5.forwardRef)((e,t)=>{let{className:n,...o}=e;return(0,e3.jsx)("div",{...o,className:uj()("ct-document-empty",n),ref:t,children:Array.from({length:4},(e,t)=>(0,e3.jsx)("div",{className:"ct-empty-line"},t))})});j9.displayName="Empty";let j8=p8.config(j9),j7=(0,e5.forwardRef)((e,t)=>{let{className:n,title:o="",content:i,generating:a=!0,onPreview:s,onCopy:l,onDownload:u,renderDownloadAction:d,showPreviewButton:p=!0,showCopyButton:m=!0,showDownloadButton:h=!0,contentHeight:f=128,..._}=e,g=f-25,y=(0,e5.useRef)(null),[b,E]=(0,e5.useState)(0),[S,T]=(0,e5.useState)(!1),[C,k]=(0,e5.useState)(()=>f>128?128:f),x=e=>{let t=Array.from(e.children);return 0===t.length?e:x(t[t.length-1])},w=(0,e5.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),n=x(e);if(!n)return;let o=n.getBoundingClientRect(),i=o.top-t.top,s=a?i+o.height:i+o.height+20;if(f>128&&C<f){let e=C-25;if(s>e)return void k(Math.min(f,C+(s-e)))}if(!(s+b<g&&i+b>0))return void E(-i)},[b,f,C,a]),N=Rv(w,200);(0,e5.useEffect)(()=>{w()},[a]),(0,e5.useEffect)(()=>{if("string"==typeof i)return void N();if(!y.current)return;let e=new MutationObserver(()=>{N()});return e.observe(y.current,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[i,N]);let D=e=>{o&&p&&s&&(e.stopPropagation(),null==s||s())},O=e=>{e.stopPropagation()};return(0,e3.jsxs)("div",{..._,className:uj()("ct-document",{"ct-document-generating":a},n),ref:t,onClick:D,children:[o?(0,e3.jsxs)("div",{className:"ct-document-header",children:[(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)(AJ,{type:"document",className:"ct-document-header-icon"}),(0,e3.jsx)("span",{className:uj()("ct-document-header-title"),children:o})]}),(0,e3.jsxs)("div",{className:uj()("ct-document-header-actions"),children:[(0,e3.jsxs)("div",{className:uj()("ct-document-header-preview",{"ct-document-header-preview-display-none":!p||!s,"ct-document-header-preview-generating":a}),onClick:D,children:[(0,e3.jsx)(AJ,{type:"preview",className:"ct-document-header-preview-icon"}),(0,e3.jsx)("span",{className:"ct-document-header-preview-text",children:"预览"})]}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-copy",{"ct-document-header-action-copy-generating":a,"ct-document-header-action-copy-display-none":!m||!l}),onClick:e=>{e.stopPropagation(),null==l||l(),T(!0),setTimeout(()=>{T(!1)},3e3)},title:"复制",children:(0,e3.jsx)(AJ,{type:S?"icon-check":"fuzhi3",className:"ct-document-header-action-icon"})}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-download",{"ct-document-header-action-download-generating":a,"ct-document-header-action-download-display-none":!h||!d&&!u}),onClick:d?O:e=>{e.stopPropagation(),null==u||u()},title:d?void 0:"下载",children:d?d():(0,e3.jsx)(AJ,{type:"download",className:"ct-document-header-action-icon"})})]})]}):(0,e3.jsx)("div",{className:"ct-document-header",children:(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)("div",{className:"ct-document-header-left-icon-empty"}),(0,e3.jsx)("div",{className:"ct-document-header-left-title-empty"})]})}),i?(0,e3.jsxs)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),style:{height:C},children:[(0,e3.jsx)("div",{className:"ct-document-mask"}),(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)("div",{ref:y,className:"ct-document-content-text",style:{transform:`translateY(${a?b:0}px)`},onClick:O,children:i})})]}):(0,e3.jsx)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),children:(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)(j8,{})})})]})});j7.displayName="Document";let Be=p8.config(j7),Bt="0.3.62",Bn=e=>{let{globalExpandCode:t}=e,[n,o]=(0,e5.useState)(!1),[i,a]=(0,e5.useState)(t);(0,e5.useEffect)(()=>{o(!0)},[]),(0,e5.useEffect)(()=>{a(t)},[t]);let s=e.docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{}),l=(0,iZ.kebabCase)(e.demoKey),d=`${l}-container`;return(0,e3.jsxs)("div",{id:d,className:"next-demo-item scroll-count-item",children:[(0,e3.jsxs)("div",{id:`${l}-desc`,className:"demo-item-desc markdown",children:[(0,e3.jsx)(i1,{id:d,title:s["@demo"],component:"h3"}),(0,e3.jsx)("div",{className:"demo-item-desc-body markdown",children:(0,e3.jsx)(ob,{remarkPlugins:[iA],children:s["@remarks"]})})]}),(0,e3.jsxs)(uR,{disabled:e.disabled,code:e.sourceCode,scope:{mountNode:document.querySelector(`#${l}-mount`),require:e=>{let t={"@alifd/chat":e2,"@alifd/next":e$,"react-dom":e6,"styled-components":eQ,react:e4(),classnames:uj()},n=e.match(/^@alifd\/chat\/(es|lib)\/(.*)\/style$/);return n&&u(64615)(`./${n[2]}/style`),t[e]}},noInline:!0,children:[(0,e3.jsx)("div",{id:`${l}-mount`,className:"next-demo-mount",children:n?(0,e3.jsx)(uL,{}):null}),n?(0,e3.jsx)(uF,{}):null,(0,e3.jsx)("div",{id:`${l}-operations`,className:"demo-item-operations",style:{borderBottom:"1px dashed rgb(238, 238, 238)"},children:(0,e3.jsx)("div",{id:`${l}-fold-code`,className:"code-box-code-action code-expand-icon-hide",children:(0,e3.jsxs)(fl.Tooltip,{align:"b",style:{maxWidth:400},trigger:(0,e3.jsx)("span",{id:`${l}-icon-hide`,onClick:()=>{a(!i)},children:(0,e3.jsx)("svg",{width:20,height:20,viewBox:"0 0 20 20",style:{fill:"#3B9AFF"},children:(0,e3.jsx)("path",{transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961)",d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z"})})}),children:["收起代码",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),"小提示:",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"1. 点击一下代码,试一试在线编辑预览吧!"}),(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"2. 页面右上方 有 全局代码展开 及 开启在线编辑 模式哟~"})]})})}),(0,e3.jsx)("div",{id:`${l}-body`,className:"next-demo-body",style:{display:i?"block":"none"},children:(0,e3.jsx)("div",{id:`${l}-live-editor`,children:(0,e3.jsx)("div",{id:`${l}-live-body`,className:"react-live-body",children:(0,e3.jsx)(uI,{theme:{plain:{},styles:[{types:[],style:{}}]}})})})})]})]})},Br=e=>{let{defaultLiveDemo:t=!0,defaultExpandCode:n=!0,onToggleExpandCode:o,onToggleLiveDemo:i,data:a=[]}=e,[s,l]=(0,e5.useState)(n),[u,d]=(0,e5.useState)(t),p={viewBox:"0 0 16 16",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","aria-haspopup":"true","aria-expanded":"false",style:{width:20,height:20,padding:2}};return(0,e3.jsxs)("div",{className:"demo-index",children:[(0,e3.jsxs)("span",{id:"global-control",className:"all-demo-box-controls",children:[(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"live-demo",role:"img","aria-label":"edit",className:"code-box-expand-trigger",onClick:()=>{d(!u),"function"==typeof i&&i(!u)},children:[(0,e3.jsx)("svg",{...p,"data-icon":"edit",id:"live-on",style:{...p.style,display:u?"none":"block"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})}),(0,e3.jsx)("svg",{...p,id:"live-off","data-icon":"edit",style:{...p.style,display:u?"block":"none"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})})]}),children:"使用预览模式"}),(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"expand-all",role:"img","aria-label":"code",className:"code-box-expand-trigger","aria-haspopup":"true","aria-expanded":"false",onClick:()=>{l(!s),"function"==typeof o&&o(!s)},children:[(0,e3.jsx)("svg",{...p,id:"all-not-expand","data-icon":"code",style:{...p.style,display:s?"none":"block"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})}),(0,e3.jsx)("svg",{...p,id:"all-expanded","data-icon":"code",style:{...p.style,display:s?"block":"none"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})})]}),children:"展开所有代码"})]}),(0,e3.jsx)("ul",{className:"demo-index-list",children:a.map(e=>(0,e3.jsx)("li",{className:"demo-index-item","data-id":e.id,children:(0,e3.jsx)("a",{href:`#${e.id}`,children:e.title})},e.id))})]})};e6.render((0,e3.jsx)(()=>{var e;let[t,n]=(0,e5.useState)(!0),[o,i]=(0,e5.useState)(!1),a={basic:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Feedback } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nimport "@alifd/chat/es/feedback/style";\nReactDOM.render(\n <div>\n <h3>普通</h3>\n <Card style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带 Title</h3>\n <Card title="提案概览" style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带 Footer</h3>\n <Card title="提案概览" footer={<Feedback />} style={{ width: 300 }}>\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>带分隔线</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n titleLine\n footerLine\n >\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"最简单的用法。\n-\nA simple card with title and sub-title."},{tag:"@demo",content:"基本使用"},{tag:"@en",content:"Basic"},{tag:"@order",content:"1"}]}},collapsable:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Button } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nconst { Collapsable } = Card;\nconst DemoGroup = ({ triggerType }) => (\n <div style={{ marginBottom: 24 }}>\n <h5 style={{ marginBottom: 16 }}>\n {triggerType === "hover" ? "鼠标悬浮触发" : "点击触发"}\n </h5>\n <Collapsable\n title="产品信息"\n triggerType={triggerType}\n renderContent={({ visible, onVisibleChange, children }) => (\n <div>\n <div style={{ padding: "12px 16px" }}>\n {visible ? "完整的产品描述信息" : "简短的产品描述..."}\n </div>\n {!visible && (\n <div\n style={{\n borderTop: "1px solid #eee",\n padding: "8px 16px",\n textAlign: "center",\n }}\n >\n <Button text onClick={() => onVisibleChange(true)}>\n 查看更多\n </Button>\n </div>\n )}\n </div>\n )}\n />\n </div>\n);\nReactDOM.render(\n <div>\n <DemoGroup triggerType="hover" />\n <DemoGroup triggerType="click" />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"展示卡片的展开收起功能,支持悬浮和点击两种触发方式。"},{tag:"@demo",content:"基础展开收起"},{tag:"@en",content:"Basic Collapsable Card"},{tag:"@order",content:"1"}]}},"collapsable-advanced":{sourceCode:'import React, { useState } from "react";\nimport ReactDOM from "react-dom";\nimport { Card, Button } from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nconst { Collapsable } = Card;\nconst content = {\n title: "智能助手使用指南",\n brief: "智能助手可以帮助您快速完成各种任务...",\n detail: `智能助手是一个功能强大的AI工具,可以:\n\n1. 自动回答问题\n2. 协助编写代码\n3. 提供建议和解决方案\n4. 帮助整理文档\n\n您可以通过简单的对话来使用这些功能。`,\n};\nconst Demo = () => {\n const [visible, setVisible] = useState(false);\n return (\n <Collapsable\n title={content.title}\n triggerType="click"\n visible={visible}\n onVisibleChange={setVisible}\n renderContent={({ visible, onVisibleChange }) => (\n <div style={{ padding: 16 }}>\n <div\n style={{\n fontSize: visible ? 14 : 12,\n lineHeight: "1.5",\n }}\n >\n {visible ? content.detail : content.brief}\n </div>\n <div\n style={{\n marginTop: 16,\n textAlign: "right",\n }}\n >\n <Button text onClick={() => onVisibleChange(!visible)}>\n {visible ? "收起" : "展开详情"}\n </Button>\n </div>\n </div>\n )}\n footer={\n <div\n style={{\n padding: "8px 16px",\n borderTop: "1px solid #eee",\n fontSize: 12,\n }}\n >\n 最后更新时间:2025-06-18\n </div>\n }\n />\n );\n};\nReactDOM.render(<Demo />, mountNode);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"展示卡片的复杂交互场景,包括自定义展开内容、状态控制等。"},{tag:"@demo",content:"复杂交互"},{tag:"@en",content:"Advanced Interaction"},{tag:"@order",content:"2"}]}},"demo-legal-affairs":{sourceCode:'import React, { useState } from "react";\nimport ReactDOM from "react-dom";\nimport cs from "classnames";\nimport {\n Card,\n Feedback,\n Text,\n Tag,\n Tab,\n FloatButton,\n Button,\n} from "@alifd/chat";\nimport "@alifd/chat/es/card/style";\nimport "@alifd/chat/es/feedback/style";\nimport "@alifd/chat/es/text/style";\nimport "@alifd/chat/es/tag/style";\nimport "@alifd/chat/es/tab/style";\nimport "@alifd/chat/es/float-button/style";\nimport "@alifd/chat/es/button/style";\nimport { createGlobalStyle } from "styled-components";\nconst GlobalStyle = createGlobalStyle`\n.card-legal-affairs {\n .ct-card-header-title {\n background-image: radial-gradient(\n ellipse 160px 90px at 20px -20px,\n rgb(from var(--color-brand1-6, #5584ff) r g b / 0.15) 0%,\n transparent 100%\n );\n color: var(--color-brand1-6, #5584ff);\n }\n}\n\n.my-trigger {\n width: 42px;\n height: 42px;\n border-radius: 50%;\n overflow: hidden;\n box-shadow: 0 2px 10px 0 rgba(31, 56, 88, 0.15);\n cursor: pointer;\n\n &--active {\n background: linear-gradient(0deg, #ff6f00 0%, #ff9616 100%);\n }\n\n &-img {\n width: 100%;\n height: 100%;\n background: url(\'https://img.alicdn.com/imgextra/i3/O1CN01HV78sy1Q8Rieq3nI2_!!6000000001931-0-tps-84-84.jpg\')\n center / contain no-repeat;\n }\n\n &-close {\n width: 100%;\n height: 100%;\n background: url(\'https://img.alicdn.com/tfs/TB1yEj_qhD1gK0jSZFsXXbldVXa-96-96.png\') center /\n contain no-repeat;\n }\n}\n\n.my-popup {\n width: 200px;\n height: 200px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n`;\nfunction FloatButtonDemo() {\n const [active, setActive] = useState(false);\n const [active2, setActive2] = useState(false);\n const [target, setTarget] = useState(".card-legal-affairs");\n const [show, setShow] = useState(true);\n return (\n <div>\n <button onClick={() => setShow(!show)}>toggle</button>\n <button\n onClick={() => {\n setTarget(\n target === ".card-legal-affairs"\n ? "#demo-legal-affairs-mount"\n : ".card-legal-affairs",\n );\n }}\n >\n change target\n </button>\n {show && (\n <FloatButton.InnerDrawer\n dragable\n target={target}\n align="tl"\n autoAlign\n title="Title"\n showClose\n autoHide\n defaultPosition={[0.8, 0.8]}\n onVisibleChange={(v) => setActive(v)}\n trigger={\n <div className={cs("my-trigger", { "my-trigger--active": active })}>\n {active ? (\n <div className="my-trigger-close" />\n ) : (\n <div className="my-trigger-img" />\n )}\n </div>\n }\n >\n <div className="my-popup">Content</div>\n </FloatButton.InnerDrawer>\n )}\n <FloatButton.Drawer\n dragable\n align="tl"\n autoAlign\n title="Title"\n showClose\n defaultPosition={[0.8, 0.6]}\n onVisibleChange={(v) => setActive2(v)}\n trigger={\n <div className={cs("my-trigger", { "my-trigger--active": active2 })}>\n {active2 ? (\n <div className="my-trigger-close" />\n ) : (\n <div className="my-trigger-img" />\n )}\n </div>\n }\n >\n <div className="my-popup">Content</div>\n </FloatButton.Drawer>\n </div>\n );\n}\nReactDOM.render(\n <div className="card-legal-affairs">\n <GlobalStyle />\n <h3>普通文本卡片</h3>\n <Card title="提案概览" style={{ width: 300 }}>\n <Text maxLine={4}>\n 关键词:xxx xxx xxx <br />\n <Tag color="green" type="normal">\n 123\n </Tag>\n <Tag color="green" type="primary">\n xxx\n </Tag>\n {new Array(101)\n .fill("")\n .map((_, i) => `${i}`)\n .join(",")}\n </Text>\n </Card>\n <h3>普通文本卡片带赞踩</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n >\n <div>\n 关键词:xxx xxx xxx <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Card>\n <h3>hover 展示全貌</h3>\n <Card.Collapsable\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n renderContent={({ visible, onVisibleChange, children }) => {\n return (\n <Text\n maxLine={4}\n visible={visible}\n onVisibleChange={onVisibleChange}\n showTrigger={false}\n triggerType="hover"\n >\n {children}\n </Text>\n );\n }}\n >\n 关键词:xxx xxx xxx <br />\n {new Array(15).fill("这是一段创新提案摘要").join(",")}\n </Card.Collapsable>\n <h3>Tab card</h3>\n <Card\n title="提案概览"\n footer={<Feedback />}\n style={{ width: 300 }}\n footerLine\n >\n <Tab contentStyle={{ paddingTop: 8 }}>\n <Tab.Item title="Tab1">\n <div>\n <Button>按钮</Button>\n <Button type="primary">按钮</Button>\n 关键词:xxx xxx xxx1 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n <Tab.Item title="Tab2">\n <div>\n 关键词:xxx xxx xxx2 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n <Tab.Item title="Tab3">\n <div>\n 关键词:xxx xxx xxx3 <br />\n {new Array(10).fill("这是一段创新提案摘要").join(",")}\n </div>\n </Tab.Item>\n </Tab>\n </Card>\n <h3>Inner drawer float button</h3>\n <FloatButtonDemo />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"法务机器人卡片组件"},{tag:"@demo",content:"法务交付样例"},{tag:"@order",content:"2"}]}}},s=[{tag:"@remarks",content:"一个通用的卡片组件。\n- A card is a piece of paper with unique related data taht servers as an entry point to more detailed information."},{tag:"@component",content:"卡片"},{tag:"@en",content:"Card"},{tag:"@type",content:"通用 - General"},{tag:"@when",content:"当一个模块的同类信息不能自然形成区块感,可借助 Card 组件将信息整合,帮助界面信息模块感更强。\n-\nA card could contain a photo, text, and a link about a single subject."}].reduce((e,t)=>(e[t.tag]=t.content,e),{}),l={id:"demo-list",title:"代码演示"},u=Object.keys(a).sort((e,t)=>{var n,o,i,s;return parseInt((null==(o=a[e].docInfo.tags)||null==(n=o.find(e=>"@order"===e.tag))?void 0:n.content)||"0")-parseInt((null==(s=a[t].docInfo.tags)||null==(i=s.find(e=>"@order"===e.tag))?void 0:i.content)||"0")}),d=[...s["@when"]?[{id:"何时使用",title:"何时使用"}]:[],l,...u.map(e=>{let t=(0,iZ.kebabCase)(e);return{id:`${t}-container`,title:a[e].docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{})["@demo"]}})];return(0,e3.jsxs)("div",{className:"demo-wrapper",children:[(0,e3.jsx)("div",{className:"demo-title markdown",children:(0,e3.jsx)("h1",{children:s["@en"]})}),(0,e3.jsx)(Br,{defaultExpandCode:o,defaultLiveDemo:t,onToggleLiveDemo:n,onToggleExpandCode:i,data:d}),(0,e3.jsx)("div",{className:"demo-head",children:(0,e3.jsxs)("div",{id:"demo-area",className:"next-demo-section",children:[(0,e3.jsxs)("div",{id:"md-area-former",className:"markdown-body markdown",children:[(0,e3.jsx)("div",{id:"demo-guide",className:"scroll-count-item active"}),(0,e3.jsx)("p",{children:i2(s["@remarks"])}),(e=s["@when"])?(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(i1,{id:"何时使用",title:"何时使用"}),(0,e3.jsx)("ul",{children:(0,e3.jsx)("li",{children:i2(e)})})]}):null,(0,e3.jsx)(i1,{...l})]}),u.map((e,n)=>(0,e5.createElement)(Bn,{disabled:!t,globalExpandCode:o,...a[e],demoKey:e,key:n})),(0,e3.jsx)("div",{id:"md-area-latter",className:"markdown-body markdown",children:(0,e3.jsxs)("div",{id:"demo-api","data-scroll-id":"demo-api",className:"scroll-count-item active",children:[(0,e3.jsx)(i1,{id:"API",title:"API"}),[].map(e=>(0,e5.createElement)(i0,{...e,key:e.title})),s["@others"]?(0,e3.jsx)(ob,{remarkPlugins:[iA],rehypePlugins:[iq,[ij,{behavior:"append",content:()=>[iX("span",{},["#"])],properties:{className:"header-anchor scroll-count-item"}}]],children:s["@others"]}):null]})})]})})]})},{}),document.getElementById("root"))})()})();
|
|
@@ -133,4 +133,4 @@ ${t.map(e=>{let{variableName:t,uniqueLocalName:n}=e;return` reactHotLoader.regi
|
|
|
133
133
|
\`\`\`
|
|
134
134
|
${l}
|
|
135
135
|
\`\`\`
|
|
136
|
-
如何解决这个问题?如果你能提供修复方案,请保持简洁。`;i&&i(e)}},children:"使用对话修复"})})]})})}):(0,e3.jsx)("div",{className:"ct-mermaid-view-content",children:(0,e3.jsx)("div",{ref:a,className:"ct-mermaid-view-chart"})}),d&&(0,e3.jsx)("div",{className:"ct-mermaid-view-loading",children:(0,e3.jsx)(E4,{size:"medium"})})]})});jc.displayName="MermaidView";let ju=p8.config(jc),jd=[{emotionVersion:"75",emotionId:"emotion_180001",dynamicEmotionId:"",showType:1,skinList:[],name:"[魔法棒]",names:{en_US:"[Magic Wand]",ja_JP:"[魔棒]",vi_VN:"[đũa ph\xe9p]",zh_CN:"[魔法棒]",zh_HK:"[魔法棒]",zh_TW:"[魔法棒]"},url:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",staticURL:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",fallbacks:[]}],jp="",jm=["img","code","pre","link-reference","link-reference-group"],jh=["link-reference-group"],jf=AG((0,e5.forwardRef)(e=>{let{className:t,onReady:n,content:o,needCodeHeader:i=!0,theme:a="light",enableSourcePos:s=!1,sendTextMessage:l,...u}=e,[d,p]=(0,e5.useState)([]);function m(e,t){let n;if(!e)return[];let o=[...jm,...t||[]],i=/\[[^\]]*\]\([^)]*\)/g,a=o.length>0?RegExp(`<(${o.join("|")}).*?>.*?<\\/\\1>`,"gs"):null,s=[],l=0,u=[];for(;null!==(n=i.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});if(a)for(a.lastIndex=0;null!==(n=a.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});for(let t of(u.sort((e,t)=>e.start-t.start),u))t.start>l&&s.push(...e.substring(l,t.start).split("")),s.push(t.content),l=t.end;return l<e.length&&s.push(...e.substring(l).split("")),s}(0,e5.useEffect)(()=>{Y7(),je().then(e=>{p(()=>[...jd,...e])}),null==n||n()},[n]);let h=(0,e5.useRef)(null),[f,_]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?jp:o),[g,y]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?m(o,u.whitelistTags):[]),[b,E]=(0,e5.useState)(0),S=(0,e5.useRef)(null),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)};(0,e5.useEffect)(()=>{if(T(),!(null==u?void 0:u.typewriterEffect)){_(o),y([]);return}let e=m(o,u.whitelistTags);if(b>=e.length)_(o),E(e.length),y([]);else{let t=e.slice(0,b),n=e.slice(b);_(t.join("")),y(n)}},[o,null==u?void 0:u.typewriterEffect,null==u?void 0:u.whitelistTags]),(0,e5.useEffect)(()=>{if(!(null==u?void 0:u.typewriterEffect)||0===g.length)return void T();let e=Math.max(Math.floor(g.length/10),2),t=()=>{y(t=>{if(0===t.length)return t;let n=t.slice(0,e),o=t.slice(e);return _(e=>e+n.join("")),E(t=>t+e),o})};return T(),t(),S.current=setTimeout(()=>{let e=()=>{t(),S.current=setTimeout(e,50)};e()},50),T},[g.length,null==u?void 0:u.typewriterEffect]);let C=(0,e5.useMemo)(()=>{jp=f;let e={common_hypertitle_text_style__font_size:"h1",common_largetitle_text_style__font_size:"h1",common_h1_text_style__font_size:"h1",common_h2_text_style__font_size:"h2",common_h3_text_style__font_size:"h3",common_h4_text_style__font_size:"h4",common_h5_text_style__font_size:"h5",common_body_text_style__font_size:"span",common_footnote_text_style__font_size:"span"};return f.replace(/<font\s+([^>]+)>([^<]+)<\/font>/g,(t,n,o)=>{let i="",a="",s="",l=n.match(/sizeToken=([\w_]+)/),u=n.match(/colorTokenV2=([\w_]+)/),d=n.match(/color=([\w_]+)/),p=n.match(/color=(?:"|')?(#[0-9a-fA-F]{3,8})(?:"|')?/);l&&(i=l[1].replace(/-/g,"_")),u&&(a=u[1].replace(/-/g,"_")),!a&&d&&(a=d[1].replace(/-/g,"_")),!a&&p&&(s=p[1]);let m=[];i&&m.push(`font-size: var(--${i})`),a?m.push(`color: var(--${a})`):s&&m.push(`color: ${s}`);let h=m.join("; "),f=e[i]||"span";return`<${f} style="${h}" class="markdownFont">${o}</${f}>`})},[f]),k=(0,e5.useMemo)(()=>jt(C,{genFrame:(e,t)=>({htmlTag:"img",selfClose:!0,attr:{draggable:"false",style:"vertical-align: text-center; display: inline-block; pointer-events: none;",class:"emoji",title:`[${e}]`,src:t.url||t.staticURL||"",alt:e}}),emotionList:d}),[C,d]),x=(0,e5.useMemo)(()=>{let e=new Fp({html:!0,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&(null==jr?void 0:jr.getLanguage(t)))try{return null==jr?void 0:jr.highlight(t,e,!0).value}catch(e){}return""}});if(s&&e.use(e=>{e.core.ruler.push("add_source_pos",e=>{e.tokens.forEach(e=>{if(e.map){let[t,n]=e.map;e.attrSet("data-source-start-line",String(t)),e.attrSet("data-source-end-line",String(n))}})})}),e.linkify.add("dingtalk:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),e.linkify.add("dtmd:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),k=(k=(k=k.replace(///g,"/")).replace(/'/g,"'")).replace(/(!\[[^\]]*\]\((\/\/[^\s)]+)\))/g,(e,t,n)=>e.replace(n,`https:${n}`)),!i)return{html:e.render(k),codeBlocks:[]};let t=[],n=0;return e.renderer.rules.fence=(e,o)=>{let i=e[o],a=i.info.trim()||"plaintext",s=i.content,l=`code-block-${n++}`,u=!0,d=i.map;d&&(k.split("\n")[d[1]-1].trim().endsWith("```")||(u=!1));let p="mermaid"===a?"mermaid":"code";return t.push({language:a,code:s,id:l,isComplete:u}),`<div data-code-block-id="${l}" data-block-type="${p}"></div>`},{html:(e=>{let t=e;try{jh.forEach(e=>{t=t.replace(RegExp(`<${e}[^>]*\\/>`,"g"),`<${e} ...></${e}>`)})}catch(e){}return t})(e.render(k)),codeBlocks:t}},[k,i,s]),w=(null==u?void 0:u.generating)?"ct-markdown generating":"ct-markdown";return(0,e3.jsxs)("div",{ref:h,className:uj()(w,`ct-hljs-${a}`,t),children:[(()=>{if(!i||0===x.codeBlocks.length)return(0,e3.jsx)(Lr,{...u,children:x.html});let e=x.html.split(/(<div[^>]*data-code-block-id="[^"]*"[^>]*><\/div>)/),t=[],n=0;for(let o of e)if(o.includes("data-code-block-id")){let e=x.codeBlocks[n];e&&("mermaid"===e.language?t.push((0,e3.jsxs)("div",{children:[e.isComplete&&(0,e3.jsx)(ju,{code:e.code,showCopyButton:!1,theme:a,sendTextMessage:l}),(0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)]},e.id)):t.push((0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)),n++)}else o.trim()&&t.push((0,e3.jsx)(Lr,{...u,children:o},`html-${t.length}`));return(0,e3.jsx)(e3.Fragment,{children:t})})(),(()=>{let{generating:e}=u||{};return!e||x.html?null:(0,e3.jsx)("img",{width:20,height:10,src:"https://img.alicdn.com/imgextra/i1/O1CN01wdlADU1WCvOLNSB3w_!!6000000002753-1-tps-530-255.gif",alt:""})})()]})}),{displayName:"Markdown"}),j_=p8.config(jf),jg=AG((0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()("ct-card-loading",n),children:"卡片加载中"})}),{displayName:"CardLoading"}),jy=p8.config(jg),jb=AG((0,e5.forwardRef)((e,t)=>{let{className:n,text:o}=e;return(0,e3.jsx)("div",{className:uj()("ct-origin",n),children:(0,e3.jsx)("div",{className:"origin-tip-inner",children:o})})}),{displayName:"Origin"}),jv=p8.config(jb),jE=AG((0,e5.forwardRef)((e,t)=>{let{className:n,indicator:o,shape:i="default",size:a="large",...s}=e,l={...s,size:a};if(!o&&i&&"default"!==i){let e=`load-container ${i}`;l.indicator=(0,e3.jsx)("div",{className:e,children:(0,e3.jsx)("div",{className:"loader"})})}return(0,e3.jsx)(E4,{...l,ref:t,className:uj()(`ct-loading ${a} ${i}`,n)})}),{displayName:"Loading"}),jS=p8.config(jE),jT=AG((0,e5.forwardRef)((e,t)=>{let{className:n,headerStyle:o,children:i,footer:a,footerClassName:s,placement:l,...u}=e;return(0,e3.jsxs)(vB,{...u,v2:!0,ref:t,placement:l,headerStyle:{"border-bottom:":"1px solid var(--40gmM)",...o},className:uj()(`ct-drawer ${l}`,n),children:[i,a&&a.length&&(0,e3.jsx)("div",{className:uj()("draw-footer",s),children:a})]})}),{displayName:"Drawer"}),jC=p8.config(jT),jk=AG((0,e5.forwardRef)((e,t)=>{let{className:n,shape:o="dot",showStatus:i=!0,current:a=0,stepsList:s=[],defaultCollapsed:l=!1,collapsedSteps:u=1,collapsedMore:d=(0,e3.jsxs)("div",{children:["查看更多",(0,e3.jsx)(h2,{type:"arrow-down",size:"xxs",style:{marginLeft:2}})]}),size:p="large",...m}=e,[h,f]=(0,e5.useState)([]),[_,g]=(0,e5.useState)(l);return((0,e5.useEffect)(()=>{f(s.map((e,t)=>_&&u<t+1?null:(0,e3.jsx)(TK.Item,{title:e.title,content:e.content,status:i?void 0:"wait"},t)))},[_,u,s]),0===s.length)?null:(0,e3.jsx)("div",{className:uj()("ct-step",`ct-step-${p}`,n,_&&"ct-step-collapsed"),...m,ref:t,children:(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(TK,{current:a,shape:o,labelPlacement:"hoz",direction:"ver",readOnly:!0,children:h}),_&&s.length>u&&(0,e3.jsx)("div",{className:"ct-step-collapsed-more",onClick:()=>g(!_),children:(0,e3.jsx)("div",{className:"ct-step-collapsed-more-content",children:d})})]})})}),{displayName:"Step"}),jx=p8.config(jk);var jw=((eC={}).Generating="generating",eC.Stopped="stopped",eC);let jN="停止生成",jD=AG((0,e5.forwardRef)((e,t)=>{let{className:n,show:o=!0,status:i=jw.Generating,stopText:a=jN,stopIcon:s,stoppedText:l,onStop:u}=e;return o?(0,e3.jsxs)("div",{className:uj()("ct-stop-generate",n),children:[i===jw.Generating&&(0,e3.jsxs)("div",{className:"stop-generate-area",onClick:()=>{u&&u()},children:[(0,e3.jsx)("img",{src:s||"https://img.alicdn.com/imgextra/i2/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg"}),a||jN]}),i===jw.Stopped&&(0,e3.jsx)("div",{className:"stopped-generate-text",children:l||"已停止生成"})]}):null}),{displayName:"StopGenerate"}),jO=p8.config(jD),jM=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i,listItems:a=[],onExpandedClick:s,onItemClick:l,mode:u="simple",onHeaderClose:d,onHeaderClick:p,onContentClick:m,expanded:h}=e,[f,_]=(0,e5.useState)(h||o);(0,e5.useEffect)(()=>{void 0!==h&&h!==f&&_(h)},[h]);let g=(e,t,n)=>{if(n.stopPropagation(),l){null==l||l(e,t);return}(null==e?void 0:e.url)&&window.open(null==e?void 0:e.url,"_blank")},y=f?"expand":"";return(0,e3.jsxs)("div",{className:uj()(`ct-reference ${u} ${y}`,n),ref:t,children:[(()=>{if(!1===i)return null;if("detail"===u){if(!1===i)return null;let e=(null==i?void 0:i.icon)||"close",t=(null==i?void 0:i.title)||"引用信息";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,children:[(0,e3.jsx)("div",{className:"reference-text",children:t}),(0,e3.jsx)("div",{className:"reference-close",onClick:()=>{null==d||d()},children:AX(e,"xs")})]})}let e=(null==i?void 0:i.icon)||"https://img.alicdn.com/imgextra/i3/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,onClick:e=>{(e.stopPropagation(),p)?p(!f):_(!f)},children:[(0,e3.jsxs)("div",{className:"reference-name",children:[AX(e),(0,e3.jsx)("div",{className:"reference-title",children:null==i?void 0:i.title})]}),(0,e3.jsx)("div",{className:"reference-operate",onClick:e=>{(e.stopPropagation(),s)?s(!f):_(!f)},children:(0,e3.jsx)(AJ,{type:f?"arrow-up":"arrow-down",size:"xs"})})]})})(),a&&0!==a.length&&(f||"simple"!==u)?(0,e3.jsxs)("div",{className:`reference-list ${u}`,onClick:e=>{e.stopPropagation(),null==m||m(f)},children:[f&&"simple"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("div",{className:"reference-text",onClick:n=>g(e,t,n),children:null==e?void 0:e.name}),(null==e?void 0:e.modifyTime)&&!1]},t)),"detail"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",onClick:n=>g(e,t,n),children:[(0,e3.jsxs)("div",{className:"reference-title",children:[(0,e3.jsxs)("div",{className:"reference-name",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("span",{children:null==e?void 0:e.name})]}),(null==e?void 0:e.modifyTime)&&!1]}),(null==e?void 0:e.content)&&(0,e3.jsx)("div",{className:"reference-content",children:null==e?void 0:e.content})]},t))]}):null]})}),jA=p8.config(jM),jR=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsxs)("div",{children:["相关问题",(0,e3.jsx)(h2,{type:"arrow-right",size:"xxs",style:{marginLeft:2}})]}),expanded:a,recommendList:s=[],onToggle:l,onItemClick:u}=e,[d,p]=(0,e5.useState)(o),m=void 0!==a?a:d;return(0,e3.jsxs)("div",{className:uj()("ct-recommend",n),ref:t,children:[(0,e3.jsx)("div",{className:"recommend-header",onClick:()=>{void 0===a&&p(!m),null==l||l(!m)},children:i}),(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:0,exit:400},classNames:"recommend-list",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:"recommend-list",children:s.map((e,t)=>(0,e3.jsx)("div",{className:"recommend-container",children:(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:100*t,exit:0},classNames:"recommend-item",unmountOnExit:!0,appear:!0,children:(0,e3.jsx)("div",{className:"recommend-item",onClick:()=>{null==u||u(e,t)},children:e.title||e.name||e.text})},t)}))})})]})}),jI=p8.config(jR),jL=(0,e5.forwardRef)((e,t)=>{let{className:n,header:o,footer:i,position:a="bottom",value:s,onChange:l,onFocus:u,onBlur:d,onKeyDown:p,enableQuerySug:m,querySugList:h,onQuerySugClick:f}=e,[_,g]=(0,e5.useState)(!1),y=m&&_&&h&&h.length>0;return(0,e3.jsxs)("div",{ref:t,className:uj()("ct-rich-text-input",n),children:[(0,e3.jsx)("div",{className:"header",children:o}),(0,e3.jsxs)("div",{className:uj()("input-container",{focus:_}),children:[(0,e3.jsx)("div",{className:"rich-text-input",contentEditable:!0,onFocus:e=>{g(!0),null==u||u(e)},onBlur:e=>{g(!1),null==d||d(e)},onChange:e=>{null==l||l(e.target.innerText)}}),(0,e3.jsx)("div",{className:"input-footer",children:i}),(0,e3.jsx)(hk.CSSTransition,{in:y,timeout:300,classNames:"query-sug",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:uj()("query-sug",a),children:(0,e3.jsx)("div",{className:"query-sug-list",children:null==h?void 0:h.map((e,t)=>(0,e3.jsx)("div",{className:"query-sug-item",onClick:()=>{null==f||f(e,t)},children:e.label},e.value))})})})]})]})}),jP=(0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()(n,"ct-ai-loading"),ref:t,children:(0,e3.jsxs)("div",{className:uj()("loading-container","short-container"),children:[(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"0s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"1s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"2s"}})]})})}),jF=p8.config(jP),jY=()=>(0,e3.jsx)("div",{className:"radio-item-icon",children:(0,e3.jsx)("div",{className:"radio-item-circle"})}),jj=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-radio",{"ct-radio-disabled":o},a),style:s,...l,children:t.map(e=>(0,e3.jsx)("div",{className:uj()("radio-item",{active:e.value===n,disabled:o||e.disabled}),onClick:()=>{var t;return t=e.value,void(!o&&!e.disabled&&i&&i(t))},onKeyDown:t=>{var n;return n=e.value,void(!o&&!e.disabled&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),i&&i(n)))},role:"radio",tabIndex:o||e.disabled?-1:0,"aria-checked":e.value===n,"aria-disabled":o||e.disabled,children:(0,e3.jsxs)("div",{className:"radio-item-content",children:[(0,e3.jsx)("div",{className:"radio-item-icon-column",children:(0,e3.jsx)(jY,{})}),(0,e3.jsx)("div",{className:"radio-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"radio-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"radio-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"radio-item-text-column",children:[(0,e3.jsx)("div",{className:"radio-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"radio-item-desc",children:e.description})]})]})},e.value))}):null}),{displayName:"Radio"}),jB=p8.config(jj),jU=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||"");e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=!!t,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-radio-group ct-radio-group-list ${i?"ct-radio-group-disabled":""}`,children:[(0,e3.jsx)(jB,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"RadioGroup"}),jz=p8.config(jU),jV=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-checkbox",{"ct-checkbox-disabled":o},a),style:s,...l,children:t.map(e=>{let t=(n||[]).indexOf(e.value)>-1;return(0,e3.jsx)("div",{className:uj()("checkbox-item",{active:t,disabled:o||e.disabled}),onClick:()=>((e,t)=>{if(o||t.disabled)return;let a=n||[],s=a.indexOf(e)>-1?a.filter(t=>t!==e):[...a,e];i&&i(s)})(e.value,e),children:(0,e3.jsxs)("div",{className:"checkbox-item-content",children:[(0,e3.jsx)("div",{className:"checkbox-item-checkbox-column",children:(0,e3.jsx)(f7,{className:"checkbox-item-checkbox",checked:t,disabled:o||e.disabled})}),(0,e3.jsx)("div",{className:"checkbox-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"checkbox-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"checkbox-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"checkbox-item-text-column",children:[(0,e3.jsx)("div",{className:"checkbox-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"checkbox-item-desc",children:e.description})]})]})},e.value)})}):null}),{displayName:"Checkbox"}),jH=p8.config(jV),jG=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||[]);e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=t.length>0,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-checkbox-group ct-checkbox-group-list ${i?"ct-checkbox-group-disabled":""}`,children:[(0,e3.jsx)(jH,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t.length>0&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"CheckboxGroup"}),jW=p8.config(jG),jK=RF(e=>{let{className:t,dataSource:n,mode:o="single",buttonCols:i=2,value:a,size:s="medium",onChange:l}=e,[u,d]=(0,e5.useState)(a),p=Array.from({length:Math.ceil(((null==n?void 0:n.length)||0)/i)},(e,t)=>{let a=t*i,p=Math.min(a+i,(null==n?void 0:n.length)||0),m=null==n?void 0:n.slice(a,p);return(null==m?void 0:m.length)?(0,e3.jsx)("div",{className:"select-row-container",children:m&&m.length?m.map((e,t)=>{if(!e)return null;let{value:n,label:a,disabled:p}=e,m="normal";"string"==typeof u&&u===n||Array.isArray(u)&&u.includes(n)?m="selected":"object"==typeof u&&"value"in u&&u.value===n&&(m="selected");let h=p;return u&&"single"===o&&"normal"===m&&(h=!0),(0,e3.jsx)(_A,{onClick:()=>((e,t)=>{if("multiple"===o)if(Array.isArray(u)){let n="normal"===t?[...u,null==e?void 0:e.value]:u.filter(t=>t!==(null==e?void 0:e.value));d(n),null==l||l(n,"itemClick")}else{let t=[null==e?void 0:e.value];d(t),null==l||l(t,"itemClick")}if("single"===o){let n="normal"===t?e:void 0;d(n),null==l||l(n,"itemClick")}})(e,m),type:"normal",disabled:h,className:`select-item ${m} row${i}`,size:s,children:a},`select_${t}`)}):null},`row_${t}`):null});return(0,e3.jsx)("div",{className:uj()("ct-select",t),children:p})},{coverStyle:!1,labelLayout:"vertical",enableHoverState:!1}),jq=RF((0,e5.forwardRef)((e,t)=>{let{className:n,size:o="medium",mode:i="single",onChange:a,...s}=e;return(0,e3.jsx)(gU,{...s,className:uj()("ct-select",n),size:o,ref:t,mode:i,onChange:a})})),j$=AG((0,e5.forwardRef)((e,t)=>{let{className:n,display:o="select",buttonCols:i=2,dataSource:a,mode:s="single",onChange:l,...u}=e;return"button"===((null==a?void 0:a.length)&&(null==a?void 0:a.length)>6?"select":o)?(0,e3.jsx)(jK,{className:n,dataSource:a,mode:s,buttonCols:i,value:u.value,onChange:l,label:u.label,required:u.required,size:"medium"}):(0,e3.jsx)(jq,{...u,className:uj()("ct-select",n),dataSource:a,ref:t,mode:s,onChange:l,label:u.label,required:u.required,size:"medium",popupClassName:uj()("ct-select-popup",u.popupClassName)})}),{displayName:"Select"}),jQ=p8.config(j$),jJ=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsx)("div",{children:"折叠面板头部"}),customHeader:a,expanded:s,onToggle:l,animated:u=!0,children:d=(0,e3.jsxs)("div",{children:[(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"})]})}=e,p=(0,e5.useRef)(null),m=(0,e5.useRef)(null),[h,f]=(0,e5.useState)(o),[_,g]=(0,e5.useState)(o),y=void 0!==s?s:h,b=(e,t)=>{var n;if(!u)return void(t?(e.style.height="auto",e.style.width="auto",g(!0)):(e.style.height="0",g(!1)));let o=e.getBoundingClientRect().height,i=e.getBoundingClientRect().width,a=(null==(n=m.current)?void 0:n.getBoundingClientRect().width)||i;if(t){e.style.height="0",e.style.width=`${a}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),e.style.height="auto";let t=e.getBoundingClientRect().height,n=e.getBoundingClientRect().width;e.style.height="0",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height=`${t}px`,e.style.width=`${n}px`});let o=()=>{e.style.height="auto",e.style.width="auto",g(!0),e.removeEventListener("transitionend",o)};e.addEventListener("transitionend",o)}else{e.style.height=`${o}px`,e.style.width=`${i}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height="0",e.style.width=`${a}px`});let t=()=>{g(!1),e.removeEventListener("transitionend",t)};e.addEventListener("transitionend",t)}};return(0,e5.useEffect)(()=>{let e=p.current;e&&(y?(g(!0),u?Promise.resolve().then(()=>{b(e,!0)}):(e.style.height="auto",e.style.width="auto")):u?b(e,!1):(e.style.height="0",g(!1)))},[y,u]),(0,e3.jsxs)("div",{className:uj()("ct-flip",n),ref:t,children:[(0,e3.jsx)("div",{className:"flip-header-container",ref:m,children:a||(0,e3.jsxs)("div",{className:"flip-header",onClick:()=>{let e=!y;null==l||l(e),void 0===s&&f(e)},children:[i,(0,e3.jsx)("span",{className:"flip-header-icon",children:(0,e3.jsx)(AJ,{type:y?"arrow-up":"arrow-down",size:"xs"})})]})}),(0,e3.jsx)("div",{className:"flip-content",ref:p,style:{height:o?"auto":0,width:o?"auto":"100%",overflow:"hidden",transition:u?void 0:"none"},children:_&&d})]})}),jX=p8.config(jJ),jZ=(0,e5.forwardRef)((e,t)=>{let{useText:n="使用",name:o,className:i,selected:a=!1,status:s,onToolClick:l,authInfo:u,fullWidth:d,param:p,groupName:m,disabled:h=!1}=e,f=a?"selected":"";return f=d?`${f} full-width`:`${f}`,f=l?`${f} enable-click`:`${f}`,(0,e3.jsxs)("div",{className:uj()(`ct-tool-status ${f} ${s} ${h?"disabled":""}`,i),ref:t,onClick:t=>{h||(t.stopPropagation(),null==l||l(e))},children:[(0,e3.jsx)(AJ,{size:"xs",type:"failed"===s?"icon-cross1":"completed"===s?"icon-check":"loading"}),u&&"auth"===s&&(0,e3.jsx)("div",{className:"next-btn-text next-btn-primary",onClick:t=>{var n;t.stopPropagation(),null==u||null==(n=u.onAuthClick)||n.call(u,e)},children:null==u?void 0:u.content}),(0,e3.jsxs)("div",{className:"content-container",children:[(0,e3.jsx)("div",{className:"content-use-tips",children:n}),m&&(0,e3.jsx)("div",{className:"content-group",children:m}),o&&(0,e3.jsx)("div",{className:"content-name",children:o}),p&&(0,e3.jsx)("div",{className:"content-detail",children:p})]})]})}),j1=p8.config(jZ),j0=AG((0,e5.forwardRef)(e=>{let{className:t,children:n,...o}=e;return(0,e3.jsx)(yJ,{...o,className:uj()("ct-collapse",t),children:n})}),{displayName:"Collapse",Panel:yJ.Panel}),j2=p8.config(j0),j3=(0,e5.forwardRef)((e,t)=>{let{className:n,size:o="small",hasBorder:i=!0,title:a,showCopyButton:s,...l}=e,[u,d]=(0,e5.useState)(!1);return(0,e3.jsxs)("div",{className:"ct-table-container",children:[a?(0,e3.jsxs)("div",{className:"ct-table-header",children:[a&&(0,e3.jsx)("div",{className:"ct-table-title",children:a}),s?(0,e3.jsx)("div",{className:"ct-table-copy-button",onClick:()=>{d(!0),setTimeout(()=>{d(!1)},3e3)},children:(0,e3.jsx)(AJ,{size:16,type:u?"icon-check":"fuzhi3"})}):null]}):null,(0,e3.jsx)(ko,{...l,ref:t,className:uj()("ct-table",{[`ct-table-${o}`]:o,"ct-table-no-border":!i},n),size:o})]})});j3.displayName="Table";let j5=p8.config(j3),j4=(0,e5.forwardRef)((e,t)=>{let{className:n,text:o,...i}=e;return(0,e3.jsxs)("div",{...i,className:uj()("ct-error-notice",n),ref:t,children:[(0,e3.jsx)("div",{className:"ct-error-notice-icon",children:(0,e3.jsx)(h2,{size:16,type:"prompt"})}),(0,e3.jsx)("span",{className:"ct-error-notice-text",children:o})]})});j4.displayName="ErrorNotice";let j6=p8.config(j4),j9=(0,e5.forwardRef)((e,t)=>{let{className:n,...o}=e;return(0,e3.jsx)("div",{...o,className:uj()("ct-document-empty",n),ref:t,children:Array.from({length:4},(e,t)=>(0,e3.jsx)("div",{className:"ct-empty-line"},t))})});j9.displayName="Empty";let j8=p8.config(j9),j7=(0,e5.forwardRef)((e,t)=>{let{className:n,title:o="",content:i,generating:a=!0,onPreview:s,onCopy:l,onDownload:u,renderDownloadAction:d,showPreviewButton:p=!0,showCopyButton:m=!0,showDownloadButton:h=!0,contentHeight:f=128,..._}=e,g=f-25,y=(0,e5.useRef)(null),[b,E]=(0,e5.useState)(0),[S,T]=(0,e5.useState)(!1),[C,k]=(0,e5.useState)(()=>f>128?128:f),x=e=>{let t=Array.from(e.children);return 0===t.length?e:x(t[t.length-1])},w=(0,e5.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),n=x(e);if(!n)return;let o=n.getBoundingClientRect(),i=o.top-t.top,s=a?i+o.height:i+o.height+20;if(f>128&&C<f){let e=C-25;if(s>e)return void k(Math.min(f,C+(s-e)))}if(!(s+b<g&&i+b>0))return void E(-i)},[b,f,C,a]),N=Rv(w,200);(0,e5.useEffect)(()=>{w()},[a]),(0,e5.useEffect)(()=>{if("string"==typeof i)return void N();if(!y.current)return;let e=new MutationObserver(()=>{N()});return e.observe(y.current,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[i,N]);let D=e=>{o&&p&&s&&(e.stopPropagation(),null==s||s())},O=e=>{e.stopPropagation()};return(0,e3.jsxs)("div",{..._,className:uj()("ct-document",{"ct-document-generating":a},n),ref:t,onClick:D,children:[o?(0,e3.jsxs)("div",{className:"ct-document-header",children:[(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)(AJ,{type:"document",className:"ct-document-header-icon"}),(0,e3.jsx)("span",{className:uj()("ct-document-header-title"),children:o})]}),(0,e3.jsxs)("div",{className:uj()("ct-document-header-actions"),children:[(0,e3.jsxs)("div",{className:uj()("ct-document-header-preview",{"ct-document-header-preview-display-none":!p||!s,"ct-document-header-preview-generating":a}),onClick:D,children:[(0,e3.jsx)(AJ,{type:"preview",className:"ct-document-header-preview-icon"}),(0,e3.jsx)("span",{className:"ct-document-header-preview-text",children:"预览"})]}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-copy",{"ct-document-header-action-copy-generating":a,"ct-document-header-action-copy-display-none":!m||!l}),onClick:e=>{e.stopPropagation(),null==l||l(),T(!0),setTimeout(()=>{T(!1)},3e3)},title:"复制",children:(0,e3.jsx)(AJ,{type:S?"icon-check":"fuzhi3",className:"ct-document-header-action-icon"})}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-download",{"ct-document-header-action-download-generating":a,"ct-document-header-action-download-display-none":!h||!d&&!u}),onClick:d?O:e=>{e.stopPropagation(),null==u||u()},title:d?void 0:"下载",children:d?d():(0,e3.jsx)(AJ,{type:"download",className:"ct-document-header-action-icon"})})]})]}):(0,e3.jsx)("div",{className:"ct-document-header",children:(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)("div",{className:"ct-document-header-left-icon-empty"}),(0,e3.jsx)("div",{className:"ct-document-header-left-title-empty"})]})}),i?(0,e3.jsxs)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),style:{height:C},children:[(0,e3.jsx)("div",{className:"ct-document-mask"}),(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)("div",{ref:y,className:"ct-document-content-text",style:{transform:`translateY(${a?b:0}px)`},onClick:O,children:i})})]}):(0,e3.jsx)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),children:(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)(j8,{})})})]})});j7.displayName="Document";let Be=p8.config(j7),Bt="0.3.61",Bn=e=>{let{globalExpandCode:t}=e,[n,o]=(0,e5.useState)(!1),[i,a]=(0,e5.useState)(t);(0,e5.useEffect)(()=>{o(!0)},[]),(0,e5.useEffect)(()=>{a(t)},[t]);let s=e.docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{}),l=(0,iZ.kebabCase)(e.demoKey),d=`${l}-container`;return(0,e3.jsxs)("div",{id:d,className:"next-demo-item scroll-count-item",children:[(0,e3.jsxs)("div",{id:`${l}-desc`,className:"demo-item-desc markdown",children:[(0,e3.jsx)(i1,{id:d,title:s["@demo"],component:"h3"}),(0,e3.jsx)("div",{className:"demo-item-desc-body markdown",children:(0,e3.jsx)(ob,{remarkPlugins:[iA],children:s["@remarks"]})})]}),(0,e3.jsxs)(uR,{disabled:e.disabled,code:e.sourceCode,scope:{mountNode:document.querySelector(`#${l}-mount`),require:e=>{let t={"@alifd/chat":e2,"@alifd/next":e$,"react-dom":e6,"styled-components":eQ,react:e4(),classnames:uj()},n=e.match(/^@alifd\/chat\/(es|lib)\/(.*)\/style$/);return n&&u(64615)(`./${n[2]}/style`),t[e]}},noInline:!0,children:[(0,e3.jsx)("div",{id:`${l}-mount`,className:"next-demo-mount",children:n?(0,e3.jsx)(uL,{}):null}),n?(0,e3.jsx)(uF,{}):null,(0,e3.jsx)("div",{id:`${l}-operations`,className:"demo-item-operations",style:{borderBottom:"1px dashed rgb(238, 238, 238)"},children:(0,e3.jsx)("div",{id:`${l}-fold-code`,className:"code-box-code-action code-expand-icon-hide",children:(0,e3.jsxs)(fl.Tooltip,{align:"b",style:{maxWidth:400},trigger:(0,e3.jsx)("span",{id:`${l}-icon-hide`,onClick:()=>{a(!i)},children:(0,e3.jsx)("svg",{width:20,height:20,viewBox:"0 0 20 20",style:{fill:"#3B9AFF"},children:(0,e3.jsx)("path",{transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961)",d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z"})})}),children:["收起代码",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),"小提示:",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"1. 点击一下代码,试一试在线编辑预览吧!"}),(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"2. 页面右上方 有 全局代码展开 及 开启在线编辑 模式哟~"})]})})}),(0,e3.jsx)("div",{id:`${l}-body`,className:"next-demo-body",style:{display:i?"block":"none"},children:(0,e3.jsx)("div",{id:`${l}-live-editor`,children:(0,e3.jsx)("div",{id:`${l}-live-body`,className:"react-live-body",children:(0,e3.jsx)(uI,{theme:{plain:{},styles:[{types:[],style:{}}]}})})})})]})]})},Br=e=>{let{defaultLiveDemo:t=!0,defaultExpandCode:n=!0,onToggleExpandCode:o,onToggleLiveDemo:i,data:a=[]}=e,[s,l]=(0,e5.useState)(n),[u,d]=(0,e5.useState)(t),p={viewBox:"0 0 16 16",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","aria-haspopup":"true","aria-expanded":"false",style:{width:20,height:20,padding:2}};return(0,e3.jsxs)("div",{className:"demo-index",children:[(0,e3.jsxs)("span",{id:"global-control",className:"all-demo-box-controls",children:[(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"live-demo",role:"img","aria-label":"edit",className:"code-box-expand-trigger",onClick:()=>{d(!u),"function"==typeof i&&i(!u)},children:[(0,e3.jsx)("svg",{...p,"data-icon":"edit",id:"live-on",style:{...p.style,display:u?"none":"block"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})}),(0,e3.jsx)("svg",{...p,id:"live-off","data-icon":"edit",style:{...p.style,display:u?"block":"none"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})})]}),children:"使用预览模式"}),(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"expand-all",role:"img","aria-label":"code",className:"code-box-expand-trigger","aria-haspopup":"true","aria-expanded":"false",onClick:()=>{l(!s),"function"==typeof o&&o(!s)},children:[(0,e3.jsx)("svg",{...p,id:"all-not-expand","data-icon":"code",style:{...p.style,display:s?"none":"block"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})}),(0,e3.jsx)("svg",{...p,id:"all-expanded","data-icon":"code",style:{...p.style,display:s?"block":"none"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})})]}),children:"展开所有代码"})]}),(0,e3.jsx)("ul",{className:"demo-index-list",children:a.map(e=>(0,e3.jsx)("li",{className:"demo-index-item","data-id":e.id,children:(0,e3.jsx)("a",{href:`#${e.id}`,children:e.title})},e.id))})]})};e6.render((0,e3.jsx)(()=>{var e;let[t,n]=(0,e5.useState)(!0),[o,i]=(0,e5.useState)(!1),a={basic:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { CardLoading } from "@alifd/chat";\nimport "@alifd/chat/es/card-loading/style";\nReactDOM.render(\n <div className="card-loading-basic-demo">\n <CardLoading />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"CardLoading 组件的基本用法。\n- Basic usage of `CardLoading`"},{tag:"@demo",content:"基本使用"},{tag:"@en",content:"Basic"},{tag:"@order",content:"1"}]}}},s=[{tag:"@component",content:"CardLoading"},{tag:"@en",content:"CardLoading"},{tag:"@type",content:"通用 - General"},{tag:"@when",content:"CardLoading"}].reduce((e,t)=>(e[t.tag]=t.content,e),{}),l={id:"demo-list",title:"代码演示"},u=Object.keys(a).sort((e,t)=>{var n,o,i,s;return parseInt((null==(o=a[e].docInfo.tags)||null==(n=o.find(e=>"@order"===e.tag))?void 0:n.content)||"0")-parseInt((null==(s=a[t].docInfo.tags)||null==(i=s.find(e=>"@order"===e.tag))?void 0:i.content)||"0")}),d=[...s["@when"]?[{id:"何时使用",title:"何时使用"}]:[],l,...u.map(e=>{let t=(0,iZ.kebabCase)(e);return{id:`${t}-container`,title:a[e].docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{})["@demo"]}})];return(0,e3.jsxs)("div",{className:"demo-wrapper",children:[(0,e3.jsx)("div",{className:"demo-title markdown",children:(0,e3.jsx)("h1",{children:s["@en"]})}),(0,e3.jsx)(Br,{defaultExpandCode:o,defaultLiveDemo:t,onToggleLiveDemo:n,onToggleExpandCode:i,data:d}),(0,e3.jsx)("div",{className:"demo-head",children:(0,e3.jsxs)("div",{id:"demo-area",className:"next-demo-section",children:[(0,e3.jsxs)("div",{id:"md-area-former",className:"markdown-body markdown",children:[(0,e3.jsx)("div",{id:"demo-guide",className:"scroll-count-item active"}),(0,e3.jsx)("p",{children:i2(s["@remarks"])}),(e=s["@when"])?(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(i1,{id:"何时使用",title:"何时使用"}),(0,e3.jsx)("ul",{children:(0,e3.jsx)("li",{children:i2(e)})})]}):null,(0,e3.jsx)(i1,{...l})]}),u.map((e,n)=>(0,e5.createElement)(Bn,{disabled:!t,globalExpandCode:o,...a[e],demoKey:e,key:n})),(0,e3.jsx)("div",{id:"md-area-latter",className:"markdown-body markdown",children:(0,e3.jsxs)("div",{id:"demo-api","data-scroll-id":"demo-api",className:"scroll-count-item active",children:[(0,e3.jsx)(i1,{id:"API",title:"API"}),[].map(e=>(0,e5.createElement)(i0,{...e,key:e.title})),s["@others"]?(0,e3.jsx)(ob,{remarkPlugins:[iA],rehypePlugins:[iq,[ij,{behavior:"append",content:()=>[iX("span",{},["#"])],properties:{className:"header-anchor scroll-count-item"}}]],children:s["@others"]}):null]})})]})})]})},{}),document.getElementById("root"))})()})();
|
|
136
|
+
如何解决这个问题?如果你能提供修复方案,请保持简洁。`;i&&i(e)}},children:"使用对话修复"})})]})})}):(0,e3.jsx)("div",{className:"ct-mermaid-view-content",children:(0,e3.jsx)("div",{ref:a,className:"ct-mermaid-view-chart"})}),d&&(0,e3.jsx)("div",{className:"ct-mermaid-view-loading",children:(0,e3.jsx)(E4,{size:"medium"})})]})});jc.displayName="MermaidView";let ju=p8.config(jc),jd=[{emotionVersion:"75",emotionId:"emotion_180001",dynamicEmotionId:"",showType:1,skinList:[],name:"[魔法棒]",names:{en_US:"[Magic Wand]",ja_JP:"[魔棒]",vi_VN:"[đũa ph\xe9p]",zh_CN:"[魔法棒]",zh_HK:"[魔法棒]",zh_TW:"[魔法棒]"},url:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",staticURL:"https://img.alicdn.com/imgextra/i4/O1CN01a4VODa1vAyAFlqg4H_!!6000000006133-2-tps-96-96.png",fallbacks:[]}],jp="",jm=["img","code","pre","link-reference","link-reference-group"],jh=["link-reference-group"],jf=AG((0,e5.forwardRef)(e=>{let{className:t,onReady:n,content:o,needCodeHeader:i=!0,theme:a="light",enableSourcePos:s=!1,sendTextMessage:l,...u}=e,[d,p]=(0,e5.useState)([]);function m(e,t){let n;if(!e)return[];let o=[...jm,...t||[]],i=/\[[^\]]*\]\([^)]*\)/g,a=o.length>0?RegExp(`<(${o.join("|")}).*?>.*?<\\/\\1>`,"gs"):null,s=[],l=0,u=[];for(;null!==(n=i.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});if(a)for(a.lastIndex=0;null!==(n=a.exec(e));)u.push({start:n.index,end:n.index+n[0].length,content:n[0]});for(let t of(u.sort((e,t)=>e.start-t.start),u))t.start>l&&s.push(...e.substring(l,t.start).split("")),s.push(t.content),l=t.end;return l<e.length&&s.push(...e.substring(l).split("")),s}(0,e5.useEffect)(()=>{Y7(),je().then(e=>{p(()=>[...jd,...e])}),null==n||n()},[n]);let h=(0,e5.useRef)(null),[f,_]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?jp:o),[g,y]=(0,e5.useState)(()=>(null==u?void 0:u.typewriterEffect)?m(o,u.whitelistTags):[]),[b,E]=(0,e5.useState)(0),S=(0,e5.useRef)(null),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)};(0,e5.useEffect)(()=>{if(T(),!(null==u?void 0:u.typewriterEffect)){_(o),y([]);return}let e=m(o,u.whitelistTags);if(b>=e.length)_(o),E(e.length),y([]);else{let t=e.slice(0,b),n=e.slice(b);_(t.join("")),y(n)}},[o,null==u?void 0:u.typewriterEffect,null==u?void 0:u.whitelistTags]),(0,e5.useEffect)(()=>{if(!(null==u?void 0:u.typewriterEffect)||0===g.length)return void T();let e=Math.max(Math.floor(g.length/10),2),t=()=>{y(t=>{if(0===t.length)return t;let n=t.slice(0,e),o=t.slice(e);return _(e=>e+n.join("")),E(t=>t+e),o})};return T(),t(),S.current=setTimeout(()=>{let e=()=>{t(),S.current=setTimeout(e,50)};e()},50),T},[g.length,null==u?void 0:u.typewriterEffect]);let C=(0,e5.useMemo)(()=>{jp=f;let e={common_hypertitle_text_style__font_size:"h1",common_largetitle_text_style__font_size:"h1",common_h1_text_style__font_size:"h1",common_h2_text_style__font_size:"h2",common_h3_text_style__font_size:"h3",common_h4_text_style__font_size:"h4",common_h5_text_style__font_size:"h5",common_body_text_style__font_size:"span",common_footnote_text_style__font_size:"span"};return f.replace(/<font\s+([^>]+)>([^<]+)<\/font>/g,(t,n,o)=>{let i="",a="",s="",l=n.match(/sizeToken=([\w_]+)/),u=n.match(/colorTokenV2=([\w_]+)/),d=n.match(/color=([\w_]+)/),p=n.match(/color=(?:"|')?(#[0-9a-fA-F]{3,8})(?:"|')?/);l&&(i=l[1].replace(/-/g,"_")),u&&(a=u[1].replace(/-/g,"_")),!a&&d&&(a=d[1].replace(/-/g,"_")),!a&&p&&(s=p[1]);let m=[];i&&m.push(`font-size: var(--${i})`),a?m.push(`color: var(--${a})`):s&&m.push(`color: ${s}`);let h=m.join("; "),f=e[i]||"span";return`<${f} style="${h}" class="markdownFont">${o}</${f}>`})},[f]),k=(0,e5.useMemo)(()=>jt(C,{genFrame:(e,t)=>({htmlTag:"img",selfClose:!0,attr:{draggable:"false",style:"vertical-align: text-center; display: inline-block; pointer-events: none;",class:"emoji",title:`[${e}]`,src:t.url||t.staticURL||"",alt:e}}),emotionList:d}),[C,d]),x=(0,e5.useMemo)(()=>{let e=new Fp({html:!0,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&(null==jr?void 0:jr.getLanguage(t)))try{return null==jr?void 0:jr.highlight(t,e,!0).value}catch(e){}return""}});if(s&&e.use(e=>{e.core.ruler.push("add_source_pos",e=>{e.tokens.forEach(e=>{if(e.map){let[t,n]=e.map;e.attrSet("data-source-start-line",String(t)),e.attrSet("data-source-end-line",String(n))}})})}),e.linkify.add("dingtalk:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),e.linkify.add("dtmd:",{validate:/^[^\s]+/,normalize:e=>{e.url=e.raw}}),k=(k=(k=k.replace(///g,"/")).replace(/'/g,"'")).replace(/(!\[[^\]]*\]\((\/\/[^\s)]+)\))/g,(e,t,n)=>e.replace(n,`https:${n}`)),!i)return{html:e.render(k),codeBlocks:[]};let t=[],n=0;return e.renderer.rules.fence=(e,o)=>{let i=e[o],a=i.info.trim()||"plaintext",s=i.content,l=`code-block-${n++}`,u=!0,d=i.map;d&&(k.split("\n")[d[1]-1].trim().endsWith("```")||(u=!1));let p="mermaid"===a?"mermaid":"code";return t.push({language:a,code:s,id:l,isComplete:u}),`<div data-code-block-id="${l}" data-block-type="${p}"></div>`},{html:(e=>{let t=e;try{jh.forEach(e=>{t=t.replace(RegExp(`<${e}([^>]*)\\/?>`,"g"),`<${e}$1></${e}>`)})}catch(e){}return t})(e.render(k)),codeBlocks:t}},[k,i,s]),w=(null==u?void 0:u.generating)?"ct-markdown generating":"ct-markdown";return(0,e3.jsxs)("div",{ref:h,className:uj()(w,`ct-hljs-${a}`,t),children:[(()=>{if(!i||0===x.codeBlocks.length)return(0,e3.jsx)(Lr,{...u,children:x.html});let e=x.html.split(/(<div[^>]*data-code-block-id="[^"]*"[^>]*><\/div>)/),t=[],n=0;for(let o of e)if(o.includes("data-code-block-id")){let e=x.codeBlocks[n];e&&("mermaid"===e.language?t.push((0,e3.jsxs)("div",{children:[e.isComplete&&(0,e3.jsx)(ju,{code:e.code,showCopyButton:!1,theme:a,sendTextMessage:l}),(0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)]},e.id)):t.push((0,e3.jsx)(ji,{code:e.code,language:e.language,showCopyButton:!0,theme:a},e.id)),n++)}else o.trim()&&t.push((0,e3.jsx)(Lr,{...u,children:o},`html-${t.length}`));return(0,e3.jsx)(e3.Fragment,{children:t})})(),(()=>{let{generating:e}=u||{};return!e||x.html?null:(0,e3.jsx)("img",{width:20,height:10,src:"https://img.alicdn.com/imgextra/i1/O1CN01wdlADU1WCvOLNSB3w_!!6000000002753-1-tps-530-255.gif",alt:""})})()]})}),{displayName:"Markdown"}),j_=p8.config(jf),jg=AG((0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()("ct-card-loading",n),children:"卡片加载中"})}),{displayName:"CardLoading"}),jy=p8.config(jg),jb=AG((0,e5.forwardRef)((e,t)=>{let{className:n,text:o}=e;return(0,e3.jsx)("div",{className:uj()("ct-origin",n),children:(0,e3.jsx)("div",{className:"origin-tip-inner",children:o})})}),{displayName:"Origin"}),jv=p8.config(jb),jE=AG((0,e5.forwardRef)((e,t)=>{let{className:n,indicator:o,shape:i="default",size:a="large",...s}=e,l={...s,size:a};if(!o&&i&&"default"!==i){let e=`load-container ${i}`;l.indicator=(0,e3.jsx)("div",{className:e,children:(0,e3.jsx)("div",{className:"loader"})})}return(0,e3.jsx)(E4,{...l,ref:t,className:uj()(`ct-loading ${a} ${i}`,n)})}),{displayName:"Loading"}),jS=p8.config(jE),jT=AG((0,e5.forwardRef)((e,t)=>{let{className:n,headerStyle:o,children:i,footer:a,footerClassName:s,placement:l,...u}=e;return(0,e3.jsxs)(vB,{...u,v2:!0,ref:t,placement:l,headerStyle:{"border-bottom:":"1px solid var(--40gmM)",...o},className:uj()(`ct-drawer ${l}`,n),children:[i,a&&a.length&&(0,e3.jsx)("div",{className:uj()("draw-footer",s),children:a})]})}),{displayName:"Drawer"}),jC=p8.config(jT),jk=AG((0,e5.forwardRef)((e,t)=>{let{className:n,shape:o="dot",showStatus:i=!0,current:a=0,stepsList:s=[],defaultCollapsed:l=!1,collapsedSteps:u=1,collapsedMore:d=(0,e3.jsxs)("div",{children:["查看更多",(0,e3.jsx)(h2,{type:"arrow-down",size:"xxs",style:{marginLeft:2}})]}),size:p="large",...m}=e,[h,f]=(0,e5.useState)([]),[_,g]=(0,e5.useState)(l);return((0,e5.useEffect)(()=>{f(s.map((e,t)=>_&&u<t+1?null:(0,e3.jsx)(TK.Item,{title:e.title,content:e.content,status:i?void 0:"wait"},t)))},[_,u,s]),0===s.length)?null:(0,e3.jsx)("div",{className:uj()("ct-step",`ct-step-${p}`,n,_&&"ct-step-collapsed"),...m,ref:t,children:(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(TK,{current:a,shape:o,labelPlacement:"hoz",direction:"ver",readOnly:!0,children:h}),_&&s.length>u&&(0,e3.jsx)("div",{className:"ct-step-collapsed-more",onClick:()=>g(!_),children:(0,e3.jsx)("div",{className:"ct-step-collapsed-more-content",children:d})})]})})}),{displayName:"Step"}),jx=p8.config(jk);var jw=((eC={}).Generating="generating",eC.Stopped="stopped",eC);let jN="停止生成",jD=AG((0,e5.forwardRef)((e,t)=>{let{className:n,show:o=!0,status:i=jw.Generating,stopText:a=jN,stopIcon:s,stoppedText:l,onStop:u}=e;return o?(0,e3.jsxs)("div",{className:uj()("ct-stop-generate",n),children:[i===jw.Generating&&(0,e3.jsxs)("div",{className:"stop-generate-area",onClick:()=>{u&&u()},children:[(0,e3.jsx)("img",{src:s||"https://img.alicdn.com/imgextra/i2/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg"}),a||jN]}),i===jw.Stopped&&(0,e3.jsx)("div",{className:"stopped-generate-text",children:l||"已停止生成"})]}):null}),{displayName:"StopGenerate"}),jO=p8.config(jD),jM=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i,listItems:a=[],onExpandedClick:s,onItemClick:l,mode:u="simple",onHeaderClose:d,onHeaderClick:p,onContentClick:m,expanded:h}=e,[f,_]=(0,e5.useState)(h||o);(0,e5.useEffect)(()=>{void 0!==h&&h!==f&&_(h)},[h]);let g=(e,t,n)=>{if(n.stopPropagation(),l){null==l||l(e,t);return}(null==e?void 0:e.url)&&window.open(null==e?void 0:e.url,"_blank")},y=f?"expand":"";return(0,e3.jsxs)("div",{className:uj()(`ct-reference ${u} ${y}`,n),ref:t,children:[(()=>{if(!1===i)return null;if("detail"===u){if(!1===i)return null;let e=(null==i?void 0:i.icon)||"close",t=(null==i?void 0:i.title)||"引用信息";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,children:[(0,e3.jsx)("div",{className:"reference-text",children:t}),(0,e3.jsx)("div",{className:"reference-close",onClick:()=>{null==d||d()},children:AX(e,"xs")})]})}let e=(null==i?void 0:i.icon)||"https://img.alicdn.com/imgextra/i3/O1CN01hpxNXz26hRw9Jz4O1_!!6000000007693-55-tps-200-200.svg";return(0,e3.jsxs)("div",{className:`reference-header ${u}`,onClick:e=>{(e.stopPropagation(),p)?p(!f):_(!f)},children:[(0,e3.jsxs)("div",{className:"reference-name",children:[AX(e),(0,e3.jsx)("div",{className:"reference-title",children:null==i?void 0:i.title})]}),(0,e3.jsx)("div",{className:"reference-operate",onClick:e=>{(e.stopPropagation(),s)?s(!f):_(!f)},children:(0,e3.jsx)(AJ,{type:f?"arrow-up":"arrow-down",size:"xs"})})]})})(),a&&0!==a.length&&(f||"simple"!==u)?(0,e3.jsxs)("div",{className:`reference-list ${u}`,onClick:e=>{e.stopPropagation(),null==m||m(f)},children:[f&&"simple"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("div",{className:"reference-text",onClick:n=>g(e,t,n),children:null==e?void 0:e.name}),(null==e?void 0:e.modifyTime)&&!1]},t)),"detail"===u&&a.map((e,t)=>(0,e3.jsxs)("div",{className:"reference-item",onClick:n=>g(e,t,n),children:[(0,e3.jsxs)("div",{className:"reference-title",children:[(0,e3.jsxs)("div",{className:"reference-name",children:[(0,e3.jsx)("span",{className:"reference-item-index",children:t+1}),(null==e?void 0:e.sourceIcon)&&AX(null==e?void 0:e.sourceIcon),(0,e3.jsx)("span",{children:null==e?void 0:e.name})]}),(null==e?void 0:e.modifyTime)&&!1]}),(null==e?void 0:e.content)&&(0,e3.jsx)("div",{className:"reference-content",children:null==e?void 0:e.content})]},t))]}):null]})}),jA=p8.config(jM),jR=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsxs)("div",{children:["相关问题",(0,e3.jsx)(h2,{type:"arrow-right",size:"xxs",style:{marginLeft:2}})]}),expanded:a,recommendList:s=[],onToggle:l,onItemClick:u}=e,[d,p]=(0,e5.useState)(o),m=void 0!==a?a:d;return(0,e3.jsxs)("div",{className:uj()("ct-recommend",n),ref:t,children:[(0,e3.jsx)("div",{className:"recommend-header",onClick:()=>{void 0===a&&p(!m),null==l||l(!m)},children:i}),(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:0,exit:400},classNames:"recommend-list",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:"recommend-list",children:s.map((e,t)=>(0,e3.jsx)("div",{className:"recommend-container",children:(0,e3.jsx)(hk.CSSTransition,{in:m,timeout:{enter:100*t,exit:0},classNames:"recommend-item",unmountOnExit:!0,appear:!0,children:(0,e3.jsx)("div",{className:"recommend-item",onClick:()=>{null==u||u(e,t)},children:e.title||e.name||e.text})},t)}))})})]})}),jI=p8.config(jR),jL=(0,e5.forwardRef)((e,t)=>{let{className:n,header:o,footer:i,position:a="bottom",value:s,onChange:l,onFocus:u,onBlur:d,onKeyDown:p,enableQuerySug:m,querySugList:h,onQuerySugClick:f}=e,[_,g]=(0,e5.useState)(!1),y=m&&_&&h&&h.length>0;return(0,e3.jsxs)("div",{ref:t,className:uj()("ct-rich-text-input",n),children:[(0,e3.jsx)("div",{className:"header",children:o}),(0,e3.jsxs)("div",{className:uj()("input-container",{focus:_}),children:[(0,e3.jsx)("div",{className:"rich-text-input",contentEditable:!0,onFocus:e=>{g(!0),null==u||u(e)},onBlur:e=>{g(!1),null==d||d(e)},onChange:e=>{null==l||l(e.target.innerText)}}),(0,e3.jsx)("div",{className:"input-footer",children:i}),(0,e3.jsx)(hk.CSSTransition,{in:y,timeout:300,classNames:"query-sug",unmountOnExit:!0,children:(0,e3.jsx)("div",{className:uj()("query-sug",a),children:(0,e3.jsx)("div",{className:"query-sug-list",children:null==h?void 0:h.map((e,t)=>(0,e3.jsx)("div",{className:"query-sug-item",onClick:()=>{null==f||f(e,t)},children:e.label},e.value))})})})]})]})}),jP=(0,e5.forwardRef)((e,t)=>{let{className:n}=e;return(0,e3.jsx)("div",{className:uj()(n,"ct-ai-loading"),ref:t,children:(0,e3.jsxs)("div",{className:uj()("loading-container","short-container"),children:[(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"0s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"1s"}}),(0,e3.jsx)("div",{className:uj()("short-bar","short-to-long"),style:{animationDelay:"2s"}})]})})}),jF=p8.config(jP),jY=()=>(0,e3.jsx)("div",{className:"radio-item-icon",children:(0,e3.jsx)("div",{className:"radio-item-circle"})}),jj=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-radio",{"ct-radio-disabled":o},a),style:s,...l,children:t.map(e=>(0,e3.jsx)("div",{className:uj()("radio-item",{active:e.value===n,disabled:o||e.disabled}),onClick:()=>{var t;return t=e.value,void(!o&&!e.disabled&&i&&i(t))},onKeyDown:t=>{var n;return n=e.value,void(!o&&!e.disabled&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),i&&i(n)))},role:"radio",tabIndex:o||e.disabled?-1:0,"aria-checked":e.value===n,"aria-disabled":o||e.disabled,children:(0,e3.jsxs)("div",{className:"radio-item-content",children:[(0,e3.jsx)("div",{className:"radio-item-icon-column",children:(0,e3.jsx)(jY,{})}),(0,e3.jsx)("div",{className:"radio-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"radio-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"radio-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"radio-item-text-column",children:[(0,e3.jsx)("div",{className:"radio-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"radio-item-desc",children:e.description})]})]})},e.value))}):null}),{displayName:"Radio"}),jB=p8.config(jj),jU=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||"");e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=!!t,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-radio-group ct-radio-group-list ${i?"ct-radio-group-disabled":""}`,children:[(0,e3.jsx)(jB,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"RadioGroup"}),jz=p8.config(jU),jV=AG((0,e5.forwardRef)(e=>{let{options:t,value:n,disabled:o,onChange:i,className:a,style:s,...l}=e;return t&&0!==t.length?(0,e3.jsx)("div",{className:uj()("ct-checkbox",{"ct-checkbox-disabled":o},a),style:s,...l,children:t.map(e=>{let t=(n||[]).indexOf(e.value)>-1;return(0,e3.jsx)("div",{className:uj()("checkbox-item",{active:t,disabled:o||e.disabled}),onClick:()=>((e,t)=>{if(o||t.disabled)return;let a=n||[],s=a.indexOf(e)>-1?a.filter(t=>t!==e):[...a,e];i&&i(s)})(e.value,e),children:(0,e3.jsxs)("div",{className:"checkbox-item-content",children:[(0,e3.jsx)("div",{className:"checkbox-item-checkbox-column",children:(0,e3.jsx)(f7,{className:"checkbox-item-checkbox",checked:t,disabled:o||e.disabled})}),(0,e3.jsx)("div",{className:"checkbox-item-image-column",children:e.image&&(0,e3.jsx)("div",{className:"checkbox-item-image",children:(0,e3.jsx)("img",{src:e.image,alt:"",className:"checkbox-item-image-inner"})})}),(0,e3.jsxs)("div",{className:"checkbox-item-text-column",children:[(0,e3.jsx)("div",{className:"checkbox-item-title",children:e.label}),e.description&&(0,e3.jsx)("div",{className:"checkbox-item-desc",children:e.description})]})]})},e.value)})}):null}),{displayName:"Checkbox"}),jH=p8.config(jV),jG=AG((0,e5.forwardRef)(e=>{if(!e.options||0===e.options.length)return null;let[t,n]=(0,e5.useState)(e.value||[]);e4().useEffect(()=>{void 0!==e.value&&n(e.value)},[e.value]);let o=t.length>0,i=e.disabled;return(0,e3.jsxs)("div",{className:`ct-checkbox-group ct-checkbox-group-list ${i?"ct-checkbox-group-disabled":""}`,children:[(0,e3.jsx)(jH,{options:e.options,value:t,onChange:t=>{!e.disabled&&(n(t),e.onChange&&e.onChange(t))},disabled:i}),(0,e3.jsx)(A3,{type:"primary",className:"confirm-button",size:"medium",disabled:!o||e.disabled,onClick:()=>{!e.disabled&&t.length>0&&e.onConfirm&&e.onConfirm(t)},children:e.confirmButtonText||"确 认"})]})}),{displayName:"CheckboxGroup"}),jW=p8.config(jG),jK=RF(e=>{let{className:t,dataSource:n,mode:o="single",buttonCols:i=2,value:a,size:s="medium",onChange:l}=e,[u,d]=(0,e5.useState)(a),p=Array.from({length:Math.ceil(((null==n?void 0:n.length)||0)/i)},(e,t)=>{let a=t*i,p=Math.min(a+i,(null==n?void 0:n.length)||0),m=null==n?void 0:n.slice(a,p);return(null==m?void 0:m.length)?(0,e3.jsx)("div",{className:"select-row-container",children:m&&m.length?m.map((e,t)=>{if(!e)return null;let{value:n,label:a,disabled:p}=e,m="normal";"string"==typeof u&&u===n||Array.isArray(u)&&u.includes(n)?m="selected":"object"==typeof u&&"value"in u&&u.value===n&&(m="selected");let h=p;return u&&"single"===o&&"normal"===m&&(h=!0),(0,e3.jsx)(_A,{onClick:()=>((e,t)=>{if("multiple"===o)if(Array.isArray(u)){let n="normal"===t?[...u,null==e?void 0:e.value]:u.filter(t=>t!==(null==e?void 0:e.value));d(n),null==l||l(n,"itemClick")}else{let t=[null==e?void 0:e.value];d(t),null==l||l(t,"itemClick")}if("single"===o){let n="normal"===t?e:void 0;d(n),null==l||l(n,"itemClick")}})(e,m),type:"normal",disabled:h,className:`select-item ${m} row${i}`,size:s,children:a},`select_${t}`)}):null},`row_${t}`):null});return(0,e3.jsx)("div",{className:uj()("ct-select",t),children:p})},{coverStyle:!1,labelLayout:"vertical",enableHoverState:!1}),jq=RF((0,e5.forwardRef)((e,t)=>{let{className:n,size:o="medium",mode:i="single",onChange:a,...s}=e;return(0,e3.jsx)(gU,{...s,className:uj()("ct-select",n),size:o,ref:t,mode:i,onChange:a})})),j$=AG((0,e5.forwardRef)((e,t)=>{let{className:n,display:o="select",buttonCols:i=2,dataSource:a,mode:s="single",onChange:l,...u}=e;return"button"===((null==a?void 0:a.length)&&(null==a?void 0:a.length)>6?"select":o)?(0,e3.jsx)(jK,{className:n,dataSource:a,mode:s,buttonCols:i,value:u.value,onChange:l,label:u.label,required:u.required,size:"medium"}):(0,e3.jsx)(jq,{...u,className:uj()("ct-select",n),dataSource:a,ref:t,mode:s,onChange:l,label:u.label,required:u.required,size:"medium",popupClassName:uj()("ct-select-popup",u.popupClassName)})}),{displayName:"Select"}),jQ=p8.config(j$),jJ=(0,e5.forwardRef)((e,t)=>{let{className:n,defaultExpanded:o=!1,header:i=(0,e3.jsx)("div",{children:"折叠面板头部"}),customHeader:a,expanded:s,onToggle:l,animated:u=!0,children:d=(0,e3.jsxs)("div",{children:[(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"}),(0,e3.jsx)("div",{children:"折叠面板内容"})]})}=e,p=(0,e5.useRef)(null),m=(0,e5.useRef)(null),[h,f]=(0,e5.useState)(o),[_,g]=(0,e5.useState)(o),y=void 0!==s?s:h,b=(e,t)=>{var n;if(!u)return void(t?(e.style.height="auto",e.style.width="auto",g(!0)):(e.style.height="0",g(!1)));let o=e.getBoundingClientRect().height,i=e.getBoundingClientRect().width,a=(null==(n=m.current)?void 0:n.getBoundingClientRect().width)||i;if(t){e.style.height="0",e.style.width=`${a}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),e.style.height="auto";let t=e.getBoundingClientRect().height,n=e.getBoundingClientRect().width;e.style.height="0",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height=`${t}px`,e.style.width=`${n}px`});let o=()=>{e.style.height="auto",e.style.width="auto",g(!0),e.removeEventListener("transitionend",o)};e.addEventListener("transitionend",o)}else{e.style.height=`${o}px`,e.style.width=`${i}px`,e.style.transition="height 0.3s ease, width 0.3s ease",e.getBoundingClientRect(),requestAnimationFrame(()=>{e.style.height="0",e.style.width=`${a}px`});let t=()=>{g(!1),e.removeEventListener("transitionend",t)};e.addEventListener("transitionend",t)}};return(0,e5.useEffect)(()=>{let e=p.current;e&&(y?(g(!0),u?Promise.resolve().then(()=>{b(e,!0)}):(e.style.height="auto",e.style.width="auto")):u?b(e,!1):(e.style.height="0",g(!1)))},[y,u]),(0,e3.jsxs)("div",{className:uj()("ct-flip",n),ref:t,children:[(0,e3.jsx)("div",{className:"flip-header-container",ref:m,children:a||(0,e3.jsxs)("div",{className:"flip-header",onClick:()=>{let e=!y;null==l||l(e),void 0===s&&f(e)},children:[i,(0,e3.jsx)("span",{className:"flip-header-icon",children:(0,e3.jsx)(AJ,{type:y?"arrow-up":"arrow-down",size:"xs"})})]})}),(0,e3.jsx)("div",{className:"flip-content",ref:p,style:{height:o?"auto":0,width:o?"auto":"100%",overflow:"hidden",transition:u?void 0:"none"},children:_&&d})]})}),jX=p8.config(jJ),jZ=(0,e5.forwardRef)((e,t)=>{let{useText:n="使用",name:o,className:i,selected:a=!1,status:s,onToolClick:l,authInfo:u,fullWidth:d,param:p,groupName:m,disabled:h=!1}=e,f=a?"selected":"";return f=d?`${f} full-width`:`${f}`,f=l?`${f} enable-click`:`${f}`,(0,e3.jsxs)("div",{className:uj()(`ct-tool-status ${f} ${s} ${h?"disabled":""}`,i),ref:t,onClick:t=>{h||(t.stopPropagation(),null==l||l(e))},children:[(0,e3.jsx)(AJ,{size:"xs",type:"failed"===s?"icon-cross1":"completed"===s?"icon-check":"loading"}),u&&"auth"===s&&(0,e3.jsx)("div",{className:"next-btn-text next-btn-primary",onClick:t=>{var n;t.stopPropagation(),null==u||null==(n=u.onAuthClick)||n.call(u,e)},children:null==u?void 0:u.content}),(0,e3.jsxs)("div",{className:"content-container",children:[(0,e3.jsx)("div",{className:"content-use-tips",children:n}),m&&(0,e3.jsx)("div",{className:"content-group",children:m}),o&&(0,e3.jsx)("div",{className:"content-name",children:o}),p&&(0,e3.jsx)("div",{className:"content-detail",children:p})]})]})}),j1=p8.config(jZ),j0=AG((0,e5.forwardRef)(e=>{let{className:t,children:n,...o}=e;return(0,e3.jsx)(yJ,{...o,className:uj()("ct-collapse",t),children:n})}),{displayName:"Collapse",Panel:yJ.Panel}),j2=p8.config(j0),j3=(0,e5.forwardRef)((e,t)=>{let{className:n,size:o="small",hasBorder:i=!0,title:a,showCopyButton:s,...l}=e,[u,d]=(0,e5.useState)(!1);return(0,e3.jsxs)("div",{className:"ct-table-container",children:[a?(0,e3.jsxs)("div",{className:"ct-table-header",children:[a&&(0,e3.jsx)("div",{className:"ct-table-title",children:a}),s?(0,e3.jsx)("div",{className:"ct-table-copy-button",onClick:()=>{d(!0),setTimeout(()=>{d(!1)},3e3)},children:(0,e3.jsx)(AJ,{size:16,type:u?"icon-check":"fuzhi3"})}):null]}):null,(0,e3.jsx)(ko,{...l,ref:t,className:uj()("ct-table",{[`ct-table-${o}`]:o,"ct-table-no-border":!i},n),size:o})]})});j3.displayName="Table";let j5=p8.config(j3),j4=(0,e5.forwardRef)((e,t)=>{let{className:n,text:o,...i}=e;return(0,e3.jsxs)("div",{...i,className:uj()("ct-error-notice",n),ref:t,children:[(0,e3.jsx)("div",{className:"ct-error-notice-icon",children:(0,e3.jsx)(h2,{size:16,type:"prompt"})}),(0,e3.jsx)("span",{className:"ct-error-notice-text",children:o})]})});j4.displayName="ErrorNotice";let j6=p8.config(j4),j9=(0,e5.forwardRef)((e,t)=>{let{className:n,...o}=e;return(0,e3.jsx)("div",{...o,className:uj()("ct-document-empty",n),ref:t,children:Array.from({length:4},(e,t)=>(0,e3.jsx)("div",{className:"ct-empty-line"},t))})});j9.displayName="Empty";let j8=p8.config(j9),j7=(0,e5.forwardRef)((e,t)=>{let{className:n,title:o="",content:i,generating:a=!0,onPreview:s,onCopy:l,onDownload:u,renderDownloadAction:d,showPreviewButton:p=!0,showCopyButton:m=!0,showDownloadButton:h=!0,contentHeight:f=128,..._}=e,g=f-25,y=(0,e5.useRef)(null),[b,E]=(0,e5.useState)(0),[S,T]=(0,e5.useState)(!1),[C,k]=(0,e5.useState)(()=>f>128?128:f),x=e=>{let t=Array.from(e.children);return 0===t.length?e:x(t[t.length-1])},w=(0,e5.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),n=x(e);if(!n)return;let o=n.getBoundingClientRect(),i=o.top-t.top,s=a?i+o.height:i+o.height+20;if(f>128&&C<f){let e=C-25;if(s>e)return void k(Math.min(f,C+(s-e)))}if(!(s+b<g&&i+b>0))return void E(-i)},[b,f,C,a]),N=Rv(w,200);(0,e5.useEffect)(()=>{w()},[a]),(0,e5.useEffect)(()=>{if("string"==typeof i)return void N();if(!y.current)return;let e=new MutationObserver(()=>{N()});return e.observe(y.current,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[i,N]);let D=e=>{o&&p&&s&&(e.stopPropagation(),null==s||s())},O=e=>{e.stopPropagation()};return(0,e3.jsxs)("div",{..._,className:uj()("ct-document",{"ct-document-generating":a},n),ref:t,onClick:D,children:[o?(0,e3.jsxs)("div",{className:"ct-document-header",children:[(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)(AJ,{type:"document",className:"ct-document-header-icon"}),(0,e3.jsx)("span",{className:uj()("ct-document-header-title"),children:o})]}),(0,e3.jsxs)("div",{className:uj()("ct-document-header-actions"),children:[(0,e3.jsxs)("div",{className:uj()("ct-document-header-preview",{"ct-document-header-preview-display-none":!p||!s,"ct-document-header-preview-generating":a}),onClick:D,children:[(0,e3.jsx)(AJ,{type:"preview",className:"ct-document-header-preview-icon"}),(0,e3.jsx)("span",{className:"ct-document-header-preview-text",children:"预览"})]}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-copy",{"ct-document-header-action-copy-generating":a,"ct-document-header-action-copy-display-none":!m||!l}),onClick:e=>{e.stopPropagation(),null==l||l(),T(!0),setTimeout(()=>{T(!1)},3e3)},title:"复制",children:(0,e3.jsx)(AJ,{type:S?"icon-check":"fuzhi3",className:"ct-document-header-action-icon"})}),(0,e3.jsx)("div",{className:uj()("ct-document-header-action","ct-document-header-action-download",{"ct-document-header-action-download-generating":a,"ct-document-header-action-download-display-none":!h||!d&&!u}),onClick:d?O:e=>{e.stopPropagation(),null==u||u()},title:d?void 0:"下载",children:d?d():(0,e3.jsx)(AJ,{type:"download",className:"ct-document-header-action-icon"})})]})]}):(0,e3.jsx)("div",{className:"ct-document-header",children:(0,e3.jsxs)("div",{className:"ct-document-header-left",children:[(0,e3.jsx)("div",{className:"ct-document-header-left-icon-empty"}),(0,e3.jsx)("div",{className:"ct-document-header-left-title-empty"})]})}),i?(0,e3.jsxs)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),style:{height:C},children:[(0,e3.jsx)("div",{className:"ct-document-mask"}),(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)("div",{ref:y,className:"ct-document-content-text",style:{transform:`translateY(${a?b:0}px)`},onClick:O,children:i})})]}):(0,e3.jsx)("div",{className:uj()("ct-document-content",{"ct-document-content-generating":a}),children:(0,e3.jsx)("div",{className:"ct-document-content-inner",children:(0,e3.jsx)(j8,{})})})]})});j7.displayName="Document";let Be=p8.config(j7),Bt="0.3.62",Bn=e=>{let{globalExpandCode:t}=e,[n,o]=(0,e5.useState)(!1),[i,a]=(0,e5.useState)(t);(0,e5.useEffect)(()=>{o(!0)},[]),(0,e5.useEffect)(()=>{a(t)},[t]);let s=e.docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{}),l=(0,iZ.kebabCase)(e.demoKey),d=`${l}-container`;return(0,e3.jsxs)("div",{id:d,className:"next-demo-item scroll-count-item",children:[(0,e3.jsxs)("div",{id:`${l}-desc`,className:"demo-item-desc markdown",children:[(0,e3.jsx)(i1,{id:d,title:s["@demo"],component:"h3"}),(0,e3.jsx)("div",{className:"demo-item-desc-body markdown",children:(0,e3.jsx)(ob,{remarkPlugins:[iA],children:s["@remarks"]})})]}),(0,e3.jsxs)(uR,{disabled:e.disabled,code:e.sourceCode,scope:{mountNode:document.querySelector(`#${l}-mount`),require:e=>{let t={"@alifd/chat":e2,"@alifd/next":e$,"react-dom":e6,"styled-components":eQ,react:e4(),classnames:uj()},n=e.match(/^@alifd\/chat\/(es|lib)\/(.*)\/style$/);return n&&u(64615)(`./${n[2]}/style`),t[e]}},noInline:!0,children:[(0,e3.jsx)("div",{id:`${l}-mount`,className:"next-demo-mount",children:n?(0,e3.jsx)(uL,{}):null}),n?(0,e3.jsx)(uF,{}):null,(0,e3.jsx)("div",{id:`${l}-operations`,className:"demo-item-operations",style:{borderBottom:"1px dashed rgb(238, 238, 238)"},children:(0,e3.jsx)("div",{id:`${l}-fold-code`,className:"code-box-code-action code-expand-icon-hide",children:(0,e3.jsxs)(fl.Tooltip,{align:"b",style:{maxWidth:400},trigger:(0,e3.jsx)("span",{id:`${l}-icon-hide`,onClick:()=>{a(!i)},children:(0,e3.jsx)("svg",{width:20,height:20,viewBox:"0 0 20 20",style:{fill:"#3B9AFF"},children:(0,e3.jsx)("path",{transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961)",d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z"})})}),children:["收起代码",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),"小提示:",(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"1. 点击一下代码,试一试在线编辑预览吧!"}),(0,e3.jsx)("br",{}),(0,e3.jsx)("br",{}),(0,e3.jsx)("strong",{children:"2. 页面右上方 有 全局代码展开 及 开启在线编辑 模式哟~"})]})})}),(0,e3.jsx)("div",{id:`${l}-body`,className:"next-demo-body",style:{display:i?"block":"none"},children:(0,e3.jsx)("div",{id:`${l}-live-editor`,children:(0,e3.jsx)("div",{id:`${l}-live-body`,className:"react-live-body",children:(0,e3.jsx)(uI,{theme:{plain:{},styles:[{types:[],style:{}}]}})})})})]})]})},Br=e=>{let{defaultLiveDemo:t=!0,defaultExpandCode:n=!0,onToggleExpandCode:o,onToggleLiveDemo:i,data:a=[]}=e,[s,l]=(0,e5.useState)(n),[u,d]=(0,e5.useState)(t),p={viewBox:"0 0 16 16",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","aria-haspopup":"true","aria-expanded":"false",style:{width:20,height:20,padding:2}};return(0,e3.jsxs)("div",{className:"demo-index",children:[(0,e3.jsxs)("span",{id:"global-control",className:"all-demo-box-controls",children:[(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"live-demo",role:"img","aria-label":"edit",className:"code-box-expand-trigger",onClick:()=>{d(!u),"function"==typeof i&&i(!u)},children:[(0,e3.jsx)("svg",{...p,"data-icon":"edit",id:"live-on",style:{...p.style,display:u?"none":"block"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})}),(0,e3.jsx)("svg",{...p,id:"live-off","data-icon":"edit",style:{...p.style,display:u?"block":"none"},children:(0,e3.jsx)("path",{d:"M9.69559557,3.62666667 L2.20866223,11.1146667 L1.8673289,12.3562667 L3.1153289,12.0181333 L10.6011956,4.53226667 L9.69559557,3.62666667 Z M10.4497289,2.87253333 L11.3553289,3.77813333 L12.2673289,2.86613333 C12.4290988,2.70436348 12.4922771,2.46857876 12.4330652,2.24759702 C12.3738533,2.02661528 12.201247,1.85400889 11.9802652,1.79479701 C11.7592835,1.73558513 11.5234988,1.79876346 11.3617289,1.96053333 L10.4497289,2.87253333 L10.4497289,2.87253333 Z M13.0203956,1.20639113 C13.3405419,1.52647328 13.5204044,1.96062968 13.5204044,2.41333333 C13.5204044,2.86603699 13.3405419,3.30019339 13.0203956,3.62026667 L3.6689289,12.9728 L0.346262232,13.8741333 L1.25506223,10.5589333 L10.6075956,1.20639113 C10.9276688,0.886253633 11.3618252,0.706391131 11.8145289,0.706391131 C12.2672326,0.706391131 12.701389,0.886253633 13.0214622,1.20639113 L13.0203956,1.20639113 Z M1,15 L11,15 L11,16 L1,16 L1,15 Z"})})]}),children:"使用预览模式"}),(0,e3.jsx)(fl.Tooltip,{trigger:(0,e3.jsxs)("span",{id:"expand-all",role:"img","aria-label":"code",className:"code-box-expand-trigger","aria-haspopup":"true","aria-expanded":"false",onClick:()=>{l(!s),"function"==typeof o&&o(!s)},children:[(0,e3.jsx)("svg",{...p,id:"all-not-expand","data-icon":"code",style:{...p.style,display:s?"none":"block"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})}),(0,e3.jsx)("svg",{...p,id:"all-expanded","data-icon":"code",style:{...p.style,display:s?"block":"none"},children:(0,e3.jsx)("path",{d:"M16,0 L16,16 L0,16 L0,0 L16,0 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M13,11 L13,12 L8,12 L8,11 L13,11 Z M3.33419059,3.86073652 L7.22040532,7.74695124 L3.33419127,11.6331801 L2.62708313,10.9260747 L5.806,7.747 L2.62708313,4.5678433 L3.33419059,3.86073652 Z"})})]}),children:"展开所有代码"})]}),(0,e3.jsx)("ul",{className:"demo-index-list",children:a.map(e=>(0,e3.jsx)("li",{className:"demo-index-item","data-id":e.id,children:(0,e3.jsx)("a",{href:`#${e.id}`,children:e.title})},e.id))})]})};e6.render((0,e3.jsx)(()=>{var e;let[t,n]=(0,e5.useState)(!0),[o,i]=(0,e5.useState)(!1),a={basic:{sourceCode:'import React from "react";\nimport ReactDOM from "react-dom";\nimport { CardLoading } from "@alifd/chat";\nimport "@alifd/chat/es/card-loading/style";\nReactDOM.render(\n <div className="card-loading-basic-demo">\n <CardLoading />\n </div>,\n mountNode,\n);\n',docInfo:{summary:"",tags:[{tag:"@remarks",content:"CardLoading 组件的基本用法。\n- Basic usage of `CardLoading`"},{tag:"@demo",content:"基本使用"},{tag:"@en",content:"Basic"},{tag:"@order",content:"1"}]}}},s=[{tag:"@component",content:"CardLoading"},{tag:"@en",content:"CardLoading"},{tag:"@type",content:"通用 - General"},{tag:"@when",content:"CardLoading"}].reduce((e,t)=>(e[t.tag]=t.content,e),{}),l={id:"demo-list",title:"代码演示"},u=Object.keys(a).sort((e,t)=>{var n,o,i,s;return parseInt((null==(o=a[e].docInfo.tags)||null==(n=o.find(e=>"@order"===e.tag))?void 0:n.content)||"0")-parseInt((null==(s=a[t].docInfo.tags)||null==(i=s.find(e=>"@order"===e.tag))?void 0:i.content)||"0")}),d=[...s["@when"]?[{id:"何时使用",title:"何时使用"}]:[],l,...u.map(e=>{let t=(0,iZ.kebabCase)(e);return{id:`${t}-container`,title:a[e].docInfo.tags.reduce((e,t)=>(e[t.tag]=t.content,e),{})["@demo"]}})];return(0,e3.jsxs)("div",{className:"demo-wrapper",children:[(0,e3.jsx)("div",{className:"demo-title markdown",children:(0,e3.jsx)("h1",{children:s["@en"]})}),(0,e3.jsx)(Br,{defaultExpandCode:o,defaultLiveDemo:t,onToggleLiveDemo:n,onToggleExpandCode:i,data:d}),(0,e3.jsx)("div",{className:"demo-head",children:(0,e3.jsxs)("div",{id:"demo-area",className:"next-demo-section",children:[(0,e3.jsxs)("div",{id:"md-area-former",className:"markdown-body markdown",children:[(0,e3.jsx)("div",{id:"demo-guide",className:"scroll-count-item active"}),(0,e3.jsx)("p",{children:i2(s["@remarks"])}),(e=s["@when"])?(0,e3.jsxs)(e3.Fragment,{children:[(0,e3.jsx)(i1,{id:"何时使用",title:"何时使用"}),(0,e3.jsx)("ul",{children:(0,e3.jsx)("li",{children:i2(e)})})]}):null,(0,e3.jsx)(i1,{...l})]}),u.map((e,n)=>(0,e5.createElement)(Bn,{disabled:!t,globalExpandCode:o,...a[e],demoKey:e,key:n})),(0,e3.jsx)("div",{id:"md-area-latter",className:"markdown-body markdown",children:(0,e3.jsxs)("div",{id:"demo-api","data-scroll-id":"demo-api",className:"scroll-count-item active",children:[(0,e3.jsx)(i1,{id:"API",title:"API"}),[].map(e=>(0,e5.createElement)(i0,{...e,key:e.title})),s["@others"]?(0,e3.jsx)(ob,{remarkPlugins:[iA],rehypePlugins:[iq,[ij,{behavior:"append",content:()=>[iX("span",{},["#"])],properties:{className:"header-anchor scroll-count-item"}}]],children:s["@others"]}):null]})})]})})]})},{}),document.getElementById("root"))})()})();
|