@chatbi-v/xcml 1.0.1 → 2.0.1

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/index.cjs CHANGED
@@ -28,4 +28,3 @@ ${y}
28
28
  `).trim()}var O=S(require("react"),1),Ut=require("@ant-design/x-markdown");var se=require("antd"),Yt=require("@ant-design/icons");var j=S(require("react"),1),pt=require("react/jsx-runtime"),Vt=(0,j.createContext)([]),Ht=(0,j.createContext)({register:()=>{},unregister:()=>{}}),ln=()=>(0,j.useContext)(Vt),ut=()=>(0,j.useContext)(Ht),Kt=()=>{let t=ln(),{register:e,unregister:n}=ut();return{items:t,register:e,unregister:n}},Jt=({children:t})=>{let[e,n]=(0,j.useState)(new Map),r=j.default.useRef(0),o=(0,j.useCallback)(c=>{n(l=>{let m=new Map(l),d=m.get(c.id);return d&&d.title===c.title&&d.level===c.level?l:(m.set(c.id,{...c,index:d?d.index:r.current++}),m)})},[]),a=(0,j.useCallback)(c=>{n(l=>{let m=new Map(l);return m.delete(c)?m:l})},[]),s=j.default.useMemo(()=>Array.from(e.values()).sort((c,l)=>c.index-l.index),[e]),i=j.default.useMemo(()=>({register:o,unregister:a}),[o,a]);return(0,pt.jsx)(Ht.Provider,{value:i,children:(0,pt.jsx)(Vt.Provider,{value:s,children:t})})};var Gt=require("clsx"),Ke=require("tailwind-merge"),M=require("react/jsx-runtime");function ft(t){let{content:e,stream:n,renderers:r,className:o,style:a,openLinksInNewTab:s,dompurifyConfig:i,enableHoverSource:c=!1,theme:l}=t,m=O.default.useDeferredValue(e),d=O.default.useMemo(()=>{let u=r?Object.keys(r).map(g=>g.startsWith("xcml:")?`x-${g.slice(5)}`:g):[];return m?mt(m,u):""},[m,r]),p=O.default.useMemo(()=>new WeakMap,[]),h=O.default.useMemo(()=>{let u={};if(r){let y=new Set;Object.keys(r).forEach(f=>{let b=f.startsWith("xcml:"),k=f.startsWith("x-");if(b||k){let X=b?`x-${f.slice(5)}`:f;y.add(X);let T=r[f];u[X]=E=>{let{domNode:P,className:z,streamStatus:K,node:ge,children:W,...A}=E,ee=p.get(P);if(!ee){let fe="",it=A["data-xcml-raw"];if(it)try{fe=decodeURIComponent(escape(atob(it)))}catch(jt){console.error("[XCML] Failed to decode raw body:",jt),fe=gt(P?.children||[])}else fe=gt(P?.children||[]);let Et=b?f.slice(5):f.slice(2);ee=Ve(Et,A,fe),p.set(P,ee)}let I={...ee};A["data-xcml-loading"]==="true"?I.streamStatus="loading":I.streamStatus=K;let Ot=T(I,A.key??X);return(0,M.jsx)(cn,{tag:X,node:I,className:z,enableHoverSource:c,children:Ot})}}})}u.pre=y=>{let{domNode:f,streamStatus:b,node:k,...X}=y,T=(f?.children||[]).find(z=>z?.name==="code"),E=[T?.attribs?.class,T?.attribs?.classname,T?.attribs?.className].filter(Boolean).join(" ");if(/language-mermaid/.test(E)){let z=gt(T?.children||[]),K=z.split("").reduce((W,A)=>(W=(W<<5)-W+A.charCodeAt(0),W&W),0),ge=`m-${Math.abs(K)}`;return(0,M.jsx)(dn,{id:ge,code:z,theme:l},y.key)}return O.default.createElement("pre",X,y.children)},u.p=y=>{let{domNode:f,node:b,children:k,streamStatus:X,...T}=y;return f?.children?.some(P=>P.type==="tag"&&(["div","p","pre","blockquote","table","ul","ol","h1","h2","h3","h4","h5","h6","form","fieldset","address"].includes(P.name)||P.name&&P.name.startsWith("x-")))||b?.children?.some(P=>P.tagName==="div"||P.tagName&&P.tagName.startsWith("x-"))?(0,M.jsx)("div",{...T,className:(0,Ke.twMerge)("mb-4 w-full",T.className),children:k}):(0,M.jsx)("p",{...T,children:k})};let g=O.default.memo(({level:y,children:f,domNode:b,streamStatus:k,node:X,...T})=>{let{register:E,unregister:P}=ut(),z=O.default.useCallback(I=>typeof I=="string"?I:Array.isArray(I)?I.map(z).join(""):O.default.isValidElement(I)?z(I.props.children):"",[]),K=z(f),ge=O.default.useMemo(()=>K.trim().toLowerCase().replace(/\s+/g,"-"),[K]),W=T.id||ge||`h${y}-${Math.random().toString(36).slice(2,9)}`,A=O.default.useRef(null);O.default.useEffect(()=>{if(!E)return;let I={id:W,title:K,level:y};return(!A.current||A.current.id!==I.id||A.current.title!==I.title||A.current.level!==I.level)&&(A.current&&P?.(A.current.id),E(I),A.current=I),()=>{A.current&&(P?.(A.current.id),A.current=null)}},[W,K,y,E,P]);let ee=`h${y}`;return(0,M.jsxs)(ee,{id:W,className:"scroll-mt-20 group relative",...T,children:[f,c&&(0,M.jsx)("a",{href:`#${W}`,className:"ml-2 opacity-0 group-hover:opacity-100 text-muted-foreground transition-opacity no-underline",children:"#"})]})});return u.h1=y=>(0,M.jsx)(g,{level:1,...y}),u.h2=y=>(0,M.jsx)(g,{level:2,...y}),u.h3=y=>(0,M.jsx)(g,{level:3,...y}),u.h4=y=>(0,M.jsx)(g,{level:4,...y}),u.h5=y=>(0,M.jsx)(g,{level:5,...y}),u.h6=y=>(0,M.jsx)(g,{level:6,...y}),u},[r,c,l]);return(0,M.jsx)(Jt,{children:(0,M.jsx)(Ut.XMarkdown,{content:d,streaming:n?{hasNextChunk:!0}:void 0,components:h,className:(0,Ke.twMerge)((0,Gt.clsx)("prose w-full max-w-none prose-headings:text-foreground prose-p:text-foreground prose-li:text-foreground prose-strong:text-foreground prose-code:text-foreground prose-th:text-foreground prose-td:text-foreground prose-a:text-primary prose-code:bg-muted/50 prose-code:rounded prose-code:px-1 prose-code:py-0.5 prose-pre:bg-muted/50 prose-pre:text-foreground",o)),style:a,openLinksInNewTab:s,dompurifyConfig:i})})}function cn({children:t,tag:e,node:n,className:r,enableHoverSource:o}){let[a,s]=O.default.useState(!1),[i,c]=O.default.useState(!1),l=d=>{d.stopPropagation(),c(!0)},m=O.default.useMemo(()=>{let d=Object.entries(n.attributes||{}).map(([p,h])=>`${p}="${h}"`).join(" ");return`<${e}${d?" "+d:""}>${n.children?`
29
29
  `+n.children+`
