mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-25 12:56:37 +08:00
383 lines
55 KiB
JavaScript
383 lines
55 KiB
JavaScript
import{_ as Xe}from"./index.vue_vue_type_script_setup_true_lang-98b11686.js";import{aM as ue,s as t,c as A,a as v,b as z,g as W,k as P,aN as ie,aO as Y,aP as De,aQ as ze,aR as Fe,aS as Ue,u as Oe,h as me,aT as Ge,aU as Ce,n as Ne,aV as Ye,az as ce,aW as ve,aX as Ze,x as Ke,aY as Qe,aZ as je,r as E,a_ as Je,a$ as et,ah as tt,ae as K,b0 as rt,b1 as nt,b2 as it,b3 as ot,b4 as at,b5 as Re,d as G,b6 as lt,j as st,t as j,l as dt,aH as ut,b7 as ct,O as xe,b8 as ft,b9 as ke,D as gt,A as _e,K as Ae,E as Z,F as oe,G as S,X as y,Q as x,_ as J,ba as pt,ap as Me,J as ht,L as mt,a1 as le,R as _,ac as Q,ag as $e,P as vt,S as fe,U as ge,W as se,Z as pe,a0 as bt,bb as yt,bc as xt,bd as ee,af as wt,ai as Ct,aE as Rt,be as kt,bf as _t,aj as $t,bg as Pt,bh as Bt,aa as St,aq as Pe,bi as Lt,aL as Tt}from"./index-d574bfe0.js";import{N as Be}from"./Popconfirm-44d41587.js";import{N as It}from"./Select-39d6ffd8.js";import{N as Dt}from"./Switch-62c08010.js";import"./LayoutSider-7d501b29.js";const zt=ue("attach",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),Ft=ue("trash",t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},t("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Ut=ue("download",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),Ot=ue("cancel",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),Nt=ue("retry",t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},t("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),t("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),jt=A([v("progress",{display:"inline-block"},[v("progress-icon",`
|
||
color: var(--n-icon-color);
|
||
transition: color .3s var(--n-bezier);
|
||
`),z("line",`
|
||
width: 100%;
|
||
display: block;
|
||
`,[v("progress-content",`
|
||
display: flex;
|
||
align-items: center;
|
||
`,[v("progress-graph",{flex:1})]),v("progress-custom-content",{marginLeft:"14px"}),v("progress-icon",`
|
||
width: 30px;
|
||
padding-left: 14px;
|
||
height: var(--n-icon-size-line);
|
||
line-height: var(--n-icon-size-line);
|
||
font-size: var(--n-icon-size-line);
|
||
`,[z("as-text",`
|
||
color: var(--n-text-color-line-outer);
|
||
text-align: center;
|
||
width: 40px;
|
||
font-size: var(--n-font-size);
|
||
padding-left: 4px;
|
||
transition: color .3s var(--n-bezier);
|
||
`)])]),z("circle, dashboard",{width:"120px"},[v("progress-custom-content",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`),v("progress-text",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
color: inherit;
|
||
font-size: var(--n-font-size-circle);
|
||
color: var(--n-text-color-circle);
|
||
font-weight: var(--n-font-weight-circle);
|
||
transition: color .3s var(--n-bezier);
|
||
white-space: nowrap;
|
||
`),v("progress-icon",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
color: var(--n-icon-color);
|
||
font-size: var(--n-icon-size-circle);
|
||
`)]),z("multiple-circle",`
|
||
width: 200px;
|
||
color: inherit;
|
||
`,[v("progress-text",`
|
||
font-weight: var(--n-font-weight-circle);
|
||
color: var(--n-text-color-circle);
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: color .3s var(--n-bezier);
|
||
`)]),v("progress-content",{position:"relative"}),v("progress-graph",{position:"relative"},[v("progress-graph-circle",[A("svg",{verticalAlign:"bottom"}),v("progress-graph-circle-fill",`
|
||
stroke: var(--n-fill-color);
|
||
transition:
|
||
opacity .3s var(--n-bezier),
|
||
stroke .3s var(--n-bezier),
|
||
stroke-dasharray .3s var(--n-bezier);
|
||
`,[z("empty",{opacity:0})]),v("progress-graph-circle-rail",`
|
||
transition: stroke .3s var(--n-bezier);
|
||
overflow: hidden;
|
||
stroke: var(--n-rail-color);
|
||
`)]),v("progress-graph-line",[z("indicator-inside",[v("progress-graph-line-rail",`
|
||
height: 16px;
|
||
line-height: 16px;
|
||
border-radius: 10px;
|
||
`,[v("progress-graph-line-fill",`
|
||
height: inherit;
|
||
border-radius: 10px;
|
||
`),v("progress-graph-line-indicator",`
|
||
background: #0000;
|
||
white-space: nowrap;
|
||
text-align: right;
|
||
margin-left: 14px;
|
||
margin-right: 14px;
|
||
height: inherit;
|
||
font-size: 12px;
|
||
color: var(--n-text-color-line-inner);
|
||
transition: color .3s var(--n-bezier);
|
||
`)])]),z("indicator-inside-label",`
|
||
height: 16px;
|
||
display: flex;
|
||
align-items: center;
|
||
`,[v("progress-graph-line-rail",`
|
||
flex: 1;
|
||
transition: background-color .3s var(--n-bezier);
|
||
`),v("progress-graph-line-indicator",`
|
||
background: var(--n-fill-color);
|
||
font-size: 12px;
|
||
transform: translateZ(0);
|
||
display: flex;
|
||
vertical-align: middle;
|
||
height: 16px;
|
||
line-height: 16px;
|
||
padding: 0 10px;
|
||
border-radius: 10px;
|
||
position: absolute;
|
||
white-space: nowrap;
|
||
color: var(--n-text-color-line-inner);
|
||
transition:
|
||
right .2s var(--n-bezier),
|
||
color .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier);
|
||
`)]),v("progress-graph-line-rail",`
|
||
position: relative;
|
||
overflow: hidden;
|
||
height: var(--n-rail-height);
|
||
border-radius: 5px;
|
||
background-color: var(--n-rail-color);
|
||
transition: background-color .3s var(--n-bezier);
|
||
`,[v("progress-graph-line-fill",`
|
||
background: var(--n-fill-color);
|
||
position: relative;
|
||
border-radius: 5px;
|
||
height: inherit;
|
||
width: 100%;
|
||
max-width: 0%;
|
||
transition:
|
||
background-color .3s var(--n-bezier),
|
||
max-width .2s var(--n-bezier);
|
||
`,[z("processing",[A("&::after",`
|
||
content: "";
|
||
background-image: var(--n-line-bg-processing);
|
||
animation: progress-processing-animation 2s var(--n-bezier) infinite;
|
||
`)])])])])])]),A("@keyframes progress-processing-animation",`
|
||
0% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 100%;
|
||
opacity: 1;
|
||
}
|
||
66% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 0;
|
||
opacity: 0;
|
||
}
|
||
100% {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
right: 0;
|
||
opacity: 0;
|
||
}
|
||
`)]),At={success:t(De,null),error:t(ze,null),warning:t(Fe,null),info:t(Ue,null)},Mt=W({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:r}){const i=P(()=>ie(e.height)),n=P(()=>e.railBorderRadius!==void 0?ie(e.railBorderRadius):e.height!==void 0?ie(e.height,{c:.5}):""),o=P(()=>e.fillBorderRadius!==void 0?ie(e.fillBorderRadius):e.railBorderRadius!==void 0?ie(e.railBorderRadius):e.height!==void 0?ie(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:a,railColor:u,railStyle:c,percentage:s,unit:d,indicatorTextColor:l,status:f,showIndicator:B,fillColor:b,processing:w,clsPrefix:R}=e;return t("div",{class:`${R}-progress-content`,role:"none"},t("div",{class:`${R}-progress-graph`,"aria-hidden":!0},t("div",{class:[`${R}-progress-graph-line`,{[`${R}-progress-graph-line--indicator-${a}`]:!0}]},t("div",{class:`${R}-progress-graph-line-rail`,style:[{backgroundColor:u,height:i.value,borderRadius:n.value},c]},t("div",{class:[`${R}-progress-graph-line-fill`,w&&`${R}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:b,height:i.value,lineHeight:i.value,borderRadius:o.value}},a==="inside"?t("div",{class:`${R}-progress-graph-line-indicator`,style:{color:l}},r.default?r.default():`${s}${d}`):null)))),B&&a==="outside"?t("div",null,r.default?t("div",{class:`${R}-progress-custom-content`,style:{color:l},role:"none"},r.default()):f==="default"?t("div",{role:"none",class:`${R}-progress-icon ${R}-progress-icon--as-text`,style:{color:l}},s,d):t("div",{class:`${R}-progress-icon`,"aria-hidden":!0},t(Y,{clsPrefix:R},{default:()=>At[f]}))):null)}}}),qt={success:t(De,null),error:t(ze,null),warning:t(Fe,null),info:t(Ue,null)},Et=W({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:r}){function i(n,o,a){const{gapDegree:u,viewBoxWidth:c,strokeWidth:s}=e,d=50,l=0,f=d,B=0,b=2*d,w=50+s/2,R=`M ${w},${w} m ${l},${f}
|
||
a ${d},${d} 0 1 1 ${B},${-b}
|
||
a ${d},${d} 0 1 1 ${-B},${b}`,L=Math.PI*2*d,D={stroke:a,strokeDasharray:`${n/100*(L-u)}px ${c*8}px`,strokeDashoffset:`-${u/2}px`,transformOrigin:o?"center":void 0,transform:o?`rotate(${o}deg)`:void 0};return{pathString:R,pathStyle:D}}return()=>{const{fillColor:n,railColor:o,strokeWidth:a,offsetDegree:u,status:c,percentage:s,showIndicator:d,indicatorTextColor:l,unit:f,gapOffsetDegree:B,clsPrefix:b}=e,{pathString:w,pathStyle:R}=i(100,0,o),{pathString:L,pathStyle:D}=i(s,u,n),T=100+a;return t("div",{class:`${b}-progress-content`,role:"none"},t("div",{class:`${b}-progress-graph`,"aria-hidden":!0},t("div",{class:`${b}-progress-graph-circle`,style:{transform:B?`rotate(${B}deg)`:void 0}},t("svg",{viewBox:`0 0 ${T} ${T}`},t("g",null,t("path",{class:`${b}-progress-graph-circle-rail`,d:w,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:R})),t("g",null,t("path",{class:[`${b}-progress-graph-circle-fill`,s===0&&`${b}-progress-graph-circle-fill--empty`],d:L,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:D}))))),d?t("div",null,r.default?t("div",{class:`${b}-progress-custom-content`,role:"none"},r.default()):c!=="default"?t("div",{class:`${b}-progress-icon`,"aria-hidden":!0},t(Y,{clsPrefix:b},{default:()=>qt[c]})):t("div",{class:`${b}-progress-text`,style:{color:l},role:"none"},t("span",{class:`${b}-progress-text__percentage`},s),t("span",{class:`${b}-progress-text__unit`},f))):null)}}});function Se(e,r,i=100){return`m ${i/2} ${i/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const Ht=W({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:r}){const i=P(()=>e.percentage.map((o,a)=>`${Math.PI*o/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*a)-e.circleGap*a)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:n,strokeWidth:o,circleGap:a,showIndicator:u,fillColor:c,railColor:s,railStyle:d,percentage:l,clsPrefix:f}=e;return t("div",{class:`${f}-progress-content`,role:"none"},t("div",{class:`${f}-progress-graph`,"aria-hidden":!0},t("div",{class:`${f}-progress-graph-circle`},t("svg",{viewBox:`0 0 ${n} ${n}`},l.map((B,b)=>t("g",{key:b},t("path",{class:`${f}-progress-graph-circle-rail`,d:Se(n/2-o/2*(1+2*b)-a*b,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:s[b]},d[b]]}),t("path",{class:[`${f}-progress-graph-circle-fill`,B===0&&`${f}-progress-graph-circle-fill--empty`],d:Se(n/2-o/2*(1+2*b)-a*b,o,n),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:i.value[b],strokeDashoffset:0,stroke:c[b]}})))))),u&&r.default?t("div",null,t("div",{class:`${f}-progress-text`},r.default())):null)}}}),Wt=Object.assign(Object.assign({},me.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),Vt=W({name:"Progress",props:Wt,setup(e){const r=P(()=>e.indicatorPlacement||e.indicatorPosition),i=P(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:n,inlineThemeDisabled:o}=Oe(e),a=me("Progress","-progress",jt,Ge,e,n),u=P(()=>{const{status:s}=e,{common:{cubicBezierEaseInOut:d},self:{fontSize:l,fontSizeCircle:f,railColor:B,railHeight:b,iconSizeCircle:w,iconSizeLine:R,textColorCircle:L,textColorLineInner:D,textColorLineOuter:T,lineBgProcessing:M,fontWeightCircle:I,[Ce("iconColor",s)]:g,[Ce("fillColor",s)]:k}}=a.value;return{"--n-bezier":d,"--n-fill-color":k,"--n-font-size":l,"--n-font-size-circle":f,"--n-font-weight-circle":I,"--n-icon-color":g,"--n-icon-size-circle":w,"--n-icon-size-line":R,"--n-line-bg-processing":M,"--n-rail-color":B,"--n-rail-height":b,"--n-text-color-circle":L,"--n-text-color-line-inner":D,"--n-text-color-line-outer":T}}),c=o?Ne("progress",P(()=>e.status[0]),u,e):void 0;return{mergedClsPrefix:n,mergedIndicatorPlacement:r,gapDeg:i,cssVars:o?void 0:u,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){const{type:e,cssVars:r,indicatorTextColor:i,showIndicator:n,status:o,railColor:a,railStyle:u,color:c,percentage:s,viewBoxWidth:d,strokeWidth:l,mergedIndicatorPlacement:f,unit:B,borderRadius:b,fillBorderRadius:w,height:R,processing:L,circleGap:D,mergedClsPrefix:T,gapDeg:M,gapOffsetDegree:I,themeClass:g,$slots:k,onRender:$}=this;return $==null||$(),t("div",{class:[g,`${T}-progress`,`${T}-progress--${e}`,`${T}-progress--${o}`],style:r,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?t(Et,{clsPrefix:T,status:o,showIndicator:n,indicatorTextColor:i,railColor:a,fillColor:c,railStyle:u,offsetDegree:this.offsetDegree,percentage:s,viewBoxWidth:d,strokeWidth:l,gapDegree:M===void 0?e==="dashboard"?75:0:M,gapOffsetDegree:I,unit:B},k):e==="line"?t(Mt,{clsPrefix:T,status:o,showIndicator:n,indicatorTextColor:i,railColor:a,fillColor:c,railStyle:u,percentage:s,processing:L,indicatorPlacement:f,unit:B,fillBorderRadius:w,railBorderRadius:b,height:R},k):e==="multiple-circle"?t(Ht,{clsPrefix:T,strokeWidth:l,railColor:a,fillColor:c,railStyle:u,viewBoxWidth:d,percentage:s,showIndicator:n,circleGap:D},k):null)}}),ae=Ye("n-upload"),qe="__UPLOAD_DRAGGER__",Xt=W({name:"UploadDragger",[qe]:!0,setup(e,{slots:r}){const i=ce(ae,null);return i||ve("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:n},mergedDisabledRef:{value:o},maxReachedRef:{value:a}}=i;return t("div",{class:[`${n}-upload-dragger`,(o||a)&&`${n}-upload-dragger--disabled`]},r)}}});var we=globalThis&&globalThis.__awaiter||function(e,r,i,n){function o(a){return a instanceof i?a:new i(function(u){u(a)})}return new(i||(i=Promise))(function(a,u){function c(l){try{d(n.next(l))}catch(f){u(f)}}function s(l){try{d(n.throw(l))}catch(f){u(f)}}function d(l){l.done?a(l.value):o(l.value).then(c,s)}d((n=n.apply(e,r||[])).next())})};const Ee=e=>e.includes("image/"),Le=(e="")=>{const r=e.split("/"),n=r[r.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},Te=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,He=e=>{if(e.type)return Ee(e.type);const r=Le(e.name||"");if(Te.test(r))return!0;const i=e.thumbnailUrl||e.url||"",n=Le(i);return!!(/^data:image\//.test(i)||Te.test(n))};function Gt(e){return we(this,void 0,void 0,function*(){return yield new Promise(r=>{if(!e.type||!Ee(e.type)){r("");return}r(window.URL.createObjectURL(e))})})}const Yt=Ze&&window.FileReader&&window.File;function Zt(e){return e.isDirectory}function Kt(e){return e.isFile}function Qt(e,r){return we(this,void 0,void 0,function*(){const i=[];function n(o){return we(this,void 0,void 0,function*(){for(const a of o)if(a){if(r&&Zt(a)){const u=a.createReader();try{const c=yield new Promise((s,d)=>{u.readEntries(s,d)});yield n(c)}catch{}}else if(Kt(a))try{const u=yield new Promise((c,s)=>{a.file(c,s)});i.push({file:u,entry:a,source:"dnd"})}catch{}}})}return yield n(e),i})}function de(e){const{id:r,name:i,percentage:n,status:o,url:a,file:u,thumbnailUrl:c,type:s,fullPath:d,batchId:l}=e;return{id:r,name:i,percentage:n??null,status:o,url:a??null,file:u??null,thumbnailUrl:c??null,type:s??null,fullPath:d??null,batchId:l??null}}function Jt(e,r,i){return e=e.toLowerCase(),r=r.toLocaleLowerCase(),i=i.toLocaleLowerCase(),i.split(",").map(o=>o.trim()).filter(Boolean).some(o=>{if(o.startsWith(".")){if(e.endsWith(o))return!0}else if(o.includes("/")){const[a,u]=r.split("/"),[c,s]=o.split("/");if((c==="*"||a&&c&&c===a)&&(s==="*"||u&&s&&s===u))return!0}else return!0;return!1})}const We=W({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:r}){const i=ce(ae,null);i||ve("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:n,mergedDisabledRef:o,maxReachedRef:a,listTypeRef:u,dragOverRef:c,openOpenFileDialog:s,draggerInsideRef:d,handleFileAddition:l,mergedDirectoryDndRef:f,triggerClassRef:B,triggerStyleRef:b}=i,w=P(()=>u.value==="image-card");function R(){o.value||a.value||s()}function L(I){I.preventDefault(),c.value=!0}function D(I){I.preventDefault(),c.value=!0}function T(I){I.preventDefault(),c.value=!1}function M(I){var g;if(I.preventDefault(),!d.value||o.value||a.value){c.value=!1;return}const k=(g=I.dataTransfer)===null||g===void 0?void 0:g.items;k!=null&&k.length?Qt(Array.from(k).map($=>$.webkitGetAsEntry()),f.value).then($=>{l($)}).finally(()=>{c.value=!1}):c.value=!1}return()=>{var I;const{value:g}=n;return e.abstract?(I=r.default)===null||I===void 0?void 0:I.call(r,{handleClick:R,handleDrop:M,handleDragOver:L,handleDragEnter:D,handleDragLeave:T}):t("div",{class:[`${g}-upload-trigger`,(o.value||a.value)&&`${g}-upload-trigger--disabled`,w.value&&`${g}-upload-trigger--image-card`,B.value],style:b.value,onClick:R,onDrop:M,onDragover:L,onDragenter:D,onDragleave:T},w.value?t(Xt,null,{default:()=>Ke(r.default,()=>[t(Y,{clsPrefix:g},{default:()=>t(Qe,null)})])}):r)}}}),er=W({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:ce(ae).mergedThemeRef}},render(){return t(je,null,{default:()=>this.show?t(Vt,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),tr=t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},t("g",{fill:"none"},t("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"}))),rr=t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},t("g",{fill:"none"},t("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})));var nr=globalThis&&globalThis.__awaiter||function(e,r,i,n){function o(a){return a instanceof i?a:new i(function(u){u(a)})}return new(i||(i=Promise))(function(a,u){function c(l){try{d(n.next(l))}catch(f){u(f)}}function s(l){try{d(n.throw(l))}catch(f){u(f)}}function d(l){l.done?a(l.value):o(l.value).then(c,s)}d((n=n.apply(e,r||[])).next())})};const he={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},ir=W({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0}},setup(e){const r=ce(ae),i=E(null),n=E(""),o=P(()=>{const{file:g}=e;return g.status==="finished"?"success":g.status==="error"?"error":"info"}),a=P(()=>{const{file:g}=e;if(g.status==="error")return"error"}),u=P(()=>{const{file:g}=e;return g.status==="uploading"}),c=P(()=>{if(!r.showCancelButtonRef.value)return!1;const{file:g}=e;return["uploading","pending","error"].includes(g.status)}),s=P(()=>{if(!r.showRemoveButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),d=P(()=>{if(!r.showDownloadButtonRef.value)return!1;const{file:g}=e;return["finished"].includes(g.status)}),l=P(()=>{if(!r.showRetryButtonRef.value)return!1;const{file:g}=e;return["error"].includes(g.status)}),f=Je(()=>n.value||e.file.thumbnailUrl||e.file.url),B=P(()=>{if(!r.showPreviewButtonRef.value)return!1;const{file:{status:g},listType:k}=e;return["finished"].includes(g)&&f.value&&k==="image-card"});function b(){r.submit(e.file.id)}function w(g){g.preventDefault();const{file:k}=e;["finished","pending","error"].includes(k.status)?L(k):["uploading"].includes(k.status)?T(k):it("upload","The button clicked type is unknown.")}function R(g){g.preventDefault(),D(e.file)}function L(g){const{xhrMap:k,doChange:$,onRemoveRef:{value:ne},mergedFileListRef:{value:h}}=r;Promise.resolve(ne?ne({file:Object.assign({},g),fileList:h}):!0).then(F=>{if(F===!1)return;const U=Object.assign({},g,{status:"removed"});k.delete(g.id),$(U,void 0,{remove:!0})})}function D(g){const{onDownloadRef:{value:k}}=r;Promise.resolve(k?k(Object.assign({},g)):!0).then($=>{$!==!1&&ot(g.url,g.name)})}function T(g){const{xhrMap:k}=r,$=k.get(g.id);$==null||$.abort(),L(Object.assign({},g))}function M(){const{onPreviewRef:{value:g}}=r;if(g)g(e.file);else if(e.listType==="image-card"){const{value:k}=i;if(!k)return;k.click()}}const I=()=>nr(this,void 0,void 0,function*(){const{listType:g}=e;g!=="image"&&g!=="image-card"||r.shouldUseThumbnailUrlRef.value(e.file)&&(n.value=yield r.getFileThumbnailUrlResolver(e.file))});return et(()=>{I()}),{mergedTheme:r.mergedThemeRef,progressStatus:o,buttonType:a,showProgress:u,disabled:r.mergedDisabledRef,showCancelButton:c,showRemoveButton:s,showDownloadButton:d,showRetryButton:l,showPreviewButton:B,mergedThumbnailUrl:f,shouldUseThumbnailUrl:r.shouldUseThumbnailUrlRef,renderIcon:r.renderIconRef,imageRef:i,handleRemoveOrCancelClick:w,handleDownloadClick:R,handleRetryClick:b,handlePreviewClick:M}},render(){const{clsPrefix:e,mergedTheme:r,listType:i,file:n,renderIcon:o}=this;let a;const u=i==="image";u||i==="image-card"?a=!this.shouldUseThumbnailUrl(n)||!this.mergedThumbnailUrl?t("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):He(n)?t(Y,{clsPrefix:e},{default:()=>tr}):t(Y,{clsPrefix:e},{default:()=>rr})):t("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},i==="image-card"?t(tt,{src:this.mergedThumbnailUrl||void 0,previewSrc:n.url||void 0,alt:n.name,ref:"imageRef"}):t("img",{src:this.mergedThumbnailUrl||void 0,alt:n.name})):a=t("span",{class:`${e}-upload-file-info__thumbnail`},o?o(n):t(Y,{clsPrefix:e},{default:()=>t(zt,null)}));const s=t(er,{show:this.showProgress,percentage:n.percentage||0,status:this.progressStatus}),d=i==="text"||i==="image";return t("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,n.url&&n.status!=="error"&&i!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${i}-type`]},t("div",{class:`${e}-upload-file-info`},a,t("div",{class:`${e}-upload-file-info__name`},d&&(n.url&&n.status!=="error"?t("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,onClick:this.handlePreviewClick},n.name):t("span",{onClick:this.handlePreviewClick},n.name)),u&&s),t("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${i}-type`]},this.showPreviewButton?t(K,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,builtinThemeOverrides:he},{icon:()=>t(Y,{clsPrefix:e},{default:()=>t(rt,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&t(K,{key:"cancelOrTrash",theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:he,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>t(nt,null,{default:()=>this.showRemoveButton?t(Y,{clsPrefix:e,key:"trash"},{default:()=>t(Ft,null)}):t(Y,{clsPrefix:e,key:"cancel"},{default:()=>t(Ot,null)})})}),this.showRetryButton&&!this.disabled&&t(K,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,builtinThemeOverrides:he},{icon:()=>t(Y,{clsPrefix:e},{default:()=>t(Nt,null)})}),this.showDownloadButton?t(K,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,builtinThemeOverrides:he},{icon:()=>t(Y,{clsPrefix:e},{default:()=>t(Ut,null)})}):null)),!u&&s)}}),or=W({name:"UploadFileList",setup(e,{slots:r}){const i=ce(ae,null);i||ve("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:n,mergedClsPrefixRef:o,listTypeRef:a,mergedFileListRef:u,fileListClassRef:c,fileListStyleRef:s,cssVarsRef:d,themeClassRef:l,maxReachedRef:f,showTriggerRef:B,imageGroupPropsRef:b}=i,w=P(()=>a.value==="image-card"),R=()=>u.value.map(D=>t(ir,{clsPrefix:o.value,key:D.id,file:D,listType:a.value})),L=()=>w.value?t(at,Object.assign({},b.value),{default:R}):t(je,{group:!0},{default:R});return()=>{const{value:D}=o,{value:T}=n;return t("div",{class:[`${D}-upload-file-list`,w.value&&`${D}-upload-file-list--grid`,T?l==null?void 0:l.value:void 0,c.value],style:[T&&d?d.value:"",s.value]},L(),B.value&&!f.value&&w.value&&t(We,null,r))}}}),ar=A([v("upload","width: 100%;",[z("dragger-inside",[v("upload-trigger",`
|
||
display: block;
|
||
`)]),z("drag-over",[v("upload-dragger",`
|
||
border: var(--n-dragger-border-hover);
|
||
`)])]),v("upload-dragger",`
|
||
cursor: pointer;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
text-align: center;
|
||
border-radius: var(--n-border-radius);
|
||
padding: 24px;
|
||
opacity: 1;
|
||
transition:
|
||
opacity .3s var(--n-bezier),
|
||
border-color .3s var(--n-bezier),
|
||
background-color .3s var(--n-bezier);
|
||
background-color: var(--n-dragger-color);
|
||
border: var(--n-dragger-border);
|
||
`,[A("&:hover",`
|
||
border: var(--n-dragger-border-hover);
|
||
`),z("disabled",`
|
||
cursor: not-allowed;
|
||
`)]),v("upload-trigger",`
|
||
display: inline-block;
|
||
box-sizing: border-box;
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[A("+",[v("upload-file-list","margin-top: 8px;")]),z("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`),z("image-card",`
|
||
width: 96px;
|
||
height: 96px;
|
||
`,[v("base-icon",`
|
||
font-size: 24px;
|
||
`),v("upload-dragger",`
|
||
padding: 0;
|
||
height: 100%;
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`)])]),v("upload-file-list",`
|
||
line-height: var(--n-line-height);
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[A("a, img","outline: none;"),z("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`,[v("upload-file","cursor: not-allowed;")]),z("grid",`
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, 96px);
|
||
grid-gap: 8px;
|
||
margin-top: 0;
|
||
`),v("upload-file",`
|
||
display: block;
|
||
box-sizing: border-box;
|
||
cursor: default;
|
||
padding: 0px 12px 0 6px;
|
||
transition: background-color .3s var(--n-bezier);
|
||
border-radius: var(--n-border-radius);
|
||
`,[Re(),v("progress",[Re({foldPadding:!0})]),A("&:hover",`
|
||
background-color: var(--n-item-color-hover);
|
||
`,[v("upload-file-info",[G("action",`
|
||
opacity: 1;
|
||
`)])]),z("image-type",`
|
||
border-radius: var(--n-border-radius);
|
||
text-decoration: underline;
|
||
text-decoration-color: #0000;
|
||
`,[v("upload-file-info",`
|
||
padding-top: 0px;
|
||
padding-bottom: 0px;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 6px 0;
|
||
`,[v("progress",`
|
||
padding: 2px 0;
|
||
margin-bottom: 0;
|
||
`),G("name",`
|
||
padding: 0 8px;
|
||
`),G("thumbnail",`
|
||
width: 32px;
|
||
height: 32px;
|
||
font-size: 28px;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
`,[A("img",`
|
||
width: 100%;
|
||
`)])])]),z("text-type",[v("progress",`
|
||
box-sizing: border-box;
|
||
padding-bottom: 6px;
|
||
margin-bottom: 6px;
|
||
`)]),z("image-card-type",`
|
||
position: relative;
|
||
width: 96px;
|
||
height: 96px;
|
||
border: var(--n-item-border-image-card);
|
||
border-radius: var(--n-border-radius);
|
||
padding: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
|
||
border-radius: var(--n-border-radius);
|
||
overflow: hidden;
|
||
`,[v("progress",`
|
||
position: absolute;
|
||
left: 8px;
|
||
bottom: 8px;
|
||
right: 8px;
|
||
width: unset;
|
||
`),v("upload-file-info",`
|
||
padding: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
`,[G("thumbnail",`
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 36px;
|
||
`,[A("img",`
|
||
width: 100%;
|
||
`)])]),A("&::before",`
|
||
position: absolute;
|
||
z-index: 1;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
border-radius: inherit;
|
||
opacity: 0;
|
||
transition: opacity .2s var(--n-bezier);
|
||
content: "";
|
||
`),A("&:hover",[A("&::before","opacity: 1;"),v("upload-file-info",[G("thumbnail","opacity: .12;")])])]),z("error-status",[A("&:hover",`
|
||
background-color: var(--n-item-color-hover-error);
|
||
`),v("upload-file-info",[G("name","color: var(--n-item-text-color-error);"),G("thumbnail","color: var(--n-item-text-color-error);")]),z("image-card-type",`
|
||
border: var(--n-item-border-image-card-error);
|
||
`)]),z("with-url",`
|
||
cursor: pointer;
|
||
`,[v("upload-file-info",[G("name",`
|
||
color: var(--n-item-text-color-success);
|
||
text-decoration-color: var(--n-item-text-color-success);
|
||
`,[A("a",`
|
||
text-decoration: underline;
|
||
`)])])]),v("upload-file-info",`
|
||
position: relative;
|
||
padding-top: 6px;
|
||
padding-bottom: 6px;
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
`,[G("thumbnail",`
|
||
font-size: 18px;
|
||
opacity: 1;
|
||
transition: opacity .2s var(--n-bezier);
|
||
color: var(--n-item-icon-color);
|
||
`,[v("base-icon",`
|
||
margin-right: 2px;
|
||
vertical-align: middle;
|
||
transition: color .3s var(--n-bezier);
|
||
`)]),G("action",`
|
||
padding-top: inherit;
|
||
padding-bottom: inherit;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
width: 80px;
|
||
display: flex;
|
||
align-items: center;
|
||
transition: opacity .2s var(--n-bezier);
|
||
justify-content: flex-end;
|
||
opacity: 0;
|
||
`,[v("button",[A("&:not(:last-child)",{marginRight:"4px"}),v("base-icon",[A("svg",[lt()])])]),z("image-type",`
|
||
position: relative;
|
||
max-width: 80px;
|
||
width: auto;
|
||
`),z("image-card-type",`
|
||
z-index: 2;
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
top: 0;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
`)]),G("name",`
|
||
color: var(--n-item-text-color);
|
||
flex: 1;
|
||
display: flex;
|
||
justify-content: center;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
flex-direction: column;
|
||
text-decoration-color: #0000;
|
||
font-size: var(--n-font-size);
|
||
transition:
|
||
color .3s var(--n-bezier),
|
||
text-decoration-color .3s var(--n-bezier);
|
||
`,[A("a",`
|
||
color: inherit;
|
||
text-decoration: underline;
|
||
`)])])])]),v("upload-file-input",`
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
opacity: 0;
|
||
`)]);var Ie=globalThis&&globalThis.__awaiter||function(e,r,i,n){function o(a){return a instanceof i?a:new i(function(u){u(a)})}return new(i||(i=Promise))(function(a,u){function c(l){try{d(n.next(l))}catch(f){u(f)}}function s(l){try{d(n.throw(l))}catch(f){u(f)}}function d(l){l.done?a(l.value):o(l.value).then(c,s)}d((n=n.apply(e,r||[])).next())})};function lr(e,r,i){const{doChange:n,xhrMap:o}=e;let a=0;function u(s){var d;let l=Object.assign({},r,{status:"error",percentage:a});o.delete(r.id),l=de(((d=e.onError)===null||d===void 0?void 0:d.call(e,{file:l,event:s}))||l),n(l,s)}function c(s){var d;if(e.isErrorState){if(e.isErrorState(i)){u(s);return}}else if(i.status<200||i.status>=300){u(s);return}let l=Object.assign({},r,{status:"finished",percentage:a});o.delete(r.id),l=de(((d=e.onFinish)===null||d===void 0?void 0:d.call(e,{file:l,event:s}))||l),n(l,s)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(s){const d=Object.assign({},r,{status:"removed",file:null,percentage:a});o.delete(r.id),n(d,s)},handleXHRProgress(s){const d=Object.assign({},r,{status:"uploading"});if(s.lengthComputable){const l=Math.ceil(s.loaded/s.total*100);d.percentage=l,a=l}n(d,s)}}}function sr(e){const{inst:r,file:i,data:n,headers:o,withCredentials:a,action:u,customRequest:c}=e,{doChange:s}=e.inst;let d=0;c({file:i,data:n,headers:o,withCredentials:a,action:u,onProgress(l){const f=Object.assign({},i,{status:"uploading"}),B=l.percent;f.percentage=B,d=B,s(f)},onFinish(){var l;let f=Object.assign({},i,{status:"finished",percentage:d});f=de(((l=r.onFinish)===null||l===void 0?void 0:l.call(r,{file:f}))||f),s(f)},onError(){var l;let f=Object.assign({},i,{status:"error",percentage:d});f=de(((l=r.onError)===null||l===void 0?void 0:l.call(r,{file:f}))||f),s(f)}})}function dr(e,r,i){const n=lr(e,r,i);i.onabort=n.handleXHRAbort,i.onerror=n.handleXHRError,i.onload=n.handleXHRLoad,i.upload&&(i.upload.onprogress=n.handleXHRProgress)}function Ve(e,r){return typeof e=="function"?e({file:r}):e||{}}function ur(e,r,i){const n=Ve(r,i);n&&Object.keys(n).forEach(o=>{e.setRequestHeader(o,n[o])})}function cr(e,r,i){const n=Ve(r,i);n&&Object.keys(n).forEach(o=>{e.append(o,n[o])})}function fr(e,r,i,{method:n,action:o,withCredentials:a,responseType:u,headers:c,data:s}){const d=new XMLHttpRequest;d.responseType=u,e.xhrMap.set(i.id,d),d.withCredentials=a;const l=new FormData;if(cr(l,s,i),i.file!==null&&l.append(r,i.file),dr(e,i,d),o!==void 0){d.open(n.toUpperCase(),o),ur(d,c,i),d.send(l);const f=Object.assign({},i,{status:"uploading"});e.doChange(f)}}const gr=Object.assign(Object.assign({},me.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>Yt?He(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),pr=W({name:"Upload",props:gr,setup(e){e.abstract&&e.listType==="image-card"&&ve("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:r,inlineThemeDisabled:i}=Oe(e),n=me("Upload","-upload",ar,ft,e,r),o=st(e),a=P(()=>{const{max:h}=e;return h!==void 0?b.value.length>=h:!1}),u=E(e.defaultFileList),c=j(e,"fileList"),s=E(null),d={value:!1},l=E(!1),f=new Map,B=dt(c,u),b=P(()=>B.value.map(de));function w(){var h;(h=s.value)===null||h===void 0||h.click()}function R(h){const F=h.target;T(F.files?Array.from(F.files).map(U=>({file:U,entry:null,source:"input"})):null,h),F.value=""}function L(h){const{"onUpdate:fileList":F,onUpdateFileList:U}=e;F&&_e(F,h),U&&_e(U,h),u.value=h}const D=P(()=>e.multiple||e.directory);function T(h,F){if(!h||h.length===0)return;const{onBeforeUpload:U}=e;h=D.value?h:[h[0]];const{max:X,accept:H}=e;h=h.filter(({file:O,source:N})=>N==="dnd"&&(H!=null&&H.trim())?Jt(O.name,O.type,H):!0),X&&(h=h.slice(0,X-b.value.length));const q=ke();Promise.all(h.map(({file:O,entry:N})=>Ie(this,void 0,void 0,function*(){var C;const m={id:ke(),batchId:q,name:O.name,status:"pending",percentage:0,file:O,url:null,type:O.type,thumbnailUrl:null,fullPath:(C=N==null?void 0:N.fullPath)!==null&&C!==void 0?C:`/${O.webkitRelativePath||O.name}`};return!U||(yield U({file:m,fileList:b.value}))!==!1?m:null}))).then(O=>Ie(this,void 0,void 0,function*(){let N=Promise.resolve();O.forEach(C=>{N=N.then(gt).then(()=>{C&&I(C,F,{append:!0})})}),yield N})).then(()=>{e.defaultUpload&&M()})}function M(h){const{method:F,action:U,withCredentials:X,headers:H,data:q,name:O}=e,N=h!==void 0?b.value.filter(m=>m.id===h):b.value,C=h!==void 0;N.forEach(m=>{const{status:p}=m;(p==="pending"||p==="error"&&C)&&(e.customRequest?sr({inst:{doChange:I,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:m,action:U,withCredentials:X,headers:H,data:q,customRequest:e.customRequest}):fr({doChange:I,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},O,m,{method:F,action:U,withCredentials:X,responseType:e.responseType,headers:H,data:q}))})}const I=(h,F,U={append:!1,remove:!1})=>{const{append:X,remove:H}=U,q=Array.from(b.value),O=q.findIndex(N=>N.id===h.id);if(X||H||~O){X?q.push(h):H?q.splice(O,1):q.splice(O,1,h);const{onChange:N}=e;N&&N({file:h,fileList:q,event:F}),L(q)}};function g(h){var F;if(h.thumbnailUrl)return h.thumbnailUrl;const{createThumbnailUrl:U}=e;return U?(F=U(h.file,h))!==null&&F!==void 0?F:h.url||"":h.url?h.url:h.file?Gt(h.file):""}const k=P(()=>{const{common:{cubicBezierEaseInOut:h},self:{draggerColor:F,draggerBorder:U,draggerBorderHover:X,itemColorHover:H,itemColorHoverError:q,itemTextColorError:O,itemTextColorSuccess:N,itemTextColor:C,itemIconColor:m,itemDisabledOpacity:p,lineHeight:V,borderRadius:te,fontSize:re,itemBorderImageCardError:be,itemBorderImageCard:ye}}=n.value;return{"--n-bezier":h,"--n-border-radius":te,"--n-dragger-border":U,"--n-dragger-border-hover":X,"--n-dragger-color":F,"--n-font-size":re,"--n-item-color-hover":H,"--n-item-color-hover-error":q,"--n-item-disabled-opacity":p,"--n-item-icon-color":m,"--n-item-text-color":C,"--n-item-text-color-error":O,"--n-item-text-color-success":N,"--n-line-height":V,"--n-item-border-image-card-error":be,"--n-item-border-image-card":ye}}),$=i?Ne("upload",void 0,k,e):void 0;ut(ae,{mergedClsPrefixRef:r,mergedThemeRef:n,showCancelButtonRef:j(e,"showCancelButton"),showDownloadButtonRef:j(e,"showDownloadButton"),showRemoveButtonRef:j(e,"showRemoveButton"),showRetryButtonRef:j(e,"showRetryButton"),onRemoveRef:j(e,"onRemove"),onDownloadRef:j(e,"onDownload"),mergedFileListRef:b,triggerClassRef:j(e,"triggerClass"),triggerStyleRef:j(e,"triggerStyle"),shouldUseThumbnailUrlRef:j(e,"shouldUseThumbnailUrl"),renderIconRef:j(e,"renderIcon"),xhrMap:f,submit:M,doChange:I,showPreviewButtonRef:j(e,"showPreviewButton"),onPreviewRef:j(e,"onPreview"),getFileThumbnailUrlResolver:g,listTypeRef:j(e,"listType"),dragOverRef:l,openOpenFileDialog:w,draggerInsideRef:d,handleFileAddition:T,mergedDisabledRef:o.mergedDisabledRef,maxReachedRef:a,fileListClassRef:j(e,"fileListClass"),fileListStyleRef:j(e,"fileListStyle"),abstractRef:j(e,"abstract"),acceptRef:j(e,"accept"),cssVarsRef:i?void 0:k,themeClassRef:$==null?void 0:$.themeClass,onRender:$==null?void 0:$.onRender,showTriggerRef:j(e,"showTrigger"),imageGroupPropsRef:j(e,"imageGroupProps"),mergedDirectoryDndRef:P(()=>{var h;return(h=e.directoryDnd)!==null&&h!==void 0?h:e.directory})});const ne={clear:()=>{u.value=[]},submit:M,openOpenFileDialog:w};return Object.assign({mergedClsPrefix:r,draggerInsideRef:d,inputElRef:s,mergedTheme:n,dragOver:l,mergedMultiple:D,cssVars:i?void 0:k,themeClass:$==null?void 0:$.themeClass,onRender:$==null?void 0:$.onRender,handleFileInputChange:R},ne)},render(){var e,r;const{draggerInsideRef:i,mergedClsPrefix:n,$slots:o,directory:a,onRender:u}=this;if(o.default&&!this.abstract){const s=o.default()[0];!((e=s==null?void 0:s.type)===null||e===void 0)&&e[qe]&&(i.value=!0)}const c=t("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${n}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:a||void 0,directory:a||void 0}));return this.abstract?t(xe,null,(r=o.default)===null||r===void 0?void 0:r.call(o),t(ct,{to:"body"},c)):(u==null||u(),t("div",{class:[`${n}-upload`,i.value&&`${n}-upload--dragger-inside`,this.dragOver&&`${n}-upload--drag-over`,this.themeClass],style:this.cssVars},c,this.showTrigger&&this.listType!=="image-card"&&t(We,null,o),this.showFileList&&t(or,null,o)))}}),hr={class:"m-auto flex h-14 max-w-screen-4xl items-center justify-between px-4"},mr={class:"flex min-w-0 flex-1 items-center space-x-2 overflow-hidden pr-2"},vr=S("h2",{class:"text-base font-bold"},"我的自定义工作台",-1),br=S("div",{class:"flex items-center space-x-2"},null,-1),yr=W({__name:"header",setup(e){const r=Ae();return(i,n)=>(Z(),oe("div",hr,[S("div",mr,[S("button",{onClick:n[0]||(n[0]=o=>y(r).go(-1))},[x(y(J),{class:"text-xl",icon:"ri:arrow-left-s-line"})]),vr]),br]))}}),xr={class:"w-full flex justify-center"},wr={class:"p-6 max-w-screen-4xl px-4 w-full"},Cr={class:"flex flex-col space-y-3 justify-between sm:flex-row sm:space-y-0"},Rr={class:"sm:w-full md:w-[300px] sm:mb-3 2xl:w-[380px]"},kr={class:"mt-10 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4 gap-5"},_r=["onClick"],$r={class:"w-full h-16 flex items-center mb-3"},Pr={class:"w-14 h-14 flex justify-center items-center rounded-md shadow-md mr-5 border border-[#00000014]"},Br=["src"],Sr={class:"text-base font-bold mb-1 text-base text-[#333] dark:text-[#ffffff85]"},Lr={class:"w-full text-[#999999] text-xs min-h-[40px]"},Tr={class:"w-full flex justify-between mt-3"},Ir={class:"p-5 bg-white rounded dark:bg-slate-800"},Dr={class:"font-bold text-base"},zr={class:"pt-5 mt-6"},Fr=S("p",null,"Tips: 请知悉 ",-1),Ur=S("p",null,"选择共享提交之后审核状态将无法编辑应用",-1),Or=S("p",null,"审核通过的应用将会在应用广场公开展示",-1),Nr=S("p",null,"管理审核通过后将会赠送一定的站内额度奖励用户",-1),jr=S("p",null,"一旦提交处于审核中、您将不能再编辑此应用",-1),Ar=W({__name:"main",setup(e){const r=pt(),i=E(""),n=E(!1),o=E(!1),a=E([]),u=E(null),c=E(0),s=E(!1),d=P(()=>c.value===0?"创建我的个人应用":"更新我的个人应用"),l=P(()=>c.value===0?"创建专属应用":"更新个人应用"),f=P(()=>i.value?r.mineApps.filter(C=>C.appName.includes(i.value)):r.mineApps),B=E("/api/upload/file"),b=()=>({catId:null,name:null,preset:null,des:null,demoData:"",coverImg:"",public:!1}),w=E(b()),R={catId:[{required:!0,message:"请选择分类"}],name:[{required:!0,message:"请输入应用名称",trigger:"blur"},{min:2,max:30,message:"长度应为2到10个字符之间",trigger:"blur"}],preset:[{required:!0,message:"请输入预设prompt",trigger:"blur"},{min:6,max:1200,message:"长度应为6到1200个字符之间",trigger:"blur"}],des:[{required:!0,message:"请输入简短的应用描述",trigger:"blur"},{max:50,message:"长度应为0到50个字符之间",trigger:"blur"}],demoData:[{required:!0,message:"请输入示例数据、按回车换行表示新增一条",trigger:"blur"},{max:100,message:"长度应为0到100个字符之间",trigger:"blur"}],coverImg:[{required:!0,message:"请上传应用Logo",trigger:"change"}],public:[{required:!0,message:"请选择是否公开"}]};Me();const L=ht(),D=Ae(),T=E([]),M=E(null);function I(C){i.value=C}async function g(C){const m=await Rt(),{modelMaps:p}=m.data;if(!p[1])return L.warning("管理员未配置特定应用模型、请联系管理员配置~");D.push({path:"/chat",query:{appId:C.appId}})}async function k(C){C.loading=!0;try{const m=await kt({appId:C.appId});L.success(m.data),await r.queryMineApps(),C.loading=!1}catch{C.loading=!1}}async function $(){const C=await Bt();T.value=C.data.rows}async function ne(C){const m=await _t({id:C.appId});L.success(m.data),r.queryMineApps()}async function h(C){if(!C.length)M.value=null;else{const m=C[0].file;M.value=m;const p=new FormData;p.append("file",m);const V=await $t.post(B.value,p,{headers:{"Content-Type":"multipart/form-data"}});V.data.data?w.value.coverImg=V.data.data:L.error("上传图片失败、请检查后再试试吧!")}}function F({file:C,fileList:m}){return new Promise((p,V)=>{const{size:te,type:re}=C.file;if(re!=="image/png"&&re!=="image/jpg"&&re!=="image/jpeg")return L.error("只能上传png/jpg/jpeg格式的图片"),p(!1);if(te>3e3*1024)return L.error("图片大小不能超过300k"),p(!1);p(!0)})}mt(()=>{!f.value.length&&r.queryMineApps()});function U(){o.value=!0,$()}function X(){}function H(){q()}function q(){c.value=0,s.value=!1,w.value=b()}async function O(C){await $();const{catId:m,appName:p,preset:V,appDes:te,demoData:re,coverImg:be,public:ye}=C;Object.assign(w.value,{catId:m,name:p,preset:V,des:te,demoData:re,coverImg:be,public:ye}),c.value=C.appId,o.value=!0,s.value=C.public}function N(){var C;(C=u.value)==null||C.validate(async m=>{if(!m){const p=w.value;c.value&&(p.appId=c.value);const V=await Pt(p),te=c.value?"个人应用修改完成!":"个人应用创建完成!";V.success&&L.success(te),r.queryMineApps(),q(),o.value=!1}})}return(C,m)=>(Z(),oe(xe,null,[S("div",xr,[S("div",wr,[S("div",Cr,[S("div",Rr,[x(y(le),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=p=>i.value=p),type:"text",placeholder:`您一共收录了${f.value.length}个应用(关键词过滤)`,onInput:I},null,8,["modelValue","placeholder"])]),x(y($e),null,{default:_(()=>[x(y(K),{onClick:U},{icon:_(()=>[x(y(J),{icon:"gridicons:create"})]),default:_(()=>[Q(" 创建自定义应用 ")]),_:1}),x(y(K),{type:"primary",onClick:m[1]||(m[1]=p=>y(D).push("/app-store"))},{icon:_(()=>[x(y(J),{icon:"ri:add-line"})]),default:_(()=>[Q(" 前往广场添加应用 ")]),_:1})]),_:1})]),S("div",kr,[(Z(!0),oe(xe,null,vt(f.value,p=>(Z(),oe("div",{key:p.id,class:"card relative custom-card cursor-pointer border border-[#e0e0e0] dark:border-neutral-800 p-4 pt-2 border rounded-md flex flex-col justify-center items-center hover:bg-neutral-100 dark:hover:bg-[#24272e] select-none",onClick:V=>g(p)},[S("div",$r,[S("span",Pr,[S("img",{src:p.coverImg,class:"w-8 h-8 mb-1",alt:""},null,8,Br)]),S("span",Sr,fe(p.appName),1)]),S("p",Lr,fe(p.appDes),1),S("div",Tr,[p.appRole==="system"||p.public?(Z(),ge(y(Be),{key:0,placement:"bottom",onPositiveClick:se(V=>k(p),["stop"])},{trigger:_(()=>[x(y(K),{size:"tiny",ghost:"",loading:p.loading,onClick:m[2]||(m[2]=se(()=>{},["stop"]))},{icon:_(()=>[x(y(J),{icon:"clarity:favorite-line",class:"text-base"})]),default:_(()=>[Q(" 取消收藏 ")]),_:2},1032,["loading"])]),default:_(()=>[Q(" 确认取消收藏该应用吗? ")]),_:2},1032,["onPositiveClick"])):pe("",!0),x(y($e),null,{default:_(()=>[p.appRole==="user"&&!p.public?(Z(),ge(y(Be),{key:0,placement:"bottom",onPositiveClick:se(V=>ne(p),["stop"])},{trigger:_(()=>[x(y(K),{size:"tiny",ghost:"",loading:p.loading,onClick:m[3]||(m[3]=se(()=>{},["stop"]))},{icon:_(()=>[x(y(J),{icon:"mdi-light:delete",class:"text-base"})]),default:_(()=>[Q(" 删除应用 ")]),_:2},1032,["loading"])]),default:_(()=>[Q(" 确认移除创建的应用吗? ")]),_:2},1032,["onPositiveClick"])):pe("",!0),p.appRole==="user"&&!p.public?(Z(),ge(y(K),{key:1,size:"tiny",ghost:"",loading:p.loading,onClick:se(V=>O(p),["stop"])},{icon:_(()=>[x(y(J),{icon:"mdi-light:delete",class:"text-base"})]),default:_(()=>[Q(" 编辑应用 ")]),_:2},1032,["loading","onClick"])):pe("",!0)]),_:2},1024)]),x(y(J),{icon:"codicon:run-all",class:"run-icon text-xl text-[#5A91FC] absolute right-3 bottom-3"}),p.status===3?(Z(),ge(y(J),{key:0,icon:"icon-park-twotone:mark",class:"text-xl text-[#5A91FC] absolute right-3 top-3"})):pe("",!0)],8,_r))),128))])])]),x(y(Ct),{show:o.value,title:"创建",style:{width:"90%","max-width":"640px"},"mask-closable":!1,"on-after-enter":X,"on-after-leave":H},{default:_(()=>[S("div",Ir,[S("div",{class:"absolute top-4 left-5 cursor-pointer z-30",onClick:m[4]||(m[4]=p=>o.value=!1)},[S("span",Dr,fe(l.value),1)]),S("div",{class:"absolute top-3 right-3 cursor-pointer z-30",onClick:m[5]||(m[5]=p=>o.value=!1)},[x(y(bt),{size:"20",color:"#0e7a0d"},{default:_(()=>[x(y(yt))]),_:1})]),S("div",zr,[x(y(xt),{ref_key:"formRef",ref:u,model:w.value,rules:R,"label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{maxWidth:"640px"}},{default:_(()=>[x(y(ee),{label:"应用分类",path:"catId"},{default:_(()=>[x(y(It),{value:w.value.catId,"onUpdate:value":m[6]||(m[6]=p=>w.value.catId=p),clearable:"",size:"small","label-field":"name",placeholder:"请输入您的应用分类","value-field":"id",options:T.value},null,8,["value","options"])]),_:1}),x(y(ee),{label:"应用名称",path:"name"},{default:_(()=>[x(y(le),{value:w.value.name,"onUpdate:value":m[7]||(m[7]=p=>w.value.name=p),placeholder:"请输入您的应用名称",type:"name",maxlength:30,"show-name-on":"click",tabindex:"0"},null,8,["value"])]),_:1}),x(y(ee),{label:"预设指令",path:"preset"},{default:_(()=>[x(y(le),{value:w.value.preset,"onUpdate:value":m[8]||(m[8]=p=>w.value.preset=p),max:255,autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请填写prompt预设指令(核心)"},null,8,["value"])]),_:1}),x(y(ee),{label:"应用描述",path:"des"},{default:_(()=>[x(y(le),{value:w.value.des,"onUpdate:value":m[9]||(m[9]=p=>w.value.des=p),autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请对你的应用做以简要的描述以便于大家认识它!"},null,8,["value"])]),_:1}),x(y(ee),{label:"示例内容",path:"demoData"},{default:_(()=>[x(y(le),{value:w.value.demoData,"onUpdate:value":m[10]||(m[10]=p=>w.value.demoData=p),autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请填写一个示例、方便快速告诉别人如何使用、每点击回车换行一次则是新增一条示例!"},null,8,["value"])]),_:1}),x(y(ee),{label:"应用Logo",path:"coverImg"},{default:_(()=>[x(y(pr),{"on-update:file-list":h,"on-before-upload":F,max:1,"default-upload":!1,action:B.value,"default-file-list":a.value,"list-type":"image-card"},{default:_(()=>[Q(" 点击上传 ")]),_:1},8,["action","default-file-list"])]),_:1}),x(y(ee),{label:"是否共享",path:"public"},{default:_(()=>[x(y(Dt),{value:w.value.public,"onUpdate:value":m[11]||(m[11]=p=>w.value.public=p),disabled:s.value},null,8,["value","disabled"]),x(y(wt),{placement:"top-start",trigger:"hover"},{trigger:_(()=>[x(y(J),{icon:"ri:error-warning-line",class:"text-base ml-3 cursor-pointer"})]),default:_(()=>[Fr,Ur,Or,Nr,jr]),_:1})]),_:1}),x(y(ee),{class:"mt-3"},{default:_(()=>[x(y(K),{block:"",type:"primary",disabled:n.value,loading:n.value,onClick:N},{default:_(()=>[Q(fe(d.value),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["model"])])])]),_:1},8,["show"])],64))}});const Mr={class:"flex h-full w-full flex-col bg-white dark:bg-[#111114]"},qr={class:"sticky left-0 right-0 top-0 z-40 bg-white dark:border-b-neutral-800 dark:bg-[#111114]"},Er=W({__name:"index",setup(e){return(r,i)=>(Z(),oe("div",Mr,[S("header",qr,[x(yr)]),x(Ar)]))}}),Hr={class:"h-full dark:bg-[#24272e] transition-all"},Kr=W({__name:"role",setup(e){const r=St(),{isMobile:i}=Me(),n=P(()=>r.siderCollapsed),o=P(()=>i.value?["rounded-none","shadow-none"]:["rounded-md","shadow-md","dark:border-neutral-800"]),a=P(()=>["h-full",{"pl-[260px]":!i.value&&!n.value}]);return(u,c)=>(Z(),oe("div",Hr,[S("div",{class:Pe(["h-full overflow-hidden",o.value])},[x(y(Tt),{class:Pe(["z-40 transition",a.value]),"has-sider":""},{default:_(()=>[x(Xe),x(y(Lt),{class:"h-full"},{default:_(()=>[x(Er)]),_:1})]),_:1},8,["class"])],2)]))}});export{Kr as default};
|