import{P as oe,Q as ie,S as ue,n as Ce,b as he,e as wa,f as V,W as ut,p as Me,aV as Na,aW as _a,c as Pa,i as de,w as xe,d as Ue,a3 as Se,m as Fe,ar as Ca,aq as Va,k as Sa,aX as Fa,aY as Aa,an as et,ac as Re,h as Ge,Z as ke,aZ as Ha,aK as Ka,a_ as qa,$ as tt,a0 as We,g as ce,O as Oe,Y as ct,l as Xa}from"./index.9d6da31d.js";import{d as W,c as f,j as K,w as ve,t as we,i as Za,n as Xe,o as Ye,aI as l,aV as ne,aY as Ga,aK as je,aW as ja,a_ as Wa,a$ as Ya,b0 as Ja,aZ as Qa,b as en,aU as at,h as tn}from"./arco.9755215d.js";import{l as Pe,b as nt,a as an,e as nn,i as rn,C as ln,B as xa}from"./index.3871c524.js";import{o as on,d as un,u as cn,m as sn,j as vn,l as dn}from"./dep-71c4f289.efb2c598.js";import{a as fn}from"./slot.66e31ab7.js";import{L as rt}from"./index.f8bf749b.js";import{p as gn,b as mn,T as Je,l as pn,a as hn,u as yn,A as bn}from"./index.f3cc6098.js";import{S as st}from"./index.18ec2950.js";import{_ as vt,r as Ae}from"./form-model.539cba92.js";import{D as On}from"./index.8ca65446.js";function dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ft(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-delete",r.value]),c=f(()=>ft(ft({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(wn,i.value)}});const Ia=_n;function gt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function mt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-download",r.value]),c=f(()=>mt(mt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Pn,i.value)}});const Sn=Cn;function pt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ht(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-file-excel",r.value]),c=f(()=>ht(ht({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Fn,i.value)}});const xn=jn;function yt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function bt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-file-pdf",r.value]),c=f(()=>bt(bt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(In,i.value)}});const En=Dn;function Ot(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function wt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-file-powerpoint",r.value]),c=f(()=>wt(wt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(zn,i.value)}});const kn=Un;function _t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Pt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-file-word",r.value]),c=f(()=>Pt(Pt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Ln,i.value)}});const Mn=Bn;function Ct(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function St(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-file",r.value]),c=f(()=>St(St({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie($n,i.value)}});const Rn=Tn;function Ft(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function jt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-image-error",r.value]),c=f(()=>jt(jt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Nn,i.value)}});const Da=Vn;function xt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function It(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-image",r.value]),c=f(()=>It(It({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(An,i.value)}});const Ea=Hn;function Dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Et(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-mirror",r.value]),c=f(()=>Et(Et({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Kn,i.value)}});const Xn=qn;function zt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Ut(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-refresh",r.value]),c=f(()=>Ut(Ut({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Zn,i.value)}});const Vl=Gn;function kt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Lt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-rotation",r.value]),c=f(()=>Lt(Lt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Wn,i.value)}});const Jn=Yn;function Bt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Mt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-search",r.value]),c=f(()=>Mt(Mt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(Qn,i.value)}});const Al=er;function $t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Tt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-time-filled",r.value]),c=f(()=>Tt(Tt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(tr,i.value)}});const za=ar;function Rt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Nt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-upload",r.value]),c=f(()=>Nt(Nt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(nr,i.value)}});const lr=rr;function Vt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function At(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-video",r.value]),c=f(()=>At(At({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(or,i.value)}});const ur=ir;function Ht(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Kt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-zoom-in",r.value]),c=f(()=>Kt(Kt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(cr,i.value)}});const vr=sr;function qt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Xt(t){for(var e=1;et.size),{className:r,style:o}=oe(n),s=f(()=>["t-icon","t-icon-zoom-out",r.value]),c=f(()=>Xt(Xt({},o.value),a.style)),i=f(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ie(dr,i.value)}});const gr=fr;/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var mr=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp)/i,pr=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp|.dwg|.dxf|.svf|.tif|.tiff|.arw)/i,hr=/(.pdf)/i,yr=/(.xlsx|.xls|.csv|.xlc|.xlm|.xlt|.xlw)/i,br=/(.dox|docx|.document|.wps|.wdb|.msword)/i,Or=/(.ppt|.pptx|.key)/i,Ua=/(.avi|.mp4|.wmv|.mpg|.mpeg|.mov|.rm|.ram|.swf|.flv|.rmvb|.flash|.mid|.3gp)/i,wr=/(.mp2|.mp3|.mp4|.ogg|.3gpp|.ac3|.au)/i,Zt={"audio/*":wr,"video/*":Ua,"image/*":pr,".ico":/image\/vnd.microsoft.icon/i,".doc":/application\/msword/i,".docx":/application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i,".xls":/application\/vnd.ms-excel/i,".xlsx":/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/i,".ppt":/application\/vnd.ms-powerpoint/i,".pptx":/application\/vnd.openxmlformats-officedocument.presentationml.presentation/i,".vsd":/application\/vnd.visio/i,".txt":/text\/plain/i,".abw":/application\/x-abiword/i,".avi":/video\/x-msvideo/i,".azw":/application\/vnd.amazon.ebook/i,".bin":/application\/octet-stream/i,".cda":/application\/x-cdf/i,".mpkg":/application\/vnd.apple.installer+xml/i,".odp":/application\/vnd.oasis.opendocument.presentation/i,".ods":/application\/vnd.oasis.opendocument.spreadsheet/i,".odt":/application\/vnd.oasis.opendocument.text/i,".oga":/audio\/ogg/i,".ogv":/video\/ogg/i,".ogx":/application\/ogg/i},be={B:1,KB:1024,MB:1048576,GB:1073741824};function _r(t){return t=be.KB&&t=be.MB&&t=be.GB?"".concat((t/be.GB).toFixed(1)," GB"):""}function ka(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=new Date,a=e.getMonth()+1;a=a<10?"0".concat(a):a;var n="".concat(e.getFullYear(),"-").concat(a,"-").concat(e.getDate()),r="".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds());return t?[n,r].join(" "):n}function ze(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,n=t,r=0,o=0;if(!n)return"";for(var s=0;ss-a&&o=1024&&t<1048576?"".concat((t/1024).toFixed(1)," KB"):t>=1048576?"".concat((t/1048576).toFixed(1)," MB"):""}function Cr(t,e,a){var n=["B","KB","MB","GB"],r=1,o=n.indexOf(a);o===-1&&(Pe.warn("Upload","`sizeLimit.unit` can only be one of ".concat(n.join())),o=r);var s=be[a];return t>e*s}function Sr(t){return new Promise(function(e){if(!t){e("");return}var a=new FileReader;a.readAsDataURL(t),a.onload=function(n){var r;e((r=n.target)===null||r===void 0?void 0:r.result)}})}function Fr(t,e,a){var n=e||a;if(!t)return!0;if(!n)return!1;for(var r=t.split(",").map(function(v){return v.trim()}),o=0,s=r.length;o1&&arguments[1]!==void 0?arguments[1]:"",a=[],n=0;n"u"||!t)){var e=window.getComputedStyle(t),a=e.getPropertyValue("box-sizing")||e.getPropertyValue("-moz-box-sizing")||e.getPropertyValue("-webkit-box-sizing"),n=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),r=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width")),o=xr.map(function(s){return"".concat(s,":").concat(e.getPropertyValue(s))}).join(";");return{sizingStyle:o,paddingSize:n,borderSize:r,boxSizing:a}}}function Gt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;pe||(pe=document.createElement("textarea"),document.body.appendChild(pe));var n=Ir(t),r=n.paddingSize,o=n.borderSize,s=n.boxSizing,c=n.sizingStyle;pe.setAttribute("style","".concat(c,";").concat(jr)),pe.value=t.value||t.placeholder||"";var i=pe.scrollHeight,v={};s==="border-box"?i+=o:s==="content-box"&&(i-=r),pe.value="";var u=pe.scrollHeight-r;if(e!==null){var h=u*e;s==="border-box"&&(h=h+r+o),i=Math.max(h,i),v.minHeight="".concat(h,"px")}if(a!==null){var _=u*a;s==="border-box"&&(_=_+r+o),i=Math.min(_,i)}return v.height="".concat(i,"px"),pe.parentNode&&pe.parentNode.removeChild(pe),pe=null,v}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Dr={allowInputOverMax:{type:Boolean,default:!1},autofocus:Boolean,autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:void 0},maxcharacter:{type:Number},maxlength:{type:[Number,String]},name:{type:String,default:""},placeholder:{type:String,default:void 0},readonly:Boolean,status:{type:String,validator:function(e){return["default","success","warning","error"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number]},modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Wt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Er(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:"",S=z.value,E=String(g);!S||S.value!==E&&(S.value=E,F.value=E)},O=function(g){var S=g.target,E=S.value;if(e.maxcharacter&&e.maxcharacter>=0){var R=ut(E,e.maxcharacter);E=Me(R)==="object"&&R.characters}!M.value&&N(E,{e:g}),Xe(function(){return I(E)}),x()},m=function(g){O(g)},C=function(){M.value=!0},q=function(g){M.value=!1,O(g)},H=function(g,S){var E;if(!P.value){var R="on".concat(g[0].toUpperCase()).concat(g.slice(1));(E=e[R])===null||E===void 0||E.call(e,F.value,{e:S})}},G=function(g){H("keydown",g)},L=function(g){H("keyup",g)},T=function(g){H("keypress",g)},U=function(g){var S;x(),!P.value&&(j.value=!0,(S=e.onFocus)===null||S===void 0||S.call(e,F.value,{e:g}))},A=Za(an,void 0),Y=function(g){var S;x(),j.value=!1,(S=e.onBlur)===null||S===void 0||S.call(e,F.value,{e:g}),A==null||A.handleBlur()},Q=f(function(){return[s.value,V(V({},"".concat(o.value,"-is-disabled"),P.value),"".concat(o.value,"-is-readonly"),e.readonly)]}),te=f(function(){return Yt({autofocus:e.autofocus,disabled:P.value,readonly:e.readonly,placeholder:e.placeholder,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0})}),re=f(function(){var b=ut(String(F.value||""));return Me(b)==="object"?b.length:b}),ae=f(function(){return{value:[void 0,null].includes(F.value)?void 0:String(F.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),k=nn(ae),d=k.tStatus;ve(function(){return F.value},function(){return x()}),ve(z,function(b){!b||x()}),ve(function(){return e.autofocus},function(b){b&&z.value.focus()}),ve($,function(b){var g=n.style;Na(z.value,_a(g,b))}),ve(F,function(){Xe(function(){return x()})}),ve(function(){return e.autosize},x,{deep:!0}),r({focus:D,blur:w}),Ye(function(){x()});var y=de();return function(){var b,g=Yt({onFocus:U,onBlur:Y,onKeydown:G,onKeyup:L,onKeypress:T}),S=Pa(),E=S.STATUS,R=f(function(){return["".concat(s.value,"__inner"),V(V(V(V({},"".concat(o.value,"-is-").concat(d.value),d.value),E.value.disabled,P.value),E.value.focused,j.value),"".concat(o.value,"-resize-none"),Me(e.autosize)==="object"),"narrow-scrollbar"]}),B=y("tips"),X=B&&l("div",{class:"".concat(c.value," ").concat(s.value,"__tips--").concat(e.status||"normal")},[B]),ee=e.maxcharacter&&l("span",{class:i.value},["".concat(re.value,"/").concat(e.maxcharacter)])||!e.maxcharacter&&e.maxlength&&l("span",{class:i.value},["".concat(F.value?(b=String(F.value))===null||b===void 0?void 0:b.length:0,"/").concat(e.maxlength)]);return l("div",ne({class:Q.value},on(n,["style"])),[l("textarea",ne({onInput:m,onCompositionstart:C,onCompositionend:q,ref:z,value:F.value,class:R.value},g,te.value),null),X||ee?l("div",{class:["".concat(s.value,"__info_wrapper"),V({},"".concat(s.value,"__info_wrapper_align"),!X)]},[X,ee]):null])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Hl=xe(zr);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ur={alt:{type:String,default:""},error:{type:[String,Function]},fallback:{type:String,default:""},fit:{type:String,default:"fill",validator:function(e){return e?["contain","cover","fill","none","scale-down"].includes(e):!0}},gallery:Boolean,lazy:Boolean,loading:{type:[String,Function]},overlayContent:{type:[String,Function]},overlayTrigger:{type:String,default:"always",validator:function(e){return e?["always","hover"].includes(e):!0}},placeholder:{type:[String,Function]},position:{type:String,default:"center"},referrerpolicy:{type:String,default:"strict-origin-when-cross-origin",validator:function(e){return e?["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"].includes(e):!0}},shape:{type:String,default:"square",validator:function(e){return e?["circle","round","square"].includes(e):!0}},src:{type:[String,Object]},srcset:{type:Object},onError:Function,onLoad:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var kr=W({name:"TImage",props:Ur,setup:function(e){var a=K(null),n=K(null),r=null,o=we(e),s=o.src,c=de();Ye(function(){var L;if((L=n.value)!==null&&L!==void 0&&L.complete&&!e.lazy&&z(),!(!e.lazy||!a.value)){var T=un(a.value,null,N,0);r=T}}),Ga(function(){a.value&&r&&r.unobserve(a.value)});var i=Ue("image"),v=i.classPrefix,u=i.globalConfig,h=K(s.value);ve([s,u],function(L){var T=Ce(L,2),U=T[0],A=T[1],Y=A||{},Q=Y.replaceImageSrc,te=Se(Q)?Q(e):U;te===h.value&&h.value||(h.value=te)},{immediate:!0});var _=Ze(h),p=_.previewUrl;ve([p],function(){j.value=!1,P.value=!1});var F=K(!e.lazy),N=function(){F.value=!0},P=K(!1),$=function(T){var U;P.value=!0,(U=e.onLoad)===null||U===void 0||U.call(e,{e:T})},z=function(){var T=new Event("load");Object.defineProperty(T,"target",{value:n.value,enumerable:!0}),$(T)},j=K(!1),M=function(T){var U;j.value=!0,(U=e.onError)===null||U===void 0||U.call(e,{e:T}),e.fallback&&(h.value=e.fallback,j.value=!1)},D=f(function(){return e.overlayTrigger==="hover"}),w=f(function(){return["".concat(v.value,"-image"),"".concat(v.value,"-image--fit-").concat(e.fit),"".concat(v.value,"-image--position-").concat(e.position)]}),x=K(!D.value),I=function(){D.value&&(x.value=!x.value)},O=function(){var T=c("placeholder");return T?l("div",{class:"".concat(v.value,"-image__placeholder")},[T]):null},m=function(){return e.gallery?l("div",{class:"".concat(v.value,"-image__gallery-shadow")},null):null},C=function(){var T=G("overlayContent");return T?l("div",{class:["".concat(v.value,"-image__overlay-content"),!x.value&&"".concat(v.value,"-image__overlay-content--hidden")]},[T]):null};function q(){return l("picture",null,[Object.entries(e.srcset).map(function(L){var T=Ce(L,2),U=T[0],A=T[1];return l("source",{type:U,srcset:A},null)}),H()])}function H(){var L=Fe(h.value)?h.value:p.value;return l("img",{ref:n,src:L,onError:M,onLoad:$,class:w.value,alt:e.alt,referrerpolicy:e.referrerpolicy},null)}var G=Va();return function(){return l("div",ne({ref:a,class:["".concat(v.value,"-image__wrapper"),"".concat(v.value,"-image__wrapper--shape-").concat(e.shape),e.gallery&&"".concat(v.value,"-image__wrapper--gallery"),D.value&&"".concat(v.value,"-image__wrapper--need-hover")],onMouseenter:I,onMouseleave:I},Ca(e,["src","alt","fit","position","shape","placeholder","loading","error","overlayTrigger","overlayContent","lazy","gallery","onLoad","onError"])),[O(),m(),(j.value||!F.value)&&l("div",{class:"".concat(v.value,"-image")},null),!(j.value||!F.value)&&(e.srcset&&Object.keys(e.srcset).length?q():H()),!(j.value||!F.value)&&!P.value&&l("div",{class:"".concat(v.value,"-image__loading")},[c("loading")||l(st,{direction:"vertical",size:8,align:"center"},{default:function(){return[l(Ea,{size:"24px"},null),Fe(e.loading)?e.loading:u.value.loadingText]}})]),j.value&&l("div",{class:"".concat(v.value,"-image__error")},[G("error",{defaultNode:l(st,{direction:"vertical",size:8,align:"center"},{default:function(){return[l(Da,{size:"24px"},null),Fe(e.error)?e.error:u.value.errorText]}})})]),C()])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Te=xe(kr);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Jt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Lr(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{max:2,min:.5,step:.5},e=t.max,a=t.min,n=t.step,r=t.defaultScale,o=K(r!=null?r:1),s=function(){var h=gn(o.value,n);v(h)},c=function(){var h=mn(o.value,n);v(h)},i=function(){o.value=r!=null?r:1},v=function(h){var _=h;he&&(_=e),o.value=_};return ve(function(){return t},function(){return i()}),{scale:o,onZoomIn:s,onZoomOut:c,resetScale:i}}function Tr(){var t=K(0),e=90,a=function(){t.value+=e},n=function(){t.value=0};return{rotate:t,onRotate:a,resetRotate:n}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ba=W({name:"TImageItem",props:{rotate:Number,scale:Number,mirror:Number,src:[String,Object],placementSrc:[String,Object],isSvg:Boolean},setup:function(e){var a=we(e),n=a.src,r=a.placementSrc,o=a.isSvg,s=he(),c=K(!1),i=K(!1),v=Br({translateX:0,translateY:0}),u=v.transform,h=v.mouseDownHandler,_=Ue("imageViewer"),p=_.globalConfig,F=p.value.errorText,N=K(),P=f(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:!e.placementSrc||i.value?"block":"none"}}),$=f(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:i.value?"none":"block"}}),z=f(function(){var O=u.value,m=O.translateX,C=O.translateY;return{transform:"translate(".concat(m,"px, ").concat(C,"px) scale(").concat(e.mirror,", 1)")}}),j=function(){c.value=!1,i.value=!1,o.value&&M(w.value)},M=function(){var O=vt(Ae.mark(function m(C){var q,H,G,L,T,U,A,Y,Q,te,re,ae,k;return Ae.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,fetch(C);case 2:if(H=y.sent,H.ok){y.next=6;break}throw c.value=!0,new Error("Failed to fetch SVG: ".concat(H.statusText));case 6:return y.next=8,H.text();case 8:G=y.sent,L=N.value,L.innerHTML="",(q=L.classList)===null||q===void 0||q.add("".concat(s.value,"-image-viewer__modal-image-svg")),T=L.attachShadow({mode:"closed"}),U=document.createElement("div"),U.style.background="transparent",U.innerHTML=G,T.appendChild(U),A=U.querySelector("svg"),A&&(Y=A.getAttribute("viewBox"),Y?(Q=Y.split(/[\s\,]/).filter(function(b){return b}).map(parseFloat),te=Q[2],re=Q[3],U.style.width="".concat(te,"px"),U.style.height="".concat(re,"px")):(ae=A.getBBox(),k="".concat(ae.x," ").concat(ae.y," ").concat(ae.width," ").concat(ae.height),A.setAttribute("viewBox",k),U.style.width="".concat(ae.width,"px"),U.style.height="".concat(ae.height,"px"))),i.value=!0;case 20:case"end":return y.stop()}},m)}));return function(C){return O.apply(this,arguments)}}(),D=Ze(n),w=D.previewUrl,x=Ze(r),I=x.previewUrl;return ve([w,I],function(){j()}),Ye(vt(Ae.mark(function O(){return Ae.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(!o.value){C.next=3;break}return C.next=3,M(w.value);case 3:case"end":return C.stop()}},O)}))),function(){return l("div",{class:"".concat(s.value,"-image-viewer__modal-pic")},[l("div",{class:"".concat(s.value,"-image-viewer__modal-box"),style:z.value},[c.value&&l("div",{class:"".concat(s.value,"-image-viewer__img-error")},[l("div",{class:"".concat(s.value,"-image-viewer__img-error-content")},[l(Da,{size:"4em"},null),l("div",{class:"".concat(s.value,"-image-viewer__img-error-text")},[F])])]),!c.value&&!!e.placementSrc&&I.value&&l("img",{class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},src:I.value,style:$.value,alt:"image",draggable:"false"},null),!c.value&&w.value&&!o.value&&l("img",{class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},src:w.value,onLoad:function(){return i.value=!0},onError:function(){return c.value=!0},style:P.value,alt:"image",draggable:"false"},null),!c.value&&w.value&&o.value&&l("div",{ref:N,class:"".concat(s.value,"-image-viewer__modal-image"),onMousedown:function(m){m.stopPropagation(),h(m)},"data-alt":"svg",style:P.value,draggable:"false"},null)])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var _e=W({name:"TImageModalIcon",props:{disabled:Boolean,onClick:Function,label:String,icon:Function},setup:function(e){var a=he(),n=de(),r=f(function(){return["".concat(a.value,"-image-viewer__modal-icon"),V({},"".concat(a.value,"-is-disabled"),e.disabled)]});return function(){return l("div",{class:r.value,onClick:e.onClick},[n("icon"),e.label&&l("span",{class:"".concat(a.value,"-image-viewer__modal-icon-label")},[e.label])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var $e={attach:{type:[String,Function],default:"body"},closeBtn:{type:[Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:!0},closeOnOverlay:Boolean,draggable:{type:Boolean,default:void 0},imageScale:{type:Object},images:{type:Array,default:function(){return[]}},index:{type:Number,default:void 0},defaultIndex:{type:Number,default:0},mode:{type:String,default:"modal",validator:function(e){return e?["modal","modeless"].includes(e):!0}},navigationArrow:{type:[Boolean,Function],default:!0},showOverlay:{type:Boolean,default:void 0},title:{type:[String,Function]},trigger:{type:[String,Function]},viewerScale:{type:Object},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onClose:Function,onIndexChange:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Qt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Rr(t){for(var e=1;e=d.value.length?F.value:Z,{trigger:"next"})},R=function(Z){N(Z,{trigger:"current"})},B=function(){j(!0)},X=function(Z){var le;j(!1),(le=e.onClose)===null||le===void 0||le.call(e,Z)},ee=function(Z){X({e:Z,trigger:"close-btn"})},fe=function(Z){e.closeOnOverlay&&X({e:Z,trigger:"overlay"})},ge=function(Z){switch(Z.stopPropagation(),Z.code){case Ee.left:S();break;case Ee.right:E();break;case Ee.up:U();break;case Ee.down:A();break;case Ee.esc:e.closeOnEscKeydown&&g()&&X({e:Z,trigger:"esc"});break}},me=K();ve(function(){return z.value},function(J){clearTimeout(D.value),J?(M.value=!1,Xe().then(function(){var Z,le;(Z=me.value)===null||Z===void 0||(le=Z.focus)===null||le===void 0||le.call(Z)}),k()):D.value=setTimeout(function(){M.value=!0},200)});var ye=function(Z){Z.preventDefault();var le=Z.deltaY;le>0?A():U()},Le=f(function(){return{transform:"translateX(calc(-".concat(F.value," * (40px / 9 * 16 + 4px)))")}}),Be=function(){return l("div",{class:I.value},[l(_e,{icon:function(){return l(hn,null,null)},class:"".concat(r.value,"__header-pre-bt"),onClick:m},null),l("div",{class:"".concat(r.value,"__header-prev")},[l("div",{class:"".concat(r.value,"__header-trans"),style:Le.value},[d.value.map(function(Z,le){return l("div",{key:le,class:["".concat(r.value,"__header-box"),V({},"".concat(n.value,"-is-active"),le===F.value)]},[l(Te,{src:Z.thumbnail||Z.mainImage,error:"",className:"".concat(r.value,"__header-img"),onClick:function(){return R(le)}},null)])})])])])},Ie=function(Z){var le=Z==="prev"?0:180,De=o("navigationArrow",l(sn,{style:{transform:"rotate(".concat(le,"deg)")},size:"24px"},null));return l(_e,{class:"".concat(r.value,"__modal-").concat(Z,"-bt"),onClick:Z==="prev"?S:E,icon:function(){return De}},null)},Ve=function(){if(e.closeBtn!==!1)return l("div",{class:["".concat(r.value,"__modal-icon"),"".concat(r.value,"__modal-close-bt")],onClick:ee},[o("closeBtn",l(et,{size:"24px"},null))])};return function(){return e.mode==="modeless"?l(je,null,[o("trigger",{params:{open:B}}),l(Kr,{zIndex:O.value,visible:z.value,index:F.value,images:d.value,scale:T.value,rotate:te.value,mirror:q.value,currentImage:y.value,onRotate:re,onZoomIn:U,onZoomOut:A,onMirror:H,onReset:k,onClose:X,draggable:e.draggable,showOverlay:c.value,title:e.title},null)]):l(je,null,[o("trigger",{params:{open:B}}),l(ja,{disabled:!e.attach||!w.value,to:w.value},{default:function(){return[l(Wa,null,{default:function(){return[(z.value||!M.value)&&Ya(l("div",{ref:me,class:x.value,style:{zIndex:O.value},onWheel:ye,tabindex:-1,onKeydown:ge},[!!c.value&&l("div",{class:"".concat(r.value,"__modal-mask"),onClick:fe},null),d.value.length>1&&l(je,null,[Be(),l("div",{class:"".concat(r.value,"__modal-index")},[e.title&&o("title"),"".concat(F.value+1,"/").concat(d.value.length)]),Ie("prev"),Ie("next")]),Ve(),l(Ma,{onZoomIn:U,onZoomOut:A,onMirror:H,onReset:k,onRotate:re,scale:T.value,currentImage:y.value},null),l(Ba,{scale:T.value,rotate:te.value,mirror:q.value,src:y.value.mainImage,placementSrc:y.value.thumbnail,isSvg:y.value.isSvg},null)]),[[Ja,z.value]])]}})]}})])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var lt=xe(Xr);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var $a={asyncLoading:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(e){return e?["horizontal","vertical"].includes(e):!0}},scroll:{type:Object},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},split:Boolean,stripe:Boolean,onLoadMore:Function,onScroll:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ta=W({name:"TListItem",props:$a,setup:function(){var e=he("list-item"),a=de();return function(){var n=a("content"),r=a("default"),o=a("action");return l("li",{class:e.value},[l("div",{class:"".concat(e.value,"-main")},[r||n,o&&l("li",{class:"".concat(e.value,"__action")},[o])])])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var ta="load-more",Zr="loading";/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function aa(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function na(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(v){throw v},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,c=!1;return{s:function(){a=a.call(t)},n:function(){var v=a.next();return s=v.done,v},e:function(v){c=!0,o=v},f:function(){try{s||a.return==null||a.return()}finally{if(c)throw o}}}}function Wr(t,e){if(t){if(typeof t=="string")return ra(t,e);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ra(t,e):void 0}}function ra(t,e){(e==null||e>t.length)&&(e=t.length);for(var a=0,n=Array(e);a"u"||(n.value="".concat(x,"px"),(u=e.onSizeDragEnd)===null||u===void 0||u.call(e,{e:v,size:x}))}},c=f(function(){var i=["right","left"].includes(e.placement),v={left:"right",right:"left",top:"bottom",bottom:"top"};return V(V(V(V({zIndex:1,position:"absolute",background:"transparent"},v[e.placement],0),"width",i?"16px":"100%"),"height",i?"100%":"16px"),"cursor",i?"col-resize":"row-resize")});return{draggedSizeValue:n,enableDrag:r,draggableLineStyles:c}};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var il=1,ul=W({name:"TDrawer",inheritAttrs:!1,props:nl,emits:["update:visible"],setup:function(e,a){var n=K(!1),r=K(!1),o=K(),s=K(),c=Ue("drawer"),i=c.globalConfig,v=ke({CloseIcon:et}),u=v.CloseIcon,h=de(),_=Ge(),p=he("drawer"),F=ol(e),N=F.draggedSizeValue,P=F.enableDrag,$=F.draggableLineStyles,z=Fa(function(){return e.attach}),j=function(d){var y;(y=e.onConfirm)===null||y===void 0||y.call(e,{e:d})},M=function(d){var y;(y=e.onCancel)===null||y===void 0||y.call(e,{e:d}),ae({trigger:"cancel",e:d})},D=Ha({confirmBtnAction:j,cancelBtnAction:M}),w=D.getConfirmBtn,x=D.getCancelBtn,I=K(null),O=f(function(){return[p.value,"".concat(p.value,"--").concat(e.placement),V(V(V({},"".concat(p.value,"--open"),r.value),"".concat(p.value,"--attach"),e.showInAttachedElement),"".concat(p.value,"--without-mask"),!e.showOverlay)]}),m=f(function(){var k;if(N.value)return N.value;var d=(k=e.size)!==null&&k!==void 0?k:i.value.size,y=isNaN(Number(d))?d:"".concat(d,"px");return{small:"300px",medium:"500px",large:"760px"}[d]||y}),C=f(function(){return{transform:r.value?"translateX(0)":void 0,width:["left","right"].includes(e.placement)?m.value:"",height:["top","bottom"].includes(e.placement)?m.value:""}}),q=f(function(){return["".concat(p.value,"__content-wrapper"),"".concat(p.value,"__content-wrapper--").concat(e.placement)]}),H=f(function(){return I.value&&I.value.parentNode}),G=f(function(){return[e.mode,e.placement].join()}),L=f(function(){return{display:"flex",justifyContent:e.placement==="right"?"flex-start":"flex-end"}}),T=function(d){var y;if(((y=e.closeOnEscKeydown)!==null&&y!==void 0?y:i.value.closeOnEscKeydown)&&d.key==="Escape"&&r.value){var b;(b=e.onEscKeydown)===null||b===void 0||b.call(e,{e:d}),ae({trigger:"esc",e:d})}},U=function(){clearTimeout(s.value),s.value=setTimeout(function(){var d,y;(d=o.value)===null||d===void 0||(d=d.parentNode)===null||d===void 0||(y=d.removeChild)===null||y===void 0||y.call(d,o.value)},150)},A=function(){e.mode==="push"&&Xe(function(){!H.value||(H.value.style.cssText="transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;")})},Y=function(){if(!!H.value&&!(e.mode!=="push"||!H.value)){var d={left:"margin: 0 0 0 ".concat(m.value),right:"margin: 0 0 0 -".concat(m.value),top:"margin: ".concat(m.value," 0 0 0"),bottom:"margin: -".concat(m.value," 0 0 0")}[e.placement];r.value?H.value.style.cssText+=d:H.value.style.cssText=H.value.style.cssText.replace(/margin:.+;/,"")}},Q=function(){var d=w({confirmBtn:e.confirmBtn,globalConfirm:i.value.confirm,className:"".concat(p.value,"__confirm")}),y=x({cancelBtn:e.cancelBtn,globalCancel:i.value.cancel,className:"".concat(p.value,"__cancel")});return l("div",{style:L.value},[e.placement==="right"?d:null,y,e.placement!=="right"?d:null])};ve(G,function(){A()},{immediate:!0}),ve(function(){return e.visible},function(k){Ka||(k?!e.showInAttachedElement&&e.preventScrollThrough&&o.value&&document.head.appendChild(o.value):U(),e.destroyOnClose?k?(n.value=!1,setTimeout(function(){r.value=!0})):(r.value=!1,setTimeout(function(){n.value=!0},200)):n.value===!0&&k?(n.value=!1,setTimeout(function(){r.value=!0})):r.value=k)},{immediate:!0});var te=function(d){var y;(y=e.onCloseBtnClick)===null||y===void 0||y.call(e,{e:d}),ae({trigger:"close-btn",e:d})},re=function(d){var y,b;(y=e.onOverlayClick)===null||y===void 0||y.call(e,{e:d}),((b=e.closeOnOverlayClick)!==null&&b!==void 0?b:i.value.closeOnOverlayClick)&&ae({trigger:"overlay",e:d})},ae=function(d){var y;(y=e.onClose)===null||y===void 0||y.call(e,d),a.emit("update:visible",!1)};return Qa(function(){Y()}),Ye(function(){var k=document.documentElement.scrollHeight>document.documentElement.clientHeight,d=k?qa():0;o.value=document.createElement("style"),o.value.dataset.id="td_drawer_".concat(+new Date,"_").concat(il+=1),o.value.innerHTML=` html body { overflow-y: hidden; transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s; `.concat(e.mode==="push"?"":"width: calc(100% - ".concat(d,"px);"),` } `),r.value&&!e.showInAttachedElement&&e.preventScrollThrough&&document.head.appendChild(o.value),window.addEventListener("keydown",T)}),en(function(){U(),window.removeEventListener("keydown",T)}),function(){if(!n.value){var k=_("body","default"),d=h("header"),y=Q();return l(ja,{disabled:!e.attach||!z.value,to:z.value},{default:function(){return[l("div",ne({ref:I,class:O.value,style:{zIndex:e.zIndex},onKeydown:T,tabindex:0},a.attrs),[e.showOverlay&&l("div",{class:"".concat(p.value,"__mask"),onClick:re},null),l("div",{class:q.value,style:C.value},[d&&l("div",{class:"".concat(p.value,"__header")},[d]),e.closeBtn&&l("div",{class:"".concat(p.value,"__close-btn"),onClick:te},[h("closeBtn",l(u,null,null))]),l("div",{class:["".concat(p.value,"__body"),"narrow-scrollbar"]},[k]),e.footer&&l("div",{class:"".concat(p.value,"__footer")},[h("footer",y)]),e.sizeDraggable&&l("div",{style:$.value,onMousedown:P},null)])])]}})}}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Xl=xe(ul);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var cl={abridgeName:{type:Array},accept:{type:String,default:""},action:{type:String,default:""},allowUploadDuplicateFile:Boolean,autoUpload:{type:Boolean,default:!0},beforeAllFilesUpload:{type:Function},beforeUpload:{type:Function},cancelUploadButton:{type:[Object,Function]},data:{type:[Object,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},dragContent:{type:[String,Function]},draggable:{type:Boolean,default:void 0},fileListDisplay:{type:Function},files:{type:Array,default:void 0},defaultFiles:{type:Array,default:function(){return[]}},format:{type:Function},formatRequest:{type:Function},formatResponse:{type:Function},headers:{type:Object},imageViewerProps:{type:Object},inputAttributes:{type:Object},isBatchUpload:Boolean,locale:{type:Object},max:{type:Number,default:0},method:{type:String,default:"POST",validator:function(e){return e?["POST","GET","PUT","OPTION","PATCH","post","get","put","option","patch"].includes(e):!0}},mockProgressDuration:{type:Number},multiple:Boolean,name:{type:String,default:"file"},placeholder:{type:String,default:""},requestMethod:{type:Function},showImageFileName:{type:Boolean,default:!0},showThumbnail:Boolean,showUploadProgress:{type:Boolean,default:!0},sizeLimit:{type:[Number,Object]},status:{type:String,validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},theme:{type:String,default:"file",validator:function(e){return e?["custom","file","file-input","file-flow","image","image-flow"].includes(e):!0}},tips:{type:[String,Function]},trigger:{type:Function},triggerButtonProps:{type:Object},uploadAllFilesInOneRequest:Boolean,uploadButton:{type:[Object,Function]},uploadPastedFiles:{type:Boolean,default:!0},useMockProgress:{type:Boolean,default:!0},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},withCredentials:Boolean,onCancelUpload:Function,onChange:Function,onDragenter:Function,onDragleave:Function,onDrop:Function,onFail:Function,onOneFileFail:Function,onOneFileSuccess:Function,onPreview:Function,onProgress:Function,onRemove:Function,onSelectChange:Function,onSuccess:Function,onValidate:Function,onWaitingUploadFilesChange:Function};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Ne={accept:String,files:Array,toUploadFiles:Array,displayFiles:Array,theme:String,abridgeName:Array,placeholder:String,classPrefix:String,tips:[String,Function],status:String,locale:Object,sizeOverLimitMessage:String,autoUpload:Boolean,uploadPastedFiles:Boolean,onPasteFileChange:Function,disabled:Boolean,uploading:Boolean,tipsClasses:[String,Array,Object],errorClasses:[String,Array,Object],placeholderClass:[String,Array,Object],showUploadProgress:Boolean,default:Function,fileListDisplay:Function,onRemove:Function,imageViewerProps:Object};/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function oa(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function sl(t){for(var e=1;e1?"".concat(N,"[").concat(A,"]"):N;G[Y]=U.raw}),I.length===1?G[N]=I[0].raw:G[N]=I.map(function(U){return U.raw}),G.length=I.length,M&&(G=M(G));var T=new FormData;return Object.keys(G).forEach(function(U){T.append(U,G[U])}),m.open(n,r,!0),Object.keys(i).forEach(function(U){m.setRequestHeader(U,i[U])}),m.onerror=function(U){D({event:U,file:h,files:I,XMLHttpRequest:m}),clearInterval(C),clearTimeout(q)},m.ontimeout=function(U){D({event:U,file:h,files:I,XMLHttpRequest:m})},m.upload&&(m.upload.onprogress=function(U){var A,Y=0;if(U.total>0&&(Y=Math.round(U.loaded/U.total*100)),O=Math.max(Y,O),O!==Y&&((A=I[0])===null||A===void 0?void 0:A.percent)!==O){var Q=I.map(function(te){return Ke(Ke({},te),{},{percent:O})});w({event:U,percent:O,file:h||Q[0],files:Q,type:"real",XMLHttpRequest:m})}}),m.onload=function(U){var A={};A.XMLHttpRequest=m;var Y=m.status<200||m.status>=300;if(Y)return D({event:U,file:h,files:I,response:A,XMLHttpRequest:m});var Q=m.responseText||m.response;try{A=JSON.parse(Q)}catch{A=Q,Pe.error("Upload","response does not a valid json")}clearInterval(C),clearTimeout(q),I.forEach(function(te){var re;te.percent=100,te.status="success",te.uploadTime=((re=A)===null||re===void 0?void 0:re.uploadTime)||ka()}),Me(A)==="object"&&(A.XMLHttpRequest=m),x({event:U,file:h||I[0],files:ce(I),XMLHttpRequest:m,response:A})},m.send(T),m.upload.requestParams=G,m.upload.requestHeaders=i,m}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function pa(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function se(t){for(var e=1;e=0?se(se({},t[v]),i):i;n.push(u)},o=0,s=e.length;o2&&arguments[2]!==void 0?arguments[2]:void 0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return t.map(function(r){var o=r;Se(e)&&(o=e(r));var s=se({raw:r,lastModified:r.lastModified,name:r.name,size:r.size,type:r.type,percent:n,status:a},o);return s})}function Sl(t){var e=t.files,a=t.uploadValue,n=t.max,r=t.allowUploadDuplicateFile;return new Promise(function(o){var s=e.filter(function(P){var $=a.find(function(z){return z.name===P.name});return r||!$}),c=!1;if(s.lengthn&&(v=!0)}var h=Qe(s,t.format,t.autoUpload?"progress":"waiting"),_;if(t.beforeAllFilesUpload){var p,F=(p=t.beforeAllFilesUpload)===null||p===void 0?void 0:p.call(t,h);_=F instanceof Promise?F:new Promise(function(P){return P(F)})}var N=h.map(function(P){return new Promise(function($){Ol(P,{beforeUpload:t.beforeUpload,sizeLimit:t.sizeLimit}).then(function(z){var j=Ce(z,2),M=j[0],D=j[1];M?$({file:P,validateResult:{type:"FILE_OVER_SIZE_LIMIT",extra:M}}):D===!1&&$({file:P,validateResult:{type:"CUSTOM_BEFORE_UPLOAD"}}),$({file:P})})})});Promise.all([_].concat(N)).then(function(P){var $=dn(P),z=$[0],j=$.slice(1);o(z===!1?{lengthOverLimit:v,hasSameNameFile:c,validateResult:{type:"BEFORE_ALL_FILES_UPLOAD"},files:h}:{lengthOverLimit:v,hasSameNameFile:c,fileValidateList:j,files:h})})})}function Fl(t,e){var a=[],n=[],r=[];return t.forEach(function(o){var s,c;if(((s=o.validateResult)===null||s===void 0?void 0:s.type)==="CUSTOM_BEFORE_UPLOAD"){n.push(o.file);return}if(((c=o.validateResult)===null||c===void 0?void 0:c.type)==="FILE_OVER_SIZE_LIMIT"){o.file.response||(o.file.response={}),o.file.response.error=o.file.response.error||e(o.validateResult.extra),a.push(o);return}r.push(o.file)}),{sizeLimitErrors:a,beforeUploadErrorFiles:n,toFiles:r}}function jl(t){return t.isBatchUpload&&t.status||t.status==="fail"?"reupload":t.status==="progress"?"uploading":t.status==="success"||!t.autoUpload&&t.status==="waiting"?t.multiple?"continueUpload":"reupload":"fileInput"}function xl(t){var e=t.multiple,a=t.uploadValue,n=t.toUploadFiles,r=t.autoUpload,o=r?n:n.filter(function(s){return s.status!=="success"});return e&&!t.isBatchUpload?r?(o.length?a.concat(o):a)||[]:a:(o.length?o:a)||[]}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function ba(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function qe(t){for(var e=1;e