mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-15 16:22:44 +00:00
325 lines
168 KiB
JavaScript
325 lines
168 KiB
JavaScript
|
import{P as Fe,Q as Le,S as ze,Y as $e,ae as fa,af as Za,d as jt,T as Qa,f as H,n as ue,k as tt,g as nt,ag as el,ah as tl,b as de,c as ht,ai as da,aj as nl,ak as yn,a3 as Ae,al as Wn,m as Ue,i as De,h as Nt,w as we,am as rl,an as pa,l as zt,e as at,Z as Ht,O as Dt,ao as al,ap as ll,a9 as il,aq as ol,ar as ul,as as ha,at as cl,au as sl,av as vl,aw as fl,ac as ga,ax as dl,ay as Yt,p as ba,az as ma,a2 as ya,aA as pl,a1 as Tt,aB as hl,aC as jn,aD as gl,aE as bl,aF as ml,aG as yl}from"./index.abba0c49.js";import{d as ie,c as _,j as W,g as ln,r as Nn,w as pe,o as Je,t as Se,n as Ot,bP as Oa,aI as j,aW as Ol,aK as Bt,aU as Et,bp as Cl,aZ as Sl,i as St,p as Zt,aY as En,a$ as wl,b0 as Pl,aV as _e,a_ as xl,h as vt,b as on,a as _l}from"./arco.b087a425.js";import{c as An,b as Ze,l as $n,i as Qt,d as un,I as Mn,_ as cn,C as Il}from"./index.eda8ee4b.js";import{a as kl}from"./form-model.9a62c8df.js";import{a as Ca}from"./slot.b022806d.js";function Kn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kn(Object(n),!0).forEach(function(r){ze(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var jl={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"}}]},Nl=ie({name:"AddIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:n}=e,r=_(()=>t.size),{className:a,style:l}=Fe(r),u=_(()=>["t-icon","t-icon-add",a.value]),i=_(()=>Un(Un({},l.value),n.style)),o=_(()=>({class:u.value,style:i.value,onClick:s=>{var c;return(c=t.onClick)===null||c===void 0?void 0:c.call(t,{e:s})}}));return()=>Le(jl,o.value)}});const El=Nl;function Yn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Gn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yn(Object(n),!0).forEach(function(r){ze(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Al={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z"}}]},$l=ie({name:"ChevronDownIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:n}=e,r=_(()=>t.size),{className:a,style:l}=Fe(r),u=_(()=>["t-icon","t-icon-chevron-down",a.value]),i=_(()=>Gn(Gn({},l.value),n.style)),o=_(()=>({class:u.value,style:i.value,onClick:s=>{var c;return(c=t.onClick)===null||c===void 0?void 0:c.call(t,{e:s})}}));return()=>Le(Al,o.value)}});const Sa=$l;function Xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function qn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xn(Object(n),!0).forEach(function(r){ze(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ml={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.41 7.5l-4.5 4.5 4.5 4.5L17 17.91 11.09 12 17 6.09l1.41 1.41zm-6.5 0L7.41 12l4.5 4.5-1.41 1.41L4.59 12l5.91-5.91 1.41 1.41z"}}]},Dl=ie
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var po=/\s/;function ho(t){for(var e=t.length;e--&&po.test(t.charAt(e)););return e}var go=ho,bo=go,mo=/^\s+/;function yo(t){return t&&t.slice(0,bo(t)+1).replace(mo,"")}var Oo=yo,Co=Oo,Pr=$e,So=fa,xr=0/0,wo=/^[-+]0x[0-9a-f]+$/i,Po=/^0b[01]+$/i,xo=/^0o[0-7]+$/i,_o=parseInt;function Io(t){if(typeof t=="number")return t;if(So(t))return xr;if(Pr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Pr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Co(t);var n=Po.test(t);return n||xo.test(t)?_o(t.slice(2),n?2:8):wo.test(t)?xr:+t}var ko=Io;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var jo=Za,No=function(){return jo.Date.now()},Eo=No,Ao=$e,dn=Eo,_r=ko,$o="Expected a function",Mo=Math.max,Do=Math.min;function To(t,e,n){var r,a,l,u,i,o,s=0,c=!1,d=!1,v=!0;if(typeof t!="function")throw new TypeError($o);e=_r(e)||0,Ao(n)&&(c=!!n.leading,d="maxWait"in n,l=d?Mo(_r(n.maxWait)||0,e):l,v="trailing"in n?!!n.trailing:v);function f(y){var O=r,h=a;return r=a=void 0,s=y,u=t.apply(h,O),u}function p(y){return s=y,i=setTimeout(w,e),c?f(y):u}function g(y){var O=y-o,h=y-s,b=e-O;return d?Do(b,l-h):b}function m(y){var O=y-o,h=y-s;return o===void 0||O>=e||O<0||d&&h>=l}function w(){var y=dn();if(m(y))return P(y);i=setTimeout(w,g(y))}function P(y){return i=void 0,v&&r?f(y):(r=a=void 0,u)}function I(){i!==void 0&&clearTimeout(i),s=0,r=o=a=i=void 0}function S(){return i===void 0?u:P(dn())}function k(){var y=dn(),O=m(y);if(r=arguments,a=this,o=y,O){if(i===void 0)return p(o);if(d)return clearTimeout(i),i=setTimeout(w,e),f(o)}return i===void 0&&(i=setTimeout(w,e)),u}return k.cancel=I,k.flush=S,k}var zn=To;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ro(){var t=jt(),e=t.classPrefix,n={small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")},r={loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")};return{classPrefix:e,sizeClassNames:n,statusClassNames:r,classNames:{size:n,status:r}}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function It(t,e,n,r){var a=ln(),l=a.emit,u=a.vnode,i=W(),o=u.props||{},s=Object.prototype.hasOwnProperty.call(o,r)||Object.prototype.hasOwnProperty.call(o,Qa(r));return s?[t,function(c){l("update:".concat(r),c);for(var d=arguments.length,v=new Array(d>1?d-1:0),f=1;f<d;f++)v[f-1]=arguments[f];n==null||n.apply(void 0,[c].concat(v))}]:(i.value=e,[i,function(c){i.value=c;for(var d=arguments.length,v=new Array(d>1?d-1:0),f=1;f<d;f++)v[f-1]=arguments[f];n==null||n.apply(void 0,[c].concat(v))}])}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ir(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function kr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Vo=function(e){var n=e.data,r=e.container,a=e.fixedHeight,l=a===void 0?!1:a,u=e.lineHeight,i=u===void 0?30:u,o=e.bufferSize,s=o===void 0?20:o,c=e.threshold,d=c===void 0?100:c,v=Nn({visibleData:[],cachedHeight:[],cachedScrollY:[]}),f=_(function(){return n.value.length>d}),p=W(0),g=new Map,m=0,w=0,P=0,I=0,S=0,k=0,y=function(){n.value.forEach(function(D,T){D.$index=T,l&&(v.cachedScrollY[T]=T*i)}),l||(v.cachedScrollY[n.value.length-1]=void 0)};y();var O=_(function(){var N=v.cachedHeight,D=N.length;if(D){var T=N.reduce(function(Y,q){return Y+q||i},0);if(N.length===n.value.length)return T;var L=T/N.length;return T+(n.value.length-N.length)*L}return f.value?n.value.length*i:0}),h=_(function(){var N=v.visibleData,D=N[0];return D?N.length===1?0:v.cachedScrollY[D.$index]:0}),b=function(){k=Math.min(S+m+s*2,n.value.length),v.visibleData=n.value.slice(S,k)},C=function(){var D,T=g.get(P);if(!!T){var L=T==null||(D=T.getBoundingClientRect())===null||D===void 0?void 0:D.height;v.cachedScrollY[P]=r.value.scrollTop-I,v.cachedHeight[P]=L;for(var Y=P+1;Y<=((q=v.visibleData[v.visibleData.length-1])===null||q===void 0?void 0:q.$index);Y++){var q,Z=g.get(Y),G=(Z==null?void 0:Z.getBoundingClientRect())||{},B=G.height;v.cachedHeight[Y]=B;var R=v.cachedScrollY[Y-1]+v.cachedHeight[Y-1];v.cachedScrollY.splice(Y,1,R)}for(var V=P-1;V>=((U=v.visibleData[0])===null||U===void 0?void 0:U.$index);V--){var U,M=g.get(V),z=(M==null?void 0:M.getBoundingClientRect())||{},ee=z.height;v.cachedHeight[V]=ee;var ae=v.cachedScrollY[V+1]-v.cachedHeight[V];v.cachedScrollY.splice(V,1,ae)}if(v.cachedScrollY[0]>0){for(var le=v.cachedScrollY[0],ve=Math.min(k,n.value.length),ne=0;ne<ve;ne++)v.cachedScrollY.splice(ne,1,v.cachedScrollY[ne]-le);var Q=v.cachedScrollY[P-1]?v.cachedScrollY[P-1]+I:I;r.value.scrollTop=Q,w=Q}if(v.cachedScrollY[S]<0){var te=v.cachedHeight.slice(0,Math.max(0,P)).reduce(function(me,ge){return me+ge},0)+I;r.value.scrollTop=te,w=te,te===0&&(P=0,I=0)}Ot(function(){var me=r.value,ge=me.scrollTop,oe=me.scrollHeight,Ye=me.clientHeight;if(ge+Ye===oe)for(var ye=k-1;ye>=S;ye--)ye===k-1?v.cachedScrollY.splice(ye,1,oe.value-v.cachedHeight[ye]):v.cachedScrollY.splice(ye,1,v.cachedScrollY[ye+1]-v.cachedHeight[ye])})}},x=function(){if(!!f.value){var D=r.value.scrollTop,T=D-w;w=D,T+=I;var L=P;if(!!T){if(T>=0){for(;L<n.value.length&&T>(v.cachedHeight[L]||i);)v.cachedHeight[L]||(v.cachedHeight[L]=i),T-=v.cachedHeight[L],L++;L>=n.value.length?(P=n.value.length-1,I=0):(P=L,I=T);var Y=r.value,q=Y.clientHeight,Z=Y.scrollHeight;D+q===Z&&(P=n.value.length-m+1),S<=P-s&&(S=Math.min(n.value.length-m,P-s),S<0&&(S=0))}else{for(;T<0;)L--,v.cachedHeight[L]||(v.cachedHeight[L]=i),T+=v.cachedHeight[L];L<0?(P=0,I=0):(P=L,I=T),C(),S>P-s&&(S=Math.max(0,P-s))}b()}}};!l&&pe(p,C,{flush:"post"});var E=function(){!f.value||p.value++};pe(n,function(){y(),v.visibleData=[],v.cachedScrollY=[],v.cachedHeight=[],w=0,P=0,I=0,S=0,g.clear(),n.value.length<=d?v.visibleData=n.value:b(),r.value&&(r.value.scrollTop=0)});var $=!1,A=function(){$&&(m=Math.ceil(r.value.offsetHeight/i),b())};return Je(function(){if(!(!window||!window.IntersectionObserver)){var N=new window.IntersectionObserver(function(D){var T=D[0];(T.isIntersecting||T.intersectionRatio)&&($=!0,f.value&&A(),N.unobserve(r.value))});r.value&&N.observe(r.value)}}),kr(kr({trs:g,scrollHeight:O},Se(v)),{},{translateY:h,handleScroll:x,handleRowMounted:E,refreshContainer:A,fixedHeight:l,calculateScrollY:C})};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Hn={attach:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:[Number,Array]},destroyOnClose:Boolean,disabled:Boolean,hideEmptyPopup:Boolean,overlayClassName:{type:[String,Object,Array]},overlayInnerClassName:{type:[String,Object,Array]},overlayInnerStyle:{type:[Boolean,Object,Function]},overlayStyle:{type:[Boolean,Object,Function]},placement:{type:String,default:"top"},popperOptions:{type:Object},showArrow:Boolean,trigger:{type:String,default:"hover",validator:function(e){return e?["hover","click","focus","mousedown","context-menu"].includes(e):!0}},triggerElement:{type:[String,Function]},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onOverlayClick:Function,onScroll:Function,onScrollToBottom:Function,onVisibleChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Bo(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}function Da(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=[];return t.forEach(function(n){tt(n)?e.push.apply(e,nt(n)):n.type===Bt?e.push.apply(e,nt(Da(n.children))):e.push(n)}),e.filter(function(n){return!(n&&(n.type===Cl||n.type===Bt&&n.children.length===0||n.type===Oa&&n.children.trim()===""))})}function Fo(t,e){return!t&&!e?!1:!!(!t||!e||["width","height","x","y"].some(function(n){return t[n]!==e[n]}))}function Ta(t){var e=ln(),n=W();return Je(function(){n.value=t(e)}),Sl(function(){var r=t(e);n.value!==r&&(n.value=r)}),n}var Lo=ie({name:"TPopupTrigger",props:{forwardRef:Function},emits:["resize"],setup:function(e,n){var r=n.emit,a=n.slots,l=Ta(function(i){var o=i.parent.vnode;return o.el.nextElementSibling}),u=W();return pe(l,function(){var i;(i=e.forwardRef)===null||i===void 0||i.call(e,l.value)}),An(l,function(i){var o=ue(i,1),s=o[0].contentRect;u.value=s}),pe(u,function(i,o){Fo(i,o)&&r("resize")}),function(){var i,o,s=Da((i=a.default)===null||i===void 0?void 0:i.call(a));return s.length>1||((o=s[0])===null||o===void 0?void 0:o.type)===Oa?j("span",null,[s]):s[0]}}}),zo=ie({name:"TPopupContent",emits:["resize"],setup:function(e,n){var r=n.emit,a=n.slots,l=Ta(function(u){return u.vnode.el.children[0]});return An(l,function(){r("resize")}),function(){return j("div",{style:"position: absolute; top: 0px; left: 0px; width: 100%"},[a.default()])}}}),Ho=ie({name:"TPopupContainer",inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:Hn.attach,forwardRef:Function},emits:["resize","contentMounted"],setup:function(e,n){var r=n.emit,a=n.attrs,l=n.slots,u=n.expose,i=W(),o=W(!1);function s(){r("resize")}return Je(function(){requestAnimationFrame(function(){o.value=e.visible})}),pe(function(){return e.visible},function(c){c&&(o.value=e.visible)}),u({unmountContent:function(){o.value=!1}}),function(){var c,d=function(){return el()||tl(e.attach,i.value)};return j(Bt,null,[j(Lo,{class:a.class,forwardRef:function(f){e.forwardRef(f),i.value=f},onResize:s},Bo(c=l.default())?c:{default:function(){return[c]}}),o.value&&j(Ol,{disabled:!d(),to:d()},{default:function(){return[j(zo,{onResize:s,onVnodeMounted:function(){return r("contentMounted")}},{default:function(){return[l.content&&l.content()]}})]}})])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function pn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wo(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}var Ra="data-td-popup",Sn="data-td-popup-parent";function hn(t,e){var n=[],r=[Sn,Ra];if(!t)return n;return e&&r.unshift(r.pop()),a(t),n;function a(l){var u=document.querySelectorAll("[".concat(r[0],'="').concat(l,'"]'));u.forEach(function(i){n.push(i);var o=i.getAttribute(r[1]);o&&o!==l&&a(o)})}}var Nr=Symbol();function Ko(t){return t.replace(/-(left|top)$/,"-start").replace(/-(right|bottom)$/,"-end")}function Uo(t){var e=[];return{add:function(r,a){!r||(da(t.value,r,a),e.push(function(){yn(t.value,r,a)}))},clean:function(){e.forEach(function(r){return r==null?void 0:r()}),e.length=0}}}var Yo=ie({name:"TPopup",props:pn(pn({},Hn),{},{expandAnimation:{type:Boolean}}),setup:function(e,n){var r,a=n.expose,l=Se(e),u=l.visible,i=l.modelValue,o=Ze(u,i,e.defaultVisible,e.onVisibleChange,"visible"),s=ue(o,2),c=s[0],d=s[1],v=De(),f=Nt(),p,g,m,w=W(null),P=W(null),I=W(null),S=W(null),k=W(!1),y=typeof process<"u"&&(r={})!==null&&r!==void 0&&r.TEST?"":Date.now().toString(36),O=St(Nr,void 0);Zt(Nr,{id:y,assertMouseLeave:G});var h=de("popup"),b=ht(),C=b.STATUS,x=_(function(){var M,z,ee=e.trigger!=="hover"?[0,0]:[].concat((M=e.delay)!==null&&M!==void 0?M:[250,150]);return{show:ee[0],hide:(z=ee[1])!==null&&z!==void 0?z:ee[0]}}),E=Uo(w);pe(function(){return[e.trigger,w.value]},function(){!w.value||(E.clean(),E.add({hover:"mouseenter",focus:"focusin","context-menu":"contextmenu",click:"click"}[e.trigger],function(M){if(!e.disabled){if(M.type==="contextmenu"&&M.preventDefault(),(M.type==="click"||M.type==="contextmenu")&&c.value){L(M);return}T(M)}}),E.add({hover:"mouseleave",focus:"focusout"}[e.trigger],L))}),pe(function(){return[e.overlayStyle,e.overlayInnerStyle,P.value]},function(){A(),N()}),pe(function(){return e.placement},function(){D(),N()}),pe(function(){return c.value},function(M){if(M){da(document,"mousedown",Z,!0),e.trigger==="focus"&&nl(w.value,"keydown",function(z){var ee,ae=typeof process<"u"&&(ee={})!==null&&ee!==void 0&&ee.TEST?"27":"Escape";z.code===ae&&L(z)});return}yn(document,"mousedown",Z,!0)}),En(function(){D(),Y(),yn(document,"mousedown",Z,!0)}),a({update:N,getOverlay:function(){return P.value},getOverlayState:function(){return{hover:k.value}},close:function(){return L()}});function $(){var M=e.overlayStyle;if(!(!w.value||!P.value)){if(Ae(M))return M(w.value,P.value);if($e(M))return M}}function A(){var M=e.overlayInnerStyle;!w.value||!P.value||(Ae(M)?Wn(P.value,M(w.value,P.value)):$e(M)&&Wn(P.value,M))}function N(){if(!(!I.value||!c.value)){if(p){if(w.value.getRootNode()instanceof ShadowRoot)p.state.elements.reference=w.value,p.update();else{for(var M=w.value.getBoundingClientRect(),z=w.value;z&&z!==document.body;)z=z.parentElement;var ee=z!==document.body||M.width===0&&M.height===0;ee?d(!1,{trigger:q({type:"mouseenter"})}):(p.state.elements.reference=w.value,p.update())}return}p=fo(w.value,I.value,pn({placement:Ko(e.placement),onFirstUpdate:function(){Ot(N)}},e.popperOptions))}}function D(){if(p){var M;(M=p)===null||M===void 0||M.destroy(),p=null}if(e.destroyOnClose){var z;(z=S.value)===null||z===void 0||z.unmountContent()}}function T(M){Y(),g=setTimeout(function(){d(!0,{trigger:q(M)})},x.value.show)}function L(M){Y(),m=setTimeout(function(){d(!1,{trigger:q(M),e:M})},x.value.hide)}function Y(){clearTimeout(g),clearTimeout(m)}function q(M){switch(M==null?void 0:M.type){case"mouseenter":return"trigger-element-hover";case"mouseleave":return"trigger-el
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Va=we(Yo);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Go={delay:{type:Number},destroyOnClose:{type:Boolean,default:!0},duration:{type:Number},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return e?["default","primary","success","danger","warning","light"].includes(e):!0}}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Xo=function(){var e=W(0),n=W(0),r=function(l){e.value=l.clientX,n.value=l.clientY};return rl||(Je(function(){window.addEventListener("mousemove",r,{passive:!0})}),En(function(){window.removeEventListener("mousemove",r)})),{x:e,y:n}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Er(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Er(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var qo=ie({name:"TTooltip",props:mt(mt({},Hn),Go),setup:function(e,n){var r=W(null),a=W(null),l=Se(e),u=l.visible,i=l.modelValue,o=Ze(u,i,e.defaultVisible,e.onVisibleChange,"visible"),s=ue(o,2),c=s[0],d=s[1],v=ln(),f=W(e.visible||e.defaultVisible),p=de(),g=De(),m=Nt(),w=Xo(),P=w.x,I=W(P.value);Je(function(){e.duration&&f.value&&(r.value=setTimeout(function(){d(!1,{}),clearTimeout(r.value),r.value=null},e.duration))});var S=function(C,x){r.value&&(x==null?void 0:x.trigger)!=="document"||(C&&(I.value=P.value),d(C,x))},k=_(function(){return["".concat(p.value,"-tooltip"),H({},"".concat(p.value,"-tooltip--").concat(e.theme),e.theme),e.overlayClassName]}),y=_(function(){return mt(mt({},(v==null?void 0:v.vnode.props)||{}),{},{placement:e.placement==="mouse"?"bottom-left":e.placement,showArrow:e.placement==="mouse"?!1:e.showArrow,overlayClassName:k.value,onVisibleChange:S,disabled:e.disabled})}),O=_(function(){if(e.placement!=="mouse"||I.value===0)return e.overlayInnerStyle;var b=function(x){return{transform:"translateX(".concat(I.value-x.getBoundingClientRect().left,"px)")}};return e.overlayInnerStyle?function(C,x){return mt(mt({},b(C)),Ae(e.overlayInnerStyle)?e.overlayInnerStyle(C,x):e.overlayInnerStyle)}:b});pe(function(){return f.value},function(){r.value&&!f.value&&(clearTimeout(r.value),r.value=null)});var h=function(){var C,x;(C=a.value)===null||C===void 0||(x=C.update)===null||x===void 0||x.call(C)};return n.expose({updatePopper:h}),function(){var b=g("content");return!b&&!e.content?m("default","triggerElement"):j(Va,_e(pa(y.value,["content","default"]),{ref:a,overlayInnerStyle:O.value,visible:c.value}),{default:function(){return[m("default","triggerElement")]},content:function(){return b}})}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var xv=we(qo);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ar(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Jo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ar(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _v(t,e){for(var n=Jo({},t),r=0;r<e.length;r++){var a=e[r];delete n[a]}return n}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Zo=ie({name:"TFakeArrow",props:{isActive:{type:Boolean},overlayClassName:{type:[String,Object,Array]},overlayStyle:{type:Object||String}},setup:function(e){var n=de("fake-arrow"),r=_(function(){return[n.value,H({},"".concat(n.value,"--active"),e.isActive),e.overlayClassName]});return{classes:r}},render:function(){return j("svg",{class:this.classes,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:this.overlayStyle},[j("path",{d:"M3.75 5.7998L7.99274 10.0425L12.2361 5.79921",stroke:"black","stroke-opacity":"0.9","stroke-width":"1.3"},null)])}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Qo={align:{type:String,validator:function(e){return e?["left","center","right"].includes(e):!0}},allowInputOverLimit:{type:Boolean,default:!0},autoWidth:Boolean,decimalPlaces:{type:Number,default:void 0},disabled:{type:Boolean,default:void 0},format:{type:Function},inputProps:{type:Object},label:{type:[String,Function]},largeNumber:Boolean,max:{type:[String,Number],default:1/0},min:{type:[String,Number],default:-1/0},placeholder:{type:String,default:void 0},readonly:{type:Boolean,default:void 0},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},status:{type:String,default:"default",validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},step:{type:[String,Number],default:1},suffix:{type:[String,Function]},theme:{type:String,default:"row",validator:function(e){return e?["column","row","normal"].includes(e):!0}},tips:{type:[String,Function]},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ct(t){return new Array(t).fill(0).join("")}function Ba(t){if(!t)return!0;if(zt(t))return!Number.isNaN(t);var e=/^[0-9|e|E|-]+\.*[0-9|e|E|-]*$/.test(t);if(!e)return!1;for(var n=0,r=0,a=0,l=0,u=t.length;l<u;l++)if(t[l]==="."&&(a+=1,a>1)||/(e|E)+/.test(t[l])&&(n+=1,n>1)||t[l]==="-"&&(r+=1,r>2))return!1;return!0}function Ee(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return t.indexOf(".")!==-1?($n.error("InputNumber","num is not a integer number."),t):!t||t==="0"&&e?"":t==="0"?t:(e?t.replace(/0+$/,""):t.replace(/^0+/,""))||"0"}function gn(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=Ee(t,n),a=Ee(e,n),l=r.length>a.length,u=l?r:a,i=l?a:r,o=[],s=[],c=n?0:u.length-i.length,d=n?i.length:u.length,v=d-1;v>=0;v--){var f=v-c,p=Number(u[v])+(Number(i[f])||0)+(s[v]||0);p>=10&&(s[v-1]=1),o.unshift(String(p%10))}return s[-1]&&o.unshift("1"),n?o.concat(u.slice(d,u.length)).join(""):o.join("")}function kt(t,e){var n=t.split("."),r=ue(n,2),a=r[0],l=a===void 0?"0":a,u=r[1],i=u===void 0?"0":u,o=e.split("."),s=ue(o,2),c=s[0],d=c===void 0?"0":c,v=s[1],f=v===void 0?"0":v,p=gn(l,d);if(i==="0"&&f==="0")return p;var g=Ee(i,!0),m=Ee(f,!0),w=gn(g,m,!0),P=w.length;return P>g.length&&P>m.length?[Ee(gn(p,"1")),Ee(w.slice(1),!0)].filter(function(I){return I}).join("."):[Ee(p),Ee(w,!0)].filter(function(I){return I}).join(".")}function Fa(t,e){var n=Ee(t),r=Ee(e);if(n.length===r.length){for(var a=0,l=n.length;a<l;a++){if(n[a]>r[a])return 1;if(n[a]<r[a])return-1}return 0}return n.length>r.length?1:-1}function La(t,e){for(var n=t&&t!=="0"?t.replace(/0+$/,""):"0",r=e&&e!=="0"?e.replace(/0+$/,""):"0",a=Math.max(n.length,r.length),l=0,u=a;l<u;l++){if((n[l]||0)>(r[l]||0))return 1;if((n[l]||0)<(r[l]||0))return-1}return 0}function wn(t){var e=t.split("e"),n=ue(e,2),r=n[0],a=n[1];if(!a)return t;var l=t.split("."),u=ue(l,2),i=u[0],o=u[1],s=o===void 0?"":o,c=Number(a),d=s.split("e"),v=ue(d,1),f=v[0];if(c>f.length){var p=Ct(c-f.length);return r.replace(/(^0+|\.)/g,"")+p}var g=i.replace(/^0+/,"")+f.slice(0,c),m=f.slice(c);return m?[g,m].join("."):g}function eu(t,e){var n=wn(t).split("."),r=ue(n,2),a=r[0],l=r[1],u=wn(e).split("."),i=ue(u,2),o=i[0],s=i[1],c=Fa(a.replace("-",""),o.replace("-","")),d=a.includes("-"),v=o.includes("-");return d&&!v?-1:!d&&v?1:d&&v?c===0?0:c>0?-1:1:c===0?La(l,s):c}function $r(t){return[-1/0,1/0].includes(Number(t))}function Mr(t){return Number(t)<Number.MAX_SAFE_INTEGER&&Number(t)>Number.MIN_SAFE_INTEGER}function pt(t,e,n){var r=Mr(t)&&Mr(e)&&!n,a=$r(t)||$r(e);return r||a?Number(t)===Number(e)?0:Number(t)>Number(e)?1:-1:eu(String(t),String(e))}function $t(t,e,n){if(t===e)return"0";for(var r=n||{},a=r.decimal,l=r.stayZero,u=Ee(t),i=Ee(e),o=Fa(u,i)>0,s=o?u:i,c=o?i:u,d=[],v=[],f=a?0:s.length-c.length,p=a?c.length:s.length,g=p-1;g>=0;g--){var m=g-f,w=Number(s[g])-(Number(c[m])||0)-(v[g]||0);w<0&&(v[g-1]=1,w+=10),d.unshift(String(w))}if(a)return d.concat(s.slice(p,s.length)).join("");var P=d.join("");return l||(P=P.replace(/^0+/,"")),Ee(o?P:"-".concat(P))}function tn(t,e){if(t===e)return"0";var n=pt(t,e,!0)>0,r=n?t:e,a=n?e:t,l=r.split("."),u=ue(l,2),i=u[0],o=u[1],s=o===void 0?"0":o,c=a.split("."),d=ue(c,2),v=d[0],f=d[1],p=f===void 0?"0":f,g=$t(i,v);if(s==="0"&&p==="0")return n?g:"-".concat(g);var m="",w=s;s.length<p.length&&(w="".concat(s).concat(Ct(p.length-s.length))),La(w,p)>=0?m=$t(w,p,{decimal:!0}):(s.length<p.length||s==="0"?(m=$t("1".concat(w),p,{stayZero:!0}),m=Ct(p.length-m.length)+m):m=$t(s,p,{decimal:!0}),g=$t(g,"1"));var P=m?[g,m].join("."):g;return n?P:"-".concat(P)}function tu(t,e){var n=t[0]==="-",r=e[0]==="-";if(n&&!r){var a=kt(t.slice(1),e);return"-".concat(a)}return n&&r?tn(e.slice(1),t.slice(1)):!n&&r?kt(t,e.slice(1)):tn(t,e)}function nu(t,e){var n=t[0]==="-",r=e[0]==="-";if(n&&!r)return tn(e,t.slice(1));if(n&&r){var a=kt(e.slice(1),t.slice(1));return"-".concat(a)}return!n&&r?tn(t,e.slice(1)):kt(t,e)}function Pn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n)return Number(t).toFix
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ru(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t&&t!==0?!0:n&&Ue(t)?pt(t,e,n)<0:t<e}function au(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t&&t!==0?!0:n&&Ue(t)?pt(t,e,n)>0:t>e}function lu(t,e){if(t!==""){var n=e.max,r=e.min,a=e.lastValue,l=e.largeNumber;return Ba(t)?l&&(Ue(n)||n===1/0)&&(Ue(r)||r===-1/0)?pt(n,t,l)<0?n:pt(r,t,l)>0?r:t:Math.max(Number(r),Math.min(Number(n),Number(t))):a}}function nn(t,e){var n,r;if(!t||!e)return(t||0)+(e||0);var a=((n=t.toString().split(".")[1])===null||n===void 0?void 0:n.length)||0,l=((r=e.toString().split(".")[1])===null||r===void 0?void 0:r.length)||0;if(!a&&!l)return t+e;var u=t,i=e,o=Math.abs(a-l),s=Math.pow(10,Math.max(a,l));if(o>0){var c=Math.pow(10,o);a>l?(u=Number(t.toString().replace(".","")),i=Number(e.toString().replace(".",""))*c):(u=Number(t.toString().replace(".",""))*c,i=Number(e.toString().replace(".","")))}else u=Number(t.toString().replace(".","")),i=Number(e.toString().replace(".",""));return(u+i)/s}function rn(t,e){var n,r;if(!t||!e)return(t||0)-(e||0);var a=((n=t.toString().split(".")[1])===null||n===void 0?void 0:n.length)||0,l=((r=e.toString().split(".")[1])===null||r===void 0?void 0:r.length)||0,u=Math.pow(10,Math.max(a,l)),i=a>=l?a:l;return Number(((t*u-e*u)/u).toFixed(i))}function iu(t,e){return t<0&&e>0?rn(e,Math.abs(t)):t<0&&e<0?nn(Math.abs(t),Math.abs(e))*-1:t>0&&e<0?rn(t,Math.abs(e)):nn(t,e)}function ou(t,e){return t<0&&e>0?nn(Math.abs(t),e)*-1:t<0&&e<0?rn(Math.abs(e),Math.abs(t)):t>0&&e<0?nn(t,Math.abs(e)):rn(t,e)}function uu(t){var e=t.op,n=t.step,r=t.lastValue,a=t.max,l=t.min,u=t.largeNumber;if(n<=0)return $n.error("InputNumber","step must be larger than 0."),r;var i=zt(n)?String(n):n,o;return e==="add"?u&&Ue(r)?o=nu(String(r),String(i)):o=iu(Number(r||0),Number(n)):e==="reduce"&&(u&&Ue(r)?o=tu(String(r),String(i)):o=ou(Number(r||0),Number(n))),Qt(r)&&(o=lu(o,{max:a,min:l,lastValue:r,largeNumber:u})),u?o:Number(o)}function bn(t){var e=t.largeNumber,n=t.value,r=t.max,a=t.min;if(!(Qt(n)||Qt(e))){e&&zt(n)&&$n.warn("InputNumber","largeNumber value must be a string.");var l;return pt(n,r,e)>0?l="exceed-maximum":pt(n,a,e)<0?l="below-minimum":l=void 0,l}}var cu=["-",".","e","E","+"];function su(t,e){var n;if(["",null,void 0].includes(t))return!0;if(t.slice(0,2)==="00"||((n=t.match(/\./g))===null||n===void 0?void 0:n.length)>1)return!1;var r=t.slice(1);if(/(\+|-)/.test(r)&&!/e+/i.test(r))return!1;var a=e&&Ba(t)||!Number.isNaN(Number(t));return!(!a&&!cu.includes(t.slice(-1))||/e/i.test(t)&&!/\de/i.test(t))}function vu(t,e){return parseFloat(t)!==e&&!Number.isNaN(Number(t))}function mn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(["",null,void 0].includes(t)||!/\d+/.test(t))){var n=e.decimalPlaces,r=e.largeNumber,a=e.isToFixed,l=t.replace(/[.|+|\-|e]$/,"");return r&&(l=wn(l)),n!==void 0&&(l=Pn(l,n,r)),r||a?l:parseFloat(l)}}function fu(t){var e=/^[-+]?\d{1,3}(,\d{3})*(\.(\d*))?$/;return e.test(t)?t.replace(/,/g,""):t}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function du(t){var e=Ro(),n=e.classPrefix,r=e.sizeClassNames,a=e.statusClassNames,l=Se(t),u=l.value,i=l.modelValue,o=l.max,s=l.min,c=Ze(u,i,t.defaultValue,t.onChange),d=ue(c,2),v=d[0],f=d[1],p=W(),g=W(""),m=at(),w=un(),P=W(),I=_(function(){return m.value||!au(v.value,t.min,t.largeNumber)}),S=_(function(){return m.value||!ru(v.value,t.max,t.largeNumber)}),k=_(function(){return["".concat(n.value,"-input-number"),r[t.size],H(H(H(H({},a.disabled,m.value),"".concat(n.value,"-is-controls-right"),t.theme==="column"),"".concat(n.value,"-input-number--").concat(t.theme),t.theme),"".concat(n.value,"-input-number--auto-width"),t.autoWidth)]}),y=_(function(){return["".concat(n.value,"-input-number__decrease"),H({},a.disabled,I.value)]}),O=_(function(){return["".concat(n.value,"-input-number__increase"),H({},a.disabled,S.value)]}),h=function(B){var R;if(!B&&B!==0)return"";var V=B||B===0?String(B):"";if(!((R=p.value)!==null&&R!==void 0&&(R=R.inputRef)!==null&&R!==void 0&&R.contains(document.activeElement))){var U=mn(V,{decimalPlaces:t.decimalPlaces,largeNumber:t.largeNumber,isToFixed:!0});V=U||U===0?String(U):"",t.format&&(V=String(t.format(B,{fixedNumber:V})))}return V};pe(v,function(G){var B=t.largeNumber,R=t.decimalPlaces,V=[void 0,null].includes(G)?"":String(G);if(!B&&!Number.isNaN(g.value)){parseFloat(g.value)!==G&&(g.value=h(V));var U=Number(Pn(V,R,B));R!==void 0&&![void 0,null].includes(G)&&Number(U)!==Number(v.value)&&f(U,{type:"props",e:void 0})}B&&(g.value=h(V),R!==void 0&&Pn(V,R,B)!==G&&f(g.value,{type:"props",e:void 0}))},{immediate:!0}),pe([v,o,s],function(){var G;if(![void 0,"",null].includes(v.value)){var B=t.max,R=t.min,V=t.largeNumber,U=bn({value:v.value,largeNumber:V,max:B,min:R});P.value=U,(G=t.onValidate)===null||G===void 0||G.call(t,{error:U})}},{immediate:!0});var b=function(B){var R=uu({op:B,step:t.step,max:t.max,min:t.min,lastValue:v.value,largeNumber:t.largeNumber}),V=t.largeNumber,U=t.max,M=t.min,z=bn({value:R,largeNumber:V,max:U,min:M});return{overLimit:z,newValue:R}},C=function(B){if(!(I.value||w.value)){var R=b("reduce");R.overLimit&&!t.allowInputOverLimit||f(R.newValue,{type:"reduce",e:B})}},x=function(B){if(!(S.value||w.value)){var R=b("add");R.overLimit&&!t.allowInputOverLimit||f(R.newValue,{type:"add",e:B})}},E=function(B,R){var V=R.e,U=fu(B);if(!!su(U,t.largeNumber)){if(g.value=U,t.largeNumber){f(U,{type:"input",e:V});return}if(vu(String(U),Number(v.value))){var M=U===""?void 0:Number(U);f(M,{type:"input",e:V})}}},$=function(B,R){var V,U=t.largeNumber,M=t.max,z=t.min,ee=t.decimalPlaces;if(!t.allowInputOverLimit&&v.value!==void 0){var ae=bn({value:v.value,largeNumber:U,max:M,min:z});if(ae==="below-minimum"){var le;f(z,{type:"blur",e:R.e}),(le=t.onBlur)===null||le===void 0||le.call(t,z,R);return}if(ae==="exceed-maximum"){var ve;f(M,{type:"blur",e:R.e}),(ve=t.onBlur)===null||ve===void 0||ve.call(t,M,R);return}}var ne=mn(B,{decimalPlaces:ee,largeNumber:U});g.value=h(ne),ne!==v.value&&f(ne,{type:"blur",e:R.e}),(V=t.onBlur)===null||V===void 0||V.call(t,ne,R)},A=function(B,R){var V;g.value=v.value||v.value===0?String(v.value):"",(V=t.onFocus)===null||V===void 0||V.call(t,B,R)},N=function(B,R){var V;if(!m.value){var U=R.e,M={ArrowUp:x,ArrowDown:C},z=U.code||U.key;M[z]!==void 0&&M[z](U),(V=t.onKeydown)===null||V===void 0||V.call(t,B,R)}},D=function(B,R){var V;(V=t.onKeyup)===null||V===void 0||V.call(t,B,R)},T=function(B,R){var V;(V=t.onKeypress)===null||V===void 0||V.call(t,B,R)},L=function(B,R){var V;g.value=h(B);var U=mn(B,{decimalPlaces:t.decimalPlaces,largeNumber:t.largeNumber});U!==B&&String(U)!==B&&f(U,{type:"enter",e:R.e}),(V=t.onEnter)===null||V===void 0||V.call(t,U,R)},Y=function(){p.value.focus()},q=function(){p.value.blur()},Z={onBlur:$,onFocus:A,onKeydown:N,onKeyup:D,onKeypress:T,onEnter:L,onClick:Y};return{classPrefix:n,wrapClasses:k,reduceClasses:y,addClasses:O,tDisabled:m,isError:P,listeners:Z,userInput:g,tValue:v,inputRef:p,focus:Y,blur:q,handleReduce:C,handleAdd:x,onInnerInputChange:E,isReadonly:w}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Dr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function pu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var hu=ie({name:"TInputNumber",props:Qo,setup:function(e,n){var r=De(),a=Ht({AddIcon:El,RemoveIcon:ri,ChevronDownIcon:Sa,ChevronUpIcon:xa}),l=a.AddIcon,u=a.RemoveIcon,i=a.ChevronDownIcon,o=a.ChevronUpIcon,s=du(e),c=s.inputRef;return n.expose(pu({},s)),function(){var d=e.theme==="column"?j(i,{size:e.size},null):j(u,{size:e.size},null),v=e.theme==="column"?j(o,{size:e.size},null):j(l,{size:e.size},null),f=s.isError.value?"error":e.status,p=s.classPrefix.value,g=r("tips");return j("div",{class:s.wrapClasses.value},[e.theme!=="normal"&&j(Dt,{class:s.reduceClasses.value,disabled:s.tDisabled.value,onClick:s.handleReduce,variant:"outline",shape:"square",icon:function(){return d}},null),j(Mn,_e({ref:c,disabled:s.tDisabled.value,readonly:s.isReadonly.value,autocomplete:"off",placeholder:e.placeholder,unselectable:s.isReadonly.value?"on":"off",autoWidth:e.autoWidth,align:e.align||(e.theme==="row"?"center":void 0),status:f,label:e.label,suffix:e.suffix},s.listeners,e.inputProps,{value:s.userInput.value,onChange:s.onInnerInputChange}),n.slots),e.theme!=="normal"&&j(Dt,{class:s.addClasses.value,disabled:s.tDisabled.value,onClick:s.handleAdd,variant:"outline",shape:"square",icon:function(){return v}},null),g&&j("div",{class:"".concat(p,"-input__tips ").concat(p,"-tips ").concat(p,"-is-").concat(f)},[g])])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var gu=we(hu);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var bu=ll,mu=kl,yu=il;function Ou(t,e,n){for(var r=-1,a=e.length,l={};++r<a;){var u=e[r],i=bu(t,u);n(i,u)&&mu(l,yu(u,t),i)}return l}var Cu=Ou,Su=Cu,wu=ol;function Pu(t,e){return Su(t,e,function(n,r){return wu(t,r)})}var xu=Pu,_u=xu,Iu=al,ku=Iu(function(t,e){return t==null?{}:_u(t,e)}),za=ku;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ju(t,e,n,r){for(var a=t.length,l=n+(r?1:-1);r?l--:++l<a;)if(e(t[l],l,t))return l;return-1}var Nu=ju;function Eu(t){return t!==t}var Au=Eu;function $u(t,e,n){for(var r=n-1,a=t.length;++r<a;)if(t[r]===e)return r;return-1}var Mu=$u,Du=Nu,Tu=Au,Ru=Mu;function Vu(t,e,n){return e===e?Ru(t,e,n):Du(t,Tu,n)}var Bu=Vu,Fu=Bu;function Lu(t,e){var n=t==null?0:t.length;return!!n&&Fu(t,e,0)>-1}var zu=Lu;function Hu(t,e,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1}var Wu=Hu;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ku=cl,Uu=zu,Yu=Wu,Gu=ha,Xu=sl,Tr=vl,qu=Math.min;function Ju(t,e,n){for(var r=n?Yu:Uu,a=t[0].length,l=t.length,u=l,i=Array(l),o=1/0,s=[];u--;){var c=t[u];u&&e&&(c=Gu(c,Xu(e))),o=qu(c.length,o),i[u]=!n&&(e||a>=120&&c.length>=120)?new Ku(u&&c):void 0}c=t[0];var d=-1,v=i[0];e:for(;++d<a&&s.length<o;){var f=c[d],p=e?e(f):f;if(f=n||f!==0?f:0,!(v?Tr(v,p):r(s,p,n))){for(u=l;--u;){var g=i[u];if(!(g?Tr(g,p):r(t[u],p,n)))continue e}v&&v.push(p),s.push(f)}}return s}var Zu=Ju,Qu=fl;function ec(t){return Qu(t)?t:[]}var tc=ec,nc=ha,rc=Zu,ac=ul,lc=tc,ic=ac(function(t){var e=nc(t,lc);return e.length&&e[0]===t[0]?rc(e):[]}),xn=ic;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var oc={allowInput:Boolean,autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:{type:Boolean,default:void 0},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,minCollapsedNum:{type:Number,default:0},multiple:Boolean,panel:{type:[String,Function]},placeholder:{type:String,default:""},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,prefixIcon:{type:Function},readonly:Boolean,reserveKeyword:Boolean,size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},status:{type:String,default:"default",validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array,Date],default:void 0},valueDisplay:{type:[String,Function]},onBlur:Function,onClear:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onPopupVisibleChange:Function,onTagChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var uc=["tips"];function Rr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var cc=["status","clearable","disabled","label","placeholder","readonly","prefixIcon","suffix","suffixIcon","onPaste","onMouseenter","onMouseleave","size","autofocus"],sc={label:"label",value:"value",children:"children"};function vc(t,e){var n=xe(xe({},sc),e);return $e(t)?t[n.label]:t}function fc(t,e,n){var r,a=Se(t),l=a.value,u=a.keys,i=a.inputValue,o=de(),s=W(t.autofocus),c=W(),d=It(i,(r=t.defaultInputValue)!==null&&r!==void 0?r:"",t.onInputChange,"inputValue"),v=ue(d,2),f=v[0],p=v[1],g=De(),m=at(),w=_(function(){return xe(xe({},za(t,cc)),{},{disabled:m.value})}),P=function(b){var C,x;b==null||(C=b.e)===null||C===void 0||C.stopPropagation(),(x=t.onClear)===null||x===void 0||x.call(t,b),p("",{trigger:"clear"})},I=function(b,C){t.allowInput&&p(b,xe(xe({},C),{},{trigger:C.trigger||"input"}))},S=function(b){var C,x=g("valueDisplay"),E=b&&t.allowInput?f.value:vc(l.value,u.value),$=k(x,b),A=xe(xe({},w.value),{},{value:y(x,E,b),label:$.length?function(){return $}:void 0,autoWidth:t.autoWidth,readonly:!t.allowInput||t.readonly,placeholder:O(x),suffixIcon:!m.value&&t.loading?function(){return j(ga,{loading:!0,size:"small"},null)}:t.suffixIcon,showClearIconOnEmpty:Boolean(t.clearable&&(f.value||E)&&!m.value&&!t.readonly)},t.inputProps),N=e.slots;N.tips;var D=cn(N,uc),T=b?["".concat(o.value,"-input--focused"),"".concat(o.value,"-is-focused"),A==null?void 0:A.inputClass]:A==null?void 0:A.inputClass,L=function(G,B){var R;(R=t.onEnter)===null||R===void 0||R.call(t,l.value,xe(xe({},B),{},{inputValue:G}))},Y=function(G,B){var R,V,U=(R=n.value)===null||R===void 0?void 0:R.getOverlayState();s.value||U!=null&&U.hover||(s.value=!0,(V=t.onFocus)===null||V===void 0||V.call(t,l.value,xe(xe({},B),{},{inputValue:G})))},q=function(G,B){var R,V,U=(R=n.value)===null||R===void 0?void 0:R.getOverlayState();U!=null&&U.hover||(s.value=!1,(V=t.onBlur)===null||V===void 0||V.call(t,l.value,xe(xe({},B),{},{inputValue:G})))};return j(Mn,_e({ref:c,style:(C=e.attrs)===null||C===void 0?void 0:C.style},xe({onChange:I,onClear:P,onEnter:L,onFocus:Y,onBlur:q},A),{inputClass:T}),D)},k=function(b,C){var x=g("label");if(!x&&!b)return[];if(b){var E,$;if((E=t.valueDisplayOptions)!==null&&E!==void 0&&E.usePlaceholder&&!l.value||($=t.valueDisplayOptions)!==null&&$!==void 0&&$.useInputDisplay&&C)return[x]}return[x,b]},y=function(b,C,x){if(b){var E,$;if(!((E=t.valueDisplayOptions)!==null&&E!==void 0&&E.useInputDisplay)||($=t.valueDisplayOptions)!==null&&$!==void 0&&$.useInputDisplay&&!x)return}return C},O=function(b){if(b){var C,x;if(!((C=t.valueDisplayOptions)!==null&&C!==void 0&&C.usePlaceholder)||(x=t.valueDisplayOptions)!==null&&x!==void 0&&x.usePlaceholder&&l.value)return""}return t.placeholder};return{inputRef:c,isSingleFocus:s,commonInputProps:w,singleInputValue:f,onInnerClear:P,renderSelectSingle:S}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var dc={autoWidth:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:{type:Boolean,default:void 0},dragSort:Boolean,excessTagsDisplayType:{type:String,default:"break-line",validator:function(e){return e?["scroll","break-line"].includes(e):!0}},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number],default:""},label:{type:[String,Function]},max:{type:Number},minCollapsedNum:{type:Number,default:0},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:{type:Boolean,default:void 0},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},status:{type:String,validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},valueDisplay:{type:[String,Function]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onDragSort:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onRemove:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function pc(t){var e=W(),n=Se(t),r=n.excessTagsDisplayType,a=n.readonly,l=n.disabled,u=W(0),i=W(),o=W(),s=W(!1),c=function(k){var y=k.children[0];i.value=y},d=function(){u.value=i.value.scrollWidth-i.value.clientWidth},v=function(k){var y;!Ae((y=i.value)===null||y===void 0?void 0:y.scroll)||i.value.scroll({left:k,behavior:"smooth"})},f=function(){d(),v(u.value),setTimeout(function(){s.value=!0},200)},p=function(){v(0)},g=function(k){var y=k.e;if(!(a.value||l.value)&&!!i.value)if(y.deltaX>0){var O=Math.min(i.value.scrollLeft+120,u.value);v(O)}else{var h=Math.max(i.value.scrollLeft-120,0);v(h)}},m=function(){r.value==="scroll"&&(o.value=setTimeout(function(){f(),clearTimeout(o.value)},100))},w=function(){r.value==="scroll"&&(s.value=!1,v(0),clearTimeout(o.value))},P=function(){var k,y=(k=e.value)===null||k===void 0?void 0:k.$el;!y||c(y)},I=function(){clearTimeout(o.value)};return Je(P),En(I),{tagInputRef:e,scrollElement:i,scrollDistance:u,scrollTo:v,scrollToRight:f,scrollToLeft:p,updateScrollElement:c,updateScrollDistance:d,onWheel:g,scrollToRightOnEnter:m,scrollToLeftOnLeave:w,isScrollable:s}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function an(t){return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}var hc=/^\s+/,gc=/\s+$/;function X(t,e){if(t=t||"",e=e||{},t instanceof X)return t;if(!(this instanceof X))return new X(t,e);var n=bc(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}X.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,a,l,u,i;return n=e.r/255,r=e.g/255,a=e.b/255,n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),r<=.03928?u=r/12.92:u=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*l+.7152*u+.0722*i},setAlpha:function(e){return this._a=Ha(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Br(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Br(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+a+"%)":"hsva("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=Vr(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Vr(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+a+"%)":"hsla("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return Fr(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Cc(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(be(this._r,255)*100)+"%",g:Math.round(be(this._g,255)*100)+"%",b:Math.round(be(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(be(this._r,255)*100)+"%, "+Math.round(be(this._g,255)*100)+"%, "+Math.round(be(this._b,255)*100)+"%)":"rgba("+Math.round(be(this._r,255)*100)+"%, "+Math.round(be(this._g,255)*100)+"%, "+Math.round(be(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:$c[Fr(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Lr(this._r,this._g,this._b,this._a),r=n,a=this._gradientType?"GradientType = 1, ":"";if(e){var l=X(e);r="#"+Lr(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,a=this._a<1&&this._a>=0,l=!n&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return l?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return X(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Bc={closable:Boolean,color:{type:String,default:""},content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,icon:{type:Function,default:void 0},maxWidth:{type:[String,Number]},shape:{type:String,default:"square",validator:function(e){return e?["square","round","mark"].includes(e):!0}},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},theme:{type:String,default:"default",validator:function(e){return e?["default","primary","warning","danger","success"].includes(e):!0}},variant:{type:String,default:"dark",validator:function(e){return e?["dark","light","outline","light-outline"].includes(e):!0}},onClick:Function,onClose:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Wr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Fc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ka=ie({name:"TTag",props:Bc,setup:function(e){var n=jt("tag"),r=n.globalConfig,a=de("tag"),l=Ht({CloseIcon:dl}),u=l.CloseIcon,i=De(),o=Nt(),s=ht(),c=s.SIZE,d=_(function(){return["".concat(a.value),"".concat(a.value,"--").concat(e.theme),"".concat(a.value,"--").concat(e.variant),H(H(H(H({},"".concat(a.value,"--ellipsis"),e.maxWidth),"".concat(a.value,"--close"),e.closable),"".concat(a.value,"--disabled"),e.disabled),c.value[e.size],e.size!=="medium"),e.shape!=="square"&&"".concat(a.value,"--").concat(e.shape)]}),v=_(function(){var m=e.maxWidth,w=f();return e.maxWidth?Fc({maxWidth:isNaN(Number(m))?String(m):"".concat(m,"px")},w):w}),f=function(){var w=e.color,P=e.variant;if(!w)return{};var I=X(w).getLuminance(),S={color:I>.5?"black":"white"};if((P==="outline"||P==="light-outline")&&(S.borderColor=w),P!=="outline"){var k=function(){var O=X(w).toRgb(),h=O.r,b=O.g,C=O.b;return"rgba(".concat(h,", ").concat(b,", ").concat(C,", 0.1)")};S.backgroundColor=P==="dark"?w:k()}return P!=="dark"&&(S.color=w),S},p=function(w){var P;e.disabled||(P=e.onClick)===null||P===void 0||P.call(e,{e:w})},g=function(){if(!e.closable)return null;var w="".concat(a.value,"__icon-close");return r.value.closeIcon?vt(r.value.closeIcon(vt),{class:w}):j(u,{onClick:function(I){var S,k=I.e;k.stopPropagation(),(S=e.onClose)===null||S===void 0||S.call(e,{e:k})},class:w},null)};return function(){var m=g(),w=o("default","content"),P=i("icon"),I=Ue(w)?w:"",S=I&&e.maxWidth?I:void 0;return j("div",{class:d.value,style:v.value,onClick:p},[P,j("span",{class:"".concat(a.value,"--text"),title:S},[w]),!e.disabled&&m])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Lc={checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,checkedProps:{type:Object},content:{type:[String,Number,Array,Function]},default:{type:[String,Function]},disabled:Boolean,size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},uncheckedProps:{type:Object},value:{type:[String,Number]},onChange:Function,onClick:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Iv=/^ArrowDown$/i,kv=/^ArrowUp$/i,jv=/^Escape$/i,zc=/^Space$/i,Hc=/^Enter$/i,Nv=/^(Shift|ShiftLeft|ShiftRight)$/i,Ev=/^KeyC$/i,Av=/^(KeyA|KeyL)$/i,Kr=/^(Enter|Space)$/i;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ur(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Yr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ur(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wc(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}var Ua=ie({name:"TCheckTag",props:Lc,setup:function(e){var n=de("tag"),r=ht(),a=r.SIZE,l=Nt(),u=Se(e),i=u.checked,o=u.modelValue,s=Ze(i,o,e.defaultChecked,e.onChange,"checked"),c=ue(s,2),d=c[0],v=c[1],f=_(function(){return["".concat(n.value),"".concat(n.value,"--check"),a.value[e.size],H(H({},"".concat(n.value,"--checked"),d.value),"".concat(n.value,"--disabled"),e.disabled)]}),p=_(function(){var I=Yr({theme:"primary"},e.checkedProps),S=Yr({},e.uncheckedProps);return d.value?I:S}),g=function(S){var k=S.e;if(!e.disabled){var y;(y=e.onClick)===null||y===void 0||y.call(e,{e:k}),v(!d.value,{e:k,value:e.value})}},m=function(S){var k,y=S.code||((k=S.key)===null||k===void 0?void 0:k.trim()),O=zc.test(y)||Hc.test(y);O&&(S.preventDefault(),v(!d.value,{e:S,value:e.value}))},w=function(S){S.currentTarget.addEventListener("keydown",m)},P=function(S){S.currentTarget.removeEventListener("keydown",m)};return function(){var I=l("default","content");return j(Ka,_e({class:f.value,disabled:e.disabled,tabindex:e.disabled?void 0:"0",onFocus:w,onBlur:P},p.value,{onClick:g}),Wc(I)?I:{default:function(){return[I]}})}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Kc={checkedProps:{type:Object},multiple:Boolean,options:{type:Array},uncheckedProps:{type:Object},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Uc(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}var Yc=ie({name:"TCheckTagGroup",props:Kc,setup:function(e,n){var r=Se(e),a=r.value,l=r.modelValue,u=r.options,i=de("check-tag-group"),o=_(function(){return[i.value]}),s=Ze(a,l,e.defaultValue,e.onChange),c=ue(s,2),d=c[0],v=c[1],f=function(m,w){var P=w.value;if(m)e.multiple?v(d.value.concat(P),{e:w.e,type:"check",value:P}):v([P],{e:w.e,type:"check",value:P});else{var I=[];e.multiple&&(I=d.value.filter(function(S){return S!==P})),v(I,{e:w.e,type:"uncheck",value:P})}},p=function(m){return n.slots.option?n.slots.option(m):n.slots.label?n.slots.label(m):m.label?Ae(m.label)?m.label(vt):m.label:m.content&&Ae(m.content)?m.content(vt):m.default&&Ae(m.default)?m.default(vt):m.value};return function(){return j("div",{class:o.value},[(u.value||[]).map(function(g){var m;return j(Ua,{key:g.value,value:g.value,checkedProps:e.checkedProps,uncheckedProps:e.uncheckedProps,checked:d.value.includes(g.value),onChange:f,disabled:g.disabled,size:g.size,"data-value":g.value},Uc(m=p(g))?m:{default:function(){return[m]}})})])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Gr=we(Ka);we(Ua);we(Yc);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Xr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gc(t){var e=De(),n=de(),r=Se(t),a=r.value,l=r.modelValue,u=r.onRemove,i=r.max,o=r.minCollapsedNum,s=r.size,c=r.tagProps,d=r.getDragProps,v=Ze(a,l,t.defaultValue||[],t.onChange),f=ue(v,2),p=f[0],g=f[1],m=W(),w=at(),P=un(),I=function(C){var x,E=nt(p.value),$=E.splice(C.index,1),A=ue($,1),N=A[0];g(E,yt(yt({trigger:"tag-remove"},C),{},{item:N})),(x=u.value)===null||x===void 0||x.call(u,yt(yt({},C),{},{item:N,trigger:"tag-remove",value:E}))},S=function(C){g([],{trigger:"clear",e:C.e})},k=function(C,x){var E,$,A=C?String(C).trim():"",N=i&&((E=p.value)===null||E===void 0?void 0:E.length)>=i.value,D=p.value;!N&&A&&(D=p.value instanceof Array?p.value.concat(String(A)):[A],g(D,{trigger:"enter",index:D.length-1,item:A,e:x.e})),t==null||($=t.onEnter)===null||$===void 0||$.call(t,D,yt(yt({},x),{},{inputValue:C}))},y=function(C){!p.value||!p.value.length||(m.value=C)},O=function(C,x){var E=x.e;if(!(!p.value||!p.value.length||E.key==="Process")){var $=/(Backspace|NumpadDelete)/i.test(E.code)||/(Backspace|NumpadDelete)/i.test(E.key);if(!C&&$){var A,N=p.value.length-1,D=p.value[N],T="backspace",L=p.value.slice(0,-1);g(L,{e:E,index:N,item:D,trigger:T}),(A=u.value)===null||A===void 0||A.call(u,{e:E,index:N,item:D,trigger:T,value:L})}m.value=C}},h=function(C){var x,E=C.displayNode,$=C.label,A=o.value?p.value.slice(0,o.value):p.value,N=E?[E]:(A==null||(x=A.map)===null||x===void 0?void 0:x.call(A,function(L,Y){var q,Z=e("tag",{params:{value:L}});return j(Gr,_e({key:"".concat(L).concat(Y),size:s.value,disabled:w.value,onClose:function(B){return I({e:B.e,index:Y})},closable:!P.value&&!w.value},(q=d.value)===null||q===void 0?void 0:q.call(d,Y,L),c.value),{default:function(){return[Z!=null?Z:L]}})}))||[];if([null,void 0,""].includes($)||N.unshift(j("div",{class:"".concat(n.value,"-tag-input__prefix"),key:"label"},[$])),A.length!==(p.value||[]).length){var D=p.value.length-A.length,T=e("collapsedItems",{params:{value:p.value,count:p.value.length-o.value,collapsedTags:p.value.slice(o.value,p.value.length),collapsedSelectedItems:p.value.slice(o.value,p.value.length),onClose:I}});N.push(T!=null?T:j(Gr,_e({key:"more",size:s.value},c.value),{default:function(){return["+",D]}}))}return N};return{tagValue:p,clearAll:S,onClose:I,onInnerEnter:k,onInputBackspaceKeyUp:y,onInputBackspaceKeyDown:O,renderLabel:h}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Xc(t){var e=t.disabled,n=t.readonly,r=t.onMouseenter,a=t.onMouseleave,l=W(!1),u=function(s){n||e||(l.value=!0,r==null||r(s))},i=function(s){n||e||(l.value=!1,a==null||a(s))};return{isHover:l,addHover:u,cancelHover:i}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function qc(t){var e=t.sortOnDraggable,n=t.onDragSort,r=t.onDragOverCheck,a=W(-1),l=W(null),u=W(null),i=Nn({nodeX:0,nodeWidth:0,mouseX:0}),o=function(p,g,m){if(p.preventDefault(),!(a.value===g||a.value===-1)){var w=p.target;if(!(r!=null&&r.targetClassNameRegExp&&!(r!=null&&r.targetClassNameRegExp.test(w.className)))){if(r!=null&&r.x&&w){if(!i.nodeWidth)return;var P=w.getBoundingClientRect(),I=P.x,S=P.width,k=I+S/2,y=p.clientX-(i.mouseX-i.nodeX),O=y+i.nodeWidth,h=!1;if(y>I&&y<I+S?h=y<k:h=O>k,!h)return}n==null||n({currentIndex:a.value,current:l,target:m,targetIndex:g}),a.value=g}}};if(!e)return{};function s(f,p,g){a.value=p,l.value=g;var m=f.target;if(r&&m){var w=m.getBoundingClientRect(),P=w.x,I=w.width;i.nodeX=P,i.nodeWidth=I,i.mouseX=f.clientX}}function c(){u.value=!0}function d(){u.value,u.value=!1,a.value=-1,l.value=null}function v(f,p){return e?{draggable:!0,onDragstart:function(m){s(m,f,p)},onDragover:function(m){o(m,f,p)},onDrop:function(){c()},onDragend:function(){d()}}:{}}return{onDragStart:s,onDragOver:o,onDrop:c,onDragEnd:d,getDragProps:v,dragging:a.value!==-1}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function qr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Jc=function(){return{NAME_CLASS:de("tag-input"),CLEAR_CLASS:de("tag-input__suffix-clear"),BREAK_LINE_CLASS:de("tag-input--break-line")}},Zc=ie({name:"TTagInput",props:ct({},dc),setup:function(e){var n=Jc(),r=n.NAME_CLASS,a=n.CLEAR_CLASS,l=n.BREAK_LINE_CLASS,u=Ht({CloseCircleFilledIcon:Il}),i=u.CloseCircleFilledIcon,o=at(),s=un(),c=Se(e),d=c.inputValue,v=c.inputProps,f=It(d,e.defaultInputValue,e.onInputChange,"inputValue"),p=ue(f,2),g=p[0],m=p[1],w=Se(e),P=w.excessTagsDisplayType,I=w.clearable,S=w.placeholder,k=Xc({readonly:s.value,disabled:o.value,onMouseenter:e.onMouseenter,onMouseleave:e.onMouseleave}),y=k.isHover,O=k.addHover,h=k.cancelHover,b=W(!1),C=jt(),x=C.classPrefix,E=W(!1),$=qc(ct(ct({},e),{},{sortOnDraggable:e.dragSort,onDragOverCheck:{x:!0,targetClassNameRegExp:new RegExp("^".concat(x.value,"-tag"))}})),A=$.getDragProps,N=pc(e),D=N.scrollToRight,T=N.onWheel,L=N.scrollToRightOnEnter,Y=N.scrollToLeftOnLeave,q=N.tagInputRef,Z=N.isScrollable,G=Gc(Nn(ct(ct({},Se(e)),{},{getDragProps:A}))),B=G.tagValue,R=G.onInnerEnter,V=G.onInputBackspaceKeyUp,U=G.onInputBackspaceKeyDown,M=G.clearAll,z=G.renderLabel,ee=G.onClose,ae=_(function(){var fe=!(tt(B.value)&&B.value.length);return[r.value,H(H(H({},l.value,P.value==="break-line"),"".concat(x.value,"-is-empty"),fe),"".concat(x.value,"-tag-input--with-tag"),!fe)]}),le=_(function(){var fe;return(fe=B.value)!==null&&fe!==void 0&&fe.length?"":S.value}),ve=_(function(){var fe;return Boolean(!s.value&&!o.value&&I.value&&y.value&&(((fe=B.value)===null||fe===void 0?void 0:fe.length)||g.value))}),ne=function(ce,se){var F,K;(F=se.e)===null||F===void 0||(K=F.preventDefault)===null||K===void 0||K.call(F),m("",{e:se.e,trigger:"enter"}),!b.value&&R(ce,se),Ot(function(){D(),b.value=!1})},Q=function(ce,se){var F,K;b.value=!0,(F=v.value)===null||F===void 0||(K=F.onCompositionstart)===null||K===void 0||K.call(F,ce,se)},te=function(ce,se){var F,K;b.value=!1,(F=v.value)===null||F===void 0||(K=F.onCompositionend)===null||K===void 0||K.call(F,ce,se)},me=function(ce){var se;o.value||(E.value=!0,q.value.focus(),(se=e.onClick)===null||se===void 0||se.call(e,ce))},ge=function(ce){var se;M(ce),m("",{e:ce.e,trigger:"clear"}),(se=e.onClear)===null||se===void 0||se.call(e,ce)},oe=function(){q.value.focus()},Ye=function(){q.value.blur()},ye=function(ce){O(ce),L()},lt=function(ce){h(ce),Y()},ot=function(ce,se){var F;E.value||(E.value=!0,(F=e.onFocus)===null||F===void 0||F.call(e,B.value,{e:se.e,inputValue:ce}))},gt=function(ce,se){var F;E.value=!1,m("",{e:se.e,trigger:"blur"}),(F=e.onBlur)===null||F===void 0||F.call(e,B.value,{e:se.e,inputValue:ce})},ut=function(ce,se){m(ce,ct(ct({},se),{},{trigger:"input"}))};return pe(function(){return Z.value},function(fe){if(e.excessTagsDisplayType==="scroll"){var ce="".concat(x.value,"-input__prefix"),se=q.value.$el.querySelector(".".concat(ce));fe?se.classList.add("".concat(ce,"--scrollable")):se.classList.remove("".concat(ce,"--scrollable"))}}),{CLEAR_CLASS:a,CloseCircleFilledIcon:i,tagValue:B,tInputValue:g,isHover:y,tagInputPlaceholder:le,showClearIcon:ve,tagInputRef:q,classPrefix:x,isFocused:E,focus:oe,blur:Ye,setTInputValue:m,onMouseEnter:ye,onMouseLeave:lt,onInnerFocus:ot,onInnerBlur:gt,onInnerChange:ut,addHover:O,cancelHover:h,onInputEnter:ne,onInnerEnter:R,onInputBackspaceKeyUp:V,onInputBackspaceKeyDown:U,renderLabel:z,onWheel:T,scrollToRightOnEnter:L,scrollToLeftOnLeave:Y,onClick:me,onClearClick:ge,onClose:ee,onInputCompositionstart:Q,onInputCompositionend:te,classes:ae,isDisabled:o,isRead
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Qc=we(Zc);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var es=["tips"];function Jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function He(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ts={label:"label",key:"key",children:"children"};function ns(t,e,n){var r=Se(t),a=r.inputValue,l=de(),u=W(),i=W(t.autofocus),o=It(a,t.defaultInputValue,t.onInputChange,"inputValue"),s=ue(o,2),c=s[0],d=s[1],v=at(),f=_(function(){return He(He({},ts),t.keys)}),p=_(function(){return t.value instanceof Array?t.value.map(function(y){return $e(y)?y[f.value.label]:y}):$e(t.value)?[t.value[f.value.label]]:[t.value]}),g=_(function(){return!p.value||!p.value.length?t.placeholder:""}),m=function(O,h){var b;if(h.trigger==="tag-remove"){var C;(C=h.e)===null||C===void 0||C.stopPropagation()}(b=t.onTagChange)===null||b===void 0||b.call(t,O,h)},w=function(O,h){h.trigger==="enter"||h.trigger==="blur"||d(O,{trigger:h.trigger,e:h.e})},P=function(O,h){var b,C,x=(b=n.value)===null||b===void 0?void 0:b.getOverlayState();x!=null&&x.hover||(i.value=!1,(C=t.onBlur)===null||C===void 0||C.call(t,t.value,He(He({},h),{},{tagInputValue:O})))},I=function(O,h){var b,C,x=(b=n.value)===null||b===void 0?void 0:b.getOverlayState();if(!(i.value||x!=null&&x.hover)){i.value=!0;var E=He(He({},h),{},{tagInputValue:O});(C=t.onFocus)===null||C===void 0||C.call(t,t.value,E)}},S=function(O,h){var b,C=He(He({},h),{},{tagInputValue:O});(b=t.onEnter)===null||b===void 0||b.call(t,t.value,C)},k=function(O){var h=He(He({},O.commonInputProps),{},{tagProps:t.tagProps,label:t.label,autoWidth:t.autoWidth,readonly:t.readonly,placeholder:g.value,minCollapsedNum:t.minCollapsedNum,collapsedItems:t.collapsedItems,tag:t.tag,value:p.value,valueDisplay:t.valueDisplay,inputValue:O.popupVisible&&O.allowInput?c.value:"",inputProps:He({readonly:!t.allowInput||t.readonly,inputClass:H({},"".concat(l.value,"-input--focused"),O.popupVisible)},t.inputProps),suffixIcon:!v.value&&t.loading?function(){return j(ga,{loading:!0,size:"small"},null)}:t.suffixIcon},t.tagInputProps),b=e.slots;b.tips;var C=cn(b,es);return j(Qc,_e({ref:u},h,{onInputChange:w,onChange:m,onClear:O.onInnerClear,onBlur:P,onEnter:S,onFocus:I}),C)};return{tags:p,tPlaceholder:g,tagInputRef:u,isMultipleFocus:i,multipleInputValue:c,renderSelectMultiple:k}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Zr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Qr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rs=1e3,as=0;function ls(t){var e=Se(t),n=e.popupProps,r=e.autoWidth,a=W(!1),l=at(),u=function(d,v){var f=v.scrollHeight>v.offsetHeight?as:0,p=v.offsetWidth+f>=d.offsetWidth?v.offsetWidth:d.offsetWidth,g={};return n.value&&ba(n.value.overlayInnerStyle)==="object"&&!n.value.overlayInnerStyle.width&&(g=n.value.overlayInnerStyle),Qr({width:"".concat(Math.min(p,rs),"px")},g)},i=function(d,v){if(!(l.value||t.readonly)){var f=v.trigger==="trigger-element-click"&&t.allowInput?!0:d;if(t.popupVisible!==f){var p;a.value=f,(p=t.onPopupVisibleChange)===null||p===void 0||p.call(t,f,v)}}},o=function(d,v){var f;return Qr({width:"".concat(Math.max(d.offsetWidth,v.offsetWidth),"px")},(f=n.value)===null||f===void 0?void 0:f.overlayInnerStyle)},s=_(function(){var c,d={},v=((c=n.value)===null||c===void 0?void 0:c.overlayInnerStyle)||{};return Ae(v)||$e(v)&&v.width?d=v:r.value?d=o:d=u,d});return{tOverlayInnerStyle:s,innerPopupVisible:a,onInnerPopupVisibleChange:i}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ea(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function et(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ea(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ea(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var is=function(){return{NAME_CLASS:de("select-input"),BASE_CLASS_BORDERLESS:de("select-input--borderless"),BASE_CLASS_MULTIPLE:de("select-input--multiple"),BASE_CLASS_POPUP_VISIBLE:de("select-input--popup-visible"),BASE_CLASS_EMPTY:de("select-input--empty")}},os=ie({name:"TSelectInput",props:et(et({},oc),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r=is(),a=r.NAME_CLASS,l=r.BASE_CLASS_BORDERLESS,u=r.BASE_CLASS_MULTIPLE,i=r.BASE_CLASS_POPUP_VISIBLE,o=r.BASE_CLASS_EMPTY,s=de(),c=De(),d=W(),v=W(),f=Se(e),p=f.multiple,g=f.value,m=f.popupVisible,w=f.borderless,P=ls(e),I=P.tOverlayInnerStyle,S=P.innerPopupVisible,k=P.onInnerPopupVisibleChange,y=fc(e,n,v),O=y.isSingleFocus,h=y.commonInputProps,b=y.onInnerClear,C=y.renderSelectSingle,x=ns(e,n,v),E=x.isMultipleFocus,$=x.tagInputRef,A=x.renderSelectMultiple,N=_(function(){return e.multiple?E.value:O.value}),D=_(function(){var Y;return["".concat(a.value),H(H(H(H({},u.value,p.value),l.value,w.value),i.value,(Y=m.value)!==null&&Y!==void 0?Y:S.value),o.value,g.value instanceof Array?!g.value.length:!g.value)]}),T=function(q){var Z,G=q.code||((Z=q.key)===null||Z===void 0?void 0:Z.trim());if(/(ArrowDown|ArrowUp)/.test(G)&&!m.value){var B,R=et(et({},n),{},{trigger:"trigger-element-focus"});(B=e.onPopupVisibleChange)===null||B===void 0||B.call(e,!0,R)}};pe([N],function(Y){var q=ue(Y,1),Z=q[0];m.value||(Z?d.value.addEventListener("keydown",T):d.value.removeEventListener("keydown",T))}),Je(function(){!m.value&&N&&d.value.addEventListener("keydown",T)}),on(function(){d.value.removeEventListener("keydown",T)});var L=function(q){var Z,G;(Z=q.e)===null||Z===void 0||Z.stopPropagation(),!(q.e.target.tabIndex>=0)&&e.multiple&&((G=$.value)===null||G===void 0||G.focus())};return{classPrefix:s,NAME_CLASS:a,innerPopupVisible:S,commonInputProps:h,tOverlayInnerStyle:I,selectInputRef:d,popupRef:v,classes:D,onInnerClear:b,renderTNodeJSX:c,renderSelectSingle:C,renderSelectMultiple:A,onOverlayClick:L,onInnerPopupVisibleChange:k}},render:function(){var e,n,r=this,a={visible:(e=this.popupVisible)!==null&&e!==void 0?e:this.innerPopupVisible},l=j(Va,_e({ref:"popupRef",trigger:((n=this.popupProps)===null||n===void 0?void 0:n.trigger)||"click",placement:"bottom-left"},a,{content:this.panel,hideEmptyPopup:!0},et(et({onVisibleChange:this.onInnerPopupVisibleChange,onOverlayClick:this.onOverlayClick},this.popupProps),{},{overlayInnerStyle:this.tOverlayInnerStyle})),et({default:function(){return[r.multiple?r.renderSelectMultiple({commonInputProps:r.commonInputProps,onInnerClear:r.onInnerClear,popupVisible:a.visible,allowInput:r.allowInput}):r.renderSelectSingle(a.visible)]}},et(et({},this.$slots),{},{content:this.$slots.panel}))),u=this.renderTNodeJSX("tips"),i=["".concat(this.classPrefix,"-input__tips"),"".concat(this.classPrefix,"-tips"),"".concat(this.classPrefix,"-is-").concat(this.status)];return j("div",{ref:"selectInputRef",class:this.classes},[l,u&&j("div",{class:i},[u])])}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var us=we(os);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var cs={checkAll:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,label:{type:String,default:""},title:{type:String,default:""},value:{type:[String,Number]}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var ss={checkAll:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},indeterminate:Boolean,label:{type:[String,Function]},lazyLoad:Boolean,name:{type:String,default:""},value:{type:[String,Number,Boolean]},onChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ya=Symbol("CheckboxGroupProvide");/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function vs(t,e,n,r){if(typeof window>"u")return null;if(!window||!window.IntersectionObserver)return n(),null;var a=null;try{a=new window.IntersectionObserver(function(l){var u=l[0];u.isIntersecting&&(n(),a.unobserve(t))},{rootMargin:"0px 0px ".concat(r,"px 0px"),root:e}),a.observe(t)}catch(l){console.error(l),n()}return a}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function fs(t,e){var n=W(),r=W(!0),a=function(){if(!!e.value){r.value=!1;var u=vs(t.value,null,function(){r.value=!0},0);n.value=u}};return Je(a),pe([e,t],a),on(function(){!e.value||n.value.unobserve(t.value)}),{showCheckbox:r}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ds(t){var e=function(l){var u=Kr.test(l.key)||Kr.test(l.code);if(u){l.preventDefault();var i=l.currentTarget.querySelector("input"),o=i.disabled;!o&&t(l)}},n=function(l){l.currentTarget.addEventListener("keydown",e)},r=function(l){l.currentTarget.removeEventListener("keydown",e)};return{onCheckboxFocus:n,onCheckboxBlur:r}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ta(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function na(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ta(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ta(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ga=ie({name:"TCheckbox",props:na(na({},ss),{},{needRipple:Boolean,stopLabelTrigger:Boolean,index:Number,data:Object}),setup:function(e){var n=W();e.needRipple&&ma(n);var r=ht(),a=r.STATUS,l=Se(e),u=l.checked,i=l.modelValue,o=l.lazyLoad,s=Ze(u,i,e.defaultChecked,e.onChange,"checked"),c=ue(s,2),d=c[0],v=c[1],f=St(Ya,void 0),p=W();pe(function(){return[e.name,f==null?void 0:f.value.name].join("_")},function(){var T=e.name||(f==null?void 0:f.value.name);T&&(p.value=T)},{immediate:!0});var g=W(!1),m=function(){var L=e.value,Y=e.checkAll;return Y?f==null?void 0:f.value.isCheckAll:f!=null&&f.value?f.value.checkedValues.includes(L):d.value};pe(function(){var T;return[d.value,f==null?void 0:f.value.isCheckAll,f==null||(T=f.value.checkedValues)===null||T===void 0?void 0:T.join(",")]},function(){g.value=m()},{immediate:!0});var w=_(function(){return!e.checkAll&&!g.value&&f!==null&&f!==void 0&&f.value.maxExceeded?!0:null}),P=_(function(){return f==null?void 0:f.value.disabled}),I=at({beforeDisabled:w,afterDisabled:P}),S=_(function(){return f==null?void 0:f.value.readonly}),k=un({afterReadonly:S}),y=W(!1);pe(function(){return[e.checkAll,e.indeterminate,f==null?void 0:f.value.indeterminate]},function(){y.value=e.checkAll?f==null?void 0:f.value.indeterminate:e.indeterminate},{immediate:!0});var O=de("checkbox"),h=W({});pe([g,I,y],function(){h.value=["".concat(O.value),H(H(H({},a.value.checked,g.value),a.value.disabled,I.value),a.value.indeterminate,y.value)]},{immediate:!0});var b=function(L){if(!k.value){var Y=!g.value;v(Y,{e:L}),f!=null&&f.value.handleCheckboxChange&&f.value.onCheckedChange({checked:Y,checkAll:e.checkAll,e:L,option:e})}},C=Nt(),x=function(L){e.stopLabelTrigger&&L.preventDefault()},E=fs(n,o),$=E.showCheckbox,A=ds(b),N=A.onCheckboxFocus,D=A.onCheckboxBlur;return function(){return j("label",{ref:n,class:h.value,tabindex:I.value?void 0:"0",onFocus:N,onBlur:D},[$.value?[j("input",{type:"checkbox",tabindex:"-1",class:"".concat(O.value,"__former"),disabled:I.value,readonly:k.value,indeterminate:y.value,name:p.value,value:e.value?e.value:void 0,checked:g.value,onChange:b,key:"input"},null),j("span",{class:"".concat(O.value,"__input"),key:"input-span"},null),j("span",{class:"".concat(O.value,"__label"),key:"label",onClick:x},[C("default","label")])]:null])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var ps={disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},lazyLoad:Boolean,max:{type:Number,default:void 0},name:{type:String,default:""},options:{type:Array},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var hs=ie({name:"TCheckboxGroup",props:ps,setup:function(e){var n=de("checkbox-group"),r=De(),a=Array.isArray,l=Se(e),u=l.value,i=l.modelValue,o=Ze(u,i,e.defaultValue,e.onChange),s=ue(o,2),c=s[0],d=s[1],v=W([]),f=_(function(){if(!a(c.value))return 0;var O=v.value.map(function(b){return b.value}),h=xn(c.value,O);return h.length}),p=_(function(){var O=v.value.filter(function(b){return!b.disabled&&!b.readonly&&!b.checkAll}).map(function(b){return b.value}),h=xn(O,c.value);return h.length===O.length}),g=_(function(){return!p.value&&f.value<v.value.length&&f.value!==0}),m=_(function(){return!Qt(e.max)&&c.value.length===e.max});_l(function(){if(!e.options)return[];v.value=e.options.map(function(O){return $e(O)?O:{label:String(O),value:O}})});var w=function(){for(var h=new Set,b=0,C=v.value.length;b<C;b++){var x=v.value[b];if(!x.checkAll&&!x.disabled&&!x.readonly&&(h.add(x.value),m.value))break}return nt(h)},P=function(h,b){var C=h?w():[];d(C,{e:b.e,type:h?"check":"uncheck",current:void 0,option:void 0})},I=function(h){var b=h.option.value;if(!a(c.value)){console.warn("TDesign CheckboxGroup Warn: `value` must be an array, instead of ".concat(ba(c.value)));return}var C=nt(c.value);if(h.checked)C.push(b);else{var x=C.indexOf(b);C.splice(x,1)}d(C,{e:h.e,current:h.option.value,option:h.option,type:h.checked?"check":"uncheck"})},S=function(h){var b=h.checked,C=h.checkAll,x=h.e;C?P(b,{e:x}):I(h)},k=Ca(),y=function(){var h=k("Checkbox"),b=[];return h==null||h.forEach(function(C){var x=C.props;!x||((x["check-all"]===""||x["check-all"]===!0)&&(x.checkAll=!0),b.push(x))}),b};return Zt(Ya,_(function(){return{name:e.name,isCheckAll:p.value,checkedValues:c.value||[],maxExceeded:m.value,disabled:e.disabled,readonly:e.readonly,indeterminate:g.value,handleCheckboxChange:I,onCheckedChange:S}})),function(){var O,h=null;if((O=e.options)!==null&&O!==void 0&&O.length){var b;h=(b=v.value)===null||b===void 0?void 0:b.map(function(x,E){var $;return j(Ga,_e({key:"".concat(x.value||"").concat(E),lazyLoad:e.lazyLoad},x,{index:E,checked:($=c.value)===null||$===void 0?void 0:$.includes(x.value),data:x}),null)})}else{var C=r("default");v.value=y(),h=C}return j("div",{class:n.value,role:"group","aria-label":"checkbox-group"},[h])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var gs=we(Ga),$v=we(hs);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function bs(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ms(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(s){throw s},f:a}}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 l,u=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var s=n.next();return u=s.done,s},e:function(s){i=!0,l=s},f:function(){try{u||n.return==null||n.return()}finally{if(i)throw l}}}}function ms(t,e){if(t){if(typeof t=="string")return ra(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ra(t,e):void 0}}function ra(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var fn=Symbol("selectProvide"),In=function(e,n){var r=n.value.get(e);return(r==null?void 0:r.label)||(e==null?void 0:e.toString())},ys=function(e,n){var r=[],a=bs(e),l;try{for(a.s();!(l=a.n()).done;){var u=l.value,i=In(u,n);i&&r.push(i)}}catch(o){a.e(o)}finally{a.f()}return r},Xa=function(e,n){var r=ya(e),a=r.indexOf(n);return a<0?r.push(n):r.splice(a,1),{value:r,isCheck:a<0}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function aa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function la(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aa(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Os(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}var kn=ie({name:"TOption",props:la(la({},cs),{},{createAble:Boolean,multiple:Boolean,index:Number,rowIndex:Number,trs:Map,scrollType:String,isVirtual:Boolean,bufferSize:Number,checkAll:Boolean}),emits:["row-mounted"],setup:function(e,n){var r=St(fn),a=at(),l=_(function(){return r.value.max!==0&&r.value.max<=r.value.selectValue.length}),u=_(function(){return a.value||e.multiple&&l.value&&!p.value&&!r.value.isCheckAll}),i=Nt(),o=de("select"),s=ht(),c=s.STATUS,d=s.SIZE,v=W(),f=W(!1),p=_(function(){return r.value.isCheckAll&&!e.disabled?!0:e.multiple?r.value.selectValue.includes(e.value):r.value.selectValue===e.value}),g=_(function(){return e.checkAll?r.value.indeterminate:!1}),m=_(function(){return["".concat(o.value,"-option"),[d.value[r.value.size]],H(H(H({},c.value.disabled,u.value),c.value.selected,p.value),"".concat(o.value,"-option__hover"),(f.value||r.value.hoverIndex===e.index)&&!u.value)]}),w=_(function(){return e.label||e.value}),P=function(k){if(!(e.disabled||u.value)){if(e.multiple){I(!p.value,{e:k}),k.preventDefault();return}if(e.createAble){var y,O;if((y=(O=r.value).handleCreate)===null||y===void 0||y.call(O,e.value),r.value.multiple){r.value.handleValueChange([].concat(nt(r.value.selectValue),[e.value]),{selectedOptions:r.value.getSelectedOptions(),trigger:"check",e:k});return}}var h=r.value.getSelectedOptions(e.value);r.value.handleValueChange(e.value,{option:h==null?void 0:h[0],selectedOptions:h,trigger:"check",e:k}),r.value.handlePopupVisibleChange(!1,{e:k})}},I=function(k,y){if(e.checkAll){r.value.onCheckAllChange(k);return}var O=Xa(r.value.selectValue,e.value),h=r.value.getSelectedOptions(O.value);r.value.handleValueChange(O.value,{option:h.find(function(b){return b.value===e.value}),selectedOptions:h,trigger:k?"check":"uncheck",e:y.e}),r.value.reserveKeyword||r.value.handlerInputChange("")};return Je(function(){var S=e.trs,k=e.rowIndex,y=e.isVirtual;y&&(S.set(k,v.value),n.emit("row-mounted"))}),on(function(){if(e.isVirtual){var S=e.trs,k=e.rowIndex;S.delete(k)}}),ma(v),function(){var S=i("default","content")||w.value;return j("li",{ref:v,class:m.value,title:e.title||"".concat(w.value),onMouseenter:function(){return f.value=!0},onMouseleave:function(){return f.value=!1},onClick:P},[r&&e.multiple?j(gs,{checked:p.value,disabled:u.value,onChange:I,indeterminate:g.value},Os(S)?S:{default:function(){return[S]}}):j("span",null,[S])])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Cs={divider:{type:Boolean,default:!0},label:{type:String,default:""}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ia(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ss(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ia(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ia(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var qa=ie({name:"TOptionGroup",props:Ss({},Cs),setup:function(e){var n=St(fn),r=de("select-option-group"),a=ht(),l=a.SIZE,u=De(),i=_(function(){return[r.value,l.value[n.value.size],H({},"".concat(r.value,"__divider"),e.divider)]});return function(){return j("li",{class:i.value},[j("div",{class:"".concat(r.value,"__header")},[e.label]),u("default")])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ne={autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},creatable:Boolean,disabled:{type:Boolean,default:void 0},empty:{type:[String,Function]},filter:{type:Function},filterable:Boolean,inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,loadingText:{type:[String,Function]},max:{type:Number,default:0},minCollapsedNum:{type:Number,default:0},multiple:Boolean,options:{type:Array},panelBottomContent:{type:[String,Function]},panelTopContent:{type:[String,Function]},placeholder:{type:String,default:void 0},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,prefixIcon:{type:Function},readonly:Boolean,reserveKeyword:Boolean,scroll:{type:Object},selectInputProps:{type:Object},showArrow:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},status:{type:String,default:"default",validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array],default:void 0},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},defaultValue:{type:[String,Number,Boolean,Object,Array],default:void 0},valueDisplay:{type:[String,Function]},valueType:{type:String,default:"value",validator:function(e){return e?["value","object"].includes(e):!0}},onBlur:Function,onChange:Function,onClear:Function,onCreate:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onPopupVisibleChange:Function,onRemove:Function,onSearch:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var ws=function(e){var n,r,a,l,u,i=_(function(){var b,C,x;return((b=e.scroll)===null||b===void 0?void 0:b.type)==="virtual"&&((C=e.options.value)===null||C===void 0?void 0:C.length)>(((x=e.scroll)===null||x===void 0?void 0:x.threshold)||100)}),o=((n=e.scroll)===null||n===void 0?void 0:n.type)==="virtual"?Vo({container:e.popupContentRef,data:e.options,fixedHeight:((r=e.scroll)===null||r===void 0?void 0:r.isFixedRowHeight)||!1,lineHeight:((a=e.scroll)===null||a===void 0?void 0:a.rowHeight)||28,bufferSize:((l=e.scroll)===null||l===void 0?void 0:l.bufferSize)||20,threshold:((u=e.scroll)===null||u===void 0?void 0:u.threshold)||100}):{},s=o.trs,c=s===void 0?null:s,d=o.visibleData,v=d===void 0?null:d,f=o.handleScroll,p=f===void 0?null:f,g=o.scrollHeight,m=g===void 0?null:g,w=o.translateY,P=w===void 0?null:w,I=o.handleRowMounted,S=I===void 0?null:I,k=-1,y=function(C){if(!!i.value){var x=C.target,E=x.scrollTop;Math.abs(k-E)>5?(p(),k=E):k=-1}};Je(function(){var b;(b=e.popupContentRef.value)===null||b===void 0||b.addEventListener("scroll",y)}),on(function(){var b;(b=e.popupContentRef.value)===null||b===void 0||b.removeEventListener("scroll",y)});var O=_(function(){return{position:"absolute",width:"1px",height:"1px",transition:"transform 0.2s",transform:"translate(0, ".concat(m.value,"px)"),"-ms-transform":"translate(0, ".concat(m.value,"px)"),"-moz-transform":"translate(0, ".concat(m.value,"px)"),"-webkit-transform":"translate(0, ".concat(m.value,"px)")}}),h=_(function(){return{transform:"translate(0, ".concat(P.value,"px)"),"-ms-transform":"translate(0, ".concat(P.value,"px)"),"-moz-transform":"translate(0, ".concat(P.value,"px)"),"-webkit-transform":"translate(0, ".concat(P.value,"px)")}});return{trs:c,scrollHeight:m,translateY:P,visibleData:v,handleRowMounted:S,isVirtual:i,cursorStyle:O,panelStyle:h}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Ps(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Et(t)}var xs=ie({name:"TSelectPanel",props:{inputValue:Ne.inputValue,panelTopContent:Ne.panelTopContent,panelBottomContent:Ne.panelBottomContent,empty:Ne.empty,creatable:Ne.creatable,loading:Ne.loading,loadingText:Ne.loadingText,multiple:Ne.multiple,filterable:Ne.filterable,filter:Ne.filter,scroll:Ne.scroll,size:Ne.size},setup:function(e,n){var r=n.expose,a=de("select"),l=De(),u=pl(),i=jt("select"),o=i.t,s=i.globalConfig,c=St(fn),d=W(null),v=_(function(){return c.value.popupContentRef.value}),f=_(function(){return e.creatable&&e.filterable&&e.inputValue}),p=_(function(){return c.value.displayOptions}),g=ws({scroll:e.scroll,popupContentRef:v,options:p}),m=g.trs,w=g.visibleData,P=g.handleRowMounted,I=g.isVirtual,S=g.panelStyle,k=g.cursorStyle,y=_(function(){return!p.value.length}),O=function(){return j("ul",{class:["".concat(a.value,"__create-option"),"".concat(a.value,"__list")]},[j(kn,{value:e.inputValue,label:"".concat(e.inputValue),createAble:!0,class:"".concat(a.value,"__create-option--special")},null)])},h=function(E){return j("ul",{class:"".concat(a.value,"__list")},[E.map(function($,A){var N,D;if($.group){var T;return j(qa,{label:$.group,divider:$.divider},Ps(T=h($.children))?T:{default:function(){return[T]}})}return j(kn,_e(pa($,"index","$index","className","tagName"),I.value?{rowIndex:$.$index,trs:m,scrollType:(N=e.scroll)===null||N===void 0?void 0:N.type,isVirtual:I.value,bufferSize:(D=e.scroll)===null||D===void 0?void 0:D.bufferSize,key:"".concat($.$index||"","_").concat(A)}:{key:"".concat(A,"_").concat($.value)},{index:A,multiple:e.multiple,onRowMounted:P}),$.slots)})])},b=_(function(){return{small:"s",medium:"m",large:"l"}[c.value.size]});r({innerRef:d,visibleData:w,isVirtual:I,displayOptions:p});var C=function(E,$){return j("div",{ref:d,class:["".concat(a.value,"__dropdown-inner"),"".concat(a.value,"__dropdown-inner--size-").concat(b.value)],style:$},[f.value&&O(),e.loading&&u("loadingText",{defaultNode:j("div",{class:"".concat(a.value,"__loading-tips")},[o(s.value.loadingText)])}),!e.loading&&y.value&&!f.value&&u("empty",{defaultNode:j("div",{class:"".concat(a.value,"__empty")},[o(s.value.empty)])}),!y.value&&!e.loading&&h(E)])};return{renderPanel:C,panelStyle:S,cursorStyle:k,isVirtual:I,displayOptions:p,visibleData:w,renderTNodeJSX:l}},render:function(){return this.isVirtual?j(Bt,null,[this.renderTNodeJSX("panelTopContent"),j("div",null,[j("div",{style:this.cursorStyle},null),this.renderPanel(this.visibleData,this.panelStyle)]),this.renderTNodeJSX("panelBottomContent")]):j(Bt,null,[this.renderTNodeJSX("panelTopContent"),this.renderPanel(this.displayOptions),this.renderTNodeJSX("panelBottomContent")])}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Xt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_s(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(s){throw s},f:a}}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 l,u=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var s=n.next();return u=s.done,s},e:function(s){i=!0,l=s},f:function(){try{u||n.return==null||n.return()}finally{if(i)throw l}}}}function _s(t,e){if(t){if(typeof t=="string")return oa(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oa(t,e):void 0}}function oa(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ua(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Te(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ua(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Is=function(e,n,r){var a=Ca(),l=W([]),u=_(function(){var c,d=0,v=((c=e.options)===null||c===void 0?void 0:c.map(function(x){var E=function(A){var N=n.value,D=N.value,T=N.label,L=N.disabled,Y=Te(Te({},A),{},{index:d,label:Tt(A,T),value:Tt(A,D),disabled:Tt(A,L)});return d++,Y};return x.group&&x.children?Te(Te({},x),{},{children:x.children.map(function($){return E($)})}):E(x)}))||[],f=a("Option"),p=a("OptionGroup");if(tt(p)){var g=Xt(p),m;try{for(g.s();!(m=g.n()).done;){var w,P=m.value,I=Te(Te({group:(w=P.props)===null||w===void 0?void 0:w.label},P.props),{},{children:[]}),S=a("Option",P.children);if(!!tt(S)){var k=Xt(S),y;try{for(k.s();!(y=k.n()).done;){var O=y.value;I.children.push(Te(Te({},O.props),{},{slots:O.children,index:d})),d++}}catch(x){k.e(x)}finally{k.f()}v.push(I)}}}catch(x){g.e(x)}finally{g.f()}}if(tt(f)){var h=Xt(f),b;try{for(h.s();!(b=h.n()).done;){var C=b.value;v.push(Te(Te({},C.props),{},{slots:C.children,index:d})),d++}}catch(x){h.e(x)}finally{h.f()}}return v}),i=_(function(){var c=[],d=function(f){var p=Xt(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;m.group?d(m.children):c.push(m)}}catch(w){p.e(w)}finally{p.f()}};return d(u.value),c}),o=_(function(){var c=new Map;return l.value.concat(i.value).forEach(function(d){c.set(d.value,d)}),c}),s=_(function(){if(e.onSearch&&e.filterable||!r.value||!(e.filterable||Ae(e.filter)))return u.value;var c=function(f){var p,g;return Ae(e.filter)?e.filter("".concat(r.value),f):((p=f.label)===null||p===void 0||(g=p.toLowerCase)===null||g===void 0?void 0:g.call(p).indexOf("".concat(r.value).toLowerCase()))>-1},d=[];return u.value.forEach(function(v){v.group&&v.children&&d.push(Te(Te({},v),{},{children:v.children.filter(c)})),c(v)&&d.push(v)}),d});return{options:u,optionsMap:o,optionsList:i,optionsCache:l,displayOptions:s}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function ks(t){var e=t.displayOptions,n=t.optionsList,r=t.innerPopupVisible,a=t.setInnerPopupVisible,l=t.selectPanelRef,u=t.isFilterable,i=t.isRemoteSearch,o=t.getSelectedOptions,s=t.setInnerValue,c=t.innerValue,d=t.popupContentRef,v=t.multiple,f=t.max,p=W(-1),g=W([]),m=W([]),w=de(),P=function(S){var k,y,O=e.value.length,h=p.value;switch(S.code){case"ArrowUp":S.preventDefault(),p.value===-1?h=0:p.value===0||p.value>e.value.length-1?h=O-1:h--,(k=n.value[h])!==null&&k!==void 0&&k.disabled&&h--,p.value=h;break;case"ArrowDown":S.preventDefault(),p.value===-1||p.value>=O-1?h=0:h++,(y=n.value[h])!==null&&y!==void 0&&y.disabled&&h++,p.value=h;break;case"Enter":if(p.value===-1)break;var b=l.value.isVirtual&&u.value&&m.value.length?m.value:i.value?n.value:g.value;if(b.length||(b=n.value),!r.value){a(!0,{e:S});break}if(v){var x;if(p.value===-1)return;var E=(x=b[p.value])===null||x===void 0?void 0:x.value;if(!E)return;var $=Xa(c.value,E);if(f>0&&$.value.length>f)return;var A=o($.value);s($.value,{option:A.find(function(N){return N.value==E}),selectedOptions:A,trigger:$.isCheck?"check":"uncheck",e:S}),g.value=[]}else{var C=o(b[p.value].value);s(b[p.value].value,{option:C==null?void 0:C[0],selectedOptions:o(b[p.value].value),trigger:"check",e:S}),a(!1,{e:S})}break;case"Escape":a(!1,{e:S});break}};return pe(r,function(I){I&&(p.value=-1,m.value=[],g.value=[])}),pe(p,function(I){var S,k=(S=l.value)===null||S===void 0||(S=S.innerRef)===null||S===void 0?void 0:S.querySelector(".".concat(w.value,"-select-option")).clientHeight,y=k*I;d.value.scrollTo({top:y,behavior:"smooth"})}),{hoverIndex:p,handleKeyDown:P,virtualFilteredOptions:m,filteredOptions:g}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var js=["overlayClassName"];function Ns(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Es(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(s){throw s},f:a}}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 l,u=!0,i=!1;return{s:function(){n=n.call(t)},n:function(){var s=n.next();return u=s.done,s},e:function(s){i=!0,l=s},f:function(){try{u||n.return==null||n.return()}finally{if(i)throw l}}}}function Es(t,e){if(t){if(typeof t=="string")return ca(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ca(t,e):void 0}}function ca(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function sa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ge(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sa(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sa(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var As=ie({name:"TSelect",props:Ge(Ge({},Ne),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r=n.slots,a=de(),l=at(),u=De(),i=de("select"),o=jt("select"),s=o.globalConfig,c=o.t,d=Se(e),v=d.popupVisible,f=d.inputValue,p=d.modelValue,g=d.value,m=It(f,e.defaultInputValue,e.onInputChange,"inputValue"),w=ue(m,2),P=w[0],I=w[1],S=Ze(g,p,e.defaultValue,e.onChange),k=ue(S,2),y=k[0],O=k[1],h=W(null),b=W(null),C=_(function(){var F,K,J;return{label:((F=e.keys)===null||F===void 0?void 0:F.label)||"label",value:((K=e.keys)===null||K===void 0?void 0:K.value)||"value",disabled:((J=e.keys)===null||J===void 0?void 0:J.disabled)||"disabled"}}),x=Is(e,C,P),E=x.optionsMap,$=x.optionsList,A=x.optionsCache,N=x.displayOptions,D=_(function(){return y.value===void 0?e.multiple?[]:void 0:e.valueType==="object"?e.multiple?y.value.map(function(F){return F[C.value.value]}):y.value[C.value.value]:y.value}),T=function(K,J){if(e.valueType==="object"){var re=C.value,he=re.value,Oe=re.label,Ce=function(bt){if(bt!==void 0){var Ut=E.value.get(bt);return H(H({},he,Tt(Ut,he)),Oe,Tt(Ut,Oe))}};K=e.multiple?K.map(function(Pe){return Ce(Pe)}):Ce(K)}K!==y.value&&O(K,Ge({selectedOptions:le(K)},J))},L=It(v,!1,function(F,K){var J;(J=e.onPopupVisibleChange)===null||J===void 0||J.call(e,F,K)},"popupVisible"),Y=ue(L,2),q=Y[0],Z=Y[1],G=_(function(){var F;return(F=!e.multiple&&q.value&&In(D.value,E)||e.placeholder)!==null&&F!==void 0?F:c(s.value.placeholder)}),B=_(function(){return e.multiple?ys(D.value,E):In(D.value,E)}),R=_(function(){var F=e.multiple&&tt(D.value)?D.value.map(function(re){var he;return{value:re,label:(he=E.value.get(re))===null||he===void 0?void 0:he.label}}):D.value,K={value:F,onClose:e.multiple?function(re){return M(re)}:function(){}};if(e.minCollapsedNum&&e.multiple){var J;return Ge(Ge({},K),{},{displayValue:F==null||(J=F.slice)===null||J===void 0?void 0:J.call(F,0,e.minCollapsedNum)})}return K}),V=_(function(){return Boolean(e.filterable||s.value.filterable||Ae(e.filter))}),U=_(function(){return Boolean((e.filterable||s.value.filterable)&&Ae(e.onSearch))}),M=function(K,J){var re;J&&J.stopPropagation();var he=ya(D.value),Oe=he[K];he.splice(K,1),T(he,{selectedOptions:le(he),trigger:"tag-remove",e:J}),(re=e.onRemove)===null||re===void 0||re.call(e,{value:Oe,data:E.value.get(Oe),e:J})},z=function(){var K;!P.value||((K=e.onCreate)===null||K===void 0||K.call(e,P.value),I(""))},ee=_(function(){var F;return(F=b.value)===null||F===void 0?void 0:F.popupRef.getOverlay()}),ae=_(function(){return $.value.filter(function(F){return!F.disabled&&!F["check-all"]&&!F.checkAll})}),le=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:D.value;return $.value.filter(function(J){if(!J.checkAll)return tt(K)?K.includes(J.value):K===J.value})},ve=ks({displayOptions:N,optionsList:$,innerPopupVisible:q,setInnerPopupVisible:Z,selectPanel
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var $s=we(As);we(kn);we(qa);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ms={append:{type:[String,Function]},prepend:{type:[String,Function]}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ds=ie({name:"TInputAdornment",inheritAttrs:!1,props:Ms,setup:function(e,n){var r=n.slots,a=de("input-adornment"),l=De(),u=function(o,s,c){var d,v=Ue(c)||zt(c);return!r[s]&&Ue(c)&&!c?null:(r[s]?r[s](null).length===1&&typeof r[s](null)[0].children=="string"?d=j("span",{class:"".concat(a.value,"__text")},[r[s](null)]):d=r[s](null):Ae(c)?d=c(o):d=v?j("span",{class:"".concat(a.value,"__text")},[c]):c,d&&j("span",{class:"".concat(a.value,"__").concat(s)},[d]))};return function(){var i=u(vt,"prepend",e.prepend),o=u(vt,"append",e.append),s=l("default")||[null],c=[a.value,H(H({},"".concat(a.value,"--prepend"),i),"".concat(a.value,"--append"),o)];return!i&&!o?s[0]:j("div",{class:c},[i,s[0],o])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ts=we(Ds);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Rs={current:{type:Number,default:void 0},modelValue:{type:Number,default:void 0},defaultCurrent:{type:Number,default:1},disabled:Boolean,foldedMaxPageBtn:{type:Number,default:5},maxPageBtn:{type:Number,default:10},pageEllipsisMode:{type:String,default:"mid",validator:function(e){return e?["mid","both-ends"].includes(e):!0}},pageSize:{type:Number,default:void 0},defaultPageSize:{type:Number,default:10},pageSizeOptions:{type:Array,default:function(){return[5,10,20,50]}},selectProps:{type:Object},showFirstAndLastPageBtn:Boolean,showJumper:Boolean,showPageNumber:{type:Boolean,default:!0},showPageSize:{type:Boolean,default:!0},showPreviousAndNextBtn:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return e?["small","medium"].includes(e):!0}},theme:{type:String,default:"default",validator:function(e){return e?["default","simple"].includes(e):!0}},total:{type:Number,default:0},totalContent:{type:[Boolean,Function],default:!0},onChange:Function,onCurrentChange:Function,onPageSizeChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Vs(t,e,n,r){var a=ht(),l=a.SIZE,u=a.STATUS,i=_(function(){var I=Math.ceil(t.total/n.value);return I>0?I:1}),o=_(function(){return["".concat(r.value),l.value[t.size],H(H({},u.value.disabled,t.disabled),"".concat(r.value,"-ie"),hl()<11)]}),s=_(function(){return["".concat(r.value,"__total")]}),c=_(function(){return["".concat(r.value,"__select")]}),d=_(function(){return["".concat(r.value,"__btn"),"".concat(r.value,"__btn-prev"),H({},u.value.disabled,t.disabled||e.value===1)]}),v=_(function(){return["".concat(r.value,"__btn"),"".concat(r.value,"__btn-next"),H({},u.value.disabled,t.disabled||e.value===i.value)]}),f=_(function(){return["".concat(r.value,"__pager")]}),p=_(function(){return["".concat(r.value,"__number"),"".concat(r.value,"__number--more"),H({},u.value.disabled,t.disabled)]}),g=_(function(){return["".concat(r.value,"__jump")]}),m=_(function(){return["".concat(r.value,"__input")]}),w=_(function(){return["".concat(r.value,"__select")]}),P=function(S){return["".concat(r.value,"__number"),H(H({},u.value.disabled,t.disabled),u.value.current,e.value===S)]};return{pageCount:i,paginationClass:o,totalClass:s,sizerClass:c,preBtnClass:d,nextBtnClass:v,btnWrapClass:f,btnMoreClass:p,jumperClass:g,jumperInputClass:m,simpleClass:w,getButtonClass:P}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Bs(t,e,n){var r=W(!1),a=W(!1),l=_(function(){return Math.ceil((t.foldedMaxPageBtn-1)/2)}),u=_(function(){return Math.floor((t.foldedMaxPageBtn-1)/2)}),i=_(function(){return 2+l.value<n.value}),o=_(function(){return e.value-1-u.value>n.value});return{prevMore:r,nextMore:a,curPageLeftCount:l,curPageRightCount:u,isPrevMoreShow:i,isNextMoreShow:o}}/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Fs=zt;function Ls(t){return Fs(t)&&t!=+t}var zs=Ls,Hs=["pageCount"],st=1,Ws=ie({name:"TPagination",props:Rs,setup:function(e){var n=ln(),r=n.emit,a=Se(e),l=a.modelValue,u=a.pageSize,i=a.current,o=De(),s=Ze(i,l,e.defaultCurrent,e.onCurrentChange,"current"),c=ue(s,2),d=c[0],v=c[1],f=It(u,e.defaultPageSize,e.onPageSizeChange,"pageSize"),p=ue(f,2),g=p[0],m=p[1],w=jt("pagination"),P=w.t,I=w.globalConfig,S=de("pagination"),k=Ht({PageFirstIcon:Jl,PageLastIcon:ei,ChevronLeftIcon:wa,ChevronRightIcon:Pa,ChevronLeftDoubleIcon:Tl,ChevronRightDoubleIcon:Ll,EllipsisIcon:Gl}),y=k.PageFirstIcon,O=k.PageLastIcon,h=k.ChevronLeftIcon,b=k.ChevronRightIcon,C=k.ChevronLeftDoubleIcon,x=k.ChevronRightDoubleIcon,E=k.EllipsisIcon,$=Vs(e,d,g,S),A=$.pageCount,N=cn($,Hs),D=Bs(e,A,d),T=D.prevMore,L=D.isPrevMoreShow,Y=D.curPageLeftCount,q=D.nextMore,Z=D.isNextMoreShow,G=D.curPageRightCount,B=W(d.value),R=_(function(){return A.value>e.maxPageBtn}),V=_(function(){var ve=e.pageSizeOptions,ne=ve.map(function(Q){return $e(Q)?Q:{label:P(I.value.itemsPerPage,{size:Q}),value:Number(Q)}});return ne.sort(function(Q,te){return Q.value-te.value})}),U=_(function(){return e.pageEllipsisMode==="mid"}),M=_(function(){var ve=[],ne,Q;if(R.value)if(L.value&&Z.value)ne=d.value-Y.value,Q=d.value+G.value;else{var te=U.value?2:1,me=U.value?A.value-1:A.value;L.value?ne=Math.min(d.value-1,A.value-e.foldedMaxPageBtn+1):ne=te,Z.value?Q=Math.max(d.value+1,e.foldedMaxPageBtn):Q=me}else ne=1,Q=A.value;for(var ge=ne;ge<=Q;ge++)ve.push(ge);return ve});pe(function(){return A.value},function(){d.value>A.value&&(d.value=1)}),pe(function(){return d.value},function(ve){return B.value=ve});var z=function(ne,Q){if(!e.disabled){var te=ne;if(ne<st?te=st:ne>A.value&&(te=A.value),d.value!==te){var me=d.value;if(Q=Q||{current:te,previous:me,pageSize:g.value},Q){var ge;v(te,Q),(ge=e.onChange)===null||ge===void 0||ge.call(e,Q)}else r("update:modelValue",te)}}},ee=function(ne){var Q={prevPage:function(){return z(d.value-1)},nextPage:function(){return z(d.value+1)},prevMorePage:function(){return z(Math.max(2,d.value-e.foldedMaxPageBtn))},nextMorePage:function(){return z(Math.min(d.value+e.foldedMaxPageBtn,A.value-1))}};Q[ne]()},ae=function(ne){if(!e.disabled){var Q=parseInt(ne,10),te=1;Q>0&&(te=Math.max(Math.ceil(e.total/Q),1));var me=!1;d.value>te&&(me=!0);var ge={current:me?te:d.value,previous:d.value,pageSize:Q};if(m(Q,ge),me)z(te,ge);else{var oe;(oe=e.onChange)===null||oe===void 0||oe.call(e,ge)}}},le=function(ne){var Q=Math.trunc(+ne);zs(Q)||(B.value=Q,z(Q))};return function(){var ve=e.total,ne=e.pageSizeOptions,Q=e.size,te=e.disabled,me=e.showPageSize;if(A.value<1)return null;var ge=j("div",{class:N.jumperClass.value},[P(I.value.jumpTo),j(Ts,{append:"/ ".concat(A.value," ").concat(P(I.value.page))},{default:function(){return[j(gu,{class:N.jumperInputClass.value,modelValue:B.value,"onUpdate:modelValue":function(ye){return B.value=ye},onBlur:le,onEnter:le,max:A.value,min:st,size:Q,disabled:te,theme:"normal",placeholder:""},null)]}})]);return j("div",{class:N.paginationClass.value},[o("totalContent",j("div",{class:N.totalClass.value},[P(I.value.total,{total:ve})])),me&&ne.length>0&&j($s,_e({size:Q,value:g,disabled:te,class:N.sizerClass.value,autoWidth:!0,onChange:ae,options:V.value},e.selectProps),null),e.showFirstAndLastPageBtn?j("div",{class:N.preBtnClass.value,onClick:function(){return z(1)},disabled:e.disabled||e.current===st},[j(y,null,null)]):null,e.showPreviousAndNextBtn?j("div",{class:N.preBtnClass.value,onClick:function(){return ee("prevPage")},disabled:te||d.value===st},[j(h,null,null)]):null,e.showPageNumber&&e.theme==="default"?j("ul",{class:N.btnWrapClass.value},[R.value&&U.value&&j("li",{class:N.getButtonClass(1),onClick:function(){return z(st)}},[st]),R.value&&L.value&&U.value?j("li",{class:N.btnMoreClass.value,onClick:function(){return ee("prevMorePage")},onMouseOver:function(){return T.value=!0},onMouseOut:function(){return T.value=!1}},[T.value?j(C,null,null):j(E,null,null)]):null,M.value.map(function(oe){return j("li",{class:N.getButtonClass(oe),key:oe,onClick:function
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Ks={disabled:{type:[Boolean,Object]},layout:{type:String,default:"horizontal",validator:function(e){return e?["horizontal","vertical"].includes(e):!0}},showCurrent:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},tips:{type:Object},variant:{type:String,default:"text",validator:function(e){return e?["text","outline"].includes(e):!0}},onChange:Function};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function va(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Us(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?va(Object(n),!0).forEach(function(r){H(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):va(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ys=ie({name:"TPaginationMini",props:Us({},Ks),setup:function(e){var n=de("pagination-mini"),r=Ht({ChevronLeftIcon:wa,RoundIcon:ii,ChevronRightIcon:Pa,ChevronUpIcon:xa,ChevronDownIcon:Sa}),a=r.ChevronLeftIcon,l=r.RoundIcon,u=r.ChevronRightIcon,i=r.ChevronUpIcon,o=r.ChevronDownIcon,s=_(function(){return $e(e.tips)?e.tips:e.tips===!0?{prev:"\u4E0A\u4E00\u9875",current:"\u5F53\u524D",next:"\u4E0B\u4E00\u9875"}:{}}),c=_(function(){return $e(e.disabled)?e.disabled:e.disabled===!0?{prev:!0,current:!0,next:!0}:{prev:!1,current:!1,next:!1}});return function(){var d=[n.value,H({},"".concat(n.value,"--outline"),e.variant==="outline")];return j("div",{class:d},[j(Dt,{title:s.value.prev,variant:e.variant,size:e.size,shape:"square",onClick:function(f){var p;return(p=e.onChange)===null||p===void 0?void 0:p.call(e,{e:f,trigger:"prev"})},icon:e.layout==="horizontal"?function(){return j(a,null,null)}:function(){return j(i,null,null)},class:"".concat(n.value,"__prev"),disabled:c.value.prev},null),e.showCurrent&&j(Dt,{title:s.value.current,variant:e.variant,size:e.size,shape:"square",onClick:function(f){var p;return(p=e.onChange)===null||p===void 0?void 0:p.call(e,{e:f,trigger:"current"})},icon:function(){return j(l,null,null)},class:"".concat(n.value,"__current"),disabled:c.value.current},null),j(Dt,{title:s.value.next,variant:e.variant,size:e.size,shape:"square",onClick:function(f){var p;return(p=e.onChange)===null||p===void 0?void 0:p.call(e,{e:f,trigger:"next"})},icon:e.layout==="horizontal"?function(){return j(u,null,null)}:function(){return j(o,null,null)},class:"".concat(n.value,"__next"),disabled:c.value.next},null)])}}});/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Mv=we(Ws);we(Ys);/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Gs=zn,Xs=$e,qs="Expected a function";function Js(t,e,n){var r=!0,a=!0;if(typeof t!="function")throw new TypeError(qs);return Xs(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Gs(t,e,{leading:r,maxWait:e,trailing:a})}var Zs=Js;/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/var Qs=fa;function ev(t,e,n){for(var r=-1,a=t.length;++r<a;){var l=t[r],u=e(l);if(u!=null&&(i===void 0?u===u&&!Qs(u):n(u,i)))var i=u,o=l}return o}var Ja=ev;function tv(t,e){return t>e}var nv=tv,rv=Ja,av=nv,lv=jn;function iv(t){return t&&t.length?rv(t,lv,av):void 0}var ov=iv;function uv(t,e){return t<e}var cv=uv,sv=Ja,vv=cv,fv=jn;function dv(t){return t&&t.length?sv(t,fv,vv):void 0}var pv=dv;function hv(t,e){for(var n,r=-1,a=t.length;++r<a;){var l=e(t[r]);l!==void 0&&(n=n===void 0?l:n+l)}return n}var gv=hv,bv=gv,mv=jn;function yv(t){return t&&t.length?bv(t,mv):0}var qt=yv,Dv=function(e,n){var r,a,l=W([]),u=W((((r=n.value.data)===null||r===void 0?void 0:r.length)||0)*(((a=n.value.scroll)===null||a===void 0?void 0:a.rowHeight)||50)),i=W(0),o=[],s=W(0),c=W(0),d=W([0,15]),v=_(function(){var y,O,h=n.value.scroll;return h?{bufferSize:h.bufferSize||10,isFixedRowHeight:(y=h.isFixedRowHeight)!==null&&y!==void 0?y:!1,rowHeight:h.rowHeight||47,threshold:h.threshold||100,type:h.type,fixedRows:(O=h.fixedRows)!==null&&O!==void 0?O:[0,0]}:{}}),f=_(function(){var y=n.value.data;return v.value.type==="virtual"&&v.value.threshold<y.length});function p(){for(var y,O,h=(y=(O=e.value)===null||O===void 0?void 0:O.scrollTop)!==null&&y!==void 0?y:0,b=v.value.fixedRows[0],C=[],x=0,E=-1,$=-1,A=0,N=0,D=n.value.data.length;N<D;N++){var T,L=(T=o[N])!==null&&T!==void 0?T:v.value.rowHeight;if(A=A+L,A>h&&E===-1&&(E=N,E-v.value.bufferSize>0&&(x=A-L-qt(C))),E===-1&&(C.push(L),C.length>v.value.bufferSize&&C.shift()),$===-1&&(A>s.value+h||N===n.value.data.length-1)&&($=N),E!==-1&&$!==-1)break}var Y=ov([E-v.value.bufferSize,0]),q=pv([$+v.value.bufferSize,n.value.data.length]),Z=qt(o.slice(0,Math.min(Y,b)));return{startIndex:Y,endIndex:q,translateY:x-Z}}var g=Zs(function(){var y=p(),O=y.startIndex,h=y.endIndex,b=y.translateY,C=v.value.fixedRows,x=ue(C,2),E=x[0],$=x[1],A=E?n.value.data.slice(0,E):[];E&&O<E&&(A=A.slice(0,O));var N=$?n.value.data.slice(n.value.data.length-$):[],D=h-n.value.data.length+1+($!=null?$:0);$&&D>0&&(N=N.slice(D)),d.value.join()!==[O,h].join()&&O>=0&&(u.value=b,l.value=A.concat(n.value.data.slice(O,h),N),d.value=[O,h])},100),m=function(O){var h;if(!(!f.value||!O||v.value.isFixedRowHeight||!e.value)){var b=((h=O.ref.value)===null||h===void 0?void 0:h.getBoundingClientRect().height)||v.value.rowHeight,C=O.data.VIRTUAL_SCROLL_INDEX;if(o[C]!==b){var x=b-o[C];o[C]=b,i.value=i.value+x}}},w=function(){!f.value||g()},P=function(O){var h=ue(O,1),b=h[0].contentRect,C=16;Math.abs(b.width-c.value)>C&&(e.value.scrollTop=0,u.value=0),c.value=b.width,s.value=b.height},I=function(O){O.forEach(function(h,b){h.VIRTUAL_SCROLL_INDEX=b})},S=function(O){var h=O.index,b=O.top,C=b===void 0?0:b,x=O.behavior,E=qt(o.slice(0,h+1))-C;e.value.scrollTo({top:E,behavior:x||"auto"})},k=function(O){if(S(O),!v.value.isFixedRowHeight)var h,b=(h=O.time)!==null&&h!==void 0?h:60,C=setTimeout(function(){S(O),clearTimeout(C)},b)};return An(_(function(){return f.value?e.value:void 0}),P),pe(function(){return[nt(n.value.data),v.value,f.value,e.value]},function(){if(!(!f.value||!e.value)){var y=n.value.data;if(I(y),s.value=e.value.getBoundingClientRect().height,o.length!==n.value.data.length){var O=Array.from(o);O.length=n.value.data.length,O.fill(v.value.rowHeight||47),o=O}i.value=qt(o),d.value=[0,0],g()}},{immediate:!0}),pe(function(){return s.value},function(){g()}),{visibleData:l,translateY:u,scrollHeight:i,isVirtualScroll:f,handleScroll:w,handleRowMounted:m,scrollToElement:k}};/**
|
||
|
* tdesign v1.9.9
|
||
|
* (c) 2024 tdesign
|
||
|
* @license MIT
|
||
|
*/function Tv(t){return gl(t)||bl(t)||ml(t)||yl()}export{Iv as A,gs as C,jv as E,Mv as P,$s as S,xv as T,zu as _,$v as a,Wu as b,Kr as c,zn as d,vs as e,It as f,kv as g,zc as h,Nv as i,Ev as j,Av as k,Dv as l,xn as m,Sa as n,_v as o,za as p,Va as q,Tv as r,Gr as s,Zs as t,Ro as u,nn as v,rn as w,Pn as x,wa as y,El as z};
|