mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-21 19:16: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-65773153.js";import{an as ue,aa as t,ao as A,ap as y,aq as L,d as W,e as B,ar as oe,as as Y,at as Le,au as De,av as ze,aw as Fe,ax as Ue,ay as me,az as Ge,aA as we,aB as Oe,aC as Ye,aD as ce,aE as ve,aF as Ze,aG as Ke,aH as Qe,aI as Ne,r as E,aJ as Je,aK as et,V as tt,I as K,aL as rt,aM as nt,aN as ot,aO as it,aP as Ce,aQ as G,aR as at,aS as lt,aT as M,aU as st,aV as dt,aW as ut,F as xe,aX as ct,aY as Re,v as ft,aZ as ke,f as je,o as Z,c as ie,a as T,m as b,k as x,_ as J,a_ as pt,C as Ae,b as gt,h as ht,A as le,l as R,J as Q,U as _e,j as mt,t as fe,p as pe,q as se,s as ge,z as vt,a$ as bt,b0 as yt,b1 as ee,S as xt,b2 as wt,ae as Ct,b3 as Rt,b4 as kt,W as _t,b5 as $t,b6 as Bt,D as Pt,E as $e,b7 as St,am as Tt}from"./index-ff703318.js";import{N as Be}from"./Popconfirm-61825f2f.js";import{N as It}from"./Select-1e969c7b.js";import{N as Lt}from"./Switch-909fa692.js";import"./LayoutSider-2aa29697.js";const Dt=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"}))))),zt=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;"}))),Ft=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"}))))),Ut=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"}))))),Ot=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;"}))),Nt=A([y("progress",{display:"inline-block"},[y("progress-icon",`
|
||
color: var(--n-icon-color);
|
||
transition: color .3s var(--n-bezier);
|
||
`),L("line",`
|
||
width: 100%;
|
||
display: block;
|
||
`,[y("progress-content",`
|
||
display: flex;
|
||
align-items: center;
|
||
`,[y("progress-graph",{flex:1})]),y("progress-custom-content",{marginLeft:"14px"}),y("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);
|
||
`,[L("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);
|
||
`)])]),L("circle, dashboard",{width:"120px"},[y("progress-custom-content",`
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`),y("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;
|
||
`),y("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);
|
||
`)]),L("multiple-circle",`
|
||
width: 200px;
|
||
color: inherit;
|
||
`,[y("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);
|
||
`)]),y("progress-content",{position:"relative"}),y("progress-graph",{position:"relative"},[y("progress-graph-circle",[A("svg",{verticalAlign:"bottom"}),y("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);
|
||
`,[L("empty",{opacity:0})]),y("progress-graph-circle-rail",`
|
||
transition: stroke .3s var(--n-bezier);
|
||
overflow: hidden;
|
||
stroke: var(--n-rail-color);
|
||
`)]),y("progress-graph-line",[L("indicator-inside",[y("progress-graph-line-rail",`
|
||
height: 16px;
|
||
line-height: 16px;
|
||
border-radius: 10px;
|
||
`,[y("progress-graph-line-fill",`
|
||
height: inherit;
|
||
border-radius: 10px;
|
||
`),y("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);
|
||
`)])]),L("indicator-inside-label",`
|
||
height: 16px;
|
||
display: flex;
|
||
align-items: center;
|
||
`,[y("progress-graph-line-rail",`
|
||
flex: 1;
|
||
transition: background-color .3s var(--n-bezier);
|
||
`),y("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);
|
||
`)]),y("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);
|
||
`,[y("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);
|
||
`,[L("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;
|
||
}
|
||
`)]),jt={success:t(Le,null),error:t(De,null),warning:t(ze,null),info:t(Fe,null)},At=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:n}){const r=B(()=>oe(e.height)),o=B(()=>e.railBorderRadius!==void 0?oe(e.railBorderRadius):e.height!==void 0?oe(e.height,{c:.5}):""),i=B(()=>e.fillBorderRadius!==void 0?oe(e.fillBorderRadius):e.railBorderRadius!==void 0?oe(e.railBorderRadius):e.height!==void 0?oe(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:l,railColor:u,railStyle:c,percentage:d,unit:s,indicatorTextColor:a,status:f,showIndicator:P,fillColor:h,processing:w,clsPrefix:k}=e;return t("div",{class:`${k}-progress-content`,role:"none"},t("div",{class:`${k}-progress-graph`,"aria-hidden":!0},t("div",{class:[`${k}-progress-graph-line`,{[`${k}-progress-graph-line--indicator-${l}`]:!0}]},t("div",{class:`${k}-progress-graph-line-rail`,style:[{backgroundColor:u,height:r.value,borderRadius:o.value},c]},t("div",{class:[`${k}-progress-graph-line-fill`,w&&`${k}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:h,height:r.value,lineHeight:r.value,borderRadius:i.value}},l==="inside"?t("div",{class:`${k}-progress-graph-line-indicator`,style:{color:a}},d,s):null)))),P&&l==="outside"?t("div",null,n.default?t("div",{class:`${k}-progress-custom-content`,style:{color:a},role:"none"},n.default()):f==="default"?t("div",{role:"none",class:`${k}-progress-icon ${k}-progress-icon--as-text`,style:{color:a}},d,s):t("div",{class:`${k}-progress-icon`,"aria-hidden":!0},t(Y,{clsPrefix:k},{default:()=>jt[f]}))):null)}}}),Mt={success:t(Le,null),error:t(De,null),warning:t(ze,null),info:t(Fe,null)},qt=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:n}){function r(o,i,l){const{gapDegree:u,viewBoxWidth:c,strokeWidth:d}=e,s=50,a=0,f=s,P=0,h=2*s,w=50+d/2,k=`M ${w},${w} m ${a},${f}
|
||
a ${s},${s} 0 1 1 ${P},${-h}
|
||
a ${s},${s} 0 1 1 ${-P},${h}`,$=Math.PI*2*s,F={stroke:l,strokeDasharray:`${o/100*($-u)}px ${c*8}px`,strokeDashoffset:`-${u/2}px`,transformOrigin:i?"center":void 0,transform:i?`rotate(${i}deg)`:void 0};return{pathString:k,pathStyle:F}}return()=>{const{fillColor:o,railColor:i,strokeWidth:l,offsetDegree:u,status:c,percentage:d,showIndicator:s,indicatorTextColor:a,unit:f,gapOffsetDegree:P,clsPrefix:h}=e,{pathString:w,pathStyle:k}=r(100,0,i),{pathString:$,pathStyle:F}=r(d,u,o),D=100+l;return t("div",{class:`${h}-progress-content`,role:"none"},t("div",{class:`${h}-progress-graph`,"aria-hidden":!0},t("div",{class:`${h}-progress-graph-circle`,style:{transform:P?`rotate(${P}deg)`:void 0}},t("svg",{viewBox:`0 0 ${D} ${D}`},t("g",null,t("path",{class:`${h}-progress-graph-circle-rail`,d:w,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:k})),t("g",null,t("path",{class:[`${h}-progress-graph-circle-fill`,d===0&&`${h}-progress-graph-circle-fill--empty`],d:$,"stroke-width":l,"stroke-linecap":"round",fill:"none",style:F}))))),s?t("div",null,n.default?t("div",{class:`${h}-progress-custom-content`,role:"none"},n.default()):c!=="default"?t("div",{class:`${h}-progress-icon`,"aria-hidden":!0},t(Y,{clsPrefix:h},{default:()=>Mt[c]})):t("div",{class:`${h}-progress-text`,style:{color:a},role:"none"},t("span",{class:`${h}-progress-text__percentage`},d),t("span",{class:`${h}-progress-text__unit`},f))):null)}}});function Pe(e,n,r=100){return`m ${r/2} ${r/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const Et=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:n}){const r=B(()=>e.percentage.map((i,l)=>`${Math.PI*i/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*l)-e.circleGap*l)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:o,strokeWidth:i,circleGap:l,showIndicator:u,fillColor:c,railColor:d,railStyle:s,percentage:a,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 ${o} ${o}`},a.map((P,h)=>t("g",{key:h},t("path",{class:`${f}-progress-graph-circle-rail`,d:Pe(o/2-i/2*(1+2*h)-l*h,i,o),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:d[h]},s[h]]}),t("path",{class:[`${f}-progress-graph-circle-fill`,P===0&&`${f}-progress-graph-circle-fill--empty`],d:Pe(o/2-i/2*(1+2*h)-l*h,i,o),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[h],strokeDashoffset:0,stroke:c[h]}})))))),u&&n.default?t("div",null,t("div",{class:`${f}-progress-text`},n.default())):null)}}}),Ht=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}),Wt=W({name:"Progress",props:Ht,setup(e){const n=B(()=>e.indicatorPlacement||e.indicatorPosition),r=B(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:o,inlineThemeDisabled:i}=Ue(e),l=me("Progress","-progress",Nt,Ge,e,o),u=B(()=>{const{status:d}=e,{common:{cubicBezierEaseInOut:s},self:{fontSize:a,fontSizeCircle:f,railColor:P,railHeight:h,iconSizeCircle:w,iconSizeLine:k,textColorCircle:$,textColorLineInner:F,textColorLineOuter:D,lineBgProcessing:I,fontWeightCircle:U,[we("iconColor",d)]:m,[we("fillColor",d)]:_}}=l.value;return{"--n-bezier":s,"--n-fill-color":_,"--n-font-size":a,"--n-font-size-circle":f,"--n-font-weight-circle":U,"--n-icon-color":m,"--n-icon-size-circle":w,"--n-icon-size-line":k,"--n-line-bg-processing":I,"--n-rail-color":P,"--n-rail-height":h,"--n-text-color-circle":$,"--n-text-color-line-inner":F,"--n-text-color-line-outer":D}}),c=i?Oe("progress",B(()=>e.status[0]),u,e):void 0;return{mergedClsPrefix:o,mergedIndicatorPlacement:n,gapDeg:r,cssVars:i?void 0:u,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){const{type:e,cssVars:n,indicatorTextColor:r,showIndicator:o,status:i,railColor:l,railStyle:u,color:c,percentage:d,viewBoxWidth:s,strokeWidth:a,mergedIndicatorPlacement:f,unit:P,borderRadius:h,fillBorderRadius:w,height:k,processing:$,circleGap:F,mergedClsPrefix:D,gapDeg:I,gapOffsetDegree:U,themeClass:m,$slots:_,onRender:S}=this;return S==null||S(),t("div",{class:[m,`${D}-progress`,`${D}-progress--${e}`,`${D}-progress--${i}`],style:n,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":d,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?t(qt,{clsPrefix:D,status:i,showIndicator:o,indicatorTextColor:r,railColor:l,fillColor:c,railStyle:u,offsetDegree:this.offsetDegree,percentage:d,viewBoxWidth:s,strokeWidth:a,gapDegree:I===void 0?e==="dashboard"?75:0:I,gapOffsetDegree:U,unit:P},_):e==="line"?t(At,{clsPrefix:D,status:i,showIndicator:o,indicatorTextColor:r,railColor:l,fillColor:c,railStyle:u,percentage:d,processing:$,indicatorPlacement:f,unit:P,fillBorderRadius:w,railBorderRadius:h,height:k},_):e==="multiple-circle"?t(Et,{clsPrefix:D,strokeWidth:a,railColor:l,fillColor:c,railStyle:u,viewBoxWidth:s,percentage:d,showIndicator:o,circleGap:F},_):null)}}),ae=Ye("n-upload"),Me="__UPLOAD_DRAGGER__",Vt=W({name:"UploadDragger",[Me]:!0,setup(e,{slots:n}){const r=ce(ae,null);return r||ve("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:o},mergedDisabledRef:{value:i},maxReachedRef:{value:l}}=r;return t("div",{class:[`${o}-upload-dragger`,(i||l)&&`${o}-upload-dragger--disabled`]},n)}}});var qe=globalThis&&globalThis.__awaiter||function(e,n,r,o){function i(l){return l instanceof r?l:new r(function(u){u(l)})}return new(r||(r=Promise))(function(l,u){function c(a){try{s(o.next(a))}catch(f){u(f)}}function d(a){try{s(o.throw(a))}catch(f){u(f)}}function s(a){a.done?l(a.value):i(a.value).then(c,d)}s((o=o.apply(e,n||[])).next())})};const Ee=e=>e.includes("image/"),Se=(e="")=>{const n=e.split("/"),o=n[n.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},Te=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,He=e=>{if(e.type)return Ee(e.type);const n=Se(e.name||"");if(Te.test(n))return!0;const r=e.thumbnailUrl||e.url||"",o=Se(r);return!!(/^data:image\//.test(r)||Te.test(o))};function Xt(e){return qe(this,void 0,void 0,function*(){return yield new Promise(n=>{if(!e.type||!Ee(e.type)){n("");return}n(window.URL.createObjectURL(e))})})}const Gt=Ze&&window.FileReader&&window.File;function Yt(e){return e.isDirectory}function Zt(e){return e.isFile}function Kt(e,n){return qe(this,void 0,void 0,function*(){const r=[];let o,i=0;function l(){i++}function u(){i--,i||o(r)}function c(d){d.forEach(s=>{if(s){if(l(),n&&Yt(s)){const a=s.createReader();l(),a.readEntries(f=>{c(f),u()},()=>{u()})}else Zt(s)&&(l(),s.file(a=>{r.push({file:a,entry:s,source:"dnd"}),u()},()=>{u()}));u()}})}return yield new Promise(d=>{o=d,c(e)}),r})}function de(e){const{id:n,name:r,percentage:o,status:i,url:l,file:u,thumbnailUrl:c,type:d,fullPath:s,batchId:a}=e;return{id:n,name:r,percentage:o??null,status:i,url:l??null,file:u??null,thumbnailUrl:c??null,type:d??null,fullPath:s??null,batchId:a??null}}function Qt(e,n,r){return e=e.toLowerCase(),n=n.toLocaleLowerCase(),r=r.toLocaleLowerCase(),r.split(",").map(i=>i.trim()).filter(Boolean).some(i=>{if(i.startsWith(".")){if(e.endsWith(i))return!0}else if(i.includes("/")){const[l,u]=n.split("/"),[c,d]=i.split("/");if((c==="*"||l&&c&&c===l)&&(d==="*"||u&&d&&d===u))return!0}else return!0;return!1})}const Jt=(e,n)=>{if(!e)return;const r=document.createElement("a");r.href=e,n!==void 0&&(r.download=n),document.body.appendChild(r),r.click(),document.body.removeChild(r)},We=W({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:n}){const r=ce(ae,null);r||ve("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:o,mergedDisabledRef:i,maxReachedRef:l,listTypeRef:u,dragOverRef:c,openOpenFileDialog:d,draggerInsideRef:s,handleFileAddition:a,mergedDirectoryDndRef:f,triggerStyleRef:P}=r,h=B(()=>u.value==="image-card");function w(){i.value||l.value||d()}function k(I){I.preventDefault(),c.value=!0}function $(I){I.preventDefault(),c.value=!0}function F(I){I.preventDefault(),c.value=!1}function D(I){var U;if(I.preventDefault(),!s.value||i.value||l.value){c.value=!1;return}const m=(U=I.dataTransfer)===null||U===void 0?void 0:U.items;m!=null&&m.length?Kt(Array.from(m).map(_=>_.webkitGetAsEntry()),f.value).then(_=>{a(_)}).finally(()=>{c.value=!1}):c.value=!1}return()=>{var I;const{value:U}=o;return e.abstract?(I=n.default)===null||I===void 0?void 0:I.call(n,{handleClick:w,handleDrop:D,handleDragOver:k,handleDragEnter:$,handleDragLeave:F}):t("div",{class:[`${U}-upload-trigger`,(i.value||l.value)&&`${U}-upload-trigger--disabled`,h.value&&`${U}-upload-trigger--image-card`],style:P.value,onClick:w,onDrop:D,onDragover:k,onDragenter:$,onDragleave:F},h.value?t(Vt,null,{default:()=>Ke(n.default,()=>[t(Y,{clsPrefix:U},{default:()=>t(Qe,null)})])}):n)}}}),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(Ne,null,{default:()=>this.show?t(Wt,{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,n,r,o){function i(l){return l instanceof r?l:new r(function(u){u(l)})}return new(r||(r=Promise))(function(l,u){function c(a){try{s(o.next(a))}catch(f){u(f)}}function d(a){try{s(o.throw(a))}catch(f){u(f)}}function s(a){a.done?l(a.value):i(a.value).then(c,d)}s((o=o.apply(e,n||[])).next())})};const he={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},or=W({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0}},setup(e){const n=ce(ae),r=E(null),o=E(""),i=B(()=>{const{file:m}=e;return m.status==="finished"?"success":m.status==="error"?"error":"info"}),l=B(()=>{const{file:m}=e;if(m.status==="error")return"error"}),u=B(()=>{const{file:m}=e;return m.status==="uploading"}),c=B(()=>{if(!n.showCancelButtonRef.value)return!1;const{file:m}=e;return["uploading","pending","error"].includes(m.status)}),d=B(()=>{if(!n.showRemoveButtonRef.value)return!1;const{file:m}=e;return["finished"].includes(m.status)}),s=B(()=>{if(!n.showDownloadButtonRef.value)return!1;const{file:m}=e;return["finished"].includes(m.status)}),a=B(()=>{if(!n.showRetryButtonRef.value)return!1;const{file:m}=e;return["error"].includes(m.status)}),f=Je(()=>o.value||e.file.thumbnailUrl||e.file.url),P=B(()=>{if(!n.showPreviewButtonRef.value)return!1;const{file:{status:m},listType:_}=e;return["finished"].includes(m)&&f.value&&_==="image-card"});function h(){n.submit(e.file.id)}function w(m){m.preventDefault();const{file:_}=e;["finished","pending","error"].includes(_.status)?$(_):["uploading"].includes(_.status)?D(_):ot("upload","The button clicked type is unknown.")}function k(m){m.preventDefault(),F(e.file)}function $(m){const{xhrMap:_,doChange:S,onRemoveRef:{value:ne},mergedFileListRef:{value:g}}=n;Promise.resolve(ne?ne({file:Object.assign({},m),fileList:g}):!0).then(z=>{if(z===!1)return;const O=Object.assign({},m,{status:"removed"});_.delete(m.id),S(O,void 0,{remove:!0})})}function F(m){const{onDownloadRef:{value:_}}=n;Promise.resolve(_?_(Object.assign({},m)):!0).then(S=>{S!==!1&&Jt(m.url,m.name)})}function D(m){const{xhrMap:_}=n,S=_.get(m.id);S==null||S.abort(),$(Object.assign({},m))}function I(){const{onPreviewRef:{value:m}}=n;if(m)m(e.file);else if(e.listType==="image-card"){const{value:_}=r;if(!_)return;_.click()}}const U=()=>nr(this,void 0,void 0,function*(){const{listType:m}=e;m!=="image"&&m!=="image-card"||n.shouldUseThumbnailUrlRef.value(e.file)&&(o.value=yield n.getFileThumbnailUrlResolver(e.file))});return et(()=>{U()}),{mergedTheme:n.mergedThemeRef,progressStatus:i,buttonType:l,showProgress:u,disabled:n.mergedDisabledRef,showCancelButton:c,showRemoveButton:d,showDownloadButton:s,showRetryButton:a,showPreviewButton:P,mergedThumbnailUrl:f,shouldUseThumbnailUrl:n.shouldUseThumbnailUrlRef,renderIcon:n.renderIconRef,imageRef:r,handleRemoveOrCancelClick:w,handleDownloadClick:k,handleRetryClick:h,handlePreviewClick:I}},render(){const{clsPrefix:e,mergedTheme:n,listType:r,file:o,renderIcon:i}=this;let l;const u=r==="image";u||r==="image-card"?l=!this.shouldUseThumbnailUrl(o)||!this.mergedThumbnailUrl?t("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):He(o)?t(Y,{clsPrefix:e},{default:()=>tr}):t(Y,{clsPrefix:e},{default:()=>rr})):t("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},r==="image-card"?t(tt,{src:this.mergedThumbnailUrl||void 0,previewSrc:o.url||void 0,alt:o.name,ref:"imageRef"}):t("img",{src:this.mergedThumbnailUrl||void 0,alt:o.name})):l=t("span",{class:`${e}-upload-file-info__thumbnail`},i?i(o):t(Y,{clsPrefix:e},{default:()=>t(Dt,null)}));const d=t(er,{show:this.showProgress,percentage:o.percentage||0,status:this.progressStatus}),s=r==="text"||r==="image";return t("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,o.url&&o.status!=="error"&&r!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},t("div",{class:`${e}-upload-file-info`},l,t("div",{class:`${e}-upload-file-info__name`},s&&(o.url&&o.status!=="error"?t("a",{rel:"noopener noreferer",target:"_blank",href:o.url||void 0,onClick:this.handlePreviewClick},o.name):t("span",{onClick:this.handlePreviewClick},o.name)),u&&d),t("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?t(K,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:n.peers.Button,themeOverrides:n.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:n.peers.Button,themeOverrides:n.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(zt,null)}):t(Y,{clsPrefix:e,key:"cancel"},{default:()=>t(Ut,null)})})}),this.showRetryButton&&!this.disabled&&t(K,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:n.peers.Button,themeOverrides:n.peerOverrides.Button,builtinThemeOverrides:he},{icon:()=>t(Y,{clsPrefix:e},{default:()=>t(Ot,null)})}),this.showDownloadButton?t(K,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:n.peers.Button,themeOverrides:n.peerOverrides.Button,builtinThemeOverrides:he},{icon:()=>t(Y,{clsPrefix:e},{default:()=>t(Ft,null)})}):null)),!u&&d)}}),ir=W({name:"UploadFileList",setup(e,{slots:n}){const r=ce(ae,null);r||ve("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:o,mergedClsPrefixRef:i,listTypeRef:l,mergedFileListRef:u,fileListStyleRef:c,cssVarsRef:d,themeClassRef:s,maxReachedRef:a,showTriggerRef:f,imageGroupPropsRef:P}=r,h=B(()=>l.value==="image-card"),w=()=>u.value.map($=>t(or,{clsPrefix:i.value,key:$.id,file:$,listType:l.value})),k=()=>h.value?t(it,Object.assign({},P.value),{default:w}):t(Ne,{group:!0},{default:w});return()=>{const{value:$}=i,{value:F}=o;return t("div",{class:[`${$}-upload-file-list`,h.value&&`${$}-upload-file-list--grid`,F?s==null?void 0:s.value:void 0],style:[F&&d?d.value:"",c.value]},k(),f.value&&!a.value&&h.value&&t(We,null,n))}}}),ar=A([y("upload","width: 100%;",[L("dragger-inside",[y("upload-trigger",`
|
||
display: block;
|
||
`)]),L("drag-over",[y("upload-dragger",`
|
||
border: var(--n-dragger-border-hover);
|
||
`)])]),y("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);
|
||
`),L("disabled",`
|
||
cursor: not-allowed;
|
||
`)]),y("upload-trigger",`
|
||
display: inline-block;
|
||
box-sizing: border-box;
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[A("+",[y("upload-file-list","margin-top: 8px;")]),L("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`),L("image-card",`
|
||
width: 96px;
|
||
height: 96px;
|
||
`,[y("base-icon",`
|
||
font-size: 24px;
|
||
`),y("upload-dragger",`
|
||
padding: 0;
|
||
height: 100%;
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
`)])]),y("upload-file-list",`
|
||
line-height: var(--n-line-height);
|
||
opacity: 1;
|
||
transition: opacity .3s var(--n-bezier);
|
||
`,[A("a, img","outline: none;"),L("disabled",`
|
||
opacity: var(--n-item-disabled-opacity);
|
||
cursor: not-allowed;
|
||
`,[y("upload-file","cursor: not-allowed;")]),L("grid",`
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, 96px);
|
||
grid-gap: 8px;
|
||
margin-top: 0;
|
||
`),y("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);
|
||
`,[Ce(),y("progress",[Ce({foldPadding:!0})]),A("&:hover",`
|
||
background-color: var(--n-item-color-hover);
|
||
`,[y("upload-file-info",[G("action",`
|
||
opacity: 1;
|
||
`)])]),L("image-type",`
|
||
border-radius: var(--n-border-radius);
|
||
text-decoration: underline;
|
||
text-decoration-color: #0000;
|
||
`,[y("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;
|
||
`,[y("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%;
|
||
`)])])]),L("text-type",[y("progress",`
|
||
box-sizing: border-box;
|
||
padding-bottom: 6px;
|
||
margin-bottom: 6px;
|
||
`)]),L("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;
|
||
`,[y("progress",`
|
||
position: absolute;
|
||
left: 8px;
|
||
bottom: 8px;
|
||
right: 8px;
|
||
width: unset;
|
||
`),y("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;"),y("upload-file-info",[G("thumbnail","opacity: .12;")])])]),L("error-status",[A("&:hover",`
|
||
background-color: var(--n-item-color-hover-error);
|
||
`),y("upload-file-info",[G("name","color: var(--n-item-text-color-error);"),G("thumbnail","color: var(--n-item-text-color-error);")]),L("image-card-type",`
|
||
border: var(--n-item-border-image-card-error);
|
||
`)]),L("with-url",`
|
||
cursor: pointer;
|
||
`,[y("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;
|
||
`)])])]),y("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);
|
||
`,[y("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;
|
||
`,[y("button",[A("&:not(:last-child)",{marginRight:"4px"}),y("base-icon",[A("svg",[at()])])]),L("image-type",`
|
||
position: relative;
|
||
max-width: 80px;
|
||
width: auto;
|
||
`),L("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;
|
||
`)])])])]),y("upload-file-input",`
|
||
display: block;
|
||
width: 0;
|
||
height: 0;
|
||
opacity: 0;
|
||
`)]);var Ie=globalThis&&globalThis.__awaiter||function(e,n,r,o){function i(l){return l instanceof r?l:new r(function(u){u(l)})}return new(r||(r=Promise))(function(l,u){function c(a){try{s(o.next(a))}catch(f){u(f)}}function d(a){try{s(o.throw(a))}catch(f){u(f)}}function s(a){a.done?l(a.value):i(a.value).then(c,d)}s((o=o.apply(e,n||[])).next())})};function lr(e,n,r){const{doChange:o,xhrMap:i}=e;let l=0;function u(d){var s;let a=Object.assign({},n,{status:"error",percentage:l});i.delete(n.id),a=de(((s=e.onError)===null||s===void 0?void 0:s.call(e,{file:a,event:d}))||a),o(a,d)}function c(d){var s;if(e.isErrorState){if(e.isErrorState(r)){u(d);return}}else if(r.status<200||r.status>=300){u(d);return}let a=Object.assign({},n,{status:"finished",percentage:l});i.delete(n.id),a=de(((s=e.onFinish)===null||s===void 0?void 0:s.call(e,{file:a,event:d}))||a),o(a,d)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(d){const s=Object.assign({},n,{status:"removed",file:null,percentage:l});i.delete(n.id),o(s,d)},handleXHRProgress(d){const s=Object.assign({},n,{status:"uploading"});if(d.lengthComputable){const a=Math.ceil(d.loaded/d.total*100);s.percentage=a,l=a}o(s,d)}}}function sr(e){const{inst:n,file:r,data:o,headers:i,withCredentials:l,action:u,customRequest:c}=e,{doChange:d}=e.inst;let s=0;c({file:r,data:o,headers:i,withCredentials:l,action:u,onProgress(a){const f=Object.assign({},r,{status:"uploading"}),P=a.percent;f.percentage=P,s=P,d(f)},onFinish(){var a;let f=Object.assign({},r,{status:"finished",percentage:s});f=de(((a=n.onFinish)===null||a===void 0?void 0:a.call(n,{file:f}))||f),d(f)},onError(){var a;let f=Object.assign({},r,{status:"error",percentage:s});f=de(((a=n.onError)===null||a===void 0?void 0:a.call(n,{file:f}))||f),d(f)}})}function dr(e,n,r){const o=lr(e,n,r);r.onabort=o.handleXHRAbort,r.onerror=o.handleXHRError,r.onload=o.handleXHRLoad,r.upload&&(r.upload.onprogress=o.handleXHRProgress)}function Ve(e,n){return typeof e=="function"?e({file:n}):e||{}}function ur(e,n,r){const o=Ve(n,r);o&&Object.keys(o).forEach(i=>{e.setRequestHeader(i,o[i])})}function cr(e,n,r){const o=Ve(n,r);o&&Object.keys(o).forEach(i=>{e.append(i,o[i])})}function fr(e,n,r,{method:o,action:i,withCredentials:l,responseType:u,headers:c,data:d}){const s=new XMLHttpRequest;s.responseType=u,e.xhrMap.set(r.id,s),s.withCredentials=l;const a=new FormData;if(cr(a,d,r),a.append(n,r.file),dr(e,r,s),i!==void 0){s.open(o.toUpperCase(),i),ur(s,c,r),s.send(a);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const pr=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],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=>Gt?He(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),gr=W({name:"Upload",props:pr,setup(e){e.abstract&&e.listType==="image-card"&&ve("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:n,inlineThemeDisabled:r}=Ue(e),o=me("Upload","-upload",ar,ct,e,n),i=lt(e),l=B(()=>{const{max:g}=e;return g!==void 0?h.value.length>=g:!1}),u=E(e.defaultFileList),c=M(e,"fileList"),d=E(null),s={value:!1},a=E(!1),f=new Map,P=st(c,u),h=B(()=>P.value.map(de));function w(){var g;(g=d.value)===null||g===void 0||g.click()}function k(g){const z=g.target;D(z.files?Array.from(z.files).map(O=>({file:O,entry:null,source:"input"})):null,g),z.value=""}function $(g){const{"onUpdate:fileList":z,onUpdateFileList:O}=e;z&&ke(z,g),O&&ke(O,g),u.value=g}const F=B(()=>e.multiple||e.directory);function D(g,z){if(!g||g.length===0)return;const{onBeforeUpload:O}=e;g=F.value?g:[g[0]];const{max:X,accept:H}=e;g=g.filter(({file:N,source:j})=>j==="dnd"&&(H!=null&&H.trim())?Qt(N.name,N.type,H):!0),X&&(g=g.slice(0,X-h.value.length));const q=Re();Promise.all(g.map(({file:N,entry:j})=>Ie(this,void 0,void 0,function*(){var C;const v={id:Re(),batchId:q,name:N.name,status:"pending",percentage:0,file:N,url:null,type:N.type,thumbnailUrl:null,fullPath:(C=j==null?void 0:j.fullPath)!==null&&C!==void 0?C:`/${N.webkitRelativePath||N.name}`};return!O||(yield O({file:v,fileList:h.value}))!==!1?v:null}))).then(N=>Ie(this,void 0,void 0,function*(){let j=Promise.resolve();return N.forEach(C=>{j=j.then(ft).then(()=>{C&&U(C,z,{append:!0})})}),yield j})).then(()=>{e.defaultUpload&&I()})}function I(g){const{method:z,action:O,withCredentials:X,headers:H,data:q,name:N}=e,j=g!==void 0?h.value.filter(v=>v.id===g):h.value,C=g!==void 0;j.forEach(v=>{const{status:p}=v;(p==="pending"||p==="error"&&C)&&(e.customRequest?sr({inst:{doChange:U,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:v,action:O,withCredentials:X,headers:H,data:q,customRequest:e.customRequest}):fr({doChange:U,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},N,v,{method:z,action:O,withCredentials:X,responseType:e.responseType,headers:H,data:q}))})}const U=(g,z,O={append:!1,remove:!1})=>{const{append:X,remove:H}=O,q=Array.from(h.value),N=q.findIndex(j=>j.id===g.id);if(X||H||~N){X?q.push(g):H?q.splice(N,1):q.splice(N,1,g);const{onChange:j}=e;j&&j({file:g,fileList:q,event:z}),$(q)}};function m(g){var z;if(g.thumbnailUrl)return g.thumbnailUrl;const{createThumbnailUrl:O}=e;return O?(z=O(g.file,g))!==null&&z!==void 0?z:g.url||"":g.url?g.url:g.file?Xt(g.file):""}const _=B(()=>{const{common:{cubicBezierEaseInOut:g},self:{draggerColor:z,draggerBorder:O,draggerBorderHover:X,itemColorHover:H,itemColorHoverError:q,itemTextColorError:N,itemTextColorSuccess:j,itemTextColor:C,itemIconColor:v,itemDisabledOpacity:p,lineHeight:V,borderRadius:te,fontSize:re,itemBorderImageCardError:be,itemBorderImageCard:ye}}=o.value;return{"--n-bezier":g,"--n-border-radius":te,"--n-dragger-border":O,"--n-dragger-border-hover":X,"--n-dragger-color":z,"--n-font-size":re,"--n-item-color-hover":H,"--n-item-color-hover-error":q,"--n-item-disabled-opacity":p,"--n-item-icon-color":v,"--n-item-text-color":C,"--n-item-text-color-error":N,"--n-item-text-color-success":j,"--n-line-height":V,"--n-item-border-image-card-error":be,"--n-item-border-image-card":ye}}),S=r?Oe("upload",void 0,_,e):void 0;dt(ae,{mergedClsPrefixRef:n,mergedThemeRef:o,showCancelButtonRef:M(e,"showCancelButton"),showDownloadButtonRef:M(e,"showDownloadButton"),showRemoveButtonRef:M(e,"showRemoveButton"),showRetryButtonRef:M(e,"showRetryButton"),onRemoveRef:M(e,"onRemove"),onDownloadRef:M(e,"onDownload"),mergedFileListRef:h,triggerStyleRef:M(e,"triggerStyle"),shouldUseThumbnailUrlRef:M(e,"shouldUseThumbnailUrl"),renderIconRef:M(e,"renderIcon"),xhrMap:f,submit:I,doChange:U,showPreviewButtonRef:M(e,"showPreviewButton"),onPreviewRef:M(e,"onPreview"),getFileThumbnailUrlResolver:m,listTypeRef:M(e,"listType"),dragOverRef:a,openOpenFileDialog:w,draggerInsideRef:s,handleFileAddition:D,mergedDisabledRef:i.mergedDisabledRef,maxReachedRef:l,fileListStyleRef:M(e,"fileListStyle"),abstractRef:M(e,"abstract"),acceptRef:M(e,"accept"),cssVarsRef:r?void 0:_,themeClassRef:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender,showTriggerRef:M(e,"showTrigger"),imageGroupPropsRef:M(e,"imageGroupProps"),mergedDirectoryDndRef:B(()=>{var g;return(g=e.directoryDnd)!==null&&g!==void 0?g:e.directory})});const ne={clear:()=>{u.value=[]},submit:I,openOpenFileDialog:w};return Object.assign({mergedClsPrefix:n,draggerInsideRef:s,inputElRef:d,mergedTheme:o,dragOver:a,mergedMultiple:F,cssVars:r?void 0:_,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender,handleFileInputChange:k},ne)},render(){var e,n;const{draggerInsideRef:r,mergedClsPrefix:o,$slots:i,directory:l,onRender:u}=this;if(i.default&&!this.abstract){const d=i.default()[0];!((e=d==null?void 0:d.type)===null||e===void 0)&&e[Me]&&(r.value=!0)}const c=t("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${o}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:l||void 0,directory:l||void 0}));return this.abstract?t(xe,null,(n=i.default)===null||n===void 0?void 0:n.call(i),t(ut,{to:"body"},c)):(u==null||u(),t("div",{class:[`${o}-upload`,r.value&&`${o}-upload--dragger-inside`,this.dragOver&&`${o}-upload--drag-over`,this.themeClass],style:this.cssVars},c,this.showTrigger&&this.listType!=="image-card"&&t(We,null,i),this.showFileList&&t(ir,null,i)))}}),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=T("h2",{class:"text-base font-bold"}," 我的自定义工作台 ",-1),br=T("div",{class:"flex items-center space-x-2"},null,-1),yr=W({__name:"header",setup(e){const n=je();return(r,o)=>(Z(),ie("div",hr,[T("div",mr,[T("button",{onClick:o[0]||(o[0]=i=>b(n).go(-1))},[x(b(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"},Br={class:"w-14 h-14 flex justify-center items-center rounded-md shadow-md mr-5 border border-[#00000014]"},Pr=["src"],Sr={class:"text-base font-bold mb-1 text-base text-[#333] dark:text-[#ffffff85]"},Tr={class:"w-full text-[#999999] text-xs min-h-[40px]"},Ir={class:"w-full flex justify-between mt-3"},Lr={class:"p-5 bg-white rounded dark:bg-slate-800"},Dr={class:"font-bold text-base"},zr={class:"pt-5 mt-6"},Fr=T("p",null,"Tips: 请知悉 ",-1),Ur=T("p",null,"选择共享提交之后审核状态将无法编辑应用",-1),Or=T("p",null,"审核通过的应用将会在应用广场公开展示",-1),Nr=T("p",null,"管理审核通过后将会赠送一定的站内额度奖励用户",-1),jr=T("p",null,"一旦提交处于审核中、您将不能再编辑此应用",-1),Ar=W({__name:"main",setup(e){const n=pt(),r=E(""),o=E(!1),i=E(!1),l=E([]),u=E(null),c=E(0),d=E(!1),s=B(()=>c.value===0?"创建我的个人应用":"更新我的个人应用"),a=B(()=>c.value===0?"创建专属应用":"更新个人应用"),f=B(()=>r.value?n.mineApps.filter(C=>C.appName.includes(r.value)):n.mineApps),P=E("/api/upload/file"),h=()=>({catId:null,name:null,preset:null,des:null,demoData:"",coverImg:"",public:!1}),w=E(h()),k={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:"请选择是否公开"}]};Ae();const $=gt(),F=je(),D=E([]),I=E(null);function U(C){r.value=C}async function m(C){const v=await Ct(),{modelMaps:p}=v.data;if(!p[1])return $.warning("管理员未配置特定应用模型、请联系管理员配置~");F.push({path:"/chat",query:{appId:C.appId}})}async function _(C){C.loading=!0;try{const v=await Rt({appId:C.appId});$.success(v.data),await n.queryMineApps(),C.loading=!1}catch{C.loading=!1}}async function S(){const C=await Bt();D.value=C.data.rows}async function ne(C){const v=await kt({id:C.appId});$.success(v.data),n.queryMineApps()}async function g(C){if(!C.length)I.value=null;else{const v=C[0].file;I.value=v;const p=new FormData;p.append("file",v);const V=await _t.post(P.value,p,{headers:{"Content-Type":"multipart/form-data"}});V.data.data?w.value.coverImg=V.data.data:$.error("上传图片失败、请检查后再试试吧!")}}function z({file:C,fileList:v}){return new Promise((p,V)=>{const{size:te,type:re}=C.file;if(re!=="image/png"&&re!=="image/jpg"&&re!=="image/jpeg")return $.error("只能上传png/jpg/jpeg格式的图片"),p(!1);if(te>3e3*1024)return $.error("图片大小不能超过300k"),p(!1);p(!0)})}ht(()=>{!f.value.length&&n.queryMineApps()});function O(){i.value=!0,S()}function X(){}function H(){q()}function q(){c.value=0,d.value=!1,w.value=h()}async function N(C){await S();const{catId:v,appName:p,preset:V,appDes:te,demoData:re,coverImg:be,public:ye}=C;Object.assign(w.value,{catId:v,name:p,preset:V,des:te,demoData:re,coverImg:be,public:ye}),c.value=C.appId,i.value=!0,d.value=C.public}function j(){var C;(C=u.value)==null||C.validate(async v=>{if(!v){const p=w.value;c.value&&(p.appId=c.value);const V=await $t(p),te=c.value?"个人应用修改完成!":"个人应用创建完成!";V.success&&$.success(te),n.queryMineApps(),q(),i.value=!1}})}return(C,v)=>(Z(),ie(xe,null,[T("div",xr,[T("div",wr,[T("div",Cr,[T("div",Rr,[x(b(le),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=p=>r.value=p),type:"text",placeholder:`您一共收录了${b(f).length}个应用(关键词过滤)`,onInput:U},null,8,["modelValue","placeholder"])]),x(b(_e),null,{default:R(()=>[x(b(K),{onClick:O},{icon:R(()=>[x(b(J),{icon:"gridicons:create"})]),default:R(()=>[Q(" 创建自定义应用 ")]),_:1}),x(b(K),{type:"primary",onClick:v[1]||(v[1]=p=>b(F).push("/app-store"))},{icon:R(()=>[x(b(J),{icon:"ri:add-line"})]),default:R(()=>[Q(" 前往广场添加应用 ")]),_:1})]),_:1})]),T("div",kr,[(Z(!0),ie(xe,null,mt(b(f),p=>(Z(),ie("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=>m(p)},[T("div",$r,[T("span",Br,[T("img",{src:p.coverImg,class:"w-8 h-8 mb-1",alt:""},null,8,Pr)]),T("span",Sr,fe(p.appName),1)]),T("p",Tr,fe(p.appDes),1),T("div",Ir,[p.appRole==="system"||p.public?(Z(),pe(b(Be),{key:0,placement:"bottom",onPositiveClick:se(V=>_(p),["stop"])},{trigger:R(()=>[x(b(K),{size:"tiny",ghost:"",loading:p.loading,onClick:v[2]||(v[2]=se(()=>{},["stop"]))},{icon:R(()=>[x(b(J),{icon:"clarity:favorite-line",class:"text-base"})]),default:R(()=>[Q(" 取消收藏 ")]),_:2},1032,["loading"])]),default:R(()=>[Q(" 确认取消收藏该应用吗? ")]),_:2},1032,["onPositiveClick"])):ge("",!0),x(b(_e),null,{default:R(()=>[p.appRole==="user"&&!p.public?(Z(),pe(b(Be),{key:0,placement:"bottom",onPositiveClick:se(V=>ne(p),["stop"])},{trigger:R(()=>[x(b(K),{size:"tiny",ghost:"",loading:p.loading,onClick:v[3]||(v[3]=se(()=>{},["stop"]))},{icon:R(()=>[x(b(J),{icon:"mdi-light:delete",class:"text-base"})]),default:R(()=>[Q(" 删除应用 ")]),_:2},1032,["loading"])]),default:R(()=>[Q(" 确认移除创建的应用吗? ")]),_:2},1032,["onPositiveClick"])):ge("",!0),p.appRole==="user"&&!p.public?(Z(),pe(b(K),{key:1,size:"tiny",ghost:"",loading:p.loading,onClick:se(V=>N(p),["stop"])},{icon:R(()=>[x(b(J),{icon:"mdi-light:delete",class:"text-base"})]),default:R(()=>[Q(" 编辑应用 ")]),_:2},1032,["loading","onClick"])):ge("",!0)]),_:2},1024)]),x(b(J),{icon:"codicon:run-all",class:"run-icon text-xl text-[#5A91FC] absolute right-3 bottom-3"}),p.status===3?(Z(),pe(b(J),{key:0,icon:"icon-park-twotone:mark",class:"text-xl text-[#5A91FC] absolute right-3 top-3"})):ge("",!0)],8,_r))),128))])])]),x(b(wt),{show:i.value,title:"创建",style:{width:"90%","max-width":"640px"},"mask-closable":!1,"on-after-enter":X,"on-after-leave":H},{default:R(()=>[T("div",Lr,[T("div",{class:"absolute top-4 left-5 cursor-pointer z-30",onClick:v[4]||(v[4]=p=>i.value=!1)},[T("span",Dr,fe(b(a)),1)]),T("div",{class:"absolute top-3 right-3 cursor-pointer z-30",onClick:v[5]||(v[5]=p=>i.value=!1)},[x(b(vt),{size:"20",color:"#0e7a0d"},{default:R(()=>[x(b(bt))]),_:1})]),T("div",zr,[x(b(yt),{ref_key:"formRef",ref:u,model:w.value,rules:k,"label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{maxWidth:"640px"}},{default:R(()=>[x(b(ee),{label:"应用分类",path:"catId"},{default:R(()=>[x(b(It),{value:w.value.catId,"onUpdate:value":v[6]||(v[6]=p=>w.value.catId=p),clearable:"",size:"small","label-field":"name",placeholder:"请输入您的应用分类","value-field":"id",options:D.value},null,8,["value","options"])]),_:1}),x(b(ee),{label:"应用名称",path:"name"},{default:R(()=>[x(b(le),{value:w.value.name,"onUpdate:value":v[7]||(v[7]=p=>w.value.name=p),placeholder:"请输入您的应用名称",type:"name",maxlength:30,"show-name-on":"click",tabindex:"0"},null,8,["value"])]),_:1}),x(b(ee),{label:"预设指令",path:"preset"},{default:R(()=>[x(b(le),{value:w.value.preset,"onUpdate:value":v[8]||(v[8]=p=>w.value.preset=p),max:255,autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请填写prompt预设指令(核心)"},null,8,["value"])]),_:1}),x(b(ee),{label:"应用描述",path:"des"},{default:R(()=>[x(b(le),{value:w.value.des,"onUpdate:value":v[9]||(v[9]=p=>w.value.des=p),autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请对你的应用做以简要的描述以便于大家认识它!"},null,8,["value"])]),_:1}),x(b(ee),{label:"示例内容",path:"demoData"},{default:R(()=>[x(b(le),{value:w.value.demoData,"onUpdate:value":v[10]||(v[10]=p=>w.value.demoData=p),autosize:{minRows:3,maxRows:10},type:"textarea",placeholder:"请填写一个示例、方便快速告诉别人如何使用、每点击回车换行一次则是新增一条示例!"},null,8,["value"])]),_:1}),x(b(ee),{label:"应用Logo",path:"coverImg"},{default:R(()=>[x(b(gr),{"on-update:file-list":g,"on-before-upload":z,max:1,"default-upload":!1,action:P.value,"default-file-list":l.value,"list-type":"image-card"},{default:R(()=>[Q(" 点击上传 ")]),_:1},8,["action","default-file-list"])]),_:1}),x(b(ee),{label:"是否共享",path:"public"},{default:R(()=>[x(b(Lt),{value:w.value.public,"onUpdate:value":v[11]||(v[11]=p=>w.value.public=p),disabled:d.value},null,8,["value","disabled"]),x(b(xt),{placement:"top-start",trigger:"hover"},{trigger:R(()=>[x(b(J),{icon:"ri:error-warning-line",class:"text-base ml-3 cursor-pointer"})]),default:R(()=>[Fr,Ur,Or,Nr,jr]),_:1})]),_:1}),x(b(ee),{class:"mt-3"},{default:R(()=>[x(b(K),{block:"",type:"primary",disabled:o.value,loading:o.value,onClick:j},{default:R(()=>[Q(fe(b(s)),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 border-b bg-white dark:border-b-neutral-800 dark:bg-[#111114]"},Er=W({__name:"index",setup(e){return(n,r)=>(Z(),ie("div",Mr,[T("header",qr,[x(yr)]),x(Ar)]))}}),Hr={class:"h-full dark:bg-[#24272e] transition-all"},Kr=W({__name:"role",setup(e){const n=Pt(),{isMobile:r}=Ae(),o=B(()=>n.siderCollapsed),i=B(()=>r.value?["rounded-none","shadow-none"]:["rounded-md","shadow-md","dark:border-neutral-800"]),l=B(()=>["h-full",{"pl-[260px]":!r.value&&!o.value}]);return(u,c)=>(Z(),ie("div",Hr,[T("div",{class:$e(["h-full overflow-hidden",b(i)])},[x(b(Tt),{class:$e(["z-40 transition",b(l)]),"has-sider":""},{default:R(()=>[x(Xe),x(b(St),{class:"h-full"},{default:R(()=>[x(Er)]),_:1})]),_:1},8,["class"])],2)]))}});export{Kr as default};
|