This commit is contained in:
vastxie
2024-01-21 09:03:26 +08:00
parent cbd4c034fb
commit 3bd4bb5df1
291 changed files with 378 additions and 13717 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
import{an as t,am as r,aN as o,d as a,av as d,c2 as s,ac as p}from"./index-6bc7e56b.js";const n=t("input-group",`
import{am as t,al as r,aN as o,d as a,au as d,c6 as s,ab as p}from"./index-bf4d935c.js";const n=t("input-group",`
display: inline-flex;
width: 100%;
flex-wrap: nowrap;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{c8 as b,c9 as I,ca as v,d as R,c3 as S,r as V,b as N,e as A,aH as T}from"./index-6bc7e56b.js";var F=1/0,x=17976931348623157e292;function E(t){if(!t)return t===0?t:0;if(t=b(t),t===F||t===-F){var e=t<0?-1:1;return e*x}return t===t?t:0}function _(t){var e=E(t),a=e%1;return e===e?a?e-a:e:0}var p=I.isFinite,B=Math.min;function L(t){var e=Math[t];return function(a,n){if(a=b(a),n=n==null?0:B(_(n),292),n&&p(a)){var r=(v(a)+"e").split("e"),i=e(r[0]+"e"+(+r[1]+n));return r=(v(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(a)}}var O=L("round");const P=O,U=t=>1-Math.pow(1-t,5);function j(t){const{from:e,to:a,duration:n,onUpdate:r,onFinish:i}=t,c=()=>{const u=performance.now(),s=Math.min(u-d,n),f=e+(a-e)*U(s/n);if(s===n){i();return}r(f),requestAnimationFrame(c)},d=performance.now();c()}const k={to:{type:Number,default:0},precision:{type:Number,default:0},showSeparator:Boolean,locale:String,from:{type:Number,default:0},active:{type:Boolean,default:!0},duration:{type:Number,default:2e3},onFinish:Function},G=R({name:"NumberAnimation",props:k,setup(t){const{localeRef:e}=S("name"),{duration:a}=t,n=V(t.from),r=N(()=>{const{locale:o}=t;return o!==void 0?o:e.value});let i=!1;const c=o=>{n.value=o},d=()=>{var o;n.value=t.to,i=!1,(o=t.onFinish)===null||o===void 0||o.call(t)},u=(o=t.from,m=t.to)=>{i=!0,n.value=t.from,o!==m&&j({from:o,to:m,duration:a,onUpdate:c,onFinish:d})},s=N(()=>{var o;const l=P(n.value,t.precision).toFixed(t.precision).split("."),h=new Intl.NumberFormat(r.value),M=(o=h.formatToParts(.5).find(y=>y.type==="decimal"))===null||o===void 0?void 0:o.value,g=t.showSeparator?h.format(Number(l[0])):l[0],w=l[1];return{integer:g,decimal:w,decimalSeparator:M}});function f(){i||u()}return A(()=>{T(()=>{t.active&&u()})}),Object.assign({formattedValue:s},{play:f})},render(){const{formattedValue:{integer:t,decimal:e,decimalSeparator:a}}=this;return[t,e?a:null,e]}});export{G as N};

View File

@@ -1,4 +1,4 @@
import{aA as O,d as b,c3 as m,av as y,aa as _,b as u,az as S,aQ as h,aD as g,ac as a,b8 as B,cf as w,z as P,aq as R,at as I,an as C,aN as f,am as x,aw as z,r as $,ch as U,cj as F,O as q,ck as E,cU as K,aW as k,aS as V}from"./index-6bc7e56b.js";const N=O("n-popconfirm"),j={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},T=w(j),W=b({name:"NPopconfirmPanel",props:j,setup(e){const{localeRef:t}=m("Popconfirm"),{inlineThemeDisabled:s}=y(),{mergedClsPrefixRef:n,mergedThemeRef:p,props:l}=_(N),d=u(()=>{const{common:{cubicBezierEaseInOut:i},self:{fontSize:c,iconSize:v,iconColor:r}}=p.value;return{"--n-bezier":i,"--n-font-size":c,"--n-icon-size":v,"--n-icon-color":r}}),o=s?S("popconfirm-panel",void 0,d,l):void 0;return Object.assign(Object.assign({},m("Popconfirm")),{mergedClsPrefix:n,cssVars:s?void 0:d,localizedPositiveText:u(()=>e.positiveText||t.value.positiveText),localizedNegativeText:u(()=>e.negativeText||t.value.negativeText),positiveButtonProps:h(l,"positiveButtonProps"),negativeButtonProps:h(l,"negativeButtonProps"),handlePositiveClick(i){e.onPositiveClick(i)},handleNegativeClick(i){e.onNegativeClick(i)},themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:s,$slots:n}=this,p=g(n.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&a(P,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&a(P,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(e=this.onRender)===null||e===void 0||e.call(this),a("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},B(n.default,l=>s||l?a("div",{class:`${t}-popconfirm__body`},s?a("div",{class:`${t}-popconfirm__icon`},g(n.icon,()=>[a(R,{clsPrefix:t},{default:()=>a(I,null)})])):null,l):null),p?a("div",{class:[`${t}-popconfirm__action`]},p):null)}}),D=C("popconfirm",[f("body",`
import{az as O,d as T,c2 as m,au as y,aA as _,b as u,ay as S,aQ as h,aD as g,ab as a,b8 as B,cf as w,z as P,ap as R,as as I,am as C,aN as f,al as x,av as z,r as $,ch as U,cj as F,O as E,ck as K,cU as V,aW as k,aS as W}from"./index-bf4d935c.js";const N=O("n-popconfirm"),j={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},b=w(j),q=T({name:"NPopconfirmPanel",props:j,setup(e){const{localeRef:t}=m("Popconfirm"),{inlineThemeDisabled:s}=y(),{mergedClsPrefixRef:n,mergedThemeRef:p,props:r}=_(N),d=u(()=>{const{common:{cubicBezierEaseInOut:i},self:{fontSize:c,iconSize:v,iconColor:l}}=p.value;return{"--n-bezier":i,"--n-font-size":c,"--n-icon-size":v,"--n-icon-color":l}}),o=s?S("popconfirm-panel",void 0,d,r):void 0;return Object.assign(Object.assign({},m("Popconfirm")),{mergedClsPrefix:n,cssVars:s?void 0:d,localizedPositiveText:u(()=>e.positiveText||t.value.positiveText),localizedNegativeText:u(()=>e.negativeText||t.value.negativeText),positiveButtonProps:h(r,"positiveButtonProps"),negativeButtonProps:h(r,"negativeButtonProps"),handlePositiveClick(i){e.onPositiveClick(i)},handleNegativeClick(i){e.onNegativeClick(i)},themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender})},render(){var e;const{mergedClsPrefix:t,showIcon:s,$slots:n}=this,p=g(n.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&a(P,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&a(P,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(e=this.onRender)===null||e===void 0||e.call(this),a("div",{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},B(n.default,r=>s||r?a("div",{class:`${t}-popconfirm__body`},s?a("div",{class:`${t}-popconfirm__icon`},g(n.icon,()=>[a(R,{clsPrefix:t},{default:()=>a(I,null)})])):null,r):null),p?a("div",{class:[`${t}-popconfirm__action`]},p):null)}}),D=C("popconfirm",[f("body",`
font-size: var(--n-font-size);
display: flex;
align-items: center;
@@ -13,4 +13,4 @@ import{aA as O,d as b,c3 as m,av as y,aa as _,b as u,az as S,aQ as h,aD as g,ac
`)]),f("action",`
display: flex;
justify-content: flex-end;
`,[x("&:not(:first-child)","margin-top: 8px"),C("button",[x("&:not(:last-child)","margin-right: 8px;")])])]),L=Object.assign(Object.assign(Object.assign({},z.props),E),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function}),A=b({name:"Popconfirm",props:L,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=y(),s=z("Popconfirm","-popconfirm",D,K,e,t),n=$(null);function p(o){const{onPositiveClick:i,"onUpdate:show":c}=e;Promise.resolve(i?i(o):!0).then(v=>{var r;v!==!1&&((r=n.value)===null||r===void 0||r.setShow(!1),c&&k(c,!1))})}function l(o){const{onNegativeClick:i,"onUpdate:show":c}=e;Promise.resolve(i?i(o):!0).then(v=>{var r;v!==!1&&((r=n.value)===null||r===void 0||r.setShow(!1),c&&k(c,!1))})}return V(N,{mergedThemeRef:s,mergedClsPrefixRef:t,props:e}),Object.assign(Object.assign({},{setShow(o){var i;(i=n.value)===null||i===void 0||i.setShow(o)},syncPosition(){var o;(o=n.value)===null||o===void 0||o.syncPosition()}}),{mergedTheme:s,popoverInstRef:n,handlePositiveClick:p,handleNegativeClick:l})},render(){const{$slots:e,$props:t,mergedTheme:s}=this;return a(q,F(t,T,{theme:s.peers.Popover,themeOverrides:s.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.activator||e.trigger,default:()=>{const n=U(t,T);return a(W,Object.assign(Object.assign({},n),{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}});export{A as N};
`,[x("&:not(:first-child)","margin-top: 8px"),C("button",[x("&:not(:last-child)","margin-right: 8px;")])])]),L=Object.assign(Object.assign(Object.assign({},z.props),K),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:"click"},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function}),A=T({name:"Popconfirm",props:L,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=y(),s=z("Popconfirm","-popconfirm",D,V,e,t),n=$(null);function p(o){const{onPositiveClick:i,"onUpdate:show":c}=e;Promise.resolve(i?i(o):!0).then(v=>{var l;v!==!1&&((l=n.value)===null||l===void 0||l.setShow(!1),c&&k(c,!1))})}function r(o){const{onNegativeClick:i,"onUpdate:show":c}=e;Promise.resolve(i?i(o):!0).then(v=>{var l;v!==!1&&((l=n.value)===null||l===void 0||l.setShow(!1),c&&k(c,!1))})}return W(N,{mergedThemeRef:s,mergedClsPrefixRef:t,props:e}),Object.assign(Object.assign({},{setShow(o){var i;(i=n.value)===null||i===void 0||i.setShow(o)},syncPosition(){var o;(o=n.value)===null||o===void 0||o.syncPosition()}}),{mergedTheme:s,popoverInstRef:n,handlePositiveClick:p,handleNegativeClick:r})},render(){const{$slots:e,$props:t,mergedTheme:s}=this;return a(E,F(t,b,{theme:s.peers.Popover,themeOverrides:s.peerOverrides.Popover,internalExtraClass:["popconfirm"],ref:"popoverInstRef"}),{trigger:e.activator||e.trigger,default:()=>{const n=U(t,b);return a(q,Object.assign(Object.assign({},n),{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}});export{A as N};

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
import{an as A,aN as t,aO as I,am as D,ao as o,b6 as O,d as se,av as de,aw as E,aP as ce,r as K,aQ as ue,aR as he,b as V,az as be,b7 as U,ac as i,b8 as f,b9 as fe,ay as v,ba as j,bb as r,aJ as ve,bc as ge,aW as H}from"./index-6bc7e56b.js";const we=A("switch",`
import{am as A,aN as t,aO as I,al as D,an as o,b6 as O,d as se,au as de,av as E,aP as ce,r as K,aQ as ue,aR as he,b as V,ay as be,b7 as U,ab as i,b8 as f,b9 as fe,ax as v,ba as j,bb as r,aJ as ve,bc as ge,aW as H}from"./index-bf4d935c.js";const we=A("switch",`
height: var(--n-height);
min-width: var(--n-width);
vertical-align: middle;
@@ -99,4 +99,4 @@ import{an as A,aN as t,aO as I,am as D,ao as o,b6 as O,d as se,av as de,aw as E,
`)]),o("disabled",[t("rail",`
cursor: not-allowed;
opacity: .5;
`)])]),me=Object.assign(Object.assign({},E.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let x;const ye=se({name:"Switch",props:me,setup(e){x===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?x=CSS.supports("width","max(1px)"):x=!1:x=!0);const{mergedClsPrefixRef:S,inlineThemeDisabled:m}=de(e),z=E("Switch","-switch",we,fe,e,S),l=ce(e),{mergedSizeRef:$,mergedDisabledRef:h}=l,p=K(e.defaultValue),C=ue(e,"value"),b=he(C,p),y=V(()=>b.value===e.checkedValue),g=K(!1),n=K(!1),s=V(()=>{const{railStyle:a}=e;if(a)return a({focused:n.value,checked:y.value})});function d(a){const{"onUpdate:value":R,onChange:B,onUpdateValue:_}=e,{nTriggerFormInput:F,nTriggerFormChange:N}=l;R&&H(R,a),_&&H(_,a),B&&H(B,a),p.value=a,F(),N()}function L(){const{nTriggerFormFocus:a}=l;a()}function X(){const{nTriggerFormBlur:a}=l;a()}function Y(){e.loading||h.value||(b.value!==e.checkedValue?d(e.checkedValue):d(e.uncheckedValue))}function J(){n.value=!0,L()}function Q(){n.value=!1,X(),g.value=!1}function q(a){e.loading||h.value||a.key===" "&&(b.value!==e.checkedValue?d(e.checkedValue):d(e.uncheckedValue),g.value=!1)}function G(a){e.loading||h.value||a.key===" "&&(a.preventDefault(),g.value=!0)}const M=V(()=>{const{value:a}=$,{self:{opacityDisabled:R,railColor:B,railColorActive:_,buttonBoxShadow:F,buttonColor:N,boxShadowFocus:Z,loadingColor:ee,textColor:te,iconColor:ae,[v("buttonHeight",a)]:c,[v("buttonWidth",a)]:ne,[v("buttonWidthPressed",a)]:ie,[v("railHeight",a)]:u,[v("railWidth",a)]:k,[v("railBorderRadius",a)]:oe,[v("buttonBorderRadius",a)]:re},common:{cubicBezierEaseInOut:le}}=z.value;let T,W,P;return x?(T=`calc((${u} - ${c}) / 2)`,W=`max(${u}, ${c})`,P=`max(${k}, calc(${k} + ${c} - ${u}))`):(T=j((r(u)-r(c))/2),W=j(Math.max(r(u),r(c))),P=r(u)>r(c)?k:j(r(k)+r(c)-r(u))),{"--n-bezier":le,"--n-button-border-radius":re,"--n-button-box-shadow":F,"--n-button-color":N,"--n-button-width":ne,"--n-button-width-pressed":ie,"--n-button-height":c,"--n-height":W,"--n-offset":T,"--n-opacity-disabled":R,"--n-rail-border-radius":oe,"--n-rail-color":B,"--n-rail-color-active":_,"--n-rail-height":u,"--n-rail-width":k,"--n-width":P,"--n-box-shadow-focus":Z,"--n-loading-color":ee,"--n-text-color":te,"--n-icon-color":ae}}),w=m?be("switch",V(()=>$.value[0]),M,e):void 0;return{handleClick:Y,handleBlur:Q,handleFocus:J,handleKeyup:q,handleKeydown:G,mergedRailStyle:s,pressed:g,mergedClsPrefix:S,mergedValue:b,checked:y,mergedDisabled:h,cssVars:m?void 0:M,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:S,checked:m,mergedRailStyle:z,onRender:l,$slots:$}=this;l==null||l();const{checked:h,unchecked:p,icon:C,"checked-icon":b,"unchecked-icon":y}=$,g=!(U(C)&&U(b)&&U(y));return i("div",{role:"switch","aria-checked":m,class:[`${e}-switch`,this.themeClass,g&&`${e}-switch--icon`,m&&`${e}-switch--active`,S&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},i("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:z},f(h,n=>f(p,s=>n||s?i("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),n),i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),s)):null)),i("div",{class:`${e}-switch__button`},f(C,n=>f(b,s=>f(y,d=>i(ve,null,{default:()=>this.loading?i(ge,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(s||n)?i("div",{class:`${e}-switch__button-icon`,key:s?"checked-icon":"icon"},s||n):!this.checked&&(d||n)?i("div",{class:`${e}-switch__button-icon`,key:d?"unchecked-icon":"icon"},d||n):null})))),f(h,n=>n&&i("div",{key:"checked",class:`${e}-switch__checked`},n)),f(p,n=>n&&i("div",{key:"unchecked",class:`${e}-switch__unchecked`},n)))))}});export{ye as N};
`)])]),me=Object.assign(Object.assign({},E.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let k;const ye=se({name:"Switch",props:me,setup(e){k===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?k=CSS.supports("width","max(1px)"):k=!1:k=!0);const{mergedClsPrefixRef:S,inlineThemeDisabled:m}=de(e),z=E("Switch","-switch",we,fe,e,S),l=ce(e),{mergedSizeRef:$,mergedDisabledRef:h}=l,p=K(e.defaultValue),C=ue(e,"value"),b=he(C,p),y=V(()=>b.value===e.checkedValue),g=K(!1),n=K(!1),s=V(()=>{const{railStyle:a}=e;if(a)return a({focused:n.value,checked:y.value})});function d(a){const{"onUpdate:value":R,onChange:B,onUpdateValue:_}=e,{nTriggerFormInput:F,nTriggerFormChange:N}=l;R&&H(R,a),_&&H(_,a),B&&H(B,a),p.value=a,F(),N()}function L(){const{nTriggerFormFocus:a}=l;a()}function X(){const{nTriggerFormBlur:a}=l;a()}function Y(){e.loading||h.value||(b.value!==e.checkedValue?d(e.checkedValue):d(e.uncheckedValue))}function J(){n.value=!0,L()}function Q(){n.value=!1,X(),g.value=!1}function q(a){e.loading||h.value||a.key===" "&&(b.value!==e.checkedValue?d(e.checkedValue):d(e.uncheckedValue),g.value=!1)}function G(a){e.loading||h.value||a.key===" "&&(a.preventDefault(),g.value=!0)}const M=V(()=>{const{value:a}=$,{self:{opacityDisabled:R,railColor:B,railColorActive:_,buttonBoxShadow:F,buttonColor:N,boxShadowFocus:Z,loadingColor:ee,textColor:te,iconColor:ae,[v("buttonHeight",a)]:c,[v("buttonWidth",a)]:ne,[v("buttonWidthPressed",a)]:ie,[v("railHeight",a)]:u,[v("railWidth",a)]:x,[v("railBorderRadius",a)]:oe,[v("buttonBorderRadius",a)]:re},common:{cubicBezierEaseInOut:le}}=z.value;let T,W,P;return k?(T=`calc((${u} - ${c}) / 2)`,W=`max(${u}, ${c})`,P=`max(${x}, calc(${x} + ${c} - ${u}))`):(T=j((r(u)-r(c))/2),W=j(Math.max(r(u),r(c))),P=r(u)>r(c)?x:j(r(x)+r(c)-r(u))),{"--n-bezier":le,"--n-button-border-radius":re,"--n-button-box-shadow":F,"--n-button-color":N,"--n-button-width":ne,"--n-button-width-pressed":ie,"--n-button-height":c,"--n-height":W,"--n-offset":T,"--n-opacity-disabled":R,"--n-rail-border-radius":oe,"--n-rail-color":B,"--n-rail-color-active":_,"--n-rail-height":u,"--n-rail-width":x,"--n-width":P,"--n-box-shadow-focus":Z,"--n-loading-color":ee,"--n-text-color":te,"--n-icon-color":ae}}),w=m?be("switch",V(()=>$.value[0]),M,e):void 0;return{handleClick:Y,handleBlur:Q,handleFocus:J,handleKeyup:q,handleKeydown:G,mergedRailStyle:s,pressed:g,mergedClsPrefix:S,mergedValue:b,checked:y,mergedDisabled:h,cssVars:m?void 0:M,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:S,checked:m,mergedRailStyle:z,onRender:l,$slots:$}=this;l==null||l();const{checked:h,unchecked:p,icon:C,"checked-icon":b,"unchecked-icon":y}=$,g=!(U(C)&&U(b)&&U(y));return i("div",{role:"switch","aria-checked":m,class:[`${e}-switch`,this.themeClass,g&&`${e}-switch--icon`,m&&`${e}-switch--active`,S&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},i("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:z},f(h,n=>f(p,s=>n||s?i("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),n),i("div",{class:`${e}-switch__rail-placeholder`},i("div",{class:`${e}-switch__button-placeholder`}),s)):null)),i("div",{class:`${e}-switch__button`},f(C,n=>f(b,s=>f(y,d=>i(ve,null,{default:()=>this.loading?i(ge,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(s||n)?i("div",{class:`${e}-switch__button-icon`,key:s?"checked-icon":"icon"},s||n):!this.checked&&(d||n)?i("div",{class:`${e}-switch__button-icon`,key:d?"unchecked-icon":"icon"},d||n):null})))),f(h,n=>n&&i("div",{key:"checked",class:`${e}-switch__checked`},n)),f(p,n=>n&&i("div",{key:"unchecked",class:`${e}-switch__unchecked`},n)))))}});export{ye as N};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{d as s,I as a,c as o,a as c,f as r,w as n,u as l,j as d,o as i,A as x,z as u}from"./index-6bc7e56b.js";const p="/assets/404-0d6db85f.svg",_={class:"flex h-full"},f={class:"px-4 m-auto space-y-4 text-center max-[400px]"},m=d('<h1 class="text-4xl text-slate-800 dark:text-neutral-200"> 404 - 页面迷路了! </h1><p class="text-base text-slate-500 dark:text-neutral-400"> 哎呀!页面好像迷路了,找不到了。 </p><div class="flex items-center justify-center text-center"><div class="w-[300px]"><img class="w-full" src="'+p+'" alt="404"></div></div>',3),w=s({__name:"index",setup(h){const e=a();function t(){e.push("/")}return(v,k)=>(i(),o("div",_,[c("div",f,[m,r(l(u),{type:"primary",onClick:t},{default:n(()=>[x(" Go to Home ")]),_:1})])]))}});export{w as default};
import{d as s,I as a,c as o,a as c,f as r,w as n,u as l,j as d,o as i,A as x,z as u}from"./index-bf4d935c.js";const p="/assets/404-0d6db85f.svg",_={class:"flex h-full"},f={class:"px-4 m-auto space-y-4 text-center max-[400px]"},m=d('<h1 class="text-4xl text-slate-800 dark:text-neutral-200"> 404 - 页面迷路了! </h1><p class="text-base text-slate-500 dark:text-neutral-400"> 哎呀!页面好像迷路了,找不到了。 </p><div class="flex items-center justify-center text-center"><div class="w-[300px]"><img class="w-full" src="'+p+'" alt="404"></div></div>',3),w=s({__name:"index",setup(h){const e=a();function t(){e.push("/")}return(v,k)=>(i(),o("div",_,[c("div",f,[m,r(l(u),{type:"primary",onClick:t},{default:n(()=>[x(" Go to Home ")]),_:1})])]))}});export{w as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{d as b,I as E,ae as B,r as I,b as c,m as S,p as C,e as L,cP as D,Z as F,c as h,q as g,u as r,a as i,v as M,cQ as W,j as A,o as _}from"./index-6bc7e56b.js";const N={class:"w-full h-full relative"},T={class:"loading"},U=A('<span class="loading-text-words">内</span><span class="loading-text-words">容</span><span class="loading-text-words">正</span><span class="loading-text-words">在</span><span class="loading-text-words">加</span><span class="loading-text-words">载</span><span class="loading-text-words">中</span>',7),V=[U],j=["src"],z=b({__name:"index",setup(G){const v=E(),l=B(),n=I(!1),u=c(()=>l.iframeUrl),o=S(),p=c(()=>o.theme==="dark");function w(){const e=document.getElementById("iframe");e!=null&&e.addEventListener||e==null||e.attachEvent("onload",d),e==null||e.addEventListener("load",d,!0)}const m=c(()=>o.theme);C(m,e=>{s({type:"theme",data:e})}),L(()=>{if(!u.value)return v.push("/");n.value=!0,w(),window.addEventListener("message",f)});async function f(e){const{type:t,data:a}=e.data;t==="theme"&&o.setTheme(a==="dark"?"dark":"light"),t==="chat"&&x(a)}function x(e){D({prompt:e}).then(t=>{const{code:a,data:k}=t;a===200&&s({type:"chat",data:y(k)})})}function y(e){const t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e.replace(t,"")}function s(e){document.getElementById("iframe").contentWindow.postMessage(e,"*")}function d(){s({type:"theme",data:m.value});const e=W();e&&s({type:"token",data:e}),n.value=!1}return F(()=>{l.updateIframeUrl("");const e=document.getElementById("iframe");e==null||e.removeEventListener("load",d),window.removeEventListener("message",f)}),(e,t)=>(_(),h("div",N,[n.value?(_(),h("div",{key:0,class:g(["main-container absolute left-0 right-0 bottom-0 top-0 backdrop-blur",[r(p)?"dark:bg-black/20":"bg-white/80"]])},[i("div",T,[i("div",{class:g(["loading-text ",r(p)?"text-[#fff]":"text-[#000]"]),id:"loading-text"},V,2)])],2)):M("",!0),i("iframe",{id:"iframe",src:r(u),style:{width:"100%",height:"100%",border:"none"}},null,8,j)]))}});export{z as default};
import{d as b,I as E,ad as B,r as I,b as c,m as S,p as C,e as L,cP as D,Z as F,c as h,q as g,u as r,a as i,v as M,cQ as W,j as A,o as _}from"./index-bf4d935c.js";const N={class:"w-full h-full relative"},T={class:"loading"},U=A('<span class="loading-text-words">内</span><span class="loading-text-words">容</span><span class="loading-text-words">正</span><span class="loading-text-words">在</span><span class="loading-text-words">加</span><span class="loading-text-words">载</span><span class="loading-text-words">中</span>',7),V=[U],j=["src"],z=b({__name:"index",setup(G){const v=E(),l=B(),n=I(!1),u=c(()=>l.iframeUrl),o=S(),p=c(()=>o.theme==="dark");function w(){const e=document.getElementById("iframe");e!=null&&e.addEventListener||e==null||e.attachEvent("onload",d),e==null||e.addEventListener("load",d,!0)}const m=c(()=>o.theme);C(m,e=>{s({type:"theme",data:e})}),L(()=>{if(!u.value)return v.push("/");n.value=!0,w(),window.addEventListener("message",f)});async function f(e){const{type:t,data:a}=e.data;t==="theme"&&o.setTheme(a==="dark"?"dark":"light"),t==="chat"&&x(a)}function x(e){D({prompt:e}).then(t=>{const{code:a,data:k}=t;a===200&&s({type:"chat",data:y(k)})})}function y(e){const t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e.replace(t,"")}function s(e){document.getElementById("iframe").contentWindow.postMessage(e,"*")}function d(){s({type:"theme",data:m.value});const e=W();e&&s({type:"token",data:e}),n.value=!1}return F(()=>{l.updateIframeUrl("");const e=document.getElementById("iframe");e==null||e.removeEventListener("load",d),window.removeEventListener("message",f)}),(e,t)=>(_(),h("div",N,[n.value?(_(),h("div",{key:0,class:g(["main-container absolute left-0 right-0 bottom-0 top-0 backdrop-blur",[r(p)?"dark:bg-black/20":"bg-white/80"]])},[i("div",T,[i("div",{class:g(["loading-text ",r(p)?"text-[#fff]":"text-[#000]"]),id:"loading-text"},V,2)])],2)):M("",!0),i("iframe",{id:"iframe",src:r(u),style:{width:"100%",height:"100%",border:"none"}},null,8,j)]))}});export{z as default};

View File

@@ -1 +1 @@
import{d as f,o as h,c as w,a as e,r as t,b as y,e as b,f as r,u as n,w as L,g as M,N,h as j,i as B}from"./index-6bc7e56b.js";import{_ as I}from"./index.vue_vue_type_style_index_0_lang-7c08790a.js";import"./index-c94da121.js";const $={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},z=e("path",{d:"M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 0 0 2.33 2.77h0a2.36 2.36 0 0 0 1.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 0 0-2.44-2.75h0a2.42 2.42 0 0 0-1.95 1z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=[z],W=f({name:"FlashOutline",render:function(a,u){return h(),w("svg",$,C)}}),D={class:"bg-[#fff] h-[100vh] overflow-hidden p-4 pr-0 dark:bg-[#18181c] flex flex-col"},F={class:"p-4 flex pr-6 justify-between items-center"},O=e("div",{class:"font-bold text-xl"},"AI绘画广场",-1),R={class:"w-[200px] sm:w-[300px] flex justify-between"},U=e("span",{class:"hidden sm:block"},"尺寸调整",-1),V={class:"flex-1 ml-5"},q={class:"px-4 mb-1 pr-5"},A={class:"market overflow-y-scroll flex-1 min-h-screen p-4 dark:bg-[#18181c] relative"},P=f({__name:"index",setup(m){const a=t([]),u=t(null),i=t(50),l=t(""),c=t(1),p=t(20),v=t(!1),x=t(!0),g=y(()=>l.value?a.value.filter(o=>{const{prompt:s}=o;return s.includes(l.value)}):a.value);async function _(){v.value=!0;const o=await M({page:c.value,size:p.value,rec:1});v.value=!1,x.value=p.value===o.data.rows.length,a.value=[...a.value,...o.data.rows]}b(async()=>{await _()});function k(){c.value=c.value+1,_()}return(o,s)=>(h(),w("div",D,[e("div",F,[O,e("div",R,[U,e("div",V,[r(n(N),{value:i.value,"onUpdate:value":s[0]||(s[0]=d=>i.value=d),step:10},null,8,["value"])])])]),e("div",q,[r(n(B),{value:l.value,"onUpdate:value":s[1]||(s[1]=d=>l.value=d),placeholder:"prompt关键词搜索"},{prefix:L(()=>[r(n(j),{component:n(W)},null,8,["component"])]),_:1},8,["value"])]),e("div",A,[e("div",{id:"wapper",ref_key:"wapperRef",ref:u,class:"wapper"},[r(I,{onLoadMore:k,copyPropmpt:"",isDrawLike:"",dataList:n(g),scaleWidth:i.value},null,8,["dataList","scaleWidth"])],512)])]))}});export{P as default};
import{d as f,o as h,c as w,a as e,r as t,b as y,e as b,f as r,u as n,w as L,g as M,N,h as j,i as B}from"./index-bf4d935c.js";import{_ as I}from"./index.vue_vue_type_style_index_0_lang-c29c7111.js";import"./index-c94da121.js";const $={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},z=e("path",{d:"M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 0 0 2.33 2.77h0a2.36 2.36 0 0 0 1.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 0 0-2.44-2.75h0a2.42 2.42 0 0 0-1.95 1z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=[z],W=f({name:"FlashOutline",render:function(a,u){return h(),w("svg",$,C)}}),D={class:"bg-[#fff] h-[100vh] overflow-hidden p-4 pr-0 dark:bg-[#18181c] flex flex-col"},F={class:"p-4 flex pr-6 justify-between items-center"},O=e("div",{class:"font-bold text-xl"},"AI绘画广场",-1),R={class:"w-[200px] sm:w-[300px] flex justify-between"},U=e("span",{class:"hidden sm:block"},"尺寸调整",-1),V={class:"flex-1 ml-5"},q={class:"px-4 mb-1 pr-5"},A={class:"market overflow-y-scroll flex-1 min-h-screen p-4 dark:bg-[#18181c] relative"},P=f({__name:"index",setup(m){const a=t([]),u=t(null),i=t(50),l=t(""),c=t(1),p=t(20),v=t(!1),x=t(!0),g=y(()=>l.value?a.value.filter(o=>{const{prompt:s}=o;return s.includes(l.value)}):a.value);async function _(){v.value=!0;const o=await M({page:c.value,size:p.value,rec:1});v.value=!1,x.value=p.value===o.data.rows.length,a.value=[...a.value,...o.data.rows]}b(async()=>{await _()});function k(){c.value=c.value+1,_()}return(o,s)=>(h(),w("div",D,[e("div",F,[O,e("div",R,[U,e("div",V,[r(n(N),{value:i.value,"onUpdate:value":s[0]||(s[0]=d=>i.value=d),step:10},null,8,["value"])])])]),e("div",q,[r(n(B),{value:l.value,"onUpdate:value":s[1]||(s[1]=d=>l.value=d),placeholder:"prompt关键词搜索"},{prefix:L(()=>[r(n(j),{component:n(W)},null,8,["component"])]),_:1},8,["value"])]),e("div",A,[e("div",{id:"wapper",ref_key:"wapperRef",ref:u,class:"wapper"},[r(I,{onLoadMore:k,copyPropmpt:"",isDrawLike:"",dataList:n(g),scaleWidth:i.value},null,8,["dataList","scaleWidth"])],512)])]))}});export{P as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
import{bH as fr,a9 as Rc,d as Ic,k as Nc,ae as qc,n as Oc,r as wr,e as Zi,ad as Lc,c as Ji,a as De,f as Te,u as Me,w as sr,bY as Pc,o as Qi,i as eu,A as _r,z as Cr,_ as Yn,bZ as zc}from"./index-6bc7e56b.js";import{r as $c}from"./katex-46472764.js";var nt={exports:{}};/*! markmap-lib v0.14.4 | MIT License */(function(r,n){(function(i,a){a(n,$c())})(fr,function(i,a){function c(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var p=c(a);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l])}return e},d.apply(this,arguments)}/*! markmap-common v0.14.2 | MIT License */class g{constructor(){this.listeners=[]}tap(t){return this.listeners.push(t),()=>this.revoke(t)}revoke(t){const u=this.listeners.indexOf(t);u>=0&&this.listeners.splice(u,1)}revokeAll(){this.listeners.splice(0)}call(...t){for(const u of this.listeners)u(...t)}}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l])}return e},v.apply(this,arguments)}function A(e,t){if(e==null)return{};var u={},l=Object.keys(e),o,s;for(s=0;s<l.length;s++)o=l[s],!(t.indexOf(o)>=0)&&(u[o]=e[o]);return u}const x=["textContent"];function k(e){return e.replace(/[&<"]/g,t=>({"&":"&amp;","<":"&lt;",'"':"&quot;"})[t])}function D(e){return e.replace(/<(\/script>)/g,"\\x3c$2")}function E(e,t){const u=t?Object.entries(t).map(([l,o])=>{if(!(o==null||o===!1))return l=` ${k(l)}`,o===!0?l:`${l}="${k(o)}"`}).filter(Boolean).join(""):"";return`<${e}${u}>`}function j(e){return`</${e}>`}function z(e,t,u){return t==null?E(e,u):E(e,u)+(t||"")+j(e)}function Z(e,t){const u=t.map(l=>typeof l=="function"?l.toString():JSON.stringify(l??null)).join(",");return`(${e.toString()})(${u})`}function q(e,t){return e.map(u=>{if(u.type==="script"){const l=u.data,{textContent:o}=l,s=A(l,x);return z("script",o||"",s)}if(u.type==="iife"){const{fn:l,getParams:o}=u.data;return z("script",D(Z(l,(o==null?void 0:o(t))||[])))}return""})}function Y(e){return e.map(t=>t.type==="stylesheet"?z("link",null,v({rel:"stylesheet"},t.data)):z("style",t.data))}Math.random().toString(36).slice(2,8);function ue(e,{before:t,after:u}){return function(...o){const s={args:o,thisObj:this};try{t&&t(s)}catch{}s.result=e.apply(s.thisObj,s.args);try{u&&u(s)}catch{}return s.result}}function se(e){const t={};return function(...l){const o=`${l[0]}`;let s=t[o];return s||(s={value:e(...l)},t[o]=s),s.value}}function ce(e,t,u){const l=document.createElement(e);return t&&Object.entries(t).forEach(([o,s])=>{l[o]=s}),u&&Object.entries(u).forEach(([o,s])=>{l.setAttribute(o,s)}),l}const oe=se(e=>{document.head.append(ce("link",{rel:"preload",as:"script",href:e}))});async function R(e,t){if(!e.loaded&&(e.type==="script"&&(e.loaded=new Promise((u,l)=>{var o;document.head.append(ce("script",v({},e.data,{onload:u,onerror:l}))),(o=e.data)!=null&&o.src||u(void 0)}).then(()=>{e.loaded=!0})),e.type==="iife")){const{fn:u,getParams:l}=e.data;u(...(l==null?void 0:l(t))||[]),e.loaded=!0}await e.loaded}async function I(e,t){const u=e.filter(l=>{var o;return l.type==="script"&&((o=l.data)==null?void 0:o.src)});u.length>1&&u.forEach(l=>oe(l.data.src)),t=v({getMarkmap:()=>window.markmap},t);for(const l of e)await R(l,t)}const U=`<!DOCTYPE html>
import{bH as fr,a9 as Rc,d as Ic,k as Nc,ad as qc,n as Oc,r as wr,e as Zi,ac as Lc,c as Ji,a as De,f as Te,u as Me,w as sr,bY as Pc,o as Qi,i as eu,A as _r,z as Cr,_ as Yn,bZ as zc}from"./index-bf4d935c.js";import{r as $c}from"./katex-a636beea.js";var nt={exports:{}};/*! markmap-lib v0.14.4 | MIT License */(function(r,n){(function(i,a){a(n,$c())})(fr,function(i,a){function c(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var p=c(a);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l])}return e},d.apply(this,arguments)}/*! markmap-common v0.14.2 | MIT License */class g{constructor(){this.listeners=[]}tap(t){return this.listeners.push(t),()=>this.revoke(t)}revoke(t){const u=this.listeners.indexOf(t);u>=0&&this.listeners.splice(u,1)}revokeAll(){this.listeners.splice(0)}call(...t){for(const u of this.listeners)u(...t)}}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l])}return e},v.apply(this,arguments)}function A(e,t){if(e==null)return{};var u={},l=Object.keys(e),o,s;for(s=0;s<l.length;s++)o=l[s],!(t.indexOf(o)>=0)&&(u[o]=e[o]);return u}const x=["textContent"];function k(e){return e.replace(/[&<"]/g,t=>({"&":"&amp;","<":"&lt;",'"':"&quot;"})[t])}function D(e){return e.replace(/<(\/script>)/g,"\\x3c$2")}function E(e,t){const u=t?Object.entries(t).map(([l,o])=>{if(!(o==null||o===!1))return l=` ${k(l)}`,o===!0?l:`${l}="${k(o)}"`}).filter(Boolean).join(""):"";return`<${e}${u}>`}function j(e){return`</${e}>`}function z(e,t,u){return t==null?E(e,u):E(e,u)+(t||"")+j(e)}function Z(e,t){const u=t.map(l=>typeof l=="function"?l.toString():JSON.stringify(l??null)).join(",");return`(${e.toString()})(${u})`}function q(e,t){return e.map(u=>{if(u.type==="script"){const l=u.data,{textContent:o}=l,s=A(l,x);return z("script",o||"",s)}if(u.type==="iife"){const{fn:l,getParams:o}=u.data;return z("script",D(Z(l,(o==null?void 0:o(t))||[])))}return""})}function Y(e){return e.map(t=>t.type==="stylesheet"?z("link",null,v({rel:"stylesheet"},t.data)):z("style",t.data))}Math.random().toString(36).slice(2,8);function ue(e,{before:t,after:u}){return function(...o){const s={args:o,thisObj:this};try{t&&t(s)}catch{}s.result=e.apply(s.thisObj,s.args);try{u&&u(s)}catch{}return s.result}}function se(e){const t={};return function(...l){const o=`${l[0]}`;let s=t[o];return s||(s={value:e(...l)},t[o]=s),s.value}}function ce(e,t,u){const l=document.createElement(e);return t&&Object.entries(t).forEach(([o,s])=>{l[o]=s}),u&&Object.entries(u).forEach(([o,s])=>{l.setAttribute(o,s)}),l}const oe=se(e=>{document.head.append(ce("link",{rel:"preload",as:"script",href:e}))});async function R(e,t){if(!e.loaded&&(e.type==="script"&&(e.loaded=new Promise((u,l)=>{var o;document.head.append(ce("script",v({},e.data,{onload:u,onerror:l}))),(o=e.data)!=null&&o.src||u(void 0)}).then(()=>{e.loaded=!0})),e.type==="iife")){const{fn:u,getParams:l}=e.data;u(...(l==null?void 0:l(t))||[]),e.loaded=!0}await e.loaded}async function I(e,t){const u=e.filter(l=>{var o;return l.type==="script"&&((o=l.data)==null?void 0:o.src)});u.length>1&&u.forEach(l=>oe(l.data.src)),t=v({getMarkmap:()=>window.markmap},t);for(const l of e)await R(l,t)}const U=`<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{d as se,k as ne,H as re,n as ae,r as u,b as I,I as ie,p as O,e as le,J as ce,c as _,a as s,K as x,F as ue,s as de,o as d,f as w,w as p,u as i,T as pe,t as he,C as L,M as $,_ as P,O as B,v as y,P as fe}from"./index-6bc7e56b.js";import{c as ve}from"./index-c94da121.js";function ge(a,v){let n,f;return function(...b){f=b,n||(n=setTimeout(()=>{a.apply(this,f),n=null},v))}}const me={class:"min-h-full overflow-hidden flex flex-col"},_e={class:"flex-1 min-h-full p-4 relative"},xe=["id"],we=["id","src","onLoad","onError","onClick"],ye={class:"menu p-2 text-[#cbd5e1]"},be={class:"prompt"},ke={class:"flex justify-end items-end space-x-2"},Ce=["onClick"],Ie={class:"text-sm dark:text-slate-400"},Le=s("span",null,"画同款",-1),$e=["onClick"],Pe={class:"text-sm dark:text-slate-400"},Be=s("span",null,"使用当前画同款",-1),Me=["onClick"],Ee={class:"text-sm dark:text-slate-400"},We=s("span",null,"复制提示词",-1),De=s("div",{id:"footer",class:"w-full absolute bottom-[350px]"},null,-1),Ne=se({__name:"index",props:{dataList:null,scaleWidth:null,isDrawLike:{type:Boolean},usePropmpt:{type:Boolean},copyPropmpt:{type:Boolean},gap:{default:5},preOrigin:{type:Boolean}},emits:["loadMore","usePropmptDraw"],setup(a,{emit:v}){var N;const n=a,f=ne(),M=(N=re())==null?void 0:N.appContext.config.globalProperties.$viewerApi,b=ae(),E=u({}),W=u(0),l=u(160),h=u(0),k=u([]),C=u(null),D=u(0),S=I(()=>f.isLogin),H=I(()=>n.scaleWidth?Number(n.scaleWidth)*2+n.gap+150:150),A=ie();function U(){F(),J();const t=h.value,o=l.value,e=[];n.dataList.forEach((c,r)=>{const{width:Z,height:ee}=c.fileInfo,te=o/Z,R=ee*te+n.gap+W.value,m=E.value[c.id];if(e.length<t)m.style.top="0px",m.style.left=`${(o+n.gap)*r}px`,e.push(R);else{const T=Math.min.apply(null,e),z=e.findIndex(oe=>oe===T);m.style.top=`${T+0}px`,m.style.left=`${z*(l.value+n.gap)}px`,e[z]+=R}}),D.value=Math.max(...e)+100}function V(t,o){t&&o&&(E.value[o.id]=t)}function F(){const{showName:t=0,showOther:o=0}={};W.value=[t,o].filter(e=>e).length*15}O(()=>n.scaleWidth,t=>{g()}),O(()=>n.dataList,t=>{t&&fe(()=>{g()})},{immediate:!0});function J(){if(!C.value)return;const t=C.value.clientWidth;h.value=Math.floor(t/H.value);const o=t-h.value*H.value,e=(h.value-1)*n.gap;o-e<0&&(h.value-=1),l.value=Math.floor((t-e)/h.value)}function K(t,o){k.value.push(o.id)}function q(t,o){k.value.push(o.id)}function G(t){if(!S.value)return f.setLoginDialog(!0);const{prompt:o}=t;ve({text:o}),b.success("复制prompt成功")}function Q(t){A.push(`/midjourney?mjId=${t.id}`)}function X(t){const{prompt:o}=t;v("usePropmptDraw",o)}function Y(t){const{fileInfo:o}=t,{cosUrl:e}=o;M({options:{},images:[e]})}const j=I(()=>t=>{const{fileInfo:o}=t,{width:e,height:c}=o;return c/(e/l.value)}),g=ge(function(){U()},200);return le(async()=>{window.addEventListener("resize",g);const t=document.getElementById("footer");new IntersectionObserver((e,c)=>{e.forEach(r=>{r.isIntersecting&&v("loadMore")})}).observe(t)}),ce(()=>{window.removeEventListener("resize",g)}),(t,o)=>(d(),_("div",me,[s("div",_e,[s("div",{id:"wapper",ref_key:"wapperRef",ref:C,class:"wapper",style:x({height:`${D.value}px`})},[(d(!0),_(ue,null,de(a.dataList,(e,c)=>(d(),_("div",{id:e.id,key:c,ref_for:!0,ref:r=>V(r,e),class:"wapper-item",style:x({width:`${l.value}px`})},[w(pe,{name:"img",css:!0},{default:p(()=>[s("img",{id:e.id,class:"item-file rounded-sm",style:x({width:`${l.value}px`,height:`${i(j)(e)}px`}),src:a.preOrigin?e.fileInfo.cosUrl:e.fileInfo.thumbImg,loading:"lazy",onLoad:r=>K(r,e),onError:r=>q(r,e),onClick:r=>Y(e)},null,44,we)]),_:2},1024),s("div",ye,[s("div",be,he(e.fullPrompt),1),s("div",ke,[a.isDrawLike?(d(),L(i(B),{key:0,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>Q(e),["stop"])},[s("span",Ie,[w(i(P),{icon:"fluent:draw-image-24-regular",class:"text-sm"})])],8,Ce)]),default:p(()=>[Le]),_:2},1024)):y("",!0),a.usePropmpt?(d(),L(i(B),{key:1,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>X(e),["stop"])},[s("span",Pe,[w(i(P),{icon:"fluent:draw-image-24-regular",class:"text-sm"})])],8,$e)]),default:p(()=>[Be]),_:2},1024)):y("",!0),a.copyPropmpt?(d(),L(i(B),{key:2,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>G(e),["stop"])},[s("span",Ee,[w(i(P),{icon:"tabler:copy",class:"text-sm"})])],8,Me)]),default:p(()=>[We]),_:2},1024)):y("",!0)])]),k.value.includes(e.id)?y("",!0):(d(),_("div",{key:0,class:"item-loading",style:x({width:`${l.value}px`,height:`${i(j)(e)}px`})},null,4))],12,xe))),128)),De],4)])]))}});export{Ne as _};
import{d as se,k as ne,H as re,n as ae,r as u,b as I,I as ie,p as O,e as le,J as ce,c as _,a as s,K as x,F as ue,s as de,o as d,f as w,w as p,u as i,T as pe,t as he,C as L,M as $,_ as P,O as B,v as y,P as fe}from"./index-bf4d935c.js";import{c as ve}from"./index-c94da121.js";function ge(a,v){let n,f;return function(...b){f=b,n||(n=setTimeout(()=>{a.apply(this,f),n=null},v))}}const me={class:"min-h-full overflow-hidden flex flex-col"},_e={class:"flex-1 min-h-full p-4 relative"},xe=["id"],we=["id","src","onLoad","onError","onClick"],ye={class:"menu p-2 text-[#cbd5e1]"},be={class:"prompt"},ke={class:"flex justify-end items-end space-x-2"},Ce=["onClick"],Ie={class:"text-sm dark:text-slate-400"},Le=s("span",null,"画同款",-1),$e=["onClick"],Pe={class:"text-sm dark:text-slate-400"},Be=s("span",null,"使用当前画同款",-1),Me=["onClick"],Ee={class:"text-sm dark:text-slate-400"},We=s("span",null,"复制提示词",-1),De=s("div",{id:"footer",class:"w-full absolute bottom-[350px]"},null,-1),Ne=se({__name:"index",props:{dataList:null,scaleWidth:null,isDrawLike:{type:Boolean},usePropmpt:{type:Boolean},copyPropmpt:{type:Boolean},gap:{default:5},preOrigin:{type:Boolean}},emits:["loadMore","usePropmptDraw"],setup(a,{emit:v}){var N;const n=a,f=ne(),M=(N=re())==null?void 0:N.appContext.config.globalProperties.$viewerApi,b=ae(),E=u({}),W=u(0),l=u(160),h=u(0),k=u([]),C=u(null),D=u(0),S=I(()=>f.isLogin),H=I(()=>n.scaleWidth?Number(n.scaleWidth)*2+n.gap+150:150),A=ie();function U(){F(),J();const t=h.value,o=l.value,e=[];n.dataList.forEach((c,r)=>{const{width:Z,height:ee}=c.fileInfo,te=o/Z,R=ee*te+n.gap+W.value,m=E.value[c.id];if(e.length<t)m.style.top="0px",m.style.left=`${(o+n.gap)*r}px`,e.push(R);else{const T=Math.min.apply(null,e),z=e.findIndex(oe=>oe===T);m.style.top=`${T+0}px`,m.style.left=`${z*(l.value+n.gap)}px`,e[z]+=R}}),D.value=Math.max(...e)+100}function V(t,o){t&&o&&(E.value[o.id]=t)}function F(){const{showName:t=0,showOther:o=0}={};W.value=[t,o].filter(e=>e).length*15}O(()=>n.scaleWidth,t=>{g()}),O(()=>n.dataList,t=>{t&&fe(()=>{g()})},{immediate:!0});function J(){if(!C.value)return;const t=C.value.clientWidth;h.value=Math.floor(t/H.value);const o=t-h.value*H.value,e=(h.value-1)*n.gap;o-e<0&&(h.value-=1),l.value=Math.floor((t-e)/h.value)}function K(t,o){k.value.push(o.id)}function q(t,o){k.value.push(o.id)}function G(t){if(!S.value)return f.setLoginDialog(!0);const{prompt:o}=t;ve({text:o}),b.success("复制prompt成功")}function Q(t){A.push(`/midjourney?mjId=${t.id}`)}function X(t){const{prompt:o}=t;v("usePropmptDraw",o)}function Y(t){const{fileInfo:o}=t,{cosUrl:e}=o;M({options:{},images:[e]})}const j=I(()=>t=>{const{fileInfo:o}=t,{width:e,height:c}=o;return c/(e/l.value)}),g=ge(function(){U()},200);return le(async()=>{window.addEventListener("resize",g);const t=document.getElementById("footer");new IntersectionObserver((e,c)=>{e.forEach(r=>{r.isIntersecting&&v("loadMore")})}).observe(t)}),ce(()=>{window.removeEventListener("resize",g)}),(t,o)=>(d(),_("div",me,[s("div",_e,[s("div",{id:"wapper",ref_key:"wapperRef",ref:C,class:"wapper",style:x({height:`${D.value}px`})},[(d(!0),_(ue,null,de(a.dataList,(e,c)=>(d(),_("div",{id:e.id,key:c,ref_for:!0,ref:r=>V(r,e),class:"wapper-item",style:x({width:`${l.value}px`})},[w(pe,{name:"img",css:!0},{default:p(()=>[s("img",{id:e.id,class:"item-file rounded-sm",style:x({width:`${l.value}px`,height:`${i(j)(e)}px`}),src:a.preOrigin?e.fileInfo.cosUrl:e.fileInfo.thumbImg,loading:"lazy",onLoad:r=>K(r,e),onError:r=>q(r,e),onClick:r=>Y(e)},null,44,we)]),_:2},1024),s("div",ye,[s("div",be,he(e.fullPrompt),1),s("div",ke,[a.isDrawLike?(d(),L(i(B),{key:0,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>Q(e),["stop"])},[s("span",Ie,[w(i(P),{icon:"fluent:draw-image-24-regular",class:"text-sm"})])],8,Ce)]),default:p(()=>[Le]),_:2},1024)):y("",!0),a.usePropmpt?(d(),L(i(B),{key:1,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>X(e),["stop"])},[s("span",Pe,[w(i(P),{icon:"fluent:draw-image-24-regular",class:"text-sm"})])],8,$e)]),default:p(()=>[Be]),_:2},1024)):y("",!0),a.copyPropmpt?(d(),L(i(B),{key:2,trigger:"hover"},{trigger:p(()=>[s("button",{class:"flex h-5 w-8 items-center justify-center rounded border transition hover:bg-[#666161] dark:border-neutral-700 dark:hover:bg-[#33373c]",onClick:$(r=>G(e),["stop"])},[s("span",Ee,[w(i(P),{icon:"tabler:copy",class:"text-sm"})])],8,Me)]),default:p(()=>[We]),_:2},1024)):y("",!0)])]),k.value.includes(e.id)?y("",!0):(d(),_("div",{key:0,class:"item-loading",style:x({width:`${l.value}px`,height:`${i(j)(e)}px`})},null,4))],12,xe))),128)),De],4)])]))}});export{Ne as _};

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{b$ as e,c0 as a}from"./index-6bc7e56b.js";function u(r){return e({url:"/fanyi/translate",data:r})}function n(r){return a({url:"/queue/addMjDrawQueue",data:r})}function s(r){return e({url:"/midjourney/proxy",data:r,headers:{responseType:"arraybuffer"}})}export{u as a,s as b,n as f};
import{c3 as e,c4 as a}from"./index-bf4d935c.js";function u(r){return e({url:"/fanyi/translate",data:r})}function n(r){return a({url:"/queue/addMjDrawQueue",data:r})}function s(r){return e({url:"/midjourney/proxy",data:r,headers:{responseType:"arraybuffer"}})}export{u as a,s as b,n as f};

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{d as i,o as p,c as f,a as e,m as x,b as m,I as _,f as c,w,u as t,h,q as a,t as d}from"./index-6bc7e56b.js";const v={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},k=e("path",{d:"M30.71 229.47l188.87-113a30.54 30.54 0 0 1 31.09-.39a33.74 33.74 0 0 1 16.76 29.47v79.05l180.72-108.16a30.54 30.54 0 0 1 31.09-.39A33.74 33.74 0 0 1 496 145.52v221A33.73 33.73 0 0 1 479.24 396a30.54 30.54 0 0 1-31.09-.39L267.43 287.4v79.08A33.73 33.73 0 0 1 250.67 396a30.54 30.54 0 0 1-31.09-.39l-188.87-113a31.27 31.27 0 0 1 0-53z",fill:"currentColor"},null,-1),b=[k],g=i({name:"PlayBack",render:function(s,r){return p(),f("svg",v,b)}}),B={class:"pt-1 mr-2 cursor-pointer"},z=i({__name:"titleBar",props:{title:{default:""},des:{default:""},padding:{default:4}},setup(o){const s=o,r=x(),n=m(()=>r.theme==="dark"),u=_();return(y,l)=>(p(),f("div",{class:a(["flex border-b border-[#ebebeb] dark:border-[#ffffff17] py-4 w-full",[`px-${s.padding}`]])},[e("div",B,[c(t(h),{size:"16",class:"text-primary",onClick:l[0]||(l[0]=C=>t(u).push("/"))},{default:w(()=>[c(t(g))]),_:1})]),e("div",null,[e("b",{class:a([[t(n)?"text-[#fff]":"text-[#555]"],"text-lg"])},d(s.title),3),e("div",{class:a([[t(n)?"text-[#fff]":"text-[#626569]"],"text-truncate text-[#626569] mt-1"])},d(s.des),3)])],2))}});export{z as _};
import{d as i,o as p,c as f,a as e,m as x,b as m,I as _,f as c,w,u as t,h,q as a,t as d}from"./index-bf4d935c.js";const v={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},k=e("path",{d:"M30.71 229.47l188.87-113a30.54 30.54 0 0 1 31.09-.39a33.74 33.74 0 0 1 16.76 29.47v79.05l180.72-108.16a30.54 30.54 0 0 1 31.09-.39A33.74 33.74 0 0 1 496 145.52v221A33.73 33.73 0 0 1 479.24 396a30.54 30.54 0 0 1-31.09-.39L267.43 287.4v79.08A33.73 33.73 0 0 1 250.67 396a30.54 30.54 0 0 1-31.09-.39l-188.87-113a31.27 31.27 0 0 1 0-53z",fill:"currentColor"},null,-1),b=[k],g=i({name:"PlayBack",render:function(s,r){return p(),f("svg",v,b)}}),B={class:"pt-1 mr-2 cursor-pointer"},z=i({__name:"titleBar",props:{title:{default:""},des:{default:""},padding:{default:4}},setup(o){const s=o,r=x(),n=m(()=>r.theme==="dark"),u=_();return(y,l)=>(p(),f("div",{class:a(["flex border-b border-[#ebebeb] dark:border-[#ffffff17] py-4 w-full",[`px-${s.padding}`]])},[e("div",B,[c(t(h),{size:"16",class:"text-primary",onClick:l[0]||(l[0]=C=>t(u).push("/"))},{default:w(()=>[c(t(g))]),_:1})]),e("div",null,[e("b",{class:a([[t(n)?"text-[#fff]":"text-[#555]"],"text-lg"])},d(s.title),3),e("div",{class:a([[t(n)?"text-[#fff]":"text-[#626569]"],"text-truncate text-[#626569] mt-1"])},d(s.des),3)])],2))}});export{z as _};