59 行
627 KiB
JavaScript
59 行
627 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./WorkflowCompareDialog-LaHxRDaS.js","./WorkflowCompareDialog-C2cuJwjO.css","./WorkflowBranchPanel-BXhujyh7.js","./WorkflowBranchPanel-BG7oVHdw.css","./WorkflowCandidatePool-Dq7g_mo5.js","./WorkflowCandidatePool-DroNVpqo.css","./WorkflowComposer-D1fMnytn.js","./WorkflowComposer-CqjheHet.css","./WorkflowGenerationReviewDialog-B1fD508C.js","./WorkflowGenerationReviewDialog-CJVxC4pd.css","./WorkflowMaterialDrawer-BQ6xQh-_.js","./WorkflowMaterialDrawer-CrkvaAQI.css","./WorkflowRoundPanel-DfsxJgaM.js","./WorkflowRoundPanel-DKkhr1EW.css"])))=>i.map(i=>d[i]);
|
|||
|
|
var rk=Object.defineProperty;var sk=(e,n,o)=>n in e?rk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Tc=(e,n,o)=>sk(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const v of s)if(v.type==="childList")for(const m of v.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function o(s){const v={};return s.integrity&&(v.integrity=s.integrity),s.referrerPolicy&&(v.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?v.credentials="include":s.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function r(s){if(s.ep)return;s.ep=!0;const v=o(s);fetch(s.href,v)}})();/**
|
|||
|
|
* @vue/shared v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/function Iv(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const Ht={},Pr=[],Jn=()=>{},Km=()=>!1,nd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),od=e=>e.startsWith("onUpdate:"),xa=Object.assign,Pv=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},uk=Object.prototype.hasOwnProperty,Lt=(e,n)=>uk.call(e,n),Ze=Array.isArray,xr=e=>Rs(e)==="[object Map]",qr=e=>Rs(e)==="[object Set]",Yp=e=>Rs(e)==="[object Date]",ct=e=>typeof e=="function",ca=e=>typeof e=="string",hn=e=>typeof e=="symbol",qt=e=>e!==null&&typeof e=="object",Gm=e=>(qt(e)||ct(e))&&ct(e.then)&&ct(e.catch),zm=Object.prototype.toString,Rs=e=>zm.call(e),dk=e=>Rs(e).slice(8,-1),Hm=e=>Rs(e)==="[object Object]",xv=e=>ca(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ys=Iv(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),id=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},ck=/-\w/g,wn=id(e=>e.replace(ck,n=>n.slice(1).toUpperCase())),vk=/\B([A-Z])/g,_i=id(e=>e.replace(vk,"-$1").toLowerCase()),Qm=id(e=>e.charAt(0).toUpperCase()+e.slice(1)),Lc=id(e=>e?`on${Qm(e)}`:""),Qn=(e,n)=>!Object.is(e,n),Wu=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},Jm=(e,n,o,r=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:r,value:o})},rd=e=>{const n=parseFloat(e);return isNaN(n)?e:n},fk=e=>{const n=ca(e)?Number(e):NaN;return isNaN(n)?e:n};let Xp;const sd=()=>Xp||(Xp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $a(e){if(Ze(e)){const n={};for(let o=0;o<e.length;o++){const r=e[o],s=ca(r)?yk(r):$a(r);if(s)for(const v in s)n[v]=s[v]}return n}else if(ca(e)||qt(e))return e}const pk=/;(?![^(]*\))/g,mk=/:([^]+)/,gk=/\/\*[^]*?\*\//g;function yk(e){const n={};return e.replace(gk,"").split(pk).forEach(o=>{if(o){const r=o.split(mk);r.length>1&&(n[r[0].trim()]=r[1].trim())}}),n}function fe(e){let n="";if(ca(e))n=e;else if(Ze(e))for(let o=0;o<e.length;o++){const r=fe(e[o]);r&&(n+=r+" ")}else if(qt(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const bk="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_k=Iv(bk);function Ym(e){return!!e||e===""}function wk(e,n){if(e.length!==n.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=gi(e[r],n[r]);return o}function gi(e,n){if(e===n)return!0;let o=Yp(e),r=Yp(n);if(o||r)return o&&r?e.getTime()===n.getTime():!1;if(o=hn(e),r=hn(n),o||r)return e===n;if(o=Ze(e),r=Ze(n),o||r)return o&&r?wk(e,n):!1;if(o=qt(e),r=qt(n),o||r){if(!o||!r)return!1;const s=Object.keys(e).length,v=Object.keys(n).length;if(s!==v)return!1;for(const m in e){const b=e.hasOwnProperty(m),w=n.hasOwnProperty(m);if(b&&!w||!b&&w||!gi(e[m],n[m]))return!1}}return String(e)===String(n)}function Av(e,n){return e.findIndex(o=>gi(o,n))}const Xm=e=>!!(e&&e.__v_isRef===!0),c=e=>ca(e)?e:e==null?"":Ze(e)||qt(e)&&(e.toString===zm||!ct(e.toString))?Xm(e)?c(e.value):JSON.stringify(e,Zm,2):String(e),Zm=(e,n)=>Xm(n)?Zm(e,n.value):xr(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[r,s],v)=>(o[qc(r,v)+" =>"]=s,o),{})}:qr(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>qc(o))}:hn(n)?qc(n):qt(n)&&!Ze(n)&&!Hm(n)?String(n):n,qc=(e,n="")=>{var o;return hn(e)?`Symbol(${(o=e.description)!=null?o:n})`:e};/**
|
|||
|
|
* @vue/reactivity v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/let Ha;class kk{constructor(n=!1){this.detached=n,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!n&&Ha&&(Ha.active?(this.parent=Ha,this.index=(Ha.scopes||(Ha.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].pause();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].resume();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].resume()}}run(n){if(this._active){const o=Ha;try{return Ha=this,n()}finally{Ha=o}}}on(){++this._on===1&&(this.prevScope=Ha,Ha=this)}off(){if(this._on>0&&--this._on===0){if(Ha===this)Ha=this.prevScope;else{let n=Ha;for(;n;){if(n.prevScope===this){n.prevScope=this.prevScope;break}n=n.prevScope}}this.prevScope=void 0}}stop(n){if(this._active){this._active=!1;let o,r;for(o=0,r=this.effects.length;o<r;o++)this.effects[o].stop();for(this.effects.length=0,o=0,r=this.cleanups.length;o<r;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,r=this.scopes.length;o<r;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function hk(){return Ha}let Zt;const Oc=new WeakSet;class eg{constructor(n){this.fn=n,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ha&&(Ha.active?Ha.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Oc.has(this)&&(Oc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ag(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Zp(this),lg(this);const n=Zt,o=kn;Zt=this,kn=!0;try{return this.fn()}finally{ng(this),Zt=n,kn=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Ev(n);this.deps=this.depsTail=void 0,Zp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Oc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){rv(this)&&this.run()}get dirty(){return rv(this)}}let tg=0,bs,_s;function ag(e,n=!1){if(e.flags|=8,n){e.next=_s,_s=e;return}e.next=bs,bs=e}function Mv(){tg++}function Rv(){if(--tg>0)return;if(_s){let n=_s;for(_s=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;bs;){let n=bs;for(bs=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(r){e||(e=r)}n=o}}if(e)throw e}function lg(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function ng(e){let n,o=e.depsTail,r=o;for(;r;){const s=r.prevDep;r.version===-1?(r===o&&(o=s),Ev(r),$k(r)):n=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=n,e.depsTail=o}function rv(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(og(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function og(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$s)||(e.globalVersion=$s,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!rv(e))))return;e.flags|=2;const n=e.dep,o=Zt,r=kn;Zt=e,kn=!0;try{lg(e);const s=e.fn(e._value);(n.version===0||Qn(s,e._value))&&(e.flags|=128,e._value=s,n.version++)}catch(s){throw n.version++,s}finally{Zt=o,kn=r,ng(e),e.flags&=-3}}function Ev(e,n=!1){const{dep:o,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let v=o.computed.deps;v;v=v.nextDep)Ev(v,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function $k(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let kn=!0;const ig=[];function Yn(){ig.push(kn),kn=!1}function Xn(){const e=ig.pop();kn=e===void 0?!0:
|
|||
|
|
* @vue/runtime-core v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/function Es(e,n,o,r){try{return r?e(...r):e()}catch(s){Bs(s,n,o)}}function un(e,n,o,r){if(ct(e)){const s=Es(e,n,o,r);return s&&Gm(s)&&s.catch(v=>{Bs(v,n,o)}),s}if(Ze(e)){const s=[];for(let v=0;v<e.length;v++)s.push(un(e[v],n,o,r));return s}}function Bs(e,n,o,r=!0){const s=n?n.vnode:null,{errorHandler:v,throwUnhandledErrorInProduction:m}=n&&n.appContext.config||Ht;if(n){let b=n.parent;const w=n.proxy,I=`https://vuejs.org/error-reference/#runtime-${o}`;for(;b;){const _=b.ec;if(_){for(let A=0;A<_.length;A++)if(_[A](e,w,I)===!1)return}b=b.parent}if(v){Yn(),Es(v,null,10,[e,w,I]),Xn();return}}Qk(e,o,s,r,m)}function Qk(e,n,o,r=!0,s=!1){if(s)throw e;console.error(e)}const ml=[];let Gn=-1;const Ar=[];let mi=null,Ir=0;const mg=Promise.resolve();let Hu=null;function da(e){const n=Hu||mg;return e?n.then(this?e.bind(this):e):n}function Jk(e){let n=Gn+1,o=ml.length;for(;n<o;){const r=n+o>>>1,s=ml[r],v=Ss(s);v<e||v===e&&s.flags&2?n=r+1:o=r}return n}function Ov(e){if(!(e.flags&1)){const n=Ss(e),o=ml[ml.length-1];!o||!(e.flags&2)&&n>=Ss(o)?ml.push(e):ml.splice(Jk(n),0,e),e.flags|=1,gg()}}function gg(){Hu||(Hu=mg.then(bg))}function Yk(e){Ze(e)?Ar.push(...e):mi&&e.id===-1?mi.splice(Ir+1,0,e):e.flags&1||(Ar.push(e),e.flags|=1),gg()}function tm(e,n,o=Gn+1){for(;o<ml.length;o++){const r=ml[o];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;ml.splice(o,1),o--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function yg(e){if(Ar.length){const n=[...new Set(Ar)].sort((o,r)=>Ss(o)-Ss(r));if(Ar.length=0,mi){mi.push(...n);return}for(mi=n,Ir=0;Ir<mi.length;Ir++){const o=mi[Ir];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}mi=null,Ir=0}}const Ss=e=>e.id==null?e.flags&2?-1:1/0:e.id;function bg(e){try{for(Gn=0;Gn<ml.length;Gn++){const n=ml[Gn];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Es(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Gn<ml.length;Gn++){const n=ml[Gn];n&&(n.flags&=-2)}Gn=-1,ml.length=0,yg(),Hu=null,(ml.length||Ar.length)&&bg()}}let ll=null,_g=null;function Qu(e){const n=ll;return ll=e,_g=e&&e.type.__scopeId||null,n}function _a(e,n=ll,o){if(!n||e._n)return e;const r=(...s)=>{r._d&&Xu(-1);const v=Qu(n);let m;try{m=e(...s)}finally{Qu(v),r._d&&Xu(1)}return m};return r._n=!0,r._c=!0,r._d=!0,r}function $e(e,n){if(ll===null)return e;const o=pd(ll),r=e.dirs||(e.dirs=[]);for(let s=0;s<n.length;s++){let[v,m,b,w=Ht]=n[s];v&&(ct(v)&&(v={mounted:v,updated:v}),v.deep&&Ro(m),r.push({dir:v,instance:o,value:m,oldValue:void 0,arg:b,modifiers:w}))}return e}function Oi(e,n,o,r){const s=e.dirs,v=n&&n.dirs;for(let m=0;m<s.length;m++){const b=s[m];v&&(b.oldValue=v[m].value);let w=b.dir[r];w&&(Yn(),un(w,o,8,[e.el,b,e,n]),Xn())}}function Xk(e,n){if(al){let o=al.provides;const r=al.parent&&al.parent.provides;r===o&&(o=al.provides=Object.create(r)),o[e]=n}}function Uu(e,n,o=!1){const r=fd();if(r||Rr){let s=Rr?Rr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return o&&ct(n)?n.call(r&&r.proxy):n}}const Zk=Symbol.for("v-scx"),eh=()=>Uu(Zk);function st(e,n,o){return wg(e,n,o)}function wg(e,n,o=Ht){const{immediate:r,deep:s,flush:v,once:m}=o,b=xa({},o),w=n&&r||!n&&v!=="post";let I;if(Br){if(v==="sync"){const T=eh();I=T.__watcherHandles||(T.__watcherHandles=[])}else if(!w){const T=()=>{};return T.stop=Jn,T.resume=Jn,T.pause=Jn,T}}const _=al;b.call=(T,B,N)=>un(T,_,B,N);let A=!1;v==="post"?b.scheduler=T=>{Il(T,_&&_.suspense)}:v!=="sync"&&(A=!0,b.scheduler=(T,B)=>{B?T():Ov(T)}),b.augmentJob=T=>{n&&(T.flags|=4),A&&(T.flags|=2,_&&(T.id=_.uid,T.i=_))};const L=Hk(e,n,b);return Br&&(I?I.push(L):w&&L()),L}function th(e,n,o){const r=this.proxy,s=ca(e)?e.includes(".")?kg(r,e):()=>r[e]:e.bind(r,r);let v;ct(n)?v=n:(v=n.handler,o=n);const m=Ts(this),b=wg(s,v.bind(r),o);return m(),b}function kg(e,n){const o=n.split(".");return()=>{let r=e;for(let s=0;s<o.length&&r;s++)r=r[o[s]];return r}}const ah=Symbol("_vte"),hg=e=>e.__isTeleport,nn=Symbol("_leaveCb"),us=Symbol("_enterCb");function $g(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingV
|
|||
|
|
* @vue/runtime-dom v3.5.39
|
|||
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|||
|
|
* @license MIT
|
|||
|
|
**/let yv;const ym=typeof window<"u"&&window.trustedTypes;if(ym)try{yv=ym.createPolicy("vue",{createHTML:e=>e})}catch{}const Xg=yv?e=>yv.createHTML(e):e=>e,l0="http://www.w3.org/2000/svg",n0="http://www.w3.org/1998/Math/MathML",Po=typeof document<"u"?document:null,bm=Po&&Po.createElement("template"),o0={insert:(e,n,o)=>{n.insertBefore(e,o||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,o,r)=>{const s=n==="svg"?Po.createElementNS(l0,e):n==="mathml"?Po.createElementNS(n0,e):o?Po.createElement(e,{is:o}):Po.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Po.createTextNode(e),createComment:e=>Po.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Po.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,o,r,s,v){const m=o?o.previousSibling:n.lastChild;if(s&&(s===v||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),o),!(s===v||!(s=s.nextSibling)););else{bm.innerHTML=Xg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const b=bm.content;if(r==="svg"||r==="mathml"){const w=b.firstChild;for(;w.firstChild;)b.appendChild(w.firstChild);b.removeChild(w)}n.insertBefore(b,o)}return[m?m.nextSibling:n.firstChild,o?o.previousSibling:n.lastChild]}},ci="transition",ds="animation",Nr=Symbol("_vtc"),Zg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ey=xa({},Cg,Zg),i0=e=>(e.displayName="Transition",e.props=ey,e),Xa=i0((e,{slots:n})=>t0(nh,ty(e),n)),Ui=(e,n=[])=>{Ze(e)?e.forEach(o=>o(...n)):e&&e(...n)},_m=e=>e?Ze(e)?e.some(n=>n.length>1):e.length>1:!1;function ty(e){const n={};for(const j in e)j in Zg||(n[j]=e[j]);if(e.css===!1)return n;const{name:o="v",type:r,duration:s,enterFromClass:v=`${o}-enter-from`,enterActiveClass:m=`${o}-enter-active`,enterToClass:b=`${o}-enter-to`,appearFromClass:w=v,appearActiveClass:I=m,appearToClass:_=b,leaveFromClass:A=`${o}-leave-from`,leaveActiveClass:L=`${o}-leave-active`,leaveToClass:T=`${o}-leave-to`}=e,B=r0(s),N=B&&B[0],G=B&&B[1],{onBeforeEnter:q,onEnter:F,onEnterCancelled:z,onLeave:ue,onLeaveCancelled:de,onBeforeAppear:Pe=q,onAppear:ce=F,onAppearCancelled:ve=z}=n,K=(j,he,Q,Z)=>{j._enterCancelled=Z,fi(j,he?_:b),fi(j,he?I:m),Q&&Q()},k=(j,he)=>{j._isLeaving=!1,fi(j,A),fi(j,T),fi(j,L),he&&he()},D=j=>(he,Q)=>{const Z=j?ce:F,ne=()=>K(he,j,Q);Ui(Z,[he,ne]),wm(()=>{fi(he,j?w:v),Kn(he,j?_:b),_m(Z)||km(he,r,N,ne)})};return xa(n,{onBeforeEnter(j){Ui(q,[j]),Kn(j,v),Kn(j,m)},onBeforeAppear(j){Ui(Pe,[j]),Kn(j,w),Kn(j,I)},onEnter:D(!1),onAppear:D(!0),onLeave(j,he){j._isLeaving=!0;const Q=()=>k(j,he);Kn(j,A),j._enterCancelled?(Kn(j,L),bv(j)):(bv(j),Kn(j,L)),wm(()=>{j._isLeaving&&(fi(j,A),Kn(j,T),_m(ue)||km(j,r,G,Q))}),Ui(ue,[j,Q])},onEnterCancelled(j){K(j,!1,void 0,!0),Ui(z,[j])},onAppearCancelled(j){K(j,!0,void 0,!0),Ui(ve,[j])},onLeaveCancelled(j){k(j),Ui(de,[j])}})}function r0(e){if(e==null)return null;if(qt(e))return[jc(e.enter),jc(e.leave)];{const n=jc(e);return[n,n]}}function jc(e){return fk(e)}function Kn(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[Nr]||(e[Nr]=new Set)).add(n)}function fi(e,n){n.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[Nr];o&&(o.delete(n),o.size||(e[Nr]=void 0))}function wm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let s0=0;function km(e,n,o,r){const s=e._endId=++s0,v=()=>{s===e._endId&&r()};if(o!=null)return setTimeout(v,o);const{type:m,timeout:b,propCount:w}=ay(e,n);if(!m)return r();const I=m+"end";let _=0;const A=()=>{e.removeEventListener(I,L),v()},L=T=>{T.target===e&&++_>=w&&A()};setTimeout(()=>{_<w&&A()},b+1),e.addEventListener(I,L)}function ay(e,n){const o=window.getComputedStyle(e),r=B=>(o[B]||"").split(", "),s=r(`${ci}Delay`),v=r(`${ci}Duration`),m=hm(s,v),b=r(`${
|
|||
|
|
`)}function m(L,T){const B=Array.from(new Set(T.replace(/,/g,",").split(/[\n,]/).map(N=>N.trim()).filter(Boolean)));r("update:modelValue",{...o.modelValue,[L]:B})}function b(L,T){r("update:modelValue",{...o.modelValue,[L]:T})}const w=M(()=>s("group_allowlist").length),I=M(()=>s("user_allowlist").length),_=M(()=>s("adult_group_allowlist").length),A=M(()=>s("adult_user_allowlist").length);return(L,T)=>(d(),f("section",V8,[T[24]||(T[24]=jv('<div class="intro" data-v-61943f81><span data-v-61943f81>AstrBot 聊天指令</span><strong data-v-61943f81>群聊与用户白名单</strong><p data-v-61943f81>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-61943f81><article data-v-61943f81><b data-v-61943f81>快速角色 / 角色工作流</b><strong data-v-61943f81>群聊命中 + 用户命中</strong><p data-v-61943f81>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-61943f81><b data-v-61943f81>单图生成</b><strong data-v-61943f81>群聊命中 或 用户命中</strong><p data-v-61943f81>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),a("div",j8,[a("label",null,[a("span",null,[T[10]||(T[10]=vt("群聊白名单 ",-1)),a("em",null,c(w.value)+" 项",1)]),a("textarea",{value:v("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
|
|||
|
|
例如:123456789`,onInput:T[0]||(T[0]=B=>m("group_allowlist",B.target.value))},null,40,K8),T[11]||(T[11]=a("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),a("label",null,[a("span",null,[T[12]||(T[12]=vt("用户白名单 ",-1)),a("em",null,c(I.value)+" 项",1)]),a("textarea",{value:v("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
|
|||
|
|
例如:987654321`,onInput:T[1]||(T[1]=B=>m("user_allowlist",B.target.value))},null,40,G8),T[13]||(T[13]=a("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),T[25]||(T[25]=a("div",{class:"adult-intro"},[a("div",null,[a("span",null,"成人内容独立授权"),a("strong",null,"必须同时通过内容审核与成人白名单")]),a("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),a("div",z8,[a("label",null,[a("span",null,[T[14]||(T[14]=vt("成人内容群聊白名单 ",-1)),a("em",null,c(_.value)+" 项",1)]),a("textarea",{value:v("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:T[2]||(T[2]=B=>m("adult_group_allowlist",B.target.value))},null,40,H8),T[15]||(T[15]=a("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),a("label",null,[a("span",null,[T[16]||(T[16]=vt("成人内容用户白名单 ",-1)),a("em",null,c(A.value)+" 项",1)]),a("textarea",{value:v("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:T[3]||(T[3]=B=>m("adult_user_allowlist",B.target.value))},null,40,Q8),T[17]||(T[17]=a("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),a("div",J8,[a("label",null,[T[18]||(T[18]=a("span",null,"用户并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:T[4]||(T[4]=B=>b("user_concurrency_limit",Number(B.target.value)))},null,40,Y8)]),a("label",null,[T[19]||(T[19]=a("span",null,"群聊并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:T[5]||(T[5]=B=>b("group_concurrency_limit",Number(B.target.value)))},null,40,X8)]),a("label",null,[T[20]||(T[20]=a("span",null,"用户每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:T[6]||(T[6]=B=>b("daily_user_generation_limit",Number(B.target.value)))},null,40,Z8)]),a("label",null,[T[21]||(T[21]=a("span",null,"群聊每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:T[7]||(T[7]=B=>b("daily_group_generation_limit",Number(B.target.value)))},null,40,eM)]),a("label",tM,[a("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:T[8]||(T[8]=B=>b("allow_2k",B.target.checked))},null,40,aM),T[22]||(T[22]=a("span",null,"允许聊天使用 2K",-1))]),a("label",lM,[a("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:T[9]||(T[9]=B=>b("allow_4k",B.target.checked))},null,40,nM),T[23]||(T[23]=a("span",null,"允许聊天使用 4K",-1))])])]))}}),iM=va(oM,[["__scopeId","data-v-61943f81"]]),rM={class:"governance"},sM={class:"preview-card"},uM=["disabled"],dM={class:"preview-choice"},cM={key:1,class:"preview-error"},vM={key:2,class:"preview-result"},fM={class:"card"},pM={class:"switch"},mM=["checked","disabled"],gM={class:"route-pair source-pair"},yM=["value","disabled"],bM=["value"],_M=["value"],wM=["value","disabled"],kM=["value"],hM=["value"],$M={class:"grid"},CM=["value","disabled"],SM={class:"entries"},IM=["checked","disabled","onChange"],PM={class:"card"},xM={class:"switch"},AM=["checked","disabled"],MM={class:"route-pair source-pair"},RM=["value","disabled"],EM=["value"],BM=["value"],NM=["value","disabled"],TM=["value"],LM=["value"],qM={class:"grid"},OM=["value","disabled"],DM={class:"card routing"},WM={class:"switch"},UM=["checked","disabled"],FM={class:"route-pair"},VM=["value","disabled"],jM=["value"],KM=["value","disabled"],GM=["value"],zM={class:"entries"},HM=["checked","disabled","onChange"],QM={class:"card"},JM={class:"switch"},YM=["checked","disabled"],XM={class:"route-pair source-pair"},ZM=["value","disabled
|
|||
|
|
`)}function kc(t){const l=zt.value,i=Ye.value;return{source:"standalone_web_workflow_chat",ui_node_id:gt.value,ui_node_title:l.title,ui_node_phase:l.phase,ui_node_status:l.status,profile_id:i.profileId,profile_name:i.name,workflow_id:i.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:t,persona_split_fields_ready:Hd.value,persona_split_fields_total:zd.value,selected_material_ids:rc(),selected_draft_image_ids:Nl.value.filter(kl).map(u=>u.image_id),candidate_feedback:Na.value}}function g1(t){var p;const l=t.interpretation;if(!l)return"候选反馈已保存。";const i=[],u=[["喜欢",l.liked],["拒绝",l.rejected],["严格拒绝",l.strict_rejected]];for(const[g,h]of u)h.length&&i.push(`${g} ${h.map(E=>E.display_code).join("、")}`);return(p=l.final)!=null&&p.display_code&&i.push(`待定稿 ${l.final.display_code}`),l.positive_patch&&i.push("已生成正向调整"),l.negative_patch&&i.push("已生成负向约束"),l.material_intent&&i.push(`素材意图:${l.material_intent}`),i.length?i.join(";"):"下一轮调整要求已保存。"}async function dp(t,l={}){var u,p,g,h,E,ee,se,ke;const i=$t.value;if(!Ra.value||!i||i.legacy||!i.candidates.length)return"not_applicable";if(ru.value)return It.value="该轮次已经确认;如需继续修改,请先从当前节点创建分支。","blocked";Qe.value=!0,It.value="",Ml.value="";try{const ge=await Ie(U.roundFeedback(i.round.round_id),{feedback_text:t,idempotency_key:`web-round-feedback-text-${i.round.round_id}-${Date.now()}`});if(_o(i.round.node_id,ge),l.autoAdvance!==!1&&((p=(u=ge.interpretation)==null?void 0:u.liked)!=null&&p.length)){const Ve=await Ie(U.roundNext(i.round.round_id),{count:$i.value,...Du(Ni.value),idempotency_key:`web-chat-next-${i.round.round_id}-${encodeURIComponent(t).slice(0,80)}`});return _o(i.round.node_id,Ve,{select:!0}),ni(Ve),Ml.value=`${i.round.display_code} 已封存,${Ve.round.display_code} 已进入生成队列。`,qe.value=Ml.value,ie.value=t,na.value=(h=(g=ge.interpretation)==null?void 0:g.metadata)!=null&&h.model_route?`候选反馈 / ${String(ge.interpretation.metadata.model_route)}`:`候选反馈 / ${((E=ge.interpretation)==null?void 0:E.source)||"后端解释"}`,Ta.value="","saved"}const Ge=g1(ge);return Ml.value=`${Ge} 点击“开始新一轮”后会使用这些反馈。`,qe.value=Ge,ie.value=t,na.value=(se=(ee=ge.interpretation)==null?void 0:ee.metadata)!=null&&se.model_route?`候选反馈 / ${String(ge.interpretation.metadata.model_route)}`:`候选反馈 / ${((ke=ge.interpretation)==null?void 0:ke.source)||"确定性解释"}`,Ta.value="","saved"}catch(ge){return It.value=`候选反馈理解失败:${Oe(ge)}`,qe.value=It.value,"failed"}finally{Qe.value=!1}}async function y1(){const t=Ta.value.trim();if(!t||Qe.value||await dp(t)!=="not_applicable")return;if(Ra.value&&!Xo.value.route){qe.value="当前节点和后端默认均未提供生图路由,请先显式覆盖或前往设置配置。";return}await Pu({promptPatch:wc(t),metadata:kc(t)})&&(ie.value=t,na.value=`${zt.value.title} / ${qd.value||"后端自动"}`)}function cp(){!ja.value||!Da(ja.value)||(Gs.value="generation",Ll("imageViewer"),$c(),Fo.value=!0)}function Su(t){const l=(t?hf.value.find(i=>i.image_id===t):null)??Ln.value;!l||!Da(l)||(Wl.value=!1,P.value=l.image_id,cp())}function vp(){Nl.value.length<2||(Wl.value=!0)}function b1(t){return{configure_distinct_generation_cross_review_routes:"请在设置页配置至少一个与主候选不同的生图模型",configure_image_generation_route:"请先配置并启用可用的生图模型路由",regenerate_primary_candidate_with_configured_route:"主候选缺少可复用的模型路由,请先重新生成主候选",retry_or_remove_failed_review_candidate:"当前审查轮次存在失败候选,请重试失败项后再继续",select_review_candidates:"请至少勾选一个需要重新生成的审查候选",open_active_cross_review:"该节点已有进行中的交叉审查,请打开当前审查轮次",create_branch:"当前节点已锁定或工作流已封存,请先创<E58588><E5889B>
|
|||
|
|
${p.trim()}`).join(`
|
|||
|
|
|
|||
|
|
`)}function T1(t){const l=ii(t),i=(...g)=>{for(const h of g){const E=l.find(ee=>pi(ee.node_key)===h);if(E!=null&&E.selected_image_id)return E.selected_image_id}return""},u={avatar:i("headshot"),persona_image:i("design_sheet","turnaround"),standing:i("full_body"),pv:i("style_lock")},p=Object.entries(u).filter(([,g])=>!g).map(([g])=>g);if(p.length){const g={avatar:"头像(头像草稿)",persona_image:"人设图(设定图或三视图)",standing:"立绘(全身设定)",pv:"PV 图(高清修复与统一风格)"};return qe.value=`档案卡还缺少已明确采用的资产:${p.map(h=>g[h]).join("、")}。请回到对应节点确认一张候选图。`,null}return u}function L1(t){if(!(t instanceof el))return`档案卡封存失败:${Oe(t)}`;const l=[],i=t.details.incomplete_node_keys;Array.isArray(i)&&i.length&&l.push(`未完成节点:${i.map(String).join("、")}`);const u=Te(t.details,"asset_role");u&&l.push(`资产角色:${u}`);const p=Te(t.details,"active_branch")||Te(t.details,"branch_name");p&&l.push(`当前分支:${p}`);const g=Te(t.details,"status");g&&l.push(`工作流状态:${g}`);const h=l.length?`(${l.join(";")})`:"";return`档案卡封存失败:${t.message}${h}`}async function q1(){const t=Ye.value;if(!t||Qe.value)return;const l=Qt("建立档案卡");if(l){qe.value=l;return}if(!t.workflowId||!t.profileId){qe.value="请先保存角色并创建详细角色工作流,再建立档案卡。";return}const i=t.workflowId,u=Pt.value[i],p=(u==null?void 0:u.current_branch)||"main",g=T1(i);if(!g)return;const h=N1(t);if(!h){qe.value="档案卡缺少人设文档,请先完成角色设定拆解。";return}const E={idempotency_key:`web-profile-card-${i}-${gu(p)}`,persona_document:h,assets:g,metadata:{source:"standalone_web_profile_card",schema_version:"character_profile_card_v1",profile_id:t.profileId,profile_name:t.name,workflow_id:i,branch_name:p,selected_material_ids:rc()}};Qe.value=!0,qe.value="";try{const ee=await Ie(U.workflowFinalizeCard(i),E);Vr.value={...Vr.value,[t.profileId]:[ee,...(Vr.value[t.profileId]??[]).filter(ke=>ke.card_id!==ee.card_id)]},Ua.value=ee.created_at,await xu(t,i,"archive");const[se]=await Promise.allSettled([Me(U.profileCards(t.profileId)),ec(),dl(),wl()]);se.status==="fulfilled"&&(Vr.value={...Vr.value,[t.profileId]:se.value}),On("archive"),qe.value=`档案卡已原子封存:${Cl(ee.card_id)} / ${ee.branch_name},4 类必填资产均已入库。`}catch(ee){qe.value=L1(ee)}finally{Qe.value=!1}}async function Ic(t){const l=Ye.value,i=l==null?void 0:l.workflowId;if(!i||rl.value)return;const u=t==="start"?"启动":t==="cancel"?"取消":"归档";if(t==="start"&&!ou.value){vn.value="请先在第一个节点导入粗略人设;导入成功后工作流会自动启动。";return}if(!(t!=="start"&&!window.confirm(`确定${u}当前工作流吗?`))){rl.value=!0,vn.value="";try{const p=t==="start"?U.workflowStart(i):t==="cancel"?U.workflowCancel(i):U.workflowArchive(i),g=await Ie(p);Pt.value={...Pt.value,[i]:g},vn.value=`工作流已${u}`}catch(p){vn.value=Oe(p)}finally{rl.value=!1}}}async function O1(){var l;const t=(l=Ye.value)==null?void 0:l.workflowId;if(t){rl.value=!0;try{Oo.value=await Me(U.workflowReview(t)),vn.value="整体审查已完成"}catch(i){vn.value=Oe(i)}finally{rl.value=!1}}}async function D1(){var i;const t=(i=ot.value)==null?void 0:i.node_id;if(!t)return;rl.value=!0;const l=await gc(t,!0);vn.value=l?"依赖上下文已刷新":W.value,rl.value=!1}function os(t){return Jl.value?`${t}暂不可用:${Zo.value}`:ei.value?`${t}已被锁定:${cr.value}`:""}function W1(t){return`branch_${(t.node_key||t.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function bp(t,l,i,u={}){const p=await Ie(U.workflowSwitchBranch(l),{branch_name:i}),g=await Me(U.workflowNodes(l)),h=g.filter(se=>se.branch_name===p.current_branch);Ct.value={...Ct.value,[l]:g},Pt.value={...Pt.value,[l]:p},qi(t,p,h.length?h:g);const E=(u.copiedFromNodeId?h.find(se=>Te(se.metadata,"copied_from_node_id")===u.copiedFromNodeId):void 0)??(u.preferredUiNodeId?h.
|
|||
|
|
`)}}function Au(t,l,i,u,p){return{id:t,title:l,prompt:i,negative:u,weight_suggestions:[{label:"identity",value:1.25,reason:"keep character identity stable"},{label:"style",value:.85,reason:"avoid overfitting style over identity"}],inherits:p,status:"ready"}}function ew(t){const l=Bl.value,i=A.map((u,p)=>{const g=l.find(h=>h.category===u.category);return{id:`rule_${u.category}_${p+1}`,category:u.category,material_id:ic(g==null?void 0:g.id),material_label:(g==null?void 0:g.label)??"",material_group:(g==null?void 0:g.group)??(g==null?void 0:g.category)??"",material_prompt:(g==null?void 0:g.prompt)??"",material_colors:(g==null?void 0:g.colors)??[],bind_to_stages:wp(u.category),inheritance_rule:g?`${u.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:g?kp(u.category):"弱",required:!!(g&&["风格","服装"].includes(u.category)),status:g?"ready":"pending"}});return{profile_id:t.profileId,profile_name:t.name,selected_material_ids:rc(),rules:i}}function wp(t){return{风格:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}],构图:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],服装:[{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],鞋袜:[{stage_id:"body-sheet",stage_title:"全身与设定图"}],配饰:[{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}]}[t]??[{stage_id:"body-sheet",stage_title:"全身与设定图"}]}function kp(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function tw(){var i;const t=Ye.value;if(!t||qo.value)return;const l=Qt("保存快照");if(l){so.value=l;return}if(!t.workflowId){so.value="请先生成档案并创建后端工作流,再保存快照。";return}qo.value=!0,so.value="";try{const u=await Ie(U.workflowHistory(t.workflowId),{action:"save_version",title:`${t.name} / ${((i=zt.value)==null?void 0:i.title)??"工作流快照"}`,node_id:wo(gt.value,t),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:gt.value,profile_id:t.profileId,profile_name:t.name,profile_status:t.status}});Ua.value=u.created_at}catch(u){so.value=`保存快照失败:${Oe(u)}`}finally{qo.value=!1}}function wo(t,l){if(!l.workflowId)return;const u=ii(l.workflowId).find(g=>bn(g)===t);if(u)return u.node_id;const p=l.workflowNodeIds??[];if(t!=="brief-import"&&t==="persona-split")return p[0]}function ii(t){var u;const l=Ct.value[t]??[],i=(u=Pt.value[t])==null?void 0:u.current_branch;return i?l.filter(p=>p.branch_name===i):l}function aw(t){const l=uu.value;if(l&&(!t||l.node_id===t))return[l.image_id];if(!t)return[];const i=(aa.value[t]??[]).find(u=>{var p;return u.image_id===((p=Tn.value.find(g=>g.node_id===t))==null?void 0:p.selected_image_id)});return i&&kl(i)?[i.image_id]:[]}function kl(t){const l="metadata"in t&&t.metadata&&typeof t.metadata=="object"?t.metadata:{},i=l.mock===!0||l.mock===1||l.mock==="true",u=Object.prototype.hasOwnProperty.call(l,"provider_error")&&l.provider_error!=null,p=l.fallback_used===!0||l.degraded===!0;return!i&&!u&&!p}async function lw(){if(!sf.value||ki.value)return;const t=Qt("生成档案");if(t){hi.value=t;return}Ls.value+=1;const l=sw(Ke.value,Ls.value);ki.value=!0,hi.value="";try{const i=await Ie(U.quickProfileDraft,nw(l,Ke.value,Aa.value)),u={...l,name:i.profile_preview.name||l.name,style:i.profile_preview.style_prompt||l.style,negative:i.profile_preview.negative_prompt||l.negative},p=await Ie(U.quickProfileDraftSave,ow(u,Ke.value,Aa.value,i)),h={...iw(p,u),status:"文本档案已保存"};Ja.value=[h,...Ja.value.filter(E=>E.id!==h.id)],oa.value=[p.profile,...oa.value.filter(E=>E.profile_id!==p.profile.profile_id)],ma.value={...ma.value,[p.profile.profile_id]:p.workflow?[p.workflow]:[]},bu(h),Xe.value="quickProfile"
|
|||
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="${dt}" height="${Le}" viewBox="0 0 ${dt} ${Le}" preserveAspectRatio="xMidYMid meet">
|
|||
|
|
<defs>
|
|||
|
|
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|||
|
|
<stop offset="0%" stop-color="${g}" />
|
|||
|
|
<stop offset="58%" stop-color="${h}" />
|
|||
|
|
<stop offset="100%" stop-color="#111827" />
|
|||
|
|
</linearGradient>
|
|||
|
|
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
|
|||
|
|
<stop offset="0%" stop-color="${E}" stop-opacity="0.82" />
|
|||
|
|
<stop offset="100%" stop-color="${E}" stop-opacity="0" />
|
|||
|
|
</radialGradient>
|
|||
|
|
<pattern id="grid" width="${Tt}" height="${Tt}" patternUnits="userSpaceOnUse">
|
|||
|
|
<path d="M${Tt} 0H0V${Tt}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
|
|||
|
|
</pattern>
|
|||
|
|
</defs>
|
|||
|
|
<rect width="${dt}" height="${Le}" fill="url(#bg)" />
|
|||
|
|
<rect width="${dt}" height="${Le}" fill="url(#grid)" />
|
|||
|
|
<circle cx="${Wn}" cy="${ui}" r="${Un}" fill="url(#halo)" />
|
|||
|
|
<circle cx="${di}" cy="${Fn}" r="${R}" fill="#ffffff" opacity="0.11" />
|
|||
|
|
<rect x="${Yt}" y="${Yt}" width="${Xl}" height="${za}" rx="${vl}" fill="#ffffff" opacity="0.14" />
|
|||
|
|
<rect x="${ka}" y="${ka}" width="${hl}" height="${Zl}" rx="${Math.round(vl*.72)}" fill="#0f172a" opacity="0.24" />
|
|||
|
|
<text x="${ka+Math.round(ft*.035)}" y="${Pa}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${ha}" font-weight="700">IMAGESTUDIO · 未生成 ${ee}</text>
|
|||
|
|
<text x="${ka+Math.round(ft*.035)}" y="${fl}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${O}" font-weight="800">${se}</text>
|
|||
|
|
<text x="${ka+Math.round(ft*.035)}" y="${Ka}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${it}">${ke}</text>
|
|||
|
|
<text x="${Ae}" y="${Pa+Math.round(ft*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ga}" font-weight="900">${ee}</text>
|
|||
|
|
<text x="${dt-Yt}" y="${Le-Math.round(Yt*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(ft*.027))}" font-weight="800">${Re}</text>
|
|||
|
|
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(Rt)}`}function Gp(t){return t.replace(/[&<>"']/g,l=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[l]??l)}function cl(t){return"title"in t&&t.title?t.title:t.node_id||t.workflow_id||t.profile_id||Cl(t.image_id)}function Da(t){return Wa(t.thumbnail_url)||Wa(t.image_url)||Wa(t.thumbnail_uri)||Wa(t.image_uri)}function Wa(t){const l=String(t||"").trim();if(!l)return"";if(/^storage:\/\//i.test(l)){const p=De.value[l];if(p)return p;if(!ye.has(l)){const g=Zw(l).finally(()=>{ye.delete(l)});ye.set(l,g)}return""}const i=zp(l);if(!i)return l;const u=De.value[l];if(u)return u;if(!ye.has(l)){const p=Hp(l,i).finally(()=>{ye.delete(l)});ye.set(l,p)}return l}async function Zw(t){try{const l=await Me(U.mediaSign,{uri:t}),i=String(l.url||"").trim();if(!i)return;const u=zp(i);if(u){await Hp(i,u,t);return}De.value={...De.value,[t]:i}}catch(l){console.warn("ImageStudio storage media signing failed",l)}}function zp(t){var l;try{const i=new URL(t,window.location.origin);return i.pathname.endsWith("/media/fetch")&&((l=i.searchParams.get("token"))==null?void 0:l.trim())||""}catch{return""}}async function Hp(t,l,i=t){try{const u=await Me(U.mediaPayload,{token:l}),p=String(u.body_base64||"");if(!p)return;const g=p.replace(/-/g,"+").replace(/_/g,"/"),h=g.padEnd(Math.ceil(g.length/4)*4,"="),E=window.atob(h),ee=new Uint8Array(E.length);for(let ke=0;ke<E.length;ke+=1)ee[ke]=E.charCodeAt(ke);const se=URL.createObjectURL(new Blob([ee],{type:u.content_type||"application/octet-stream"}));Ne.add(se),De.value={...De.value,[t]:se,[i]:se}}catch(u){console.warn("ImageStudio media bridge failed",u)}}function ek(t){if(t.status==="confirmed_unsupported")return!1;if(t.dialect==="openai_images"||t.dialect==="comfyui")return!0;const l=t.capabilities||{};return!!(l.text_to_image||l.image_generation||l.workflow_graph||Object.keys(l).some(i=>["text_to_image","image_generation","workflow_graph"].includes(i)))}function tk(t,l,i){return Math.max(l,Math.min(i,t))}function ak(){try{const t=localStorage.getItem(Ql.theme);(t==="light"||t==="dark")&&(En.value=t),Wo.value=localStorage.getItem(Ql.primary)||Wo.value,Uo.value=localStorage.getItem(Ql.accent)||Uo.value;const l=localStorage.getItem(Ql.navigationPinned);pn.value=l===null||l==="true",Gl.value=Qp(localStorage.getItem(Ql.readNotifications)),lr.value=Qp(localStorage.getItem(Ql.dismissedNotifications))}catch{}tr.value=pn.value}function lk(){try{localStorage.setItem(Ql.theme,En.value),localStorage.setItem(Ql.primary,Wo.value),localStorage.setItem(Ql.accent,Uo.value),localStorage.setItem(Ql.navigationPinned,String(pn.value)),localStorage.setItem(Ql.readNotifications,JSON.stringify(Gl.value)),localStorage.setItem(Ql.dismissedNotifications,JSON.stringify(lr.value))}catch{}}function Qp(t){if(!t)return[];try{const l=JSON.parse(t);return Array.isArray(l)?l.filter(i=>typeof i=="string"):[]}catch{return[]}}function $o(t,l){const i=Nc(t);return i?`rgba(${i.r}, ${i.g}, ${i.b}, ${l})`:`rgba(118, 104, 232, ${l})`}function Ec(t,l,i){const u=Nc(t),p=Nc(l);if(!u||!p)return t;const g=Math.min(1,Math.max(0,i));return`#${Bc(u.r*(1-g)+p.r*g)}${Bc(u.g*(1-g)+p.g*g)}${Bc(u.b*(1-g)+p.b*g)}`}function Bc(t){return Math.round(t).toString(16).padStart(2,"0")}function Nc(t){const l=t.replace("#","");return/^[0-9a-fA-F]{6}$/.test(l)?{r:Number.parseInt(l.slice(0,2),16),g:Number.parseInt(l.slice(2,4),16),b:Number.parseInt(l.slice(4,6),16)}:null}function Te(t,l){const i=t==null?void 0:t[l];return typeof i=="string"?i:""}function nk(t){return!la(t)||typeof t.task_id!="string"?null:{task_id:t.task_id,task_type:typeof t.task_type=="string"?t.task_type:"generation",status:typeof t.status=="string"?t.status:"created",progress:typeof t.progress=="number"?t.progress:0,created_at:typeof t.created_at=="string"?t.created_at:"",updated_at:typeof t.updated_at=="string"?t.updated_at:"",profile_id:typeof t.profile_id=="string"?t.profile_id:null,workflow_id:typeof t.workflow_id=="string"?t.workflow_id:null,node_id:typeof t.node_id=="string"?t.node_id:null,model_route:typeof t.model_ro
|
|||
|
|
身份:近未来港区巡查员\r
|
|||
|
|
性格:冷静、可靠、行动快\r
|
|||
|
|
外观:黑色短发,青绿色眼睛\r
|
|||
|
|
服装:轻机能外套、短靴、发光臂章\r
|
|||
|
|
避雷:低质量、结构错误`},null,512),[[Ue,Fl.value]])]),a("aside",bT,[a("header",null,[a("div",null,[l[164]||(l[164]=a("span",null,"识别预览",-1)),a("strong",null,c(ky.value)+" / "+c(Id.value.length),1)]),a("em",null,c(ir.value?`${ir.value.length} 字`:"待粘贴"),1)]),a("dl",null,[(d(!0),f(Y,null,oe(Id.value,R=>(d(),f("div",{key:R.key,class:fe({pending:ir.value&&!R.recognized})},[a("dt",null,[vt(c(R.label)+" ",1),a("span",null,c(R.recognized?"已识别":"待整理"),1)]),a("dd",null,c(R.value||"粘贴文本后显示"),1)],2))),128))])])]),a("footer",null,[a("span",null,c(ir.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),a("button",{type:"button",onClick:l[38]||(l[38]=R=>ba("externalProfileImport"))},"取消"),a("button",{type:"button",disabled:!ir.value,onClick:vw}," 识别并填入问卷 ",8,_T)])])])):H("",!0)]),_:1}),et(Xa,{name:"viewer-fade"},{default:_a(()=>[to.value?(d(),f("div",wT,[a("section",kT,[a("header",null,[l[165]||(l[165]=a("div",null,[a("span",null,"快速角色"),a("strong",null,"创建角色档案问卷")],-1)),a("button",{type:"button",title:"关闭",onClick:l[39]||(l[39]=R=>ba("personaQuestionnaire"))},"×"),l[166]||(l[166]=vt("\\n ",-1))]),a("div",hT,[a("label",null,[l[167]||(l[167]=a("span",null,"角色核心",-1)),$e(a("textarea",{"onUpdate:modelValue":l[40]||(l[40]=R=>Ke.value.roleCore=R),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ue,Ke.value.roleCore]])]),a("label",$T,[l[169]||(l[169]=a("span",null,"性别表现",-1)),$e(a("select",{"onUpdate:modelValue":l[41]||(l[41]=R=>Ke.value.genderPresentation=R)},[...l[168]||(l[168]=[a("option",{value:""},"未指定",-1),a("option",{value:"female"},"女性 / Female",-1),a("option",{value:"male"},"男性 / Male",-1),a("option",{value:"androgynous"},"中性 / Androgynous",-1),a("option",{value:"nonbinary"},"非二元 / Nonbinary",-1)])],512),[[Ba,Ke.value.genderPresentation]])]),a("label",CT,[l[170]||(l[170]=a("span",null,"年龄阶段",-1)),$e(a("input",{"onUpdate:modelValue":l[42]||(l[42]=R=>Ke.value.ageStage=R),type:"text",placeholder:"例如 adult、young adult、middle-aged"},null,512),[[Ue,Ke.value.ageStage]])]),a("label",ST,[l[171]||(l[171]=a("span",null,"物种 / 种族",-1)),$e(a("input",{"onUpdate:modelValue":l[43]||(l[43]=R=>Ke.value.species=R),type:"text",placeholder:"例如 human、elf、android"},null,512),[[Ue,Ke.value.species]])]),a("label",IT,[l[172]||(l[172]=a("span",null,"体型",-1)),$e(a("input",{"onUpdate:modelValue":l[44]||(l[44]=R=>Ke.value.bodyType=R),type:"text",placeholder:"例如 slim、athletic、muscular"},null,512),[[Ue,Ke.value.bodyType]])]),a("label",null,[l[173]||(l[173]=a("span",null,"显著特征",-1)),$e(a("textarea",{"onUpdate:modelValue":l[45]||(l[45]=R=>Ke.value.distinctiveFeatures=R),rows:"3",placeholder:"伤疤、异色瞳、义体、角、纹身或固定视觉记忆点。"},null,512),[[Ue,Ke.value.distinctiveFeatures]])]),a("label",null,[l[174]||(l[174]=a("span",null,"性格关键词",-1)),$e(a("textarea",{"onUpdate:modelValue":l[46]||(l[46]=R=>Ke.value.personality=R),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Ue,Ke.value.personality]])]),a("label",null,[l[175]||(l[175]=a("span",null,"外观特征",-1)),$e(a("textarea",{"onUpdate:modelValue":l[47]||(l[47]=R=>Ke.value.appearance=R),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Ue,Ke.value.appearance]])]),a("label",null,[l[176]||(l[176]=a("span",null,"服装与配饰",-1)),$e(a("textarea",{"onUpdate:modelValue":l[48]||(l[48]=R=>Ke.value.outfit=R),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Ue,Ke.value.outfit]])]),a("label",null,[l[177]||(l[177]=a("span",null,"常用场景",-1)),$e(a("textarea",{"onUpdate:modelValue":l[49]||(l[49]=R=>Ke.value.scene=R),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Ue,Ke.value.scene]])]),a("label",null,[l[178]||(l[178]=a("span",null,"避雷内<E99BB7><E58685>
|