30
30
  `:""}</${e}>`},[e,n]);return(0,M.jsxs)("div",{className:(0,Ke.twMerge)("not-prose w-full max-w-full overflow-x-hidden overflow-y-visible custom-scrollbar flex flex-col relative",r),onMouseEnter:()=>o&&s(!0),onMouseLeave:()=>o&&s(!1),children:[t,a&&o&&(0,M.jsx)(se.Tooltip,{title:"\u67E5\u770B\u6E90\u7801",children:(0,M.jsx)(se.Button,{icon:(0,M.jsx)(Yt.CodeOutlined,{}),size:"small",className:"absolute top-1 right-1 z-10 opacity-80",onClick:l})}),(0,M.jsx)(se.Modal,{open:i,onCancel:()=>c(!1),footer:null,width:800,centered:!0,title:`${e} \u6E90\u7801`,destroyOnHidden:!0,children:(0,M.jsx)("pre",{className:"bg-muted p-4 rounded-lg overflow-auto max-h-[500px] text-sm text-foreground",children:m})})]})}var yt=new WeakMap;function gt(t){if(!t)return"";if(yt.has(t))return yt.get(t);let e=[],n=o=>{o?.forEach(a=>{a&&(a.type==="text"&&typeof a.data=="string"&&e.push(a.data),Array.isArray(a.children)&&n(a.children))})};n(t);let r=e.join("");return yt.set(t,r),r}var dn=O.default.memo(({code:t,theme:e,id:n})=>{let r=O.default.useRef(null);return O.default.useEffect(()=>{!r.current||!t||import("mermaid").then(o=>{o.default.initialize({startOnLoad:!0,theme:e==="dark"?"dark":"default",securityLevel:"loose"});let a=n||`mermaid-${Math.random().toString(36).slice(2)}`;o.default.render(a,t).then(({svg:s})=>{r.current&&(r.current.innerHTML=s)})})},[t,e,n]),(0,M.jsx)("div",{ref:r,className:"mermaid w-full flex justify-center my-4"})});var H=S(require("react"),1),Cn=S(require("@ant-design/plots"),1),Ft=require("antd");var q=require("react"),Zt=require("@ant-design/x"),ht=require("antd"),Je=require("react/jsx-runtime"),mn={theme:"light",setTheme:()=>null},Qt=(0,q.createContext)(mn);function pn({children:t,defaultTheme:e="light",theme:n,primaryColor:r="#6366f1",storageKey:o="xcml-ui-theme",scoped:a=!0,className:s,style:i,...c}){let[l,m]=(0,q.useState)(()=>localStorage.getItem(o)||e),d=n??l,p=(0,q.useRef)(null);(0,q.useEffect)(()=>{let u=a?p.current:window.document.documentElement;if(!u)return;if(u.style.setProperty("--primary",r),r.startsWith("#")){let y=parseInt(r.slice(1,3),16),f=parseInt(r.slice(3,5),16),b=parseInt(r.slice(5,7),16);u.style.setProperty("--primary-rgb",`${y}, ${f}, ${b}`)}u.classList.remove("light","dark"),u.removeAttribute("data-theme");let g=["ocean","sunset","lavender","rose","amber","midnight","forest","slate","crimson","cyan"];if(d==="system"){let y=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(y);return}if(d==="dark"){u.classList.add("dark");return}if(d==="light"){u.classList.add("light");return}if(g.includes(d)){u.setAttribute("data-theme",d);return}},[d,a]);let h={theme:d,setTheme:u=>{localStorage.setItem(o,u),m(u)}},C=(0,q.useMemo)(()=>({algorithm:d==="dark"||d==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?ht.theme.darkAlgorithm:ht.theme.defaultAlgorithm,token:{colorPrimary:r,colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#e11d48",colorInfo:"#0ea5e9",borderRadius:8,fontFamily:'"Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'}}),[d,r]);return(0,Je.jsx)(Qt.Provider,{value:h,...c,children:(0,Je.jsx)(Zt.XProvider,{theme:C,children:(0,Je.jsx)("div",{ref:p,className:`xcml-scope ${s||""}`,style:{color:"inherit",background:"inherit",...i},children:t})})})}var bt=()=>{let t=(0,q.useContext)(Qt);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var un={label:{style:{fillOpacity:.65,fontSize:12}},title:{style:{fontSize:12,fillOpacity:.85}},grid:{line:{style:{stroke:"#d0d0d0",lineWidth:1,lineDash:[4,4],strokeOpacity:.7}}}},yn={label:{style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12}},title:{style:{fill:"rgba(255, 255, 255, 0.85)",fontSize:12}},grid:{line:{style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:[4,4]}}}},Ue={defaultColor:"#8b5cf6",colors10:["#8b5cf6","#f472b6","#0ea5e9","#fbbf24","#34d399","#f87171","#60a5fa","#a78bfa","#2dd4bf","#fb923c"],styleSheet:{backgroundColor:"transparent"},components:{axis:{common:un},tooltip:{style:{backgroundColor:"rgba(255, 255, 255, 0.95)",boxShadow:"0 8px 24px -6px rgba(0, 0, 0, 0.12)",color:"#1e293b",borderRadius:"16px",padding:"12px 16px",border:"1px solid rgba(226, 232, 240, 0.8)",backdropFilter:"blur(4px)"}},legend:{common:{itemStates:{active:{labelStyle:{fontWeight:600,fill:"#8b5cf6"}}}}}}},er={defaultColor:"#a78bfa",colors10:["#a78bfa","#f472b6","#38bdf8","#fbbf24","#34d399","#f87171","#60a5fa","#c4b5fd","#2dd4bf","#fb923c"],styleSheet:{backgroundColor:"transparent"},components:{axis:{common:yn},tooltip:{style:{backgroundColor:"rgba(30, 41, 59, 0.95)",boxShadow:"0 8px 24px -6px rgba(0, 0, 0, 0.3)",color:"#f1f5f9",borderRadius:"16px",padding:"12px 16px",border:"1px solid rgba(51, 65, 85, 0.8)",backdropFilter:"blur(4px)"}},legend:{common:{labelStyle:{fill:"rgba(255, 255, 255, 0.65)"}}}}},tr={light:Ue,dark:er,default:Ue};function xt(t){return tr[t||"default"]||Ue}var rr=S(require("react"),1);var gn=rr.default.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Line}))),Ct={type:"line",schema:he,getComponent:()=>gn,transformProps:t=>{let e={...t};return e.seriesField&&!e.colorField&&(e.colorField=e.seriesField),e}};var nr=S(require("react"),1);var fn=nr.default.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Column}))),vt={type:"column",schema:be,getComponent:()=>fn,transformProps:t=>{let e={...t};return e.seriesField&&!e.colorField&&(e.colorField=e.seriesField),e.scale?typeof e.scale=="object"&&!e.scale.x&&(e.scale.x={type:"band"}):e.scale={x:{type:"band"}},e}};var or=S(require("react"),1);var hn=or.default.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Pie}))),wt={type:"pie",schema:xe,getComponent:()=>hn,transformProps:t=>{let e={...t};if(delete e.xField,delete e.yField,delete e.seriesField,!e.angleField){let n=(e.data||[])[0]||{},r=Object.keys(n).find(o=>typeof n[o]=="number");r&&(e.angleField=r)}if(!e.colorField){let n=(e.data||[])[0]||{},r=Object.keys(n).find(o=>typeof n[o]=="string");r&&(e.colorField=r)}return e}};var ar=S(require("react"),1);var bn=ar.default.lazy(()=>import("@ant-design/plots").then(t=>({default:t.DualAxes}))),St={type:"dual-axes",schema:Ce,getComponent:()=>bn,transformProps:t=>{let e={...t};typeof e.width=="number"&&e.width<50&&delete e.width;let n=e.data||[],r=n.length>0?Object.keys(n[0]):[],o=!1;if(e.children&&e.children.length>0&&(o=e.children.every(i=>i.data&&i.data.length>0||r.length===0?!0:i.yField&&r.includes(i.yField)),!o&&r.length>0&&(e.children=[])),(!e.children||e.children.length===0)&&(Array.isArray(e.yField)&&e.yField.length>=2&&(r.length===0||e.yField.every(c=>r.includes(c)))&&(e.children=[{type:"interval",yField:e.yField[0]},{type:"line",yField:e.yField[1],style:{lineWidth:2}}]),(!e.children||e.children.length===0)&&n.length>0)){let i=e.xField,c=r.filter(l=>l!==i&&typeof n[0][l]=="number");c.length>=2?e.children=[{type:"interval",yField:c[0]},{type:"line",yField:c[1],style:{lineWidth:2}}]:c.length===1&&(e.children=[{type:"interval",yField:c[0]}])}let a=Array.isArray(e.data)&&e.data.length>0,s=Array.isArray(e.children)&&e.children.some(i=>i.data&&Array.isArray(i.data)&&i.data.length>0);if(!a&&s){let{data:i,...c}=e;return c}return e}};var ir=S(require("react"),1);var xn=ir.default.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Funnel}))),Mt={type:"funnel",schema:ve,getComponent:()=>xn,transformProps:t=>{let e={...t};!e.xField&&e.categoryField&&(e.xField=e.categoryField),!e.yField&&e.valueField&&(e.yField=e.valueField);let n=e.data||[];if(n.length>0){let o=n[0],a=Object.keys(o);e.xField||(e.xField=a.find(s=>typeof o[s]=="string")||"type"),e.yField||(e.yField=a.find(s=>typeof o[s]=="number")||"value"),e.colorField&&!(e.colorField in o)&&(e.xField&&e.xField in o?e.colorField=e.xField:delete e.colorField),e.seriesField&&!(e.seriesField in o)&&delete e.seriesField}e.axis&&delete e.axis;let r=["light","dark","academy"];return e.theme&&!r.includes(e.theme)&&delete e.theme,typeof e.width=="number"&&e.width<100&&delete e.width,e}};var sr={line:Ct,column:vt,pie:wt,"dual-axes":St,funnel:Mt};function Nt(t){return t&&sr[t.toLowerCase()]||null}var lr=S(require("react"),1),ne=require("antd"),le=require("react/jsx-runtime");function Me(t,e){if(typeof t!="object"||t===null)return e;if(typeof e!="object"||e===null)return t;let n=Array.isArray(t)?[...t]:{...t};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let o=e[r],a=n[r];typeof o=="object"&&o!==null&&typeof a=="object"&&a!==null&&!lr.default.isValidElement(o)?n[r]=Me(a,o):n[r]=o}return n}function Lt(t,e){if(!e)return t;let n={...t},r=[...e.props||[],...e.body||[]];return r.length===0?t:(r.forEach(o=>{let a=o.name;if(o.visibleIf&&!o.visibleIf(n)){delete n[a];return}if(o.default!==void 0&&n[a]===void 0?n[a]=o.default:o.default!==void 0&&typeof o.default=="object"&&o.default!==null&&(n[a]=Me(o.default,n[a])),o.transform){let s=n[a];n[a]=o.transform(s,n)}}),n)}function kt(t){let{type:e,data:n,theme:r,title:o,__native__:a,...s}=t,i={data:n||[],height:t.height||300,theme:r||"light",autoFit:t.autoFit!==!1,padding:"auto",appendPadding:[20,30,30,20]},c=Me(Me(i,s),a||{});return c.seriesField&&!c.colorField&&(c.colorField=c.seriesField),c.__native__={...c},c}var Pt=()=>(0,le.jsx)("div",{className:"w-full h-full flex items-center justify-center border border-dashed border-border rounded-lg bg-muted/30",children:(0,le.jsx)(ne.Empty,{image:ne.Empty.PRESENTED_IMAGE_SIMPLE,description:"\u6682\u65E0\u6570\u636E"})}),Xt=({error:t,reset:e})=>(0,le.jsx)("div",{className:"w-full h-full flex items-center justify-center p-4 border border-dashed border-destructive/20 rounded bg-destructive/5",children:(0,le.jsx)(ne.Result,{status:"error",title:"\u56FE\u8868\u52A0\u8F7D\u5931\u8D25",subTitle:t.message,extra:[(0,le.jsx)(ne.Button,{type:"primary",onClick:e,children:"\u91CD\u8BD5"},"retry")]})});var dr=S(require("react"),1),mr=require("antd");var Rt=require("clsx"),cr=require("tailwind-merge"),V=require("react/jsx-runtime"),Ne=({title:t,icon:e,children:n,source:r,summary:o,variant:a="card",theme:s,hoverable:i=!0,className:c,domNode:l,streamStatus:m,node:d,label:p,value:h,footer:C,precision:u,layout:g,note:y,trend:f,trendValue:b,unit:k,prefix:X,wow:T,yoy:E,sentiment:P,highlights:z,citations:K,actions:ge,steps:W,columns:A,rows:ee,charts:I,data:Ot,subTitle:fe,themeColor:it,backgroundImage:Et,qrCode:jt,author:Gn,date:Zn,...Dr})=>{let oe=a==="plain",Wr=s??d?.props?.theme??d?.data?.theme,qr=(0,cr.twMerge)((0,Rt.clsx)("xcml-scope xcml-card not-prose max-w-full min-w-0 group",oe?"p-1":"rounded-xl border border-border/80 bg-card/50 backdrop-blur-sm shadow-sm p-card mb-6 overflow-hidden","relative transition-all duration-300 ease-out hover:ease-in-out",c,i&&!oe?"hover:shadow-md hover:border-primary/50 hover:bg-card/80":""));return(0,V.jsxs)("div",{className:qr,"data-theme":Wr,...Dr,children:[t&&(0,V.jsxs)("div",{className:"relative mb-4",children:[!oe&&(0,V.jsx)("div",{className:"absolute -top-3 -inset-x-4 h-1 bg-gradient-to-r from-primary via-primary/60 to-primary/20 opacity-0 transition-all duration-300 group-hover:opacity-100 rounded-full scale-x-95 group-hover:scale-x-100"}),(0,V.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-border/80",children:(0,V.jsxs)("h3",{className:"text-lg font-bold text-foreground leading-snug tracking-tight flex items-center gap-3 whitespace-normal break-words flex-1",children:[!oe&&e&&(0,V.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 text-primary border border-primary/20 shadow-sm",children:e}),!oe&&!e&&(0,V.jsx)("span",{className:"w-1.5 h-6 rounded-full bg-primary shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]"}),t]})})]}),(0,V.jsx)("div",{className:(0,Rt.clsx)("xcml-card-body",!oe&&"mt-1"),children:n})]})};var Le=require("react/jsx-runtime");function v(t,e={}){let{schema:n,getTitle:r,getIcon:o,getVariant:a,renderLoading:s,skeleton:i=!0}=e,c=dr.default.forwardRef((m,d)=>{let{merged:p,baseProps:h,isLoading:C,streamStatus:u}=lt(m,n);p.delta!==void 0&&p.trendValue===void 0&&(p.trendValue=p.delta);let{className:g,...y}=m,f=r?r(p):p.title,b;f&&(typeof f=="string"?b=f:typeof f=="object"&&(Array.isArray(f)?b=void 0:b=f.text||f.content||JSON.stringify(f)));let k=o?o(p):p.icon,X=a?a(p):h.variant||"card",T=p.hoverable!==void 0?p.hoverable:!0,E={title:b,icon:k,variant:X,hoverable:T,className:g,node:m.node,streamStatus:u,...y};return C?(0,Le.jsx)(Ne,{...E,children:s?s(p):i?(0,Le.jsx)(mr.Skeleton,{active:!0,paragraph:{rows:typeof i=="object"?i.rows:2}}):null}):(0,Le.jsx)(Ne,{...E,children:(0,Le.jsx)(t,{...p,ref:d})})}),l=t.displayName||t.name||"Component";return c.displayName=`withXCMLCard(${l})`,c}var D=require("react/jsx-runtime"),ur=require("react"),vn=t=>typeof t!="string"||!t?"":t.split(/[-_ ]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),pr={"dual-axes":"DualAxes",column:"Column",line:"Line",pie:"Pie",funnel:"Funnel"},wn=t=>{if(!t)return null;let e=pr[t.toLowerCase()]||pr[t],n=Cn;if(e&&e in n)return n[e];let r=vn(t);return r&&r in n?n[r]:t in n?n[t]:null},Tt=class extends H.default.Component{constructor(n){super(n);this.reset=()=>{this.setState({hasError:!1,error:null})};this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error(`AntV Chart Error (${this.props.type}):`,n,r)}render(){return this.state.hasError&&this.state.error?this.props.errorPlaceholder?this.props.errorPlaceholder(this.state.error,this.reset):(0,D.jsx)(Xt,{error:this.state.error,reset:this.reset}):this.props.children}},Sn=(0,H.forwardRef)((t,e)=>{let{type:n="line",node:r,theme:o,...a}=t,{theme:s}=bt(),i=(0,H.useMemo)(()=>Nt(n),[n]),c=(0,H.useMemo)(()=>i?.getComponent()||wn(n),[i,n]),l=(0,H.useMemo)(()=>{let h=t.theme||o||s||"light",u=["dark","black","midnight","slate","crimson"].includes(h)?"dark":"light",g=xt(u),y=t.data,f={...t,theme:g,data:y},b=Lt(f,i?.schema||ae),k=i?.transformProps?i.transformProps(b):b;return kt(k)},[t,o,s,i]);if(!c)return(0,D.jsxs)("div",{className:"w-full p-4 border border-dashed border-amber-200 text-amber-600 rounded bg-amber-50/50 text-xs",children:["\u672A\u627E\u5230\u56FE\u8868\u7C7B\u578B: ",n]});let m=l.data&&Array.isArray(l.data)&&l.data.length>0,d=Array.isArray(l.children)&&l.children.some(h=>h.data&&Array.isArray(h.data)&&h.data.length>0);return m||d?(0,D.jsx)(Tt,{type:n,errorPlaceholder:l.errorPlaceholder,children:(0,D.jsx)(H.Suspense,{fallback:(0,D.jsx)(Ft.Skeleton,{active:!0}),children:(0,D.jsx)("div",{className:"",children:(0,ur.createElement)(c,{...l,ref:e,key:n})})})}):(0,D.jsx)(Pt,{})}),ke=v(Sn,{schema:ae,renderLoading:t=>(0,D.jsx)("div",{className:"w-full flex justify-center items-center bg-black/5 rounded-lg animate-pulse",style:{height:t.height||300},children:(0,D.jsx)(Ft.Skeleton.Image,{active:!0})})}),Mn=t=>{let{node:e,...n}=t;if(e)return(0,D.jsx)(ke,{node:e});let r={props:{},body:{...n,data:t.data}};return(0,D.jsx)(ke,{node:r})};var yr=require("react/jsx-runtime");function Nn(t){let e=t?.theme;return re({chart:(r,o)=>(0,yr.jsx)(ke,{node:r,theme:e,className:r.props?.className},o)})}var At=require("react");var Ye=require("@ant-design/icons");var F=require("react/jsx-runtime"),Ln=({data:t,color:e="#059669"})=>{if(!Array.isArray(t)||t.length<2)return null;let n=Math.min(...t),o=Math.max(...t)-n||1,a=80,s=24,i=t.map((c,l)=>{let m=l/(t.length-1)*a,d=s-(c-n)/o*s;return`${m},${d}`}).join(" ");return(0,F.jsxs)("svg",{width:a,height:s,className:"overflow-visible ml-2",children:[(0,F.jsx)("polyline",{points:i,fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,F.jsx)("circle",{cx:(t.length-1)/(t.length-1)*a,cy:s-(t[t.length-1]-n)/o*s,r:"2",fill:e})]})},kn=t=>{let{precision:e=0,layout:n="vertical",footer:r,value:o,note:a,trend:s,trendValue:i}=t,c=(0,At.useMemo)(()=>{if(i==null)return null;if(typeof i=="number"){let h=i.toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e});return s==="up"&&!String(i).startsWith("+")?`+${h}`:s==="down"&&!String(i).startsWith("-")?`-${h}`:h}return String(i)},[i,e,s]),l=(0,At.useMemo)(()=>{if(o==null)return"-";let h=typeof o=="string"&&o!==""&&!isNaN(Number(o))?Number(o):o;return typeof h=="number"?h.toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e}):String(o)},[o,e]),m=s==="up",d=s==="down",p=Array.isArray(s);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)("div",{className:`flex ${n==="horizontal"?"flex-row items-center justify-between":"flex-col"} gap-2`,children:[(0,F.jsxs)("div",{className:"flex flex-col",children:[(0,F.jsxs)("div",{className:"flex items-baseline gap-1.5 group",children:[(0,F.jsx)("span",{className:"text-metric font-bold text-card-foreground tracking-tight group-hover:text-primary transition-colors",children:l}),c&&(0,F.jsxs)("div",{className:`flex items-center text-xs font-bold px-1.5 py-0.5 rounded ${m?"text-success bg-success/10":d?"text-destructive bg-destructive/10":"text-muted-foreground bg-muted"}`,children:[m&&(0,F.jsx)(Ye.ArrowUpOutlined,{className:"mr-0.5"}),d&&(0,F.jsx)(Ye.ArrowDownOutlined,{className:"mr-0.5"}),c]})]}),a&&(0,F.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",title:a,children:a})]}),p&&(0,F.jsx)("div",{className:"h-10 w-24",children:(0,F.jsx)(Ln,{data:s,color:m?"#10b981":d?"#ef4444":"#6366f1"})})]}),r&&(0,F.jsx)("div",{className:"mt-card-gap pt-2 border-t border-border/40 text-[10px] text-muted-foreground italic",children:r})]})},gr=v(kn,{schema:Re,skeleton:{rows:1}});var Ge=require("react/jsx-runtime"),Pn=t=>{let{description:e,content:n,node:r}=t,o=n||e||(r?.body||r?.data?"":r?.__source);return(0,Ge.jsx)("div",{className:"text-muted-foreground leading-relaxed",children:o?(0,Ge.jsx)(ft,{content:o}):(0,Ge.jsx)("div",{className:"text-muted-foreground/50 text-xs italic",children:"No content"})})},fr=v(Pn,{schema:Ae,skeleton:{rows:2}});var ce=require("@ant-design/icons");var N=require("react/jsx-runtime"),Xn=({item:t,layout:e,index:n,stripe:r})=>{let{title:o,desc:a,value:s,status:i,type:c="text"}=t;return c==="metric"?(0,N.jsxs)("div",{className:`bg-muted/30 rounded-lg p-card-half border border-border hover:border-primary/20 transition-colors group ${r?"bg-muted/50":""}`,children:[(0,N.jsx)("div",{className:"text-xs text-muted-foreground mb-1 font-medium",children:o}),(0,N.jsx)("div",{className:"text-xl font-bold text-card-foreground group-hover:text-primary transition-colors",children:s}),a&&(0,N.jsx)("div",{className:"text-[10px] text-muted-foreground/60 mt-1 whitespace-pre-wrap",children:a})]}):(0,N.jsxs)("div",{className:`flex items-start gap-3 p-card-half bg-muted/40 border border-border rounded-lg hover:shadow-card hover:border-primary/30 transition-all group ${e==="list"?"w-full":""} ${r?"bg-muted/60":""}`,children:[(0,N.jsxs)("div",{className:"mt-1",children:[i==="done"&&(0,N.jsx)(ce.CheckCircleOutlined,{className:"text-success"}),i==="doing"&&(0,N.jsx)(ce.MinusCircleOutlined,{className:"text-primary animate-pulse"}),i==="todo"&&(0,N.jsx)(ce.BorderOutlined,{className:"text-muted-foreground/30"}),!i&&(0,N.jsx)("div",{className:"w-4 h-4 rounded-full bg-muted flex items-center justify-center text-[10px] text-muted-foreground font-bold group-hover:bg-primary/10 group-hover:text-primary transition-colors",children:n+1})]}),(0,N.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,N.jsx)("div",{className:"text-sm font-medium text-card-foreground whitespace-normal break-words group-hover:text-primary transition-colors",children:o}),a&&(0,N.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5 whitespace-normal break-words whitespace-pre-wrap",children:a})]})]})},Rn=t=>{let{header:e,footer:n,layout:r="grid",columns:o=3,items:a=[],type:s="text",stripe:i=!1}=t,c=r==="grid",m={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-2 md:grid-cols-4",5:"grid-cols-2 md:grid-cols-5",6:"grid-cols-3 md:grid-cols-6"}[o]||"grid-cols-1 md:grid-cols-3";return(0,N.jsxs)(N.Fragment,{children:[e&&(0,N.jsx)("div",{className:"mb-3 text-sm text-muted-foreground",children:e}),(0,N.jsxs)("div",{className:c?`grid ${m} gap-card-gap`:"flex flex-col space-y-card-gap",children:[a.map((d,p)=>(0,N.jsx)(Xn,{item:{type:s,...d},layout:r,index:p,stripe:i&&p%2===1},p)),a.length===0&&(0,N.jsx)("div",{className:"text-center py-8 text-muted-foreground/50 text-xs italic",children:"\u6682\u65E0\u5217\u8868\u9879"})]}),n&&(0,N.jsx)("div",{className:"mt-card-gap pt-3 border-t border-border/40 text-xs text-muted-foreground text-right",children:n})]})},hr=v(Rn,{schema:Fe,skeleton:{rows:3}});var br=S(require("react"),1);var de=require("react/jsx-runtime"),Tn=()=>{let{items:t}=Kt(),e=br.default.useMemo(()=>t.filter(r=>r.level>1),[t]),n=(r,o)=>{r.preventDefault();let a=document.getElementById(o);a&&a.scrollIntoView({behavior:"smooth"})};return(0,de.jsx)("div",{className:"text-sm text-muted-foreground w-full",children:e.length===0?(0,de.jsx)("div",{className:"text-muted-foreground text-xs",children:"\u6682\u65E0\u76EE\u5F55"}):(0,de.jsx)("ul",{className:"list-none p-0 m-0 ml-2 border-l-2 border-border",children:e.map(r=>(0,de.jsx)("li",{className:"mb-2 text-sm leading-relaxed relative",style:{paddingLeft:`${(r.level-2)*1+1}rem`},children:(0,de.jsx)("a",{href:`#${r.id}`,onClick:o=>n(o,r.id),className:"text-foreground no-underline cursor-pointer transition-colors hover:text-primary hover:underline",children:r.title})},r.id))})})},xr=v(Tn,{schema:Ie,getTitle:t=>t.title||"\u76EE\u5F55",skeleton:{rows:4}});var Cr=require("react");var Ze=require("antd"),It=require("@ant-design/icons");var x=require("react/jsx-runtime"),Fn=({data:t,color:e})=>{let n=e||"hsl(var(--primary))";if(!Array.isArray(t)||t.length<2)return(0,x.jsx)("span",{className:"text-muted-foreground/30",children:"-"});let r=Math.min(...t),a=Math.max(...t)-r||1,s=60,i=20,c=t.map((l,m)=>{let d=m/(t.length-1)*s,p=i-(l-r)/a*i;return`${d},${p}`}).join(" ");return(0,x.jsxs)("svg",{width:s,height:i,className:"overflow-visible",children:[(0,x.jsx)("polyline",{points:c,fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("circle",{cx:(t.length-1)/(t.length-1)*s,cy:i-(t[t.length-1]-r)/a*i,r:"2.5",fill:n})]})},An=({value:t,color:e="bg-primary"})=>{let n=Math.min(Math.max(t*100,0),100);return(0,x.jsx)("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:(0,x.jsx)("div",{className:`h-full rounded-full transition-all duration-300 w-[var(--percent)] ${e}`,style:{"--percent":`${n}%`}})})},In=t=>{let{bordered:e=!0,size:n="middle",summary:r=!1,columns:o=[],rows:a=[],dataSource:s=[]}=t,i=s.length>0?s:a,c=o.length>0&&i.length>0,l=(0,Cr.useMemo)(()=>{if(!r||!c)return null;let u={_isSummary:!0};return o.forEach(g=>{let y=i.map(f=>{let b=f[g.key];return typeof b=="string"?parseFloat(b.replace(/[^0-9.-]/g,"")):b}).filter(f=>typeof f=="number"&&!isNaN(f));if(y.length>0&&(g.type==="number"||g.key==="amount"||g.key==="value"||g.key==="sales")){let f=y.reduce((b,k)=>b+k,0);u[g.key]=Number.isInteger(f)?f:f.toFixed(2)}else u[g.key]=""}),u[o[0].key]="\u5408\u8BA1",u},[r,c,o,i]),m=(u,g)=>{let y=g[u.key];switch(u.type){case"progress":let f=typeof y=="string"?parseFloat(y):y,b=f<=1?f:f/100,k="bg-primary";return b>=1?k="bg-success":b<.6?k="bg-destructive":k="bg-primary/60",(0,x.jsxs)("div",{className:"flex items-center gap-2",children:[(0,x.jsxs)("span",{className:"text-xs w-8 text-right font-mono",children:[(b*100).toFixed(0),"%"]}),(0,x.jsx)("div",{className:"flex-1 min-w-[60px]",children:(0,x.jsx)(An,{value:b,color:k})})]});case"trend":return(0,x.jsx)(Fn,{data:Array.isArray(y)?y:[]});case"badge":let X="default";return["success","\u5B8C\u6210","\u6B63\u5E38","ok","pass"].includes(String(y).toLowerCase())?X="success":["error","fail","\u5931\u8D25","\u5F02\u5E38"].includes(String(y).toLowerCase())?X="error":["warning","warn","\u8B66\u544A"].includes(String(y).toLowerCase())?X="warning":["processing","running","\u8FDB\u884C\u4E2D"].includes(String(y).toLowerCase())&&(X="processing"),(0,x.jsx)(Ze.Badge,{status:X,text:y});case"image":return(0,x.jsx)("img",{src:y,alt:"",className:"h-8 w-8 rounded object-cover border border-border"});default:return(0,x.jsxs)("span",{className:u.type==="number"?"font-mono":"",children:[u.prefix,y,u.suffix]})}},d={small:"px-4 py-2.5",middle:"px-5 py-3.5",large:"px-6 py-5"},p=d[n]||d.middle,h="border-b border-border/40 transition-all duration-150",C="hover:bg-primary/5 cursor-default";return(0,x.jsxs)("div",{className:`w-full overflow-hidden ${e?"border border-border/60 rounded-xl shadow-sm bg-card":""}`,children:[c?(0,x.jsx)("div",{className:"overflow-x-auto custom-scrollbar",children:(0,x.jsxs)("table",{className:"w-full border-collapse text-[13.5px] leading-relaxed table-auto",children:[(0,x.jsx)("thead",{children:(0,x.jsx)("tr",{className:"bg-muted/40 border-b border-border/60",children:o.map((u,g)=>(0,x.jsx)("th",{className:`${p} font-bold text-foreground/80 whitespace-nowrap align-middle uppercase tracking-wider text-[11px]`,style:{textAlign:u.align||"left",width:u.width},children:(0,x.jsxs)("div",{className:"flex items-center gap-1.5",children:[u.title,u.desc&&(0,x.jsx)(Ze.Tooltip,{title:u.desc,children:(0,x.jsx)(It.InfoCircleOutlined,{className:"text-[10px] cursor-help opacity-40 hover:opacity-100 text-primary transition-opacity"})})]})},g))})}),(0,x.jsxs)("tbody",{className:"divide-y divide-border/30",children:[i.map((u,g)=>(0,x.jsx)("tr",{className:`${h} ${C}`,children:o.map((y,f)=>(0,x.jsx)("td",{className:`${p} align-middle text-foreground/90 whitespace-normal break-words`,style:{textAlign:y.align||"left"},children:m(y,u)},f))},g)),l&&(0,x.jsx)("tr",{className:"bg-primary/5 font-bold border-t-2 border-primary/20",children:o.map((u,g)=>(0,x.jsx)("td",{className:`${p} align-middle text-primary/90 whitespace-normal break-words`,style:{textAlign:u.align||"left"},children:m(u,l)},g))})]})]})}):(0,x.jsxs)("div",{className:"py-12 text-center text-muted-foreground/50 italic flex flex-col items-center gap-2",children:[(0,x.jsx)("div",{className:"w-12 h-12 rounded-full bg-muted/30 flex items-center justify-center",children:(0,x.jsx)(It.InfoCircleOutlined,{className:"text-xl opacity-20"})}),(0,x.jsx)("span",{children:"\u6682\u65E0\u6570\u636E"})]}),!r&&c&&(0,x.jsxs)("div",{className:"py-2 text-[10px] text-muted-foreground/40 italic text-right px-4 border-t border-border/10",children:["Total ",i.length," rows"]})]})},vr=v(In,{schema:Te,skeleton:{rows:4}});var me=require("react/jsx-runtime");function On(t){let e=t?.theme?{"data-theme":t.theme}:{};return re({metric:(r,o)=>(0,me.jsx)(gr,{node:r,...e},o),card:(r,o)=>(0,me.jsx)(fr,{node:r,...e},o),list:(r,o)=>(0,me.jsx)(hr,{node:r,...e},o),toc:(r,o)=>(0,me.jsx)(xr,{node:r,...e},o),table:(r,o)=>(0,me.jsx)(vr,{node:r,...e},o)})}var pe=require("@ant-design/icons"),Sr=S(require("react-countup"),1);var _=require("react/jsx-runtime"),wr=(t,e)=>{if(t==null)return null;let n=t>0,r=t===0,o=n?"text-success bg-success/5":r?"text-muted-foreground/40":"text-destructive bg-destructive/5",a=n?pe.ArrowUpOutlined:r?pe.MinusOutlined:pe.ArrowDownOutlined;return(0,_.jsxs)("div",{className:`flex items-center px-2 py-0.5 rounded-full ${o} text-[11px] font-bold border border-current/10 transition-all shadow-sm`,children:[(0,_.jsx)("span",{className:"opacity-70 mr-1",children:e}),(0,_.jsx)(a,{className:"mr-0.5 text-xs"}),Math.abs(t),"%"]})},En=t=>{let{value:e,wow:n,yoy:r,unit:o="",prefix:a="",footer:s,precision:i}=t;return(0,_.jsxs)("div",{className:"flex flex-col",children:[(0,_.jsxs)("div",{className:"text-metric-lg font-black my-2 bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground to-foreground/70 group-hover:from-primary group-hover:to-pink-500 transition-all duration-500 tracking-tighter",children:[(0,_.jsx)("span",{className:"text-2xl mr-1 text-muted-foreground/60 font-bold align-baseline",children:a}),(0,_.jsx)(Sr.default,{end:Number(e)||0,decimals:i,separator:",",duration:2.5}),(0,_.jsx)("span",{className:"text-base ml-1 font-semibold text-muted-foreground/50 align-baseline",children:o})]}),(0,_.jsxs)("div",{className:"flex space-x-2 mt-2",children:[wr(n,"\u73AF\u6BD4"),wr(r,"\u540C\u6BD4")]}),s&&(0,_.jsx)("div",{className:"mt-card-gap pt-2 border-t border-border/40 text-[10px] text-muted-foreground italic whitespace-pre-wrap leading-normal",children:s})]})},Mr=v(En,{schema:je,getTitle:t=>t.title||t.label,skeleton:{rows:2}});var Nr=require("react");var Qe=require("antd"),Lr=require("@ant-design/plots");var B=require("react/jsx-runtime"),jn=({item:t})=>{let[e,n]=(0,Nr.useState)(!1),{label:r,value:o,wow:a,trendData:s=[]}=t,c={data:s.map((l,m)=>({index:m,value:l})),xField:"index",yField:"value",height:30,padding:0,axis:!1,legend:!1,tooltip:!1,smooth:!0,line:{style:{stroke:"hsl(var(--primary))",lineWidth:2}}};return(0,B.jsxs)("div",{className:"p-3 border border-border/60 rounded-lg hover:shadow-card hover:border-primary/30 transition-all relative bg-muted/40 text-card-foreground min-h-[6rem] flex flex-col justify-between group overflow-hidden",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[(0,B.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-transparent group-hover:bg-primary/20 transition-colors"}),(0,B.jsxs)("div",{className:"relative z-10",children:[(0,B.jsx)("div",{className:"text-muted-foreground text-xs mb-1 font-medium whitespace-normal break-words",children:r}),(0,B.jsxs)("div",{className:"flex items-end justify-between flex-wrap",children:[(0,B.jsx)("span",{className:"text-xl font-bold tracking-tight whitespace-normal break-words",children:o}),a!==void 0&&(0,B.jsx)("div",{className:`w-2 h-2 rounded-full ${a>0?"bg-success":a<0?"bg-destructive":"bg-muted"} shadow-[0_0_6px_rgba(var(--primary),0.2)]`,title:`\u73AF\u6BD4: ${a}%`})]})]}),s.length>0&&(0,B.jsx)("div",{className:`absolute bottom-0 left-0 right-0 h-8 transition-opacity duration-300 ${e?"opacity-100":"opacity-40"}`,children:(0,B.jsx)(Lr.Line,{...c})})]})},$n=t=>{let{items:e=[]}=t,n=e.length>0?Math.floor(24/Math.min(e.length,4)):6;return(0,B.jsx)(Qe.Row,{gutter:[16,16],children:e.map((r,o)=>(0,B.jsx)(Qe.Col,{span:n,children:(0,B.jsx)(jn,{item:r})},o))})},kr=v($n,{schema:$e,skeleton:{rows:2}});var et=S(require("react"),1),Pr=require("antd"),Xr=require("react-csv"),Rr=require("@ant-design/icons");var J=require("react/jsx-runtime"),Bn=t=>{let{title:e,columns:n=[],rows:r=[],dataSource:o=[]}=t,a=o.length>0?o:r,s=et.default.useMemo(()=>a.map((l,m)=>({...l,__xcml_row_key:l.__xcml_key||l.id||`row-${m}`})),[a]),i=et.default.useMemo(()=>n.map(l=>({...l,dataIndex:l.key||l.dataIndex,title:l.title,ellipsis:!1,className:"whitespace-normal break-words",render:m=>(0,J.jsx)("div",{className:"whitespace-normal break-words",children:m})})),[n]),c=et.default.useMemo(()=>i.map(l=>({label:l.title,key:l.dataIndex})),[i]);return(0,J.jsxs)("div",{className:"flex flex-col",children:[(0,J.jsx)("div",{className:"flex justify-end mb-2",children:(0,J.jsxs)(Xr.CSVLink,{data:s,headers:c,filename:`${e||"snapshot"}.csv`,className:"inline-flex items-center px-3 py-1 text-sm font-medium rounded border border-border bg-card text-card-foreground hover:bg-muted transition-colors",children:[(0,J.jsx)(Rr.DownloadOutlined,{className:"mr-1"})," \u5BFC\u51FACSV"]})}),(0,J.jsx)("div",{className:"text-foreground",children:(0,J.jsx)(Pr.Table,{columns:i,dataSource:s,rowKey:"__xcml_row_key",pagination:{pageSize:5},scroll:{y:300,x:"100%"},className:"w-full [&_.ant-table]:!w-full [&_.ant-table-container]:!w-full",bordered:!0,size:"small",rowClassName:(l,m)=>m%2!==0?"bg-muted/20":"hover:bg-muted/30 transition-colors"})})]})},Tr=v(Bn,{schema:De,skeleton:{rows:5}});var ue=require("antd"),Fr=S(require("react-highlight-words"),1),tt=require("@ant-design/icons");var $=require("react/jsx-runtime"),{Title:Di}=ue.Typography,Ar={positive:"\u{1F4C8}",negative:"\u{1F4C9}",neutral:"\u{1F610}",insight:"\u{1F4A1}",warning:"\u26A0\uFE0F",success:"\u2705",error:"\u274C",insight_pro:"\u{1F48E}"},Dn={positive:"text-green-500",negative:"text-red-500",warning:"text-amber-500",error:"text-red-600",success:"text-green-600",insight:"text-indigo-500"},Wn=t=>{let{content:e="",highlights:n=[],sentiment:r="insight",citations:o=[],actions:a=[]}=t,s=te(n),i=te(o),c=te(a),l=m=>{Se.emit("action_click",{action:m,source:"insight_card"})};return(0,$.jsxs)("div",{className:"space-y-4",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$.jsx)("div",{className:"text-xl shrink-0",children:Ar[r]||"\u{1F4A1}"}),(0,$.jsx)("div",{className:`text-base leading-normal whitespace-pre-wrap ${Dn[r]||"text-foreground"}`,children:(0,$.jsx)(Fr.default,{highlightClassName:"bg-primary/15 text-primary font-bold px-1 rounded-md mx-0.5",searchWords:s,autoEscape:!0,textToHighlight:e})})]}),i.length>0&&(0,$.jsx)("div",{className:"pt-2 border-t border-dashed border-border flex flex-wrap gap-2",children:i.map((m,d)=>(0,$.jsx)(ue.Tag,{icon:(0,$.jsx)(tt.LinkOutlined,{}),className:"m-0 bg-secondary/50 border-none rounded px-2 py-0.5 text-xs",children:m},d))}),c.length>0&&(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsxs)("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[(0,$.jsx)(tt.ThunderboltOutlined,{className:"text-amber-500"}),"\u5EFA\u8BAE\u884C\u52A8"]}),(0,$.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map((m,d)=>(0,$.jsx)(ue.Button,{size:"small",className:"text-xs h-7 px-3 rounded-full hover:border-primary hover:text-primary transition-all",onClick:()=>l(m),children:m},d))})]})]})},Ir=v(Wn,{schema:Oe,getTitle:t=>t.title||"\u6570\u636E\u6D1E\u5BDF",getIcon:t=>t.icon||Ar[t.sentiment]||"\u{1F4A1}",skeleton:{rows:4}});var nt=require("react"),U=require("antd"),ot=require("@ant-design/icons"),Or=S(require("html2canvas"),1),ye=require("@ant-design/plots");var w=require("react/jsx-runtime"),rt=[{label:"\u79D1\u6280\u84DD",value:"#1890ff",bg:"#f0f5ff"},{label:"\u6D3B\u529B\u6A59",value:"#fa8c16",bg:"#fff7e6"},{label:"\u6E05\u65B0\u7EFF",value:"#52c41a",bg:"#f6ffed"},{label:"\u6697\u591C\u7D2B",value:"#722ed1",bg:"#f9f0ff"},{label:"\u5546\u52A1\u7070",value:"#595959",bg:"#f5f5f5"}],qn=t=>{let{title:e="\u6570\u636E\u6D77\u62A5",subTitle:n="Data Insight Poster",charts:r=[],qrCode:o="https://ant.design",author:a="ChatBI",date:s=new Date().toLocaleDateString(),backgroundImage:i,themeColor:c}=t,l=typeof i=="string"?i.trim().replace(/^[`'" ]|[`'" ]$/g,"").trim().replace(/^[`'" ]|[`'" ]$/g,""):void 0,m=(0,nt.useRef)(null),[d,p]=(0,nt.useState)(rt[0]),h=c||d.value,C=c?`${c}10`:d.bg,u=async()=>{if(m.current)try{let f=(await(0,Or.default)(m.current,{useCORS:!0,scale:2,backgroundColor:d.bg})).toDataURL("image/png"),b=document.createElement("a");b.href=f,b.download=`poster-${Date.now()}.png`,b.click()}catch(y){console.error("Poster generation failed",y)}},g=(y,f)=>{let b={data:y.data,height:200,autoFit:!0};return y.type==="column"||y.type==="bar"?(0,w.jsx)(ye.Column,{...b,xField:"label",yField:"value"},f):y.type==="line"?(0,w.jsx)(ye.Line,{...b,xField:"label",yField:"value"},f):y.type==="pie"?(0,w.jsx)(ye.Pie,{...b,angleField:"value",colorField:"label"},f):null};return(0,w.jsxs)("div",{className:"flex flex-col",children:[(0,w.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,w.jsx)(U.Space,{children:(0,w.jsx)(U.Select,{value:d.value,onChange:y=>p(rt.find(f=>f.value===y)||rt[0]),options:rt,style:{width:120},suffixIcon:(0,w.jsx)(ot.BgColorsOutlined,{})})}),(0,w.jsx)(U.Button,{type:"primary",icon:(0,w.jsx)(ot.DownloadOutlined,{}),onClick:u,children:"\u751F\u6210\u6D77\u62A5"})]}),(0,w.jsx)("div",{className:"flex-1 overflow-auto border border-border rounded-lg shadow-sm bg-muted/10 min-h-0 flex flex-col",children:(0,w.jsxs)("div",{ref:m,className:"p-8 w-full mx-auto transition-colors duration-300 flex flex-col shrink-0",style:{backgroundColor:C,backgroundImage:l?`url(${l})`:void 0,backgroundSize:"cover",backgroundPosition:"center",color:"#333",minHeight:"100%"},children:[(0,w.jsxs)("div",{className:"mb-6 text-center",children:[(0,w.jsx)("h1",{className:"text-2xl font-bold mb-2",style:{color:h},children:e}),(0,w.jsx)("p",{className:"text-sm opacity-70",children:n})]}),(0,w.jsx)("div",{className:"space-y-6 mb-8",children:r.map((y,f)=>(0,w.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow-sm opacity-90",children:[(0,w.jsx)("h4",{className:"font-medium mb-2 text-center",children:y.title}),g(y,f)]},f))}),(0,w.jsxs)("div",{className:"flex items-center justify-between mt-auto pt-8 border-t border-border/40 border-dashed",children:[(0,w.jsxs)("div",{className:"text-xs text-muted-foreground",children:[(0,w.jsxs)("p",{children:["Created by ",a]}),(0,w.jsx)("p",{children:s})]}),(0,w.jsx)("div",{className:"bg-white p-1 rounded",children:(0,w.jsx)(U.QRCode,{value:o,size:64,bordered:!1})})]})]})})]})},Er=v(qn,{schema:Be,skeleton:{rows:4}});var at=require("antd"),Y=require("@ant-design/icons");var L=require("react/jsx-runtime"),{Text:_n}=at.Typography,zn=t=>{switch(t){case"success":return(0,L.jsx)(Y.CheckCircleFilled,{className:"text-success bg-card rounded-full relative z-10 shadow-sm"});case"failure":return(0,L.jsx)(Y.CloseCircleFilled,{className:"text-destructive bg-card rounded-full relative z-10 shadow-sm"});case"running":return(0,L.jsx)(Y.LoadingOutlined,{className:"text-primary bg-card rounded-full relative z-10"});default:return(0,L.jsx)(Y.ClockCircleFilled,{className:"text-muted-foreground/40 bg-card rounded-full relative z-10"})}},Vn=t=>{switch(t){case"success":return"\u6210\u529F";case"failure":return"\u5931\u8D25";case"running":return"\u6267\u884C\u4E2D";default:return t}},Hn=t=>{switch(t){case"success":return"success";case"failure":return"error";case"running":return"processing";default:return"default"}},Kn=t=>{let{steps:e=[]}=t;return(0,L.jsxs)("div",{className:"relative pl-2 py-2",children:[(0,L.jsx)("div",{className:"absolute top-4 bottom-4 left-[15px] w-0.5 bg-gradient-to-b from-primary/10 via-primary/30 to-primary/10"}),e.map((n,r)=>(0,L.jsxs)("div",{className:"relative flex mb-6 last:mb-0 group",children:[(0,L.jsx)("div",{className:"mr-4 mt-0.5 text-lg transition-transform duration-300 group-hover:scale-110",children:zn(n.status)}),(0,L.jsxs)("div",{className:"flex-1 min-w-0 bg-card rounded-xl p-3 border border-border/50 hover:border-primary/30 hover:shadow-md transition-all duration-300 group-hover:-translate-y-0.5",children:[(0,L.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[(0,L.jsx)("span",{className:"font-bold text-sm text-foreground",children:n.tool||`\u6B65\u9AA4 ${r+1}`}),(0,L.jsx)(_n,{type:"secondary",className:"text-xs text-muted-foreground",children:n.action})]}),(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[n.duration&&(0,L.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-muted px-1.5 py-0.5 rounded-md",children:n.duration}),(0,L.jsx)(at.Tag,{color:Hn(n.status),variant:"filled",className:"mr-0 text-[10px] px-1.5 rounded-full border-none",children:Vn(n.status)})]})]}),n.thought&&(0,L.jsx)("div",{className:"mb-2 text-xs text-muted-foreground italic border-l-2 border-primary/30 pl-2 py-1 bg-primary/5 rounded-r-md whitespace-pre-wrap leading-normal",children:n.thought}),n.result&&(0,L.jsx)("div",{className:"mt-2 text-xs",children:(0,L.jsx)("div",{className:"bg-muted/30 border border-border/40 rounded-lg p-2 overflow-x-auto custom-scrollbar",children:(0,L.jsx)("pre",{className:"m-0 whitespace-pre-wrap font-mono text-[11px] text-muted-foreground leading-relaxed",children:typeof n.result=="string"?n.result:JSON.stringify(n.result,null,2)})})}),n.error&&(0,L.jsxs)("div",{className:"mt-2 text-xs text-destructive bg-destructive/5 p-2 rounded-lg border border-destructive/20 whitespace-pre-wrap",children:["\u9519\u8BEF: ",n.error]})]})]},r))]})},jr=v(Kn,{schema:We,getTitle:t=>t.title||"\u601D\u7EF4\u94FE",skeleton:!0});var Pe=require("react"),G=require("antd"),Z=require("@ant-design/icons");var $r=S(require("react-highlight-words"),1);var R=require("react/jsx-runtime"),Jn=t=>{let{message:e}=G.App.useApp(),{label:n="\u62A5\u544A\u6458\u8981",value:r=0,step:o=1,unit:a="",actionId:s="update_summary",content:i="",highlightKeywords:c=[]}=t,[l,m]=(0,Pe.useState)(Number(r)||0),[d,p]=(0,Pe.useState)(!1);(0,Pe.useEffect)(()=>{m(Number(r)||0)},[r]);let h=te(c),C=g=>{m(g)};return(0,R.jsxs)("div",{className:"flex flex-col",children:[i&&(0,R.jsx)("div",{className:"mb-4 text-muted-foreground leading-normal whitespace-pre-wrap",children:(0,R.jsx)($r.default,{highlightClassName:"bg-primary/20 text-primary rounded px-1 font-medium",searchWords:h,autoEscape:!0,textToHighlight:i})}),(0,R.jsxs)("div",{className:"flex items-center justify-between",children:[(0,R.jsxs)("div",{children:[(0,R.jsx)("div",{className:"text-muted-foreground mb-1 text-xs font-medium uppercase tracking-wider",children:n}),(0,R.jsxs)("div",{className:"text-3xl font-black text-foreground flex items-baseline tracking-tight",children:[l,(0,R.jsx)("span",{className:"text-sm font-semibold text-muted-foreground/60 ml-1.5",children:a})]})]}),(0,R.jsxs)("div",{className:"flex items-center space-x-1 bg-muted/40 p-1.5 rounded-xl border border-border/30 shadow-inner",children:[(0,R.jsx)(G.Button,{icon:(0,R.jsx)(Z.MinusOutlined,{}),size:"small",shape:"circle",type:"text",className:"hover:bg-background hover:text-primary hover:shadow-sm",onClick:()=>C(l-Number(o)),disabled:d}),(0,R.jsx)(G.InputNumber,{value:l,onChange:g=>C(Number(g)),variant:"borderless",className:"w-20 text-center bg-transparent font-bold text-foreground",controls:!1,disabled:d}),(0,R.jsx)(G.Button,{icon:(0,R.jsx)(Z.PlusOutlined,{}),size:"small",shape:"circle",type:"text",className:"hover:bg-background hover:text-primary hover:shadow-sm",onClick:()=>C(l+Number(o)),disabled:d}),(0,R.jsx)("div",{className:"w-px h-4 bg-border/50 mx-1"}),(0,R.jsx)(G.Button,{type:"primary",size:"small",shape:"round",icon:d?(0,R.jsx)(Z.LoadingOutlined,{}):(0,R.jsx)(Z.SaveOutlined,{}),onClick:async()=>{p(!0);try{Se.emit("action",{type:s,payload:{value:l,label:n,...t}}),await new Promise(g=>setTimeout(g,800)),e.success(`\u5DF2\u66F4\u65B0 ${n} \u8BBE\u5B9A\u503C`)}catch{e.error("\u63D0\u4EA4\u5931\u8D25")}finally{p(!1)}},loading:d,className:"ml-1 px-3 shadow-md shadow-primary/20 hover:shadow-primary/40 transition-all",children:"\u4FDD\u5B58"})]})]})]})},Br=v(Jn,{schema:Ee,getTitle:t=>t.label,skeleton:{rows:2}});var Q=require("react/jsx-runtime");function Un(t){let e=t?.theme?{"data-theme":t.theme}:{};return re({metric:(o,a)=>(0,Q.jsx)(Mr,{node:o,...e},a),"mini-kpi":(o,a)=>(0,Q.jsx)(kr,{node:o,...e},a),snapshot:(o,a)=>(0,Q.jsx)(Tr,{node:o,...e},a),insight:(o,a)=>(0,Q.jsx)(Ir,{node:o,...e},a),"poster-card":(o,a)=>(0,Q.jsx)(Er,{node:o,...e},a),thought:(o,a)=>(0,Q.jsx)(jr,{node:o,...e},a),summary:(o,a)=>(0,Q.jsx)(Br,{node:o,...e},a)},{metric:["metric-card"],"mini-kpi":["mini-kpi-strip"],snapshot:["snapshot-table","table-snapshot"],insight:["insight-card"],"poster-card":["poster"],thought:["thought-chain"],summary:["interactive-summary"]})}0&&(module.exports={AntVChartLoader,COMMON_PROPS,DefaultEmptyPlaceholder,DefaultErrorPlaceholder,ThemeProvider,XCMLCardWrapper,XCMLChart,XCMLEventBus,XCMLMarkdown,XCML_SCHEMAS,buildConfig,chartSchema,cleanPropsBySchema,columnChartSchema,columnStrategy,createAntVRenderers,createBasicRenderers,createExtendedRenderers,createRenderersWithAliases,deepMerge,dualAxesChartSchema,dualAxesStrategy,extractBaseStyles,funnelChartSchema,funnelStrategy,getChartStrategy,getTheme,lineChartSchema,lineStrategy,mergePropsAndBody,normalizeNodeData,normalizeTagName,parse,parseArrayProp,parseInlineData,parseXCML,pieChartSchema,pieStrategy,preprocessXCML,renderXCML,strategies,stringify,stringifyToXCML,themeDark,themeLight,themeMap,toXCMLNodeFromElement,toXCMLTag,toXTag,useTheme,useXCMLComponent,useXCMLNode,validateDataSchema,validateXCMLNode,withXCMLCard,xcmlBus});
31
- //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -28,4 +28,3 @@ ${y}
28
28
  `).trim()}import X from"react";import{XMarkdown as fr}from"@ant-design/x-markdown";import{Button as hr,Modal as br,Tooltip as xr}from"antd";import{CodeOutlined as Cr}from"@ant-design/icons";import De,{createContext as ut,useContext as yt,useState as yr,useCallback as mt}from"react";import{jsx as pt}from"react/jsx-runtime";var gt=ut([]),ft=ut({register:()=>{},unregister:()=>{}}),gr=()=>yt(gt),We=()=>yt(ft),ht=()=>{let t=gr(),{register:e,unregister:n}=We();return{items:t,register:e,unregister:n}},bt=({children:t})=>{let[e,n]=yr(new Map),r=De.useRef(0),o=mt(c=>{n(l=>{let m=new Map(l),d=m.get(c.id);return d&&d.title===c.title&&d.level===c.level?l:(m.set(c.id,{...c,index:d?d.index:r.current++}),m)})},[]),a=mt(c=>{n(l=>{let m=new Map(l);return m.delete(c)?m:l})},[]),s=De.useMemo(()=>Array.from(e.values()).sort((c,l)=>c.index-l.index),[e]),i=De.useMemo(()=>({register:o,unregister:a}),[o,a]);return pt(ft.Provider,{value:i,children:pt(gt.Provider,{value:s,children:t})})};import{clsx as vr}from"clsx";import{twMerge as ze}from"tailwind-merge";import{jsx as L,jsxs as Ct}from"react/jsx-runtime";function xt(t){let{content:e,stream:n,renderers:r,className:o,style:a,openLinksInNewTab:s,dompurifyConfig:i,enableHoverSource:c=!1,theme:l}=t,m=X.useDeferredValue(e),d=X.useMemo(()=>{let u=r?Object.keys(r).map(g=>g.startsWith("xcml:")?`x-${g.slice(5)}`:g):[];return m?dt(m,u):""},[m,r]),p=X.useMemo(()=>new WeakMap,[]),h=X.useMemo(()=>{let u={};if(r){let y=new Set;Object.keys(r).forEach(f=>{let b=f.startsWith("xcml:"),w=f.startsWith("x-");if(b||w){let M=b?`x-${f.slice(5)}`:f;y.add(M);let N=r[f];u[M]=T=>{let{domNode:S,className:E,streamStatus:B,node:Q,children:O,...k}=T,z=p.get(S);if(!z){let ee="",Oe=k["data-xcml-raw"];if(Oe)try{ee=decodeURIComponent(escape(atob(Oe)))}catch(rt){console.error("[XCML] Failed to decode raw body:",rt),ee=_e(S?.children||[])}else ee=_e(S?.children||[]);let tt=b?f.slice(5):f.slice(2);z=Be(tt,k,ee),p.set(S,z)}let P={...z};k["data-xcml-loading"]==="true"?P.streamStatus="loading":P.streamStatus=B;let et=N(P,k.key??M);return L(wr,{tag:M,node:P,className:E,enableHoverSource:c,children:et})}}})}u.pre=y=>{let{domNode:f,streamStatus:b,node:w,...M}=y,N=(f?.children||[]).find(E=>E?.name==="code"),T=[N?.attribs?.class,N?.attribs?.classname,N?.attribs?.className].filter(Boolean).join(" ");if(/language-mermaid/.test(T)){let E=_e(N?.children||[]),B=E.split("").reduce((O,k)=>(O=(O<<5)-O+k.charCodeAt(0),O&O),0),Q=`m-${Math.abs(B)}`;return L(Sr,{id:Q,code:E,theme:l},y.key)}return X.createElement("pre",M,y.children)},u.p=y=>{let{domNode:f,node:b,children:w,streamStatus:M,...N}=y;return f?.children?.some(S=>S.type==="tag"&&(["div","p","pre","blockquote","table","ul","ol","h1","h2","h3","h4","h5","h6","form","fieldset","address"].includes(S.name)||S.name&&S.name.startsWith("x-")))||b?.children?.some(S=>S.tagName==="div"||S.tagName&&S.tagName.startsWith("x-"))?L("div",{...N,className:ze("mb-4 w-full",N.className),children:w}):L("p",{...N,children:w})};let g=X.memo(({level:y,children:f,domNode:b,streamStatus:w,node:M,...N})=>{let{register:T,unregister:S}=We(),E=X.useCallback(P=>typeof P=="string"?P:Array.isArray(P)?P.map(E).join(""):X.isValidElement(P)?E(P.props.children):"",[]),B=E(f),Q=X.useMemo(()=>B.trim().toLowerCase().replace(/\s+/g,"-"),[B]),O=N.id||Q||`h${y}-${Math.random().toString(36).slice(2,9)}`,k=X.useRef(null);X.useEffect(()=>{if(!T)return;let P={id:O,title:B,level:y};return(!k.current||k.current.id!==P.id||k.current.title!==P.title||k.current.level!==P.level)&&(k.current&&S?.(k.current.id),T(P),k.current=P),()=>{k.current&&(S?.(k.current.id),k.current=null)}},[O,B,y,T,S]);let z=`h${y}`;return Ct(z,{id:O,className:"scroll-mt-20 group relative",...N,children:[f,c&&L("a",{href:`#${O}`,className:"ml-2 opacity-0 group-hover:opacity-100 text-muted-foreground transition-opacity no-underline",children:"#"})]})});return u.h1=y=>L(g,{level:1,...y}),u.h2=y=>L(g,{level:2,...y}),u.h3=y=>L(g,{level:3,...y}),u.h4=y=>L(g,{level:4,...y}),u.h5=y=>L(g,{level:5,...y}),u.h6=y=>L(g,{level:6,...y}),u},[r,c,l]);return L(bt,{children:L(fr,{content:d,streaming:n?{hasNextChunk:!0}:void 0,components:h,className:ze(vr("prose w-full max-w-none prose-headings:text-foreground prose-p:text-foreground prose-li:text-foreground prose-strong:text-foreground prose-code:text-foreground prose-th:text-foreground prose-td:text-foreground prose-a:text-primary prose-code:bg-muted/50 prose-code:rounded prose-code:px-1 prose-code:py-0.5 prose-pre:bg-muted/50 prose-pre:text-foreground",o)),style:a,openLinksInNewTab:s,dompurifyConfig:i})})}function wr({children:t,tag:e,node:n,className:r,enableHoverSource:o}){let[a,s]=X.useState(!1),[i,c]=X.useState(!1),l=d=>{d.stopPropagation(),c(!0)},m=X.useMemo(()=>{let d=Object.entries(n.attributes||{}).map(([p,h])=>`${p}="${h}"`).join(" ");return`<${e}${d?" "+d:""}>${n.children?`
29
29
  `+n.children+`
30
30
  `:""}</${e}>`},[e,n]);return Ct("div",{className:ze("not-prose w-full max-w-full overflow-x-hidden overflow-y-visible custom-scrollbar flex flex-col relative",r),onMouseEnter:()=>o&&s(!0),onMouseLeave:()=>o&&s(!1),children:[t,a&&o&&L(xr,{title:"\u67E5\u770B\u6E90\u7801",children:L(hr,{icon:L(Cr,{}),size:"small",className:"absolute top-1 right-1 z-10 opacity-80",onClick:l})}),L(br,{open:i,onCancel:()=>c(!1),footer:null,width:800,centered:!0,title:`${e} \u6E90\u7801`,destroyOnHidden:!0,children:L("pre",{className:"bg-muted p-4 rounded-lg overflow-auto max-h-[500px] text-sm text-foreground",children:m})})]})}var qe=new WeakMap;function _e(t){if(!t)return"";if(qe.has(t))return qe.get(t);let e=[],n=o=>{o?.forEach(a=>{a&&(a.type==="text"&&typeof a.data=="string"&&e.push(a.data),Array.isArray(a.children)&&n(a.children))})};n(t);let r=e.join("");return qe.set(t,r),r}var Sr=X.memo(({code:t,theme:e,id:n})=>{let r=X.useRef(null);return X.useEffect(()=>{!r.current||!t||import("mermaid").then(o=>{o.default.initialize({startOnLoad:!0,theme:e==="dark"?"dark":"default",securityLevel:"loose"});let a=n||`mermaid-${Math.random().toString(36).slice(2)}`;o.default.render(a,t).then(({svg:s})=>{r.current&&(r.current.innerHTML=s)})})},[t,e,n]),L("div",{ref:r,className:"mermaid w-full flex justify-center my-4"})});import Qr,{useMemo as Je,Suspense as en,forwardRef as tn}from"react";import*as rn from"@ant-design/plots";import{Skeleton as $t}from"antd";import{createContext as Mr,useContext as Nr,useEffect as Lr,useState as kr,useMemo as Pr,useRef as Xr}from"react";import{XProvider as Rr}from"@ant-design/x";import{theme as vt}from"antd";import{jsx as Ve}from"react/jsx-runtime";var Tr={theme:"light",setTheme:()=>null},wt=Mr(Tr);function ni({children:t,defaultTheme:e="light",theme:n,primaryColor:r="#6366f1",storageKey:o="xcml-ui-theme",scoped:a=!0,className:s,style:i,...c}){let[l,m]=kr(()=>localStorage.getItem(o)||e),d=n??l,p=Xr(null);Lr(()=>{let u=a?p.current:window.document.documentElement;if(!u)return;if(u.style.setProperty("--primary",r),r.startsWith("#")){let y=parseInt(r.slice(1,3),16),f=parseInt(r.slice(3,5),16),b=parseInt(r.slice(5,7),16);u.style.setProperty("--primary-rgb",`${y}, ${f}, ${b}`)}u.classList.remove("light","dark"),u.removeAttribute("data-theme");let g=["ocean","sunset","lavender","rose","amber","midnight","forest","slate","crimson","cyan"];if(d==="system"){let y=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(y);return}if(d==="dark"){u.classList.add("dark");return}if(d==="light"){u.classList.add("light");return}if(g.includes(d)){u.setAttribute("data-theme",d);return}},[d,a]);let h={theme:d,setTheme:u=>{localStorage.setItem(o,u),m(u)}},x=Pr(()=>({algorithm:d==="dark"||d==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?vt.darkAlgorithm:vt.defaultAlgorithm,token:{colorPrimary:r,colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#e11d48",colorInfo:"#0ea5e9",borderRadius:8,fontFamily:'"Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'}}),[d,r]);return Ve(wt.Provider,{value:h,...c,children:Ve(Rr,{theme:x,children:Ve("div",{ref:p,className:`xcml-scope ${s||""}`,style:{color:"inherit",background:"inherit",...i},children:t})})})}var St=()=>{let t=Nr(wt);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var Fr={label:{style:{fillOpacity:.65,fontSize:12}},title:{style:{fontSize:12,fillOpacity:.85}},grid:{line:{style:{stroke:"#d0d0d0",lineWidth:1,lineDash:[4,4],strokeOpacity:.7}}}},Ar={label:{style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12}},title:{style:{fill:"rgba(255, 255, 255, 0.85)",fontSize:12}},grid:{line:{style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:[4,4]}}}},He={defaultColor:"#8b5cf6",colors10:["#8b5cf6","#f472b6","#0ea5e9","#fbbf24","#34d399","#f87171","#60a5fa","#a78bfa","#2dd4bf","#fb923c"],styleSheet:{backgroundColor:"transparent"},components:{axis:{common:Fr},tooltip:{style:{backgroundColor:"rgba(255, 255, 255, 0.95)",boxShadow:"0 8px 24px -6px rgba(0, 0, 0, 0.12)",color:"#1e293b",borderRadius:"16px",padding:"12px 16px",border:"1px solid rgba(226, 232, 240, 0.8)",backdropFilter:"blur(4px)"}},legend:{common:{itemStates:{active:{labelStyle:{fontWeight:600,fill:"#8b5cf6"}}}}}}},Ir={defaultColor:"#a78bfa",colors10:["#a78bfa","#f472b6","#38bdf8","#fbbf24","#34d399","#f87171","#60a5fa","#c4b5fd","#2dd4bf","#fb923c"],styleSheet:{backgroundColor:"transparent"},components:{axis:{common:Ar},tooltip:{style:{backgroundColor:"rgba(30, 41, 59, 0.95)",boxShadow:"0 8px 24px -6px rgba(0, 0, 0, 0.3)",color:"#f1f5f9",borderRadius:"16px",padding:"12px 16px",border:"1px solid rgba(51, 65, 85, 0.8)",backdropFilter:"blur(4px)"}},legend:{common:{labelStyle:{fill:"rgba(255, 255, 255, 0.65)"}}}}},Or={light:He,dark:Ir,default:He};function Mt(t){return Or[t||"default"]||He}import Er from"react";var jr=Er.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Line}))),Nt={type:"line",schema:ye,getComponent:()=>jr,transformProps:t=>{let e={...t};return e.seriesField&&!e.colorField&&(e.colorField=e.seriesField),e}};import $r from"react";var Br=$r.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Column}))),Lt={type:"column",schema:ge,getComponent:()=>Br,transformProps:t=>{let e={...t};return e.seriesField&&!e.colorField&&(e.colorField=e.seriesField),e.scale?typeof e.scale=="object"&&!e.scale.x&&(e.scale.x={type:"band"}):e.scale={x:{type:"band"}},e}};import Dr from"react";var Wr=Dr.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Pie}))),kt={type:"pie",schema:fe,getComponent:()=>Wr,transformProps:t=>{let e={...t};if(delete e.xField,delete e.yField,delete e.seriesField,!e.angleField){let n=(e.data||[])[0]||{},r=Object.keys(n).find(o=>typeof n[o]=="number");r&&(e.angleField=r)}if(!e.colorField){let n=(e.data||[])[0]||{},r=Object.keys(n).find(o=>typeof n[o]=="string");r&&(e.colorField=r)}return e}};import qr from"react";var _r=qr.lazy(()=>import("@ant-design/plots").then(t=>({default:t.DualAxes}))),Pt={type:"dual-axes",schema:he,getComponent:()=>_r,transformProps:t=>{let e={...t};typeof e.width=="number"&&e.width<50&&delete e.width;let n=e.data||[],r=n.length>0?Object.keys(n[0]):[],o=!1;if(e.children&&e.children.length>0&&(o=e.children.every(i=>i.data&&i.data.length>0||r.length===0?!0:i.yField&&r.includes(i.yField)),!o&&r.length>0&&(e.children=[])),(!e.children||e.children.length===0)&&(Array.isArray(e.yField)&&e.yField.length>=2&&(r.length===0||e.yField.every(c=>r.includes(c)))&&(e.children=[{type:"interval",yField:e.yField[0]},{type:"line",yField:e.yField[1],style:{lineWidth:2}}]),(!e.children||e.children.length===0)&&n.length>0)){let i=e.xField,c=r.filter(l=>l!==i&&typeof n[0][l]=="number");c.length>=2?e.children=[{type:"interval",yField:c[0]},{type:"line",yField:c[1],style:{lineWidth:2}}]:c.length===1&&(e.children=[{type:"interval",yField:c[0]}])}let a=Array.isArray(e.data)&&e.data.length>0,s=Array.isArray(e.children)&&e.children.some(i=>i.data&&Array.isArray(i.data)&&i.data.length>0);if(!a&&s){let{data:i,...c}=e;return c}return e}};import zr from"react";var Vr=zr.lazy(()=>import("@ant-design/plots").then(t=>({default:t.Funnel}))),Xt={type:"funnel",schema:be,getComponent:()=>Vr,transformProps:t=>{let e={...t};!e.xField&&e.categoryField&&(e.xField=e.categoryField),!e.yField&&e.valueField&&(e.yField=e.valueField);let n=e.data||[];if(n.length>0){let o=n[0],a=Object.keys(o);e.xField||(e.xField=a.find(s=>typeof o[s]=="string")||"type"),e.yField||(e.yField=a.find(s=>typeof o[s]=="number")||"value"),e.colorField&&!(e.colorField in o)&&(e.xField&&e.xField in o?e.colorField=e.xField:delete e.colorField),e.seriesField&&!(e.seriesField in o)&&delete e.seriesField}e.axis&&delete e.axis;let r=["light","dark","academy"];return e.theme&&!r.includes(e.theme)&&delete e.theme,typeof e.width=="number"&&e.width<100&&delete e.width,e}};var Hr={line:Nt,column:Lt,pie:kt,"dual-axes":Pt,funnel:Xt};function Rt(t){return t&&Hr[t.toLowerCase()]||null}import Kr from"react";import{Empty as Tt,Button as Jr,Result as Ur}from"antd";import{jsx as ne}from"react/jsx-runtime";function Pe(t,e){if(typeof t!="object"||t===null)return e;if(typeof e!="object"||e===null)return t;let n=Array.isArray(t)?[...t]:{...t};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let o=e[r],a=n[r];typeof o=="object"&&o!==null&&typeof a=="object"&&a!==null&&!Kr.isValidElement(o)?n[r]=Pe(a,o):n[r]=o}return n}function Ft(t,e){if(!e)return t;let n={...t},r=[...e.props||[],...e.body||[]];return r.length===0?t:(r.forEach(o=>{let a=o.name;if(o.visibleIf&&!o.visibleIf(n)){delete n[a];return}if(o.default!==void 0&&n[a]===void 0?n[a]=o.default:o.default!==void 0&&typeof o.default=="object"&&o.default!==null&&(n[a]=Pe(o.default,n[a])),o.transform){let s=n[a];n[a]=o.transform(s,n)}}),n)}function At(t){let{type:e,data:n,theme:r,title:o,__native__:a,...s}=t,i={data:n||[],height:t.height||300,theme:r||"light",autoFit:t.autoFit!==!1,padding:"auto",appendPadding:[20,30,30,20]},c=Pe(Pe(i,s),a||{});return c.seriesField&&!c.colorField&&(c.colorField=c.seriesField),c.__native__={...c},c}var It=()=>ne("div",{className:"w-full h-full flex items-center justify-center border border-dashed border-border rounded-lg bg-muted/30",children:ne(Tt,{image:Tt.PRESENTED_IMAGE_SIMPLE,description:"\u6682\u65E0\u6570\u636E"})}),Ot=({error:t,reset:e})=>ne("div",{className:"w-full h-full flex items-center justify-center p-4 border border-dashed border-destructive/20 rounded bg-destructive/5",children:ne(Ur,{status:"error",title:"\u56FE\u8868\u52A0\u8F7D\u5931\u8D25",subTitle:t.message,extra:[ne(Jr,{type:"primary",onClick:e,children:"\u91CD\u8BD5"},"retry")]})});import Gr from"react";import{Skeleton as Zr}from"antd";import{clsx as Et}from"clsx";import{twMerge as Yr}from"tailwind-merge";import{jsx as oe,jsxs as Ke}from"react/jsx-runtime";var Xe=({title:t,icon:e,children:n,source:r,summary:o,variant:a="card",theme:s,hoverable:i=!0,className:c,domNode:l,streamStatus:m,node:d,label:p,value:h,footer:x,precision:u,layout:g,note:y,trend:f,trendValue:b,unit:w,prefix:M,wow:N,yoy:T,sentiment:S,highlights:E,citations:B,actions:Q,steps:O,columns:k,rows:z,charts:P,data:et,subTitle:ee,themeColor:Oe,backgroundImage:tt,qrCode:rt,author:Ao,date:Io,...nr})=>{let K=a==="plain",or=s??d?.props?.theme??d?.data?.theme,ar=Yr(Et("xcml-scope xcml-card not-prose max-w-full min-w-0 group",K?"p-1":"rounded-xl border border-border/80 bg-card/50 backdrop-blur-sm shadow-sm p-card mb-6 overflow-hidden","relative transition-all duration-300 ease-out hover:ease-in-out",c,i&&!K?"hover:shadow-md hover:border-primary/50 hover:bg-card/80":""));return Ke("div",{className:ar,"data-theme":or,...nr,children:[t&&Ke("div",{className:"relative mb-4",children:[!K&&oe("div",{className:"absolute -top-3 -inset-x-4 h-1 bg-gradient-to-r from-primary via-primary/60 to-primary/20 opacity-0 transition-all duration-300 group-hover:opacity-100 rounded-full scale-x-95 group-hover:scale-x-100"}),oe("div",{className:"flex items-center justify-between pb-3 border-b border-border/80",children:Ke("h3",{className:"text-lg font-bold text-foreground leading-snug tracking-tight flex items-center gap-3 whitespace-normal break-words flex-1",children:[!K&&e&&oe("span",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 text-primary border border-primary/20 shadow-sm",children:e}),!K&&!e&&oe("span",{className:"w-1.5 h-6 rounded-full bg-primary shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]"}),t]})})]}),oe("div",{className:Et("xcml-card-body",!K&&"mt-1"),children:n})]})};import{jsx as Re}from"react/jsx-runtime";function C(t,e={}){let{schema:n,getTitle:r,getIcon:o,getVariant:a,renderLoading:s,skeleton:i=!0}=e,c=Gr.forwardRef((m,d)=>{let{merged:p,baseProps:h,isLoading:x,streamStatus:u}=it(m,n);p.delta!==void 0&&p.trendValue===void 0&&(p.trendValue=p.delta);let{className:g,...y}=m,f=r?r(p):p.title,b;f&&(typeof f=="string"?b=f:typeof f=="object"&&(Array.isArray(f)?b=void 0:b=f.text||f.content||JSON.stringify(f)));let w=o?o(p):p.icon,M=a?a(p):h.variant||"card",N=p.hoverable!==void 0?p.hoverable:!0,T={title:b,icon:w,variant:M,hoverable:N,className:g,node:m.node,streamStatus:u,...y};return x?Re(Xe,{...T,children:s?s(p):i?Re(Zr,{active:!0,paragraph:{rows:typeof i=="object"?i.rows:2}}):null}):Re(Xe,{...T,children:Re(t,{...p,ref:d})})}),l=t.displayName||t.name||"Component";return c.displayName=`withXCMLCard(${l})`,c}import{jsx as j,jsxs as sn}from"react/jsx-runtime";import{createElement as ln}from"react";var nn=t=>typeof t!="string"||!t?"":t.split(/[-_ ]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),jt={"dual-axes":"DualAxes",column:"Column",line:"Line",pie:"Pie",funnel:"Funnel"},on=t=>{if(!t)return null;let e=jt[t.toLowerCase()]||jt[t],n=rn;if(e&&e in n)return n[e];let r=nn(t);return r&&r in n?n[r]:t in n?n[t]:null},Ue=class extends Qr.Component{constructor(n){super(n);this.reset=()=>{this.setState({hasError:!1,error:null})};this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error(`AntV Chart Error (${this.props.type}):`,n,r)}render(){return this.state.hasError&&this.state.error?this.props.errorPlaceholder?this.props.errorPlaceholder(this.state.error,this.reset):j(Ot,{error:this.state.error,reset:this.reset}):this.props.children}},an=tn((t,e)=>{let{type:n="line",node:r,theme:o,...a}=t,{theme:s}=St(),i=Je(()=>Rt(n),[n]),c=Je(()=>i?.getComponent()||on(n),[i,n]),l=Je(()=>{let h=t.theme||o||s||"light",u=["dark","black","midnight","slate","crimson"].includes(h)?"dark":"light",g=Mt(u),y=t.data,f={...t,theme:g,data:y},b=Ft(f,i?.schema||te),w=i?.transformProps?i.transformProps(b):b;return At(w)},[t,o,s,i]);if(!c)return sn("div",{className:"w-full p-4 border border-dashed border-amber-200 text-amber-600 rounded bg-amber-50/50 text-xs",children:["\u672A\u627E\u5230\u56FE\u8868\u7C7B\u578B: ",n]});let m=l.data&&Array.isArray(l.data)&&l.data.length>0,d=Array.isArray(l.children)&&l.children.some(h=>h.data&&Array.isArray(h.data)&&h.data.length>0);return m||d?j(Ue,{type:n,errorPlaceholder:l.errorPlaceholder,children:j(en,{fallback:j($t,{active:!0}),children:j("div",{className:"",children:ln(c,{...l,ref:e,key:n})})})}):j(It,{})}),Te=C(an,{schema:te,renderLoading:t=>j("div",{className:"w-full flex justify-center items-center bg-black/5 rounded-lg animate-pulse",style:{height:t.height||300},children:j($t.Image,{active:!0})})}),cs=t=>{let{node:e,...n}=t;if(e)return j(Te,{node:e});let r={props:{},body:{...n,data:t.data}};return j(Te,{node:r})};import{jsx as cn}from"react/jsx-runtime";function bs(t){let e=t?.theme;return U({chart:(r,o)=>cn(Te,{node:r,theme:e,className:r.props?.className},o)})}import{useMemo as Bt}from"react";import{ArrowUpOutlined as dn,ArrowDownOutlined as mn}from"@ant-design/icons";import{Fragment as yn,jsx as D,jsxs as Y}from"react/jsx-runtime";var pn=({data:t,color:e="#059669"})=>{if(!Array.isArray(t)||t.length<2)return null;let n=Math.min(...t),o=Math.max(...t)-n||1,a=80,s=24,i=t.map((c,l)=>{let m=l/(t.length-1)*a,d=s-(c-n)/o*s;return`${m},${d}`}).join(" ");return Y("svg",{width:a,height:s,className:"overflow-visible ml-2",children:[D("polyline",{points:i,fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),D("circle",{cx:(t.length-1)/(t.length-1)*a,cy:s-(t[t.length-1]-n)/o*s,r:"2",fill:e})]})},un=t=>{let{precision:e=0,layout:n="vertical",footer:r,value:o,note:a,trend:s,trendValue:i}=t,c=Bt(()=>{if(i==null)return null;if(typeof i=="number"){let h=i.toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e});return s==="up"&&!String(i).startsWith("+")?`+${h}`:s==="down"&&!String(i).startsWith("-")?`-${h}`:h}return String(i)},[i,e,s]),l=Bt(()=>{if(o==null)return"-";let h=typeof o=="string"&&o!==""&&!isNaN(Number(o))?Number(o):o;return typeof h=="number"?h.toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e}):String(o)},[o,e]),m=s==="up",d=s==="down",p=Array.isArray(s);return Y(yn,{children:[Y("div",{className:`flex ${n==="horizontal"?"flex-row items-center justify-between":"flex-col"} gap-2`,children:[Y("div",{className:"flex flex-col",children:[Y("div",{className:"flex items-baseline gap-1.5 group",children:[D("span",{className:"text-metric font-bold text-card-foreground tracking-tight group-hover:text-primary transition-colors",children:l}),c&&Y("div",{className:`flex items-center text-xs font-bold px-1.5 py-0.5 rounded ${m?"text-success bg-success/10":d?"text-destructive bg-destructive/10":"text-muted-foreground bg-muted"}`,children:[m&&D(dn,{className:"mr-0.5"}),d&&D(mn,{className:"mr-0.5"}),c]})]}),a&&D("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",title:a,children:a})]}),p&&D("div",{className:"h-10 w-24",children:D(pn,{data:s,color:m?"#10b981":d?"#ef4444":"#6366f1"})})]}),r&&D("div",{className:"mt-card-gap pt-2 border-t border-border/40 text-[10px] text-muted-foreground italic",children:r})]})},Dt=C(un,{schema:ce,skeleton:{rows:1}});import{jsx as Ye}from"react/jsx-runtime";var gn=t=>{let{description:e,content:n,node:r}=t,o=n||e||(r?.body||r?.data?"":r?.__source);return Ye("div",{className:"text-muted-foreground leading-relaxed",children:o?Ye(xt,{content:o}):Ye("div",{className:"text-muted-foreground/50 text-xs italic",children:"No content"})})},Wt=C(gn,{schema:pe,skeleton:{rows:2}});import{CheckCircleOutlined as fn,MinusCircleOutlined as hn,BorderOutlined as bn}from"@ant-design/icons";import{Fragment as vn,jsx as A,jsxs as G}from"react/jsx-runtime";var xn=({item:t,layout:e,index:n,stripe:r})=>{let{title:o,desc:a,value:s,status:i,type:c="text"}=t;return c==="metric"?G("div",{className:`bg-muted/30 rounded-lg p-card-half border border-border hover:border-primary/20 transition-colors group ${r?"bg-muted/50":""}`,children:[A("div",{className:"text-xs text-muted-foreground mb-1 font-medium",children:o}),A("div",{className:"text-xl font-bold text-card-foreground group-hover:text-primary transition-colors",children:s}),a&&A("div",{className:"text-[10px] text-muted-foreground/60 mt-1 whitespace-pre-wrap",children:a})]}):G("div",{className:`flex items-start gap-3 p-card-half bg-muted/40 border border-border rounded-lg hover:shadow-card hover:border-primary/30 transition-all group ${e==="list"?"w-full":""} ${r?"bg-muted/60":""}`,children:[G("div",{className:"mt-1",children:[i==="done"&&A(fn,{className:"text-success"}),i==="doing"&&A(hn,{className:"text-primary animate-pulse"}),i==="todo"&&A(bn,{className:"text-muted-foreground/30"}),!i&&A("div",{className:"w-4 h-4 rounded-full bg-muted flex items-center justify-center text-[10px] text-muted-foreground font-bold group-hover:bg-primary/10 group-hover:text-primary transition-colors",children:n+1})]}),G("div",{className:"flex-1 min-w-0",children:[A("div",{className:"text-sm font-medium text-card-foreground whitespace-normal break-words group-hover:text-primary transition-colors",children:o}),a&&A("div",{className:"text-xs text-muted-foreground mt-0.5 whitespace-normal break-words whitespace-pre-wrap",children:a})]})]})},Cn=t=>{let{header:e,footer:n,layout:r="grid",columns:o=3,items:a=[],type:s="text",stripe:i=!1}=t,c=r==="grid",m={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-2 md:grid-cols-4",5:"grid-cols-2 md:grid-cols-5",6:"grid-cols-3 md:grid-cols-6"}[o]||"grid-cols-1 md:grid-cols-3";return G(vn,{children:[e&&A("div",{className:"mb-3 text-sm text-muted-foreground",children:e}),G("div",{className:c?`grid ${m} gap-card-gap`:"flex flex-col space-y-card-gap",children:[a.map((d,p)=>A(xn,{item:{type:s,...d},layout:r,index:p,stripe:i&&p%2===1},p)),a.length===0&&A("div",{className:"text-center py-8 text-muted-foreground/50 text-xs italic",children:"\u6682\u65E0\u5217\u8868\u9879"})]}),n&&A("div",{className:"mt-card-gap pt-3 border-t border-border/40 text-xs text-muted-foreground text-right",children:n})]})},qt=C(Cn,{schema:me,skeleton:{rows:3}});import wn from"react";import{jsx as ae}from"react/jsx-runtime";var Sn=()=>{let{items:t}=ht(),e=wn.useMemo(()=>t.filter(r=>r.level>1),[t]),n=(r,o)=>{r.preventDefault();let a=document.getElementById(o);a&&a.scrollIntoView({behavior:"smooth"})};return ae("div",{className:"text-sm text-muted-foreground w-full",children:e.length===0?ae("div",{className:"text-muted-foreground text-xs",children:"\u6682\u65E0\u76EE\u5F55"}):ae("ul",{className:"list-none p-0 m-0 ml-2 border-l-2 border-border",children:e.map(r=>ae("li",{className:"mb-2 text-sm leading-relaxed relative",style:{paddingLeft:`${(r.level-2)*1+1}rem`},children:ae("a",{href:`#${r.id}`,onClick:o=>n(o,r.id),className:"text-foreground no-underline cursor-pointer transition-colors hover:text-primary hover:underline",children:r.title})},r.id))})})},_t=C(Sn,{schema:ue,getTitle:t=>t.title||"\u76EE\u5F55",skeleton:{rows:4}});import{useMemo as Mn}from"react";import{Badge as Nn,Tooltip as Ln}from"antd";import{InfoCircleOutlined as zt}from"@ant-design/icons";import{jsx as v,jsxs as $}from"react/jsx-runtime";var kn=({data:t,color:e})=>{let n=e||"hsl(var(--primary))";if(!Array.isArray(t)||t.length<2)return v("span",{className:"text-muted-foreground/30",children:"-"});let r=Math.min(...t),a=Math.max(...t)-r||1,s=60,i=20,c=t.map((l,m)=>{let d=m/(t.length-1)*s,p=i-(l-r)/a*i;return`${d},${p}`}).join(" ");return $("svg",{width:s,height:i,className:"overflow-visible",children:[v("polyline",{points:c,fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),v("circle",{cx:(t.length-1)/(t.length-1)*s,cy:i-(t[t.length-1]-r)/a*i,r:"2.5",fill:n})]})},Pn=({value:t,color:e="bg-primary"})=>{let n=Math.min(Math.max(t*100,0),100);return v("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:v("div",{className:`h-full rounded-full transition-all duration-300 w-[var(--percent)] ${e}`,style:{"--percent":`${n}%`}})})},Xn=t=>{let{bordered:e=!0,size:n="middle",summary:r=!1,columns:o=[],rows:a=[],dataSource:s=[]}=t,i=s.length>0?s:a,c=o.length>0&&i.length>0,l=Mn(()=>{if(!r||!c)return null;let u={_isSummary:!0};return o.forEach(g=>{let y=i.map(f=>{let b=f[g.key];return typeof b=="string"?parseFloat(b.replace(/[^0-9.-]/g,"")):b}).filter(f=>typeof f=="number"&&!isNaN(f));if(y.length>0&&(g.type==="number"||g.key==="amount"||g.key==="value"||g.key==="sales")){let f=y.reduce((b,w)=>b+w,0);u[g.key]=Number.isInteger(f)?f:f.toFixed(2)}else u[g.key]=""}),u[o[0].key]="\u5408\u8BA1",u},[r,c,o,i]),m=(u,g)=>{let y=g[u.key];switch(u.type){case"progress":let f=typeof y=="string"?parseFloat(y):y,b=f<=1?f:f/100,w="bg-primary";return b>=1?w="bg-success":b<.6?w="bg-destructive":w="bg-primary/60",$("div",{className:"flex items-center gap-2",children:[$("span",{className:"text-xs w-8 text-right font-mono",children:[(b*100).toFixed(0),"%"]}),v("div",{className:"flex-1 min-w-[60px]",children:v(Pn,{value:b,color:w})})]});case"trend":return v(kn,{data:Array.isArray(y)?y:[]});case"badge":let M="default";return["success","\u5B8C\u6210","\u6B63\u5E38","ok","pass"].includes(String(y).toLowerCase())?M="success":["error","fail","\u5931\u8D25","\u5F02\u5E38"].includes(String(y).toLowerCase())?M="error":["warning","warn","\u8B66\u544A"].includes(String(y).toLowerCase())?M="warning":["processing","running","\u8FDB\u884C\u4E2D"].includes(String(y).toLowerCase())&&(M="processing"),v(Nn,{status:M,text:y});case"image":return v("img",{src:y,alt:"",className:"h-8 w-8 rounded object-cover border border-border"});default:return $("span",{className:u.type==="number"?"font-mono":"",children:[u.prefix,y,u.suffix]})}},d={small:"px-4 py-2.5",middle:"px-5 py-3.5",large:"px-6 py-5"},p=d[n]||d.middle,h="border-b border-border/40 transition-all duration-150",x="hover:bg-primary/5 cursor-default";return $("div",{className:`w-full overflow-hidden ${e?"border border-border/60 rounded-xl shadow-sm bg-card":""}`,children:[c?v("div",{className:"overflow-x-auto custom-scrollbar",children:$("table",{className:"w-full border-collapse text-[13.5px] leading-relaxed table-auto",children:[v("thead",{children:v("tr",{className:"bg-muted/40 border-b border-border/60",children:o.map((u,g)=>v("th",{className:`${p} font-bold text-foreground/80 whitespace-nowrap align-middle uppercase tracking-wider text-[11px]`,style:{textAlign:u.align||"left",width:u.width},children:$("div",{className:"flex items-center gap-1.5",children:[u.title,u.desc&&v(Ln,{title:u.desc,children:v(zt,{className:"text-[10px] cursor-help opacity-40 hover:opacity-100 text-primary transition-opacity"})})]})},g))})}),$("tbody",{className:"divide-y divide-border/30",children:[i.map((u,g)=>v("tr",{className:`${h} ${x}`,children:o.map((y,f)=>v("td",{className:`${p} align-middle text-foreground/90 whitespace-normal break-words`,style:{textAlign:y.align||"left"},children:m(y,u)},f))},g)),l&&v("tr",{className:"bg-primary/5 font-bold border-t-2 border-primary/20",children:o.map((u,g)=>v("td",{className:`${p} align-middle text-primary/90 whitespace-normal break-words`,style:{textAlign:u.align||"left"},children:m(u,l)},g))})]})]})}):$("div",{className:"py-12 text-center text-muted-foreground/50 italic flex flex-col items-center gap-2",children:[v("div",{className:"w-12 h-12 rounded-full bg-muted/30 flex items-center justify-center",children:v(zt,{className:"text-xl opacity-20"})}),v("span",{children:"\u6682\u65E0\u6570\u636E"})]}),!r&&c&&$("div",{className:"py-2 text-[10px] text-muted-foreground/40 italic text-right px-4 border-t border-border/10",children:["Total ",i.length," rows"]})]})},Vt=C(Xn,{schema:de,skeleton:{rows:4}});import{jsx as ie}from"react/jsx-runtime";function sl(t){let e=t?.theme?{"data-theme":t.theme}:{};return U({metric:(r,o)=>ie(Dt,{node:r,...e},o),card:(r,o)=>ie(Wt,{node:r,...e},o),list:(r,o)=>ie(qt,{node:r,...e},o),toc:(r,o)=>ie(_t,{node:r,...e},o),table:(r,o)=>ie(Vt,{node:r,...e},o)})}import{ArrowUpOutlined as Rn,ArrowDownOutlined as Tn,MinusOutlined as Fn}from"@ant-design/icons";import An from"react-countup";import{jsx as Z,jsxs as Fe}from"react/jsx-runtime";var Ht=(t,e)=>{if(t==null)return null;let n=t>0,r=t===0,o=n?"text-success bg-success/5":r?"text-muted-foreground/40":"text-destructive bg-destructive/5",a=n?Rn:r?Fn:Tn;return Fe("div",{className:`flex items-center px-2 py-0.5 rounded-full ${o} text-[11px] font-bold border border-current/10 transition-all shadow-sm`,children:[Z("span",{className:"opacity-70 mr-1",children:e}),Z(a,{className:"mr-0.5 text-xs"}),Math.abs(t),"%"]})},In=t=>{let{value:e,wow:n,yoy:r,unit:o="",prefix:a="",footer:s,precision:i}=t;return Fe("div",{className:"flex flex-col",children:[Fe("div",{className:"text-metric-lg font-black my-2 bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground to-foreground/70 group-hover:from-primary group-hover:to-pink-500 transition-all duration-500 tracking-tighter",children:[Z("span",{className:"text-2xl mr-1 text-muted-foreground/60 font-bold align-baseline",children:a}),Z(An,{end:Number(e)||0,decimals:i,separator:",",duration:2.5}),Z("span",{className:"text-base ml-1 font-semibold text-muted-foreground/50 align-baseline",children:o})]}),Fe("div",{className:"flex space-x-2 mt-2",children:[Ht(n,"\u73AF\u6BD4"),Ht(r,"\u540C\u6BD4")]}),s&&Z("div",{className:"mt-card-gap pt-2 border-t border-border/40 text-[10px] text-muted-foreground italic whitespace-pre-wrap leading-normal",children:s})]})},Kt=C(In,{schema:ve,getTitle:t=>t.title||t.label,skeleton:{rows:2}});import{useState as On}from"react";import{Row as En,Col as jn}from"antd";import{Line as $n}from"@ant-design/plots";import{jsx as W,jsxs as Ge}from"react/jsx-runtime";var Bn=({item:t})=>{let[e,n]=On(!1),{label:r,value:o,wow:a,trendData:s=[]}=t,c={data:s.map((l,m)=>({index:m,value:l})),xField:"index",yField:"value",height:30,padding:0,axis:!1,legend:!1,tooltip:!1,smooth:!0,line:{style:{stroke:"hsl(var(--primary))",lineWidth:2}}};return Ge("div",{className:"p-3 border border-border/60 rounded-lg hover:shadow-card hover:border-primary/30 transition-all relative bg-muted/40 text-card-foreground min-h-[6rem] flex flex-col justify-between group overflow-hidden",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[W("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-transparent group-hover:bg-primary/20 transition-colors"}),Ge("div",{className:"relative z-10",children:[W("div",{className:"text-muted-foreground text-xs mb-1 font-medium whitespace-normal break-words",children:r}),Ge("div",{className:"flex items-end justify-between flex-wrap",children:[W("span",{className:"text-xl font-bold tracking-tight whitespace-normal break-words",children:o}),a!==void 0&&W("div",{className:`w-2 h-2 rounded-full ${a>0?"bg-success":a<0?"bg-destructive":"bg-muted"} shadow-[0_0_6px_rgba(var(--primary),0.2)]`,title:`\u73AF\u6BD4: ${a}%`})]})]}),s.length>0&&W("div",{className:`absolute bottom-0 left-0 right-0 h-8 transition-opacity duration-300 ${e?"opacity-100":"opacity-40"}`,children:W($n,{...c})})]})},Dn=t=>{let{items:e=[]}=t,n=e.length>0?Math.floor(24/Math.min(e.length,4)):6;return W(En,{gutter:[16,16],children:e.map((r,o)=>W(jn,{span:n,children:W(Bn,{item:r})},o))})},Jt=C(Dn,{schema:we,skeleton:{rows:2}});import Ze from"react";import{Table as Wn}from"antd";import{CSVLink as qn}from"react-csv";import{DownloadOutlined as _n}from"@ant-design/icons";import{jsx as se,jsxs as Ut}from"react/jsx-runtime";var zn=t=>{let{title:e,columns:n=[],rows:r=[],dataSource:o=[]}=t,a=o.length>0?o:r,s=Ze.useMemo(()=>a.map((l,m)=>({...l,__xcml_row_key:l.__xcml_key||l.id||`row-${m}`})),[a]),i=Ze.useMemo(()=>n.map(l=>({...l,dataIndex:l.key||l.dataIndex,title:l.title,ellipsis:!1,className:"whitespace-normal break-words",render:m=>se("div",{className:"whitespace-normal break-words",children:m})})),[n]),c=Ze.useMemo(()=>i.map(l=>({label:l.title,key:l.dataIndex})),[i]);return Ut("div",{className:"flex flex-col",children:[se("div",{className:"flex justify-end mb-2",children:Ut(qn,{data:s,headers:c,filename:`${e||"snapshot"}.csv`,className:"inline-flex items-center px-3 py-1 text-sm font-medium rounded border border-border bg-card text-card-foreground hover:bg-muted transition-colors",children:[se(_n,{className:"mr-1"})," \u5BFC\u51FACSV"]})}),se("div",{className:"text-foreground",children:se(Wn,{columns:i,dataSource:s,rowKey:"__xcml_row_key",pagination:{pageSize:5},scroll:{y:300,x:"100%"},className:"w-full [&_.ant-table]:!w-full [&_.ant-table-container]:!w-full",bordered:!0,size:"small",rowClassName:(l,m)=>m%2!==0?"bg-muted/20":"hover:bg-muted/30 transition-colors"})})]})},Yt=C(zn,{schema:Me,skeleton:{rows:5}});import{Tag as Vn,Typography as Hn,Button as Kn}from"antd";import Jn from"react-highlight-words";import{LinkOutlined as Un,ThunderboltOutlined as Yn}from"@ant-design/icons";import{jsx as q,jsxs as Ae}from"react/jsx-runtime";var{Title:Dl}=Hn,Gt={positive:"\u{1F4C8}",negative:"\u{1F4C9}",neutral:"\u{1F610}",insight:"\u{1F4A1}",warning:"\u26A0\uFE0F",success:"\u2705",error:"\u274C",insight_pro:"\u{1F48E}"},Gn={positive:"text-green-500",negative:"text-red-500",warning:"text-amber-500",error:"text-red-600",success:"text-green-600",insight:"text-indigo-500"},Zn=t=>{let{content:e="",highlights:n=[],sentiment:r="insight",citations:o=[],actions:a=[]}=t,s=J(n),i=J(o),c=J(a),l=m=>{ke.emit("action_click",{action:m,source:"insight_card"})};return Ae("div",{className:"space-y-4",children:[Ae("div",{className:"flex items-center gap-3",children:[q("div",{className:"text-xl shrink-0",children:Gt[r]||"\u{1F4A1}"}),q("div",{className:`text-base leading-normal whitespace-pre-wrap ${Gn[r]||"text-foreground"}`,children:q(Jn,{highlightClassName:"bg-primary/15 text-primary font-bold px-1 rounded-md mx-0.5",searchWords:s,autoEscape:!0,textToHighlight:e})})]}),i.length>0&&q("div",{className:"pt-2 border-t border-dashed border-border flex flex-wrap gap-2",children:i.map((m,d)=>q(Vn,{icon:q(Un,{}),className:"m-0 bg-secondary/50 border-none rounded px-2 py-0.5 text-xs",children:m},d))}),c.length>0&&Ae("div",{className:"space-y-2",children:[Ae("div",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[q(Yn,{className:"text-amber-500"}),"\u5EFA\u8BAE\u884C\u52A8"]}),q("div",{className:"flex flex-wrap gap-2",children:c.map((m,d)=>q(Kn,{size:"small",className:"text-xs h-7 px-3 rounded-full hover:border-primary hover:text-primary transition-all",onClick:()=>l(m),children:m},d))})]})]})},Zt=C(Zn,{schema:xe,getTitle:t=>t.title||"\u6570\u636E\u6D1E\u5BDF",getIcon:t=>t.icon||Gt[t.sentiment]||"\u{1F4A1}",skeleton:{rows:4}});import{useRef as Qn,useState as eo}from"react";import{Button as to,QRCode as ro,Select as no,Space as oo}from"antd";import{DownloadOutlined as ao,BgColorsOutlined as io}from"@ant-design/icons";import so from"html2canvas";import{Column as lo,Line as co,Pie as mo}from"@ant-design/plots";import{jsx as R,jsxs as _}from"react/jsx-runtime";var Ie=[{label:"\u79D1\u6280\u84DD",value:"#1890ff",bg:"#f0f5ff"},{label:"\u6D3B\u529B\u6A59",value:"#fa8c16",bg:"#fff7e6"},{label:"\u6E05\u65B0\u7EFF",value:"#52c41a",bg:"#f6ffed"},{label:"\u6697\u591C\u7D2B",value:"#722ed1",bg:"#f9f0ff"},{label:"\u5546\u52A1\u7070",value:"#595959",bg:"#f5f5f5"}],po=t=>{let{title:e="\u6570\u636E\u6D77\u62A5",subTitle:n="Data Insight Poster",charts:r=[],qrCode:o="https://ant.design",author:a="ChatBI",date:s=new Date().toLocaleDateString(),backgroundImage:i,themeColor:c}=t,l=typeof i=="string"?i.trim().replace(/^[`'" ]|[`'" ]$/g,"").trim().replace(/^[`'" ]|[`'" ]$/g,""):void 0,m=Qn(null),[d,p]=eo(Ie[0]),h=c||d.value,x=c?`${c}10`:d.bg,u=async()=>{if(m.current)try{let f=(await so(m.current,{useCORS:!0,scale:2,backgroundColor:d.bg})).toDataURL("image/png"),b=document.createElement("a");b.href=f,b.download=`poster-${Date.now()}.png`,b.click()}catch(y){console.error("Poster generation failed",y)}},g=(y,f)=>{let b={data:y.data,height:200,autoFit:!0};return y.type==="column"||y.type==="bar"?R(lo,{...b,xField:"label",yField:"value"},f):y.type==="line"?R(co,{...b,xField:"label",yField:"value"},f):y.type==="pie"?R(mo,{...b,angleField:"value",colorField:"label"},f):null};return _("div",{className:"flex flex-col",children:[_("div",{className:"flex justify-between items-center mb-4",children:[R(oo,{children:R(no,{value:d.value,onChange:y=>p(Ie.find(f=>f.value===y)||Ie[0]),options:Ie,style:{width:120},suffixIcon:R(io,{})})}),R(to,{type:"primary",icon:R(ao,{}),onClick:u,children:"\u751F\u6210\u6D77\u62A5"})]}),R("div",{className:"flex-1 overflow-auto border border-border rounded-lg shadow-sm bg-muted/10 min-h-0 flex flex-col",children:_("div",{ref:m,className:"p-8 w-full mx-auto transition-colors duration-300 flex flex-col shrink-0",style:{backgroundColor:x,backgroundImage:l?`url(${l})`:void 0,backgroundSize:"cover",backgroundPosition:"center",color:"#333",minHeight:"100%"},children:[_("div",{className:"mb-6 text-center",children:[R("h1",{className:"text-2xl font-bold mb-2",style:{color:h},children:e}),R("p",{className:"text-sm opacity-70",children:n})]}),R("div",{className:"space-y-6 mb-8",children:r.map((y,f)=>_("div",{className:"bg-white p-4 rounded-lg shadow-sm opacity-90",children:[R("h4",{className:"font-medium mb-2 text-center",children:y.title}),g(y,f)]},f))}),_("div",{className:"flex items-center justify-between mt-auto pt-8 border-t border-border/40 border-dashed",children:[_("div",{className:"text-xs text-muted-foreground",children:[_("p",{children:["Created by ",a]}),R("p",{children:s})]}),R("div",{className:"bg-white p-1 rounded",children:R(ro,{value:o,size:64,bordered:!1})})]})]})})]})},Qt=C(po,{schema:Se,skeleton:{rows:4}});import{Tag as uo,Typography as yo}from"antd";import{CheckCircleFilled as go,CloseCircleFilled as fo,LoadingOutlined as ho,ClockCircleFilled as bo}from"@ant-design/icons";import{jsx as F,jsxs as V}from"react/jsx-runtime";var{Text:xo}=yo,Co=t=>{switch(t){case"success":return F(go,{className:"text-success bg-card rounded-full relative z-10 shadow-sm"});case"failure":return F(fo,{className:"text-destructive bg-card rounded-full relative z-10 shadow-sm"});case"running":return F(ho,{className:"text-primary bg-card rounded-full relative z-10"});default:return F(bo,{className:"text-muted-foreground/40 bg-card rounded-full relative z-10"})}},vo=t=>{switch(t){case"success":return"\u6210\u529F";case"failure":return"\u5931\u8D25";case"running":return"\u6267\u884C\u4E2D";default:return t}},wo=t=>{switch(t){case"success":return"success";case"failure":return"error";case"running":return"processing";default:return"default"}},So=t=>{let{steps:e=[]}=t;return V("div",{className:"relative pl-2 py-2",children:[F("div",{className:"absolute top-4 bottom-4 left-[15px] w-0.5 bg-gradient-to-b from-primary/10 via-primary/30 to-primary/10"}),e.map((n,r)=>V("div",{className:"relative flex mb-6 last:mb-0 group",children:[F("div",{className:"mr-4 mt-0.5 text-lg transition-transform duration-300 group-hover:scale-110",children:Co(n.status)}),V("div",{className:"flex-1 min-w-0 bg-card rounded-xl p-3 border border-border/50 hover:border-primary/30 hover:shadow-md transition-all duration-300 group-hover:-translate-y-0.5",children:[V("div",{className:"flex items-center justify-between mb-2",children:[V("div",{className:"flex items-center gap-2",children:[F("span",{className:"font-bold text-sm text-foreground",children:n.tool||`\u6B65\u9AA4 ${r+1}`}),F(xo,{type:"secondary",className:"text-xs text-muted-foreground",children:n.action})]}),V("div",{className:"flex items-center gap-2",children:[n.duration&&F("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-muted px-1.5 py-0.5 rounded-md",children:n.duration}),F(uo,{color:wo(n.status),variant:"filled",className:"mr-0 text-[10px] px-1.5 rounded-full border-none",children:vo(n.status)})]})]}),n.thought&&F("div",{className:"mb-2 text-xs text-muted-foreground italic border-l-2 border-primary/30 pl-2 py-1 bg-primary/5 rounded-r-md whitespace-pre-wrap leading-normal",children:n.thought}),n.result&&F("div",{className:"mt-2 text-xs",children:F("div",{className:"bg-muted/30 border border-border/40 rounded-lg p-2 overflow-x-auto custom-scrollbar",children:F("pre",{className:"m-0 whitespace-pre-wrap font-mono text-[11px] text-muted-foreground leading-relaxed",children:typeof n.result=="string"?n.result:JSON.stringify(n.result,null,2)})})}),n.error&&V("div",{className:"mt-2 text-xs text-destructive bg-destructive/5 p-2 rounded-lg border border-destructive/20 whitespace-pre-wrap",children:["\u9519\u8BEF: ",n.error]})]})]},r))]})},er=C(So,{schema:Ne,getTitle:t=>t.title||"\u601D\u7EF4\u94FE",skeleton:!0});import{useState as tr,useEffect as Mo}from"react";import{Button as Qe,App as No,InputNumber as Lo}from"antd";import{PlusOutlined as ko,MinusOutlined as Po,SaveOutlined as Xo,LoadingOutlined as Ro}from"@ant-design/icons";import To from"react-highlight-words";import{jsx as I,jsxs as le}from"react/jsx-runtime";var Fo=t=>{let{message:e}=No.useApp(),{label:n="\u62A5\u544A\u6458\u8981",value:r=0,step:o=1,unit:a="",actionId:s="update_summary",content:i="",highlightKeywords:c=[]}=t,[l,m]=tr(Number(r)||0),[d,p]=tr(!1);Mo(()=>{m(Number(r)||0)},[r]);let h=J(c),x=g=>{m(g)};return le("div",{className:"flex flex-col",children:[i&&I("div",{className:"mb-4 text-muted-foreground leading-normal whitespace-pre-wrap",children:I(To,{highlightClassName:"bg-primary/20 text-primary rounded px-1 font-medium",searchWords:h,autoEscape:!0,textToHighlight:i})}),le("div",{className:"flex items-center justify-between",children:[le("div",{children:[I("div",{className:"text-muted-foreground mb-1 text-xs font-medium uppercase tracking-wider",children:n}),le("div",{className:"text-3xl font-black text-foreground flex items-baseline tracking-tight",children:[l,I("span",{className:"text-sm font-semibold text-muted-foreground/60 ml-1.5",children:a})]})]}),le("div",{className:"flex items-center space-x-1 bg-muted/40 p-1.5 rounded-xl border border-border/30 shadow-inner",children:[I(Qe,{icon:I(Po,{}),size:"small",shape:"circle",type:"text",className:"hover:bg-background hover:text-primary hover:shadow-sm",onClick:()=>x(l-Number(o)),disabled:d}),I(Lo,{value:l,onChange:g=>x(Number(g)),variant:"borderless",className:"w-20 text-center bg-transparent font-bold text-foreground",controls:!1,disabled:d}),I(Qe,{icon:I(ko,{}),size:"small",shape:"circle",type:"text",className:"hover:bg-background hover:text-primary hover:shadow-sm",onClick:()=>x(l+Number(o)),disabled:d}),I("div",{className:"w-px h-4 bg-border/50 mx-1"}),I(Qe,{type:"primary",size:"small",shape:"round",icon:d?I(Ro,{}):I(Xo,{}),onClick:async()=>{p(!0);try{ke.emit("action",{type:s,payload:{value:l,label:n,...t}}),await new Promise(g=>setTimeout(g,800)),e.success(`\u5DF2\u66F4\u65B0 ${n} \u8BBE\u5B9A\u503C`)}catch{e.error("\u63D0\u4EA4\u5931\u8D25")}finally{p(!1)}},loading:d,className:"ml-1 px-3 shadow-md shadow-primary/20 hover:shadow-primary/40 transition-all",children:"\u4FDD\u5B58"})]})]})]})},rr=C(Fo,{schema:Ce,getTitle:t=>t.label,skeleton:{rows:2}});import{jsx as H}from"react/jsx-runtime";function Sc(t){let e=t?.theme?{"data-theme":t.theme}:{};return U({metric:(o,a)=>H(Kt,{node:o,...e},a),"mini-kpi":(o,a)=>H(Jt,{node:o,...e},a),snapshot:(o,a)=>H(Yt,{node:o,...e},a),insight:(o,a)=>H(Zt,{node:o,...e},a),"poster-card":(o,a)=>H(Qt,{node:o,...e},a),thought:(o,a)=>H(er,{node:o,...e},a),summary:(o,a)=>H(rr,{node:o,...e},a)},{metric:["metric-card"],"mini-kpi":["mini-kpi-strip"],snapshot:["snapshot-table","table-snapshot"],insight:["insight-card"],"poster-card":["poster"],thought:["thought-chain"],summary:["interactive-summary"]})}export{Te as AntVChartLoader,ir as COMMON_PROPS,It as DefaultEmptyPlaceholder,Ot as DefaultErrorPlaceholder,ni as ThemeProvider,Xe as XCMLCardWrapper,cs as XCMLChart,je as XCMLEventBus,xt as XCMLMarkdown,re as XCML_SCHEMAS,At as buildConfig,te as chartSchema,Ft as cleanPropsBySchema,ge as columnChartSchema,Lt as columnStrategy,bs as createAntVRenderers,sl as createBasicRenderers,Sc as createExtendedRenderers,U as createRenderersWithAliases,Pe as deepMerge,he as dualAxesChartSchema,Pt as dualAxesStrategy,ba as extractBaseStyles,be as funnelChartSchema,Xt as funnelStrategy,Rt as getChartStrategy,Mt as getTheme,ye as lineChartSchema,Nt as lineStrategy,lt as mergePropsAndBody,st as normalizeNodeData,$e as normalizeTagName,Ia as parse,J as parseArrayProp,mr as parseInlineData,Ta as parseXCML,fe as pieChartSchema,kt as pieStrategy,dt as preprocessXCML,wa as renderXCML,Hr as strategies,Oa as stringify,Ra as stringifyToXCML,Ir as themeDark,He as themeLight,Or as themeMap,Be as toXCMLNodeFromElement,Le as toXCMLTag,lr as toXTag,St as useTheme,it as useXCMLComponent,at as useXCMLNode,Xa as validateDataSchema,Sa as validateXCMLNode,C as withXCMLCard,ke as xcmlBus};
31
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbi-v/xcml",
3
- "version": "1.0.1",
3
+ "version": "2.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },