@apform-ui/core 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,7 +69,7 @@ ${C}</tr>
69
69
  Please report this to https://github.com/markedjs/marked.`,C){let A="<p>An error occurred:</p><pre>"+YA(g.message+"",!0)+"</pre>";return I?Promise.resolve(A):A}if(I)return Promise.reject(g);throw g}}},bl=new l3;function II(C,I){return bl.parse(C,I)}II.options=II.setOptions=function(C){return bl.setOptions(C),II.defaults=bl.defaults,oW(II.defaults),II},II.getDefaults=xZ,II.defaults=Zl;function e3(...C){return bl.use(...C),II.defaults=bl.defaults,oW(II.defaults),II}II.use=e3,II.walkTokens=function(C,I){return bl.walkTokens(C,I)},II.parseInline=bl.parseInline,II.Parser=lA,II.parser=lA.parse,II.Renderer=Pd,II.TextRenderer=_Z,II.Lexer=iA,II.lexer=iA.lex,II.Tokenizer=Ed,II.Hooks=Ba,II.parse=II,II.options,II.setOptions,II.walkTokens,II.parseInline,lA.parse,iA.lex;/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function NW(C,I){(I==null||I>C.length)&&(I=C.length);for(var g=0,A=Array(I);g<I;g++)A[g]=C[g];return A}function t3(C){if(Array.isArray(C))return C}function a3(C,I){var g=C==null?null:typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(g!=null){var A,i,l,e,t=[],a=!0,d=!1;try{if(l=(g=g.call(C)).next,I!==0)for(;!(a=(A=l.call(g)).done)&&(t.push(A.value),t.length!==I);a=!0);}catch(o){d=!0,i=o}finally{try{if(!a&&g.return!=null&&(e=g.return(),Object(e)!==e))return}finally{if(d)throw i}}return t}}function c3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
70
70
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d3(C,I){return t3(C)||a3(C,I)||o3(C,I)||c3()}function o3(C,I){if(C){if(typeof C=="string")return NW(C,I);var g={}.toString.call(C).slice(8,-1);return g==="Object"&&C.constructor&&(g=C.constructor.name),g==="Map"||g==="Set"?Array.from(C):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?NW(C,I):void 0}}const XW=Object.entries,RW=Object.setPrototypeOf,n3=Object.isFrozen,s3=Object.getPrototypeOf,Z3=Object.getOwnPropertyDescriptor;let yI=Object.freeze,DI=Object.seal,Le=Object.create,HW=typeof Reflect<"u"&&Reflect,qZ=HW.apply,$Z=HW.construct;yI||(yI=function(I){return I}),DI||(DI=function(I){return I}),qZ||(qZ=function(I,g){for(var A=arguments.length,i=new Array(A>2?A-2:0),l=2;l<A;l++)i[l-2]=arguments[l];return I.apply(g,i)}),$Z||($Z=function(I){for(var g=arguments.length,A=new Array(g>1?g-1:0),i=1;i<g;i++)A[i-1]=arguments[i];return new I(...A)});const Gl=wI(Array.prototype.forEach),m3=wI(Array.prototype.lastIndexOf),SW=wI(Array.prototype.pop),Wa=wI(Array.prototype.push),b3=wI(Array.prototype.splice),Te=Array.isArray,wa=wI(String.prototype.toLowerCase),gm=wI(String.prototype.toString),MW=wI(String.prototype.match),Ya=wI(String.prototype.replace),DW=wI(String.prototype.indexOf),G3=wI(String.prototype.trim),r3=wI(Number.prototype.toString),h3=wI(Boolean.prototype.toString),KW=typeof BigInt>"u"?null:wI(BigInt.prototype.toString),FW=typeof Symbol>"u"?null:wI(Symbol.prototype.toString),nC=wI(Object.prototype.hasOwnProperty),Va=wI(Object.prototype.toString),fI=wI(RegExp.prototype.test),rl=u3(TypeError);function wI(C){return function(I){I instanceof RegExp&&(I.lastIndex=0);for(var g=arguments.length,A=new Array(g>1?g-1:0),i=1;i<g;i++)A[i-1]=arguments[i];return qZ(C,I,A)}}function u3(C){return function(){for(var I=arguments.length,g=new Array(I),A=0;A<I;A++)g[A]=arguments[A];return $Z(C,g)}}function Ug(C,I){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(RW&&RW(C,null),!Te(I))return C;let A=I.length;for(;A--;){let i=I[A];if(typeof i=="string"){const l=g(i);l!==i&&(n3(I)||(I[A]=l),i=l)}C[i]=!0}return C}function B3(C){for(let I=0;I<C.length;I++)nC(C,I)||(C[I]=null);return C}function WC(C){const I=Le(null);for(const A of XW(C)){var g=d3(A,2);const i=g[0],l=g[1];nC(C,i)&&(Te(l)?I[i]=B3(l):l&&typeof l=="object"&&l.constructor===Object?I[i]=WC(l):I[i]=l)}return I}function W3(C){switch(typeof C){case"string":return C;case"number":return r3(C);case"boolean":return h3(C);case"bigint":return KW?KW(C):"0";case"symbol":return FW?FW(C):"Symbol()";case"undefined":return Va(C);case"function":case"object":{if(C===null)return Va(C);const I=C,g=eA(I,"toString");if(typeof g=="function"){const A=g(I);return typeof A=="string"?A:Va(A)}return Va(C)}default:return Va(C)}}function eA(C,I){for(;C!==null;){const A=Z3(C,I);if(A){if(A.get)return wI(A.get);if(typeof A.value=="function")return wI(A.value)}C=s3(C)}function g(){return null}return g}function w3(C){try{return fI(C,""),!0}catch{return!1}}const zW=yI(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Im=yI(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cm=yI(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Y3=yI(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Am=yI(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),V3=yI(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),JW=yI(["#text"]),vW=yI(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),im=yI(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),kW=yI(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_d=yI(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),p3=DI(/{{[\w\W]*|^[\w\W]*}}/g),y3=DI(/<%[\w\W]*|^[\w\W]*%>/g),N3=DI(/\${[\w\W]*/g),X3=DI(/^data-[\-\w.\u00B7-\uFFFF]+$/),R3=DI(/^aria-[\-\w]+$/),LW=DI(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H3=DI(/^(?:\w+script|data):/i),S3=DI(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),M3=DI(/^html$/i),D3=DI(/^[a-z][.\w]*(-[.\w]+)+$/i),TW=DI(/<[/\w!]/g),xW=DI(/<[/\w]/g),K3=DI(/<\/no(script|embed|frames)/i),F3=DI(/\/>/i),wC={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},fW=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],z3=yI(Ug({},fW)),J3=(function(){const C={};return Gl(fW,I=>{C[I]=DI(new RegExp("</"+I+"(?=[\\t\\n\\f\\r />])","i"))}),yI(C)})(),v3=function(){return typeof window>"u"?null:window},k3=function(I,g){if(typeof I!="object"||typeof I.createPolicy!="function")return null;let A=null;const i="data-tt-policy-suffix";g&&g.hasAttribute(i)&&(A=g.getAttribute(i));const l="dompurify"+(A?"#"+A:"");try{return I.createPolicy(l,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},jW=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Yi=function(I,g,A,i){return nC(I,g)&&Te(I[g])?Ug(i.base?WC(i.base):{},I[g],i.transform):A},lm=function(I,g,A){const i=nC(I,g)?I[g]:void 0;return i&&typeof i=="object"?WC(i):A()};function QW(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v3();const I=Cg=>QW(Cg);if(I.version="3.4.14",I.removed=[],!C||!C.document||C.document.nodeType!==wC.document||!C.Element)return I.isSupported=!1,I;let g=C.document;const A=g,i=A.currentScript;C.DocumentFragment;const l=C.HTMLTemplateElement,e=C.Node,t=C.Element,a=C.NodeFilter,d=C.NamedNodeMap;d===void 0&&(C.NamedNodeMap||C.MozNamedAttrMap),C.HTMLFormElement;const o=C.DOMParser,n=C.trustedTypes,s=t.prototype,Z=eA(s,"cloneNode"),m=eA(s,"remove"),b=eA(s,"nextSibling"),G=eA(s,"childNodes"),r=eA(s,"parentNode"),h=eA(s,"shadowRoot"),u=eA(s,"attributes"),B=e&&e.prototype?eA(e.prototype,"nodeType"):null,W=e&&e.prototype?eA(e.prototype,"nodeName"):null,w=e&&e.prototype?eA(e.prototype,"ownerDocument"):null,Y=function(K){return B?B(K):K.nodeType},p=function(K){return W?W(K):K.nodeName};if(typeof l=="function"){const Cg=g.createElement("template");Cg.content&&Cg.content.ownerDocument&&(g=Cg.content.ownerDocument)}let V,y="",N,H=!1,R=0;const S=function(){if(R>0)throw rl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(K){S(),R++;try{return V.createHTML(K)}finally{R--}},D=function(K){S(),R++;try{return V.createScriptURL(K)}finally{R--}},F=function(){return H||(N=k3(n,i),H=!0),N},z=g,v=z.implementation,f=z.createNodeIterator,Q=z.createDocumentFragment,O=z.getElementsByTagName,gg=A.importNode;let q=jW();I.isSupported=typeof XW=="function"&&typeof r=="function"&&v&&v.createHTMLDocument!==void 0;const bg=p3,jg=y3,aI=N3,Yg=X3,og=R3,pg=H3,lg=S3,Gg=D3;let Pg=LW,hg=null;const Qg=Ug({},[...zW,...Im,...Cm,...Am,...JW]);let yg=null;const sI=Ug({},[...vW,...im,...kW,..._d]);let dI=Object.seal(Le(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pI=null,EA=null;const TI=Object.seal(Le(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Hd=!0,Me=!0,E5=!1,P5=!0,dl=!1,De=!0,Ke=!1,Qu=!1,ZZ=null,mZ=null,Uu=!1,aa=!1,bZ=!1,GZ=!1,_5=!0,q5=!1;const $5="user-content-";let Ou=!0,Eu=!1,ca={},da=null;const g9=Ug({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let I9=null;const C9=Ug({},["audio","video","img","source","image","track"]);let A9=null;const i9=Ug({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rZ="http://www.w3.org/1998/Math/MathML",hZ="http://www.w3.org/2000/svg",PA="http://www.w3.org/1999/xhtml";let oa=PA,Pu=!1,_u=null;const Tog=Ug({},[rZ,hZ,PA],gm),l9=yI(["mi","mo","mn","ms","mtext"]);let qu=Ug({},l9);const e9=yI(["annotation-xml"]);let $u=Ug({},e9);const xog=Ug({},["title","style","font","a","script"]);let Sd=null;const fog=["application/xhtml+xml","text/html"],jog="text/html";let WI=null,na=null;const Qog=g.createElement("form"),t9=function(K){return K instanceof RegExp||K instanceof Function},gB=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(na&&na===K)return;(!K||typeof K!="object")&&(K={}),K=WC(K),Sd=fog.indexOf(K.PARSER_MEDIA_TYPE)===-1?jog:K.PARSER_MEDIA_TYPE,WI=Sd==="application/xhtml+xml"?gm:wa,hg=Yi(K,"ALLOWED_TAGS",Qg,{transform:WI}),yg=Yi(K,"ALLOWED_ATTR",sI,{transform:WI}),_u=Yi(K,"ALLOWED_NAMESPACES",Tog,{transform:gm}),A9=Yi(K,"ADD_URI_SAFE_ATTR",i9,{transform:WI,base:i9}),I9=Yi(K,"ADD_DATA_URI_TAGS",C9,{transform:WI,base:C9}),da=Yi(K,"FORBID_CONTENTS",g9,{transform:WI}),pI=Yi(K,"FORBID_TAGS",WC({}),{transform:WI}),EA=Yi(K,"FORBID_ATTR",WC({}),{transform:WI}),ca=nC(K,"USE_PROFILES")?K.USE_PROFILES&&typeof K.USE_PROFILES=="object"?WC(K.USE_PROFILES):K.USE_PROFILES:!1,Hd=K.ALLOW_ARIA_ATTR!==!1,Me=K.ALLOW_DATA_ATTR!==!1,E5=K.ALLOW_UNKNOWN_PROTOCOLS||!1,P5=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dl=K.SAFE_FOR_TEMPLATES||!1,De=K.SAFE_FOR_XML!==!1,Ke=K.WHOLE_DOCUMENT||!1,aa=K.RETURN_DOM||!1,bZ=K.RETURN_DOM_FRAGMENT||!1,GZ=K.RETURN_TRUSTED_TYPE||!1,Uu=K.FORCE_BODY||!1,_5=K.SANITIZE_DOM!==!1,q5=K.SANITIZE_NAMED_PROPS||!1,Ou=K.KEEP_CONTENT!==!1,Eu=K.IN_PLACE||!1,Pg=w3(K.ALLOWED_URI_REGEXP)?K.ALLOWED_URI_REGEXP:LW,oa=typeof K.NAMESPACE=="string"?K.NAMESPACE:PA,qu=lm(K,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ug({},l9)),$u=lm(K,"HTML_INTEGRATION_POINTS",()=>Ug({},e9));const L=lm(K,"CUSTOM_ELEMENT_HANDLING",()=>Le(null));if(dI=Le(null),nC(L,"tagNameCheck")&&t9(L.tagNameCheck)&&(dI.tagNameCheck=L.tagNameCheck),nC(L,"attributeNameCheck")&&t9(L.attributeNameCheck)&&(dI.attributeNameCheck=L.attributeNameCheck),nC(L,"allowCustomizedBuiltInElements")&&typeof L.allowCustomizedBuiltInElements=="boolean"&&(dI.allowCustomizedBuiltInElements=L.allowCustomizedBuiltInElements),DI(dI),dl&&(Me=!1),bZ&&(aa=!0),ca&&(hg=Ug({},JW),yg=Le(null),ca.html===!0&&(Ug(hg,zW),Ug(yg,vW)),ca.svg===!0&&(Ug(hg,Im),Ug(yg,im),Ug(yg,_d)),ca.svgFilters===!0&&(Ug(hg,Cm),Ug(yg,im),Ug(yg,_d)),ca.mathMl===!0&&(Ug(hg,Am),Ug(yg,kW),Ug(yg,_d))),TI.tagCheck=null,TI.attributeCheck=null,nC(K,"ADD_TAGS")&&(typeof K.ADD_TAGS=="function"?TI.tagCheck=K.ADD_TAGS:Te(K.ADD_TAGS)&&(hg===Qg&&(hg=WC(hg)),Ug(hg,K.ADD_TAGS,WI))),nC(K,"ADD_ATTR")&&(typeof K.ADD_ATTR=="function"?TI.attributeCheck=K.ADD_ATTR:Te(K.ADD_ATTR)&&(yg===sI&&(yg=WC(yg)),Ug(yg,K.ADD_ATTR,WI))),nC(K,"ADD_FORBID_CONTENTS")&&Te(K.ADD_FORBID_CONTENTS)&&(da===g9&&(da=WC(da)),Ug(da,K.ADD_FORBID_CONTENTS,WI)),Ou&&(hg["#text"]=!0),Ke&&Ug(hg,["html","head","body"]),hg.table&&(Ug(hg,["tbody"]),delete pI.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw rl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=V;V=K.TRUSTED_TYPES_POLICY;try{y=M("")}catch(dg){throw V=U,dg}}else K.TRUSTED_TYPES_POLICY===null?(V=void 0,y=""):(V===void 0&&(V=F()),V&&typeof y=="string"&&(y=M("")));yI&&yI(K),na=K},a9=Ug({},[...Im,...Cm,...Y3]),c9=Ug({},[...Am,...V3]),Uog=function(K,L,U){return L.namespaceURI===PA?K==="svg":L.namespaceURI===rZ?K==="svg"&&(U==="annotation-xml"||qu[U]):!!a9[K]},Oog=function(K,L,U){return L.namespaceURI===PA?K==="math":L.namespaceURI===hZ?K==="math"&&$u[U]:!!c9[K]},Eog=function(K,L,U){return L.namespaceURI===hZ&&!$u[U]||L.namespaceURI===rZ&&!qu[U]?!1:!c9[K]&&(xog[K]||!a9[K])},Pog=function(K){let L=r(K);(!L||!L.tagName)&&(L={namespaceURI:oa,tagName:"template"});const U=wa(K.tagName),dg=wa(L.tagName);return _u[K.namespaceURI]?K.namespaceURI===hZ?Uog(U,L,dg):K.namespaceURI===rZ?Oog(U,L,dg):K.namespaceURI===PA?Eog(U,L,dg):!!(Sd==="application/xhtml+xml"&&_u[K.namespaceURI]):!1},ol=function(K){Wa(I.removed,{element:K});try{r(K).removeChild(K)}catch{if(m(K),!r(K))throw rl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},d9=function(K,L,U){try{K.removeAttributeNode(L)}catch{try{K.removeAttribute(U)}catch{}}},uZ=function(K){BZ(K);const L=G(K);if(L){const dg=[];Gl(L,ug=>{Wa(dg,ug)}),Gl(dg,ug=>{try{m(ug)}catch{}})}const U=u(K);if(U)for(let dg=U.length-1;dg>=0;--dg){const ug=U[dg],Mg=ug&&ug.name;typeof Mg=="string"&&d9(K,ug,Mg)}},Fe=function(K,L,U){if(!U)try{U=L.getAttributeNode(K)}catch{U=null}Wa(I.removed,{attribute:U||null,from:L});try{U?L.removeAttributeNode(U):L.removeAttribute(K)}catch{try{L.removeAttribute(K)}catch{}}if(K==="is")if(aa||bZ)try{ol(L)}catch{}else try{L.setAttribute(K,"")}catch{}},_og=function(K){const L=u(K);if(L)for(let U=L.length-1;U>=0;--U){const dg=L[U],ug=dg&&dg.name;typeof ug!="string"||yg[WI(ug)]||d9(K,dg,ug)}},BZ=function(K){const L=[K];for(;L.length>0;){const U=L.pop();Y(U)===wC.element&&_og(U);const ug=G(U);if(ug)for(let Mg=ug.length-1;Mg>=0;--Mg)L.push(ug[Mg])}},o9=function(K,L){return De?K==="patchsrc"?!0:K==="for"&&L!=="label"&&L!=="output":!1},qog=function(K){if(!De)return;const L=[K];for(;L.length>0;){const U=L.pop(),dg=Y(U);if(dg===wC.processingInstruction||dg===wC.comment&&fI(xW,U.data)){try{m(U)}catch{}continue}if(dg===wC.element){const Mg=U,iI=WI(p(U));try{Mg.hasAttribute&&Mg.hasAttribute("patchsrc")&&Mg.removeAttribute("patchsrc"),Mg.hasAttribute&&Mg.hasAttribute("for")&&o9("for",iI)&&Mg.removeAttribute("for")}catch{}}const ug=G(U);if(ug)for(let Mg=ug.length-1;Mg>=0;--Mg)L.push(ug[Mg])}},n9=function(K){let L=null,U=null;if(Uu)K="<remove></remove>"+K;else{const Mg=MW(K,/^[\r\n\t ]+/);U=Mg&&Mg[0]}Sd==="application/xhtml+xml"&&oa===PA&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const dg=V?M(K):K;if(oa===PA)try{L=new o().parseFromString(dg,Sd)}catch{}if(!L||!L.documentElement){L=v.createDocument(oa,"template",null);try{L.documentElement.innerHTML=Pu?y:dg}catch{}}const ug=L.body||L.documentElement;return K&&U&&ug.insertBefore(g.createTextNode(U),ug.childNodes[0]||null),oa===PA?O.call(L,Ke?"html":"body")[0]:Ke?L.documentElement:ug},s9=function(K){const L=w?w(K):K.ownerDocument;return f.call(L||K,K,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},WZ=function(K){return K=Ya(K,bg," "),K=Ya(K,jg," "),K=Ya(K,aI," "),K},IB=function(K){var L;K.normalize();const U=w?w(K):K.ownerDocument,dg=f.call(U||K,K,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let ug=dg.nextNode();for(;ug;)ug.data=WZ(ug.data),ug=dg.nextNode();const Mg=(L=K.querySelectorAll)===null||L===void 0?void 0:L.call(K,"template");Mg&&Gl(Mg,iI=>{sa(iI.content)&&IB(iI.content)})},wZ=function(K){const L=W?W(K):null;return typeof L!="string"||WI(L)!=="form"?!1:typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||K.attributes!==u(K)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function"||K.nodeType!==B(K)||K.childNodes!==G(K)},sa=function(K){if(!B||typeof K!="object"||K===null)return!1;try{return B(K)===wC.documentFragment}catch{return!1}},Md=function(K){if(!B||typeof K!="object"||K===null)return!1;try{return typeof B(K)=="number"}catch{return!1}};function _A(Cg,K,L){Cg.length!==0&&Gl(Cg,U=>{U.call(I,K,L,na)})}const $og=function(K,L){return!!(De&&K.hasChildNodes()&&!Md(K.firstElementChild)&&fI(TW,K.textContent)&&fI(TW,K.innerHTML)||De&&K.namespaceURI===PA&&z3[L]&&(Md(K.firstElementChild)||typeof K.textContent=="string"&&fI(J3[L],K.textContent))||K.nodeType===wC.processingInstruction||De&&K.nodeType===wC.comment&&fI(xW,K.data))},YZ=function(K,L){if(K instanceof RegExp)return fI(K,L);if(K instanceof Function){for(var U=arguments.length,dg=new Array(U>2?U-2:0),ug=2;ug<U;ug++)dg[ug-2]=arguments[ug];return!!K(L,...dg)}return!1},gng=function(K,L,U){if(!pI[L]&&r9(L)&&YZ(dI.tagNameCheck,L))return!1;if(Ou&&!da[L]){const dg=r(K),ug=G(K);if(ug&&dg){const Mg=ug.length;for(let iI=Mg-1;iI>=0;--iI){const ZI=K===U?Z(ug[iI],!0):ug[iI];dg.insertBefore(ZI,b(K))}}}return ol(K),!0},Z9=function(K,L,U,dg){return K.length===0?L:L===U||L===dg?WC(L):L},m9=function(K,L){return K===L||r(K)!==null?!1:(Eu&&BZ(K),!0)},b9=function(K,L){if(_A(q.beforeSanitizeElements,K,null),m9(K,L))return!0;if(wZ(K))return ol(K),!0;const U=WI(p(K));if(hg=Z9(q.uponSanitizeElement,hg,Qg,ZZ),_A(q.uponSanitizeElement,K,{tagName:U,allowedTags:hg}),m9(K,L))return!0;if($og(K,U))return ol(K),!0;if(pI[U]||!(TI.tagCheck instanceof Function&&TI.tagCheck(U))&&!hg[U]){const ug=gng(K,U,L);return ug===!1&&_A(q.afterSanitizeElements,K,null),ug}if(Y(K)===wC.element&&!Pog(K)||(U==="noscript"||U==="noembed"||U==="noframes")&&fI(K3,K.innerHTML))return ol(K),!0;if(dl&&K.nodeType===wC.text){const ug=WZ(K.textContent);K.textContent!==ug&&(Wa(I.removed,{element:K.cloneNode()}),K.textContent=ug)}return _A(q.afterSanitizeElements,K,null),!1},G9=function(K,L,U){if(EA[L]||o9(L,K)||_5&&(L==="id"||L==="name")&&(U in g||U in Qog))return!1;const dg=yg[L]||TI.attributeCheck instanceof Function&&TI.attributeCheck(L,K);return Me&&fI(Yg,L)||Hd&&fI(og,L)?!0:dg?A9[L]||fI(Pg,Ya(U,lg,""))||(L==="src"||L==="xlink:href"||L==="href")&&K!=="script"&&DW(U,"data:")===0&&I9[K]||E5&&!fI(pg,Ya(U,lg,""))?!0:!U:r9(K)&&YZ(dI.tagNameCheck,K)&&YZ(dI.attributeNameCheck,L,K)||L==="is"&&dI.allowCustomizedBuiltInElements&&YZ(dI.tagNameCheck,U)},Ing=Ug({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),r9=function(K){return!Ing[wa(K)]&&fI(Gg,K)},Cng=function(K,L,U,dg){if(V&&typeof n=="object"&&typeof n.getAttributeType=="function"&&!U)switch(n.getAttributeType(K,L)){case"TrustedHTML":return M(dg);case"TrustedScriptURL":return D(dg)}return dg},Ang=function(K,L,U,dg){try{U?K.setAttributeNS(U,L,dg):K.setAttribute(L,dg),wZ(K)?ol(K):SW(I.removed)}catch{Fe(L,K)}},h9=function(K){_A(q.beforeSanitizeAttributes,K,null);const L=K.attributes;if(!L||wZ(K))return;yg=Z9(q.uponSanitizeAttribute,yg,sI,mZ);const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yg,forceKeepAttr:void 0};let dg=L.length;const ug=WI(K.nodeName);for(;dg--;){const Mg=L[dg],iI=Mg.name,ZI=Mg.namespaceURI,hC=Mg.value,uC=WI(iI),AB=hC;let oC=iI==="value"?AB:G3(AB);if(U.attrName=uC,U.attrValue=oC,U.keepAttr=!0,U.forceKeepAttr=void 0,_A(q.uponSanitizeAttribute,K,U),oC=U.attrValue,q5&&(uC==="id"||uC==="name")&&DW(oC,$5)!==0&&(Fe(iI,K,Mg),oC=$5+oC),De&&fI(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,oC)){Fe(iI,K,Mg);continue}if(uC==="attributename"&&MW(oC,"href")){Fe(iI,K,Mg);continue}if(!U.forceKeepAttr){if(!U.keepAttr){Fe(iI,K,Mg);continue}if(!P5&&fI(F3,oC)){Fe(iI,K,Mg);continue}if(dl&&(oC=WZ(oC)),!G9(ug,uC,oC)){Fe(iI,K,Mg);continue}oC=Cng(ug,uC,ZI,oC),oC!==AB&&Ang(K,iI,ZI,oC)}}_A(q.afterSanitizeAttributes,K,null)},VZ=function(K){let L=null;const U=s9(K);for(_A(q.beforeSanitizeShadowDOM,K,null);L=U.nextNode();)if(_A(q.uponSanitizeShadowNode,L,null),b9(L,K),h9(L),sa(L.content)&&VZ(L.content),Y(L)===wC.element){const dg=h(L);sa(dg)&&(CB(dg),VZ(dg))}_A(q.afterSanitizeShadowDOM,K,null)},CB=function(K){const L=[{node:K,shadow:null}];for(;L.length>0;){const U=L.pop();if(U.shadow){VZ(U.shadow);continue}const dg=U.node,Mg=Y(dg)===wC.element,iI=G(dg);if(iI)for(let ZI=iI.length-1;ZI>=0;--ZI)L.push({node:iI[ZI],shadow:null});if(Mg){const ZI=W?W(dg):null;if(typeof ZI=="string"&&WI(ZI)==="template"){const hC=dg.content;sa(hC)&&L.push({node:hC,shadow:null})}}if(Mg){const ZI=h(dg);sa(ZI)&&L.push({node:null,shadow:ZI},{node:ZI,shadow:null})}}};return I.sanitize=function(Cg){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=null,U=null,dg=null,ug=null;if(Pu=!Cg,Pu&&(Cg="<!-->"),typeof Cg!="string"&&!Md(Cg)&&(Cg=W3(Cg),typeof Cg!="string"))throw rl("dirty is not a string, aborting");if(!I.isSupported)return Cg;Qu?(hg=ZZ,yg=mZ):gB(K),(q.uponSanitizeElement.length>0||q.uponSanitizeAttribute.length>0)&&(hg=WC(hg)),q.uponSanitizeAttribute.length>0&&(yg=WC(yg)),I.removed=[];const Mg=Eu&&typeof Cg!="string"&&Md(Cg);if(Mg){qog(Cg);const hC=p(Cg);if(typeof hC=="string"){const uC=WI(hC);if(!hg[uC]||pI[uC])throw uZ(Cg),rl("root node is forbidden and cannot be sanitized in-place")}if(wZ(Cg))throw uZ(Cg),rl("root node is clobbered and cannot be sanitized in-place");try{CB(Cg)}catch(uC){throw uZ(Cg),uC}}else if(Md(Cg))L=n9("<!---->"),U=L.ownerDocument.importNode(Cg,!0),U.nodeType===wC.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?L=U:L.appendChild(U),CB(U);else{if(!aa&&!dl&&!Ke&&Cg.indexOf("<")===-1)return V&&GZ?M(Cg):Cg;if(L=n9(Cg),!L)return aa?null:GZ?y:""}L&&Uu&&ol(L.firstChild);const iI=Mg?Cg:L;try{const hC=s9(iI);for(;dg=hC.nextNode();)b9(dg,iI),h9(dg),sa(dg.content)&&VZ(dg.content)}catch(hC){throw Mg&&(uZ(Cg),Gl(I.removed,uC=>{uC.element&&BZ(uC.element)})),hC}if(Mg)return Gl(I.removed,hC=>{hC.element&&BZ(hC.element)}),dl&&IB(Cg),Cg;if(aa){if(dl&&IB(L),bZ)for(ug=Q.call(L.ownerDocument);L.firstChild;)ug.appendChild(L.firstChild);else ug=L;return(yg.shadowroot||yg.shadowrootmode)&&(ug=gg.call(A,ug,!0)),ug}let ZI=Ke?L.outerHTML:L.innerHTML;return Ke&&hg["!doctype"]&&L.ownerDocument&&L.ownerDocument.doctype&&L.ownerDocument.doctype.name&&fI(M3,L.ownerDocument.doctype.name)&&(ZI="<!DOCTYPE "+L.ownerDocument.doctype.name+`>
71
71
  `+ZI),dl&&(ZI=WZ(ZI)),V&&GZ?M(ZI):ZI},I.setConfig=function(){let Cg=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gB(Cg),Qu=!0,ZZ=hg,mZ=yg},I.clearConfig=function(){na=null,Qu=!1,ZZ=null,mZ=null,V=N,y=""},I.isValidAttribute=function(Cg,K,L){na||gB({});const U=WI(Cg),dg=WI(K);return G9(U,dg,L)},I.addHook=function(Cg,K){typeof K=="function"&&nC(q,Cg)&&Wa(q[Cg],K)},I.removeHook=function(Cg,K){if(nC(q,Cg)){if(K!==void 0){const L=m3(q[Cg],K);return L===-1?void 0:b3(q[Cg],L,1)[0]}return SW(q[Cg])}},I.removeHooks=function(Cg){nC(q,Cg)&&(q[Cg]=[])},I.removeAllHooks=function(){q=jW()},I}var em=QW();const qd=typeof em.sanitize=="function"?em:em.default;function L3(C){const I=C.trim();if(!I)return!1;const g=[/^(好的|已|我|现在|以上|这就是|这是|根据|基于)/,/^(表单|流程|Schema|JSON|数据)\s*(已|已经|已生成|已创建|已更新)/,/已(生成|创建|更新|完成|应用)(好|了)?/,/以上(就是|是)/,/请(查看|确认|检查|参考)/,/希望(这|这个)/];return I.length<100&&g.some(A=>A.test(I))}function UW(C){if(!C)return[{type:"text",content:""}];const I=[],g=/```([\w:+#.-]*)\r?\n([\s\S]*?)```|```([^\n`]*?)```|<schema>([\s\S]*?)<\/schema>/g;let A=0,i,l=!1;for(;(i=g.exec(C))!==null;){const a=C.slice(A,i.index);if(a.trim()&&I.push({type:"text",content:a}),i[0].startsWith("<schema>"))I.push({type:"code",content:(i[4]||"").trim(),language:"json"}),l=!0;else if(i[1]!==void 0){const d=(i[1]||"text").trim()||"text",o=(i[2]||"").replace(/^\n/,"").replace(/\n$/,"");OW(I,d,o)}else OW(I,"text",(i[3]||"").trim());A=i.index+i[0].length}const e=C.slice(A);e.trim()&&(l&&L3(e)||I.push({type:"text",content:e}));const t=I.filter((a,d)=>a.type!=="text"||a.content.trim()?!0:d>0&&d<I.length-1);return t.length?t:[{type:"text",content:C}]}function OW(C,I,g){if(I.startsWith("artifact:")){const A=I.slice(9);C.push({type:"artifact",content:g,language:A,artifactType:A});return}C.push({type:"code",content:g,language:I})}function tm(C){if(!C)return"";const g=II.parse(C,{breaks:!0,gfm:!0}).replace(/<table>/g,'<div class="table-scroll"><table>').replace(/<\/table>/g,"</table></div>");return typeof window>"u"||typeof(qd==null?void 0:qd.sanitize)!="function"?g:qd.sanitize(g,{ADD_ATTR:["class"]})}const T3={class:"apf-message-parts"},x3=["innerHTML"],f3={class:"apf-artifact-head"},j3={class:"apf-artifact-badge"},Q3={class:"apf-part-actions"},U3=["onClick"],O3=["onClick"],E3={class:"apf-code-block"},P3={class:"apf-code-head"},_3={class:"apf-code-lang"},q3={class:"apf-part-actions"},$3=["onClick"],gL=["onClick"],IL={class:"apf-code-block"},EW=P(c.defineComponent({__name:"MessageParts",props:{content:{}},setup(C){const I=C,g=c.computed(()=>UW(I.content||"").map(A));function A(a){if(!((a.language||"").toLowerCase()==="json"||a.artifactType==="json"||i(a.content)))return{...a,display:a.content,isJson:!1};try{const n=JSON.parse(a.content);return{...a,language:a.language||"json",display:JSON.stringify(n,null,2),isJson:!0}}catch{return{...a,display:a.content,isJson:!1}}}function i(a){const d=a.trim();return d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]")}function l(a){return a.type==="artifact"?a.artifactType||"artifact":a.isJson?"json":a.language&&a.language!=="text"?a.language:"code"}function e(a){var d;a&&((d=navigator.clipboard)==null||d.writeText(a))}function t(a){const d=a.isJson||a.language==="json"?"json":a.language&&a.language!=="text"?a.language.replace(/[^a-z0-9]+/gi,""):"txt",o=new Blob([a.display],{type:"text/plain;charset=utf-8"}),n=URL.createObjectURL(o),s=document.createElement("a");s.href=n,s.download=`result.${d||"txt"}`,s.click(),URL.revokeObjectURL(n)}return(a,d)=>(c.openBlock(),c.createElementBlock("div",T3,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value,(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:n},[o.type==="text"?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-md-block",innerHTML:c.unref(tm)(o.content)},null,8,x3)):o.type==="artifact"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["apf-artifact-card",{"apf-json":o.isJson}])},[c.createElementVNode("div",f3,[c.createElementVNode("span",j3,"工件 · "+c.toDisplayString(l(o)),1),c.createElementVNode("div",Q3,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:s=>e(o.display)},[...d[0]||(d[0]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])],8,U3),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:s=>t(o)},[...d[1]||(d[1]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,O3)])]),c.createElementVNode("pre",E3,[c.createElementVNode("code",null,c.toDisplayString(o.display),1)])],2)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(["apf-code-wrap",{"apf-json":o.isJson}])},[c.createElementVNode("div",P3,[c.createElementVNode("span",_3,c.toDisplayString(l(o)),1),c.createElementVNode("div",q3,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:s=>e(o.display)},[...d[2]||(d[2]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])],8,$3),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:s=>t(o)},[...d[3]||(d[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,gL)])]),c.createElementVNode("pre",IL,[c.createElementVNode("code",null,c.toDisplayString(o.display),1)])],2))],64))),128))]))}}),[["__scopeId","data-v-ed1039e3"]]),CL={key:0,class:"apf-att-list"},AL=["aria-label","onClick"],iL=["src","alt"],lL=["aria-label","onClick"],eL={class:"apf-att-badge","aria-hidden":"true"},tL={class:"apf-att-meta"},aL={key:0},PW=P(c.defineComponent({__name:"MessageAttachmentList",props:{attachments:{}},emits:["preview"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.attachments.filter(sl)),l=c.computed(()=>g.attachments.filter(t=>!sl(t)));function e(t){A("preview",t)}return(t,a)=>{var d;return(d=C.attachments)!=null&&d.length?(c.openBlock(),c.createElementBlock("div",CL,[i.value.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-image-grid",{"apf-multi":i.value.length>1}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:"apf-att-image","aria-label":`预览图片 ${o.filename}`,onClick:n=>e(o)},[c.createElementVNode("img",{src:o.url,alt:o.filename,loading:"lazy"},null,8,iL)],8,AL))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:"apf-att-file","aria-label":`${c.unref(Je)(o)?"预览":c.unref(LZ)(o)?"查看":"打开"} ${o.filename}`,onClick:n=>e(o)},[c.createElementVNode("span",eL,c.toDisplayString(c.unref(xd)(o)),1),c.createElementVNode("span",tL,[c.createElementVNode("strong",null,c.toDisplayString(o.filename),1),c.createElementVNode("small",null,[o.size?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(c.unref(fd)(o.size)),1)],64)):c.createCommentVNode("",!0),c.unref(Je)(o)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(" · 点击预览")],64)):c.unref(LZ)(o)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[c.createTextVNode(" · 点击查看")],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:3},[c.createTextVNode(" · 点击打开")],64))]),o.excerpt?(c.openBlock(),c.createElementBlock("em",aL,c.toDisplayString(o.excerpt),1)):c.createCommentVNode("",!0)])],8,lL))),128))])):c.createCommentVNode("",!0)}}}),[["__scopeId","data-v-a604161c"]]),cL={key:0,class:"apf-doc-list"},dL=["role","tabindex","aria-label","onClick","onKeydown"],oL={class:"apf-doc-body"},nL={class:"apf-doc-name"},sL={class:"apf-doc-summary"},ZL={key:0,class:"apf-doc-meta"},mL={key:1,class:"apf-doc-hint"},_W=P(c.defineComponent({__name:"DocumentSummaryList",props:{summaries:{},attachments:{}},emits:["preview"],setup(C,{emit:I}){const g=C,A=I;function i(t){var d;if(!((d=g.attachments)!=null&&d.length))return null;if(t.attachmentId){const o=g.attachments.find(n=>n.id===t.attachmentId);if(o)return o}const a=(t.filename||"").toLowerCase();return g.attachments.find(o=>(o.filename||"").toLowerCase()===a)||null}function l(t){const a=i(t);a&&A("preview",a)}function e(t){return i(t)!==null}return(t,a)=>{var d;return(d=C.summaries)!=null&&d.length?(c.openBlock(),c.createElementBlock("div",cL,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.summaries,o=>(c.openBlock(),c.createElementBlock("article",{key:o.documentId,class:c.normalizeClass(["apf-doc-card",{"apf-clickable":e(o)}]),role:e(o)?"button":void 0,tabindex:e(o)?0:void 0,"aria-label":e(o)?`预览 ${o.filename}`:void 0,onClick:n=>l(o),onKeydown:[c.withKeys(n=>l(o),["enter"]),c.withKeys(c.withModifiers(n=>l(o),["prevent"]),["space"])]},[a[0]||(a[0]=c.createElementVNode("div",{class:"apf-doc-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M4 2.5h5.2L12 5.3V13.5H4V2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M9.2 2.5V5.3H12",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})])],-1)),c.createElementVNode("div",oL,[c.createElementVNode("strong",nL,c.toDisplayString(o.filename),1),c.createElementVNode("p",sL,c.toDisplayString(o.summary),1),o.pageCount?(c.openBlock(),c.createElementBlock("span",ZL,c.toDisplayString(o.pageCount)+" 页",1)):c.createCommentVNode("",!0),e(o)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",mL,"无对应附件,请从附件列表打开"))])],42,dL))),128))])):c.createCommentVNode("",!0)}}}),[["__scopeId","data-v-f22e939c"]]),bL=["aria-label"],GL={class:"apf-preview-head"},rL={class:"apf-preview-title"},hL={class:"apf-preview-actions"},uL=["href"],BL=["src","alt"],WL={key:3,class:"apf-gallery-counter"},wL={key:1,class:"apf-preview-body apf-preview-body-pdf"},YL={key:2,class:"apf-preview-body apf-preview-body-degraded"},VL={class:"apf-degraded-content"},pL={class:"apf-degraded-badge"},yL={class:"apf-degraded-filename"},NL={key:0,class:"apf-degraded-size"},XL={class:"apf-degraded-actions"},RL=["href"],HL=.5,SL=3,qW=.25,$W=P(c.defineComponent({__name:"AttachmentPreviewModal",props:{modelValue:{type:Boolean},attachment:{},gallery:{}},emits:["update:modelValue","update:attachment"],setup(C,{emit:I}){const g=C,A=I,i=c.computed({get:()=>g.modelValue,set:N=>A("update:modelValue",N)});function l(N){return N.url||""}const e=c.computed(()=>g.attachment?sl(g.attachment):!1),t=c.computed(()=>g.attachment?Je(g.attachment):!1),a=c.computed(()=>{var H;return((H=g.gallery)!=null&&H.length?g.gallery:g.attachment?[g.attachment]:[]).filter(sl)}),d=c.computed(()=>!a.value.length||!g.attachment?-1:a.value.findIndex(N=>{var H;return N.id===((H=g.attachment)==null?void 0:H.id)})),o=c.computed(()=>d.value>0),n=c.computed(()=>d.value>=0&&d.value<a.value.length-1),s=c.ref(1),Z=c.ref(null),m=c.ref(null),b=c.ref(null);function G(){i.value=!1}function r(){if(!o.value)return;const N=a.value[d.value-1];N&&A("update:attachment",N)}function h(){if(!n.value)return;const N=a.value[d.value+1];N&&A("update:attachment",N)}function u(){s.value=Math.min(SL,+(s.value+qW).toFixed(2))}function B(){s.value=Math.max(HL,+(s.value-qW).toFixed(2))}function W(){s.value=1}async function w(N){const H=l(N);if(H)try{const S=await(await fetch(H)).blob(),M=URL.createObjectURL(S),D=document.createElement("a");D.href=M,D.download=N.filename||"download",D.rel="noopener",document.body.appendChild(D),D.click(),D.remove(),URL.revokeObjectURL(M)}catch{const R=document.createElement("a");R.href=H,R.download=N.filename||"download",R.target="_blank",R.rel="noopener",document.body.appendChild(R),R.click(),R.remove()}}function Y(N){if(i.value){if(N.key==="Escape"){N.preventDefault(),G();return}if(N.key==="ArrowLeft"&&o.value){N.preventDefault(),r();return}if(N.key==="ArrowRight"&&n.value){N.preventDefault(),h();return}if(N.key==="+"||N.key==="="){e.value&&(N.preventDefault(),u());return}if(N.key==="-"){e.value&&(N.preventDefault(),B());return}if(N.key==="0"&&e.value){N.preventDefault(),W();return}if(N.key==="Tab"&&Z.value){const H=Z.value.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(H.length===0)return;const R=H[0],S=H[H.length-1];N.shiftKey&&document.activeElement===R?(N.preventDefault(),S.focus()):!N.shiftKey&&document.activeElement===S&&(N.preventDefault(),R.focus())}}}c.watch(i,N=>{N?(b.value=document.activeElement,requestAnimationFrame(()=>{var H;return(H=m.value)==null?void 0:H.focus()}),document.addEventListener("keydown",Y)):(document.removeEventListener("keydown",Y),s.value=1,b.value&&(b.value.focus(),b.value=null))},{immediate:!0}),c.watch(()=>{var N;return(N=g.attachment)==null?void 0:N.id},()=>{s.value=1}),c.onUnmounted(()=>document.removeEventListener("keydown",Y));function p(N){N.target===N.currentTarget&&G()}function V(N){N.stopPropagation()}function y(N){e.value&&(N.preventDefault(),N.deltaY<0?u():B())}return(N,H)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[i.value&&C.attachment?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-preview-mask",role:"dialog","aria-modal":"true","aria-label":`预览 ${C.attachment.filename}`,onClick:p},[c.createElementVNode("div",{ref_key:"panelRef",ref:Z,class:c.normalizeClass(["apf-preview-panel",{"apf-preview-image":e.value,"apf-preview-pdf":t.value,"apf-preview-degraded":!e.value&&!t.value}]),onClick:V},[c.createElementVNode("header",GL,[c.createElementVNode("strong",rL,c.toDisplayString(C.attachment.filename),1),c.createElementVNode("div",hL,[e.value?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"缩小",onClick:B},"−"),c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"重置缩放",onClick:W},c.toDisplayString(Math.round(s.value*100))+"% ",1),c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"放大",onClick:u},"+")],64)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("a",{key:1,href:l(C.attachment),target:"_blank",rel:"noopener",class:"apf-preview-action-btn"},c.toDisplayString(t.value?"新窗口打开":e.value?"打开原图":"打开原文件"),9,uL)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-preview-action-btn",onClick:H[0]||(H[0]=R=>w(C.attachment))}," 下载 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{ref_key:"closeBtnRef",ref:m,type:"button",class:"apf-preview-action-btn","aria-label":"关闭预览",onClick:G}," 关闭 ",512)])]),e.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-preview-body apf-preview-body-image",onWheel:c.withModifiers(y,["prevent"])},[o.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-gallery-btn apf-gallery-prev","aria-label":"上一张图片",onClick:r}," ‹ ")):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("img",{key:1,src:l(C.attachment),alt:C.attachment.filename,class:"apf-preview-img",style:c.normalizeStyle({transform:`scale(${s.value})`})},null,12,BL)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-gallery-btn apf-gallery-next","aria-label":"下一张图片",onClick:h}," › ")):c.createCommentVNode("",!0),a.value.length>1?(c.openBlock(),c.createElementBlock("div",WL,c.toDisplayString(d.value+1)+" / "+c.toDisplayString(a.value.length),1)):c.createCommentVNode("",!0)],32)):t.value?(c.openBlock(),c.createElementBlock("div",wL,[l(C.attachment)?(c.openBlock(),c.createBlock(TZ,{key:0,url:l(C.attachment),title:C.attachment.filename,"min-height":"70vh"},null,8,["url","title"])):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("div",YL,[c.createElementVNode("div",VL,[c.createElementVNode("span",pL,c.toDisplayString(c.unref(xd)(C.attachment)),1),c.createElementVNode("strong",yL,c.toDisplayString(C.attachment.filename),1),C.attachment.size?(c.openBlock(),c.createElementBlock("p",NL,c.toDisplayString(c.unref(fd)(C.attachment.size)),1)):c.createCommentVNode("",!0),H[2]||(H[2]=c.createElementVNode("p",{class:"apf-degraded-hint"},"此格式暂不支持应用内预览",-1)),c.createElementVNode("div",XL,[l(C.attachment)?(c.openBlock(),c.createElementBlock("a",{key:0,href:l(C.attachment),target:"_blank",rel:"noopener",class:"apf-preview-action-btn apf-preview-action-primary"}," 打开原文件 ",8,RL)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-preview-action-btn apf-preview-action-primary",onClick:H[1]||(H[1]=R=>w(C.attachment))}," 下载 ")):c.createCommentVNode("",!0)])])]))],2)],8,bL)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-13cf1e3e"]]),ML={class:"apf-bubble-wrap"},DL={key:0,class:"apf-tip"},KL={key:1,class:"apf-typing"},FL={key:2,class:"apf-result-wrap"},zL={key:2,class:"apf-inline-progress"},JL={key:0,class:"apf-result-actions"},vL={key:1,class:"apf-fail-actions"},kL={key:3,class:"apf-bubble apf-waiting-hint"},LL={key:4,class:"apf-bubble apf-failed-hint"},TL={key:5,class:"apf-bubble apf-cancelled-hint"},xL=["aria-expanded"],fL={key:0,class:"apf-live-dot"},jL={class:"apf-detail-collapse"},QL={class:"apf-detail-collapse-inner"},UL=["aria-expanded"],OL={class:"apf-detail-collapse"},EL={class:"apf-detail-collapse-inner"},PL={key:1,class:"apf-chip apf-chip-success"},_L={class:"apf-approval-head"},qL={key:0,class:"apf-approval-danger-tag"},$L={class:"apf-approval-prompt"},gT={class:"apf-approval-actions"},IT=["disabled","onClick"],gw=P(c.defineComponent({__name:"MessageBubble",props:{message:{},run:{},sending:{type:Boolean},brandMark:{},sessionMessages:{}},emits:["resume","cancel","retry","open-process","preview"],setup(C,{emit:I}){const g=C,A=I,i=c.useSlots(),l=c.computed(()=>!!(i.content||i.default)),e=c.ref(!1),t=c.ref(null),a=c.computed(()=>{var z,v;const D=[...g.message.attachments||[]];if(!((z=g.sessionMessages)!=null&&z.length))return D;const F=g.sessionMessages.findIndex(f=>f.id===g.message.id);if(F<=0)return D;for(let f=F-1;f>=0;f--){const Q=g.sessionMessages[f];if(Q.role==="user"&&((v=Q.attachments)!=null&&v.length)){for(const O of Q.attachments)D.some(gg=>gg.id===O.id)||D.push(O);break}}return D}),d=c.computed(()=>a.value.filter(sl));function o(D){t.value=D,e.value=!0,A("preview",D)}const n=c.computed(()=>g.message.role==="user"),s=c.computed(()=>g.message.role==="assistant");function Z(D){return{PENDING:"排队中",RUNNING:"正在处理",WAITING_INPUT:"等待你的确认",COMPLETED:"已完成",FAILED:"处理失败",CANCELLED:"已取消"}[D]||D}function m(D){return{RUNNING:"apf-chip-running",WAITING_INPUT:"apf-chip-waiting",COMPLETED:"apf-chip-success",FAILED:"apf-chip-failed",CANCELLED:"apf-chip-cancelled"}[D]||"apf-chip-cancelled"}const b=[{action:"approve",label:"确认继续",style:"primary"},{action:"reject",label:"需要修改",style:"danger"}],G=c.computed(()=>{var F,z;if(g.message.status!=="WAITING_INPUT")return null;const D=(F=g.run)==null?void 0:F.waiting;if(D){const v=(z=D.actions)!=null&&z.length?D.actions:b;return{prompt:D.prompt||"请确认后继续。",fields:D.fields||[],actions:v,dangerous:!!D.dangerous}}return{prompt:"请确认后继续。",fields:[],actions:b,dangerous:!1}}),r=c.computed(()=>g.message.content||""),h=c.computed(()=>{var D;return!l.value&&s.value&&g.message.status==="RUNNING"&&!r.value&&!((D=g.message.attachments)!=null&&D.length)}),u=c.computed(()=>{var D,F;return l.value||!!r.value||!!((D=g.message.documentSummaries)!=null&&D.length)||!!((F=g.message.attachments)!=null&&F.length)}),B=c.computed(()=>n.value?"apf-user":g.message.status==="WAITING_INPUT"?"apf-waiting":g.message.status==="FAILED"?"apf-failed":""),W=c.ref("");function w(D){A("resume",D,W.value||void 0),W.value=""}function Y(){var F;const D=r.value||g.message.content;D&&((F=navigator.clipboard)==null||F.writeText(D))}function p(){const D=r.value||g.message.content;if(!D)return;const F=new Blob([D],{type:"text/markdown;charset=utf-8"}),z=URL.createObjectURL(F),v=document.createElement("a");v.href=z,v.download="reply.md",v.click(),URL.revokeObjectURL(z)}function V(D){return D.error?"失败":D.result!==void 0?"已完成":"处理中"}const y=c.ref(!1),N=c.ref(!1),H=c.ref(!1),R=c.computed(()=>s.value&&g.message.status==="RUNNING"&&!!g.message.thinking);c.watch(()=>{var D;return[g.message.status,!!((D=g.message.thinking)!=null&&D.trim())]},([D,F])=>{if(!F){y.value=!1,N.value=!1;return}if(D==="RUNNING"){y.value=!0,N.value=!1;return}N.value||(y.value=!1)},{immediate:!0});function S(){y.value=!y.value,N.value=!0}function M(){H.value=!H.value}return(D,F)=>{var z,v,f,Q,O;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-message",[C.message.role,C.message.status&&s.value?`apf-st-${C.message.status}`:""]])},[s.value&&C.brandMark?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(C.brandMark),{key:0,variant:"ai",size:"sm"})):c.createCommentVNode("",!0),c.createElementVNode("div",ML,[s.value&&C.message.tip?(c.openBlock(),c.createElementBlock("p",DL,c.toDisplayString(C.message.tip),1)):c.createCommentVNode("",!0),h.value?(c.openBlock(),c.createElementBlock("div",KL,[...F[4]||(F[4]=[c.createElementVNode("span",{class:"apf-status-text"},"正在处理",-1),c.createElementVNode("span",{class:"apf-dots"},[c.createElementVNode("i"),c.createElementVNode("i"),c.createElementVNode("i")],-1)])])):u.value?(c.openBlock(),c.createElementBlock("div",FL,[c.createElementVNode("div",{class:c.normalizeClass(["apf-bubble apf-message-content",B.value])},[!l.value&&((z=C.message.attachments)!=null&&z.length)?(c.openBlock(),c.createBlock(PW,{key:0,attachments:C.message.attachments,onPreview:o},null,8,["attachments"])):c.createCommentVNode("",!0),c.renderSlot(D.$slots,"content",{},()=>[c.renderSlot(D.$slots,"default",{},()=>[r.value?(c.openBlock(),c.createBlock(EW,{key:0,content:r.value},null,8,["content"])):c.createCommentVNode("",!0)],!0)],!0),!l.value&&((v=C.message.documentSummaries)!=null&&v.length)?(c.openBlock(),c.createBlock(_W,{key:1,summaries:C.message.documentSummaries,attachments:a.value,onPreview:o},null,8,["summaries","attachments"])):c.createCommentVNode("",!0),!l.value&&s.value&&C.message.status==="RUNNING"&&r.value?(c.openBlock(),c.createElementBlock("p",zL,"仍在处理…")):c.createCommentVNode("",!0)],2),!l.value&&s.value&&C.message.status==="COMPLETED"?(c.openBlock(),c.createElementBlock("div",JL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:Y},[...F[5]||(F[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])]),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:p},[...F[6]||(F[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),C.message.thinking||(f=C.message.toolCalls)!=null&&f.length?(c.openBlock(),c.createElementBlock("button",{key:0,class:"apf-text-link",type:"button",onClick:F[0]||(F[0]=gg=>A("open-process"))},"处理信息")):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!l.value&&s.value&&C.message.status==="FAILED"?(c.openBlock(),c.createElementBlock("div",vL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"重试",onClick:F[1]||(F[1]=gg=>A("retry"))},[...F[7]||(F[7]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M3.2 8a4.8 4.8 0 0 1 8.3-3.2",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),c.createElementVNode("path",{d:"M12.8 8a4.8 4.8 0 0 1-8.3 3.2",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),c.createElementVNode("path",{d:"M11.2 2.6v2.6h-2.6M4.8 13.4v-2.6h2.6",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])):c.createCommentVNode("",!0)])):!l.value&&s.value&&C.message.status==="WAITING_INPUT"&&!u.value?(c.openBlock(),c.createElementBlock("div",kL,"请在下方确认后继续。")):!l.value&&s.value&&C.message.status==="FAILED"&&!u.value?(c.openBlock(),c.createElementBlock("div",LL,"处理失败")):!l.value&&s.value&&C.message.status==="CANCELLED"&&!u.value?(c.openBlock(),c.createElementBlock("div",TL,"已取消")):c.createCommentVNode("",!0),l.value?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock($W,{key:6,modelValue:e.value,"onUpdate:modelValue":F[2]||(F[2]=gg=>e.value=gg),attachment:t.value,"onUpdate:attachment":F[3]||(F[3]=gg=>t.value=gg),gallery:d.value},null,8,["modelValue","attachment","gallery"])),!l.value&&s.value&&((Q=C.message.thinking)!=null&&Q.trim())?(c.openBlock(),c.createElementBlock("div",{key:7,class:c.normalizeClass(["apf-detail-block",{open:y.value,streaming:R.value}])},[c.createElementVNode("button",{type:"button",class:"apf-detail-summary","aria-expanded":y.value,onClick:S},[F[8]||(F[8]=c.createElementVNode("span",{class:"apf-chevron"},null,-1)),F[9]||(F[9]=c.createElementVNode("span",null,"思考过程",-1)),R.value?(c.openBlock(),c.createElementBlock("span",fL)):c.createCommentVNode("",!0)],8,xL),c.createElementVNode("div",jL,[c.createElementVNode("div",QL,[c.createElementVNode("div",{class:c.normalizeClass(["apf-detail-content",{streaming:R.value}])},c.toDisplayString(C.message.thinking),3)])])],2)):c.createCommentVNode("",!0),!l.value&&s.value&&((O=C.message.toolCalls)!=null&&O.length)?(c.openBlock(),c.createElementBlock("div",{key:8,class:c.normalizeClass(["apf-detail-block",{open:H.value}])},[c.createElementVNode("button",{type:"button",class:"apf-detail-summary","aria-expanded":H.value,onClick:M},[F[10]||(F[10]=c.createElementVNode("span",{class:"apf-chevron"},null,-1)),c.createElementVNode("span",null,"处理步骤("+c.toDisplayString(C.message.toolCalls.length)+")",1)],8,UL),c.createElementVNode("div",OL,[c.createElementVNode("div",EL,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.message.toolCalls,gg=>(c.openBlock(),c.createElementBlock("div",{key:gg.id||gg.name,class:"apf-tool-row"},[c.createElementVNode("strong",null,c.toDisplayString(gg.name),1),c.createElementVNode("span",{class:c.normalizeClass({"apf-err":!!gg.error})},c.toDisplayString(V(gg)),3)]))),128))])])],2)):c.createCommentVNode("",!0),l.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock(c.Fragment,{key:9},[s.value&&C.message.status!=="COMPLETED"&&C.message.status!=="CANCELLED"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(["apf-chip",m(C.message.status)])},[F[11]||(F[11]=c.createElementVNode("i",null,null,-1)),c.createTextVNode(c.toDisplayString(Z(C.message.status)),1)],2)):s.value&&C.message.status==="COMPLETED"?(c.openBlock(),c.createElementBlock("span",PL,[...F[12]||(F[12]=[c.createElementVNode("i",null,null,-1),c.createTextVNode("已完成",-1)])])):c.createCommentVNode("",!0)],64)),!l.value&&G.value?(c.openBlock(),c.createElementBlock("div",{key:10,class:c.normalizeClass(["apf-inline-approval",{"apf-dangerous-approval":G.value.dangerous}])},[c.createElementVNode("div",_L,[F[13]||(F[13]=c.createElementVNode("span",{class:"apf-approval-title"},"需要你的确认",-1)),G.value.dangerous?(c.openBlock(),c.createElementBlock("span",qL,"需谨慎")):c.createCommentVNode("",!0)]),c.createElementVNode("p",$L,c.toDisplayString(G.value.prompt),1),c.createElementVNode("div",gT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.value.actions,gg=>(c.openBlock(),c.createElementBlock("button",{key:gg.action,type:"button",class:c.normalizeClass(["apf-approval-btn",gg.style==="danger"?"apf-approval-btn-danger":"apf-approval-btn-primary"]),disabled:C.sending,onClick:q=>w(gg.action)},c.toDisplayString(gg.label),11,IT))),128))])],2)):c.createCommentVNode("",!0)])],2)}}}),[["__scopeId","data-v-43084dc4"]]),CT={class:"apf-tip-banner"},AT={class:"apf-tip-banner__text"},iT=P(c.defineComponent({__name:"TipBanner",props:{text:{},icon:{default:"info-filled"}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",CT,[c.createVNode(c.unref($),{name:C.icon,class:"apf-tip-banner__icon",size:18},null,8,["name"]),c.createElementVNode("span",AT,c.toDisplayString(C.text),1)]))}}),[["__scopeId","data-v-29445db0"]]),lT={class:"apf-starter-grid"},eT=["onClick"],tT={class:"apf-starter-grid__text"},aT=P(c.defineComponent({__name:"StarterPromptGrid",props:{prompts:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",lT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.prompts,(l,e)=>(c.openBlock(),c.createElementBlock("button",{key:e,type:"button",class:"apf-starter-grid__card",onClick:t=>g("select",l)},[l.icon?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:l.icon,size:16,class:"apf-starter-grid__icon"},null,8,["name"])):c.createCommentVNode("",!0),c.createElementVNode("span",tT,c.toDisplayString(l.text),1)],8,eT))),128))]))}}),[["__scopeId","data-v-227b664d"]]),cT={key:0,class:"apf-skeleton-line"},dT=P(c.defineComponent({__name:"MessageList",props:{messages:{},loading:{type:Boolean},currentRun:{},sending:{type:Boolean},brandMark:{}},emits:["resume","cancel","retry","open-process","preview"],setup(C,{expose:I,emit:g}){const A=C,i=g,l=c.useSlots(),e=c.ref(null),t=c.computed(()=>!!l.body),a=c.computed(()=>!A.loading&&A.messages.length===0&&!!l.empty);async function d(){await c.nextTick(),e.value&&(e.value.scrollTop=e.value.scrollHeight)}c.watch(()=>A.messages.length,()=>{t.value||d()},{flush:"post"}),c.watch(()=>A.messages.map(n=>`${n.id}:${n.status}:${(n.content||"").length}`).join("|"),()=>{t.value||d()},{flush:"post"});function o(n){return!A.currentRun||!n.runtimeExecutionId?null:A.currentRun.runtimeExecutionId===n.runtimeExecutionId?A.currentRun:null}return I({scrollToBottom:d,container:e}),(n,s)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"container",ref:e,class:"apf-message-list"},[C.loading&&!C.messages.length&&!t.value?(c.openBlock(),c.createElementBlock("div",cT,[...s[4]||(s[4]=[c.createElementVNode("div",{class:"apf-skeleton",style:{height:"var(--icon-size-sm, 14px)",width:"60%"}},null,-1),c.createElementVNode("div",{class:"apf-skeleton",style:{height:"var(--icon-size-sm, 14px)",width:"45%","margin-top":"var(--spacing-sm, 8px)"}},null,-1)])])):a.value?c.renderSlot(n.$slots,"empty",{},void 0,!0,1):c.renderSlot(n.$slots,"body",{messages:C.messages,scrollToBottom:d},()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.messages,Z=>(c.openBlock(),c.createBlock(gw,{key:Z.id,message:Z,run:o(Z),sending:!!C.sending,"brand-mark":C.brandMark,"session-messages":C.messages,onResume:s[0]||(s[0]=(m,b)=>i("resume",m,b)),onCancel:s[1]||(s[1]=m=>i("cancel")),onRetry:s[2]||(s[2]=m=>i("retry")),onOpenProcess:m=>i("open-process",Z),onPreview:s[3]||(s[3]=m=>i("preview",m))},null,8,["message","run","sending","brand-mark","session-messages","onOpenProcess"]))),128))],!0,2)],512))}}),[["__scopeId","data-v-5df6388a"]]),oT={key:0,class:"apf-pending-list"},nT=["src"],sT={class:"apf-pending-name"},ZT={key:1,class:"apf-pending-status"},mT={key:2,class:"apf-pending-status apf-error"},bT=["onClick"],GT=["placeholder","disabled"],rT={class:"apf-composer-footer"},hT={class:"apf-composer-tools"},uT=["disabled"],BT=["disabled"],WT={key:0,class:"apf-composer-meta"},wT={class:"apf-cap-row"},YT={key:0,class:"apf-cap-chip"},VT={key:1,class:"apf-cap-chip"},pT={class:"apf-meta-right"},yT=P(c.defineComponent({__name:"Composer",props:{disabled:{type:Boolean},placeholder:{},supportedInputs:{},hitlCapable:{type:Boolean},wsStatus:{},wsLabel:{},hideDefaultInput:{type:Boolean},hideSend:{type:Boolean},hideFileButton:{type:Boolean},hideMeta:{type:Boolean},stretch:{type:Boolean}},emits:["send","upload","remove-attachment","ws-click"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(""),l=c.ref(null),e=c.ref(null),t=c.ref([]),a=c.ref(!1),d=c.useSlots(),o=c.computed(()=>g.supportedInputs||["text"]),n=c.computed(()=>o.value.some(Y=>Y==="file"||Y==="image"||Y==="document")),s=c.computed(()=>!!d.input),Z=c.computed(()=>!g.hideDefaultInput&&!s.value),m=c.computed(()=>!g.hideSend),b=c.computed(()=>n.value&&!g.hideFileButton),G=c.computed(()=>{if(g.disabled||a.value)return!1;const Y=!!i.value.trim(),p=t.value.some(y=>y.status==="done"),V=t.value.some(y=>y.status==="uploading");return(Y||p)&&!V});function r(){var Y;g.disabled||!n.value||(Y=e.value)==null||Y.click()}function h(Y){const p=Y.target,V=p.files;if(V!=null&&V.length){for(const y of Array.from(V))A("upload",y);p.value=""}}function u(Y){const p=t.value.find(V=>V.id===Y);p!=null&&p.previewUrl&&URL.revokeObjectURL(p.previewUrl),t.value=t.value.filter(V=>V.id!==Y),A("remove-attachment",Y)}async function B(){if(!G.value)return;const Y=i.value.trim(),p=t.value.filter(V=>V.status==="done").map(V=>V.id);A("send",Y,p),i.value="",t.value.forEach(V=>{V.previewUrl&&URL.revokeObjectURL(V.previewUrl)}),t.value=[],await c.nextTick(),l.value&&(l.value.style.height="auto")}function W(Y){const p=Y.target;p.style.height="auto",p.style.height=Math.min(p.scrollHeight,220)+"px"}function w(Y){Y.key==="Enter"&&!Y.shiftKey&&(Y.preventDefault(),B())}return c.onBeforeUnmount(()=>{t.value.forEach(Y=>{Y.previewUrl&&URL.revokeObjectURL(Y.previewUrl)})}),(Y,p)=>(c.openBlock(),c.createElementBlock("form",{class:c.normalizeClass(["apf-composer",{"apf-composer-stretch":C.stretch}]),onSubmit:c.withModifiers(B,["prevent"])},[c.createElementVNode("div",{class:c.normalizeClass(["apf-composer-field",{"apf-disabled":C.disabled}])},[p[3]||(p[3]=c.createElementVNode("svg",{class:"apf-stream-ring","aria-hidden":"true",focusable:"false"},[c.createElementVNode("rect",{class:"apf-stream-ring-trail apf-stream-cw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-path apf-stream-cw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-trail apf-stream-ccw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-path apf-stream-ccw",pathLength:"100"})],-1)),c.renderSlot(Y.$slots,"pending",{},()=>[t.value.length?(c.openBlock(),c.createElementBlock("div",oT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,V=>(c.openBlock(),c.createElementBlock("div",{key:V.id,class:c.normalizeClass(["apf-pending-chip",V.status])},[V.previewUrl?(c.openBlock(),c.createElementBlock("img",{key:0,src:V.previewUrl,alt:"",class:"apf-pending-thumb"},null,8,nT)):c.createCommentVNode("",!0),c.createElementVNode("span",sT,c.toDisplayString(V.filename),1),V.status==="uploading"?(c.openBlock(),c.createElementBlock("span",ZT,"上传中")):V.status==="error"?(c.openBlock(),c.createElementBlock("span",mT,c.toDisplayString(V.error||"失败"),1)):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-pending-remove",onClick:y=>u(V.id)},"×",8,bT)],2))),128))])):c.createCommentVNode("",!0)],!0),c.renderSlot(Y.$slots,"input",{},()=>[Z.value?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,ref_key:"textareaRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=V=>i.value=V),placeholder:C.placeholder||"输入消息…",disabled:C.disabled,onInput:W,onKeydown:w},null,40,GT)),[[c.vModelText,i.value]]):c.createCommentVNode("",!0)],!0),c.createElementVNode("div",rT,[c.createElementVNode("div",hT,[c.renderSlot(Y.$slots,"tools",{},void 0,!0),c.createElementVNode("input",{ref_key:"fileInputRef",ref:e,type:"file",class:"apf-file-input",multiple:"",accept:"image/*,.pdf,.txt,.md,.csv,.json,.doc,.docx,.xls,.xlsx",onChange:h},null,544),b.value?(c.openBlock(),c.createElementBlock("button",{key:0,class:"apf-cap-btn",type:"button","aria-label":"添加文件",disabled:C.disabled||a.value,onClick:r},[...p[2]||(p[2]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M9.2 2.8 4.4 7.6a2.6 2.6 0 0 0 3.7 3.7l5.2-5.2a1.8 1.8 0 0 0-2.5-2.5L5.6 8.8",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,uT)):c.createCommentVNode("",!0)]),c.renderSlot(Y.$slots,"actions",{},()=>[m.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"submit",class:"apf-send-btn",disabled:!G.value,title:"发送"},"↗",8,BT)):c.createCommentVNode("",!0)],!0)])],2),C.hideMeta?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",WT,[c.createElementVNode("div",wT,[p[4]||(p[4]=c.createElementVNode("span",{class:"apf-cap-chip"},"文本",-1)),n.value?(c.openBlock(),c.createElementBlock("span",YT,"文件")):c.createCommentVNode("",!0),C.hitlCapable?(c.openBlock(),c.createElementBlock("span",VT,"需要确认")):c.createCommentVNode("",!0)]),c.createElementVNode("div",pT,[C.wsStatus?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-ws-status",C.wsStatus]),onClick:p[1]||(p[1]=V=>A("ws-click"))},[...p[5]||(p[5]=[c.createElementVNode("i",{class:"apf-ws-dot"},null,-1)])],2)):c.createCommentVNode("",!0),p[6]||(p[6]=c.createElementVNode("small",{class:"apf-hint"},"Enter 发送 · Shift+Enter 换行",-1))])]))],34))}}),[["__scopeId","data-v-80a967c0"]]),NT={key:0,class:"apf-run-bar"},XT={class:"apf-row"},RT={key:0,class:"apf-elapsed"},HT={key:0,class:"apf-error-text"},Iw=P(c.defineComponent({__name:"RunStatusBar",props:{run:{},sending:{type:Boolean}},emits:["cancel"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>{var a;return((a=g.run)==null?void 0:a.status)||null});function l(a){return{RUNNING:"正在处理",COMPLETED:"已完成",FAILED:"处理失败",WAITING_INPUT:"等待你的确认",CANCELLED:"已取消"}[a]||a}function e(a){return{RUNNING:"apf-running",COMPLETED:"apf-success",FAILED:"apf-failed",WAITING_INPUT:"apf-waiting",CANCELLED:"apf-cancelled"}[a]||""}function t(){if(!g.run)return"";const a=new Date(g.run.startedAt).getTime(),d=g.run.finishedAt?new Date(g.run.finishedAt).getTime():Date.now(),o=Math.round((d-a)/1e3);return o<60?o+"s":Math.floor(o/60)+"m "+o%60+"s"}return(a,d)=>C.run?(c.openBlock(),c.createElementBlock("div",NT,[c.createElementVNode("div",XT,[c.createElementVNode("span",{class:c.normalizeClass(["apf-chip",e(i.value||"")])},[d[1]||(d[1]=c.createElementVNode("i",null,null,-1)),c.createTextVNode(c.toDisplayString(l(i.value||"")),1)],2),i.value==="RUNNING"||i.value==="WAITING_INPUT"?(c.openBlock(),c.createElementBlock("span",RT,c.toDisplayString(t()),1)):c.createCommentVNode("",!0),i.value==="RUNNING"?(c.openBlock(),c.createElementBlock("button",{key:1,class:"apf-btn-cancel",onClick:d[0]||(d[0]=o=>A("cancel"))},"停止")):c.createCommentVNode("",!0)]),C.run.errorMessage?(c.openBlock(),c.createElementBlock("p",HT,c.toDisplayString(C.run.errorMessage),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-33963f1d"]]),ST={class:"apf-stream-banner__text"},MT=P(c.defineComponent({__name:"StreamStatusBanner",props:{status:{},message:{},retryLabel:{default:"重试"},showRetry:{type:Boolean,default:!0}},emits:["retry"],setup(C,{emit:I}){const g=I;return(A,i)=>C.status==="disconnected"||C.status==="reconnecting"||C.status==="connecting"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-stream-banner",`is-${C.status}`]),role:"status"},[c.createElementVNode("span",ST,c.toDisplayString(C.message||C.status),1),C.showRetry&&C.status==="disconnected"?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-stream-banner__retry",onClick:i[0]||(i[0]=l=>g("retry"))},c.toDisplayString(C.retryLabel),1)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-c9033191"]]),DT={class:"apf-header"},KT={key:0,class:"apf-danger-tag"},FT={class:"apf-prompt"},zT=["placeholder"],JT=["value"],vT=["placeholder"],kT={class:"apf-actions"},LT=["disabled","onClick"],TT=P(c.defineComponent({__name:"ApprovalCard",props:{waiting:{},disabled:{type:Boolean}},emits:["resume"],setup(C,{emit:I}){const g=I,A=c.ref("");function i(e){return e==="danger"?"apf-btn-danger":e==="ghost"||e==="default"?"apf-btn-ghost":"apf-btn-primary"}function l(e){g("resume",e,A.value||void 0),A.value=""}return(e,t)=>C.waiting?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-approval-card",{"apf-dangerous":C.waiting.dangerous}])},[c.createElementVNode("div",DT,[t[3]||(t[3]=c.createElementVNode("span",{class:"apf-title"},"需要你的操作",-1)),C.waiting.dangerous?(c.openBlock(),c.createElementBlock("span",KT,"危险操作")):c.createCommentVNode("",!0)]),c.createElementVNode("p",FT,c.toDisplayString(C.waiting.prompt),1),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.waiting.fields,a=>(c.openBlock(),c.createElementBlock("div",{key:a.key,class:"apf-field"},[c.createElementVNode("label",null,c.toDisplayString(a.label),1),a.type==="textarea"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":t[0]||(t[0]=d=>A.value=d),placeholder:"请输入"+a.label,rows:"2"},null,8,zT)),[[c.vModelText,A.value]]):a.type==="select"&&a.options.length?c.withDirectives((c.openBlock(),c.createElementBlock("select",{key:1,"onUpdate:modelValue":t[1]||(t[1]=d=>A.value=d)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.options,d=>(c.openBlock(),c.createElementBlock("option",{key:d,value:d},c.toDisplayString(d),9,JT))),128))],512)),[[c.vModelSelect,A.value]]):c.withDirectives((c.openBlock(),c.createElementBlock("input",{key:2,"onUpdate:modelValue":t[2]||(t[2]=d=>A.value=d),placeholder:"请输入"+a.label},null,8,vT)),[[c.vModelText,A.value]])]))),128)),c.createElementVNode("div",kT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.waiting.actions,a=>(c.openBlock(),c.createElementBlock("button",{key:a.action,type:"button",class:c.normalizeClass(["apf-btn",i(a.style)]),disabled:C.disabled,onClick:d=>l(a.action)},c.toDisplayString(a.label),11,LT))),128))])],2)):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-d568067a"]]),xT={class:"apf-session-sidebar","aria-label":"会话列表"},fT={class:"apf-session-sidebar__head"},jT={class:"apf-session-sidebar__head-actions"},QT={key:0,class:"apf-session-sidebar__below-head"},UT={class:"apf-session-sidebar__list"},OT=["onClick"],ET={class:"apf-session-sidebar__item-title"},PT={class:"apf-session-sidebar__item-meta"},_T={key:0,class:"apf-session-sidebar__empty"},qT=P(c.defineComponent({__name:"SessionSidebar",props:{sessions:{},activeId:{},loading:{type:Boolean},title:{},hideCreate:{type:Boolean},hideDelete:{type:Boolean},emptyText:{}},emits:["select","create","delete"],setup(C,{emit:I}){const g=I;function A(i){if(!i)return"";const l=new Date(i),e=new Date,t=e.getTime()-l.getTime();if(t<864e5&&l.getDate()===e.getDate())return l.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});const a=new Date(e);return a.setDate(a.getDate()-1),l.getDate()===a.getDate()&&l.getMonth()===a.getMonth()&&l.getFullYear()===a.getFullYear()?"昨天":t<6e4?"刚刚":t<36e5?`${Math.floor(t/6e4)} 分钟前`:t<864e5?`${Math.floor(t/36e5)} 小时前`:l.toLocaleDateString("zh-CN",{month:"2-digit",day:"2-digit"})}return(i,l)=>{const e=c.resolveComponent("el-button"),t=c.resolveDirective("loading");return c.openBlock(),c.createElementBlock("aside",xT,[c.createElementVNode("div",fT,[c.createElementVNode("strong",null,c.toDisplayString(C.title||"会话"),1),c.createElementVNode("div",jT,[c.renderSlot(i.$slots,"toolbar",{},void 0,!0),C.hideCreate?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(e,{key:0,type:"primary",size:"small",onClick:l[0]||(l[0]=a=>g("create"))},{default:c.withCtx(()=>[...l[2]||(l[2]=[c.createTextVNode("新建",-1)])]),_:1}))])]),i.$slots["below-head"]?(c.openBlock(),c.createElementBlock("div",QT,[c.renderSlot(i.$slots,"below-head",{},void 0,!0)])):c.createCommentVNode("",!0),c.withDirectives((c.openBlock(),c.createElementBlock("div",UT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.sessions,a=>(c.openBlock(),c.createElementBlock("button",{key:a.id,type:"button",class:c.normalizeClass(["apf-session-sidebar__item",{"is-active":a.id===C.activeId}]),onClick:d=>g("select",a.id)},[c.createElementVNode("span",ET,c.toDisplayString(a.title||"未命名会话"),1),c.createElementVNode("div",PT,[c.renderSlot(i.$slots,"item-meta",{session:a},()=>[c.createElementVNode("small",null,c.toDisplayString(A(a.updatedAt||a.createdAt)),1)],!0)]),c.createElementVNode("div",{class:"apf-session-sidebar__item-actions",onClick:l[1]||(l[1]=c.withModifiers(()=>{},["stop"]))},[c.renderSlot(i.$slots,"item-actions",{session:a},()=>[C.hideDelete?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(e,{key:0,class:"apf-session-sidebar__delete",link:"",type:"danger",size:"small",onClick:d=>g("delete",a.id)},{default:c.withCtx(()=>[...l[3]||(l[3]=[c.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"]))],!0)])],10,OT))),128)),!C.loading&&!C.sessions.length?(c.openBlock(),c.createElementBlock("div",_T,c.toDisplayString(C.emptyText||"暂无会话"),1)):c.createCommentVNode("",!0)])),[[t,C.loading]])])}}}),[["__scopeId","data-v-b00284f7"]]),$T=c.defineComponent({__name:"SessionHistoryDrawer",props:{visible:{type:Boolean},title:{default:"对话历史"},size:{default:320},direction:{default:"rtl"}},emits:["update:visible"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-drawer");return c.openBlock(),c.createBlock(l,{"model-value":C.visible,title:C.title,size:C.size,direction:C.direction,class:"apf-session-history-drawer","append-to-body":"","onUpdate:modelValue":i[0]||(i[0]=e=>g("update:visible",e))},{default:c.withCtx(()=>[c.renderSlot(A.$slots,"default")]),_:3},8,["model-value","title","size","direction"])}}}),gx=P(c.defineComponent({__name:"VirtualMessageScroller",props:{items:{},keyField:{default:"key"},minItemSize:{default:72},sizeDependencies:{}},emits:["scroll"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createBlock(c.unref(eB.DynamicScroller),{items:C.items,"min-item-size":C.minItemSize,"key-field":C.keyField,class:"apf-virtual-message-scroller",onScroll:i[0]||(i[0]=l=>g("scroll",l))},{default:c.withCtx(({item:l,index:e,active:t})=>[c.createVNode(c.unref(eB.DynamicScrollerItem),{item:l,active:t,"data-index":e,"size-dependencies":C.sizeDependencies?C.sizeDependencies(l):void 0},{default:c.withCtx(()=>[c.renderSlot(A.$slots,"default",{item:l,index:e,active:t},void 0,!0)]),_:2},1032,["item","active","data-index","size-dependencies"])]),_:3},8,["items","min-item-size","key-field"]))}}),[["__scopeId","data-v-d9fdb738"]]),Ix={key:0,class:"apf-processing-drawer__subtitle"},Cx={class:"apf-processing-drawer__body"},Ax=P(c.defineComponent({__name:"ProcessingDrawer",props:{modelValue:{type:Boolean},run:{},title:{},subtitle:{},sending:{type:Boolean}},emits:["update:modelValue","cancel"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-drawer");return c.openBlock(),c.createBlock(l,{"model-value":C.modelValue,title:C.title||"处理详情",size:"380px","append-to-body":"","onUpdate:modelValue":i[1]||(i[1]=e=>g("update:modelValue",e))},{default:c.withCtx(()=>[C.subtitle?(c.openBlock(),c.createElementBlock("p",Ix,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0),C.run?(c.openBlock(),c.createBlock(c.unref(Iw),{key:1,run:C.run,sending:C.sending??!1,onCancel:i[0]||(i[0]=e=>g("cancel"))},null,8,["run","sending"])):c.createCommentVNode("",!0),c.createElementVNode("div",Cx,[c.renderSlot(A.$slots,"default",{},void 0,!0)])]),_:3},8,["model-value","title"])}}}),[["__scopeId","data-v-6036074a"]]),ix={class:"apf-conversation-header"},lx={class:"apf-conversation-header__identity"},ex={class:"apf-conversation-header__copy"},tx={class:"apf-conversation-header__meta-row"},ax={key:0,class:"apf-conversation-header__label"},cx={class:"apf-conversation-header__actions"},dx={key:0,class:"apf-conversation-header__processing"},ox=P(c.defineComponent({__name:"ConversationHeader",props:{title:{},label:{},hasMessages:{type:Boolean},processing:{type:Boolean},hideDefaultActions:{type:Boolean}},emits:["changeAssistant","toggleDetails","create"],setup(C,{emit:I}){const g=C,A=I,i=c.useSlots(),l=c.computed(()=>!g.hideDefaultActions&&!i.actions);return(e,t)=>(c.openBlock(),c.createElementBlock("header",ix,[c.createElementVNode("div",lx,[c.renderSlot(e.$slots,"identity",{},()=>[c.createElementVNode("div",ex,[c.createElementVNode("div",tx,[C.label?(c.openBlock(),c.createElementBlock("span",ax,c.toDisplayString(C.label),1)):c.createCommentVNode("",!0),c.renderSlot(e.$slots,"meta",{},void 0,!0)]),c.createElementVNode("strong",null,c.toDisplayString(C.title||"选择一个智能体开始"),1)])],!0)]),c.createElementVNode("div",cx,[C.processing?(c.openBlock(),c.createElementBlock("span",dx,[...t[2]||(t[2]=[c.createElementVNode("i",null,null,-1),c.createElementVNode("span",null,"正在处理",-1)])])):c.createCommentVNode("",!0),c.renderSlot(e.$slots,"actions",{},()=>[l.value?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{type:"button",class:"apf-conversation-header__btn",onClick:t[0]||(t[0]=a=>C.hasMessages?A("create"):A("changeAssistant"))},c.toDisplayString(C.hasMessages?"新建对话":"选择智能体"),1),C.hasMessages?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-conversation-header__btn",onClick:t[1]||(t[1]=a=>A("toggleDetails"))}," 处理详情 ")):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],!0)])]))}}),[["__scopeId","data-v-127a684e"]]),nx=["title"],sx={key:0,class:"apf-pending-chip__spinner"},Zx=["src","alt"],mx=["disabled"],bx={key:3,class:"apf-pending-chip__status"},Gx={key:4,class:"apf-pending-chip__status is-error"},rx=P(c.defineComponent({__name:"PendingAttachmentChip",props:{attachment:{}},emits:["preview","remove"],setup(C,{emit:I}){const g=C,A=I;function i(e){return e!=null&&e.startsWith("image/")?"picture":"document"}function l(){g.attachment.status==="done"&&A("preview",g.attachment)}return(e,t)=>{var a;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-pending-chip",{"is-error":C.attachment.status==="error","is-clickable":C.attachment.status==="done"}]),title:C.attachment.status==="error"&&C.attachment.error||C.attachment.filename},[C.attachment.status==="uploading"?(c.openBlock(),c.createElementBlock("span",sx)):C.attachment.previewUrl&&((a=C.attachment.mimetype)!=null&&a.startsWith("image/"))?(c.openBlock(),c.createElementBlock("img",{key:1,class:"apf-pending-chip__thumb",src:C.attachment.previewUrl,alt:C.attachment.filename},null,8,Zx)):(c.openBlock(),c.createBlock(c.unref($),{key:2,name:i(C.attachment.mimetype),size:14,class:"apf-pending-chip__icon"},null,8,["name"])),c.createElementVNode("button",{type:"button",class:"apf-pending-chip__name",disabled:C.attachment.status!=="done",onClick:l},c.toDisplayString(C.attachment.filename),9,mx),C.attachment.status==="uploading"?(c.openBlock(),c.createElementBlock("span",bx,"上传中")):C.attachment.status==="error"?(c.openBlock(),c.createElementBlock("span",Gx,c.toDisplayString(C.attachment.error||"失败"),1)):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-pending-chip__remove","aria-label":"移除",onClick:t[0]||(t[0]=d=>A("remove",C.attachment.id))},[c.createVNode(c.unref($),{name:"close",size:12})])],10,nx)}}}),[["__scopeId","data-v-75e794a8"]]),hx={key:0,class:"apf-mention-panel",role:"listbox"},ux={class:"apf-mention-panel-search"},Bx=["placeholder"],Wx={class:"apf-mention-tabs"},Yx=["onClick"],Vx={class:"apf-mention-results"},px={key:0,class:"apf-mention-loading","aria-busy":"true"},yx=["onClick","onMouseenter"],Nx=["data-type"],Xx={class:"apf-mention-result-info"},Rx={class:"apf-mention-result-name"},Hx={key:0,class:"apf-mention-result-meta"},Sx={key:2,class:"apf-mention-empty"},Mx={key:1,class:"apf-mention-chips"},Dx={class:"apf-mention-chip-icon"},Kx=["onClick"],Fx=["placeholder","disabled"],zx=P(c.defineComponent({__name:"MentionInput",props:{disabled:{type:Boolean},loading:{type:Boolean},placeholder:{default:"描述你想要生成的内容..."},tabs:{},search:{},typeBadge:{},debounceMs:{default:250},emptyText:{default:"无匹配结果"},searchPlaceholder:{default:"搜索引用..."}},emits:["send","input"],setup(C,{expose:I,emit:g}){var H;const A=C,i=g,l=c.ref(""),e=c.ref(),t=c.ref([]),a=c.ref(),d=c.ref(!1),o=c.ref(""),n=c.ref(((H=A.tabs[0])==null?void 0:H.key)??""),s=c.ref([]),Z=c.ref(!1),m=c.ref(-1),b=c.ref(-1);let G=null;c.watch(()=>A.tabs,R=>{var S;R.some(M=>M.key===n.value)||(n.value=((S=R[0])==null?void 0:S.key)??"")},{deep:!0});function r(R){return A.typeBadge?A.typeBadge(R):(R[0]||"?").toUpperCase()}function h(){const R=e.value;R&&(R.style.height="auto",R.style.height=`${Math.min(R.scrollHeight,102)}px`)}c.watch(l,()=>{c.nextTick(h)});function u(R,S){if(G&&clearTimeout(G),!R.trim()){s.value=[],Z.value=!1;return}Z.value=!0,G=setTimeout(async()=>{try{s.value=await A.search(R,S)}catch{s.value=[]}finally{Z.value=!1}},A.debounceMs)}c.watch([o,n],([R,S])=>{m.value=-1,u(R,S)});function B(){d.value=!1,o.value="",b.value=-1,m.value=-1,s.value=[]}function W(){var F;const R=l.value;i("input",R);const S=(F=e.value)==null?void 0:F.selectionStart,M=S!=null&&S>0?S:R.length,D=R.lastIndexOf("@",M-1);if(D>=0&&(D===0||R[D-1]===" "||R[D-1]===`
72
- `)){const z=R.slice(D+1,M);if(!z.includes(" ")&&z.length<=30){b.value=D,o.value=z,d.value=!0;return}}B()}function w(R){if(d.value){if(R.key==="ArrowDown"){R.preventDefault(),m.value=Math.min(m.value+1,Math.max(s.value.length-1,0));return}if(R.key==="ArrowUp"){R.preventDefault(),m.value=Math.max(m.value-1,0);return}if(R.key==="Enter"&&m.value>=0&&s.value[m.value]){R.preventDefault(),Y(s.value[m.value]);return}if(R.key==="Escape"){R.preventDefault(),B();return}}R.key==="Enter"&&!R.shiftKey&&!d.value&&(R.preventDefault(),V())}function Y(R){var z;const S={id:R.id,type:R.type,label:R.name};t.value.some(v=>v.id===S.id&&v.type===S.type)||t.value.push(S);const M=l.value,D=b.value,F=((z=e.value)==null?void 0:z.selectionStart)??M.length;D>=0&&(l.value=`${M.slice(0,D)}@${R.name} ${M.slice(F)}`),B(),c.nextTick(()=>{var v;return(v=e.value)==null?void 0:v.focus()})}function p(R){t.value.splice(R,1)}function V(){const R=l.value.trim();!R&&t.value.length===0||A.disabled||(i("send",R,[...t.value]),l.value="",t.value=[])}function y(R){a.value&&!a.value.contains(R.target)&&B()}function N(){var R;(R=e.value)==null||R.focus()}return I({focus:N}),c.onMounted(()=>{document.addEventListener("mousedown",y)}),c.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),G&&clearTimeout(G)}),(R,S)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"wrapperRef",ref:a,class:"apf-mention-input"},[d.value?(c.openBlock(),c.createElementBlock("div",hx,[c.createElementVNode("div",ux,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=M=>o.value=M),class:"apf-mention-panel-input",type:"text",placeholder:C.searchPlaceholder,autocomplete:"off"},null,8,Bx),[[c.vModelText,o.value]])]),c.createElementVNode("div",Wx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.tabs,M=>(c.openBlock(),c.createElementBlock("button",{key:M.key,type:"button",class:c.normalizeClass(["apf-mention-tab",{"is-active":n.value===M.key}]),onClick:D=>n.value=M.key},c.toDisplayString(M.label),11,Yx))),128))]),c.createElementVNode("div",Vx,[Z.value?(c.openBlock(),c.createElementBlock("div",px,[...S[2]||(S[2]=[c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1)])])):s.value.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(s.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:c.normalizeClass(["apf-mention-result",{"is-highlighted":D===m.value}]),role:"option",onClick:F=>Y(M),onMouseenter:F=>m.value=D},[c.createElementVNode("div",{class:"apf-mention-badge","data-type":M.type},c.toDisplayString(r(M.type)),9,Nx),c.createElementVNode("div",Xx,[c.createElementVNode("div",Rx,c.toDisplayString(M.name),1),M.description?(c.openBlock(),c.createElementBlock("div",Hx,c.toDisplayString(M.description),1)):c.createCommentVNode("",!0)])],42,yx))),128)):o.value.trim()?(c.openBlock(),c.createElementBlock("div",Sx,c.toDisplayString(C.emptyText),1)):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0),t.value.length>0?(c.openBlock(),c.createElementBlock("div",Mx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:"apf-mention-chip"},[c.createElementVNode("span",Dx,c.toDisplayString(r(M.type)),1),c.createElementVNode("span",null,c.toDisplayString(M.label),1),c.createElementVNode("button",{type:"button",class:"apf-mention-chip-remove","aria-label":"移除引用",onClick:F=>p(D)}," × ",8,Kx)]))),128))])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("textarea",{ref_key:"textareaRef",ref:e,"onUpdate:modelValue":S[1]||(S[1]=M=>l.value=M),class:"apf-mention-textarea",placeholder:C.placeholder,disabled:C.disabled||C.loading,rows:"1",onInput:W,onKeydown:w},null,40,Fx),[[c.vModelText,l.value]])],512))}}),[["__scopeId","data-v-467928f5"]]),Jx={class:"apf-thinking-head-main"},vx={class:"apf-thinking-titles"},kx={class:"apf-thinking-title"},Lx={key:0,class:"apf-thinking-badge"},Tx={class:"apf-thinking-sub"},xx={class:"apf-thinking-head-aside"},fx={class:"apf-thinking-status"},jx={class:"apf-thinking-chevron","aria-hidden":"true"},Qx={key:0,class:"apf-thinking-body"},Ux=["innerHTML"],Ox=P(c.defineComponent({__name:"ThinkingBlock",props:{content:{},title:{default:"思考过程"},badge:{},defaultCollapsed:{type:Boolean,default:!0},statusLabel:{default:"已完成"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed),A=c.computed(()=>{if(!I.content)return"";const e=I.content.replace(/<[^>]*>/g,"").trim();return e.length>100?`${e.slice(0,100)}...`:e}),i=c.computed(()=>I.content?tm(I.content):"");function l(){g.value=!g.value}return(e,t)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-thinking",{"is-expanded":!g.value}])},[c.createElementVNode("button",{type:"button",class:"apf-thinking-head",onClick:l},[c.createElementVNode("div",Jx,[t[0]||(t[0]=c.createElementVNode("span",{class:"apf-thinking-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M8 5v3.2L10 10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})])],-1)),c.createElementVNode("div",vx,[c.createElementVNode("div",kx,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",Lx,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Tx,c.toDisplayString(g.value?A.value:"已完成思考"),1)])]),c.createElementVNode("div",xx,[c.createElementVNode("span",fx,c.toDisplayString(C.statusLabel),1),c.createElementVNode("span",jx,c.toDisplayString(g.value?"▾":"▴"),1)])]),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Qx,[c.createElementVNode("div",{class:"apf-thinking-md",innerHTML:i.value},null,8,Ux)]))],2))}}),[["__scopeId","data-v-ecf2c951"]]),Ex={class:"apf-editable-artifact"},Px={class:"apf-editable-artifact__head"},_x={class:"apf-editable-artifact__head-left"},qx={class:"apf-editable-artifact__tag"},$x={key:0,class:"apf-editable-artifact__tag is-danger"},gf={class:"apf-editable-artifact__head-right"},If={class:"apf-editable-artifact__body"},Cf=["placeholder"],Af=["srcdoc"],lf={class:"apf-editable-artifact__footer"},ef={class:"apf-editable-artifact__hint"},tf=P(c.defineComponent({__name:"EditableArtifactCard",props:{content:{},artifactType:{default:"code"},language:{},sendBackLabel:{default:"回传给助手"},hint:{default:"编辑后可回传给助手继续优化"}},emits:["sendback","copy"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.content),l=c.ref("edit");c.watch(()=>g.content,Z=>{i.value=Z});const e=c.computed(()=>g.language||g.artifactType),t=c.computed(()=>g.artifactType==="html"),a=c.computed(()=>g.artifactType==="json"),d=c.computed(()=>{if(!a.value)return null;try{return JSON.parse(i.value),!0}catch{return!1}});function o(){var Z;i.value&&((Z=navigator.clipboard)==null||Z.writeText(i.value),A("copy",i.value))}function n(){if(a.value)try{i.value=JSON.stringify(JSON.parse(i.value),null,2)}catch{}}function s(){i.value.trim()&&A("sendback",i.value,e.value)}return(Z,m)=>(c.openBlock(),c.createElementBlock("div",Ex,[c.createElementVNode("div",Px,[c.createElementVNode("div",_x,[m[3]||(m[3]=c.createElementVNode("span",{class:"apf-editable-artifact__title"},"工件",-1)),c.createElementVNode("span",qx,c.toDisplayString(C.artifactType),1),a.value&&d.value===!1?(c.openBlock(),c.createElementBlock("span",$x,"JSON 无效")):c.createCommentVNode("",!0)]),c.createElementVNode("div",gf,[t.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="edit"}]),onClick:m[0]||(m[0]=b=>l.value="edit")}," 编辑 ",2)):c.createCommentVNode("",!0),t.value?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="preview"}]),onClick:m[1]||(m[1]=b=>l.value="preview")}," 预览 ",2)):c.createCommentVNode("",!0),a.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-editable-artifact__tool",onClick:n}," 格式化 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__tool","aria-label":"复制",onClick:o}," 复制 ")])]),c.createElementVNode("div",If,[l.value==="edit"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"apf-editable-artifact__editor",placeholder:`可编辑 ${C.artifactType} 内容`,spellcheck:"false"},null,8,Cf)),[[c.vModelText,i.value]]):(c.openBlock(),c.createElementBlock("iframe",{key:1,class:"apf-editable-artifact__preview",srcdoc:i.value,sandbox:"allow-scripts",title:"artifact preview"},null,8,Af))]),c.createElementVNode("div",lf,[c.createElementVNode("span",ef,c.toDisplayString(C.hint),1),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__send",onClick:s},c.toDisplayString(C.sendBackLabel),1)])]))}}),[["__scopeId","data-v-60860f31"]]),af=P(c.defineComponent({__name:"MessageActionBar",props:{content:{},feedback:{},visible:{type:Boolean},showCopy:{type:Boolean,default:!0},showRegenerate:{type:Boolean,default:!0},showFeedback:{type:Boolean,default:!0}},emits:["copy","regenerate","feedback"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.ref(g.feedback??null);let e=null;c.watch(()=>g.feedback,d=>{l.value=d??null}),c.watch(()=>g.visible,d=>{if(d){e=setTimeout(()=>{i.value=!0},300);return}i.value=!1,e&&(clearTimeout(e),e=null)},{immediate:!0});function t(){var d;g.content&&((d=navigator.clipboard)==null||d.writeText(g.content)),A("copy")}function a(d){l.value=l.value===d?null:d,A("feedback",d)}return(d,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-msg-actions",{"is-visible":i.value}])},[C.showCopy?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-msg-actions__btn",title:"复制","aria-label":"复制",onClick:t},[...o[3]||(o[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])])):c.createCommentVNode("",!0),C.showRegenerate?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-msg-actions__btn",title:"重新生成","aria-label":"重新生成",onClick:o[0]||(o[0]=n=>A("regenerate"))},[...o[4]||(o[4]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M3 8a5 5 0 0 1 8.5-3.5M13 3v3.5H9.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M13 8a5 5 0 0 1-8.5 3.5M3 13v-3.5H6.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:c.normalizeClass(["apf-msg-actions__btn",{"is-active":l.value==="positive"}]),title:"点赞","aria-label":"点赞",onClick:o[1]||(o[1]=n=>a("positive"))},[...o[5]||(o[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:3,type:"button",class:c.normalizeClass(["apf-msg-actions__btn apf-msg-actions__btn--down",{"is-active":l.value==="negative"}]),title:"点踩","aria-label":"点踩",onClick:o[2]||(o[2]=n=>a("negative"))},[...o[6]||(o[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e20bc750"]]),cf={class:"apf-step-card__head-left"},df={class:"apf-step-card__icon","aria-hidden":"true"},of={key:0,viewBox:"0 0 16 16",width:"14",height:"14"},nf={key:1,viewBox:"0 0 16 16",width:"14",height:"14"},sf={class:"apf-step-card__titles"},Zf={class:"apf-step-card__title"},mf={key:0,class:"apf-step-card__badge"},bf={key:0,class:"apf-step-card__subtitle"},Gf={class:"apf-step-card__head-right"},rf={key:0,class:"apf-step-card__time"},hf={key:1,class:"apf-step-card__status"},uf={class:"apf-step-card__chevron","aria-hidden":"true"},Bf={class:"apf-step-card__body"},Wf=P(c.defineComponent({__name:"CollapsibleStepCard",props:{title:{},subtitle:{},badge:{},statusLabel:{},tone:{default:"default"},timestamp:{},defaultCollapsed:{type:Boolean,default:!0},collapsed:{type:Boolean}},emits:["update:collapsed"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.collapsed??g.defaultCollapsed);c.watch(()=>g.collapsed,t=>{t!==void 0&&(i.value=t)});const l=()=>g.collapsed!==void 0?g.collapsed:i.value;function e(){const t=!l();g.collapsed===void 0&&(i.value=t),A("update:collapsed",t)}return(t,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-step-card",`is-${C.tone}`])},[c.createElementVNode("button",{type:"button",class:"apf-step-card__head",onClick:e},[c.createElementVNode("div",cf,[c.createElementVNode("span",df,[c.renderSlot(t.$slots,"icon",{},()=>[C.tone==="error"?(c.openBlock(),c.createElementBlock("svg",of,[...a[0]||(a[0]=[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M8 5v3.5M8 11h.01",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])])):(c.openBlock(),c.createElementBlock("svg",nf,[...a[1]||(a[1]=[c.createElementVNode("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M6 8h4M8 6v4",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],!0)]),c.createElementVNode("div",sf,[c.createElementVNode("div",Zf,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",mf,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),C.subtitle?(c.openBlock(),c.createElementBlock("div",bf,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",Gf,[C.timestamp?(c.openBlock(),c.createElementBlock("span",rf,c.toDisplayString(C.timestamp),1)):c.createCommentVNode("",!0),C.statusLabel?(c.openBlock(),c.createElementBlock("span",hf,[a[2]||(a[2]=c.createElementVNode("i",{class:"apf-step-card__dot"},null,-1)),c.createTextVNode(" "+c.toDisplayString(C.statusLabel),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",uf,c.toDisplayString(l()?"▾":"▴"),1)])]),c.withDirectives(c.createElementVNode("div",Bf,[c.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[c.vShow,!l()]])],2))}}),[["__scopeId","data-v-9cc9ff88"]]),wf={class:"apf-agent-transfer"},Yf={class:"apf-agent-transfer__row"},Vf={class:"apf-agent-transfer__pill"},pf={class:"apf-agent-transfer__pill is-target"},yf={key:0,class:"apf-agent-transfer__reason"},Nf=P(c.defineComponent({__name:"AgentTransferCard",props:{fromLabel:{},toLabel:{},reason:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",wf,[c.createElementVNode("div",Yf,[c.createElementVNode("span",Vf,c.toDisplayString(C.fromLabel),1),g[0]||(g[0]=c.createElementVNode("span",{class:"apf-agent-transfer__arrow","aria-hidden":"true"},"→",-1)),c.createElementVNode("span",pf,c.toDisplayString(C.toLabel),1)]),C.reason?(c.openBlock(),c.createElementBlock("p",yf,c.toDisplayString(C.reason),1)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec98ad49"]]),Xf={class:"apf-field-list-card__head"},Rf={class:"apf-field-list-card__head-left"},Hf={class:"apf-field-list-card__title"},Sf={class:"apf-field-list-card__badge"},Mf={class:"apf-field-list-card__body"},Df={class:"apf-field-list-card__info"},Kf={class:"apf-field-list-card__name"},Ff={class:"apf-field-list-card__type"},zf={key:0,class:"apf-field-list-card__actions"},Jf=P(c.defineComponent({__name:"FieldListCard",props:{title:{},fields:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.fields.length} 个字段`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-field-list-card",{"is-compact":C.compact}])},[c.createElementVNode("div",Xf,[c.createElementVNode("div",Rf,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-field-list-card__icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.3"}),c.createElementVNode("path",{d:"M5 6.5h6M5 9.5h4",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})])],-1)),c.createElementVNode("span",Hf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Sf,c.toDisplayString(i()),1)]),c.createElementVNode("div",Mf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"apf-field-list-card__row"},[c.createElementVNode("div",Df,[c.createElementVNode("div",Kf,c.toDisplayString(t.name),1),c.createElementVNode("div",Ff,[c.createTextVNode(c.toDisplayString(t.type),1),t.meta?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" · "+c.toDisplayString(t.meta),1)],64)):c.createCommentVNode("",!0)])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-field-list-card__flag",{"is-req":t.required}])},c.toDisplayString(t.required?"必填":"可选"),3)]))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",zf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-field-list-card__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-field-list-card__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-ee1ab2b6"]]),vf={class:"apf-flow-strip__head"},kf={class:"apf-flow-strip__head-left"},Lf={class:"apf-flow-strip__title"},Tf={class:"apf-flow-strip__badge"},xf={class:"apf-flow-strip__body"},ff={key:0,class:"apf-flow-strip__arrow","aria-hidden":"true"},jf=["data-type"],Qf={key:0,class:"apf-flow-strip__actions"},Uf=P(c.defineComponent({__name:"FlowNodeStripCard",props:{title:{},nodes:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.nodes.length} 个节点`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-flow-strip",{"is-compact":C.compact}])},[c.createElementVNode("div",vf,[c.createElementVNode("div",kf,[e[2]||(e[2]=c.createStaticVNode('<span class="apf-flow-strip__icon" aria-hidden="true" data-v-1fea171e><svg viewBox="0 0 16 16" width="14" height="14" data-v-1fea171e><circle cx="4" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><circle cx="12" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><path d="M6 8h4" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></path></svg></span>',1)),c.createElementVNode("span",Lf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Tf,c.toDisplayString(i()),1)]),c.createElementVNode("div",xf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.nodes,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[a>0?(c.openBlock(),c.createElementBlock("div",ff)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"apf-flow-strip__node","data-type":t.type},c.toDisplayString(t.label),9,jf)],64))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",Qf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-flow-strip__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-flow-strip__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-1fea171e"]]),Of={class:"apf-token-usage"},Ef={class:"apf-token-usage__head"},Pf={class:"apf-token-usage__title"},_f={class:"apf-token-usage__body"},qf={class:"apf-token-usage__stats"},$f={class:"apf-token-usage__stat"},gj={class:"apf-token-usage__value"},Ij={class:"apf-token-usage__stat"},Cj={class:"apf-token-usage__value"},Aj={class:"apf-token-usage__stat is-total"},ij={class:"apf-token-usage__value"},lj={key:0,class:"apf-token-usage__footer"},ej={key:0,class:"apf-token-usage__model"},tj={key:1,class:"apf-token-usage__cost"},aj=P(c.defineComponent({__name:"TokenUsageCard",props:{inputTokens:{},outputTokens:{},totalTokens:{},estimatedCost:{},model:{},title:{}},setup(C){const I=C,g=c.computed(()=>I.totalTokens??I.inputTokens+I.outputTokens),A=c.computed(()=>{const l=g.value;return l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)}),i=c.computed(()=>{const l=I.estimatedCost;return l==null?null:l<.01?"<$0.01":`$${l.toFixed(4)}`});return(l,e)=>(c.openBlock(),c.createElementBlock("div",Of,[c.createElementVNode("div",Ef,[c.createElementVNode("span",Pf,c.toDisplayString(C.title||"Token 消耗"),1)]),c.createElementVNode("div",_f,[c.createElementVNode("div",qf,[c.createElementVNode("div",$f,[e[0]||(e[0]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输入",-1)),c.createElementVNode("span",gj,c.toDisplayString(C.inputTokens.toLocaleString()),1)]),c.createElementVNode("div",Ij,[e[1]||(e[1]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输出",-1)),c.createElementVNode("span",Cj,c.toDisplayString(C.outputTokens.toLocaleString()),1)]),c.createElementVNode("div",Aj,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-token-usage__label"},"总计",-1)),c.createElementVNode("span",ij,c.toDisplayString(A.value),1)])]),i.value||C.model?(c.openBlock(),c.createElementBlock("div",lj,[C.model?(c.openBlock(),c.createElementBlock("span",ej,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0),i.value?(c.openBlock(),c.createElementBlock("span",tj,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-0aacc361"]]),cj={class:"apf-questionnaire"},dj={class:"apf-questionnaire__head"},oj={class:"apf-questionnaire__title"},nj=["data-status"],sj={key:0,class:"apf-questionnaire__desc"},Zj={key:1,class:"apf-questionnaire__list"},mj={class:"apf-questionnaire__q"},bj={key:0,class:"apf-questionnaire__req"},Gj={key:0,class:"apf-questionnaire__options"},rj=["name","value","checked","disabled","onChange"],hj=["value","disabled","onInput"],uj={key:2,class:"apf-questionnaire__actions"},Bj=["disabled"],Wj=P(c.defineComponent({__name:"QuestionnaireCard",props:{title:{},description:{},questions:{},answers:{default:()=>({})},status:{default:"waiting"},approveLabel:{default:"批准"},rejectLabel:{default:"拒绝"},disabled:{type:Boolean}},emits:["answer","approve","reject"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.status==="approved"?"已批准":g.status==="rejected"?"已拒绝":"待审批",l=()=>g.questions.filter(a=>a.required).every(a=>!!g.answers[a.id]),e=()=>g.status==="waiting"&&!g.disabled;return(t,a)=>(c.openBlock(),c.createElementBlock("div",cj,[c.createElementVNode("div",dj,[c.createElementVNode("span",oj,c.toDisplayString(C.title),1),c.createElementVNode("span",{class:"apf-questionnaire__status","data-status":C.status},c.toDisplayString(i()),9,nj)]),C.description?(c.openBlock(),c.createElementBlock("p",sj,c.toDisplayString(C.description),1)):c.createCommentVNode("",!0),C.questions.length?(c.openBlock(),c.createElementBlock("div",Zj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.questions,d=>{var o;return c.openBlock(),c.createElementBlock("div",{key:d.id,class:"apf-questionnaire__item"},[c.createElementVNode("div",mj,[d.required?(c.openBlock(),c.createElementBlock("span",bj,"*")):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(d.question),1)]),(o=d.options)!=null&&o.length?(c.openBlock(),c.createElementBlock("div",Gj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.options,n=>(c.openBlock(),c.createElementBlock("label",{key:n,class:"apf-questionnaire__opt"},[c.createElementVNode("input",{type:"radio",name:d.id,value:n,checked:C.answers[d.id]===n,disabled:!e(),onChange:s=>A("answer",d.id,n)},null,40,rj),c.createTextVNode(" "+c.toDisplayString(n),1)]))),128))])):(c.openBlock(),c.createElementBlock("input",{key:1,class:"apf-questionnaire__input",type:"text",value:C.answers[d.id]||"",placeholder:"请输入...",disabled:!e(),onInput:n=>A("answer",d.id,n.target.value)},null,40,hj))])}),128))])):c.createCommentVNode("",!0),e()?(c.openBlock(),c.createElementBlock("div",uj,[c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-ghost",onClick:a[0]||(a[0]=d=>A("reject"))},c.toDisplayString(C.rejectLabel),1),c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-primary",disabled:!l(),onClick:a[1]||(a[1]=d=>A("approve"))},c.toDisplayString(C.approveLabel),9,Bj)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0e4beff5"]]),wj=["onClick"],Yj=["onClick"],Vj={key:0},pj={key:1},yj=P(c.defineComponent({__name:"ChecklistProposalCard",props:{proposal:{},status:{},selectedIds:{},readonly:{type:Boolean}},emits:["toggle-item","toggle-all","approve","reject","modify","reset"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(new Set(g.proposal.actionItems.map(B=>B.id))),l=c.computed(()=>g.selectedIds??i.value),e=c.computed(()=>l.value.size),t=c.computed(()=>e.value===g.proposal.actionItems.length&&g.proposal.actionItems.length>0),a={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#67C23A",bgColor:"#f0f9eb"}},d={todo:{icon:"document",label:"待办"},approval:{icon:"stamp",label:"审批"},review:{icon:"view",label:"审阅"},decision:{icon:"warning",label:"决策"}},o=c.ref(null),n=c.ref({});function s(B){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-item",B):i.value.has(B)?i.value.delete(B):i.value.add(B))}function Z(){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-all"):t.value?i.value.clear():g.proposal.actionItems.forEach(B=>i.value.add(B.id)))}function m(B){o.value=B.id,n.value={...B}}function b(){o.value&&n.value&&(A("modify",o.value,n.value),o.value=null,n.value={})}function G(){o.value=null,n.value={}}function r(){A("approve",Array.from(l.value))}function h(){A("reject")}function u(){A("reset")}return(B,W)=>{var w;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([B.$style.card,C.status==="approved"&&B.$style.cardApproved,C.status==="rejected"&&B.$style.cardRejected])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.titleRow)},[c.createVNode(c.unref($),{name:"circle-check-filled",size:16,style:{color:"#409EFF"}}),c.createElementVNode("span",{class:c.normalizeClass(B.$style.title)},"智能拟办",2),C.proposal.documentTitle?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.docTitle)},c.toDisplayString(C.proposal.documentTitle),3)):c.createCommentVNode("",!0)],2),!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.countBadge)},c.toDisplayString(e.value)+"/"+c.toDisplayString(C.proposal.actionItems.length)+" 项 ",3)):C.status==="approved"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusApproved])},[c.createVNode(c.unref($),{name:"check",size:12}),W[7]||(W[7]=c.createTextVNode(" 已批准 ",-1))],2)):C.status==="rejected"?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusRejected])},[c.createVNode(c.unref($),{name:"close",size:12}),W[8]||(W[8]=c.createTextVNode(" 已拒绝 ",-1))],2)):c.createCommentVNode("",!0)],2),C.proposal.summary?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.summary)},c.toDisplayString(C.proposal.summary),3)):c.createCommentVNode("",!0),(!C.status||C.status==="pending")&&!C.readonly?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.selectAllRow)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:Z},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,t.value&&B.$style.checked])},[t.value?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2),W[9]||(W[9]=c.createElementVNode("span",null,"全选",-1))],2)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.actionItems,Y=>{var p,V,y,N,H;return c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass([B.$style.item,l.value.has(Y.id)&&B.$style.itemSelected,o.value===Y.id&&B.$style.itemEditing])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemHeader),onClick:R=>s(Y.id)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:W[0]||(W[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,l.value.has(Y.id)&&B.$style.checked])},[l.value.has(Y.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemBadges)},[Y.priority?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.priorityBadge),style:c.normalizeStyle({color:(p=a[Y.priority])==null?void 0:p.color,background:(V=a[Y.priority])==null?void 0:V.bgColor})},c.toDisplayString(((y=a[Y.priority])==null?void 0:y.label)??Y.priority),7)):c.createCommentVNode("",!0),Y.type?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(B.$style.typeBadge)},[c.createVNode(c.unref($),{name:((N=d[Y.type])==null?void 0:N.icon)??"document",size:12},null,8,["name"]),c.createTextVNode(" "+c.toDisplayString(((H=d[Y.type])==null?void 0:H.label)??Y.type),1)],2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemTitle)},c.toDisplayString(Y.title),3),!C.readonly&&(!C.status||C.status==="pending")?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(B.$style.editBtn),onClick:c.withModifiers(R=>m(Y),["stop"])},[c.createVNode(c.unref($),{name:"edit",size:12})],10,Yj)):c.createCommentVNode("",!0)],10,wj),o.value===Y.id?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.editForm)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[10]||(W[10]=c.createElementVNode("label",null,"标题",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[1]||(W[1]=R=>n.value.title=R),class:c.normalizeClass(B.$style.editInput)},null,2),[[c.vModelText,n.value.title]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[11]||(W[11]=c.createElementVNode("label",null,"描述",-1)),c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":W[2]||(W[2]=R=>n.value.description=R),class:c.normalizeClass(B.$style.editTextarea),rows:"2"},null,2),[[c.vModelText,n.value.description]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[12]||(W[12]=c.createElementVNode("label",null,"负责人",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[3]||(W[3]=R=>n.value.assignee=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.assignee]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[13]||(W[13]=c.createElementVNode("label",null,"截止日期",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[4]||(W[4]=R=>n.value.deadline=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.deadline]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[15]||(W[15]=c.createElementVNode("label",null,"优先级",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[5]||(W[5]=R=>n.value.priority=R),class:c.normalizeClass(B.$style.editSelect)},[...W[14]||(W[14]=[c.createElementVNode("option",{value:"high"},"高",-1),c.createElementVNode("option",{value:"medium"},"中",-1),c.createElementVNode("option",{value:"low"},"低",-1)])],2),[[c.vModelSelect,n.value.priority]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[17]||(W[17]=c.createElementVNode("label",null,"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[6]||(W[6]=R=>n.value.type=R),class:c.normalizeClass(B.$style.editSelect)},[...W[16]||(W[16]=[c.createElementVNode("option",{value:"todo"},"待办",-1),c.createElementVNode("option",{value:"approval"},"审批",-1),c.createElementVNode("option",{value:"review"},"审阅",-1),c.createElementVNode("option",{value:"decision"},"决策",-1)])],2),[[c.vModelSelect,n.value.type]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editActions)},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.saveBtn),onClick:b},"保存",2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.cancelBtn),onClick:G},"取消",2)],2)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.itemBody)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemDesc)},c.toDisplayString(Y.description),3),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemMeta)},[Y.assignee?(c.openBlock(),c.createElementBlock("span",Vj,[c.createVNode(c.unref($),{name:"user",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.assignee),1)])):c.createCommentVNode("",!0),Y.deadline?(c.openBlock(),c.createElementBlock("span",pj,[c.createVNode(c.unref($),{name:"clock",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.deadline),1)])):c.createCommentVNode("",!0)],2)],2))],2)}),128))],2),(w=C.proposal.approvalChain)!=null&&w.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(B.$style.chain)},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainLabel)},"审批链:",2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.approvalChain,(Y,p)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainPerson)},c.toDisplayString(Y),3),p<C.proposal.approvalChain.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.chainArrow)},"→",2)):c.createCommentVNode("",!0)],64))),128))],2)):c.createCommentVNode("",!0),C.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(B.$style.actions)},[!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.approveBtn),onClick:r},[c.createVNode(c.unref($),{name:"check",size:14}),c.createTextVNode(" 确认执行 ("+c.toDisplayString(e.value)+" 项) ",1)],2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.rejectBtn),onClick:h},[c.createVNode(c.unref($),{name:"close",size:14}),W[18]||(W[18]=c.createTextVNode(" 暂不执行 ",-1))],2)],64)):(c.openBlock(),c.createElementBlock("button",{key:1,class:c.normalizeClass(B.$style.resetBtn),onClick:u},[c.createVNode(c.unref($),{name:"refresh",size:14}),W[19]||(W[19]=c.createTextVNode(" 重新审核 ",-1))],2))],2))],2)}}}),[["__cssModules",{$style:{card:"_card_yghuq_2",cardApproved:"_cardApproved_yghuq_9",cardRejected:"_cardRejected_yghuq_14",header:"_header_yghuq_20",titleRow:"_titleRow_yghuq_27",title:"_title_yghuq_27",docTitle:"_docTitle_yghuq_39",countBadge:"_countBadge_yghuq_47",statusBadge:"_statusBadge_yghuq_53",statusApproved:"_statusApproved_yghuq_63",statusRejected:"_statusRejected_yghuq_68",summary:"_summary_yghuq_74",selectAllRow:"_selectAllRow_yghuq_85",checkbox:"_checkbox_yghuq_89",checkboxInner:"_checkboxInner_yghuq_99",checked:"_checked_yghuq_110",itemList:"_itemList_yghuq_117",item:"_item_yghuq_117",itemSelected:"_itemSelected_yghuq_136",itemEditing:"_itemEditing_yghuq_141",itemHeader:"_itemHeader_yghuq_145",itemBadges:"_itemBadges_yghuq_151",priorityBadge:"_priorityBadge_yghuq_156",typeBadge:"_typeBadge_yghuq_163",itemTitle:"_itemTitle_yghuq_171",editBtn:"_editBtn_yghuq_178",itemBody:"_itemBody_yghuq_194",itemDesc:"_itemDesc_yghuq_199",itemMeta:"_itemMeta_yghuq_206",editForm:"_editForm_yghuq_220",editRow:"_editRow_yghuq_225",editInput:"_editInput_yghuq_236",editTextarea:"_editTextarea_yghuq_237",editSelect:"_editSelect_yghuq_238",editRowInline:"_editRowInline_yghuq_260",editActions:"_editActions_yghuq_270",saveBtn:"_saveBtn_yghuq_276",cancelBtn:"_cancelBtn_yghuq_277",chain:"_chain_yghuq_309",chainLabel:"_chainLabel_yghuq_321",chainPerson:"_chainPerson_yghuq_325",chainArrow:"_chainArrow_yghuq_331",actions:"_actions_yghuq_337",approveBtn:"_approveBtn_yghuq_344",rejectBtn:"_rejectBtn_yghuq_345",resetBtn:"_resetBtn_yghuq_346"}}]]),Nj=["onClick"],Xj=P(c.defineComponent({__name:"RequirementAnalysisCard",props:{analysis:{},partialAnswers:{default:()=>({})},nextQuestionId:{default:null},waitingConfirmation:{type:Boolean,default:!0}},emits:["answer","skip"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>({...g.partialAnswers})),l=c.computed(()=>({simple:"简单",medium:"中等",complex:"复杂"})[g.analysis.complexity]||g.analysis.complexity),e=c.computed(()=>{const s=g.analysis.completeness.score;return s>=80?"success":s>=60?"warning":"danger"}),t=c.computed(()=>g.analysis.confirmQuestions.filter(s=>s.required).every(s=>{var Z;return(Z=i.value[s.id])==null?void 0:Z.trim()}));function a(){A("skip")}function d(s,Z){g.waitingConfirmation&&A("answer",s,Z)}function o(s){var Z;return!!((Z=i.value[s])!=null&&Z.trim())}function n(s){return g.waitingConfirmation&&g.nextQuestionId===s}return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summary)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryHeader)},[c.createVNode(c.unref($),{name:"data-board",size:16}),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryTitle)},"需求分析结果",2)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryGrid)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"意图",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.intent),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"类型",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.type),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"复杂度",2),c.createVNode(m,{type:C.analysis.complexity==="complex"?"danger":C.analysis.complexity==="medium"?"warning":"success",size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l.value),1)]),_:1},8,["type"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"完整性",2),c.createVNode(b,{percentage:C.analysis.completeness.score,color:e.value==="success"?"#67c23a":e.value==="warning"?"#e6a23c":"#f56c6c","stroke-width":8,"show-text":!1,style:{width:"80px"}},null,8,["percentage","color"]),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.completeness.score)+"%",3)],2)],2),C.analysis.completeness.missing.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.missingSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.missingTitle)},[c.createVNode(c.unref($),{name:"warning",size:14}),Z[0]||(Z[0]=c.createElementVNode("span",null,"缺失信息",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.missingList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.missing,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.completeness.assumptions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.assumptionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.assumptionsTitle)},[c.createVNode(c.unref($),{name:"info-filled",size:14}),Z[1]||(Z[1]=c.createElementVNode("span",null,"AI 假设",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.assumptionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.assumptions,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0)],2),C.analysis.suggestedChain.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.chainSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainTitle)},[c.createVNode(c.unref($),{name:"list",size:14}),Z[2]||(Z[2]=c.createElementVNode("span",null,"执行计划",-1))],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.suggestedChain,(G,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass(s.$style.chainItem)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainStep)},c.toDisplayString(r+1),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainContent)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainAgent)},c.toDisplayString(G.agent),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainDesc)},c.toDisplayString(G.description),3)],2)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.confirmQuestions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.questionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsTitle)},[c.createVNode(c.unref($),{name:"question-filled",size:14}),Z[3]||(Z[3]=c.createElementVNode("span",null,"请确认以下信息",-1)),C.waitingConfirmation&&!t.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.progressHint)}," 在下方输入框逐条回复,答完必填项后自动继续 ",2)):C.waitingConfirmation&&t.value?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.progressHint)}," 必填项已完成,发送任意内容或直接点选以继续 ",2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.confirmQuestions,G=>(c.openBlock(),c.createElementBlock("div",{key:G.id,class:c.normalizeClass([s.$style.questionItem,n(G.id)&&s.$style.questionItemActive,o(G.id)&&s.$style.questionItemDone])},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionText)},[o(G.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"circle-check",size:14,class:c.normalizeClass(s.$style.answeredIcon)},null,8,["class"])):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(G.question)+" ",1),G.required?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.required)},"*",2)):c.createCommentVNode("",!0)],2),o(G.id)?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.answeredValue)},c.toDisplayString(i.value[G.id]),3)):G.options&&G.options.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.optionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.options,(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass([s.$style.optionItem,{[s.$style.optionDisabled]:!C.waitingConfirmation}]),onClick:u=>C.waitingConfirmation&&d(G.id,r)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionIndex)},c.toDisplayString(h+1),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionText)},c.toDisplayString(r),3)],10,Nj))),128))],2)):n(G.id)?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.inputHint)}," 请在下方输入框回复 ",2)):c.createCommentVNode("",!0)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.waitingConfirmation?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(s.$style.skipLink),onClick:a}," 跳过,直接执行 ",2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_8r8st_2",summary:"_summary_8r8st_10",summaryHeader:"_summaryHeader_8r8st_15",summaryTitle:"_summaryTitle_8r8st_24",summaryGrid:"_summaryGrid_8r8st_28",summaryItem:"_summaryItem_8r8st_34",summaryLabel:"_summaryLabel_8r8st_40",summaryValue:"_summaryValue_8r8st_46",missingSection:"_missingSection_8r8st_52",missingTitle:"_missingTitle_8r8st_59",missingList:"_missingList_8r8st_69",assumptionsSection:"_assumptionsSection_8r8st_81",assumptionsTitle:"_assumptionsTitle_8r8st_88",assumptionsList:"_assumptionsList_8r8st_98",chainSection:"_chainSection_8r8st_110",chainTitle:"_chainTitle_8r8st_115",chainList:"_chainList_8r8st_125",chainItem:"_chainItem_8r8st_131",chainStep:"_chainStep_8r8st_137",chainContent:"_chainContent_8r8st_151",chainAgent:"_chainAgent_8r8st_155",chainDesc:"_chainDesc_8r8st_161",questionsSection:"_questionsSection_8r8st_167",questionsTitle:"_questionsTitle_8r8st_171",progressHint:"_progressHint_8r8st_182",questionItemActive:"_questionItemActive_8r8st_188",questionItemDone:"_questionItemDone_8r8st_195",answeredIcon:"_answeredIcon_8r8st_199",answeredValue:"_answeredValue_8r8st_204",inputHint:"_inputHint_8r8st_210",optionDisabled:"_optionDisabled_8r8st_216",questionsList:"_questionsList_8r8st_221",questionItem:"_questionItem_8r8st_188",questionText:"_questionText_8r8st_233",required:"_required_8r8st_238",optionsList:"_optionsList_8r8st_243",optionItem:"_optionItem_8r8st_249",optionSelected:"_optionSelected_8r8st_265",optionIndex:"_optionIndex_8r8st_270",optionText:"_optionText_8r8st_289",actions:"_actions_8r8st_295",skipLink:"_skipLink_8r8st_303"}}]]),$A={card:"_card_6xf4y_1",header:"_header_6xf4y_9",title:"_title_6xf4y_16",filename:"_filename_6xf4y_22",summary:"_summary_6xf4y_27",points:"_points_6xf4y_34",section:"_section_6xf4y_44",sectionTitle:"_sectionTitle_6xf4y_48",sectionContent:"_sectionContent_6xf4y_55"},Rj=c.defineComponent({__name:"DocumentDetailSummaryCard",props:{item:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref($A).card)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).header)},[c.createVNode(c.unref($),{name:"document",size:16}),c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).title)},c.toDisplayString(C.item.summary.title),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).filename)},c.toDisplayString(C.item.filename),3)])],2),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).summary)},c.toDisplayString(C.item.summary.summary),3),C.item.summary.keyPoints.length?(c.openBlock(),c.createElementBlock("ul",{key:0,class:c.normalizeClass(c.unref($A).points)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.keyPoints,(A,i)=>(c.openBlock(),c.createElementBlock("li",{key:i},c.toDisplayString(A),1))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.sections,(A,i)=>(c.openBlock(),c.createElementBlock("div",{key:i,class:c.normalizeClass(c.unref($A).section)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).sectionTitle)},c.toDisplayString(A.heading),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).sectionContent)},c.toDisplayString(A.content),3)],2))),128))],2))}}),Hj=["disabled","onClick"],Sj=P(c.defineComponent({__name:"ErrorRecoveryCard",props:{error:{},nodeName:{},nodeType:{},strategies:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(A.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.header)},[c.createVNode(c.unref($),{name:"warning-filled",size:14,class:c.normalizeClass(A.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},"执行错误",2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorInfo)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.nodeInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeLabel)},"节点:",2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeName)},c.toDisplayString(C.nodeName),3),C.nodeType?(c.openBlock(),c.createBlock(l,{key:0,size:"small",type:"info"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(C.nodeType),1)]),_:1})):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorMessage)},[c.createVNode(c.unref($),{name:"circle-close-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategies)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyLabel)},"选择恢复策略:",2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.strategies,e=>(c.openBlock(),c.createElementBlock("button",{key:e.value,class:c.normalizeClass([A.$style.strategyBtn,e.disabled&&A.$style.strategyDisabled]),disabled:e.disabled,onClick:t=>g("select",e.value)},[c.createVNode(c.unref($),{name:e.icon,size:16},null,8,["name"]),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyName)},c.toDisplayString(e.label),3),c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyDesc)},c.toDisplayString(e.description),3)],2)],10,Hj))),128))],2)],2)],2)],2)}}}),[["__cssModules",{$style:{card:"_card_170h5_2",header:"_header_170h5_8",headerIcon:"_headerIcon_170h5_17",title:"_title_170h5_21",body:"_body_170h5_27",errorInfo:"_errorInfo_170h5_31",nodeInfo:"_nodeInfo_170h5_35",nodeLabel:"_nodeLabel_170h5_42",nodeName:"_nodeName_170h5_47",errorMessage:"_errorMessage_170h5_53",strategies:"_strategies_170h5_65",strategyLabel:"_strategyLabel_170h5_70",strategyList:"_strategyList_170h5_76",strategyBtn:"_strategyBtn_170h5_82",strategyDisabled:"_strategyDisabled_170h5_104",strategyInfo:"_strategyInfo_170h5_108",strategyName:"_strategyName_170h5_114",strategyDesc:"_strategyDesc_170h5_120"}}]]),Mj=P(c.defineComponent({__name:"VariableDiffCard",props:{nodeName:{},changes:{}},setup(C){const I=C,g=c.computed(()=>I.changes.length>0);function A(l){return l==null?"null":typeof l=="string"?l:JSON.stringify(l,null,2)}function i(l){switch(l.type){case"add":return{icon:"plus",color:"var(--el-color-success, #67c23a)",label:"新增"};case"update":return{icon:"edit",color:"var(--el-color-primary, #409eff)",label:"更新"};case"delete":return{icon:"delete",color:"var(--el-color-danger, #f56c6c)",label:"删除"};default:return{icon:"info-filled",color:"var(--el-color-info, #909399)",label:"变更"}}}return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(l.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createVNode(c.unref($),{name:"data-line",size:14,class:c.normalizeClass(l.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},"变量变更",2)],2),C.nodeName?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(l.$style.nodeInfo)},c.toDisplayString(C.nodeName),3)):c.createCommentVNode("",!0)],2),g.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.body)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.changes,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass(l.$style.change)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeHeader)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeType)},[c.createVNode(c.unref($),{name:i(t).icon,size:12,style:c.normalizeStyle({color:i(t).color})},null,8,["name","style"]),c.createElementVNode("span",{style:c.normalizeStyle({color:i(t).color})},c.toDisplayString(i(t).label),5)],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.varName)},c.toDisplayString(t.name),3)],2),t.type==="update"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.diff)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffOld)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"旧值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.oldValue)),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffNew)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"新值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)],2)):t.type==="add"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.singleValue)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)):c.createCommentVNode("",!0)],2))),128))],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.empty)}," 暂无变量变更 ",2))],2))}}),[["__cssModules",{$style:{card:"_card_1byhf_2",header:"_header_1byhf_8",headerLeft:"_headerLeft_1byhf_17",headerIcon:"_headerIcon_1byhf_23",title:"_title_1byhf_27",nodeInfo:"_nodeInfo_1byhf_33",body:"_body_1byhf_38",change:"_change_1byhf_45",changeHeader:"_changeHeader_1byhf_51",changeType:"_changeType_1byhf_59",varName:"_varName_1byhf_67",diff:"_diff_1byhf_73",diffOld:"_diffOld_1byhf_78",diffNew:"_diffNew_1byhf_84",singleValue:"_singleValue_1byhf_89",diffLabel:"_diffLabel_1byhf_93",diffValue:"_diffValue_1byhf_100",empty:"_empty_1byhf_108"}}]]),Dj=P(c.defineComponent({__name:"SubWorkflowStatusCard",props:{workflowName:{},status:{},durationMs:{},error:{},nodeCount:{},completedNodes:{}},emits:["detail","retry"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.computed(()=>{switch(g.status){case"running":return"loading";case"success":return"circle-check";case"error":return"circle-close-filled";case"waiting":return"clock";case"cancelled":return"minus";default:return"more-filled"}}),e=c.computed(()=>{switch(g.status){case"running":return"执行中";case"success":return"成功";case"error":return"失败";case"waiting":return"待确认";case"cancelled":return"已取消";default:return"等待"}}),t=c.computed(()=>{switch(g.status){case"running":return"primary";case"success":return"success";case"error":return"danger";case"waiting":return"warning";default:return"info"}}),a=c.computed(()=>{const s=g.durationMs;return s==null?"":s<1e3?`${s}ms`:`${(s/1e3).toFixed(2)}s`}),d=c.computed(()=>g.nodeCount??0),o=c.computed(()=>g.completedNodes??0),n=c.computed(()=>d.value===0?0:Math.round(o.value/d.value*100));return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress"),G=c.resolveComponent("el-button");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header),onClick:Z[0]||(Z[0]=r=>i.value=!i.value)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.iconWrap)},[c.createVNode(c.unref($),{name:l.value,size:16,class:c.normalizeClass(C.status==="running"&&s.$style.iconSpin)},null,8,["name","class"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.info)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.name)},"子工作流:"+c.toDisplayString(C.workflowName),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.meta)},[c.createVNode(m,{size:"small",type:t.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.value),1)]),_:1},8,["type"]),a.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.duration)},c.toDisplayString(a.value),3)):c.createCommentVNode("",!0)],2)],2),c.createVNode(c.unref($),{name:i.value?"arrow-up":"arrow-down",size:14,class:c.normalizeClass(s.$style.expandIcon)},null,8,["name","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.detail)},[d.value>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.progress)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.progressLabel)}," 节点进度:"+c.toDisplayString(o.value)+" / "+c.toDisplayString(d.value),3),c.createVNode(b,{percentage:n.value,status:C.status==="error"?"exception":void 0,"stroke-width":6},null,8,["percentage","status"])],2)):c.createCommentVNode("",!0),C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.error)},[c.createVNode(c.unref($),{name:"warning-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(s.$style.actions)},[c.createVNode(G,{size:"small",onClick:Z[1]||(Z[1]=r=>A("detail"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"view",size:14,style:{"margin-right":"4px"}}),Z[3]||(Z[3]=c.createTextVNode(" 查看详情 ",-1))]),_:1}),C.status==="error"?(c.openBlock(),c.createBlock(G,{key:0,size:"small",type:"primary",plain:"",onClick:Z[2]||(Z[2]=r=>A("retry"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"refresh",size:14,style:{"margin-right":"4px"}}),Z[4]||(Z[4]=c.createTextVNode(" 重试 ",-1))]),_:1})):c.createCommentVNode("",!0)],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_15eqh_2",header:"_header_15eqh_8",iconWrap:"_iconWrap_15eqh_21",info:"_info_15eqh_33",name:"_name_15eqh_41",meta:"_meta_15eqh_50",duration:"_duration_15eqh_56",expandIcon:"_expandIcon_15eqh_62",detail:"_detail_15eqh_67",progress:"_progress_15eqh_73",progressLabel:"_progressLabel_15eqh_77",error:"_error_15eqh_83",actions:"_actions_15eqh_95",iconSpin:"_iconSpin_15eqh_100","sub-workflow-spin":"_sub-workflow-spin_15eqh_1"}}]]),Kj={key:0},Fj=P(c.defineComponent({__name:"PptPreviewCard",props:{slides:{},metadata:{},loading:{type:Boolean},error:{},blob:{}},emits:["download"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>(g.slides??[]).slice(0,4)),l={business:"商务",tech:"科技",education:"教育",creative:"创意"},e={professional:"专业",casual:"休闲",academic:"学术"},t={title:"document",content:"notebook",chart:"data-line",comparison:"scale-to-original",summary:"document-checked"};function a(){var d;if(g.blob){const o=URL.createObjectURL(g.blob),n=document.createElement("a");n.href=o,n.download=`${((d=g.metadata)==null?void 0:d.title)??"presentation"}.pptx`,n.click(),URL.revokeObjectURL(o)}else A("download")}return(d,o)=>{var n,s,Z,m;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(d.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.titleRow)},[c.createVNode(c.unref($),{name:"data-board",size:16,style:{color:"#67C23A"}}),c.createElementVNode("span",{class:c.normalizeClass(d.$style.title)},c.toDisplayString(((n=C.metadata)==null?void 0:n.title)??"AI PPT 生成"),3)],2),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.metaBadges)},[c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(l[C.metadata.template]??C.metadata.template),3),c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(C.metadata.totalSlides)+" 页",3)],2)):c.createCommentVNode("",!0)],2),C.loading?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.loadingState)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.spinner)},null,2),o[0]||(o[0]=c.createElementVNode("span",null,"正在生成 PPT...",-1))],2)):C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.errorState)},[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):i.value.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(d.$style.previewGrid)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,b=>{var G;return c.openBlock(),c.createElementBlock("div",{key:b.index,class:c.normalizeClass(d.$style.slideThumb)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideHeader)},[c.createVNode(c.unref($),{name:t[b.type]??"document",size:12},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(b.heading),1)],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideBody)},[(G=b.content)!=null&&G.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideContent)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(b.content.slice(0,3),(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:c.normalizeClass(d.$style.slidePoint)},c.toDisplayString(r),3))),128)),b.content.length>3?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideMore)}," +"+c.toDisplayString(b.content.length-3)+" 更多 ",3)):c.createCommentVNode("",!0)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.slideEmpty)},"暂无内容",2))],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideIndex)},c.toDisplayString(b.index),3)],2)}),128)),(((s=C.slides)==null?void 0:s.length)??0)>4?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.moreSlides)},[c.createElementVNode("span",null,"+"+c.toDisplayString((((Z=C.slides)==null?void 0:Z.length)??0)-4)+" 页",1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(d.$style.meta)},[C.metadata.style?(c.openBlock(),c.createElementBlock("span",Kj,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(e[C.metadata.style]??C.metadata.style),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,[c.createVNode(c.unref($),{name:"document",size:12}),c.createTextVNode(" "+c.toDisplayString(C.metadata.totalSlides)+" 页 ",1)])],2)):c.createCommentVNode("",!0),!C.loading&&((m=C.slides)!=null&&m.length)?(c.openBlock(),c.createElementBlock("div",{key:4,class:c.normalizeClass(d.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(d.$style.downloadBtn),onClick:a},[c.createVNode(c.unref($),{name:"download",size:14}),o[1]||(o[1]=c.createTextVNode(" 下载 PPT ",-1))],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_z1wac_2",header:"_header_z1wac_9",titleRow:"_titleRow_z1wac_16",title:"_title_z1wac_16",metaBadges:"_metaBadges_z1wac_28",badge:"_badge_z1wac_33",loadingState:"_loadingState_z1wac_41",errorState:"_errorState_z1wac_42",spinner:"_spinner_z1wac_56",spin:"_spin_z1wac_56",previewGrid:"_previewGrid_z1wac_69",slideThumb:"_slideThumb_z1wac_76",slideHeader:"_slideHeader_z1wac_85",slideBody:"_slideBody_z1wac_97",slideContent:"_slideContent_z1wac_101",slidePoint:"_slidePoint_z1wac_107",slideMore:"_slideMore_z1wac_116",slideEmpty:"_slideEmpty_z1wac_122",slideIndex:"_slideIndex_z1wac_127",moreSlides:"_moreSlides_z1wac_136",meta:"_meta_z1wac_28",actions:"_actions_z1wac_161",downloadBtn:"_downloadBtn_z1wac_166"}}]]),zj=P(c.defineComponent({__name:"FlowPreviewShell",props:{title:{},badge:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1},showFitButton:{type:Boolean,default:!0}},emits:["primary-action","secondary-action","fit-view"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([A.$style.card,{[A.$style.compact]:C.compact}])},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.head)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headLeft)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headIcon)},[c.renderSlot(A.$slots,"icon",{},()=>[c.createVNode(c.unref($),{name:"connection",size:14})])],2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.headRight)},[C.badge?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(A.$style.badge)},c.toDisplayString(C.badge),3)):c.createCommentVNode("",!0),C.showFitButton?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.fitBtn),title:"适配画布",onClick:i[0]||(i[0]=l=>g("fit-view"))},[c.createVNode(c.unref($),{name:"full-screen"})],2)):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.canvasWrapper)},[c.renderSlot(A.$slots,"default")],2),C.primaryAction||C.secondaryAction?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(A.$style.actions)},[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(A.$style.btnGhost),onClick:i[1]||(i[1]=l=>g("secondary-action"))},[c.createVNode(c.unref($),{name:"edit",size:12}),c.createTextVNode(" "+c.toDisplayString(C.secondaryAction),1)],2)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.btnPrimary),onClick:i[2]||(i[2]=l=>g("primary-action"))},[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryAction),1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{card:"_card_h1z12_1",head:"_head_h1z12_16",headLeft:"_headLeft_h1z12_25",headRight:"_headRight_h1z12_31",headIcon:"_headIcon_h1z12_37",title:"_title_h1z12_49",badge:"_badge_h1z12_55",fitBtn:"_fitBtn_h1z12_64",canvasWrapper:"_canvasWrapper_h1z12_86","vue-flow__node":"_vue-flow__node_h1z12_92",selected:"_selected_h1z12_96","vue-flow__edge-path":"_vue-flow__edge-path_h1z12_101","vue-flow__controls":"_vue-flow__controls_h1z12_105","vue-flow__controls-button":"_vue-flow__controls-button_h1z12_111",actions:"_actions_h1z12_121",btnPrimary:"_btnPrimary_h1z12_130",btnGhost:"_btnGhost_h1z12_150",compact:"_compact_h1z12_173"}}]]),Jj={class:"apf-model3d"},vj={class:"apf-model3d__header"},kj={class:"apf-model3d__badge"},Lj={class:"apf-model3d__filename"},Tj={class:"apf-model3d__body"},xj={key:0,slot:"poster",class:"apf-model3d__hint"},fj={key:1,class:"apf-model3d__hint is-error"},jj={key:0,class:"apf-model3d__actions"},Qj=["href"],Uj=P(c.defineComponent({__name:"Model3dPreviewCard",props:{url:{},filename:{},mimeType:{},poster:{}},setup(C){const I=C,g=c.ref(!1),A=c.ref(null),i=c.computed(()=>{var a,d;const t=((d=(a=I.filename)==null?void 0:a.split(".").pop())==null?void 0:d.toLowerCase())||"";return["gltf","glb"].includes(t)?"glTF":t==="obj"?"OBJ":t==="stl"?"STL":t==="fbx"?"FBX":"3D"});function l(){g.value=!0,A.value=null}function e(){A.value="加载失败"}return(t,a)=>{const d=c.resolveComponent("model-viewer");return c.openBlock(),c.createElementBlock("div",Jj,[c.createElementVNode("div",vj,[c.createElementVNode("span",kj,c.toDisplayString(i.value),1),c.createElementVNode("span",Lj,c.toDisplayString(C.filename||"3D 模型"),1)]),c.createElementVNode("div",Tj,[c.createVNode(d,{src:C.url,poster:C.poster,"camera-controls":"","auto-rotate":"","shadow-intensity":"1",class:"apf-model3d__viewer",onLoad:l,onError:e},{default:c.withCtx(()=>[!g.value&&!A.value?(c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(c.unref($),{name:"loading",size:24,class:"apf-model3d__spin"}),a[0]||(a[0]=c.createElementVNode("span",null,"加载 3D 模型中...",-1))])):c.createCommentVNode("",!0),A.value?(c.openBlock(),c.createElementBlock("div",fj,[c.createVNode(c.unref($),{name:"warning-filled",size:24}),c.createElementVNode("span",null,c.toDisplayString(A.value),1)])):c.createCommentVNode("",!0)]),_:1},8,["src","poster"])]),A.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",jj,[c.createElementVNode("a",{class:"apf-model3d__download",href:C.url,download:""},[c.createVNode(c.unref($),{name:"download",size:14}),a[1]||(a[1]=c.createTextVNode(" 下载 ",-1))],8,Qj)]))])}}}),[["__scopeId","data-v-b562b8bd"]]),Oj={class:"apf-image-generate"},Ej={class:"apf-image-generate__header"},Pj={class:"apf-image-generate__title-row"},_j={key:0,class:"apf-image-generate__model"},qj={key:0,class:"apf-image-generate__prompt"},$j={class:"apf-image-generate__image-container"},gQ={key:0,class:"apf-image-generate__overlay"},IQ={key:1,class:"apf-image-generate__overlay apf-image-generate__overlay--error"},CQ=["src"],AQ={class:"apf-image-generate__zoom-hint"},iQ={key:3,class:"apf-image-generate__placeholder"},lQ={key:1,class:"apf-image-generate__meta"},eQ={key:0},tQ={key:1},aQ={key:2},cQ={key:2,class:"apf-image-generate__actions"},dQ=P(c.defineComponent({__name:"ImageGenerateCard",props:{imageUrl:{},prompt:{},model:{},size:{},imageStyle:{},quality:{},loading:{type:Boolean},error:{}},emits:["download","regenerate"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1);function l(){if(!g.imageUrl)return;const o=document.createElement("a");o.href=g.imageUrl,o.download=`ai-image-${Date.now()}.png`,o.click(),A("download")}function e(){g.imageUrl&&(i.value=!0)}function t(){i.value=!1}const a={vivid:"鲜艳",natural:"自然"},d={standard:"标准",hd:"高清"};return(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",Oj,[c.createElementVNode("div",Ej,[c.createElementVNode("div",Pj,[c.createVNode(c.unref($),{name:"picture",size:16,style:{color:"#E6A23C"}}),n[1]||(n[1]=c.createElementVNode("span",{class:"apf-image-generate__title"},"AI 图片生成",-1))]),C.model?(c.openBlock(),c.createElementBlock("div",_j,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0)]),C.prompt?(c.openBlock(),c.createElementBlock("div",qj,[n[2]||(n[2]=c.createElementVNode("span",{class:"apf-image-generate__prompt-label"},"Prompt:",-1)),c.createTextVNode(c.toDisplayString(C.prompt),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",$j,[C.loading?(c.openBlock(),c.createElementBlock("div",gQ,[...n[3]||(n[3]=[c.createElementVNode("div",{class:"apf-image-generate__spinner"},null,-1),c.createElementVNode("span",null,"正在生成图片...",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",IQ,[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)])):C.imageUrl?(c.openBlock(),c.createElementBlock("div",{key:2,class:"apf-image-generate__image-wrap",onClick:e},[c.createElementVNode("img",{src:C.imageUrl,class:"apf-image-generate__image",alt:"AI generated image"},null,8,CQ),c.createElementVNode("div",AQ,[c.createVNode(c.unref($),{name:"full-screen",size:16}),n[4]||(n[4]=c.createElementVNode("span",null,"点击放大",-1))])])):(c.openBlock(),c.createElementBlock("div",iQ,[c.createVNode(c.unref($),{name:"picture",size:32}),n[5]||(n[5]=c.createElementVNode("span",null,"等待生成",-1))]))]),C.size||C.imageStyle||C.quality?(c.openBlock(),c.createElementBlock("div",lQ,[C.size?(c.openBlock(),c.createElementBlock("span",eQ,[c.createVNode(c.unref($),{name:"full-screen",size:12}),c.createTextVNode(" "+c.toDisplayString(C.size),1)])):c.createCommentVNode("",!0),C.imageStyle?(c.openBlock(),c.createElementBlock("span",tQ,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(a[C.imageStyle]??C.imageStyle),1)])):c.createCommentVNode("",!0),C.quality?(c.openBlock(),c.createElementBlock("span",aQ,[c.createVNode(c.unref($),{name:"picture",size:12}),c.createTextVNode(" "+c.toDisplayString(d[C.quality]??C.quality),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!C.loading&&C.imageUrl?(c.openBlock(),c.createElementBlock("div",cQ,[c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn apf-image-generate__btn--primary",onClick:l},[c.createVNode(c.unref($),{name:"download",size:14}),n[6]||(n[6]=c.createTextVNode(" 下载图片 ",-1))]),c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn",onClick:n[0]||(n[0]=s=>A("regenerate"))},[c.createVNode(c.unref($),{name:"refresh",size:14}),n[7]||(n[7]=c.createTextVNode(" 重新生成 ",-1))])])):c.createCommentVNode("",!0)]),i.value&&C.imageUrl?(c.openBlock(),c.createBlock(c.unref(BC.ElImageViewer),{key:0,"url-list":[C.imageUrl],"initial-index":0,"close-on-press-escape":!0,teleported:"",onClose:t},null,8,["url-list"])):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-7f771b7c"]]),oQ=P(c.defineComponent({__name:"SchemaFormPreview",props:{fields:{},title:{default:"生成的表单"},compact:{type:Boolean,default:!1},labelWidth:{default:"100px"},labelPosition:{default:"right"},primaryActionLabel:{default:"确认发布"},showPrimaryAction:{type:Boolean}},emits:["click","primary-action"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.showPrimaryAction!==void 0?g.showPrimaryAction:!g.compact);return(l,e)=>{const t=c.resolveComponent("el-input"),a=c.resolveComponent("el-form-item"),d=c.resolveComponent("el-option"),o=c.resolveComponent("el-select"),n=c.resolveComponent("el-checkbox"),s=c.resolveComponent("el-checkbox-group"),Z=c.resolveComponent("el-radio"),m=c.resolveComponent("el-radio-group"),b=c.resolveComponent("el-switch"),G=c.resolveComponent("el-date-picker"),r=c.resolveComponent("el-time-picker"),h=c.resolveComponent("el-button"),u=c.resolveComponent("el-input-number"),B=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([l.$style.previewCard,{[l.$style.compact]:C.compact}]),onClick:e[1]||(e[1]=W=>A("click"))},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerIcon)},[c.createVNode(c.unref($),{name:"grid",size:14})],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerRight)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.badge)},c.toDisplayString(C.fields.length)+" 个字段",3),c.createElementVNode("span",{class:c.normalizeClass(l.$style.viewHint)},[c.createVNode(c.unref($),{name:"view",size:12}),e[2]||(e[2]=c.createTextVNode(" 预览 ",-1))],2)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.previewBody)},[c.createVNode(B,{"label-width":C.labelWidth,"label-position":C.labelPosition,class:c.normalizeClass(l.$style.form)},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,W=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:W.id},[["input","email","phone","password"].includes(W.type)?(c.openBlock(),c.createBlock(a,{key:0,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder,clearable:W.clearable,"show-password":W.showPassword,maxlength:W.maxlength,disabled:C.compact,size:"default"},null,8,["placeholder","clearable","show-password","maxlength","disabled"])]),_:2},1032,["label","class"])):W.type==="textarea"?(c.openBlock(),c.createBlock(a,{key:1,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{type:"textarea",placeholder:W.placeholder,rows:3,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="select"?(c.openBlock(),c.createBlock(a,{key:2,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(o,{placeholder:W.placeholder,clearable:W.clearable,disabled:C.compact,style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(d,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","clearable","disabled"])]),_:2},1032,["label","class"])):W.type==="checkbox"?(c.openBlock(),c.createBlock(a,{key:3,label:W.label||void 0,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(s,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(n,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="radio"?(c.openBlock(),c.createBlock(a,{key:4,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(m,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(Z,{key:String(w.value),value:w.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="switch"?(c.openBlock(),c.createBlock(a,{key:5,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(b,{disabled:C.compact},null,8,["disabled"])]),_:1},8,["label","class"])):W.type==="date-picker"||W.type==="datepicker"?(c.openBlock(),c.createBlock(a,{key:6,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(G,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="time-picker"||W.type==="timepicker"?(c.openBlock(),c.createBlock(a,{key:7,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(r,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="button"?(c.openBlock(),c.createBlock(a,{key:8,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(h,{type:W.buttonType??"default",disabled:C.compact},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(W.buttonText??W.label??"按钮"),1)]),_:2},1032,["type","disabled"])]),_:2},1032,["class"])):W.type==="number"?(c.openBlock(),c.createBlock(a,{key:9,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(u,{disabled:C.compact,style:{width:"100%"}},null,8,["disabled"])]),_:1},8,["label","class"])):(c.openBlock(),c.createBlock(a,{key:10,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder||W.type,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"]))],64))),128))]),_:1},8,["label-width","label-position","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.actions)},[c.createVNode(h,{class:c.normalizeClass(l.$style.btnPrimary),type:"primary",onClick:e[0]||(e[0]=c.withModifiers(W=>A("primary-action"),["stop"]))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryActionLabel),1)]),_:1},8,["class"])],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{previewCard:"_previewCard_18hnt_2",compact:"_compact_18hnt_16",header:"_header_18hnt_21",headerLeft:"_headerLeft_18hnt_30",headerIcon:"_headerIcon_18hnt_36",title:"_title_18hnt_47",headerRight:"_headerRight_18hnt_53",badge:"_badge_18hnt_59",viewHint:"_viewHint_18hnt_67",previewBody:"_previewBody_18hnt_79",form:"_form_18hnt_83",formItem:"_formItem_18hnt_87",actions:"_actions_18hnt_95",btnOutline:"_btnOutline_18hnt_105",btnPrimary:"_btnPrimary_18hnt_127"}}]]),nQ=P(c.defineComponent({__name:"WorkflowRunTimeline",props:{title:{},status:{},progressText:{},steps:{},defaultCollapsed:{type:Boolean,default:!1},emptyText:{default:"等待首个节点开始…"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed);c.watch(()=>I.status,a=>{a==="running"&&(g.value=!1)});const A={running:"loading",success:"circle-check",error:"circle-close-filled",waiting:"clock",skipped:"minus",pending:"more-filled"},i=c.computed(()=>{const a=I.status;return a?`status${a.charAt(0).toUpperCase()}${a.slice(1)}`:""});function l(a){return`icon${a.charAt(0).toUpperCase()}${a.slice(1)}`}function e(a){return A[a]??"more-filled"}function t(){g.value=!g.value}return(a,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([a.$style.block,a.$style[i.value]])},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(a.$style.header),onClick:t},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.headerLeft)},[c.createVNode(c.unref($),{name:g.value?"arrow-right":"arrow-down",size:12,class:c.normalizeClass(a.$style.chevron)},null,8,["name","class"]),c.createElementVNode("span",{class:c.normalizeClass(a.$style.title)},c.toDisplayString(C.title),3)],2),C.progressText?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.progress)},c.toDisplayString(C.progressText),3)):c.createCommentVNode("",!0)],2),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.timeline)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(o,n)=>(c.openBlock(),c.createElementBlock("div",{key:o.id,class:c.normalizeClass([a.$style.item,o.status==="running"&&a.$style.itemRunning,o.streaming&&a.$style.itemStreaming])},[c.createElementVNode("div",{class:c.normalizeClass(a.$style.rail)},[c.createElementVNode("span",{class:c.normalizeClass([a.$style.iconWrap,a.$style[l(o.status)]])},[c.createVNode(c.unref($),{name:e(o.status),size:14,class:c.normalizeClass(o.status==="running"?a.$style.spin:void 0)},null,8,["name","class"])],2),n<C.steps.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.connector)},null,2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(a.$style.body)},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.nodeName)},c.toDisplayString(o.label),3),o.hint?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.nodeHint)},c.toDisplayString(o.hint),3)):c.createCommentVNode("",!0),c.renderSlot(a.$slots,"step",{step:o})],2)],2))),128)),C.steps.length?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.empty)},c.toDisplayString(C.emptyText),3))],2))],2))}}),[["__cssModules",{$style:{block:"_block_2l73c_2",statusRunning:"_statusRunning_2l73c_10",statusError:"_statusError_2l73c_14",statusWaiting:"_statusWaiting_2l73c_18",header:"_header_2l73c_22",headerLeft:"_headerLeft_2l73c_39",chevron:"_chevron_2l73c_46",title:"_title_2l73c_51",progress:"_progress_2l73c_60",timeline:"_timeline_2l73c_66",item:"_item_2l73c_70",itemRunning:"_itemRunning_2l73c_76",nodeName:"_nodeName_2l73c_76",itemStreaming:"_itemStreaming_2l73c_81",iconWrap:"_iconWrap_2l73c_81",rail:"_rail_2l73c_85",iconSuccess:"_iconSuccess_2l73c_104",iconError:"_iconError_2l73c_109",iconRunning:"_iconRunning_2l73c_114",iconWaiting:"_iconWaiting_2l73c_119",iconSkipped:"_iconSkipped_2l73c_124",spin:"_spin_2l73c_129",connector:"_connector_2l73c_138",body:"_body_2l73c_146",nodeHint:"_nodeHint_2l73c_160",empty:"_empty_2l73c_166"}}]]),sQ=["tabindex","aria-label"],ZQ=P(c.defineComponent({__name:"SuggestionCard",props:{suggestion:{},accepted:{type:Boolean},dismissed:{type:Boolean}},emits:["accept","dismiss"],setup(C,{emit:I}){const g=C,A=I,i={action:{icon:"promotion",label:"操作",color:"#409EFF"},optimization:{icon:"magic-stick",label:"优化",color:"#E6A23C"},reference:{icon:"document",label:"参考",color:"#67C23A"}},l={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#909399",bgColor:"#f4f4f5"}},e=c.computed(()=>i[g.suggestion.type]??i.action),t=c.computed(()=>l[g.suggestion.priority]??l.medium),a=c.computed(()=>!g.accepted&&!g.dismissed);function d(){a.value&&A("accept",g.suggestion.id)}function o(){a.value&&A("dismiss",g.suggestion.id)}function n(s){a.value&&(s.key==="Enter"||s.key===" "?(s.preventDefault(),d()):s.key==="Escape"&&(s.preventDefault(),o()))}return(s,Z)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([s.$style.card,C.accepted&&s.$style.accepted,C.dismissed&&s.$style.dismissed]),tabindex:a.value?0:-1,role:"article","aria-label":`建议: ${C.suggestion.title}`,onKeydown:n},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.typeBadge),style:c.normalizeStyle({color:e.value.color})},[c.createVNode(c.unref($),{name:e.value.icon,size:14},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(e.value.label),1)],6),c.createElementVNode("div",{class:c.normalizeClass(s.$style.priorityBadge),style:c.normalizeStyle({color:t.value.color,background:t.value.bgColor})},c.toDisplayString(t.value.label)+"优先 ",7)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.title)},c.toDisplayString(C.suggestion.title),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.description)},c.toDisplayString(C.suggestion.description),3),C.suggestion.targetName?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.target)},[c.createVNode(c.unref($),{name:"connection",size:12}),c.createElementVNode("span",null,c.toDisplayString(C.suggestion.targetName),1)],2)):c.createCommentVNode("",!0)],2),a.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(s.$style.acceptBtn),type:"button",onClick:d},[c.createVNode(c.unref($),{name:"check",size:14}),Z[0]||(Z[0]=c.createTextVNode(" 采纳 ",-1))],2),c.createElementVNode("button",{class:c.normalizeClass(s.$style.dismissBtn),type:"button",onClick:o},[c.createVNode(c.unref($),{name:"close",size:14}),Z[1]||(Z[1]=c.createTextVNode(" 忽略 ",-1))],2)],2)):c.createCommentVNode("",!0),C.accepted?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.statusBadge)},[c.createVNode(c.unref($),{name:"check",size:14}),Z[2]||(Z[2]=c.createTextVNode(" 已采纳 ",-1))],2)):c.createCommentVNode("",!0),C.dismissed?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([s.$style.statusBadge,s.$style.statusDismissed])},[c.createVNode(c.unref($),{name:"close",size:14}),Z[3]||(Z[3]=c.createTextVNode(" 已忽略 ",-1))],2)):c.createCommentVNode("",!0)],42,sQ))}}),[["__cssModules",{$style:{card:"_card_69ko9_2",accepted:"_accepted_69ko9_21",dismissed:"_dismissed_69ko9_31",header:"_header_69ko9_36",typeBadge:"_typeBadge_69ko9_43",priorityBadge:"_priorityBadge_69ko9_51",body:"_body_69ko9_58",title:"_title_69ko9_62",description:"_description_69ko9_69",target:"_target_69ko9_75",actions:"_actions_69ko9_84",acceptBtn:"_acceptBtn_69ko9_91",dismissBtn:"_dismissBtn_69ko9_92",statusBadge:"_statusBadge_69ko9_132",statusDismissed:"_statusDismissed_69ko9_144"}}]]),mQ=["onClick"],bQ=P(c.defineComponent({__name:"ConversationSearchBar",props:{modelValue:{},searching:{type:Boolean,default:!1},panelVisible:{type:Boolean,default:!1},results:{},total:{default:0},sourceOptions:{},sourceFilter:{default:""},startDate:{default:""},endDate:{default:""},filtersExpanded:{type:Boolean,default:!1},placeholder:{default:"搜索对话..."}},emits:["update:modelValue","update:sourceFilter","update:startDate","update:endDate","update:filtersExpanded","update:panelVisible","select","clear","search"],setup(C,{emit:I}){const g=[{value:"",label:"全部来源"},{value:"editor",label:"Editor"},{value:"flow",label:"Flow"},{value:"standalone",label:"AI"}],A=C,i=I,l=c.computed(()=>A.sourceOptions??g),e=c.computed(()=>A.startDate!==""||A.endDate!==""||A.sourceFilter!=="");function t(m){const b=new Date(m),G=r=>String(r).padStart(2,"0");return`${b.getFullYear()}${G(b.getMonth()+1)}${G(b.getDate())} ${G(b.getHours())}${G(b.getMinutes())}${G(b.getSeconds())}`}function a(m){if(!m)return"AI";const b=l.value.find(G=>G.value===m);return b!=null&&b.label?b.label:m==="editor"?"Editor":m==="flow"?"Flow":"AI"}function d(m){return m==="editor"?"success":m==="flow"?"primary":"warning"}function o(){i("update:modelValue",""),i("update:startDate",""),i("update:endDate",""),i("update:sourceFilter",""),i("update:panelVisible",!1),i("clear")}function n(m){i("select",m)}function s(){i("update:filtersExpanded",!A.filtersExpanded)}function Z(m,b){const G=b??"";i(m==="start"?"update:startDate":"update:endDate",G)}return(m,b)=>{const G=c.resolveComponent("el-input"),r=c.resolveComponent("el-button"),h=c.resolveComponent("el-option"),u=c.resolveComponent("el-select"),B=c.resolveComponent("el-date-picker"),W=c.resolveComponent("el-popover"),w=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(m.$style.root)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.searchRow)},[c.createVNode(G,{"model-value":C.modelValue,placeholder:C.placeholder,size:"small",clearable:"","onUpdate:modelValue":b[0]||(b[0]=Y=>i("update:modelValue",Y)),onClear:o,onKeyup:b[1]||(b[1]=c.withKeys(Y=>i("search"),["enter"]))},{prefix:c.withCtx(()=>[c.createVNode(c.unref($),{name:"search",size:14})]),_:1},8,["model-value","placeholder"]),c.createVNode(W,{visible:C.filtersExpanded,placement:"bottom-end",width:220,trigger:"click","show-arrow":!1,offset:4},{reference:c.withCtx(()=>[c.createVNode(r,{size:"small",type:e.value?"primary":"default",link:!e.value,onClick:s},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"filter",size:14})]),_:1},8,["type","link"])]),default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterPanel)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"来源",2),c.createVNode(u,{"model-value":C.sourceFilter,size:"small",placeholder:"全部",style:{flex:"1"},"onUpdate:modelValue":b[2]||(b[2]=Y=>i("update:sourceFilter",Y))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,Y=>(c.openBlock(),c.createBlock(h,{key:Y.value,label:Y.label,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])],2),c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"时间",2),c.createVNode(B,{"model-value":C.startDate||null,type:"date",placeholder:"开始",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[3]||(b[3]=Y=>Z("start",Y))},null,8,["model-value"]),c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterSep)},"~",2),c.createVNode(B,{"model-value":C.endDate||null,type:"date",placeholder:"结束",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[4]||(b[4]=Y=>Z("end",Y))},null,8,["model-value"])],2)],2)]),_:1},8,["visible"])],2),C.panelVisible?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.results)},[C.searching?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.empty)},"搜索中...",2)):C.results.length>0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.resultCount)},"找到 "+c.toDisplayString(C.total)+" 条结果",3),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.results,Y=>(c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass(m.$style.resultItem),onClick:p=>n(Y.id)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.resultTitle)},c.toDisplayString(Y.title),3),c.createVNode(w,{type:d(Y.source),size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a(Y.source)),1)]),_:2},1032,["type"]),Y.updatedAt?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(m.$style.resultTime)},c.toDisplayString(t(Y.updatedAt)),3)):c.createCommentVNode("",!0)],10,mQ))),128))],64)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(m.$style.empty)},"无匹配对话",2))],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{root:"_root_x8tmk_2",searchRow:"_searchRow_x8tmk_8",filterPanel:"_filterPanel_x8tmk_16",filterRow:"_filterRow_x8tmk_22",filterLabel:"_filterLabel_x8tmk_28",filterSep:"_filterSep_x8tmk_35",results:"_results_x8tmk_40",resultCount:"_resultCount_x8tmk_46",resultItem:"_resultItem_x8tmk_53",resultTitle:"_resultTitle_x8tmk_71",resultTime:"_resultTime_x8tmk_82",empty:"_empty_x8tmk_88"}}]]),GQ={class:"apf-task-chain"},rQ={class:"apf-task-chain__label"},hQ={class:"apf-task-chain__steps"},uQ=["data-step"],BQ={class:"apf-task-chain__icon"},WQ={class:"apf-task-chain__agent"},wQ={class:"apf-task-chain__desc"},YQ={key:0,class:"apf-task-chain__arrow"},VQ=P(c.defineComponent({__name:"TaskChainBar",props:{steps:{},currentIndex:{},label:{default:"任务链"}},setup(C){const I=C,g=c.ref();function A(l){switch(l){case"done":return"✓";case"running":return"●";case"skipped":return"○";case"error":return"!";default:return"○"}}function i(l){return l==="editor"?"表单":l==="flow"?"流程":l==="page"?"页面":l}return c.watch(()=>I.currentIndex,()=>{c.nextTick(()=>{const l=g.value;if(!l)return;const t=l.querySelectorAll("[data-step]")[I.currentIndex];t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}),(l,e)=>(c.openBlock(),c.createElementBlock("div",GQ,[c.createElementVNode("div",rQ,c.toDisplayString(C.label),1),c.createElementVNode("div",{ref_key:"scrollbarRef",ref:g,class:"apf-task-chain__scroll"},[c.createElementVNode("div",hQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[c.createElementVNode("div",{"data-step":a,class:c.normalizeClass(["apf-task-chain__step",[t.status?`is-${t.status}`:"is-pending",{"is-current":a===C.currentIndex}]])},[c.createElementVNode("span",BQ,c.toDisplayString(A(t.status)),1),c.createElementVNode("span",WQ,c.toDisplayString(i(t.agent)),1),c.createElementVNode("span",wQ,c.toDisplayString(t.description),1)],10,uQ),a<C.steps.length-1?(c.openBlock(),c.createElementBlock("div",YQ,"→")):c.createCommentVNode("",!0)],64))),128))])],512)]))}}),[["__scopeId","data-v-31bc7b98"]]),pQ={class:"apf-rag-panel"},yQ={class:"apf-rag-panel__header"},NQ=["value","placeholder"],XQ={key:0,class:"apf-rag-panel__spinner","aria-label":"加载中"},RQ={key:0,class:"apf-rag-panel__chips"},HQ={class:"apf-rag-panel__chip-name"},SQ=["onClick"],MQ={class:"apf-rag-panel__list"},DQ=["onClick"],KQ={class:"apf-rag-panel__info"},FQ={class:"apf-rag-panel__name"},zQ={key:0,class:"apf-rag-panel__desc"},JQ={key:1,class:"apf-rag-panel__tags"},vQ={key:0,class:"apf-rag-panel__tag"},kQ={key:1,class:"apf-rag-panel__empty"},LQ={key:2,class:"apf-rag-panel__empty"},TQ={class:"apf-rag-panel__footer"},xQ=P(c.defineComponent({__name:"RagContextPanel",props:{results:{},selected:{},loading:{type:Boolean,default:!1},query:{default:""},placeholder:{default:"智能匹配 Schema,如:用户注册表单..."},emptyHint:{default:"未找到匹配的 Schema"},idleHint:{default:"输入自然语言描述,智能匹配已有 Schema"},footerHint:{default:"选择 Schema 注入对话上下文"},selectedFooterHint:{default:"已选 {n} 个 Schema 作为上下文"}},emits:["update:query","search","select","remove","close"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.query);c.watch(()=>g.query,o=>{o!==i.value&&(i.value=o)});function l(o){i.value=o,A("update:query",o),A("search",o)}function e(o){return g.selected.some(n=>n.id===o.id)}function t(o){e(o)||A("select",o)}function a(o){return o>=70?"high":o>=40?"medium":"low"}const d=c.computed(()=>g.selected.length>0?g.selectedFooterHint.replace("{n}",String(g.selected.length)):g.footerHint);return(o,n)=>(c.openBlock(),c.createElementBlock("div",pQ,[c.createElementVNode("div",yQ,[n[2]||(n[2]=c.createElementVNode("svg",{class:"apf-rag-panel__icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[c.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),c.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),c.createElementVNode("input",{class:"apf-rag-panel__input",value:i.value,placeholder:C.placeholder,onInput:n[0]||(n[0]=s=>l(s.target.value))},null,40,NQ),C.loading?(c.openBlock(),c.createElementBlock("span",XQ)):c.createCommentVNode("",!0)]),C.selected.length>0?(c.openBlock(),c.createElementBlock("div",RQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.selected,s=>(c.openBlock(),c.createElementBlock("span",{key:s.id,class:"apf-rag-panel__chip"},[c.createElementVNode("span",HQ,c.toDisplayString(s.name),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__chip-remove",title:"移除",onClick:Z=>A("remove",s.id)}," × ",8,SQ)]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",MQ,[C.results.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(C.results,s=>{var Z;return c.openBlock(),c.createElementBlock("button",{key:s.id,type:"button",class:c.normalizeClass(["apf-rag-panel__item",{"is-selected":e(s)}]),onClick:m=>t(s)},[c.createElementVNode("div",{class:c.normalizeClass(["apf-rag-panel__score",`is-${a(s.score)}`])},c.toDisplayString(s.score),3),c.createElementVNode("div",KQ,[c.createElementVNode("div",FQ,c.toDisplayString(s.name),1),s.description?(c.openBlock(),c.createElementBlock("div",zQ,c.toDisplayString(s.description),1)):c.createCommentVNode("",!0),(Z=s.tags)!=null&&Z.length?(c.openBlock(),c.createElementBlock("div",JQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.tags.slice(0,5),m=>(c.openBlock(),c.createElementBlock("span",{key:m,class:"apf-rag-panel__tag"},c.toDisplayString(m),1))),128)),s.tags.length>5?(c.openBlock(),c.createElementBlock("span",vQ," +"+c.toDisplayString(s.tags.length-5),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])],10,DQ)}),128)):!C.loading&&i.value.trim()?(c.openBlock(),c.createElementBlock("div",kQ,[n[3]||(n[3]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"⌕",-1)),c.createElementVNode("div",null,c.toDisplayString(C.emptyHint),1)])):C.loading?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",LQ,[n[4]||(n[4]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"✦",-1)),c.createElementVNode("div",null,c.toDisplayString(C.idleHint),1)]))]),c.createElementVNode("div",TQ,[c.createElementVNode("span",null,c.toDisplayString(d.value),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__close",onClick:n[1]||(n[1]=s=>A("close"))},"关闭")])]))}}),[["__scopeId","data-v-c6864f2d"]]),fQ={class:"apf-assistant-picker"},jQ={key:0,class:"apf-assistant-picker__state"},QQ={key:1,class:"apf-assistant-picker__state apf-assistant-picker__state--error"},UQ={key:2,class:"apf-assistant-picker__state"},OQ=["onClick"],EQ={class:"apf-assistant-picker__main"},PQ={class:"apf-assistant-picker__icon-wrap"},_Q={class:"apf-assistant-picker__info"},qQ={class:"apf-assistant-picker__caps"},$Q=P(c.defineComponent({__name:"AssistantPicker",props:{items:{},modelValue:{},loading:{type:Boolean,default:!1},error:{default:null}},emits:["update:modelValue","select"],setup(C,{emit:I}){const g=C,A=I;function i(a){var o,n;const d=["文本"];return(o=a.supportedInputs)!=null&&o.includes("file")&&d.push("文件"),(n=a.supportedInputs)!=null&&n.includes("image")&&d.push("图片"),a.hitlCapable&&d.push("需要确认"),d}function l(a){return a.icon||"chat-dot-round"}function e(a){A("update:modelValue",a.id),A("select",a)}const t=c.computed(()=>!g.loading&&!g.error&&!g.items.length);return(a,d)=>(c.openBlock(),c.createElementBlock("div",fQ,[C.loading?(c.openBlock(),c.createElementBlock("div",jQ,[...d[0]||(d[0]=[c.createElementVNode("p",null,"正在加载智能体…",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",QQ,[c.createElementVNode("p",null,c.toDisplayString(C.error),1)])):t.value?(c.openBlock(),c.createElementBlock("div",UQ,[...d[1]||(d[1]=[c.createElementVNode("p",null,"暂无可用智能体",-1)])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.items,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:c.normalizeClass(["apf-assistant-picker__item",{"is-active":C.modelValue===o.id}]),onClick:n=>e(o)},[c.createElementVNode("div",EQ,[c.createElementVNode("span",PQ,[c.createVNode(c.unref($),{name:l(o),size:22},null,8,["name"])]),c.createElementVNode("span",_Q,[c.createElementVNode("b",null,c.toDisplayString(o.name),1),c.createElementVNode("small",null,c.toDisplayString(o.description||"适合处理一类明确任务"),1),c.createElementVNode("span",qQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i(o),n=>(c.openBlock(),c.createElementBlock("span",{key:n,class:c.normalizeClass(["apf-assistant-picker__cap",{"is-confirm":n==="需要确认"}])},c.toDisplayString(n),3))),128))])])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-assistant-picker__choose",{"is-selected":C.modelValue===o.id}])},c.toDisplayString(C.modelValue===o.id?"已选择":"开始使用"),3)],10,OQ))),128))]))}}),[["__scopeId","data-v-f05e69c0"]]),gU={class:"apf-model-picker"},IU=P(c.defineComponent({__name:"ModelPicker",props:{models:{},modelValue:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-option"),e=c.resolveComponent("el-select");return c.openBlock(),c.createElementBlock("label",gU,[c.createVNode(e,{"model-value":C.modelValue||void 0,disabled:C.loading||!C.models.length,placeholder:"选择模型","onUpdate:modelValue":i[0]||(i[0]=t=>g("update:modelValue",t))},{default:c.withCtx(()=>[C.loading?(c.openBlock(),c.createBlock(l,{key:0,label:"正在加载模型…",value:"",disabled:""})):C.models.length?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(l,{key:1,label:"暂无可用模型",value:"",disabled:""})),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.models,t=>(c.openBlock(),c.createBlock(l,{key:t.id,label:`${t.name} · ${t.provider}`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","disabled"])])}}}),[["__scopeId","data-v-483ae73d"]]);function CU(C){const{containerRef:I,autoScroll:g=!0,behavior:A="smooth",offset:i=50}=C,l=c.ref(!0),e=c.ref(g);function t(){const Z=I.value;if(!Z)return!0;const{scrollTop:m,scrollHeight:b,clientHeight:G}=Z;return b-m-G<i}async function a(Z=!0){if(!Z&&!e.value)return;await c.nextTick();const m=I.value;m&&m.scrollTo({top:m.scrollHeight,behavior:A})}function d(Z){const m=I.value;m&&m.scrollTo({top:Z,behavior:A})}function o(){e.value=!0}function n(){e.value=!1}function s(){l.value=t(),l.value&&(e.value=!0)}return c.onMounted(()=>{const Z=I.value;Z&&(Z.addEventListener("scroll",s),l.value=t())}),c.onUnmounted(()=>{const Z=I.value;Z&&Z.removeEventListener("scroll",s)}),{scrollToBottom:a,scrollTo:d,isAtBottom:l,autoScrollEnabled:e,checkIfAtBottom:t,enableAutoScroll:o,disableAutoScroll:n}}const Cw=Symbol("fg-toast");function AU(C){return{[Cw]:C}}function iU(){const C=c.inject(Cw);return{show(I,g="info",A){var i;(i=C==null?void 0:C.value)==null||i.show(I,g,A)},info(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"info",g)},success(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"success",g)},warning(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"warning",g)},error(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"error",g)}}}function lU(){async function C(A,i={}){const{title:l="确认操作",type:e="warning",confirmButtonText:t="确定",cancelButtonText:a="取消"}=i;try{return await BC.ElMessageBox.confirm(A,l,{confirmButtonText:t,cancelButtonText:a,type:e}),!0}catch{return!1}}async function I(A,i={}){return C(`此操作将永久删除${A},是否继续?`,{title:"确认删除",type:"warning",confirmButtonText:"确认删除",...i})}async function g(A,i={}){return C(A,{title:"确认操作",type:"warning",...i})}return{confirm:C,confirmDelete:I,confirmDanger:g}}function eU(){return{success(C,I={}){BC.ElMessage({message:C,type:"success",...I})},error(C,I={}){BC.ElMessage({message:C,type:"error",...I})},warning(C,I={}){BC.ElMessage({message:C,type:"warning",...I})},info(C,I={}){BC.ElMessage({message:C,type:"info",...I})}}}function tU(C,I=300){const g=c.ref(null);function A(...i){g.value&&clearTimeout(g.value),g.value=setTimeout(()=>{C(...i),g.value=null},I)}return c.onUnmounted(()=>{g.value&&clearTimeout(g.value)}),A}function aU(C,I){var t;const g=c.ref(1),A=c.ref((I==null?void 0:I.initialPageSize)??FZ),i=c.computed(()=>{const a=C.value,d=(g.value-1)*A.value;return a.slice(d,d+A.value)}),l=c.computed(()=>C.value.length);function e(){g.value=1}return c.watch(A,()=>{g.value=1},{flush:"sync"}),c.watch(C,a=>{const d=Math.max(1,Math.ceil(a.length/A.value)||1);g.value>d&&(g.value=d)}),(t=I==null?void 0:I.resetOn)!=null&&t.length&&c.watch(I.resetOn,()=>{e()}),{currentPage:g,pageSize:A,pagedItems:i,total:l,resetPage:e}}function cU(C={}){const{timeout:I=15e3,silentError:g=!1}=C,A=c.ref(!1),i=c.ref(null),l=c.ref(!1),e=c.computed(()=>i.value!==null);let t=null,a=0;function d(){a++,a===1&&(A.value=!0,i.value=null,l.value=!1,t=setTimeout(()=>{l.value=!0},I))}function o(){a=Math.max(0,a-1),a===0&&(A.value=!1,l.value=!1,t&&(clearTimeout(t),t=null))}async function n(Z){d();try{return await Z()}catch(m){return g||(i.value=m instanceof Error?m.message:"加载失败"),null}finally{o()}}function s(){a=0,A.value=!1,i.value=null,l.value=!1,t&&(clearTimeout(t),t=null)}return{loading:A,error:i,timedOut:l,hasError:e,withLoading:n,reset:s}}const am=new Map;function dU(C){const{url:I,token:g,projectId:A,reconnectInterval:i=3e3,maxRetries:l=1/0}=C;let e=am.get(I);e||(e={ws:null,status:c.ref("closed"),refCount:0,handlers:new Map,subscribedProjects:new Set,reconnectTimer:null,pingTimer:null,pongTimer:null,retries:0,reconnectInterval:i,maxRetries:l,intentionalClose:!1,token:g},am.set(I,e)),e.refCount+=1,e.reconnectInterval=i,e.maxRetries=l,e.token=g;const t=[],a=e.status,d=()=>c.toValue(A);function o(){e&&(e.pingTimer&&clearInterval(e.pingTimer),e.pongTimer&&clearTimeout(e.pongTimer),e.pingTimer=null,e.pongTimer=null)}function n(){e&&(o(),e.pingTimer=setInterval(()=>{!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN||(e.ws.send(JSON.stringify({action:"ping"})),e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=setTimeout(()=>{var B;(B=e==null?void 0:e.ws)==null||B.close()},6e4))},3e4))}function s(){if(!e||e.intentionalClose)return;if(e.retries>=e.maxRetries){e.status.value="error";return}const B=Math.min(e.reconnectInterval*2**e.retries,3e4);e.retries+=1,e.reconnectTimer&&clearTimeout(e.reconnectTimer),e.reconnectTimer=setTimeout(()=>{G()},B)}function Z(B){if(!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN)return;const W={action:"subscribe",project_id:B??null},w=typeof e.token=="function"?e.token():e.token;if(w&&(W.token=w),!e.subscribedProjects.has(B??null)){if(B==null){e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(null);return}e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(B)}}function m(){if(!e)return;e.subscribedProjects.clear();const B=new Set;let W=!1;for(const Y of e.handlers.values())for(const p of Y){const V=p.getProjectId();V==null?W=!0:B.add(V)}const w=d();w==null?W=!0:B.add(w),W&&Z(void 0);for(const Y of B)Z(Y)}function b(B){if(!e)return;const W=e.handlers.get(B.type);if(W)for(const w of W){const Y=w.getProjectId();Y!=null&&Y!==B.project_id||w.handler(B.data)}}function G(){if(!e)return;if(e.ws&&(e.ws.readyState===WebSocket.OPEN||e.ws.readyState===WebSocket.CONNECTING)){e.ws.readyState===WebSocket.OPEN&&Z(d());return}e.intentionalClose=!1,e.status.value="connecting";const B=new WebSocket(I);e.ws=B,B.onopen=()=>{e&&(e.status.value="open",e.retries=0,n(),m())},B.onmessage=W=>{if(e)try{const w=JSON.parse(String(W.data));if(w.action==="pong"||w.type==="pong"){e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=null;return}typeof w.type=="string"&&b(w)}catch{}},B.onerror=()=>{e&&(e.status.value="error")},B.onclose=()=>{e&&(o(),e.ws=null,e.subscribedProjects.clear(),e.intentionalClose?e.status.value="closed":(e.status.value="closed",s()))}}function r(){if(e){for(const B of t)for(const W of e.handlers.values())W.delete(B);t.length=0}}function h(){var B;e&&(r(),e.refCount=Math.max(0,e.refCount-1),!(e.refCount>0)&&(e.intentionalClose=!0,e.reconnectTimer&&clearTimeout(e.reconnectTimer),o(),(B=e.ws)==null||B.close(),e.ws=null,e.status.value="closed",am.delete(I),e=void 0))}function u(B,W){var p;if(!e)return()=>{};let w=e.handlers.get(B);w||(w=new Set,e.handlers.set(B,w));const Y={getProjectId:d,handler:W};return w.add(Y),t.push(Y),((p=e.ws)==null?void 0:p.readyState)===WebSocket.OPEN&&Z(d()),()=>{w==null||w.delete(Y);const V=t.indexOf(Y);V>=0&&t.splice(V,1)}}return G(),c.watch(d,B=>{var W;((W=e==null?void 0:e.ws)==null?void 0:W.readyState)===WebSocket.OPEN&&Z(B)}),c.onUnmounted(()=>{h()}),{status:a,connect:G,disconnect:h,on:u}}function oU(C){if(!C)return"操作失败";if(typeof C=="string")return C;if(C instanceof Error)return C.message||"操作失败";if(typeof C=="object"){const I=C;if(I.message)return I.message;if(I.errors&&typeof I.errors=="object"){const g=[];for(const A of Object.values(I.errors))Array.isArray(A)&&g.push(...A);if(g.length>0)return g.join(";")}if(I.code)return`错误码:${I.code}`}return"操作失败"}const nU=/\/(?:schema-platform\/)?api\/ai\/documents\/([^/?#]+)\/file/i,Aw=/\.(mp4|webm|mov|m4v)(?:\?|#|$|\s)/i,sU=/\.(png|jpe?g|gif|webp|bmp|svg)(?:\?|#|$|\s)/i,cm=/\.pdf(?:\?|#|$|\s)/i,dm=/\.(docx?|xlsx?|csv|txt|md)(?:\?|#|$|\s)/i,iw=/(?:https?:\/\/[^\s"'<>\]]+|\/(?:schema-platform\/)?api\/ai\/documents\/[^/\s"'<>\]]+\/file)/gi;function xe(C){const I=C.trim().match(nU);if(I!=null&&I[1])return I[1];if(/^[0-9a-f]{24}$/i.test(C.trim()))return C.trim()}function hl(C){const{url:I="",filename:g="",mimetype:A="",hint:i}=C;if(i==="video"||i==="videoUrl")return"video";if(i==="image"||i==="imageUrls")return"image";if(i==="text")return"text";if(i==="json")return"json";if(i==="document"||i==="documentIds"){const t=g||I;return cm.test(t)||A.includes("pdf")?"pdf":dm.test(t)||/word|sheet|excel|csv|text/.test(A)?"office":"file"}const l=[I,g].filter(Boolean).join(" ").toLowerCase(),e=A.toLowerCase();return e.startsWith("video/")||Aw.test(l)?"video":e.startsWith("image/")||sU.test(l)?"image":e.includes("pdf")||cm.test(l)?"pdf":dm.test(l)||e.includes("word")||e.includes("sheet")||e.includes("excel")||e.includes("csv")||e.startsWith("text/")?"office":xe(I)&&!cm.test(I)&&!dm.test(I)&&!Aw.test(I)?"image":"file"}function ZU(C){var I;return C.documentId?`doc:${C.documentId}`:C.url?`url:${C.url}`:`${C.kind}:${((I=C.text)==null?void 0:I.slice(0,40))??C.id}`}function VA(C,I,g){const A=ZU(g);!A||I.has(A)||(I.add(A),C.push(g))}function om(C){const I=Wi(C);if(!I)return null;const g=nl(I.data);return{kind:"json",text:I.jsonText,label:g?PB(g):"JSON 输出",prose:I.prose||void 0}}function mU(C,I="art"){if(C==null)return[];const g=[],A=new Set;let i=0;const l=()=>`${I}-${++i}`;if(typeof C=="string"){const d=C.match(iw)??[];for(const o of d){const n=hl({url:o});VA(g,A,{id:l(),kind:n,url:o,documentId:xe(o),source:"text"})}if(!d.length&&C.trim()){const o=om(C);o!=null&&o.prose&&VA(g,A,{id:l(),kind:"text",text:o.prose,label:"确认提示",source:"text"}),VA(g,A,{id:l(),kind:(o==null?void 0:o.kind)??"text",text:(o==null?void 0:o.text)??C,label:(o==null?void 0:o.label)??"文本输出",source:"text"})}return g}if(typeof C!="object")return g;const e=C;typeof e.videoUrl=="string"&&e.videoUrl.trim()&&VA(g,A,{id:l(),kind:"video",url:e.videoUrl,documentId:xe(e.videoUrl),source:"videoUrl"});const t=(d,o,n)=>{if(Array.isArray(d))for(const s of d){let Z="";if(typeof s=="string"?Z=s:s&&typeof s=="object"&&"url"in s&&(Z=String(s.url??"")),!Z.trim())continue;const m=hl({url:Z,hint:n});VA(g,A,{id:l(),kind:m,url:Z,documentId:xe(Z),source:o})}};if(t(e.imageUrls,"imageUrls","image"),t(e.mediaUrls,"mediaUrls"),g.some(d=>d.kind==="image"&&d.url)||t(e.images,"images","image"),Array.isArray(e.documentIds))for(const d of e.documentIds)typeof d!="string"||!d.trim()||A.has(`doc:${d}`)||VA(g,A,{id:l(),kind:hl({url:d,hint:"document"}),documentId:d,url:void 0,label:`文档 ${d.slice(-6)}`,source:"documentIds"});typeof e.documentId=="string"&&e.documentId.trim()&&VA(g,A,{id:l(),kind:hl({url:e.documentId,hint:"document"}),documentId:e.documentId,label:`文档 ${e.documentId.slice(-6)}`,source:"documentId"});for(const d of["text","message","confirmMessage","prompt"]){const o=e[d];if(typeof o!="string"||!o.trim())continue;const n=o.match(iw)??[];for(const s of n)VA(g,A,{id:l(),kind:hl({url:s}),url:s,documentId:xe(s),source:d});if(!n.length&&(d==="text"||d==="message")){const s=om(o);s!=null&&s.prose&&VA(g,A,{id:l(),kind:"text",text:s.prose,label:d==="message"?"确认提示":"说明",source:d}),VA(g,A,{id:l(),kind:(s==null?void 0:s.kind)??"text",text:(s==null?void 0:s.text)??o,label:(s==null?void 0:s.label)??(d==="text"?"文本输出":"确认提示"),source:d})}}return g}function bU(C){return C.map((I,g)=>{const A=hl({url:I.url,filename:I.filename,mimetype:I.mimetype});return{id:I.id||`att-${g}`,kind:A,url:I.url,documentId:I.id,filename:I.filename,mimetype:I.mimetype,label:I.filename,source:"attachment"}})}function pa(C,I=[]){const g=new Set;for(const A of I)g.add(A);for(const A of C.slice(0,20))for(const i of Object.keys(A))g.add(i);return[...g].map(A=>({prop:A,label:A}))}function $d(C){return!Array.isArray(C)||C.length===0||!C.every(I=>I&&typeof I=="object"&&!Array.isArray(I))?null:C}function GU(C){if(!C||typeof C!="object")return null;const I=C,g=I.columns,A=I.rows;if(!Array.isArray(g)||!Array.isArray(A))return null;const i=g.map((e,t)=>{if(e&&typeof e=="object"){const d=e,o=String(d.field??d.prop??`col${t}`),n=String(d.title??d.label??o);return{prop:o,label:n}}const a=String(e);return{prop:a,label:a}}),l=A.map(e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{value:e});return i.length===0&&l.length===0?null:{key:"chart-table",title:"图表数据表",columns:i,rows:l}}function lw(C){const I=C.chartType;return typeof I!="string"||!I.trim()?!1:C.option!=null&&typeof C.option=="object"}function rU(C,I){if(!I||typeof I!="object")return[];const g=I,A=[],i=C??"";if(i==="compliance-check"||!i&&Array.isArray(g.violations)){const l=$d(g.violations);l!=null&&l.length&&A.push({key:"violations",title:"违规项",columns:pa(l,["severity","rule","detail"]),rows:l})}if(i==="anomaly-detect"||!i&&Array.isArray(g.anomalies)){const l=$d(g.anomalies);l!=null&&l.length&&A.push({key:"anomalies",title:"异常项",columns:pa(l,["severity","type","value","reason"]),rows:l})}if(i==="form-query"||!i&&Array.isArray(g.submissions)){const l=g.submissions;if(Array.isArray(l)&&l.length){const e=l.map(t=>{if(!t||typeof t!="object")return{value:t};const a=t,d=a.data&&typeof a.data=="object"&&!Array.isArray(a.data)?a.data:{};return{id:String(a._id??a.id??""),status:a.status??"",submitterId:a.submitterId??"",createdAt:a.createdAt??"",...d}});A.push({key:"submissions",title:`表单提交(共 ${Number(g.total??e.length)})`,columns:pa(e,["id","status","submitterId","createdAt"]),rows:e})}}if(i==="chart-generate"||!i&&lw(g)){if(String(g.chartType)==="table"){const e=GU(g.option);e&&A.push(e)}const l=$d(g.data);l!=null&&l.length&&A.push({key:"chart-data",title:"图表数据",columns:pa(l,["label","value","name"]),rows:l})}if((i==="module-assemble"||!i&&("schema"in g||"moduleType"in g))&&(i==="module-assemble"||g.moduleType!=null)){const l=[{key:"schema",label:"Schema",present:!!g.schema},{key:"flow",label:"Flow",present:!!g.flow},{key:"listView",label:"列表视图",present:!!g.listView},{key:"detailView",label:"详情视图",present:!!g.detailView}];A.push({key:"module-parts",title:`模块组装(${String(g.moduleType??"")})`,columns:[{prop:"part",label:"部件"},{prop:"status",label:"状态"}],rows:l.map(e=>({part:e.label,status:e.present?"已生成":"无"}))})}if(A.length===0)for(const[l,e]of Object.entries(g)){const t=$d(e);if(!(!t||t.length<1)&&!(t.length===1&&Object.keys(t[0]).length>12)&&(A.push({key:`field-${l}`,title:l,columns:pa(t),rows:t}),A.length>=2))break}return A}function hU(C,I){if(!I||typeof I!="object")return null;const g=I;if(C&&C!=="chart-generate"||!C&&!lw(g))return null;const A=String(g.chartType??"");return!A||A==="table"||!g.option||typeof g.option!="object"?null:{chartType:A,option:g.option}}const uU="1.11.0",BU="2.14.2",WU="2026-08-27";/*! *****************************************************************************
72
+ `)){const z=R.slice(D+1,M);if(!z.includes(" ")&&z.length<=30){b.value=D,o.value=z,d.value=!0;return}}B()}function w(R){if(d.value){if(R.key==="ArrowDown"){R.preventDefault(),m.value=Math.min(m.value+1,Math.max(s.value.length-1,0));return}if(R.key==="ArrowUp"){R.preventDefault(),m.value=Math.max(m.value-1,0);return}if(R.key==="Enter"&&m.value>=0&&s.value[m.value]){R.preventDefault(),Y(s.value[m.value]);return}if(R.key==="Escape"){R.preventDefault(),B();return}}R.key==="Enter"&&!R.shiftKey&&!d.value&&(R.preventDefault(),V())}function Y(R){var z;const S={id:R.id,type:R.type,label:R.name};t.value.some(v=>v.id===S.id&&v.type===S.type)||t.value.push(S);const M=l.value,D=b.value,F=((z=e.value)==null?void 0:z.selectionStart)??M.length;D>=0&&(l.value=`${M.slice(0,D)}@${R.name} ${M.slice(F)}`),B(),c.nextTick(()=>{var v;return(v=e.value)==null?void 0:v.focus()})}function p(R){t.value.splice(R,1)}function V(){const R=l.value.trim();!R&&t.value.length===0||A.disabled||(i("send",R,[...t.value]),l.value="",t.value=[])}function y(R){a.value&&!a.value.contains(R.target)&&B()}function N(){var R;(R=e.value)==null||R.focus()}return I({focus:N}),c.onMounted(()=>{document.addEventListener("mousedown",y)}),c.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),G&&clearTimeout(G)}),(R,S)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"wrapperRef",ref:a,class:"apf-mention-input"},[d.value?(c.openBlock(),c.createElementBlock("div",hx,[c.createElementVNode("div",ux,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=M=>o.value=M),class:"apf-mention-panel-input",type:"text",placeholder:C.searchPlaceholder,autocomplete:"off"},null,8,Bx),[[c.vModelText,o.value]])]),c.createElementVNode("div",Wx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.tabs,M=>(c.openBlock(),c.createElementBlock("button",{key:M.key,type:"button",class:c.normalizeClass(["apf-mention-tab",{"is-active":n.value===M.key}]),onClick:D=>n.value=M.key},c.toDisplayString(M.label),11,Yx))),128))]),c.createElementVNode("div",Vx,[Z.value?(c.openBlock(),c.createElementBlock("div",px,[...S[2]||(S[2]=[c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1)])])):s.value.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(s.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:c.normalizeClass(["apf-mention-result",{"is-highlighted":D===m.value}]),role:"option",onClick:F=>Y(M),onMouseenter:F=>m.value=D},[c.createElementVNode("div",{class:"apf-mention-badge","data-type":M.type},c.toDisplayString(r(M.type)),9,Nx),c.createElementVNode("div",Xx,[c.createElementVNode("div",Rx,c.toDisplayString(M.name),1),M.description?(c.openBlock(),c.createElementBlock("div",Hx,c.toDisplayString(M.description),1)):c.createCommentVNode("",!0)])],42,yx))),128)):o.value.trim()?(c.openBlock(),c.createElementBlock("div",Sx,c.toDisplayString(C.emptyText),1)):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0),t.value.length>0?(c.openBlock(),c.createElementBlock("div",Mx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:"apf-mention-chip"},[c.createElementVNode("span",Dx,c.toDisplayString(r(M.type)),1),c.createElementVNode("span",null,c.toDisplayString(M.label),1),c.createElementVNode("button",{type:"button",class:"apf-mention-chip-remove","aria-label":"移除引用",onClick:F=>p(D)}," × ",8,Kx)]))),128))])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("textarea",{ref_key:"textareaRef",ref:e,"onUpdate:modelValue":S[1]||(S[1]=M=>l.value=M),class:"apf-mention-textarea",placeholder:C.placeholder,disabled:C.disabled||C.loading,rows:"1",onInput:W,onKeydown:w},null,40,Fx),[[c.vModelText,l.value]])],512))}}),[["__scopeId","data-v-467928f5"]]),Jx={class:"apf-thinking-head-main"},vx={class:"apf-thinking-titles"},kx={class:"apf-thinking-title"},Lx={key:0,class:"apf-thinking-badge"},Tx={class:"apf-thinking-sub"},xx={class:"apf-thinking-head-aside"},fx={class:"apf-thinking-status"},jx={class:"apf-thinking-chevron","aria-hidden":"true"},Qx={key:0,class:"apf-thinking-body"},Ux=["innerHTML"],Ox=P(c.defineComponent({__name:"ThinkingBlock",props:{content:{},title:{default:"思考过程"},badge:{},defaultCollapsed:{type:Boolean,default:!0},statusLabel:{default:"已完成"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed),A=c.computed(()=>{if(!I.content)return"";const e=I.content.replace(/<[^>]*>/g,"").trim();return e.length>100?`${e.slice(0,100)}...`:e}),i=c.computed(()=>I.content?tm(I.content):"");function l(){g.value=!g.value}return(e,t)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-thinking",{"is-expanded":!g.value}])},[c.createElementVNode("button",{type:"button",class:"apf-thinking-head",onClick:l},[c.createElementVNode("div",Jx,[t[0]||(t[0]=c.createElementVNode("span",{class:"apf-thinking-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M8 5v3.2L10 10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})])],-1)),c.createElementVNode("div",vx,[c.createElementVNode("div",kx,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",Lx,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Tx,c.toDisplayString(g.value?A.value:"已完成思考"),1)])]),c.createElementVNode("div",xx,[c.createElementVNode("span",fx,c.toDisplayString(C.statusLabel),1),c.createElementVNode("span",jx,c.toDisplayString(g.value?"▾":"▴"),1)])]),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Qx,[c.createElementVNode("div",{class:"apf-thinking-md",innerHTML:i.value},null,8,Ux)]))],2))}}),[["__scopeId","data-v-ecf2c951"]]),Ex={class:"apf-editable-artifact"},Px={class:"apf-editable-artifact__head"},_x={class:"apf-editable-artifact__head-left"},qx={class:"apf-editable-artifact__tag"},$x={key:0,class:"apf-editable-artifact__tag is-danger"},gf={class:"apf-editable-artifact__head-right"},If={class:"apf-editable-artifact__body"},Cf=["placeholder"],Af=["srcdoc"],lf={class:"apf-editable-artifact__footer"},ef={class:"apf-editable-artifact__hint"},tf=P(c.defineComponent({__name:"EditableArtifactCard",props:{content:{},artifactType:{default:"code"},language:{},sendBackLabel:{default:"回传给助手"},hint:{default:"编辑后可回传给助手继续优化"}},emits:["sendback","copy"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.content),l=c.ref("edit");c.watch(()=>g.content,Z=>{i.value=Z});const e=c.computed(()=>g.language||g.artifactType),t=c.computed(()=>g.artifactType==="html"),a=c.computed(()=>g.artifactType==="json"),d=c.computed(()=>{if(!a.value)return null;try{return JSON.parse(i.value),!0}catch{return!1}});function o(){var Z;i.value&&((Z=navigator.clipboard)==null||Z.writeText(i.value),A("copy",i.value))}function n(){if(a.value)try{i.value=JSON.stringify(JSON.parse(i.value),null,2)}catch{}}function s(){i.value.trim()&&A("sendback",i.value,e.value)}return(Z,m)=>(c.openBlock(),c.createElementBlock("div",Ex,[c.createElementVNode("div",Px,[c.createElementVNode("div",_x,[m[3]||(m[3]=c.createElementVNode("span",{class:"apf-editable-artifact__title"},"工件",-1)),c.createElementVNode("span",qx,c.toDisplayString(C.artifactType),1),a.value&&d.value===!1?(c.openBlock(),c.createElementBlock("span",$x,"JSON 无效")):c.createCommentVNode("",!0)]),c.createElementVNode("div",gf,[t.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="edit"}]),onClick:m[0]||(m[0]=b=>l.value="edit")}," 编辑 ",2)):c.createCommentVNode("",!0),t.value?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="preview"}]),onClick:m[1]||(m[1]=b=>l.value="preview")}," 预览 ",2)):c.createCommentVNode("",!0),a.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-editable-artifact__tool",onClick:n}," 格式化 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__tool","aria-label":"复制",onClick:o}," 复制 ")])]),c.createElementVNode("div",If,[l.value==="edit"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"apf-editable-artifact__editor",placeholder:`可编辑 ${C.artifactType} 内容`,spellcheck:"false"},null,8,Cf)),[[c.vModelText,i.value]]):(c.openBlock(),c.createElementBlock("iframe",{key:1,class:"apf-editable-artifact__preview",srcdoc:i.value,sandbox:"allow-scripts",title:"artifact preview"},null,8,Af))]),c.createElementVNode("div",lf,[c.createElementVNode("span",ef,c.toDisplayString(C.hint),1),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__send",onClick:s},c.toDisplayString(C.sendBackLabel),1)])]))}}),[["__scopeId","data-v-60860f31"]]),af=P(c.defineComponent({__name:"MessageActionBar",props:{content:{},feedback:{},visible:{type:Boolean},showCopy:{type:Boolean,default:!0},showRegenerate:{type:Boolean,default:!0},showFeedback:{type:Boolean,default:!0}},emits:["copy","regenerate","feedback"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.ref(g.feedback??null);let e=null;c.watch(()=>g.feedback,d=>{l.value=d??null}),c.watch(()=>g.visible,d=>{if(d){e=setTimeout(()=>{i.value=!0},300);return}i.value=!1,e&&(clearTimeout(e),e=null)},{immediate:!0});function t(){var d;g.content&&((d=navigator.clipboard)==null||d.writeText(g.content)),A("copy")}function a(d){l.value=l.value===d?null:d,A("feedback",d)}return(d,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-msg-actions",{"is-visible":i.value}])},[C.showCopy?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-msg-actions__btn",title:"复制","aria-label":"复制",onClick:t},[...o[3]||(o[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])])):c.createCommentVNode("",!0),C.showRegenerate?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-msg-actions__btn",title:"重新生成","aria-label":"重新生成",onClick:o[0]||(o[0]=n=>A("regenerate"))},[...o[4]||(o[4]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M3 8a5 5 0 0 1 8.5-3.5M13 3v3.5H9.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M13 8a5 5 0 0 1-8.5 3.5M3 13v-3.5H6.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:c.normalizeClass(["apf-msg-actions__btn",{"is-active":l.value==="positive"}]),title:"点赞","aria-label":"点赞",onClick:o[1]||(o[1]=n=>a("positive"))},[...o[5]||(o[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:3,type:"button",class:c.normalizeClass(["apf-msg-actions__btn apf-msg-actions__btn--down",{"is-active":l.value==="negative"}]),title:"点踩","aria-label":"点踩",onClick:o[2]||(o[2]=n=>a("negative"))},[...o[6]||(o[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e20bc750"]]),cf={class:"apf-step-card__head-left"},df={class:"apf-step-card__icon","aria-hidden":"true"},of={key:0,viewBox:"0 0 16 16",width:"14",height:"14"},nf={key:1,viewBox:"0 0 16 16",width:"14",height:"14"},sf={class:"apf-step-card__titles"},Zf={class:"apf-step-card__title"},mf={key:0,class:"apf-step-card__badge"},bf={key:0,class:"apf-step-card__subtitle"},Gf={class:"apf-step-card__head-right"},rf={key:0,class:"apf-step-card__time"},hf={key:1,class:"apf-step-card__status"},uf={class:"apf-step-card__chevron","aria-hidden":"true"},Bf={class:"apf-step-card__body"},Wf=P(c.defineComponent({__name:"CollapsibleStepCard",props:{title:{},subtitle:{},badge:{},statusLabel:{},tone:{default:"default"},timestamp:{},defaultCollapsed:{type:Boolean,default:!0},collapsed:{type:Boolean}},emits:["update:collapsed"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.collapsed??g.defaultCollapsed);c.watch(()=>g.collapsed,t=>{t!==void 0&&(i.value=t)});const l=()=>g.collapsed!==void 0?g.collapsed:i.value;function e(){const t=!l();g.collapsed===void 0&&(i.value=t),A("update:collapsed",t)}return(t,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-step-card",`is-${C.tone}`])},[c.createElementVNode("button",{type:"button",class:"apf-step-card__head",onClick:e},[c.createElementVNode("div",cf,[c.createElementVNode("span",df,[c.renderSlot(t.$slots,"icon",{},()=>[C.tone==="error"?(c.openBlock(),c.createElementBlock("svg",of,[...a[0]||(a[0]=[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M8 5v3.5M8 11h.01",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])])):(c.openBlock(),c.createElementBlock("svg",nf,[...a[1]||(a[1]=[c.createElementVNode("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M6 8h4M8 6v4",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],!0)]),c.createElementVNode("div",sf,[c.createElementVNode("div",Zf,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",mf,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),C.subtitle?(c.openBlock(),c.createElementBlock("div",bf,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",Gf,[C.timestamp?(c.openBlock(),c.createElementBlock("span",rf,c.toDisplayString(C.timestamp),1)):c.createCommentVNode("",!0),C.statusLabel?(c.openBlock(),c.createElementBlock("span",hf,[a[2]||(a[2]=c.createElementVNode("i",{class:"apf-step-card__dot"},null,-1)),c.createTextVNode(" "+c.toDisplayString(C.statusLabel),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",uf,c.toDisplayString(l()?"▾":"▴"),1)])]),c.withDirectives(c.createElementVNode("div",Bf,[c.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[c.vShow,!l()]])],2))}}),[["__scopeId","data-v-9cc9ff88"]]),wf={class:"apf-agent-transfer"},Yf={class:"apf-agent-transfer__row"},Vf={class:"apf-agent-transfer__pill"},pf={class:"apf-agent-transfer__pill is-target"},yf={key:0,class:"apf-agent-transfer__reason"},Nf=P(c.defineComponent({__name:"AgentTransferCard",props:{fromLabel:{},toLabel:{},reason:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",wf,[c.createElementVNode("div",Yf,[c.createElementVNode("span",Vf,c.toDisplayString(C.fromLabel),1),g[0]||(g[0]=c.createElementVNode("span",{class:"apf-agent-transfer__arrow","aria-hidden":"true"},"→",-1)),c.createElementVNode("span",pf,c.toDisplayString(C.toLabel),1)]),C.reason?(c.openBlock(),c.createElementBlock("p",yf,c.toDisplayString(C.reason),1)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec98ad49"]]),Xf={class:"apf-field-list-card__head"},Rf={class:"apf-field-list-card__head-left"},Hf={class:"apf-field-list-card__title"},Sf={class:"apf-field-list-card__badge"},Mf={class:"apf-field-list-card__body"},Df={class:"apf-field-list-card__info"},Kf={class:"apf-field-list-card__name"},Ff={class:"apf-field-list-card__type"},zf={key:0,class:"apf-field-list-card__actions"},Jf=P(c.defineComponent({__name:"FieldListCard",props:{title:{},fields:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.fields.length} 个字段`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-field-list-card",{"is-compact":C.compact}])},[c.createElementVNode("div",Xf,[c.createElementVNode("div",Rf,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-field-list-card__icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.3"}),c.createElementVNode("path",{d:"M5 6.5h6M5 9.5h4",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})])],-1)),c.createElementVNode("span",Hf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Sf,c.toDisplayString(i()),1)]),c.createElementVNode("div",Mf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"apf-field-list-card__row"},[c.createElementVNode("div",Df,[c.createElementVNode("div",Kf,c.toDisplayString(t.name),1),c.createElementVNode("div",Ff,[c.createTextVNode(c.toDisplayString(t.type),1),t.meta?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" · "+c.toDisplayString(t.meta),1)],64)):c.createCommentVNode("",!0)])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-field-list-card__flag",{"is-req":t.required}])},c.toDisplayString(t.required?"必填":"可选"),3)]))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",zf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-field-list-card__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-field-list-card__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-ee1ab2b6"]]),vf={class:"apf-flow-strip__head"},kf={class:"apf-flow-strip__head-left"},Lf={class:"apf-flow-strip__title"},Tf={class:"apf-flow-strip__badge"},xf={class:"apf-flow-strip__body"},ff={key:0,class:"apf-flow-strip__arrow","aria-hidden":"true"},jf=["data-type"],Qf={key:0,class:"apf-flow-strip__actions"},Uf=P(c.defineComponent({__name:"FlowNodeStripCard",props:{title:{},nodes:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.nodes.length} 个节点`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-flow-strip",{"is-compact":C.compact}])},[c.createElementVNode("div",vf,[c.createElementVNode("div",kf,[e[2]||(e[2]=c.createStaticVNode('<span class="apf-flow-strip__icon" aria-hidden="true" data-v-1fea171e><svg viewBox="0 0 16 16" width="14" height="14" data-v-1fea171e><circle cx="4" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><circle cx="12" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><path d="M6 8h4" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></path></svg></span>',1)),c.createElementVNode("span",Lf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Tf,c.toDisplayString(i()),1)]),c.createElementVNode("div",xf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.nodes,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[a>0?(c.openBlock(),c.createElementBlock("div",ff)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"apf-flow-strip__node","data-type":t.type},c.toDisplayString(t.label),9,jf)],64))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",Qf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-flow-strip__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-flow-strip__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-1fea171e"]]),Of={class:"apf-token-usage"},Ef={class:"apf-token-usage__head"},Pf={class:"apf-token-usage__title"},_f={class:"apf-token-usage__body"},qf={class:"apf-token-usage__stats"},$f={class:"apf-token-usage__stat"},gj={class:"apf-token-usage__value"},Ij={class:"apf-token-usage__stat"},Cj={class:"apf-token-usage__value"},Aj={class:"apf-token-usage__stat is-total"},ij={class:"apf-token-usage__value"},lj={key:0,class:"apf-token-usage__footer"},ej={key:0,class:"apf-token-usage__model"},tj={key:1,class:"apf-token-usage__cost"},aj=P(c.defineComponent({__name:"TokenUsageCard",props:{inputTokens:{},outputTokens:{},totalTokens:{},estimatedCost:{},model:{},title:{}},setup(C){const I=C,g=c.computed(()=>I.totalTokens??I.inputTokens+I.outputTokens),A=c.computed(()=>{const l=g.value;return l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)}),i=c.computed(()=>{const l=I.estimatedCost;return l==null?null:l<.01?"<$0.01":`$${l.toFixed(4)}`});return(l,e)=>(c.openBlock(),c.createElementBlock("div",Of,[c.createElementVNode("div",Ef,[c.createElementVNode("span",Pf,c.toDisplayString(C.title||"Token 消耗"),1)]),c.createElementVNode("div",_f,[c.createElementVNode("div",qf,[c.createElementVNode("div",$f,[e[0]||(e[0]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输入",-1)),c.createElementVNode("span",gj,c.toDisplayString(C.inputTokens.toLocaleString()),1)]),c.createElementVNode("div",Ij,[e[1]||(e[1]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输出",-1)),c.createElementVNode("span",Cj,c.toDisplayString(C.outputTokens.toLocaleString()),1)]),c.createElementVNode("div",Aj,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-token-usage__label"},"总计",-1)),c.createElementVNode("span",ij,c.toDisplayString(A.value),1)])]),i.value||C.model?(c.openBlock(),c.createElementBlock("div",lj,[C.model?(c.openBlock(),c.createElementBlock("span",ej,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0),i.value?(c.openBlock(),c.createElementBlock("span",tj,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-0aacc361"]]),cj={class:"apf-questionnaire"},dj={class:"apf-questionnaire__head"},oj={class:"apf-questionnaire__title"},nj=["data-status"],sj={key:0,class:"apf-questionnaire__desc"},Zj={key:1,class:"apf-questionnaire__list"},mj={class:"apf-questionnaire__q"},bj={key:0,class:"apf-questionnaire__req"},Gj={key:0,class:"apf-questionnaire__options"},rj=["name","value","checked","disabled","onChange"],hj=["value","disabled","onInput"],uj={key:2,class:"apf-questionnaire__actions"},Bj=["disabled"],Wj=P(c.defineComponent({__name:"QuestionnaireCard",props:{title:{},description:{},questions:{},answers:{default:()=>({})},status:{default:"waiting"},approveLabel:{default:"批准"},rejectLabel:{default:"拒绝"},disabled:{type:Boolean}},emits:["answer","approve","reject"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.status==="approved"?"已批准":g.status==="rejected"?"已拒绝":"待审批",l=()=>g.questions.filter(a=>a.required).every(a=>!!g.answers[a.id]),e=()=>g.status==="waiting"&&!g.disabled;return(t,a)=>(c.openBlock(),c.createElementBlock("div",cj,[c.createElementVNode("div",dj,[c.createElementVNode("span",oj,c.toDisplayString(C.title),1),c.createElementVNode("span",{class:"apf-questionnaire__status","data-status":C.status},c.toDisplayString(i()),9,nj)]),C.description?(c.openBlock(),c.createElementBlock("p",sj,c.toDisplayString(C.description),1)):c.createCommentVNode("",!0),C.questions.length?(c.openBlock(),c.createElementBlock("div",Zj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.questions,d=>{var o;return c.openBlock(),c.createElementBlock("div",{key:d.id,class:"apf-questionnaire__item"},[c.createElementVNode("div",mj,[d.required?(c.openBlock(),c.createElementBlock("span",bj,"*")):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(d.question),1)]),(o=d.options)!=null&&o.length?(c.openBlock(),c.createElementBlock("div",Gj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.options,n=>(c.openBlock(),c.createElementBlock("label",{key:n,class:"apf-questionnaire__opt"},[c.createElementVNode("input",{type:"radio",name:d.id,value:n,checked:C.answers[d.id]===n,disabled:!e(),onChange:s=>A("answer",d.id,n)},null,40,rj),c.createTextVNode(" "+c.toDisplayString(n),1)]))),128))])):(c.openBlock(),c.createElementBlock("input",{key:1,class:"apf-questionnaire__input",type:"text",value:C.answers[d.id]||"",placeholder:"请输入...",disabled:!e(),onInput:n=>A("answer",d.id,n.target.value)},null,40,hj))])}),128))])):c.createCommentVNode("",!0),e()?(c.openBlock(),c.createElementBlock("div",uj,[c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-ghost",onClick:a[0]||(a[0]=d=>A("reject"))},c.toDisplayString(C.rejectLabel),1),c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-primary",disabled:!l(),onClick:a[1]||(a[1]=d=>A("approve"))},c.toDisplayString(C.approveLabel),9,Bj)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0e4beff5"]]),wj=["onClick"],Yj=["onClick"],Vj={key:0},pj={key:1},yj=P(c.defineComponent({__name:"ChecklistProposalCard",props:{proposal:{},status:{},selectedIds:{},readonly:{type:Boolean}},emits:["toggle-item","toggle-all","approve","reject","modify","reset"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(new Set(g.proposal.actionItems.map(B=>B.id))),l=c.computed(()=>g.selectedIds??i.value),e=c.computed(()=>l.value.size),t=c.computed(()=>e.value===g.proposal.actionItems.length&&g.proposal.actionItems.length>0),a={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#67C23A",bgColor:"#f0f9eb"}},d={todo:{icon:"document",label:"待办"},approval:{icon:"stamp",label:"审批"},review:{icon:"view",label:"审阅"},decision:{icon:"warning",label:"决策"}},o=c.ref(null),n=c.ref({});function s(B){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-item",B):i.value.has(B)?i.value.delete(B):i.value.add(B))}function Z(){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-all"):t.value?i.value.clear():g.proposal.actionItems.forEach(B=>i.value.add(B.id)))}function m(B){o.value=B.id,n.value={...B}}function b(){o.value&&n.value&&(A("modify",o.value,n.value),o.value=null,n.value={})}function G(){o.value=null,n.value={}}function r(){A("approve",Array.from(l.value))}function h(){A("reject")}function u(){A("reset")}return(B,W)=>{var w;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([B.$style.card,C.status==="approved"&&B.$style.cardApproved,C.status==="rejected"&&B.$style.cardRejected])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.titleRow)},[c.createVNode(c.unref($),{name:"circle-check-filled",size:16,style:{color:"#409EFF"}}),c.createElementVNode("span",{class:c.normalizeClass(B.$style.title)},"智能拟办",2),C.proposal.documentTitle?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.docTitle)},c.toDisplayString(C.proposal.documentTitle),3)):c.createCommentVNode("",!0)],2),!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.countBadge)},c.toDisplayString(e.value)+"/"+c.toDisplayString(C.proposal.actionItems.length)+" 项 ",3)):C.status==="approved"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusApproved])},[c.createVNode(c.unref($),{name:"check",size:12}),W[7]||(W[7]=c.createTextVNode(" 已批准 ",-1))],2)):C.status==="rejected"?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusRejected])},[c.createVNode(c.unref($),{name:"close",size:12}),W[8]||(W[8]=c.createTextVNode(" 已拒绝 ",-1))],2)):c.createCommentVNode("",!0)],2),C.proposal.summary?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.summary)},c.toDisplayString(C.proposal.summary),3)):c.createCommentVNode("",!0),(!C.status||C.status==="pending")&&!C.readonly?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.selectAllRow)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:Z},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,t.value&&B.$style.checked])},[t.value?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2),W[9]||(W[9]=c.createElementVNode("span",null,"全选",-1))],2)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.actionItems,Y=>{var p,V,y,N,H;return c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass([B.$style.item,l.value.has(Y.id)&&B.$style.itemSelected,o.value===Y.id&&B.$style.itemEditing])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemHeader),onClick:R=>s(Y.id)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:W[0]||(W[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,l.value.has(Y.id)&&B.$style.checked])},[l.value.has(Y.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemBadges)},[Y.priority?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.priorityBadge),style:c.normalizeStyle({color:(p=a[Y.priority])==null?void 0:p.color,background:(V=a[Y.priority])==null?void 0:V.bgColor})},c.toDisplayString(((y=a[Y.priority])==null?void 0:y.label)??Y.priority),7)):c.createCommentVNode("",!0),Y.type?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(B.$style.typeBadge)},[c.createVNode(c.unref($),{name:((N=d[Y.type])==null?void 0:N.icon)??"document",size:12},null,8,["name"]),c.createTextVNode(" "+c.toDisplayString(((H=d[Y.type])==null?void 0:H.label)??Y.type),1)],2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemTitle)},c.toDisplayString(Y.title),3),!C.readonly&&(!C.status||C.status==="pending")?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(B.$style.editBtn),onClick:c.withModifiers(R=>m(Y),["stop"])},[c.createVNode(c.unref($),{name:"edit",size:12})],10,Yj)):c.createCommentVNode("",!0)],10,wj),o.value===Y.id?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.editForm)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[10]||(W[10]=c.createElementVNode("label",null,"标题",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[1]||(W[1]=R=>n.value.title=R),class:c.normalizeClass(B.$style.editInput)},null,2),[[c.vModelText,n.value.title]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[11]||(W[11]=c.createElementVNode("label",null,"描述",-1)),c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":W[2]||(W[2]=R=>n.value.description=R),class:c.normalizeClass(B.$style.editTextarea),rows:"2"},null,2),[[c.vModelText,n.value.description]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[12]||(W[12]=c.createElementVNode("label",null,"负责人",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[3]||(W[3]=R=>n.value.assignee=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.assignee]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[13]||(W[13]=c.createElementVNode("label",null,"截止日期",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[4]||(W[4]=R=>n.value.deadline=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.deadline]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[15]||(W[15]=c.createElementVNode("label",null,"优先级",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[5]||(W[5]=R=>n.value.priority=R),class:c.normalizeClass(B.$style.editSelect)},[...W[14]||(W[14]=[c.createElementVNode("option",{value:"high"},"高",-1),c.createElementVNode("option",{value:"medium"},"中",-1),c.createElementVNode("option",{value:"low"},"低",-1)])],2),[[c.vModelSelect,n.value.priority]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[17]||(W[17]=c.createElementVNode("label",null,"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[6]||(W[6]=R=>n.value.type=R),class:c.normalizeClass(B.$style.editSelect)},[...W[16]||(W[16]=[c.createElementVNode("option",{value:"todo"},"待办",-1),c.createElementVNode("option",{value:"approval"},"审批",-1),c.createElementVNode("option",{value:"review"},"审阅",-1),c.createElementVNode("option",{value:"decision"},"决策",-1)])],2),[[c.vModelSelect,n.value.type]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editActions)},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.saveBtn),onClick:b},"保存",2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.cancelBtn),onClick:G},"取消",2)],2)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.itemBody)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemDesc)},c.toDisplayString(Y.description),3),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemMeta)},[Y.assignee?(c.openBlock(),c.createElementBlock("span",Vj,[c.createVNode(c.unref($),{name:"user",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.assignee),1)])):c.createCommentVNode("",!0),Y.deadline?(c.openBlock(),c.createElementBlock("span",pj,[c.createVNode(c.unref($),{name:"clock",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.deadline),1)])):c.createCommentVNode("",!0)],2)],2))],2)}),128))],2),(w=C.proposal.approvalChain)!=null&&w.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(B.$style.chain)},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainLabel)},"审批链:",2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.approvalChain,(Y,p)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainPerson)},c.toDisplayString(Y),3),p<C.proposal.approvalChain.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.chainArrow)},"→",2)):c.createCommentVNode("",!0)],64))),128))],2)):c.createCommentVNode("",!0),C.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(B.$style.actions)},[!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.approveBtn),onClick:r},[c.createVNode(c.unref($),{name:"check",size:14}),c.createTextVNode(" 确认执行 ("+c.toDisplayString(e.value)+" 项) ",1)],2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.rejectBtn),onClick:h},[c.createVNode(c.unref($),{name:"close",size:14}),W[18]||(W[18]=c.createTextVNode(" 暂不执行 ",-1))],2)],64)):(c.openBlock(),c.createElementBlock("button",{key:1,class:c.normalizeClass(B.$style.resetBtn),onClick:u},[c.createVNode(c.unref($),{name:"refresh",size:14}),W[19]||(W[19]=c.createTextVNode(" 重新审核 ",-1))],2))],2))],2)}}}),[["__cssModules",{$style:{card:"_card_yghuq_2",cardApproved:"_cardApproved_yghuq_9",cardRejected:"_cardRejected_yghuq_14",header:"_header_yghuq_20",titleRow:"_titleRow_yghuq_27",title:"_title_yghuq_27",docTitle:"_docTitle_yghuq_39",countBadge:"_countBadge_yghuq_47",statusBadge:"_statusBadge_yghuq_53",statusApproved:"_statusApproved_yghuq_63",statusRejected:"_statusRejected_yghuq_68",summary:"_summary_yghuq_74",selectAllRow:"_selectAllRow_yghuq_85",checkbox:"_checkbox_yghuq_89",checkboxInner:"_checkboxInner_yghuq_99",checked:"_checked_yghuq_110",itemList:"_itemList_yghuq_117",item:"_item_yghuq_117",itemSelected:"_itemSelected_yghuq_136",itemEditing:"_itemEditing_yghuq_141",itemHeader:"_itemHeader_yghuq_145",itemBadges:"_itemBadges_yghuq_151",priorityBadge:"_priorityBadge_yghuq_156",typeBadge:"_typeBadge_yghuq_163",itemTitle:"_itemTitle_yghuq_171",editBtn:"_editBtn_yghuq_178",itemBody:"_itemBody_yghuq_194",itemDesc:"_itemDesc_yghuq_199",itemMeta:"_itemMeta_yghuq_206",editForm:"_editForm_yghuq_220",editRow:"_editRow_yghuq_225",editInput:"_editInput_yghuq_236",editTextarea:"_editTextarea_yghuq_237",editSelect:"_editSelect_yghuq_238",editRowInline:"_editRowInline_yghuq_260",editActions:"_editActions_yghuq_270",saveBtn:"_saveBtn_yghuq_276",cancelBtn:"_cancelBtn_yghuq_277",chain:"_chain_yghuq_309",chainLabel:"_chainLabel_yghuq_321",chainPerson:"_chainPerson_yghuq_325",chainArrow:"_chainArrow_yghuq_331",actions:"_actions_yghuq_337",approveBtn:"_approveBtn_yghuq_344",rejectBtn:"_rejectBtn_yghuq_345",resetBtn:"_resetBtn_yghuq_346"}}]]),Nj=["onClick"],Xj=P(c.defineComponent({__name:"RequirementAnalysisCard",props:{analysis:{},partialAnswers:{default:()=>({})},nextQuestionId:{default:null},waitingConfirmation:{type:Boolean,default:!0}},emits:["answer","skip"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>({...g.partialAnswers})),l=c.computed(()=>({simple:"简单",medium:"中等",complex:"复杂"})[g.analysis.complexity]||g.analysis.complexity),e=c.computed(()=>{const s=g.analysis.completeness.score;return s>=80?"success":s>=60?"warning":"danger"}),t=c.computed(()=>g.analysis.confirmQuestions.filter(s=>s.required).every(s=>{var Z;return(Z=i.value[s.id])==null?void 0:Z.trim()}));function a(){A("skip")}function d(s,Z){g.waitingConfirmation&&A("answer",s,Z)}function o(s){var Z;return!!((Z=i.value[s])!=null&&Z.trim())}function n(s){return g.waitingConfirmation&&g.nextQuestionId===s}return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summary)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryHeader)},[c.createVNode(c.unref($),{name:"data-board",size:16}),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryTitle)},"需求分析结果",2)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryGrid)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"意图",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.intent),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"类型",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.type),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"复杂度",2),c.createVNode(m,{type:C.analysis.complexity==="complex"?"danger":C.analysis.complexity==="medium"?"warning":"success",size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l.value),1)]),_:1},8,["type"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"完整性",2),c.createVNode(b,{percentage:C.analysis.completeness.score,color:e.value==="success"?"#67c23a":e.value==="warning"?"#e6a23c":"#f56c6c","stroke-width":8,"show-text":!1,style:{width:"80px"}},null,8,["percentage","color"]),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.completeness.score)+"%",3)],2)],2),C.analysis.completeness.missing.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.missingSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.missingTitle)},[c.createVNode(c.unref($),{name:"warning",size:14}),Z[0]||(Z[0]=c.createElementVNode("span",null,"缺失信息",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.missingList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.missing,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.completeness.assumptions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.assumptionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.assumptionsTitle)},[c.createVNode(c.unref($),{name:"info-filled",size:14}),Z[1]||(Z[1]=c.createElementVNode("span",null,"AI 假设",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.assumptionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.assumptions,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0)],2),C.analysis.suggestedChain.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.chainSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainTitle)},[c.createVNode(c.unref($),{name:"list",size:14}),Z[2]||(Z[2]=c.createElementVNode("span",null,"执行计划",-1))],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.suggestedChain,(G,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass(s.$style.chainItem)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainStep)},c.toDisplayString(r+1),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainContent)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainAgent)},c.toDisplayString(G.agent),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainDesc)},c.toDisplayString(G.description),3)],2)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.confirmQuestions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.questionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsTitle)},[c.createVNode(c.unref($),{name:"question-filled",size:14}),Z[3]||(Z[3]=c.createElementVNode("span",null,"请确认以下信息",-1)),C.waitingConfirmation&&!t.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.progressHint)}," 在下方输入框逐条回复,答完必填项后自动继续 ",2)):C.waitingConfirmation&&t.value?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.progressHint)}," 必填项已完成,发送任意内容或直接点选以继续 ",2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.confirmQuestions,G=>(c.openBlock(),c.createElementBlock("div",{key:G.id,class:c.normalizeClass([s.$style.questionItem,n(G.id)&&s.$style.questionItemActive,o(G.id)&&s.$style.questionItemDone])},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionText)},[o(G.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"circle-check",size:14,class:c.normalizeClass(s.$style.answeredIcon)},null,8,["class"])):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(G.question)+" ",1),G.required?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.required)},"*",2)):c.createCommentVNode("",!0)],2),o(G.id)?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.answeredValue)},c.toDisplayString(i.value[G.id]),3)):G.options&&G.options.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.optionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.options,(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass([s.$style.optionItem,{[s.$style.optionDisabled]:!C.waitingConfirmation}]),onClick:u=>C.waitingConfirmation&&d(G.id,r)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionIndex)},c.toDisplayString(h+1),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionText)},c.toDisplayString(r),3)],10,Nj))),128))],2)):n(G.id)?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.inputHint)}," 请在下方输入框回复 ",2)):c.createCommentVNode("",!0)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.waitingConfirmation?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(s.$style.skipLink),onClick:a}," 跳过,直接执行 ",2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_8r8st_2",summary:"_summary_8r8st_10",summaryHeader:"_summaryHeader_8r8st_15",summaryTitle:"_summaryTitle_8r8st_24",summaryGrid:"_summaryGrid_8r8st_28",summaryItem:"_summaryItem_8r8st_34",summaryLabel:"_summaryLabel_8r8st_40",summaryValue:"_summaryValue_8r8st_46",missingSection:"_missingSection_8r8st_52",missingTitle:"_missingTitle_8r8st_59",missingList:"_missingList_8r8st_69",assumptionsSection:"_assumptionsSection_8r8st_81",assumptionsTitle:"_assumptionsTitle_8r8st_88",assumptionsList:"_assumptionsList_8r8st_98",chainSection:"_chainSection_8r8st_110",chainTitle:"_chainTitle_8r8st_115",chainList:"_chainList_8r8st_125",chainItem:"_chainItem_8r8st_131",chainStep:"_chainStep_8r8st_137",chainContent:"_chainContent_8r8st_151",chainAgent:"_chainAgent_8r8st_155",chainDesc:"_chainDesc_8r8st_161",questionsSection:"_questionsSection_8r8st_167",questionsTitle:"_questionsTitle_8r8st_171",progressHint:"_progressHint_8r8st_182",questionItemActive:"_questionItemActive_8r8st_188",questionItemDone:"_questionItemDone_8r8st_195",answeredIcon:"_answeredIcon_8r8st_199",answeredValue:"_answeredValue_8r8st_204",inputHint:"_inputHint_8r8st_210",optionDisabled:"_optionDisabled_8r8st_216",questionsList:"_questionsList_8r8st_221",questionItem:"_questionItem_8r8st_188",questionText:"_questionText_8r8st_233",required:"_required_8r8st_238",optionsList:"_optionsList_8r8st_243",optionItem:"_optionItem_8r8st_249",optionSelected:"_optionSelected_8r8st_265",optionIndex:"_optionIndex_8r8st_270",optionText:"_optionText_8r8st_289",actions:"_actions_8r8st_295",skipLink:"_skipLink_8r8st_303"}}]]),$A={card:"_card_6xf4y_1",header:"_header_6xf4y_9",title:"_title_6xf4y_16",filename:"_filename_6xf4y_22",summary:"_summary_6xf4y_27",points:"_points_6xf4y_34",section:"_section_6xf4y_44",sectionTitle:"_sectionTitle_6xf4y_48",sectionContent:"_sectionContent_6xf4y_55"},Rj=c.defineComponent({__name:"DocumentDetailSummaryCard",props:{item:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref($A).card)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).header)},[c.createVNode(c.unref($),{name:"document",size:16}),c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).title)},c.toDisplayString(C.item.summary.title),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).filename)},c.toDisplayString(C.item.filename),3)])],2),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).summary)},c.toDisplayString(C.item.summary.summary),3),C.item.summary.keyPoints.length?(c.openBlock(),c.createElementBlock("ul",{key:0,class:c.normalizeClass(c.unref($A).points)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.keyPoints,(A,i)=>(c.openBlock(),c.createElementBlock("li",{key:i},c.toDisplayString(A),1))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.sections,(A,i)=>(c.openBlock(),c.createElementBlock("div",{key:i,class:c.normalizeClass(c.unref($A).section)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).sectionTitle)},c.toDisplayString(A.heading),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref($A).sectionContent)},c.toDisplayString(A.content),3)],2))),128))],2))}}),Hj=["disabled","onClick"],Sj=P(c.defineComponent({__name:"ErrorRecoveryCard",props:{error:{},nodeName:{},nodeType:{},strategies:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(A.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.header)},[c.createVNode(c.unref($),{name:"warning-filled",size:14,class:c.normalizeClass(A.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},"执行错误",2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorInfo)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.nodeInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeLabel)},"节点:",2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeName)},c.toDisplayString(C.nodeName),3),C.nodeType?(c.openBlock(),c.createBlock(l,{key:0,size:"small",type:"info"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(C.nodeType),1)]),_:1})):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorMessage)},[c.createVNode(c.unref($),{name:"circle-close-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategies)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyLabel)},"选择恢复策略:",2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.strategies,e=>(c.openBlock(),c.createElementBlock("button",{key:e.value,class:c.normalizeClass([A.$style.strategyBtn,e.disabled&&A.$style.strategyDisabled]),disabled:e.disabled,onClick:t=>g("select",e.value)},[c.createVNode(c.unref($),{name:e.icon,size:16},null,8,["name"]),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyName)},c.toDisplayString(e.label),3),c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyDesc)},c.toDisplayString(e.description),3)],2)],10,Hj))),128))],2)],2)],2)],2)}}}),[["__cssModules",{$style:{card:"_card_170h5_2",header:"_header_170h5_8",headerIcon:"_headerIcon_170h5_17",title:"_title_170h5_21",body:"_body_170h5_27",errorInfo:"_errorInfo_170h5_31",nodeInfo:"_nodeInfo_170h5_35",nodeLabel:"_nodeLabel_170h5_42",nodeName:"_nodeName_170h5_47",errorMessage:"_errorMessage_170h5_53",strategies:"_strategies_170h5_65",strategyLabel:"_strategyLabel_170h5_70",strategyList:"_strategyList_170h5_76",strategyBtn:"_strategyBtn_170h5_82",strategyDisabled:"_strategyDisabled_170h5_104",strategyInfo:"_strategyInfo_170h5_108",strategyName:"_strategyName_170h5_114",strategyDesc:"_strategyDesc_170h5_120"}}]]),Mj=P(c.defineComponent({__name:"VariableDiffCard",props:{nodeName:{},changes:{}},setup(C){const I=C,g=c.computed(()=>I.changes.length>0);function A(l){return l==null?"null":typeof l=="string"?l:JSON.stringify(l,null,2)}function i(l){switch(l.type){case"add":return{icon:"plus",color:"var(--el-color-success, #67c23a)",label:"新增"};case"update":return{icon:"edit",color:"var(--el-color-primary, #409eff)",label:"更新"};case"delete":return{icon:"delete",color:"var(--el-color-danger, #f56c6c)",label:"删除"};default:return{icon:"info-filled",color:"var(--el-color-info, #909399)",label:"变更"}}}return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(l.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createVNode(c.unref($),{name:"data-line",size:14,class:c.normalizeClass(l.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},"变量变更",2)],2),C.nodeName?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(l.$style.nodeInfo)},c.toDisplayString(C.nodeName),3)):c.createCommentVNode("",!0)],2),g.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.body)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.changes,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass(l.$style.change)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeHeader)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeType)},[c.createVNode(c.unref($),{name:i(t).icon,size:12,style:c.normalizeStyle({color:i(t).color})},null,8,["name","style"]),c.createElementVNode("span",{style:c.normalizeStyle({color:i(t).color})},c.toDisplayString(i(t).label),5)],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.varName)},c.toDisplayString(t.name),3)],2),t.type==="update"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.diff)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffOld)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"旧值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.oldValue)),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffNew)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"新值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)],2)):t.type==="add"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.singleValue)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)):c.createCommentVNode("",!0)],2))),128))],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.empty)}," 暂无变量变更 ",2))],2))}}),[["__cssModules",{$style:{card:"_card_1byhf_2",header:"_header_1byhf_8",headerLeft:"_headerLeft_1byhf_17",headerIcon:"_headerIcon_1byhf_23",title:"_title_1byhf_27",nodeInfo:"_nodeInfo_1byhf_33",body:"_body_1byhf_38",change:"_change_1byhf_45",changeHeader:"_changeHeader_1byhf_51",changeType:"_changeType_1byhf_59",varName:"_varName_1byhf_67",diff:"_diff_1byhf_73",diffOld:"_diffOld_1byhf_78",diffNew:"_diffNew_1byhf_84",singleValue:"_singleValue_1byhf_89",diffLabel:"_diffLabel_1byhf_93",diffValue:"_diffValue_1byhf_100",empty:"_empty_1byhf_108"}}]]),Dj=P(c.defineComponent({__name:"SubWorkflowStatusCard",props:{workflowName:{},status:{},durationMs:{},error:{},nodeCount:{},completedNodes:{}},emits:["detail","retry"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.computed(()=>{switch(g.status){case"running":return"loading";case"success":return"circle-check";case"error":return"circle-close-filled";case"waiting":return"clock";case"cancelled":return"minus";default:return"more-filled"}}),e=c.computed(()=>{switch(g.status){case"running":return"执行中";case"success":return"成功";case"error":return"失败";case"waiting":return"待确认";case"cancelled":return"已取消";default:return"等待"}}),t=c.computed(()=>{switch(g.status){case"running":return"primary";case"success":return"success";case"error":return"danger";case"waiting":return"warning";default:return"info"}}),a=c.computed(()=>{const s=g.durationMs;return s==null?"":s<1e3?`${s}ms`:`${(s/1e3).toFixed(2)}s`}),d=c.computed(()=>g.nodeCount??0),o=c.computed(()=>g.completedNodes??0),n=c.computed(()=>d.value===0?0:Math.round(o.value/d.value*100));return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress"),G=c.resolveComponent("el-button");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header),onClick:Z[0]||(Z[0]=r=>i.value=!i.value)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.iconWrap)},[c.createVNode(c.unref($),{name:l.value,size:16,class:c.normalizeClass(C.status==="running"&&s.$style.iconSpin)},null,8,["name","class"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.info)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.name)},"子工作流:"+c.toDisplayString(C.workflowName),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.meta)},[c.createVNode(m,{size:"small",type:t.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.value),1)]),_:1},8,["type"]),a.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.duration)},c.toDisplayString(a.value),3)):c.createCommentVNode("",!0)],2)],2),c.createVNode(c.unref($),{name:i.value?"arrow-up":"arrow-down",size:14,class:c.normalizeClass(s.$style.expandIcon)},null,8,["name","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.detail)},[d.value>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.progress)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.progressLabel)}," 节点进度:"+c.toDisplayString(o.value)+" / "+c.toDisplayString(d.value),3),c.createVNode(b,{percentage:n.value,status:C.status==="error"?"exception":void 0,"stroke-width":6},null,8,["percentage","status"])],2)):c.createCommentVNode("",!0),C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.error)},[c.createVNode(c.unref($),{name:"warning-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(s.$style.actions)},[c.createVNode(G,{size:"small",onClick:Z[1]||(Z[1]=r=>A("detail"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"view",size:14,style:{"margin-right":"4px"}}),Z[3]||(Z[3]=c.createTextVNode(" 查看详情 ",-1))]),_:1}),C.status==="error"?(c.openBlock(),c.createBlock(G,{key:0,size:"small",type:"primary",plain:"",onClick:Z[2]||(Z[2]=r=>A("retry"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"refresh",size:14,style:{"margin-right":"4px"}}),Z[4]||(Z[4]=c.createTextVNode(" 重试 ",-1))]),_:1})):c.createCommentVNode("",!0)],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_15eqh_2",header:"_header_15eqh_8",iconWrap:"_iconWrap_15eqh_21",info:"_info_15eqh_33",name:"_name_15eqh_41",meta:"_meta_15eqh_50",duration:"_duration_15eqh_56",expandIcon:"_expandIcon_15eqh_62",detail:"_detail_15eqh_67",progress:"_progress_15eqh_73",progressLabel:"_progressLabel_15eqh_77",error:"_error_15eqh_83",actions:"_actions_15eqh_95",iconSpin:"_iconSpin_15eqh_100","sub-workflow-spin":"_sub-workflow-spin_15eqh_1"}}]]),Kj={key:0},Fj=P(c.defineComponent({__name:"PptPreviewCard",props:{slides:{},metadata:{},loading:{type:Boolean},error:{},blob:{}},emits:["download"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>(g.slides??[]).slice(0,4)),l={business:"商务",tech:"科技",education:"教育",creative:"创意"},e={professional:"专业",casual:"休闲",academic:"学术"},t={title:"document",content:"notebook",chart:"data-line",comparison:"scale-to-original",summary:"document-checked"};function a(){var d;if(g.blob){const o=URL.createObjectURL(g.blob),n=document.createElement("a");n.href=o,n.download=`${((d=g.metadata)==null?void 0:d.title)??"presentation"}.pptx`,n.click(),URL.revokeObjectURL(o)}else A("download")}return(d,o)=>{var n,s,Z,m;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(d.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.titleRow)},[c.createVNode(c.unref($),{name:"data-board",size:16,style:{color:"#67C23A"}}),c.createElementVNode("span",{class:c.normalizeClass(d.$style.title)},c.toDisplayString(((n=C.metadata)==null?void 0:n.title)??"AI PPT 生成"),3)],2),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.metaBadges)},[c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(l[C.metadata.template]??C.metadata.template),3),c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(C.metadata.totalSlides)+" 页",3)],2)):c.createCommentVNode("",!0)],2),C.loading?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.loadingState)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.spinner)},null,2),o[0]||(o[0]=c.createElementVNode("span",null,"正在生成 PPT...",-1))],2)):C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.errorState)},[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):i.value.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(d.$style.previewGrid)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,b=>{var G;return c.openBlock(),c.createElementBlock("div",{key:b.index,class:c.normalizeClass(d.$style.slideThumb)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideHeader)},[c.createVNode(c.unref($),{name:t[b.type]??"document",size:12},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(b.heading),1)],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideBody)},[(G=b.content)!=null&&G.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideContent)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(b.content.slice(0,3),(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:c.normalizeClass(d.$style.slidePoint)},c.toDisplayString(r),3))),128)),b.content.length>3?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideMore)}," +"+c.toDisplayString(b.content.length-3)+" 更多 ",3)):c.createCommentVNode("",!0)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.slideEmpty)},"暂无内容",2))],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideIndex)},c.toDisplayString(b.index),3)],2)}),128)),(((s=C.slides)==null?void 0:s.length)??0)>4?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.moreSlides)},[c.createElementVNode("span",null,"+"+c.toDisplayString((((Z=C.slides)==null?void 0:Z.length)??0)-4)+" 页",1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(d.$style.meta)},[C.metadata.style?(c.openBlock(),c.createElementBlock("span",Kj,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(e[C.metadata.style]??C.metadata.style),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,[c.createVNode(c.unref($),{name:"document",size:12}),c.createTextVNode(" "+c.toDisplayString(C.metadata.totalSlides)+" 页 ",1)])],2)):c.createCommentVNode("",!0),!C.loading&&((m=C.slides)!=null&&m.length)?(c.openBlock(),c.createElementBlock("div",{key:4,class:c.normalizeClass(d.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(d.$style.downloadBtn),onClick:a},[c.createVNode(c.unref($),{name:"download",size:14}),o[1]||(o[1]=c.createTextVNode(" 下载 PPT ",-1))],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_z1wac_2",header:"_header_z1wac_9",titleRow:"_titleRow_z1wac_16",title:"_title_z1wac_16",metaBadges:"_metaBadges_z1wac_28",badge:"_badge_z1wac_33",loadingState:"_loadingState_z1wac_41",errorState:"_errorState_z1wac_42",spinner:"_spinner_z1wac_56",spin:"_spin_z1wac_56",previewGrid:"_previewGrid_z1wac_69",slideThumb:"_slideThumb_z1wac_76",slideHeader:"_slideHeader_z1wac_85",slideBody:"_slideBody_z1wac_97",slideContent:"_slideContent_z1wac_101",slidePoint:"_slidePoint_z1wac_107",slideMore:"_slideMore_z1wac_116",slideEmpty:"_slideEmpty_z1wac_122",slideIndex:"_slideIndex_z1wac_127",moreSlides:"_moreSlides_z1wac_136",meta:"_meta_z1wac_28",actions:"_actions_z1wac_161",downloadBtn:"_downloadBtn_z1wac_166"}}]]),zj=P(c.defineComponent({__name:"FlowPreviewShell",props:{title:{},badge:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1},showFitButton:{type:Boolean,default:!0}},emits:["primary-action","secondary-action","fit-view"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([A.$style.card,{[A.$style.compact]:C.compact}])},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.head)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headLeft)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headIcon)},[c.renderSlot(A.$slots,"icon",{},()=>[c.createVNode(c.unref($),{name:"connection",size:14})])],2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.headRight)},[C.badge?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(A.$style.badge)},c.toDisplayString(C.badge),3)):c.createCommentVNode("",!0),C.showFitButton?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.fitBtn),title:"适配画布",onClick:i[0]||(i[0]=l=>g("fit-view"))},[c.createVNode(c.unref($),{name:"full-screen"})],2)):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.canvasWrapper)},[c.renderSlot(A.$slots,"default")],2),C.primaryAction||C.secondaryAction?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(A.$style.actions)},[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(A.$style.btnGhost),onClick:i[1]||(i[1]=l=>g("secondary-action"))},[c.createVNode(c.unref($),{name:"edit",size:12}),c.createTextVNode(" "+c.toDisplayString(C.secondaryAction),1)],2)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.btnPrimary),onClick:i[2]||(i[2]=l=>g("primary-action"))},[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryAction),1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{card:"_card_h1z12_1",head:"_head_h1z12_16",headLeft:"_headLeft_h1z12_25",headRight:"_headRight_h1z12_31",headIcon:"_headIcon_h1z12_37",title:"_title_h1z12_49",badge:"_badge_h1z12_55",fitBtn:"_fitBtn_h1z12_64",canvasWrapper:"_canvasWrapper_h1z12_86","vue-flow__node":"_vue-flow__node_h1z12_92",selected:"_selected_h1z12_96","vue-flow__edge-path":"_vue-flow__edge-path_h1z12_101","vue-flow__controls":"_vue-flow__controls_h1z12_105","vue-flow__controls-button":"_vue-flow__controls-button_h1z12_111",actions:"_actions_h1z12_121",btnPrimary:"_btnPrimary_h1z12_130",btnGhost:"_btnGhost_h1z12_150",compact:"_compact_h1z12_173"}}]]),Jj={class:"apf-model3d"},vj={class:"apf-model3d__header"},kj={class:"apf-model3d__badge"},Lj={class:"apf-model3d__filename"},Tj={class:"apf-model3d__body"},xj={key:0,slot:"poster",class:"apf-model3d__hint"},fj={key:1,class:"apf-model3d__hint is-error"},jj={key:0,class:"apf-model3d__actions"},Qj=["href"],Uj=P(c.defineComponent({__name:"Model3dPreviewCard",props:{url:{},filename:{},mimeType:{},poster:{}},setup(C){const I=C,g=c.ref(!1),A=c.ref(null),i=c.computed(()=>{var a,d;const t=((d=(a=I.filename)==null?void 0:a.split(".").pop())==null?void 0:d.toLowerCase())||"";return["gltf","glb"].includes(t)?"glTF":t==="obj"?"OBJ":t==="stl"?"STL":t==="fbx"?"FBX":"3D"});function l(){g.value=!0,A.value=null}function e(){A.value="加载失败"}return(t,a)=>{const d=c.resolveComponent("model-viewer");return c.openBlock(),c.createElementBlock("div",Jj,[c.createElementVNode("div",vj,[c.createElementVNode("span",kj,c.toDisplayString(i.value),1),c.createElementVNode("span",Lj,c.toDisplayString(C.filename||"3D 模型"),1)]),c.createElementVNode("div",Tj,[c.createVNode(d,{src:C.url,poster:C.poster,"camera-controls":"","auto-rotate":"","shadow-intensity":"1",class:"apf-model3d__viewer",onLoad:l,onError:e},{default:c.withCtx(()=>[!g.value&&!A.value?(c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(c.unref($),{name:"loading",size:24,class:"apf-model3d__spin"}),a[0]||(a[0]=c.createElementVNode("span",null,"加载 3D 模型中...",-1))])):c.createCommentVNode("",!0),A.value?(c.openBlock(),c.createElementBlock("div",fj,[c.createVNode(c.unref($),{name:"warning-filled",size:24}),c.createElementVNode("span",null,c.toDisplayString(A.value),1)])):c.createCommentVNode("",!0)]),_:1},8,["src","poster"])]),A.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",jj,[c.createElementVNode("a",{class:"apf-model3d__download",href:C.url,download:""},[c.createVNode(c.unref($),{name:"download",size:14}),a[1]||(a[1]=c.createTextVNode(" 下载 ",-1))],8,Qj)]))])}}}),[["__scopeId","data-v-b562b8bd"]]),Oj={class:"apf-image-generate"},Ej={class:"apf-image-generate__header"},Pj={class:"apf-image-generate__title-row"},_j={key:0,class:"apf-image-generate__model"},qj={key:0,class:"apf-image-generate__prompt"},$j={class:"apf-image-generate__image-container"},gQ={key:0,class:"apf-image-generate__overlay"},IQ={key:1,class:"apf-image-generate__overlay apf-image-generate__overlay--error"},CQ=["src"],AQ={class:"apf-image-generate__zoom-hint"},iQ={key:3,class:"apf-image-generate__placeholder"},lQ={key:1,class:"apf-image-generate__meta"},eQ={key:0},tQ={key:1},aQ={key:2},cQ={key:2,class:"apf-image-generate__actions"},dQ=P(c.defineComponent({__name:"ImageGenerateCard",props:{imageUrl:{},prompt:{},model:{},size:{},imageStyle:{},quality:{},loading:{type:Boolean},error:{}},emits:["download","regenerate"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1);function l(){if(!g.imageUrl)return;const o=document.createElement("a");o.href=g.imageUrl,o.download=`ai-image-${Date.now()}.png`,o.click(),A("download")}function e(){g.imageUrl&&(i.value=!0)}function t(){i.value=!1}const a={vivid:"鲜艳",natural:"自然"},d={standard:"标准",hd:"高清"};return(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",Oj,[c.createElementVNode("div",Ej,[c.createElementVNode("div",Pj,[c.createVNode(c.unref($),{name:"picture",size:16,style:{color:"#E6A23C"}}),n[1]||(n[1]=c.createElementVNode("span",{class:"apf-image-generate__title"},"AI 图片生成",-1))]),C.model?(c.openBlock(),c.createElementBlock("div",_j,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0)]),C.prompt?(c.openBlock(),c.createElementBlock("div",qj,[n[2]||(n[2]=c.createElementVNode("span",{class:"apf-image-generate__prompt-label"},"Prompt:",-1)),c.createTextVNode(c.toDisplayString(C.prompt),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",$j,[C.loading?(c.openBlock(),c.createElementBlock("div",gQ,[...n[3]||(n[3]=[c.createElementVNode("div",{class:"apf-image-generate__spinner"},null,-1),c.createElementVNode("span",null,"正在生成图片...",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",IQ,[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)])):C.imageUrl?(c.openBlock(),c.createElementBlock("div",{key:2,class:"apf-image-generate__image-wrap",onClick:e},[c.createElementVNode("img",{src:C.imageUrl,class:"apf-image-generate__image",alt:"AI generated image"},null,8,CQ),c.createElementVNode("div",AQ,[c.createVNode(c.unref($),{name:"full-screen",size:16}),n[4]||(n[4]=c.createElementVNode("span",null,"点击放大",-1))])])):(c.openBlock(),c.createElementBlock("div",iQ,[c.createVNode(c.unref($),{name:"picture",size:32}),n[5]||(n[5]=c.createElementVNode("span",null,"等待生成",-1))]))]),C.size||C.imageStyle||C.quality?(c.openBlock(),c.createElementBlock("div",lQ,[C.size?(c.openBlock(),c.createElementBlock("span",eQ,[c.createVNode(c.unref($),{name:"full-screen",size:12}),c.createTextVNode(" "+c.toDisplayString(C.size),1)])):c.createCommentVNode("",!0),C.imageStyle?(c.openBlock(),c.createElementBlock("span",tQ,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(a[C.imageStyle]??C.imageStyle),1)])):c.createCommentVNode("",!0),C.quality?(c.openBlock(),c.createElementBlock("span",aQ,[c.createVNode(c.unref($),{name:"picture",size:12}),c.createTextVNode(" "+c.toDisplayString(d[C.quality]??C.quality),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!C.loading&&C.imageUrl?(c.openBlock(),c.createElementBlock("div",cQ,[c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn apf-image-generate__btn--primary",onClick:l},[c.createVNode(c.unref($),{name:"download",size:14}),n[6]||(n[6]=c.createTextVNode(" 下载图片 ",-1))]),c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn",onClick:n[0]||(n[0]=s=>A("regenerate"))},[c.createVNode(c.unref($),{name:"refresh",size:14}),n[7]||(n[7]=c.createTextVNode(" 重新生成 ",-1))])])):c.createCommentVNode("",!0)]),i.value&&C.imageUrl?(c.openBlock(),c.createBlock(c.unref(BC.ElImageViewer),{key:0,"url-list":[C.imageUrl],"initial-index":0,"close-on-press-escape":!0,teleported:"",onClose:t},null,8,["url-list"])):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-7f771b7c"]]),oQ=P(c.defineComponent({__name:"SchemaFormPreview",props:{fields:{},title:{default:"生成的表单"},compact:{type:Boolean,default:!1},labelWidth:{default:"100px"},labelPosition:{default:"right"},primaryActionLabel:{default:"确认发布"},showPrimaryAction:{type:Boolean}},emits:["click","primary-action"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.showPrimaryAction!==void 0?g.showPrimaryAction:!g.compact);return(l,e)=>{const t=c.resolveComponent("el-input"),a=c.resolveComponent("el-form-item"),d=c.resolveComponent("el-option"),o=c.resolveComponent("el-select"),n=c.resolveComponent("el-checkbox"),s=c.resolveComponent("el-checkbox-group"),Z=c.resolveComponent("el-radio"),m=c.resolveComponent("el-radio-group"),b=c.resolveComponent("el-switch"),G=c.resolveComponent("el-date-picker"),r=c.resolveComponent("el-time-picker"),h=c.resolveComponent("el-button"),u=c.resolveComponent("el-input-number"),B=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([l.$style.previewCard,{[l.$style.compact]:C.compact}]),onClick:e[1]||(e[1]=W=>A("click"))},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerIcon)},[c.createVNode(c.unref($),{name:"grid",size:14})],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerRight)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.badge)},c.toDisplayString(C.fields.length)+" 个字段",3),c.createElementVNode("span",{class:c.normalizeClass(l.$style.viewHint)},[c.createVNode(c.unref($),{name:"view",size:12}),e[2]||(e[2]=c.createTextVNode(" 预览 ",-1))],2)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.previewBody)},[c.createVNode(B,{"label-width":C.labelWidth,"label-position":C.labelPosition,class:c.normalizeClass(l.$style.form)},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,W=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:W.id},[["input","email","phone","password"].includes(W.type)?(c.openBlock(),c.createBlock(a,{key:0,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder,clearable:W.clearable,"show-password":W.showPassword,maxlength:W.maxlength,disabled:C.compact,size:"default"},null,8,["placeholder","clearable","show-password","maxlength","disabled"])]),_:2},1032,["label","class"])):W.type==="textarea"?(c.openBlock(),c.createBlock(a,{key:1,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{type:"textarea",placeholder:W.placeholder,rows:3,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="select"?(c.openBlock(),c.createBlock(a,{key:2,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(o,{placeholder:W.placeholder,clearable:W.clearable,disabled:C.compact,style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(d,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","clearable","disabled"])]),_:2},1032,["label","class"])):W.type==="checkbox"?(c.openBlock(),c.createBlock(a,{key:3,label:W.label||void 0,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(s,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(n,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="radio"?(c.openBlock(),c.createBlock(a,{key:4,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(m,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(Z,{key:String(w.value),value:w.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="switch"?(c.openBlock(),c.createBlock(a,{key:5,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(b,{disabled:C.compact},null,8,["disabled"])]),_:1},8,["label","class"])):W.type==="date-picker"||W.type==="datepicker"?(c.openBlock(),c.createBlock(a,{key:6,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(G,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="time-picker"||W.type==="timepicker"?(c.openBlock(),c.createBlock(a,{key:7,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(r,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="button"?(c.openBlock(),c.createBlock(a,{key:8,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(h,{type:W.buttonType??"default",disabled:C.compact},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(W.buttonText??W.label??"按钮"),1)]),_:2},1032,["type","disabled"])]),_:2},1032,["class"])):W.type==="number"?(c.openBlock(),c.createBlock(a,{key:9,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(u,{disabled:C.compact,style:{width:"100%"}},null,8,["disabled"])]),_:1},8,["label","class"])):(c.openBlock(),c.createBlock(a,{key:10,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder||W.type,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"]))],64))),128))]),_:1},8,["label-width","label-position","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.actions)},[c.createVNode(h,{class:c.normalizeClass(l.$style.btnPrimary),type:"primary",onClick:e[0]||(e[0]=c.withModifiers(W=>A("primary-action"),["stop"]))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryActionLabel),1)]),_:1},8,["class"])],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{previewCard:"_previewCard_18hnt_2",compact:"_compact_18hnt_16",header:"_header_18hnt_21",headerLeft:"_headerLeft_18hnt_30",headerIcon:"_headerIcon_18hnt_36",title:"_title_18hnt_47",headerRight:"_headerRight_18hnt_53",badge:"_badge_18hnt_59",viewHint:"_viewHint_18hnt_67",previewBody:"_previewBody_18hnt_79",form:"_form_18hnt_83",formItem:"_formItem_18hnt_87",actions:"_actions_18hnt_95",btnOutline:"_btnOutline_18hnt_105",btnPrimary:"_btnPrimary_18hnt_127"}}]]),nQ=P(c.defineComponent({__name:"WorkflowRunTimeline",props:{title:{},status:{},progressText:{},steps:{},defaultCollapsed:{type:Boolean,default:!1},emptyText:{default:"等待首个节点开始…"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed);c.watch(()=>I.status,a=>{a==="running"&&(g.value=!1)});const A={running:"loading",success:"circle-check",error:"circle-close-filled",waiting:"clock",skipped:"minus",pending:"more-filled"},i=c.computed(()=>{const a=I.status;return a?`status${a.charAt(0).toUpperCase()}${a.slice(1)}`:""});function l(a){return`icon${a.charAt(0).toUpperCase()}${a.slice(1)}`}function e(a){return A[a]??"more-filled"}function t(){g.value=!g.value}return(a,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([a.$style.block,a.$style[i.value]])},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(a.$style.header),onClick:t},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.headerLeft)},[c.createVNode(c.unref($),{name:g.value?"arrow-right":"arrow-down",size:12,class:c.normalizeClass(a.$style.chevron)},null,8,["name","class"]),c.createElementVNode("span",{class:c.normalizeClass(a.$style.title)},c.toDisplayString(C.title),3)],2),C.progressText?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.progress)},c.toDisplayString(C.progressText),3)):c.createCommentVNode("",!0)],2),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.timeline)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(o,n)=>(c.openBlock(),c.createElementBlock("div",{key:o.id,class:c.normalizeClass([a.$style.item,o.status==="running"&&a.$style.itemRunning,o.streaming&&a.$style.itemStreaming])},[c.createElementVNode("div",{class:c.normalizeClass(a.$style.rail)},[c.createElementVNode("span",{class:c.normalizeClass([a.$style.iconWrap,a.$style[l(o.status)]])},[c.createVNode(c.unref($),{name:e(o.status),size:14,class:c.normalizeClass(o.status==="running"?a.$style.spin:void 0)},null,8,["name","class"])],2),n<C.steps.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.connector)},null,2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(a.$style.body)},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.nodeName)},c.toDisplayString(o.label),3),o.hint?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.nodeHint)},c.toDisplayString(o.hint),3)):c.createCommentVNode("",!0),c.renderSlot(a.$slots,"step",{step:o})],2)],2))),128)),C.steps.length?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.empty)},c.toDisplayString(C.emptyText),3))],2))],2))}}),[["__cssModules",{$style:{block:"_block_2l73c_2",statusRunning:"_statusRunning_2l73c_10",statusError:"_statusError_2l73c_14",statusWaiting:"_statusWaiting_2l73c_18",header:"_header_2l73c_22",headerLeft:"_headerLeft_2l73c_39",chevron:"_chevron_2l73c_46",title:"_title_2l73c_51",progress:"_progress_2l73c_60",timeline:"_timeline_2l73c_66",item:"_item_2l73c_70",itemRunning:"_itemRunning_2l73c_76",nodeName:"_nodeName_2l73c_76",itemStreaming:"_itemStreaming_2l73c_81",iconWrap:"_iconWrap_2l73c_81",rail:"_rail_2l73c_85",iconSuccess:"_iconSuccess_2l73c_104",iconError:"_iconError_2l73c_109",iconRunning:"_iconRunning_2l73c_114",iconWaiting:"_iconWaiting_2l73c_119",iconSkipped:"_iconSkipped_2l73c_124",spin:"_spin_2l73c_129",connector:"_connector_2l73c_138",body:"_body_2l73c_146",nodeHint:"_nodeHint_2l73c_160",empty:"_empty_2l73c_166"}}]]),sQ=["tabindex","aria-label"],ZQ=P(c.defineComponent({__name:"SuggestionCard",props:{suggestion:{},accepted:{type:Boolean},dismissed:{type:Boolean}},emits:["accept","dismiss"],setup(C,{emit:I}){const g=C,A=I,i={action:{icon:"promotion",label:"操作",color:"#409EFF"},optimization:{icon:"magic-stick",label:"优化",color:"#E6A23C"},reference:{icon:"document",label:"参考",color:"#67C23A"}},l={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#909399",bgColor:"#f4f4f5"}},e=c.computed(()=>i[g.suggestion.type]??i.action),t=c.computed(()=>l[g.suggestion.priority]??l.medium),a=c.computed(()=>!g.accepted&&!g.dismissed);function d(){a.value&&A("accept",g.suggestion.id)}function o(){a.value&&A("dismiss",g.suggestion.id)}function n(s){a.value&&(s.key==="Enter"||s.key===" "?(s.preventDefault(),d()):s.key==="Escape"&&(s.preventDefault(),o()))}return(s,Z)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([s.$style.card,C.accepted&&s.$style.accepted,C.dismissed&&s.$style.dismissed]),tabindex:a.value?0:-1,role:"article","aria-label":`建议: ${C.suggestion.title}`,onKeydown:n},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.typeBadge),style:c.normalizeStyle({color:e.value.color})},[c.createVNode(c.unref($),{name:e.value.icon,size:14},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(e.value.label),1)],6),c.createElementVNode("div",{class:c.normalizeClass(s.$style.priorityBadge),style:c.normalizeStyle({color:t.value.color,background:t.value.bgColor})},c.toDisplayString(t.value.label)+"优先 ",7)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.title)},c.toDisplayString(C.suggestion.title),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.description)},c.toDisplayString(C.suggestion.description),3),C.suggestion.targetName?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.target)},[c.createVNode(c.unref($),{name:"connection",size:12}),c.createElementVNode("span",null,c.toDisplayString(C.suggestion.targetName),1)],2)):c.createCommentVNode("",!0)],2),a.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(s.$style.acceptBtn),type:"button",onClick:d},[c.createVNode(c.unref($),{name:"check",size:14}),Z[0]||(Z[0]=c.createTextVNode(" 采纳 ",-1))],2),c.createElementVNode("button",{class:c.normalizeClass(s.$style.dismissBtn),type:"button",onClick:o},[c.createVNode(c.unref($),{name:"close",size:14}),Z[1]||(Z[1]=c.createTextVNode(" 忽略 ",-1))],2)],2)):c.createCommentVNode("",!0),C.accepted?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.statusBadge)},[c.createVNode(c.unref($),{name:"check",size:14}),Z[2]||(Z[2]=c.createTextVNode(" 已采纳 ",-1))],2)):c.createCommentVNode("",!0),C.dismissed?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([s.$style.statusBadge,s.$style.statusDismissed])},[c.createVNode(c.unref($),{name:"close",size:14}),Z[3]||(Z[3]=c.createTextVNode(" 已忽略 ",-1))],2)):c.createCommentVNode("",!0)],42,sQ))}}),[["__cssModules",{$style:{card:"_card_69ko9_2",accepted:"_accepted_69ko9_21",dismissed:"_dismissed_69ko9_31",header:"_header_69ko9_36",typeBadge:"_typeBadge_69ko9_43",priorityBadge:"_priorityBadge_69ko9_51",body:"_body_69ko9_58",title:"_title_69ko9_62",description:"_description_69ko9_69",target:"_target_69ko9_75",actions:"_actions_69ko9_84",acceptBtn:"_acceptBtn_69ko9_91",dismissBtn:"_dismissBtn_69ko9_92",statusBadge:"_statusBadge_69ko9_132",statusDismissed:"_statusDismissed_69ko9_144"}}]]),mQ=["onClick"],bQ=P(c.defineComponent({__name:"ConversationSearchBar",props:{modelValue:{},searching:{type:Boolean,default:!1},panelVisible:{type:Boolean,default:!1},results:{},total:{default:0},sourceOptions:{},sourceFilter:{default:""},startDate:{default:""},endDate:{default:""},filtersExpanded:{type:Boolean,default:!1},placeholder:{default:"搜索对话..."}},emits:["update:modelValue","update:sourceFilter","update:startDate","update:endDate","update:filtersExpanded","update:panelVisible","select","clear","search"],setup(C,{emit:I}){const g=[{value:"",label:"全部来源"},{value:"editor",label:"Editor"},{value:"flow",label:"Flow"},{value:"standalone",label:"AI"}],A=C,i=I,l=c.computed(()=>A.sourceOptions??g),e=c.computed(()=>A.startDate!==""||A.endDate!==""||A.sourceFilter!=="");function t(m){const b=new Date(m),G=r=>String(r).padStart(2,"0");return`${b.getFullYear()}${G(b.getMonth()+1)}${G(b.getDate())} ${G(b.getHours())}${G(b.getMinutes())}${G(b.getSeconds())}`}function a(m){if(!m)return"AI";const b=l.value.find(G=>G.value===m);return b!=null&&b.label?b.label:m==="editor"?"Editor":m==="flow"?"Flow":"AI"}function d(m){return m==="editor"?"success":m==="flow"?"primary":"warning"}function o(){i("update:modelValue",""),i("update:startDate",""),i("update:endDate",""),i("update:sourceFilter",""),i("update:panelVisible",!1),i("clear")}function n(m){i("select",m)}function s(){i("update:filtersExpanded",!A.filtersExpanded)}function Z(m,b){const G=b??"";i(m==="start"?"update:startDate":"update:endDate",G)}return(m,b)=>{const G=c.resolveComponent("el-input"),r=c.resolveComponent("el-button"),h=c.resolveComponent("el-option"),u=c.resolveComponent("el-select"),B=c.resolveComponent("el-date-picker"),W=c.resolveComponent("el-popover"),w=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(m.$style.root)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.searchRow)},[c.createVNode(G,{"model-value":C.modelValue,placeholder:C.placeholder,size:"small",clearable:"","onUpdate:modelValue":b[0]||(b[0]=Y=>i("update:modelValue",Y)),onClear:o,onKeyup:b[1]||(b[1]=c.withKeys(Y=>i("search"),["enter"]))},{prefix:c.withCtx(()=>[c.createVNode(c.unref($),{name:"search",size:14})]),_:1},8,["model-value","placeholder"]),c.createVNode(W,{visible:C.filtersExpanded,placement:"bottom-end",width:220,trigger:"click","show-arrow":!1,offset:4},{reference:c.withCtx(()=>[c.createVNode(r,{size:"small",type:e.value?"primary":"default",link:!e.value,onClick:s},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"filter",size:14})]),_:1},8,["type","link"])]),default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterPanel)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"来源",2),c.createVNode(u,{"model-value":C.sourceFilter,size:"small",placeholder:"全部",style:{flex:"1"},"onUpdate:modelValue":b[2]||(b[2]=Y=>i("update:sourceFilter",Y))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,Y=>(c.openBlock(),c.createBlock(h,{key:Y.value,label:Y.label,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])],2),c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"时间",2),c.createVNode(B,{"model-value":C.startDate||null,type:"date",placeholder:"开始",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[3]||(b[3]=Y=>Z("start",Y))},null,8,["model-value"]),c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterSep)},"~",2),c.createVNode(B,{"model-value":C.endDate||null,type:"date",placeholder:"结束",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[4]||(b[4]=Y=>Z("end",Y))},null,8,["model-value"])],2)],2)]),_:1},8,["visible"])],2),C.panelVisible?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.results)},[C.searching?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.empty)},"搜索中...",2)):C.results.length>0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.resultCount)},"找到 "+c.toDisplayString(C.total)+" 条结果",3),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.results,Y=>(c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass(m.$style.resultItem),onClick:p=>n(Y.id)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.resultTitle)},c.toDisplayString(Y.title),3),c.createVNode(w,{type:d(Y.source),size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a(Y.source)),1)]),_:2},1032,["type"]),Y.updatedAt?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(m.$style.resultTime)},c.toDisplayString(t(Y.updatedAt)),3)):c.createCommentVNode("",!0)],10,mQ))),128))],64)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(m.$style.empty)},"无匹配对话",2))],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{root:"_root_x8tmk_2",searchRow:"_searchRow_x8tmk_8",filterPanel:"_filterPanel_x8tmk_16",filterRow:"_filterRow_x8tmk_22",filterLabel:"_filterLabel_x8tmk_28",filterSep:"_filterSep_x8tmk_35",results:"_results_x8tmk_40",resultCount:"_resultCount_x8tmk_46",resultItem:"_resultItem_x8tmk_53",resultTitle:"_resultTitle_x8tmk_71",resultTime:"_resultTime_x8tmk_82",empty:"_empty_x8tmk_88"}}]]),GQ={class:"apf-task-chain"},rQ={class:"apf-task-chain__label"},hQ={class:"apf-task-chain__steps"},uQ=["data-step"],BQ={class:"apf-task-chain__icon"},WQ={class:"apf-task-chain__agent"},wQ={class:"apf-task-chain__desc"},YQ={key:0,class:"apf-task-chain__arrow"},VQ=P(c.defineComponent({__name:"TaskChainBar",props:{steps:{},currentIndex:{},label:{default:"任务链"}},setup(C){const I=C,g=c.ref();function A(l){switch(l){case"done":return"✓";case"running":return"●";case"skipped":return"○";case"error":return"!";default:return"○"}}function i(l){return l==="editor"?"表单":l==="flow"?"流程":l==="page"?"页面":l}return c.watch(()=>I.currentIndex,()=>{c.nextTick(()=>{const l=g.value;if(!l)return;const t=l.querySelectorAll("[data-step]")[I.currentIndex];t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}),(l,e)=>(c.openBlock(),c.createElementBlock("div",GQ,[c.createElementVNode("div",rQ,c.toDisplayString(C.label),1),c.createElementVNode("div",{ref_key:"scrollbarRef",ref:g,class:"apf-task-chain__scroll"},[c.createElementVNode("div",hQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[c.createElementVNode("div",{"data-step":a,class:c.normalizeClass(["apf-task-chain__step",[t.status?`is-${t.status}`:"is-pending",{"is-current":a===C.currentIndex}]])},[c.createElementVNode("span",BQ,c.toDisplayString(A(t.status)),1),c.createElementVNode("span",WQ,c.toDisplayString(i(t.agent)),1),c.createElementVNode("span",wQ,c.toDisplayString(t.description),1)],10,uQ),a<C.steps.length-1?(c.openBlock(),c.createElementBlock("div",YQ,"→")):c.createCommentVNode("",!0)],64))),128))])],512)]))}}),[["__scopeId","data-v-31bc7b98"]]),pQ={class:"apf-rag-panel"},yQ={class:"apf-rag-panel__header"},NQ=["value","placeholder"],XQ={key:0,class:"apf-rag-panel__spinner","aria-label":"加载中"},RQ={key:0,class:"apf-rag-panel__chips"},HQ={class:"apf-rag-panel__chip-name"},SQ=["onClick"],MQ={class:"apf-rag-panel__list"},DQ=["onClick"],KQ={class:"apf-rag-panel__info"},FQ={class:"apf-rag-panel__name"},zQ={key:0,class:"apf-rag-panel__desc"},JQ={key:1,class:"apf-rag-panel__tags"},vQ={key:0,class:"apf-rag-panel__tag"},kQ={key:1,class:"apf-rag-panel__empty"},LQ={key:2,class:"apf-rag-panel__empty"},TQ={class:"apf-rag-panel__footer"},xQ=P(c.defineComponent({__name:"RagContextPanel",props:{results:{},selected:{},loading:{type:Boolean,default:!1},query:{default:""},placeholder:{default:"智能匹配 Schema,如:用户注册表单..."},emptyHint:{default:"未找到匹配的 Schema"},idleHint:{default:"输入自然语言描述,智能匹配已有 Schema"},footerHint:{default:"选择 Schema 注入对话上下文"},selectedFooterHint:{default:"已选 {n} 个 Schema 作为上下文"}},emits:["update:query","search","select","remove","close"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.query);c.watch(()=>g.query,o=>{o!==i.value&&(i.value=o)});function l(o){i.value=o,A("update:query",o),A("search",o)}function e(o){return g.selected.some(n=>n.id===o.id)}function t(o){e(o)||A("select",o)}function a(o){return o>=70?"high":o>=40?"medium":"low"}const d=c.computed(()=>g.selected.length>0?g.selectedFooterHint.replace("{n}",String(g.selected.length)):g.footerHint);return(o,n)=>(c.openBlock(),c.createElementBlock("div",pQ,[c.createElementVNode("div",yQ,[n[2]||(n[2]=c.createElementVNode("svg",{class:"apf-rag-panel__icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[c.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),c.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),c.createElementVNode("input",{class:"apf-rag-panel__input",value:i.value,placeholder:C.placeholder,onInput:n[0]||(n[0]=s=>l(s.target.value))},null,40,NQ),C.loading?(c.openBlock(),c.createElementBlock("span",XQ)):c.createCommentVNode("",!0)]),C.selected.length>0?(c.openBlock(),c.createElementBlock("div",RQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.selected,s=>(c.openBlock(),c.createElementBlock("span",{key:s.id,class:"apf-rag-panel__chip"},[c.createElementVNode("span",HQ,c.toDisplayString(s.name),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__chip-remove",title:"移除",onClick:Z=>A("remove",s.id)}," × ",8,SQ)]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",MQ,[C.results.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(C.results,s=>{var Z;return c.openBlock(),c.createElementBlock("button",{key:s.id,type:"button",class:c.normalizeClass(["apf-rag-panel__item",{"is-selected":e(s)}]),onClick:m=>t(s)},[c.createElementVNode("div",{class:c.normalizeClass(["apf-rag-panel__score",`is-${a(s.score)}`])},c.toDisplayString(s.score),3),c.createElementVNode("div",KQ,[c.createElementVNode("div",FQ,c.toDisplayString(s.name),1),s.description?(c.openBlock(),c.createElementBlock("div",zQ,c.toDisplayString(s.description),1)):c.createCommentVNode("",!0),(Z=s.tags)!=null&&Z.length?(c.openBlock(),c.createElementBlock("div",JQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.tags.slice(0,5),m=>(c.openBlock(),c.createElementBlock("span",{key:m,class:"apf-rag-panel__tag"},c.toDisplayString(m),1))),128)),s.tags.length>5?(c.openBlock(),c.createElementBlock("span",vQ," +"+c.toDisplayString(s.tags.length-5),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])],10,DQ)}),128)):!C.loading&&i.value.trim()?(c.openBlock(),c.createElementBlock("div",kQ,[n[3]||(n[3]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"⌕",-1)),c.createElementVNode("div",null,c.toDisplayString(C.emptyHint),1)])):C.loading?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",LQ,[n[4]||(n[4]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"✦",-1)),c.createElementVNode("div",null,c.toDisplayString(C.idleHint),1)]))]),c.createElementVNode("div",TQ,[c.createElementVNode("span",null,c.toDisplayString(d.value),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__close",onClick:n[1]||(n[1]=s=>A("close"))},"关闭")])]))}}),[["__scopeId","data-v-c6864f2d"]]),fQ={class:"apf-assistant-picker"},jQ={key:0,class:"apf-assistant-picker__state"},QQ={key:1,class:"apf-assistant-picker__state apf-assistant-picker__state--error"},UQ={key:2,class:"apf-assistant-picker__state"},OQ=["onClick"],EQ={class:"apf-assistant-picker__main"},PQ={class:"apf-assistant-picker__icon-wrap"},_Q={class:"apf-assistant-picker__info"},qQ={class:"apf-assistant-picker__caps"},$Q=P(c.defineComponent({__name:"AssistantPicker",props:{items:{},modelValue:{},loading:{type:Boolean,default:!1},error:{default:null}},emits:["update:modelValue","select"],setup(C,{emit:I}){const g=C,A=I;function i(a){var o,n;const d=["文本"];return(o=a.supportedInputs)!=null&&o.includes("file")&&d.push("文件"),(n=a.supportedInputs)!=null&&n.includes("image")&&d.push("图片"),a.hitlCapable&&d.push("需要确认"),d}function l(a){return a.icon||"chat-dot-round"}function e(a){A("update:modelValue",a.id),A("select",a)}const t=c.computed(()=>!g.loading&&!g.error&&!g.items.length);return(a,d)=>(c.openBlock(),c.createElementBlock("div",fQ,[C.loading?(c.openBlock(),c.createElementBlock("div",jQ,[...d[0]||(d[0]=[c.createElementVNode("p",null,"正在加载智能体…",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",QQ,[c.createElementVNode("p",null,c.toDisplayString(C.error),1)])):t.value?(c.openBlock(),c.createElementBlock("div",UQ,[...d[1]||(d[1]=[c.createElementVNode("p",null,"暂无可用智能体",-1)])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.items,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:c.normalizeClass(["apf-assistant-picker__item",{"is-active":C.modelValue===o.id}]),onClick:n=>e(o)},[c.createElementVNode("div",EQ,[c.createElementVNode("span",PQ,[c.createVNode(c.unref($),{name:l(o),size:22},null,8,["name"])]),c.createElementVNode("span",_Q,[c.createElementVNode("b",null,c.toDisplayString(o.name),1),c.createElementVNode("small",null,c.toDisplayString(o.description||"适合处理一类明确任务"),1),c.createElementVNode("span",qQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i(o),n=>(c.openBlock(),c.createElementBlock("span",{key:n,class:c.normalizeClass(["apf-assistant-picker__cap",{"is-confirm":n==="需要确认"}])},c.toDisplayString(n),3))),128))])])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-assistant-picker__choose",{"is-selected":C.modelValue===o.id}])},c.toDisplayString(C.modelValue===o.id?"已选择":"开始使用"),3)],10,OQ))),128))]))}}),[["__scopeId","data-v-f05e69c0"]]),gU={class:"apf-model-picker"},IU=P(c.defineComponent({__name:"ModelPicker",props:{models:{},modelValue:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-option"),e=c.resolveComponent("el-select");return c.openBlock(),c.createElementBlock("label",gU,[c.createVNode(e,{"model-value":C.modelValue||void 0,disabled:C.loading||!C.models.length,placeholder:"选择模型","onUpdate:modelValue":i[0]||(i[0]=t=>g("update:modelValue",t))},{default:c.withCtx(()=>[C.loading?(c.openBlock(),c.createBlock(l,{key:0,label:"正在加载模型…",value:"",disabled:""})):C.models.length?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(l,{key:1,label:"暂无可用模型",value:"",disabled:""})),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.models,t=>(c.openBlock(),c.createBlock(l,{key:t.id,label:`${t.name} · ${t.provider}`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","disabled"])])}}}),[["__scopeId","data-v-483ae73d"]]);function CU(C){const{containerRef:I,autoScroll:g=!0,behavior:A="smooth",offset:i=50}=C,l=c.ref(!0),e=c.ref(g);function t(){const Z=I.value;if(!Z)return!0;const{scrollTop:m,scrollHeight:b,clientHeight:G}=Z;return b-m-G<i}async function a(Z=!0){if(!Z&&!e.value)return;await c.nextTick();const m=I.value;m&&m.scrollTo({top:m.scrollHeight,behavior:A})}function d(Z){const m=I.value;m&&m.scrollTo({top:Z,behavior:A})}function o(){e.value=!0}function n(){e.value=!1}function s(){l.value=t(),l.value&&(e.value=!0)}return c.onMounted(()=>{const Z=I.value;Z&&(Z.addEventListener("scroll",s),l.value=t())}),c.onUnmounted(()=>{const Z=I.value;Z&&Z.removeEventListener("scroll",s)}),{scrollToBottom:a,scrollTo:d,isAtBottom:l,autoScrollEnabled:e,checkIfAtBottom:t,enableAutoScroll:o,disableAutoScroll:n}}const Cw=Symbol("fg-toast");function AU(C){return{[Cw]:C}}function iU(){const C=c.inject(Cw);return{show(I,g="info",A){var i;(i=C==null?void 0:C.value)==null||i.show(I,g,A)},info(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"info",g)},success(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"success",g)},warning(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"warning",g)},error(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"error",g)}}}function lU(){async function C(A,i={}){const{title:l="确认操作",type:e="warning",confirmButtonText:t="确定",cancelButtonText:a="取消"}=i;try{return await BC.ElMessageBox.confirm(A,l,{confirmButtonText:t,cancelButtonText:a,type:e}),!0}catch{return!1}}async function I(A,i={}){return C(`此操作将永久删除${A},是否继续?`,{title:"确认删除",type:"warning",confirmButtonText:"确认删除",...i})}async function g(A,i={}){return C(A,{title:"确认操作",type:"warning",...i})}return{confirm:C,confirmDelete:I,confirmDanger:g}}function eU(){return{success(C,I={}){BC.ElMessage({message:C,type:"success",...I})},error(C,I={}){BC.ElMessage({message:C,type:"error",...I})},warning(C,I={}){BC.ElMessage({message:C,type:"warning",...I})},info(C,I={}){BC.ElMessage({message:C,type:"info",...I})}}}function tU(C,I=300){const g=c.ref(null);function A(...i){g.value&&clearTimeout(g.value),g.value=setTimeout(()=>{C(...i),g.value=null},I)}return c.onUnmounted(()=>{g.value&&clearTimeout(g.value)}),A}function aU(C,I){var t;const g=c.ref(1),A=c.ref((I==null?void 0:I.initialPageSize)??FZ),i=c.computed(()=>{const a=C.value,d=(g.value-1)*A.value;return a.slice(d,d+A.value)}),l=c.computed(()=>C.value.length);function e(){g.value=1}return c.watch(A,()=>{g.value=1},{flush:"sync"}),c.watch(C,a=>{const d=Math.max(1,Math.ceil(a.length/A.value)||1);g.value>d&&(g.value=d)}),(t=I==null?void 0:I.resetOn)!=null&&t.length&&c.watch(I.resetOn,()=>{e()}),{currentPage:g,pageSize:A,pagedItems:i,total:l,resetPage:e}}function cU(C={}){const{timeout:I=15e3,silentError:g=!1}=C,A=c.ref(!1),i=c.ref(null),l=c.ref(!1),e=c.computed(()=>i.value!==null);let t=null,a=0;function d(){a++,a===1&&(A.value=!0,i.value=null,l.value=!1,t=setTimeout(()=>{l.value=!0},I))}function o(){a=Math.max(0,a-1),a===0&&(A.value=!1,l.value=!1,t&&(clearTimeout(t),t=null))}async function n(Z){d();try{return await Z()}catch(m){return g||(i.value=m instanceof Error?m.message:"加载失败"),null}finally{o()}}function s(){a=0,A.value=!1,i.value=null,l.value=!1,t&&(clearTimeout(t),t=null)}return{loading:A,error:i,timedOut:l,hasError:e,withLoading:n,reset:s}}const am=new Map;function dU(C){const{url:I,token:g,projectId:A,reconnectInterval:i=3e3,maxRetries:l=1/0}=C;let e=am.get(I);e||(e={ws:null,status:c.ref("closed"),refCount:0,handlers:new Map,subscribedProjects:new Set,reconnectTimer:null,pingTimer:null,pongTimer:null,retries:0,reconnectInterval:i,maxRetries:l,intentionalClose:!1,token:g},am.set(I,e)),e.refCount+=1,e.reconnectInterval=i,e.maxRetries=l,e.token=g;const t=[],a=e.status,d=()=>c.toValue(A);function o(){e&&(e.pingTimer&&clearInterval(e.pingTimer),e.pongTimer&&clearTimeout(e.pongTimer),e.pingTimer=null,e.pongTimer=null)}function n(){e&&(o(),e.pingTimer=setInterval(()=>{!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN||(e.ws.send(JSON.stringify({action:"ping"})),e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=setTimeout(()=>{var B;(B=e==null?void 0:e.ws)==null||B.close()},6e4))},3e4))}function s(){if(!e||e.intentionalClose)return;if(e.retries>=e.maxRetries){e.status.value="error";return}const B=Math.min(e.reconnectInterval*2**e.retries,3e4);e.retries+=1,e.reconnectTimer&&clearTimeout(e.reconnectTimer),e.reconnectTimer=setTimeout(()=>{G()},B)}function Z(B){if(!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN)return;const W={action:"subscribe",project_id:B??null},w=typeof e.token=="function"?e.token():e.token;if(w&&(W.token=w),!e.subscribedProjects.has(B??null)){if(B==null){e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(null);return}e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(B)}}function m(){if(!e)return;e.subscribedProjects.clear();const B=new Set;let W=!1;for(const Y of e.handlers.values())for(const p of Y){const V=p.getProjectId();V==null?W=!0:B.add(V)}const w=d();w==null?W=!0:B.add(w),W&&Z(void 0);for(const Y of B)Z(Y)}function b(B){if(!e)return;const W=e.handlers.get(B.type);if(W)for(const w of W){const Y=w.getProjectId();Y!=null&&Y!==B.project_id||w.handler(B.data)}}function G(){if(!e)return;if(e.ws&&(e.ws.readyState===WebSocket.OPEN||e.ws.readyState===WebSocket.CONNECTING)){e.ws.readyState===WebSocket.OPEN&&Z(d());return}e.intentionalClose=!1,e.status.value="connecting";const B=new WebSocket(I);e.ws=B,B.onopen=()=>{e&&(e.status.value="open",e.retries=0,n(),m())},B.onmessage=W=>{if(e)try{const w=JSON.parse(String(W.data));if(w.action==="pong"||w.type==="pong"){e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=null;return}typeof w.type=="string"&&b(w)}catch{}},B.onerror=()=>{e&&(e.status.value="error")},B.onclose=()=>{e&&(o(),e.ws=null,e.subscribedProjects.clear(),e.intentionalClose?e.status.value="closed":(e.status.value="closed",s()))}}function r(){if(e){for(const B of t)for(const W of e.handlers.values())W.delete(B);t.length=0}}function h(){var B;e&&(r(),e.refCount=Math.max(0,e.refCount-1),!(e.refCount>0)&&(e.intentionalClose=!0,e.reconnectTimer&&clearTimeout(e.reconnectTimer),o(),(B=e.ws)==null||B.close(),e.ws=null,e.status.value="closed",am.delete(I),e=void 0))}function u(B,W){var p;if(!e)return()=>{};let w=e.handlers.get(B);w||(w=new Set,e.handlers.set(B,w));const Y={getProjectId:d,handler:W};return w.add(Y),t.push(Y),((p=e.ws)==null?void 0:p.readyState)===WebSocket.OPEN&&Z(d()),()=>{w==null||w.delete(Y);const V=t.indexOf(Y);V>=0&&t.splice(V,1)}}return G(),c.watch(d,B=>{var W;((W=e==null?void 0:e.ws)==null?void 0:W.readyState)===WebSocket.OPEN&&Z(B)}),c.onUnmounted(()=>{h()}),{status:a,connect:G,disconnect:h,on:u}}function oU(C){if(!C)return"操作失败";if(typeof C=="string")return C;if(C instanceof Error)return C.message||"操作失败";if(typeof C=="object"){const I=C;if(I.message)return I.message;if(I.errors&&typeof I.errors=="object"){const g=[];for(const A of Object.values(I.errors))Array.isArray(A)&&g.push(...A);if(g.length>0)return g.join(";")}if(I.code)return`错误码:${I.code}`}return"操作失败"}const nU=/\/(?:schema-platform\/)?api\/ai\/documents\/([^/?#]+)\/file/i,Aw=/\.(mp4|webm|mov|m4v)(?:\?|#|$|\s)/i,sU=/\.(png|jpe?g|gif|webp|bmp|svg)(?:\?|#|$|\s)/i,cm=/\.pdf(?:\?|#|$|\s)/i,dm=/\.(docx?|xlsx?|csv|txt|md)(?:\?|#|$|\s)/i,iw=/(?:https?:\/\/[^\s"'<>\]]+|\/(?:schema-platform\/)?api\/ai\/documents\/[^/\s"'<>\]]+\/file)/gi;function xe(C){const I=C.trim().match(nU);if(I!=null&&I[1])return I[1];if(/^[0-9a-f]{24}$/i.test(C.trim()))return C.trim()}function hl(C){const{url:I="",filename:g="",mimetype:A="",hint:i}=C;if(i==="video"||i==="videoUrl")return"video";if(i==="image"||i==="imageUrls")return"image";if(i==="text")return"text";if(i==="json")return"json";if(i==="document"||i==="documentIds"){const t=g||I;return cm.test(t)||A.includes("pdf")?"pdf":dm.test(t)||/word|sheet|excel|csv|text/.test(A)?"office":"file"}const l=[I,g].filter(Boolean).join(" ").toLowerCase(),e=A.toLowerCase();return e.startsWith("video/")||Aw.test(l)?"video":e.startsWith("image/")||sU.test(l)?"image":e.includes("pdf")||cm.test(l)?"pdf":dm.test(l)||e.includes("word")||e.includes("sheet")||e.includes("excel")||e.includes("csv")||e.startsWith("text/")?"office":xe(I)&&!cm.test(I)&&!dm.test(I)&&!Aw.test(I)?"image":"file"}function ZU(C){var I;return C.documentId?`doc:${C.documentId}`:C.url?`url:${C.url}`:`${C.kind}:${((I=C.text)==null?void 0:I.slice(0,40))??C.id}`}function VA(C,I,g){const A=ZU(g);!A||I.has(A)||(I.add(A),C.push(g))}function om(C){const I=Wi(C);if(!I)return null;const g=nl(I.data);return{kind:"json",text:I.jsonText,label:g?PB(g):"JSON 输出",prose:I.prose||void 0}}function mU(C,I="art"){if(C==null)return[];const g=[],A=new Set;let i=0;const l=()=>`${I}-${++i}`;if(typeof C=="string"){const d=C.match(iw)??[];for(const o of d){const n=hl({url:o});VA(g,A,{id:l(),kind:n,url:o,documentId:xe(o),source:"text"})}if(!d.length&&C.trim()){const o=om(C);o!=null&&o.prose&&VA(g,A,{id:l(),kind:"text",text:o.prose,label:"确认提示",source:"text"}),VA(g,A,{id:l(),kind:(o==null?void 0:o.kind)??"text",text:(o==null?void 0:o.text)??C,label:(o==null?void 0:o.label)??"文本输出",source:"text"})}return g}if(typeof C!="object")return g;const e=C;typeof e.videoUrl=="string"&&e.videoUrl.trim()&&VA(g,A,{id:l(),kind:"video",url:e.videoUrl,documentId:xe(e.videoUrl),source:"videoUrl"});const t=(d,o,n)=>{if(Array.isArray(d))for(const s of d){let Z="";if(typeof s=="string"?Z=s:s&&typeof s=="object"&&"url"in s&&(Z=String(s.url??"")),!Z.trim())continue;const m=hl({url:Z,hint:n});VA(g,A,{id:l(),kind:m,url:Z,documentId:xe(Z),source:o})}};if(t(e.imageUrls,"imageUrls","image"),t(e.mediaUrls,"mediaUrls"),g.some(d=>d.kind==="image"&&d.url)||t(e.images,"images","image"),Array.isArray(e.documentIds))for(const d of e.documentIds)typeof d!="string"||!d.trim()||A.has(`doc:${d}`)||VA(g,A,{id:l(),kind:hl({url:d,hint:"document"}),documentId:d,url:void 0,label:`文档 ${d.slice(-6)}`,source:"documentIds"});typeof e.documentId=="string"&&e.documentId.trim()&&VA(g,A,{id:l(),kind:hl({url:e.documentId,hint:"document"}),documentId:e.documentId,label:`文档 ${e.documentId.slice(-6)}`,source:"documentId"});for(const d of["text","message","confirmMessage","prompt"]){const o=e[d];if(typeof o!="string"||!o.trim())continue;const n=o.match(iw)??[];for(const s of n)VA(g,A,{id:l(),kind:hl({url:s}),url:s,documentId:xe(s),source:d});if(!n.length&&(d==="text"||d==="message")){const s=om(o);s!=null&&s.prose&&VA(g,A,{id:l(),kind:"text",text:s.prose,label:d==="message"?"确认提示":"说明",source:d}),VA(g,A,{id:l(),kind:(s==null?void 0:s.kind)??"text",text:(s==null?void 0:s.text)??o,label:(s==null?void 0:s.label)??(d==="text"?"文本输出":"确认提示"),source:d})}}return g}function bU(C){return C.map((I,g)=>{const A=hl({url:I.url,filename:I.filename,mimetype:I.mimetype});return{id:I.id||`att-${g}`,kind:A,url:I.url,documentId:I.id,filename:I.filename,mimetype:I.mimetype,label:I.filename,source:"attachment"}})}function pa(C,I=[]){const g=new Set;for(const A of I)g.add(A);for(const A of C.slice(0,20))for(const i of Object.keys(A))g.add(i);return[...g].map(A=>({prop:A,label:A}))}function $d(C){return!Array.isArray(C)||C.length===0||!C.every(I=>I&&typeof I=="object"&&!Array.isArray(I))?null:C}function GU(C){if(!C||typeof C!="object")return null;const I=C,g=I.columns,A=I.rows;if(!Array.isArray(g)||!Array.isArray(A))return null;const i=g.map((e,t)=>{if(e&&typeof e=="object"){const d=e,o=String(d.field??d.prop??`col${t}`),n=String(d.title??d.label??o);return{prop:o,label:n}}const a=String(e);return{prop:a,label:a}}),l=A.map(e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{value:e});return i.length===0&&l.length===0?null:{key:"chart-table",title:"图表数据表",columns:i,rows:l}}function lw(C){const I=C.chartType;return typeof I!="string"||!I.trim()?!1:C.option!=null&&typeof C.option=="object"}function rU(C,I){if(!I||typeof I!="object")return[];const g=I,A=[],i=C??"";if(i==="compliance-check"||!i&&Array.isArray(g.violations)){const l=$d(g.violations);l!=null&&l.length&&A.push({key:"violations",title:"违规项",columns:pa(l,["severity","rule","detail"]),rows:l})}if(i==="anomaly-detect"||!i&&Array.isArray(g.anomalies)){const l=$d(g.anomalies);l!=null&&l.length&&A.push({key:"anomalies",title:"异常项",columns:pa(l,["severity","type","value","reason"]),rows:l})}if(i==="form-query"||!i&&Array.isArray(g.submissions)){const l=g.submissions;if(Array.isArray(l)&&l.length){const e=l.map(t=>{if(!t||typeof t!="object")return{value:t};const a=t,d=a.data&&typeof a.data=="object"&&!Array.isArray(a.data)?a.data:{};return{id:String(a._id??a.id??""),status:a.status??"",submitterId:a.submitterId??"",createdAt:a.createdAt??"",...d}});A.push({key:"submissions",title:`表单提交(共 ${Number(g.total??e.length)})`,columns:pa(e,["id","status","submitterId","createdAt"]),rows:e})}}if(i==="chart-generate"||!i&&lw(g)){if(String(g.chartType)==="table"){const e=GU(g.option);e&&A.push(e)}const l=$d(g.data);l!=null&&l.length&&A.push({key:"chart-data",title:"图表数据",columns:pa(l,["label","value","name"]),rows:l})}if((i==="module-assemble"||!i&&("schema"in g||"moduleType"in g))&&(i==="module-assemble"||g.moduleType!=null)){const l=[{key:"schema",label:"Schema",present:!!g.schema},{key:"flow",label:"Flow",present:!!g.flow},{key:"listView",label:"列表视图",present:!!g.listView},{key:"detailView",label:"详情视图",present:!!g.detailView}];A.push({key:"module-parts",title:`模块组装(${String(g.moduleType??"")})`,columns:[{prop:"part",label:"部件"},{prop:"status",label:"状态"}],rows:l.map(e=>({part:e.label,status:e.present?"已生成":"无"}))})}if(A.length===0)for(const[l,e]of Object.entries(g)){const t=$d(e);if(!(!t||t.length<1)&&!(t.length===1&&Object.keys(t[0]).length>12)&&(A.push({key:`field-${l}`,title:l,columns:pa(t),rows:t}),A.length>=2))break}return A}function hU(C,I){if(!I||typeof I!="object")return null;const g=I;if(C&&C!=="chart-generate"||!C&&!lw(g))return null;const A=String(g.chartType??"");return!A||A==="table"||!g.option||typeof g.option!="object"?null:{chartType:A,option:g.option}}const uU="1.11.1",BU="2.14.2",WU="2026-08-27";/*! *****************************************************************************
73
73
  Copyright (c) Microsoft Corporation.
74
74
 
75
75
  Permission to use, copy, modify, and/or distribute this software for any