tanxin-ui 1.4.6 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tanxin-ui.es.js
CHANGED
|
@@ -1114,16 +1114,16 @@ function or(e, t) {
|
|
|
1114
1114
|
function Co() {
|
|
1115
1115
|
return {
|
|
1116
1116
|
updateColor: (n, r, i) => {
|
|
1117
|
-
for (let
|
|
1118
|
-
n["--" + i + "-" +
|
|
1119
|
-
const u = mt(r, 6);
|
|
1120
|
-
i == "primary"
|
|
1117
|
+
for (let o = 1; o <= 10; o++)
|
|
1118
|
+
n["--" + i + "-" + o] = mt(r, o), n["--" + i + "-" + o + "-hsl"] = or(r, o);
|
|
1119
|
+
const u = mt(r, 6), s = de(u);
|
|
1120
|
+
i == "primary" ? (n["--primary-a"] = u, n["--primary-b"] = s.clone().lighten(10), n["--primary-c"] = s.clone().darken(10), n["--primary-d"] = s.clone().lighten(20), n["--primary-e"] = s.clone().lighten(40), n["--border-color-hover"] = "var(--primary-6)", n["--bg-color-selected"] = "var(--primary-6)", n["--bg-color-selected-light"] = "hsl(var(--primary-6-hsl) / 14%)", n["--primary-color"] = "var(--primary-6)", n["--primary-color-shadow"] = "hsl(var(--primary-6-hsl) / 20%)", n["--primary-color-shadow-secondary"] = "hsl(var(--primary-6-hsl) / 15%)") : i == "success" ? (n["--success-a"] = u, n["--success-b"] = s.clone().lighten(10), n["--success-c"] = s.clone().darken(10), n["--success-d"] = s.clone().lighten(20), n["--success-e"] = s.clone().lighten(45)) : i == "info" ? (n["--info-a"] = u, n["--info-b"] = s.clone().lighten(10), n["--info-c"] = s.clone().darken(10), n["--info-d"] = s.clone().lighten(20), n["--info-e"] = s.clone().lighten(45)) : i == "warning" ? (n["--warning-a"] = u, n["--warning-b"] = s.clone().lighten(10), n["--warning-c"] = s.clone().darken(10), n["--warning-d"] = s.clone().lighten(20), n["--warning-e"] = s.clone().lighten(40)) : i == "danger" && (n["--danger-a"] = u, n["--danger-b"] = s.clone().lighten(10), n["--danger-c"] = s.clone().darken(10), n["--danger-d"] = s.clone().lighten(20), n["--danger-e"] = s.clone().lighten(40));
|
|
1121
1121
|
},
|
|
1122
1122
|
initColor: (n, r) => {
|
|
1123
|
-
for (let
|
|
1124
|
-
document.body.style.setProperty("--" + r + "-" +
|
|
1125
|
-
const i = mt(n, 6);
|
|
1126
|
-
r == "primary"
|
|
1123
|
+
for (let s = 1; s <= 10; s++)
|
|
1124
|
+
document.body.style.setProperty("--" + r + "-" + s, mt(n, s)), document.body.style.setProperty("--" + r + "-" + s + "-hsl", or(n, s));
|
|
1125
|
+
const i = mt(n, 6), u = de(i);
|
|
1126
|
+
r == "primary" ? (document.body.style.setProperty("--primary-a", i), document.body.style.setProperty("--primary-b", u.clone().lighten(10)), document.body.style.setProperty("--primary-c", u.clone().darken(10)), document.body.style.setProperty("--primary-d", u.clone().lighten(20)), document.body.style.setProperty("--primary-e", u.clone().lighten(40)), document.body.style.setProperty("--border-color-hover", "var(--primary-6)"), document.body.style.setProperty("--bg-color-selected", "var(--primary-6)"), document.body.style.setProperty("--bg-color-selected-light", "hsl(var(--primary-6-hsl) / 14%)"), document.body.style.setProperty("--primary-color", "var(--primary-6)"), document.body.style.setProperty("--primary-color-shadow", "hsl(var(--primary-6-hsl) / 20%)"), document.body.style.setProperty("--primary-color-shadow-secondary", "hsl(var(--primary-6-hsl) / 15%)")) : r == "success" ? (document.body.style.setProperty("--success-a", i), document.body.style.setProperty("--success-b", u.clone().lighten(10)), document.body.style.setProperty("--success-c", u.clone().darken(10)), document.body.style.setProperty("--success-d", u.clone().lighten(20)), document.body.style.setProperty("--success-e", u.clone().lighten(45))) : r == "info" ? (document.body.style.setProperty("--info-a", i), document.body.style.setProperty("--info-b", u.clone().lighten(10)), document.body.style.setProperty("--info-c", u.clone().darken(10)), document.body.style.setProperty("--info-d", u.clone().lighten(20)), document.body.style.setProperty("--info-e", u.clone().lighten(45))) : r == "warning" ? (document.body.style.setProperty("--warning-a", i), document.body.style.setProperty("--warning-b", u.clone().lighten(10)), document.body.style.setProperty("--warning-c", u.clone().darken(10)), document.body.style.setProperty("--warning-d", u.clone().lighten(20)), document.body.style.setProperty("--warning-e", u.clone().lighten(40))) : r == "danger" && (document.body.style.setProperty("--danger-a", i), document.body.style.setProperty("--danger-b", u.clone().lighten(10)), document.body.style.setProperty("--danger-c", u.clone().darken(10)), document.body.style.setProperty("--danger-d", u.clone().lighten(20)), document.body.style.setProperty("--danger-e", u.clone().lighten(40)));
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
1129
|
}
|
package/dist/tanxin-ui.umd.js
CHANGED
|
@@ -5,7 +5,7 @@ ${Bn(i.join(`
|
|
|
5
5
|
`))}`),s}}:{type:r})}function yc(e){return qe("arrayOf",{type:Array,validator(n){let a="";const r=n.every(o=>(a=Nt(e,o,!0),a===!0));return r||Ee(`arrayOf - value validation error:
|
|
6
6
|
${Bn(a)}`),r}})}function wc(e){return qe("instanceOf",{type:e})}function xc(e){return qe("objectOf",{type:Object,validator(n){let a="";const r=Object.keys(n).every(o=>(a=Nt(e,n[o],!0),a===!0));return r||Ee(`objectOf - value validation error:
|
|
7
7
|
${Bn(a)}`),r}})}function Vc(e){const n=Object.keys(e),a=n.filter(o=>{var i;return!((i=e[o])===null||i===void 0||!i.required)}),r=qe("shape",{type:Object,validator(o){if(!Vt(o))return!1;const i=Object.keys(o);if(a.length>0&&a.some(s=>i.indexOf(s)===-1)){const s=a.filter(c=>i.indexOf(c)===-1);return Ee(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return i.every(s=>{if(n.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(Ee(`shape - shape definition does not include a "${s}" property. Allowed keys: "${n.join('", "')}".`),!1);const c=Nt(e[s],o[s],!0);return typeof c=="string"&&Ee(`shape - "${s}" property validation error:
|
|
8
|
-
${Bn(c)}`),c===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Nc=["name","validate","getter"],Cc=(()=>{var e;return(e=class{static get any(){return oc()}static get func(){return ic().def(this.defaults.func)}static get bool(){return sc().def(this.defaults.bool)}static get string(){return cc().def(this.defaults.string)}static get number(){return dc().def(this.defaults.number)}static get array(){return uc().def(this.defaults.array)}static get object(){return fc().def(this.defaults.object)}static get integer(){return hc().def(this.defaults.integer)}static get symbol(){return mc()}static get nullable(){return{type:null}}static extend(n){if(Lt(n))return n.forEach(u=>this.extend(u)),this;const{name:a,validate:r=!1,getter:o=!1}=n,i=Pl(n,Nc);if(Dt(this,a))throw new TypeError(`[VueTypes error]: Type "${a}" already defined`);const{type:s}=i;if(Rn(s))return delete i.type,Object.defineProperty(this,a,o?{get:()=>El(a,s,i)}:{value(...u){const d=El(a,s,i);return d.validator&&(d.validator=d.validator.bind(d,...u)),d}});let c;return c=o?{get(){const u=Object.assign({},i);return r?rt(a,u):qe(a,u)},enumerable:!0}:{value(...u){const d=Object.assign({},i);let f;return f=r?rt(a,d):qe(a,d),d.validator&&(f.validator=d.validator.bind(f,...u)),f},enumerable:!0},Object.defineProperty(this,a,c)}}).defaults={},e.sensibleDefaults=void 0,e.config=Ca,e.custom=gc,e.oneOf=vc,e.instanceOf=wc,e.oneOfType=bc,e.arrayOf=yc,e.objectOf=xc,e.shape=Vc,e.utils={validate:(n,a)=>Nt(a,n,!0)===!0,toType:(n,a,r=!1)=>r?rt(n,a):qe(n,a)},e})();function zl(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return(n=class extends Cc{static get sensibleDefaults(){return rn({},this.defaults)}static set sensibleDefaults(a){this.defaults=a!==!1?rn({},a!==!0?a:e):{}}}).defaults=rn({},e),n}class Fy extends zl(){}const ae=e=>{const n=e;return n.install=function(a){a.component(n.name,e)},e},Ta=(e,n)=>{const a=e;return a.install=function(r){r.config.globalProperties[n]=e},e},Re=e=>typeof e=="function",ge=Array.isArray,We=e=>typeof e=="string",Fl=e=>typeof e=="boolean",pc=e=>e!==null&&typeof e=="object",zt=e=>{const n=String(e);return!isNaN(+n)&&isFinite(+n)&&(typeof e=="number"||!/e/i.test(n))},Il=zl({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Il.extend([{name:"emptyBool",getter:!0,type:Boolean,default:void 0},{name:"strOrNumber",getter:!0,type:[String,Number],default:void 0},{name:"width",getter:!0,type:[String,Number],default:void 0},{name:"strOrVNode",getter:!0,type:null,default:void 0},{name:"vNode",getter:!0,type:null,default:void 0}]);const l=Il;l.oneOfType([l.string,l.number]);const _l=e=>e?e.$!==void 0:!1,Tc=e=>{if(e){if(pc(e))return e}else return{};const n={};return e.split(";").forEach(r=>{const[o,i]=r.split(":");i&&(n[o]=i)}),n},jl=Symbol("ConfigProviderContextKey"),$c=e=>{t.provide(jl,e)},on=()=>t.inject(jl,{rootPrefixCls:t.computed(()=>"t"),customStyles:t.computed(()=>{})});function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(e)}var kc=/^\s+/,Pc=/\s+$/;function re(e,n){if(e=e||"",n=n||{},e instanceof re)return e;if(!(this instanceof re))return new re(e,n);var a=Sc(e);this._originalInput=e,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.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=a.ok}re.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),a,r,o,i,s,c;return a=n.r/255,r=n.g/255,o=n.b/255,a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?c=o/12.92:c=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*s+.0722*c},setAlpha:function(n){return this._a=ql(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=Bl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=Bl(this._r,this._g,this._b),a=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+a+", "+r+"%, "+o+"%)":"hsva("+a+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Rl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Rl(this._r,this._g,this._b),a=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+a+", "+r+"%, "+o+"%)":"hsla("+a+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return Hl(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Dc(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},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(Te(this._r,255)*100)+"%",g:Math.round(Te(this._g,255)*100)+"%",b:Math.round(Te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%)":"rgba("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Wc[Hl(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var a="#"+Kl(this._r,this._g,this._b,this._a),r=a,o=this._gradientType?"GradientType = 1, ":"";if(n){var i=re(n);r="#"+Kl(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+a+",endColorstr="+r+")"},toString:function(n){var a=!!n;n=n||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!a&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return re(this.toString())},_applyModification:function(n,a){var r=n.apply(null,[this].concat([].slice.call(a)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Fc,arguments)},brighten:function(){return this._applyModification(Ic,arguments)},darken:function(){return this._applyModification(_c,arguments)},desaturate:function(){return this._applyModification(Lc,arguments)},saturate:function(){return this._applyModification(Ec,arguments)},greyscale:function(){return this._applyModification(zc,arguments)},spin:function(){return this._applyModification(jc,arguments)},_applyCombination:function(n,a){return n.apply(null,[this].concat([].slice.call(a)))},analogous:function(){return this._applyCombination(Hc,arguments)},complement:function(){return this._applyCombination(Rc,arguments)},monochromatic:function(){return this._applyCombination(Kc,arguments)},splitcomplement:function(){return this._applyCombination(Bc,arguments)},triad:function(){return this._applyCombination(Wl,[3])},tetrad:function(){return this._applyCombination(Wl,[4])}},re.fromRatio=function(e,n){if(Hn(e)=="object"){var a={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?a[r]=e[r]:a[r]=sn(e[r]));e=a}return re(e,n)};function Sc(e){var n={r:0,g:0,b:0},a=1,r=null,o=null,i=null,s=!1,c=!1;return typeof e=="string"&&(e=Gc(e)),Hn(e)=="object"&&(st(e.r)&&st(e.g)&&st(e.b)?(n=Oc(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):st(e.h)&&st(e.s)&&st(e.v)?(r=sn(e.s),o=sn(e.v),n=Mc(e.h,r,o),s=!0,c="hsv"):st(e.h)&&st(e.s)&&st(e.l)&&(r=sn(e.s),i=sn(e.l),n=Ac(e.h,r,i),s=!0,c="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=ql(a),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a}}function Oc(e,n,a){return{r:Te(e,255)*255,g:Te(n,255)*255,b:Te(a,255)*255}}function Rl(e,n,a){e=Te(e,255),n=Te(n,255),a=Te(a,255);var r=Math.max(e,n,a),o=Math.min(e,n,a),i,s,c=(r+o)/2;if(r==o)i=s=0;else{var u=r-o;switch(s=c>.5?u/(2-r-o):u/(r+o),r){case e:i=(n-a)/u+(n<a?6:0);break;case n:i=(a-e)/u+2;break;case a:i=(e-n)/u+4;break}i/=6}return{h:i,s,l:c}}function Ac(e,n,a){var r,o,i;e=Te(e,360),n=Te(n,100),a=Te(a,100);function s(d,f,x){return x<0&&(x+=1),x>1&&(x-=1),x<1/6?d+(f-d)*6*x:x<1/2?f:x<2/3?d+(f-d)*(2/3-x)*6:d}if(n===0)r=o=i=a;else{var c=a<.5?a*(1+n):a+n-a*n,u=2*a-c;r=s(u,c,e+1/3),o=s(u,c,e),i=s(u,c,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function Bl(e,n,a){e=Te(e,255),n=Te(n,255),a=Te(a,255);var r=Math.max(e,n,a),o=Math.min(e,n,a),i,s,c=r,u=r-o;if(s=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(n-a)/u+(n<a?6:0);break;case n:i=(a-e)/u+2;break;case a:i=(e-n)/u+4;break}i/=6}return{h:i,s,v:c}}function Mc(e,n,a){e=Te(e,360)*6,n=Te(n,100),a=Te(a,100);var r=Math.floor(e),o=e-r,i=a*(1-n),s=a*(1-o*n),c=a*(1-(1-o)*n),u=r%6,d=[a,s,i,i,c,a][u],f=[c,a,a,s,i,i][u],x=[i,i,c,a,a,s][u];return{r:d*255,g:f*255,b:x*255}}function Hl(e,n,a,r){var o=[Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Dc(e,n,a,r,o){var i=[Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16)),Qe(Yl(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function Kl(e,n,a,r){var o=[Qe(Yl(r)),Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16))];return o.join("")}re.equals=function(e,n){return!e||!n?!1:re(e).toRgbString()==re(n).toRgbString()},re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Lc(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.s-=n/100,a.s=Kn(a.s),re(a)}function Ec(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.s+=n/100,a.s=Kn(a.s),re(a)}function zc(e){return re(e).desaturate(100)}function Fc(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.l+=n/100,a.l=Kn(a.l),re(a)}function Ic(e,n){n=n===0?0:n||10;var a=re(e).toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(n/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(n/100)))),a.b=Math.max(0,Math.min(255,a.b-Math.round(255*-(n/100)))),re(a)}function _c(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.l-=n/100,a.l=Kn(a.l),re(a)}function jc(e,n){var a=re(e).toHsl(),r=(a.h+n)%360;return a.h=r<0?360+r:r,re(a)}function Rc(e){var n=re(e).toHsl();return n.h=(n.h+180)%360,re(n)}function Wl(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var a=re(e).toHsl(),r=[re(e)],o=360/n,i=1;i<n;i++)r.push(re({h:(a.h+i*o)%360,s:a.s,l:a.l}));return r}function Bc(e){var n=re(e).toHsl(),a=n.h;return[re(e),re({h:(a+72)%360,s:n.s,l:n.l}),re({h:(a+216)%360,s:n.s,l:n.l})]}function Hc(e,n,a){n=n||6,a=a||30;var r=re(e).toHsl(),o=360/a,i=[re(e)];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(re(r));return i}function Kc(e,n){n=n||6;for(var a=re(e).toHsv(),r=a.h,o=a.s,i=a.v,s=[],c=1/n;n--;)s.push(re({h:r,s:o,v:i})),i=(i+c)%1;return s}re.mix=function(e,n,a){a=a===0?0:a||50;var r=re(e).toRgb(),o=re(n).toRgb(),i=a/100,s={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return re(s)},re.readability=function(e,n){var a=re(e),r=re(n);return(Math.max(a.getLuminance(),r.getLuminance())+.05)/(Math.min(a.getLuminance(),r.getLuminance())+.05)},re.isReadable=function(e,n,a){var r=re.readability(e,n),o,i;switch(i=!1,o=Xc(a),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i},re.mostReadable=function(e,n,a){var r=null,o=0,i,s,c,u;a=a||{},s=a.includeFallbackColors,c=a.level,u=a.size;for(var d=0;d<n.length;d++)i=re.readability(e,n[d]),i>o&&(o=i,r=re(n[d]));return re.isReadable(e,r,{level:c,size:u})||!s?r:(a.includeFallbackColors=!1,re.mostReadable(e,["#fff","#000"],a))};var $a=re.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Wc=re.hexNames=qc($a);function qc(e){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[e[a]]=a);return n}function ql(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Te(e,n){Yc(e)&&(e="100%");var a=Uc(e);return e=Math.min(n,Math.max(0,parseFloat(e))),a&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Kn(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function Yc(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Uc(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Qe(e){return e.length==1?"0"+e:""+e}function sn(e){return e<=1&&(e=e*100+"%"),e}function Yl(e){return Math.round(parseFloat(e)*255).toString(16)}function Ul(e){return Ye(e)/255}var et=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",a="(?:"+n+")|(?:"+e+")",r="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?",o="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?";return{CSS_UNIT:new RegExp(a),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function st(e){return!!et.CSS_UNIT.exec(e)}function Gc(e){e=e.replace(kc,"").replace(Pc,"").toLowerCase();var n=!1;if($a[e])e=$a[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a;return(a=et.rgb.exec(e))?{r:a[1],g:a[2],b:a[3]}:(a=et.rgba.exec(e))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=et.hsl.exec(e))?{h:a[1],s:a[2],l:a[3]}:(a=et.hsla.exec(e))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=et.hsv.exec(e))?{h:a[1],s:a[2],v:a[3]}:(a=et.hsva.exec(e))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=et.hex8.exec(e))?{r:Ye(a[1]),g:Ye(a[2]),b:Ye(a[3]),a:Ul(a[4]),format:n?"name":"hex8"}:(a=et.hex6.exec(e))?{r:Ye(a[1]),g:Ye(a[2]),b:Ye(a[3]),format:n?"name":"hex"}:(a=et.hex4.exec(e))?{r:Ye(a[1]+""+a[1]),g:Ye(a[2]+""+a[2]),b:Ye(a[3]+""+a[3]),a:Ul(a[4]+""+a[4]),format:n?"name":"hex8"}:(a=et.hex3.exec(e))?{r:Ye(a[1]+""+a[1]),g:Ye(a[2]+""+a[2]),b:Ye(a[3]+""+a[3]),format:n?"name":"hex"}:!1}function Xc(e){var n,a;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),a=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),a!=="small"&&a!=="large"&&(a="small"),{level:n,size:a}}const Wn=2,Gl=.16,Zc=.05,Jc=.05,Qc=.15,cn=5,ed=4,Xl=function(e,n,a){let r;return e>=60&&e<=240?r=a?e-Wn*n:e+Wn*n:r=a?e+Wn*n:e-Wn*n,r<0?r+=360:r>=360&&(r-=360),Math.round(r)},Zl=function(e,n,a){let r;return a?r=e-Gl*n:n===ed?r=e+Gl:r=e+Zc*n,r>1&&(r=1),a&&n===cn&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))},Jl=function(e,n,a){let r;return a?r=e+Jc*n:r=e-Qc*n,r>1&&(r=1),Number(r.toFixed(2))},td=function(e){const n=e[0],a=e[1],r=e[2];let o=0,i=0,s=0;const c=parseInt((n/60%6).toString()),u=n/60-c,d=r*(1-a),f=r*(1-u*a),x=r*(1-(1-u)*a);switch(c){case 0:o=r,i=x,s=d;break;case 1:o=f,i=r,s=d;break;case 2:o=d,i=r,s=x;break;case 3:o=d,i=f,s=r;break;case 4:o=x,i=d,s=r;break;case 5:o=r,i=d,s=f;break}return o=parseInt((o*255).toString()),i=parseInt((i*255).toString()),s=parseInt((s*255).toString()),[o,i,s]};function Ql(e){let n=e.trim().replace("#","");return/^[0-9a-fA-F]{3}$/.test(n)&&(n=n[0].repeat(2)+n[1].repeat(2)+n[2].repeat(2)),/^[0-9a-fA-F]{6}$/.test(n)?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:[255,255,255]}function er(e){let n=0,a=0,r=0;const o=e[0],i=e[1],s=e[2];e.sort(function(d,f){return d-f});const c=e[2],u=e[0];return r=c/255,c===0?a=0:a=1-u/c,c===u?n=0:c===o&&i>=s?n=60*((i-s)/(c-u))+0:c===o&&i<s?n=60*((i-s)/(c-u))+360:c===i?n=60*((s-o)/(c-u))+120:c===s&&(n=60*((o-i)/(c-u))+240),[n,a,r]}function nd(e){let n=e[0].toString(16),a=e[1].toString(16),r=e[2].toString(16);return n.length==1&&(n="0"+n),a.length==1&&(a="0"+a),r.length==1&&(r="0"+r),"#"+n+a+r}function tt(e,n){const a=n<=6,r=Ql(e),o=er(r),i=a?cn+1-n:n-cn-1,s=td([Xl(o[0],i,a),Zl(o[1],i,a),Jl(o[2],i,a)]);return nd(s)}function tr(e,n){const a=n<=6,r=Ql(e),o=er(r),i=a?cn+1-n:n-cn-1;return re({h:Xl(o[0],i,a),s:Zl(o[1],i,a),v:Jl(o[2],i,a)}).toHslString().replace(/hsl\((.*)\)/,"$1").replace(/,/g," ")}function ad(){return{updateColor:(a,r,o)=>{for(let s=1;s<=10;s++)a["--"+o+"-"+s]=tt(r,s),a["--"+o+"-"+s+"-hsl"]=tr(r,s);const i=tt(r,6);o=="primary"&&(a["--primary-a"]=i,a["--primary-b"]="lighten("+i+", 10%);",a["--primary-c"]="darken("+i+", 10%);",a["--primary-d"]="lighten("+i+", 20%);",a["--primary-e"]="lighten("+i+", 40%);",a["--border-color-hover"]="var(--primary-6)",a["--bg-color-selected"]="var(--primary-6)",a["--bg-color-selected-light"]="hsl(var(--primary-6-hsl) / 14%)",a["--primary-color"]="var(--primary-6)",a["--primary-color-shadow"]="hsl(var(--primary-6-hsl) / 20%)",a["--primary-color-shadow-secondary"]="hsl(var(--primary-6-hsl) / 15%)")},initColor:(a,r)=>{for(let i=1;i<=10;i++)document.body.style.setProperty("--"+r+"-"+i,tt(a,i)),document.body.style.setProperty("--"+r+"-"+i+"-hsl",tr(a,i));const o=tt(a,6);r=="primary"&&(document.body.style.setProperty("--primary-a",o),document.body.style.setProperty("--primary-b","lighten("+o+", 10%);"),document.body.style.setProperty("--primary-c","darken("+o+", 10%);"),document.body.style.setProperty("--primary-d","lighten("+o+", 20%);"),document.body.style.setProperty("--primary-e","lighten("+o+", 40%);"),document.body.style.setProperty("--border-color-hover","var(--primary-6)"),document.body.style.setProperty("--bg-color-selected","var(--primary-6)"),document.body.style.setProperty("--bg-color-selected-light","hsl(var(--primary-6-hsl) / 14%)"),document.body.style.setProperty("--primary-color","var(--primary-6)"),document.body.style.setProperty("--primary-color-shadow","hsl(var(--primary-6-hsl) / 20%)"),document.body.style.setProperty("--primary-color-shadow-secondary","hsl(var(--primary-6-hsl) / 15%)"))}}}const ld={rootPrefixCls:l.string.def("t"),theme:l.string.def("light"),colors:{type:Object}},nr=ae(t.defineComponent({name:"TConfigProvider",props:ld,setup(e,{slots:n}){const a=t.computed(()=>{const i={},s=ad();if(e.colors!=null)for(const c in e.colors)e.colors[c]&&s.updateColor(i,e.colors[c],c);return i}),r=t.computed(()=>[{[`theme-${e.theme}`]:e.theme!="light"}]),o={rootPrefixCls:t.computed(()=>e.rootPrefixCls),customStyles:t.computed(()=>a.value)};return $c(o),()=>{var i;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:r.value,style:a.value},[(i=n.default)==null?void 0:i.call(n)])])}}}));function te(e,n){const a=on(),r=(s,c)=>{const u=c||a.rootPrefixCls.value;return s?`${u}-${s}`:`${u}`},o=t.computed(()=>r(e,n==null?void 0:n.prefixCls));return{configProvider:a,prefixCls:o,rootPrefix:t.computed(()=>a.rootPrefixCls.value)}}const ue=typeof window<"u",ar=["primary","info","success","warning","danger","error","blue","green","red","yellow","pink","magenta","volcano","orange","gold","lime","cyan","geekblue","purple"],ne=e=>{let n=String(e);return/^[\-]?(\d|\.)+$/.test(n)&&(n+="px"),n},le=e=>{let n=String(e);if(n=n.replace("pt","").replace("px",""),/^[\-]?(\d|\.)+$/.test(n))return parseFloat(n)},Ue=e=>{const n=String(e).trim();if(/^[\-]?(\d|\.)+$/.test(n))return parseFloat(n)};function rd(e=[]){const n=[];return e.forEach(a=>{ge(a)?n.push(...a):a.type===t.Fragment?n.push(...a.children):n.push(a)}),n}function od(e){return e&&(e.type===Comment||e.type===t.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function id(e){return e!=null&&e!==""}function Ft(e=[],n=!0){const a=Array.isArray(e)?e:[e],r=[];return a.forEach(o=>{Array.isArray(o)?r.push(...Ft(o,n)):o&&o.type===t.Fragment?r.push(...Ft(o.children,n)):o&&t.isVNode(o)?n&&od(o)||r.push(o):id(o)&&r.push(o)}),r}function sd(){return!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)}function Ve(e,n,a="YYYY-MM-DD"){return!e&&!n?!0:!e||!n?!1:e.format(a)==n.format(a)}function Ze(e,n){if(!e&&!n)return!0;if(!e||!n)return!1;let a=e.week(),r=n.week();return e.day()==0&&a--,n.day()==0&&r--,a==0&&(a=52),r==0&&(r=52),a==r}function lr(e){return e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()}).trim()}function cd(){return ue?document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight):!1}function dd(e){const n=e/1048576,a=(e-n*1024*1024)/1024;return`${n?n+" m":""}${a?a+" k":""}`}function ud(e,n){var i;let a=e,r="",o=0;do o++,a=a.parent,r=((i=a==null?void 0:a.type)==null?void 0:i.name)??"";while(a&&(!r||r.indexOf(n)<0)&&o<20);if(!(o>=20))return a}function qn(e){let n=0,a;for(let r=0;r<e.length;r++)a=e.charCodeAt(r),a>=0&&a<=128?n+=1:n+=2;return n}function rr(e,n,a){if(e.replace(/[\u4e00-\u9fa5]/g,"**").length<=a)return e;let r=0,o="";for(let i=n;i<e.length&&(/[\u4e00-\u9fa5]/.test(e[i])?r+=2:r+=1,!(r>a));i++)o+=e[i];return o}async function fd(e,n="download"){if(!ue)return Promise.reject();try{const r=await(await fetch(e)).blob();if(!r)return Promise.reject();const o=URL.createObjectURL(r),i=document.createElement("a");return i.setAttribute("href",o),i.setAttribute("download",n),i.click(),URL.revokeObjectURL(o),Promise.resolve()}catch(a){return Promise.reject(a)}}function we(e,n){if(!(zt(e)&&n&&e===0))return e}function Ce(e,n,a){const o=n.replace(/\[(\w+)\]/g,".$1").split(".");let i=e;for(const s in o)i=i[o[s]]??void 0;return we(i,a)}function Be(e,n,a){const o=n.replace(/\[(\w+)\]/g,".$1").split(".");let i=e;for(let s=0;s<o.length-1;s++)i.hasOwnProperty(o[s])||(i[o[s]]={}),i=i[o[s]];i[o[o.length-1]]=a}const hd={color:l.string,size:l.oneOfType([l.string,l.number]),spin:l.bool.def(!1),rotate:l.oneOfType([l.string,l.number]),prefixCls:l.string},dn=t.defineComponent({name:"TIcon",props:hd,setup(e,{slots:n}){const{prefixCls:a}=te("icon",e),r=t.computed(()=>[a.value,{[`${a.value}-spin`]:e.spin}]),o=t.computed(()=>{const i={};return e.color&&(i.color=e.color),e.size&&(i.fontSize=ne(e.size)),e.rotate&&(i.transform=`rotate(${e.rotate}deg)`),i});return()=>{var i;return t.createVNode("i",{style:o.value,class:r.value},[(i=n.default)==null?void 0:i.call(n)])}}}),$e=ae(dn),md={to:{type:[Object,String]},href:{type:[Object,String]},type:l.oneOf(["primary","success","warning","danger","info","default"]).def("default"),disabled:l.bool.def(!1),underline:l.bool.def(!1),isLight:l.bool.def(!1)},Yn=ae(t.defineComponent({name:"TLink",inheritAttrs:!1,props:md,setup(e,{slots:n,attrs:a}){const{prefixCls:r}=te("link",e),o=t.computed(()=>[r.value,{[`${r.value}-${e.type}`]:e==null?void 0:e.type,"is-disabled":e==null?void 0:e.disabled,"is-underlined":e==null?void 0:e.underline,"is-light":e==null?void 0:e.isLight}]),i=t.computed(()=>!(!e.to||typeof e.to=="string"&&(e.to.startsWith("http://")||e.to.startsWith("https://")||e.to.startsWith("#")))),s=t.computed(()=>e.disabled?void 0:e.href?e.href:e.to);return()=>{var c;return i.value?t.createVNode(nc.RouterLink,t.mergeProps(a,{class:o.value,to:s.value}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n)]}}):t.createVNode("a",t.mergeProps(a,{class:o.value,href:s.value,rel:"noopener norefferrer"}),[(c=n.default)==null?void 0:c.call(n)])}}}));function or(e){var a;let n=((a=e==null?void 0:e.vnode)==null?void 0:a.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n}const ir=t.defineComponent({name:"SearchOutline",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[t.createVNode("path",{d:"M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null),t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M338.29 338.29L448 448"},null)])}}),gd=t.defineComponent({name:"Reset",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createVNode("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10z",fill:"currentColor"},null)])}}),Un=t.defineComponent({name:"AddOutline",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null),t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null)])}}),vd=t.defineComponent({name:"Edit20Regular",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[t.createVNode("g",{fill:"none"},[t.createVNode("path",{d:"M13.245 2.817a2.783 2.783 0 0 1 4.066 3.796l-.13.14l-9.606 9.606a2.001 2.001 0 0 1-.723.462l-.165.053l-4.055 1.106a.5.5 0 0 1-.63-.535l.016-.08l1.106-4.054c.076-.28.212-.54.398-.76l.117-.128l9.606-9.606zm-.86 2.275L4.346 13.13a1 1 0 0 0-.215.321l-.042.123l-.877 3.21l3.212-.875a1 1 0 0 0 .239-.1l.107-.072l.098-.085l8.038-8.04l-2.521-2.52zm4.089-1.568a1.783 1.783 0 0 0-2.402-.11l-.12.11l-.86.86l2.52 2.522l.862-.86a1.783 1.783 0 0 0 .11-2.402l-.11-.12z",fill:"currentColor"},null)])])}});function bd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}let Ct;const yd={prefixCls:l.string,type:l.oneOf(["primary","success","warning","danger","info","default"]).def("default"),nativeType:{type:String,default:"button"},light:l.bool.def(!1),ghost:l.bool.def(!1),dashed:l.bool.def(!1),icon:l.string.def(void 0),long:l.bool.def(!1),text:l.bool.def(!1),disabled:l.bool.def(!1),circle:l.bool.def(!1),round:l.bool.def(!1),square:l.bool.def(!1),loading:l.bool.def(!1),bg:l.bool.def(!1),size:l.oneOf(["xs","sm","md","lg","xl"]).def("md"),height:l.oneOfType([l.string,l.number]),radius:l.oneOfType([l.string,l.number]),color:l.string,showWave:l.bool.def(!0)},pt=ae(t.defineComponent({name:"TButton",components:{TIcon:$e},inheritAttrs:!1,props:yd,setup(e,{slots:n,attrs:a}){const{prefixCls:r,rootPrefix:o}=te("btn",e),i=t.ref(!1),s=t.ref(null),c=t.ref(null),u=t.ref(null),d=t.ref((e==null?void 0:e.disabled)??!1),f=t.ref(!n.default),x=t.computed(()=>({[`${o.value}-m-r-4`]:!f.value})),v=t.ref(e==null?void 0:e.color),b=t.computed(()=>[r.value,{[`${r.value}-${e.type}`]:(e==null?void 0:e.type)&&!v.value,[`${r.value}-size-${e.size}`]:e.size,[`${r.value}-wave`]:e.showWave&&i.value&&!(e!=null&&e.text)&&!(e!=null&&e.disabled)&&!(e!=null&&e.loading),"is-light":e==null?void 0:e.light,"is-ghost":e==null?void 0:e.ghost,"is-dashed":e==null?void 0:e.dashed,"is-long":e==null?void 0:e.long,"is-text":e==null?void 0:e.text,"is-disabled":e==null?void 0:e.disabled,"is-round":e==null?void 0:e.round,"is-circle":e==null?void 0:e.circle,"is-square":e==null?void 0:e.square,"is-loading":e==null?void 0:e.loading,"is-custom":!!v.value,"with-bg":e==null?void 0:e.bg}]),V=()=>{T()},T=()=>{u.value&&(i.value=!1,clearTimeout(u.value))};t.onBeforeUnmount(()=>{T(),c.value&&clearTimeout(c.value)});const M=t.computed(()=>{const L={};return e.height&&(L.height=ne(e.height)),e.radius&&(L.borderRadius=ne(e.radius)),v.value&&(L["--color-1"]=tt(v.value,1),L["--color-2"]=tt(v.value,2),L["--color-3"]=tt(v.value,3),L["--color-4"]=tt(v.value,4),L["--color-5"]=tt(v.value,5),L["--color-6"]=tt(v.value,6),L["--color-7"]=tt(v.value,7)),L});return{classes:b,styles:M,prefixCls:r,clicked:i,disabled:d,iconClasses:x,node:s,render:()=>{var h;const L=()=>{switch(e.icon){case"search":return t.createVNode(ir,null,null);case"reset":return t.createVNode(gd,null,null);case"add":return t.createVNode(Un,null,null);case"edit":return t.createVNode(vd,null,null);case"delete":return t.createVNode(ir,null,null);default:return null}},O=()=>{let N;return n.icon?n.icon():e.icon?t.createVNode(t.resolveComponent("t-icon"),{class:x.value},bd(N=L())?N:{default:()=>[N]}):null},k=e.loading?t.createVNode(t.resolveComponent("t-icon"),{spin:!0,class:x.value},{default:()=>[t.createVNode("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1265"},[t.createVNode("path",{d:"M512 128c211.2 0 384 172.8 384 384s-172.8 384-384 384-384-172.8-384-384 172.8-384 384-384m0-64C262.4 64 64 262.4 64 512s198.4 448 448 448 448-198.4 448-448-198.4-448-448-448z",fill:"currentColor","p-id":"1266"},null),t.createVNode("path",{d:"M544 512m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z",fill:"currentColor","p-id":"1267"},null),t.createVNode("path",{d:"M800 512m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z",fill:"currentColor","p-id":"1268"},null),t.createVNode("path",{d:"M544 480h256v64h-256z",fill:"currentColor","p-id":"1269"},null)])]}):O();return t.createVNode("button",t.mergeProps(a,{type:e.nativeType,class:b.value,style:M.value,disabled:e.disabled||e.loading}),[k,(h=n.default)==null?void 0:h.call(n)])},timerId:u,nextTickId:c,nativeType:e.nativeType,clearTimer:T,handleBlur:V}},mounted(){t.nextTick(()=>{this.node=or(this),this.node.nodeType===1&&this.node.addEventListener("click",this.handleClick,!0)})},onBeforeUnmount(){this.node.removeEventListener("click",this.handleClick,!0)},methods:{handleClick(){this.clearTimer(),this.removeWaveColorCss(),this.writeWaveColorCss(),this.nextTickId=setTimeout(()=>{this.clicked=!0,this.timerId=setTimeout(()=>{},1e3)},0)},writeWaveColorCss(){if(!ue)return;const e=this.getWaveColor();Ct=Ct||document.createElement("style"),Ct.innerHTML=`
|
|
8
|
+
${Bn(c)}`),c===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Nc=["name","validate","getter"],Cc=(()=>{var e;return(e=class{static get any(){return oc()}static get func(){return ic().def(this.defaults.func)}static get bool(){return sc().def(this.defaults.bool)}static get string(){return cc().def(this.defaults.string)}static get number(){return dc().def(this.defaults.number)}static get array(){return uc().def(this.defaults.array)}static get object(){return fc().def(this.defaults.object)}static get integer(){return hc().def(this.defaults.integer)}static get symbol(){return mc()}static get nullable(){return{type:null}}static extend(n){if(Lt(n))return n.forEach(u=>this.extend(u)),this;const{name:a,validate:r=!1,getter:o=!1}=n,i=Pl(n,Nc);if(Dt(this,a))throw new TypeError(`[VueTypes error]: Type "${a}" already defined`);const{type:s}=i;if(Rn(s))return delete i.type,Object.defineProperty(this,a,o?{get:()=>El(a,s,i)}:{value(...u){const d=El(a,s,i);return d.validator&&(d.validator=d.validator.bind(d,...u)),d}});let c;return c=o?{get(){const u=Object.assign({},i);return r?rt(a,u):qe(a,u)},enumerable:!0}:{value(...u){const d=Object.assign({},i);let f;return f=r?rt(a,d):qe(a,d),d.validator&&(f.validator=d.validator.bind(f,...u)),f},enumerable:!0},Object.defineProperty(this,a,c)}}).defaults={},e.sensibleDefaults=void 0,e.config=Ca,e.custom=gc,e.oneOf=vc,e.instanceOf=wc,e.oneOfType=bc,e.arrayOf=yc,e.objectOf=xc,e.shape=Vc,e.utils={validate:(n,a)=>Nt(a,n,!0)===!0,toType:(n,a,r=!1)=>r?rt(n,a):qe(n,a)},e})();function zl(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return(n=class extends Cc{static get sensibleDefaults(){return rn({},this.defaults)}static set sensibleDefaults(a){this.defaults=a!==!1?rn({},a!==!0?a:e):{}}}).defaults=rn({},e),n}class Fy extends zl(){}const ae=e=>{const n=e;return n.install=function(a){a.component(n.name,e)},e},Ta=(e,n)=>{const a=e;return a.install=function(r){r.config.globalProperties[n]=e},e},Re=e=>typeof e=="function",ge=Array.isArray,We=e=>typeof e=="string",Fl=e=>typeof e=="boolean",pc=e=>e!==null&&typeof e=="object",zt=e=>{const n=String(e);return!isNaN(+n)&&isFinite(+n)&&(typeof e=="number"||!/e/i.test(n))},Il=zl({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Il.extend([{name:"emptyBool",getter:!0,type:Boolean,default:void 0},{name:"strOrNumber",getter:!0,type:[String,Number],default:void 0},{name:"width",getter:!0,type:[String,Number],default:void 0},{name:"strOrVNode",getter:!0,type:null,default:void 0},{name:"vNode",getter:!0,type:null,default:void 0}]);const l=Il;l.oneOfType([l.string,l.number]);const _l=e=>e?e.$!==void 0:!1,Tc=e=>{if(e){if(pc(e))return e}else return{};const n={};return e.split(";").forEach(r=>{const[o,i]=r.split(":");i&&(n[o]=i)}),n},jl=Symbol("ConfigProviderContextKey"),$c=e=>{t.provide(jl,e)},on=()=>t.inject(jl,{rootPrefixCls:t.computed(()=>"t"),customStyles:t.computed(()=>{})});function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(e)}var kc=/^\s+/,Pc=/\s+$/;function re(e,n){if(e=e||"",n=n||{},e instanceof re)return e;if(!(this instanceof re))return new re(e,n);var a=Sc(e);this._originalInput=e,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.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=a.ok}re.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),a,r,o,i,s,c;return a=n.r/255,r=n.g/255,o=n.b/255,a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?c=o/12.92:c=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*s+.0722*c},setAlpha:function(n){return this._a=ql(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=Bl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=Bl(this._r,this._g,this._b),a=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+a+", "+r+"%, "+o+"%)":"hsva("+a+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Rl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Rl(this._r,this._g,this._b),a=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+a+", "+r+"%, "+o+"%)":"hsla("+a+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return Hl(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Dc(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},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(Te(this._r,255)*100)+"%",g:Math.round(Te(this._g,255)*100)+"%",b:Math.round(Te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%)":"rgba("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Wc[Hl(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var a="#"+Kl(this._r,this._g,this._b,this._a),r=a,o=this._gradientType?"GradientType = 1, ":"";if(n){var i=re(n);r="#"+Kl(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+a+",endColorstr="+r+")"},toString:function(n){var a=!!n;n=n||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!a&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return re(this.toString())},_applyModification:function(n,a){var r=n.apply(null,[this].concat([].slice.call(a)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Fc,arguments)},brighten:function(){return this._applyModification(Ic,arguments)},darken:function(){return this._applyModification(_c,arguments)},desaturate:function(){return this._applyModification(Lc,arguments)},saturate:function(){return this._applyModification(Ec,arguments)},greyscale:function(){return this._applyModification(zc,arguments)},spin:function(){return this._applyModification(jc,arguments)},_applyCombination:function(n,a){return n.apply(null,[this].concat([].slice.call(a)))},analogous:function(){return this._applyCombination(Hc,arguments)},complement:function(){return this._applyCombination(Rc,arguments)},monochromatic:function(){return this._applyCombination(Kc,arguments)},splitcomplement:function(){return this._applyCombination(Bc,arguments)},triad:function(){return this._applyCombination(Wl,[3])},tetrad:function(){return this._applyCombination(Wl,[4])}},re.fromRatio=function(e,n){if(Hn(e)=="object"){var a={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?a[r]=e[r]:a[r]=sn(e[r]));e=a}return re(e,n)};function Sc(e){var n={r:0,g:0,b:0},a=1,r=null,o=null,i=null,s=!1,c=!1;return typeof e=="string"&&(e=Gc(e)),Hn(e)=="object"&&(st(e.r)&&st(e.g)&&st(e.b)?(n=Oc(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):st(e.h)&&st(e.s)&&st(e.v)?(r=sn(e.s),o=sn(e.v),n=Mc(e.h,r,o),s=!0,c="hsv"):st(e.h)&&st(e.s)&&st(e.l)&&(r=sn(e.s),i=sn(e.l),n=Ac(e.h,r,i),s=!0,c="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=ql(a),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a}}function Oc(e,n,a){return{r:Te(e,255)*255,g:Te(n,255)*255,b:Te(a,255)*255}}function Rl(e,n,a){e=Te(e,255),n=Te(n,255),a=Te(a,255);var r=Math.max(e,n,a),o=Math.min(e,n,a),i,s,c=(r+o)/2;if(r==o)i=s=0;else{var u=r-o;switch(s=c>.5?u/(2-r-o):u/(r+o),r){case e:i=(n-a)/u+(n<a?6:0);break;case n:i=(a-e)/u+2;break;case a:i=(e-n)/u+4;break}i/=6}return{h:i,s,l:c}}function Ac(e,n,a){var r,o,i;e=Te(e,360),n=Te(n,100),a=Te(a,100);function s(d,f,x){return x<0&&(x+=1),x>1&&(x-=1),x<1/6?d+(f-d)*6*x:x<1/2?f:x<2/3?d+(f-d)*(2/3-x)*6:d}if(n===0)r=o=i=a;else{var c=a<.5?a*(1+n):a+n-a*n,u=2*a-c;r=s(u,c,e+1/3),o=s(u,c,e),i=s(u,c,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function Bl(e,n,a){e=Te(e,255),n=Te(n,255),a=Te(a,255);var r=Math.max(e,n,a),o=Math.min(e,n,a),i,s,c=r,u=r-o;if(s=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(n-a)/u+(n<a?6:0);break;case n:i=(a-e)/u+2;break;case a:i=(e-n)/u+4;break}i/=6}return{h:i,s,v:c}}function Mc(e,n,a){e=Te(e,360)*6,n=Te(n,100),a=Te(a,100);var r=Math.floor(e),o=e-r,i=a*(1-n),s=a*(1-o*n),c=a*(1-(1-o)*n),u=r%6,d=[a,s,i,i,c,a][u],f=[c,a,a,s,i,i][u],x=[i,i,c,a,a,s][u];return{r:d*255,g:f*255,b:x*255}}function Hl(e,n,a,r){var o=[Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Dc(e,n,a,r,o){var i=[Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16)),Qe(Yl(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function Kl(e,n,a,r){var o=[Qe(Yl(r)),Qe(Math.round(e).toString(16)),Qe(Math.round(n).toString(16)),Qe(Math.round(a).toString(16))];return o.join("")}re.equals=function(e,n){return!e||!n?!1:re(e).toRgbString()==re(n).toRgbString()},re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Lc(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.s-=n/100,a.s=Kn(a.s),re(a)}function Ec(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.s+=n/100,a.s=Kn(a.s),re(a)}function zc(e){return re(e).desaturate(100)}function Fc(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.l+=n/100,a.l=Kn(a.l),re(a)}function Ic(e,n){n=n===0?0:n||10;var a=re(e).toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(n/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(n/100)))),a.b=Math.max(0,Math.min(255,a.b-Math.round(255*-(n/100)))),re(a)}function _c(e,n){n=n===0?0:n||10;var a=re(e).toHsl();return a.l-=n/100,a.l=Kn(a.l),re(a)}function jc(e,n){var a=re(e).toHsl(),r=(a.h+n)%360;return a.h=r<0?360+r:r,re(a)}function Rc(e){var n=re(e).toHsl();return n.h=(n.h+180)%360,re(n)}function Wl(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var a=re(e).toHsl(),r=[re(e)],o=360/n,i=1;i<n;i++)r.push(re({h:(a.h+i*o)%360,s:a.s,l:a.l}));return r}function Bc(e){var n=re(e).toHsl(),a=n.h;return[re(e),re({h:(a+72)%360,s:n.s,l:n.l}),re({h:(a+216)%360,s:n.s,l:n.l})]}function Hc(e,n,a){n=n||6,a=a||30;var r=re(e).toHsl(),o=360/a,i=[re(e)];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(re(r));return i}function Kc(e,n){n=n||6;for(var a=re(e).toHsv(),r=a.h,o=a.s,i=a.v,s=[],c=1/n;n--;)s.push(re({h:r,s:o,v:i})),i=(i+c)%1;return s}re.mix=function(e,n,a){a=a===0?0:a||50;var r=re(e).toRgb(),o=re(n).toRgb(),i=a/100,s={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return re(s)},re.readability=function(e,n){var a=re(e),r=re(n);return(Math.max(a.getLuminance(),r.getLuminance())+.05)/(Math.min(a.getLuminance(),r.getLuminance())+.05)},re.isReadable=function(e,n,a){var r=re.readability(e,n),o,i;switch(i=!1,o=Xc(a),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i},re.mostReadable=function(e,n,a){var r=null,o=0,i,s,c,u;a=a||{},s=a.includeFallbackColors,c=a.level,u=a.size;for(var d=0;d<n.length;d++)i=re.readability(e,n[d]),i>o&&(o=i,r=re(n[d]));return re.isReadable(e,r,{level:c,size:u})||!s?r:(a.includeFallbackColors=!1,re.mostReadable(e,["#fff","#000"],a))};var $a=re.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Wc=re.hexNames=qc($a);function qc(e){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[e[a]]=a);return n}function ql(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Te(e,n){Yc(e)&&(e="100%");var a=Uc(e);return e=Math.min(n,Math.max(0,parseFloat(e))),a&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Kn(e){return Math.min(1,Math.max(0,e))}function Ye(e){return parseInt(e,16)}function Yc(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Uc(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Qe(e){return e.length==1?"0"+e:""+e}function sn(e){return e<=1&&(e=e*100+"%"),e}function Yl(e){return Math.round(parseFloat(e)*255).toString(16)}function Ul(e){return Ye(e)/255}var et=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",a="(?:"+n+")|(?:"+e+")",r="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?",o="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?";return{CSS_UNIT:new RegExp(a),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function st(e){return!!et.CSS_UNIT.exec(e)}function Gc(e){e=e.replace(kc,"").replace(Pc,"").toLowerCase();var n=!1;if($a[e])e=$a[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a;return(a=et.rgb.exec(e))?{r:a[1],g:a[2],b:a[3]}:(a=et.rgba.exec(e))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=et.hsl.exec(e))?{h:a[1],s:a[2],l:a[3]}:(a=et.hsla.exec(e))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=et.hsv.exec(e))?{h:a[1],s:a[2],v:a[3]}:(a=et.hsva.exec(e))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=et.hex8.exec(e))?{r:Ye(a[1]),g:Ye(a[2]),b:Ye(a[3]),a:Ul(a[4]),format:n?"name":"hex8"}:(a=et.hex6.exec(e))?{r:Ye(a[1]),g:Ye(a[2]),b:Ye(a[3]),format:n?"name":"hex"}:(a=et.hex4.exec(e))?{r:Ye(a[1]+""+a[1]),g:Ye(a[2]+""+a[2]),b:Ye(a[3]+""+a[3]),a:Ul(a[4]+""+a[4]),format:n?"name":"hex8"}:(a=et.hex3.exec(e))?{r:Ye(a[1]+""+a[1]),g:Ye(a[2]+""+a[2]),b:Ye(a[3]+""+a[3]),format:n?"name":"hex"}:!1}function Xc(e){var n,a;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),a=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),a!=="small"&&a!=="large"&&(a="small"),{level:n,size:a}}const Wn=2,Gl=.16,Zc=.05,Jc=.05,Qc=.15,cn=5,ed=4,Xl=function(e,n,a){let r;return e>=60&&e<=240?r=a?e-Wn*n:e+Wn*n:r=a?e+Wn*n:e-Wn*n,r<0?r+=360:r>=360&&(r-=360),Math.round(r)},Zl=function(e,n,a){let r;return a?r=e-Gl*n:n===ed?r=e+Gl:r=e+Zc*n,r>1&&(r=1),a&&n===cn&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))},Jl=function(e,n,a){let r;return a?r=e+Jc*n:r=e-Qc*n,r>1&&(r=1),Number(r.toFixed(2))},td=function(e){const n=e[0],a=e[1],r=e[2];let o=0,i=0,s=0;const c=parseInt((n/60%6).toString()),u=n/60-c,d=r*(1-a),f=r*(1-u*a),x=r*(1-(1-u)*a);switch(c){case 0:o=r,i=x,s=d;break;case 1:o=f,i=r,s=d;break;case 2:o=d,i=r,s=x;break;case 3:o=d,i=f,s=r;break;case 4:o=x,i=d,s=r;break;case 5:o=r,i=d,s=f;break}return o=parseInt((o*255).toString()),i=parseInt((i*255).toString()),s=parseInt((s*255).toString()),[o,i,s]};function Ql(e){let n=e.trim().replace("#","");return/^[0-9a-fA-F]{3}$/.test(n)&&(n=n[0].repeat(2)+n[1].repeat(2)+n[2].repeat(2)),/^[0-9a-fA-F]{6}$/.test(n)?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:[255,255,255]}function er(e){let n=0,a=0,r=0;const o=e[0],i=e[1],s=e[2];e.sort(function(d,f){return d-f});const c=e[2],u=e[0];return r=c/255,c===0?a=0:a=1-u/c,c===u?n=0:c===o&&i>=s?n=60*((i-s)/(c-u))+0:c===o&&i<s?n=60*((i-s)/(c-u))+360:c===i?n=60*((s-o)/(c-u))+120:c===s&&(n=60*((o-i)/(c-u))+240),[n,a,r]}function nd(e){let n=e[0].toString(16),a=e[1].toString(16),r=e[2].toString(16);return n.length==1&&(n="0"+n),a.length==1&&(a="0"+a),r.length==1&&(r="0"+r),"#"+n+a+r}function tt(e,n){const a=n<=6,r=Ql(e),o=er(r),i=a?cn+1-n:n-cn-1,s=td([Xl(o[0],i,a),Zl(o[1],i,a),Jl(o[2],i,a)]);return nd(s)}function tr(e,n){const a=n<=6,r=Ql(e),o=er(r),i=a?cn+1-n:n-cn-1;return re({h:Xl(o[0],i,a),s:Zl(o[1],i,a),v:Jl(o[2],i,a)}).toHslString().replace(/hsl\((.*)\)/,"$1").replace(/,/g," ")}function ad(){return{updateColor:(a,r,o)=>{for(let c=1;c<=10;c++)a["--"+o+"-"+c]=tt(r,c),a["--"+o+"-"+c+"-hsl"]=tr(r,c);const i=tt(r,6),s=re(i);o=="primary"?(a["--primary-a"]=i,a["--primary-b"]=s.clone().lighten(10),a["--primary-c"]=s.clone().darken(10),a["--primary-d"]=s.clone().lighten(20),a["--primary-e"]=s.clone().lighten(40),a["--border-color-hover"]="var(--primary-6)",a["--bg-color-selected"]="var(--primary-6)",a["--bg-color-selected-light"]="hsl(var(--primary-6-hsl) / 14%)",a["--primary-color"]="var(--primary-6)",a["--primary-color-shadow"]="hsl(var(--primary-6-hsl) / 20%)",a["--primary-color-shadow-secondary"]="hsl(var(--primary-6-hsl) / 15%)"):o=="success"?(a["--success-a"]=i,a["--success-b"]=s.clone().lighten(10),a["--success-c"]=s.clone().darken(10),a["--success-d"]=s.clone().lighten(20),a["--success-e"]=s.clone().lighten(45)):o=="info"?(a["--info-a"]=i,a["--info-b"]=s.clone().lighten(10),a["--info-c"]=s.clone().darken(10),a["--info-d"]=s.clone().lighten(20),a["--info-e"]=s.clone().lighten(45)):o=="warning"?(a["--warning-a"]=i,a["--warning-b"]=s.clone().lighten(10),a["--warning-c"]=s.clone().darken(10),a["--warning-d"]=s.clone().lighten(20),a["--warning-e"]=s.clone().lighten(40)):o=="danger"&&(a["--danger-a"]=i,a["--danger-b"]=s.clone().lighten(10),a["--danger-c"]=s.clone().darken(10),a["--danger-d"]=s.clone().lighten(20),a["--danger-e"]=s.clone().lighten(40))},initColor:(a,r)=>{for(let s=1;s<=10;s++)document.body.style.setProperty("--"+r+"-"+s,tt(a,s)),document.body.style.setProperty("--"+r+"-"+s+"-hsl",tr(a,s));const o=tt(a,6),i=re(o);r=="primary"?(document.body.style.setProperty("--primary-a",o),document.body.style.setProperty("--primary-b",i.clone().lighten(10)),document.body.style.setProperty("--primary-c",i.clone().darken(10)),document.body.style.setProperty("--primary-d",i.clone().lighten(20)),document.body.style.setProperty("--primary-e",i.clone().lighten(40)),document.body.style.setProperty("--border-color-hover","var(--primary-6)"),document.body.style.setProperty("--bg-color-selected","var(--primary-6)"),document.body.style.setProperty("--bg-color-selected-light","hsl(var(--primary-6-hsl) / 14%)"),document.body.style.setProperty("--primary-color","var(--primary-6)"),document.body.style.setProperty("--primary-color-shadow","hsl(var(--primary-6-hsl) / 20%)"),document.body.style.setProperty("--primary-color-shadow-secondary","hsl(var(--primary-6-hsl) / 15%)")):r=="success"?(document.body.style.setProperty("--success-a",o),document.body.style.setProperty("--success-b",i.clone().lighten(10)),document.body.style.setProperty("--success-c",i.clone().darken(10)),document.body.style.setProperty("--success-d",i.clone().lighten(20)),document.body.style.setProperty("--success-e",i.clone().lighten(45))):r=="info"?(document.body.style.setProperty("--info-a",o),document.body.style.setProperty("--info-b",i.clone().lighten(10)),document.body.style.setProperty("--info-c",i.clone().darken(10)),document.body.style.setProperty("--info-d",i.clone().lighten(20)),document.body.style.setProperty("--info-e",i.clone().lighten(45))):r=="warning"?(document.body.style.setProperty("--warning-a",o),document.body.style.setProperty("--warning-b",i.clone().lighten(10)),document.body.style.setProperty("--warning-c",i.clone().darken(10)),document.body.style.setProperty("--warning-d",i.clone().lighten(20)),document.body.style.setProperty("--warning-e",i.clone().lighten(40))):r=="danger"&&(document.body.style.setProperty("--danger-a",o),document.body.style.setProperty("--danger-b",i.clone().lighten(10)),document.body.style.setProperty("--danger-c",i.clone().darken(10)),document.body.style.setProperty("--danger-d",i.clone().lighten(20)),document.body.style.setProperty("--danger-e",i.clone().lighten(40)))}}}const ld={rootPrefixCls:l.string.def("t"),theme:l.string.def("light"),colors:{type:Object}},nr=ae(t.defineComponent({name:"TConfigProvider",props:ld,setup(e,{slots:n}){const a=t.computed(()=>{const i={},s=ad();if(e.colors!=null)for(const c in e.colors)e.colors[c]&&s.updateColor(i,e.colors[c],c);return i}),r=t.computed(()=>[{[`theme-${e.theme}`]:e.theme!="light"}]),o={rootPrefixCls:t.computed(()=>e.rootPrefixCls),customStyles:t.computed(()=>a.value)};return $c(o),()=>{var i;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:r.value,style:a.value},[(i=n.default)==null?void 0:i.call(n)])])}}}));function te(e,n){const a=on(),r=(s,c)=>{const u=c||a.rootPrefixCls.value;return s?`${u}-${s}`:`${u}`},o=t.computed(()=>r(e,n==null?void 0:n.prefixCls));return{configProvider:a,prefixCls:o,rootPrefix:t.computed(()=>a.rootPrefixCls.value)}}const ue=typeof window<"u",ar=["primary","info","success","warning","danger","error","blue","green","red","yellow","pink","magenta","volcano","orange","gold","lime","cyan","geekblue","purple"],ne=e=>{let n=String(e);return/^[\-]?(\d|\.)+$/.test(n)&&(n+="px"),n},le=e=>{let n=String(e);if(n=n.replace("pt","").replace("px",""),/^[\-]?(\d|\.)+$/.test(n))return parseFloat(n)},Ue=e=>{const n=String(e).trim();if(/^[\-]?(\d|\.)+$/.test(n))return parseFloat(n)};function rd(e=[]){const n=[];return e.forEach(a=>{ge(a)?n.push(...a):a.type===t.Fragment?n.push(...a.children):n.push(a)}),n}function od(e){return e&&(e.type===Comment||e.type===t.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function id(e){return e!=null&&e!==""}function Ft(e=[],n=!0){const a=Array.isArray(e)?e:[e],r=[];return a.forEach(o=>{Array.isArray(o)?r.push(...Ft(o,n)):o&&o.type===t.Fragment?r.push(...Ft(o.children,n)):o&&t.isVNode(o)?n&&od(o)||r.push(o):id(o)&&r.push(o)}),r}function sd(){return!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)}function Ve(e,n,a="YYYY-MM-DD"){return!e&&!n?!0:!e||!n?!1:e.format(a)==n.format(a)}function Ze(e,n){if(!e&&!n)return!0;if(!e||!n)return!1;let a=e.week(),r=n.week();return e.day()==0&&a--,n.day()==0&&r--,a==0&&(a=52),r==0&&(r=52),a==r}function lr(e){return e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()}).trim()}function cd(){return ue?document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight):!1}function dd(e){const n=e/1048576,a=(e-n*1024*1024)/1024;return`${n?n+" m":""}${a?a+" k":""}`}function ud(e,n){var i;let a=e,r="",o=0;do o++,a=a.parent,r=((i=a==null?void 0:a.type)==null?void 0:i.name)??"";while(a&&(!r||r.indexOf(n)<0)&&o<20);if(!(o>=20))return a}function qn(e){let n=0,a;for(let r=0;r<e.length;r++)a=e.charCodeAt(r),a>=0&&a<=128?n+=1:n+=2;return n}function rr(e,n,a){if(e.replace(/[\u4e00-\u9fa5]/g,"**").length<=a)return e;let r=0,o="";for(let i=n;i<e.length&&(/[\u4e00-\u9fa5]/.test(e[i])?r+=2:r+=1,!(r>a));i++)o+=e[i];return o}async function fd(e,n="download"){if(!ue)return Promise.reject();try{const r=await(await fetch(e)).blob();if(!r)return Promise.reject();const o=URL.createObjectURL(r),i=document.createElement("a");return i.setAttribute("href",o),i.setAttribute("download",n),i.click(),URL.revokeObjectURL(o),Promise.resolve()}catch(a){return Promise.reject(a)}}function we(e,n){if(!(zt(e)&&n&&e===0))return e}function Ce(e,n,a){const o=n.replace(/\[(\w+)\]/g,".$1").split(".");let i=e;for(const s in o)i=i[o[s]]??void 0;return we(i,a)}function Be(e,n,a){const o=n.replace(/\[(\w+)\]/g,".$1").split(".");let i=e;for(let s=0;s<o.length-1;s++)i.hasOwnProperty(o[s])||(i[o[s]]={}),i=i[o[s]];i[o[o.length-1]]=a}const hd={color:l.string,size:l.oneOfType([l.string,l.number]),spin:l.bool.def(!1),rotate:l.oneOfType([l.string,l.number]),prefixCls:l.string},dn=t.defineComponent({name:"TIcon",props:hd,setup(e,{slots:n}){const{prefixCls:a}=te("icon",e),r=t.computed(()=>[a.value,{[`${a.value}-spin`]:e.spin}]),o=t.computed(()=>{const i={};return e.color&&(i.color=e.color),e.size&&(i.fontSize=ne(e.size)),e.rotate&&(i.transform=`rotate(${e.rotate}deg)`),i});return()=>{var i;return t.createVNode("i",{style:o.value,class:r.value},[(i=n.default)==null?void 0:i.call(n)])}}}),$e=ae(dn),md={to:{type:[Object,String]},href:{type:[Object,String]},type:l.oneOf(["primary","success","warning","danger","info","default"]).def("default"),disabled:l.bool.def(!1),underline:l.bool.def(!1),isLight:l.bool.def(!1)},Yn=ae(t.defineComponent({name:"TLink",inheritAttrs:!1,props:md,setup(e,{slots:n,attrs:a}){const{prefixCls:r}=te("link",e),o=t.computed(()=>[r.value,{[`${r.value}-${e.type}`]:e==null?void 0:e.type,"is-disabled":e==null?void 0:e.disabled,"is-underlined":e==null?void 0:e.underline,"is-light":e==null?void 0:e.isLight}]),i=t.computed(()=>!(!e.to||typeof e.to=="string"&&(e.to.startsWith("http://")||e.to.startsWith("https://")||e.to.startsWith("#")))),s=t.computed(()=>e.disabled?void 0:e.href?e.href:e.to);return()=>{var c;return i.value?t.createVNode(nc.RouterLink,t.mergeProps(a,{class:o.value,to:s.value}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n)]}}):t.createVNode("a",t.mergeProps(a,{class:o.value,href:s.value,rel:"noopener norefferrer"}),[(c=n.default)==null?void 0:c.call(n)])}}}));function or(e){var a;let n=((a=e==null?void 0:e.vnode)==null?void 0:a.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n}const ir=t.defineComponent({name:"SearchOutline",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[t.createVNode("path",{d:"M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null),t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M338.29 338.29L448 448"},null)])}}),gd=t.defineComponent({name:"Reset",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t.createVNode("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10z",fill:"currentColor"},null)])}}),Un=t.defineComponent({name:"AddOutline",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null),t.createVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null)])}}),vd=t.defineComponent({name:"Edit20Regular",render(){return t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[t.createVNode("g",{fill:"none"},[t.createVNode("path",{d:"M13.245 2.817a2.783 2.783 0 0 1 4.066 3.796l-.13.14l-9.606 9.606a2.001 2.001 0 0 1-.723.462l-.165.053l-4.055 1.106a.5.5 0 0 1-.63-.535l.016-.08l1.106-4.054c.076-.28.212-.54.398-.76l.117-.128l9.606-9.606zm-.86 2.275L4.346 13.13a1 1 0 0 0-.215.321l-.042.123l-.877 3.21l3.212-.875a1 1 0 0 0 .239-.1l.107-.072l.098-.085l8.038-8.04l-2.521-2.52zm4.089-1.568a1.783 1.783 0 0 0-2.402-.11l-.12.11l-.86.86l2.52 2.522l.862-.86a1.783 1.783 0 0 0 .11-2.402l-.11-.12z",fill:"currentColor"},null)])])}});function bd(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}let Ct;const yd={prefixCls:l.string,type:l.oneOf(["primary","success","warning","danger","info","default"]).def("default"),nativeType:{type:String,default:"button"},light:l.bool.def(!1),ghost:l.bool.def(!1),dashed:l.bool.def(!1),icon:l.string.def(void 0),long:l.bool.def(!1),text:l.bool.def(!1),disabled:l.bool.def(!1),circle:l.bool.def(!1),round:l.bool.def(!1),square:l.bool.def(!1),loading:l.bool.def(!1),bg:l.bool.def(!1),size:l.oneOf(["xs","sm","md","lg","xl"]).def("md"),height:l.oneOfType([l.string,l.number]),radius:l.oneOfType([l.string,l.number]),color:l.string,showWave:l.bool.def(!0)},pt=ae(t.defineComponent({name:"TButton",components:{TIcon:$e},inheritAttrs:!1,props:yd,setup(e,{slots:n,attrs:a}){const{prefixCls:r,rootPrefix:o}=te("btn",e),i=t.ref(!1),s=t.ref(null),c=t.ref(null),u=t.ref(null),d=t.ref((e==null?void 0:e.disabled)??!1),f=t.ref(!n.default),x=t.computed(()=>({[`${o.value}-m-r-4`]:!f.value})),v=t.ref(e==null?void 0:e.color),b=t.computed(()=>[r.value,{[`${r.value}-${e.type}`]:(e==null?void 0:e.type)&&!v.value,[`${r.value}-size-${e.size}`]:e.size,[`${r.value}-wave`]:e.showWave&&i.value&&!(e!=null&&e.text)&&!(e!=null&&e.disabled)&&!(e!=null&&e.loading),"is-light":e==null?void 0:e.light,"is-ghost":e==null?void 0:e.ghost,"is-dashed":e==null?void 0:e.dashed,"is-long":e==null?void 0:e.long,"is-text":e==null?void 0:e.text,"is-disabled":e==null?void 0:e.disabled,"is-round":e==null?void 0:e.round,"is-circle":e==null?void 0:e.circle,"is-square":e==null?void 0:e.square,"is-loading":e==null?void 0:e.loading,"is-custom":!!v.value,"with-bg":e==null?void 0:e.bg}]),V=()=>{T()},T=()=>{u.value&&(i.value=!1,clearTimeout(u.value))};t.onBeforeUnmount(()=>{T(),c.value&&clearTimeout(c.value)});const M=t.computed(()=>{const L={};return e.height&&(L.height=ne(e.height)),e.radius&&(L.borderRadius=ne(e.radius)),v.value&&(L["--color-1"]=tt(v.value,1),L["--color-2"]=tt(v.value,2),L["--color-3"]=tt(v.value,3),L["--color-4"]=tt(v.value,4),L["--color-5"]=tt(v.value,5),L["--color-6"]=tt(v.value,6),L["--color-7"]=tt(v.value,7)),L});return{classes:b,styles:M,prefixCls:r,clicked:i,disabled:d,iconClasses:x,node:s,render:()=>{var h;const L=()=>{switch(e.icon){case"search":return t.createVNode(ir,null,null);case"reset":return t.createVNode(gd,null,null);case"add":return t.createVNode(Un,null,null);case"edit":return t.createVNode(vd,null,null);case"delete":return t.createVNode(ir,null,null);default:return null}},O=()=>{let N;return n.icon?n.icon():e.icon?t.createVNode(t.resolveComponent("t-icon"),{class:x.value},bd(N=L())?N:{default:()=>[N]}):null},k=e.loading?t.createVNode(t.resolveComponent("t-icon"),{spin:!0,class:x.value},{default:()=>[t.createVNode("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1265"},[t.createVNode("path",{d:"M512 128c211.2 0 384 172.8 384 384s-172.8 384-384 384-384-172.8-384-384 172.8-384 384-384m0-64C262.4 64 64 262.4 64 512s198.4 448 448 448 448-198.4 448-448-198.4-448-448-448z",fill:"currentColor","p-id":"1266"},null),t.createVNode("path",{d:"M544 512m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z",fill:"currentColor","p-id":"1267"},null),t.createVNode("path",{d:"M800 512m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z",fill:"currentColor","p-id":"1268"},null),t.createVNode("path",{d:"M544 480h256v64h-256z",fill:"currentColor","p-id":"1269"},null)])]}):O();return t.createVNode("button",t.mergeProps(a,{type:e.nativeType,class:b.value,style:M.value,disabled:e.disabled||e.loading}),[k,(h=n.default)==null?void 0:h.call(n)])},timerId:u,nextTickId:c,nativeType:e.nativeType,clearTimer:T,handleBlur:V}},mounted(){t.nextTick(()=>{this.node=or(this),this.node.nodeType===1&&this.node.addEventListener("click",this.handleClick,!0)})},onBeforeUnmount(){this.node.removeEventListener("click",this.handleClick,!0)},methods:{handleClick(){this.clearTimer(),this.removeWaveColorCss(),this.writeWaveColorCss(),this.nextTickId=setTimeout(()=>{this.clicked=!0,this.timerId=setTimeout(()=>{},1e3)},0)},writeWaveColorCss(){if(!ue)return;const e=this.getWaveColor();Ct=Ct||document.createElement("style"),Ct.innerHTML=`
|
|
9
9
|
.t-btn.t-btn-wave:after {
|
|
10
10
|
--t-wave-shadow-color: ${e};
|
|
11
11
|
}`,document.body.contains(Ct)||document.body.appendChild(Ct)},removeWaveColorCss(){Ct&&(Ct.innerHTML="")},getWaveColor(){return getComputedStyle(this.node).getPropertyValue("border-top-color")||getComputedStyle(this.node).getPropertyValue("border-color")||getComputedStyle(this.node).getPropertyValue("background-color")}},render(){return this.render()}}));var sr=function(){if(typeof Map<"u")return Map;function e(n,a){var r=-1;return n.some(function(o,i){return o[0]===a?(r=i,!0):!1}),r}return function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var r=e(this.__entries__,a),o=this.__entries__[r];return o&&o[1]},n.prototype.set=function(a,r){var o=e(this.__entries__,a);~o?this.__entries__[o][1]=r:this.__entries__.push([a,r])},n.prototype.delete=function(a){var r=this.__entries__,o=e(r,a);~o&&r.splice(o,1)},n.prototype.has=function(a){return!!~e(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,r){r===void 0&&(r=null);for(var o=0,i=this.__entries__;o<i.length;o++){var s=i[o];a.call(r,s[1],s[0])}},n}()}(),ka=typeof window<"u"&&typeof document<"u"&&window.document===document,Gn=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),wd=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Gn):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),xd=2;function Vd(e,n){var a=!1,r=!1,o=0;function i(){a&&(a=!1,e()),r&&c()}function s(){wd(i)}function c(){var u=Date.now();if(a){if(u-o<xd)return;r=!0}else a=!0,r=!1,setTimeout(s,n);o=u}return c}var Nd=20,Cd=["top","right","bottom","left","width","height","size","weight"],pd=typeof MutationObserver<"u",Td=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Vd(this.refresh.bind(this),Nd)}return e.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n),this.connected_||this.connect_()},e.prototype.removeObserver=function(n){var a=this.observers_,r=a.indexOf(n);~r&&a.splice(r,1),!a.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},e.prototype.updateObservers_=function(){var n=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return n.forEach(function(a){return a.broadcastActive()}),n.length>0},e.prototype.connect_=function(){!ka||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),pd?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ka||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(n){var a=n.propertyName,r=a===void 0?"":a,o=Cd.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),cr=function(e,n){for(var a=0,r=Object.keys(n);a<r.length;a++){var o=r[a];Object.defineProperty(e,o,{value:n[o],enumerable:!1,writable:!1,configurable:!0})}return e},It=function(e){var n=e&&e.ownerDocument&&e.ownerDocument.defaultView;return n||Gn},dr=Zn(0,0,0,0);function Xn(e){return parseFloat(e)||0}function ur(e){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return n.reduce(function(r,o){var i=e["border-"+o+"-width"];return r+Xn(i)},0)}function $d(e){for(var n=["top","right","bottom","left"],a={},r=0,o=n;r<o.length;r++){var i=o[r],s=e["padding-"+i];a[i]=Xn(s)}return a}function kd(e){var n=e.getBBox();return Zn(0,0,n.width,n.height)}function Pd(e){var n=e.clientWidth,a=e.clientHeight;if(!n&&!a)return dr;var r=It(e).getComputedStyle(e),o=$d(r),i=o.left+o.right,s=o.top+o.bottom,c=Xn(r.width),u=Xn(r.height);if(r.boxSizing==="border-box"&&(Math.round(c+i)!==n&&(c-=ur(r,"left","right")+i),Math.round(u+s)!==a&&(u-=ur(r,"top","bottom")+s)),!Od(e)){var d=Math.round(c+i)-n,f=Math.round(u+s)-a;Math.abs(d)!==1&&(c-=d),Math.abs(f)!==1&&(u-=f)}return Zn(o.left,o.top,c,u)}var Sd=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof It(e).SVGGraphicsElement}:function(e){return e instanceof It(e).SVGElement&&typeof e.getBBox=="function"}}();function Od(e){return e===It(e).document.documentElement}function Ad(e){return ka?Sd(e)?kd(e):Pd(e):dr}function Md(e){var n=e.x,a=e.y,r=e.width,o=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(i.prototype);return cr(s,{x:n,y:a,width:r,height:o,top:a,right:n+r,bottom:o+a,left:n}),s}function Zn(e,n,a,r){return{x:e,y:n,width:a,height:r}}var Dd=function(){function e(n){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Zn(0,0,0,0),this.target=n}return e.prototype.isActive=function(){var n=Ad(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},e}(),Ld=function(){function e(n,a){var r=Md(a);cr(this,{target:n,contentRect:r})}return e}(),Ed=function(){function e(n,a,r){if(this.activeObservations_=[],this.observations_=new sr,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n,this.controller_=a,this.callbackCtx_=r}return e.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof It(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new Dd(n)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof It(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)&&(a.delete(n),a.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&n.activeObservations_.push(a)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,a=this.activeObservations_.map(function(r){return new Ld(r.target,r.broadcastRect())});this.callback_.call(n,a,n),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),fr=typeof WeakMap<"u"?new WeakMap:new sr,hr=function(){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=Td.getInstance(),r=new Ed(n,a,this);fr.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){hr.prototype[e]=function(){var n;return(n=fr.get(this))[e].apply(n,arguments)}});var zd=function(){return typeof Gn.ResizeObserver<"u"?Gn.ResizeObserver:hr}();const Fd={disabled:l.bool.def(!1)},ct=t.defineComponent({name:"ResizeObserver",props:Fd,emits:["resize"],setup(e,{slots:n,emit:a}){let r=null,o=null;const i=()=>{r&&(r.disconnect(),r=null)},s=()=>{if(e.disabled){i();return}const u=t.getCurrentInstance(),d=or(u);d!==o&&(i(),o=d),!r&&d&&(r=new zd(c),r.observe(d))},c=u=>{const{target:d}=u[0],{width:f,height:x}=d.getBoundingClientRect(),v=Math.floor(f),b=Math.floor(x);a("resize",{width:v,height:b})};return t.onMounted(()=>{s()}),t.onUpdated(()=>{s()}),t.onUnmounted(()=>{i()}),()=>{var u;return(u=n.default)==null?void 0:u.call(n)}}}),Id={height:[String,Number],maxHeight:[String,Number],native:l.bool.def(!1),showTrack:l.bool.def(!0),always:l.bool.def(!1),contentStyle:{type:[String,Object]},adjustX:l.number.def(0),adjustY:l.number.def(0)},mr=ae(t.defineComponent({name:"TScrollbar",inheritAttrs:!0,props:Id,components:{},setup(e,{slots:n,emit:a,attrs:r}){const{prefixCls:o}=te("scrollbar",e),i=t.computed(()=>[[`${o.value}`],{"is-native":e.native,"show-track":e.showTrack,"is-always":e.always,focus:M.value||P.value}]),s=t.computed(()=>{let W={};return e.height?W.height=le(e.height):W.height="100%",e.maxHeight&&(W["max-height"]=ne(e.maxHeight)),W}),c=t.ref(),u=t.ref(),d=t.ref(),f=t.ref(),x=t.ref(),v=t.ref(0),b=t.ref(0),V=t.ref(!1),T=t.ref(!1),M=t.ref(!1),P=t.ref(!1),L=t.ref(!1),O=t.ref({x:0,y:0}),k=t.ref({x:0,y:0}),h=t.ref({x:0,y:0}),N=t.ref({x:0,y:0}),$=t.ref(!0),m=t.ref({x:1,y:1}),_=t.ref({x:1,y:1}),K=(W,q)=>q?W/_.value.x*m.value.x:W/_.value.y*m.value.y,z=(W,q)=>q?W/m.value.x*_.value.x:W/m.value.y*_.value.y,C=W=>{if(a("scroll",W),L.value)return;const{scrollTop:q,scrollLeft:F}=W.target;V.value&&(f.value.style.transform=`translateX(${K(F,!0)}px)`),T.value&&(x.value.style.transform=`translateY(${K(q,!1)}px)`)},S=(W,q)=>{if(q.preventDefault(),q.stopPropagation(),W?M.value=!0:P.value=!0,!!ue){if($.value=W,$.value){if(!f.value.contains(q.target))return;O.value.x=K(u.value.scrollLeft,!0),k.value.x=q.x}else{if(!x.value.contains(q.target))return;O.value.y=K(u.value.scrollTop,!1),k.value.y=q.y}L.value=!0,document.addEventListener("mousemove",I,!0),document.addEventListener("mouseup",E,!0)}},I=W=>{W.preventDefault(),W.stopPropagation(),L.value&&($.value?(h.value.x=W.x-k.value.x+O.value.x,h.value.x<0?h.value.x=0:h.value.x>m.value.x&&(h.value.x=m.value.x),N.value.x=z(h.value.x,!0),f.value.style.transform=`translateX(${h.value.x}px)`):(h.value.y=W.y-k.value.y+O.value.y,h.value.y<0?h.value.y=0:h.value.y>m.value.y&&(h.value.y=m.value.y),N.value.y=z(h.value.y,!1),x.value.style.transform=`translateY(${h.value.y}px)`),u.value.scrollTo({left:N.value.x,top:N.value.y}))},E=W=>{W.preventDefault(),W.stopPropagation(),M.value=!1,P.value=!1,L.value=!1,document.removeEventListener("mousemove",I,!0),document.removeEventListener("mouseup",E,!0)},w=t.computed(()=>V.value&&T.value?12:0),y=()=>{T.value=!e.native&&d.value.scrollHeight>u.value.clientHeight,V.value=!e.native&&d.value.scrollWidth>u.value.clientWidth,v.value=c.value.clientHeight/d.value.scrollHeight*(c.value.clientHeight-w.value),v.value=Math.max(v.value,20),b.value=c.value.clientWidth/d.value.scrollWidth*(c.value.clientWidth-w.value),b.value=Math.max(b.value,20),m.value.y=c.value.clientHeight-v.value-w.value-e.adjustY,_.value.y=d.value.scrollHeight-c.value.clientHeight,m.value.x=c.value.clientWidth-b.value-w.value-e.adjustX,_.value.x=d.value.scrollWidth-c.value.clientWidth,t.nextTick(()=>{T.value&&x.value.addEventListener("mousedown",W=>S(!1,W),!0),V.value&&f.value.addEventListener("mousedown",W=>S(!0,W),!0)})};t.onMounted(()=>{ue&&(y(),u.value.addEventListener("scroll",C,!0))}),t.onBeforeUnmount(()=>{ue&&u.value.removeEventListener("scroll",C,!0)});const p=t.computed(()=>({height:ne(v.value)})),A=t.computed(()=>({width:ne(b.value)})),j=t.computed(()=>({})),g=t.computed(()=>{let W={};return W["margin-right"]="12px",W}),D=(W,q)=>{if(L.value)return;let F=0,Y=0,X=0;q?(Y=W.layerX,F=K(u.value.scrollLeft,!0),Y<F?(X=F-b.value,X<0&&(X=0),N.value.x=z(X,!0)):Y>F+b.value?(X=F+b.value,X>m.value.x&&(X=m.value.x),N.value.x=z(X,!0)):N.value.x=u.value.scrollLeft):(Y=W.layerY,F=K(u.value.scrollTop,!1),Y<F?(X=F-v.value,X<0&&(X=0),N.value.y=z(X,!1)):Y>F+v.value?(X=F+v.value,X>m.value.y&&(X=m.value.y),N.value.y=z(X,!1)):N.value.y=u.value.scrollTop),u.value.scrollTo({left:N.value.x,top:N.value.y})},R=W=>{(W.width!=0||W.height!=0)&&y()};return{render:()=>t.createVNode("div",{ref:c,class:i.value},[t.createVNode("div",{ref:u,class:`${o.value}-container`,style:s.value},[t.createVNode(ct,{onResize:R},{default:()=>{var W;return[t.createVNode("div",{ref:d,class:`${o.value}-content`,style:e.contentStyle},[(W=n.default)==null?void 0:W.call(n)])]}})]),T.value?t.createVNode("div",{class:`${o.value}-track`,style:j.value,onClick:W=>D(W,!1)},[t.createVNode("div",{ref:x,class:[`${o.value}-thumb`,{focus:P.value}],style:p.value},null)]):null,V.value?t.createVNode("div",{class:[`${o.value}-track`,"is-horizontal"],style:g.value,onClick:W=>D(W,!0)},[t.createVNode("div",{ref:f,class:[`${o.value}-thumb`,{focus:M.value}],style:A.value},null)]):null]),scrollTo:W=>{const q=W.top==null?u.value.scrollTop:W.top,F=W.left==null?u.value.scrollLeft:W.left;u.value.scrollTo({top:q,left:F,behavior:"smooth"})},scrollTop:W=>{u.value.scrollTop=W},scrollLeft:W=>{u.value.scrollLeft=W}}},render(){return this.render()}})),gr=Symbol("FormContextKey"),_d=e=>{t.provide(gr,e)},jd=()=>t.inject(gr);function nt(e,n){process.env.NODE_ENV!=="production"&&console.warn(`[Tanxin-UI]:${n} at:${e}`)}const Rd={model:l.object,rules:Object,labelWidth:l.oneOfType([l.number,l.string]).def(100),itemWidth:l.oneOfType([l.number,l.string]),labelAlign:l.oneOf(["left","top","right"]).def("right"),inline:l.bool.def(!1),showTip:l.bool.def(!0),hideRequired:l.bool.def(!1),disabled:l.emptyBool,itemClass:l.string,autoValidate:l.bool.def(!0),gutter:l.oneOfType([l.number,l.string]),marginBottom:l.oneOfType([l.number,l.string]),size:l.oneOf(["xs","sm","md","lg","xl"]),labelColon:l.bool.def(!1)},Bd=t.defineComponent({name:"TForm",props:Rd,emits:["validate","resetFields","validateSuccess","validateFail"],setup(e,{slots:n,attrs:a,emit:r}){const{prefixCls:o}=te("form",e),i=t.computed(()=>[o.value,{[`label-align-${e.labelAlign}`]:e.labelAlign,[`${o.value}-inline`]:e.inline}]),s=t.computed(()=>{const M={},P=le(e.gutter);return P&&(M.marginLeft=`-${P/2}px`,M.marginRight=`-${P/2}px`,M.width=`calc(100% + ${P}px)`),e.labelWidth&&(M["--t-label-width"]=ne(e.labelWidth)),e.marginBottom!==void 0?M["--t-form-item-margin-bottom"]=ne(e.marginBottom):e.showTip||(M["--t-form-item-margin-bottom"]="16px"),M}),c=async(M=[],P)=>{if(!e.model){nt("Form","model is required for validator");return}const L=[];v.map(N=>{M.length>0?M.includes(N.prop)&&L.push(N.validate()):L.push(N.validate())});const O=await Promise.all(L),k={};let h=!1;return O.forEach(N=>{N&&(k[N[0].field]=N,h=!0)}),P&&P(h?k:!1),h?Promise.resolve(k):Promise.resolve(!1)},u=(M=[])=>{v.map(P=>{M.length>0?M.includes(P.prop)&&P.clearValidate():P.clearValidate()})},d=(M=[],P=()=>{})=>c(M,P),f=M=>{M.stopPropagation(),M.preventDefault(),c().then(P=>{P===!1?r("validateSuccess"):r("validateFail",P)})},x=()=>{if(!e.model){nt("Form","model is required for validator");return}v.map(M=>M.resetField())},v=[],b=M=>{v.findIndex(L=>(L==null?void 0:L.prop)==(M==null?void 0:M.prop))<0&&v.push(M)},V=M=>{if(!e)return;const P=v.findIndex(L=>(L==null?void 0:L.prop)==M);P>=0&&v.splice(P,1)};return _d({model:t.computed(()=>e.model),rules:t.computed(()=>e.rules??{}),gutter:t.computed(()=>le(e.gutter)),hideRequired:t.computed(()=>e.hideRequired),labelWidth:t.computed(()=>le(e.labelWidth)),labelAlign:t.computed(()=>e.labelAlign),itemClass:t.computed(()=>e.itemClass),itemWidth:t.computed(()=>le(e.itemWidth)),size:t.computed(()=>e.size),disabled:t.computed(()=>e.disabled),labelColon:t.computed(()=>e.labelColon),showTip:t.computed(()=>e.showTip),addField:b,removeField:V}),{render:()=>{var M;return t.createVNode("form",t.mergeProps(a,{class:i.value,style:s.value,onSubmit:f}),[(M=n.default)==null?void 0:M.call(n)])},validate:c,validatePartical:d,resetFields:x,clearValidate:u}},render(){return this.render()}});function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},Tt.apply(this,arguments)}function Hd(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,un(e,n)}function Pa(e){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Pa(e)}function un(e,n){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},un(e,n)}function Kd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jn(e,n,a){return Kd()?Jn=Reflect.construct.bind():Jn=function(o,i,s){var c=[null];c.push.apply(c,i);var u=Function.bind.apply(o,c),d=new u;return s&&un(d,s.prototype),d},Jn.apply(null,arguments)}function Wd(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Sa(e){var n=typeof Map=="function"?new Map:void 0;return Sa=function(r){if(r===null||!Wd(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(r))return n.get(r);n.set(r,o)}function o(){return Jn(r,arguments,Pa(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),un(o,r)},Sa(e)}var qd=/%[sdj%]/g,vr=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(vr=function(n,a){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&a.every(function(r){return typeof r=="string"})&&console.warn(n,a)});function Oa(e){if(!e||!e.length)return null;var n={};return e.forEach(function(a){var r=a.field;n[r]=n[r]||[],n[r].push(a)}),n}function Ge(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];var o=0,i=a.length;if(typeof e=="function")return e.apply(null,a);if(typeof e=="string"){var s=e.replace(qd,function(c){if(c==="%%")return"%";if(o>=i)return c;switch(c){case"%s":return String(a[o++]);case"%d":return Number(a[o++]);case"%j":try{return JSON.stringify(a[o++])}catch{return"[Circular]"}break;default:return c}});return s}return e}function Yd(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Oe(e,n){return!!(e==null||n==="array"&&Array.isArray(e)&&!e.length||Yd(n)&&typeof e=="string"&&!e)}function Ud(e,n,a){var r=[],o=0,i=e.length;function s(c){r.push.apply(r,c||[]),o++,o===i&&a(r)}e.forEach(function(c){n(c,s)})}function br(e,n,a){var r=0,o=e.length;function i(s){if(s&&s.length){a(s);return}var c=r;r=r+1,c<o?n(e[c],i):a([])}i([])}function Gd(e){var n=[];return Object.keys(e).forEach(function(a){n.push.apply(n,e[a]||[])}),n}var yr=function(e){Hd(n,e);function n(a,r){var o;return o=e.call(this,"Async Validation Error")||this,o.errors=a,o.fields=r,o}return n}(Sa(Error));function Xd(e,n,a,r,o){if(n.first){var i=new Promise(function(v,b){var V=function(P){return r(P),P.length?b(new yr(P,Oa(P))):v(o)},T=Gd(e);br(T,a,V)});return i.catch(function(v){return v}),i}var s=n.firstFields===!0?Object.keys(e):n.firstFields||[],c=Object.keys(e),u=c.length,d=0,f=[],x=new Promise(function(v,b){var V=function(M){if(f.push.apply(f,M),d++,d===u)return r(f),f.length?b(new yr(f,Oa(f))):v(o)};c.length||(r(f),v(o)),c.forEach(function(T){var M=e[T];s.indexOf(T)!==-1?br(M,a,V):Ud(M,a,V)})});return x.catch(function(v){return v}),x}function Zd(e){return!!(e&&e.message!==void 0)}function Jd(e,n){for(var a=e,r=0;r<n.length;r++){if(a==null)return a;a=a[n[r]]}return a}function wr(e,n){return function(a){var r;return e.fullFields?r=Jd(n,e.fullFields):r=n[a.field||e.fullField],Zd(a)?(a.field=a.field||e.fullField,a.fieldValue=r,a):{message:typeof a=="function"?a():a,fieldValue:r,field:a.field||e.fullField}}}function xr(e,n){if(n){for(var a in n)if(n.hasOwnProperty(a)){var r=n[a];typeof r=="object"&&typeof e[a]=="object"?e[a]=Tt({},e[a],r):e[a]=r}}return e}var Vr=function(n,a,r,o,i,s){n.required&&(!r.hasOwnProperty(n.field)||Oe(a,s||n.type))&&o.push(Ge(i.messages.required,n.fullField))},Qd=function(n,a,r,o,i){(/^\s+$/.test(a)||a==="")&&o.push(Ge(i.messages.whitespace,n.fullField))},Qn,eu=function(){if(Qn)return Qn;var e="[a-fA-F\\d:]",n=function(k){return k&&k.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},a="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=(`
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { colorPalette, colorHsl } from "../colorPalette.js";
|
|
2
|
+
import tinycolor from "tinycolor2";
|
|
2
3
|
function useStyleConfig() {
|
|
3
4
|
const updateColor = (style, hexColor, colorName) => {
|
|
4
5
|
for (let i = 1; i <= 10; i++) {
|
|
@@ -6,18 +7,43 @@ function useStyleConfig() {
|
|
|
6
7
|
style["--" + colorName + "-" + i + "-hsl"] = colorHsl(hexColor, i);
|
|
7
8
|
}
|
|
8
9
|
const color6 = colorPalette(hexColor, 6);
|
|
10
|
+
const color = tinycolor(color6);
|
|
9
11
|
if (colorName == "primary") {
|
|
10
12
|
style["--primary-a"] = color6;
|
|
11
|
-
style["--primary-b"] =
|
|
12
|
-
style["--primary-c"] =
|
|
13
|
-
style["--primary-d"] =
|
|
14
|
-
style["--primary-e"] =
|
|
13
|
+
style["--primary-b"] = color.clone().lighten(10);
|
|
14
|
+
style["--primary-c"] = color.clone().darken(10);
|
|
15
|
+
style["--primary-d"] = color.clone().lighten(20);
|
|
16
|
+
style["--primary-e"] = color.clone().lighten(40);
|
|
15
17
|
style["--border-color-hover"] = "var(--primary-6)";
|
|
16
18
|
style["--bg-color-selected"] = "var(--primary-6)";
|
|
17
19
|
style["--bg-color-selected-light"] = "hsl(var(--primary-6-hsl) / 14%)";
|
|
18
20
|
style["--primary-color"] = "var(--primary-6)";
|
|
19
21
|
style["--primary-color-shadow"] = "hsl(var(--primary-6-hsl) / 20%)";
|
|
20
22
|
style["--primary-color-shadow-secondary"] = "hsl(var(--primary-6-hsl) / 15%)";
|
|
23
|
+
} else if (colorName == "success") {
|
|
24
|
+
style["--success-a"] = color6;
|
|
25
|
+
style["--success-b"] = color.clone().lighten(10);
|
|
26
|
+
style["--success-c"] = color.clone().darken(10);
|
|
27
|
+
style["--success-d"] = color.clone().lighten(20);
|
|
28
|
+
style["--success-e"] = color.clone().lighten(45);
|
|
29
|
+
} else if (colorName == "info") {
|
|
30
|
+
style["--info-a"] = color6;
|
|
31
|
+
style["--info-b"] = color.clone().lighten(10);
|
|
32
|
+
style["--info-c"] = color.clone().darken(10);
|
|
33
|
+
style["--info-d"] = color.clone().lighten(20);
|
|
34
|
+
style["--info-e"] = color.clone().lighten(45);
|
|
35
|
+
} else if (colorName == "warning") {
|
|
36
|
+
style["--warning-a"] = color6;
|
|
37
|
+
style["--warning-b"] = color.clone().lighten(10);
|
|
38
|
+
style["--warning-c"] = color.clone().darken(10);
|
|
39
|
+
style["--warning-d"] = color.clone().lighten(20);
|
|
40
|
+
style["--warning-e"] = color.clone().lighten(40);
|
|
41
|
+
} else if (colorName == "danger") {
|
|
42
|
+
style["--danger-a"] = color6;
|
|
43
|
+
style["--danger-b"] = color.clone().lighten(10);
|
|
44
|
+
style["--danger-c"] = color.clone().darken(10);
|
|
45
|
+
style["--danger-d"] = color.clone().lighten(20);
|
|
46
|
+
style["--danger-e"] = color.clone().lighten(40);
|
|
21
47
|
}
|
|
22
48
|
};
|
|
23
49
|
const initColor = (hexColor, colorName) => {
|
|
@@ -26,18 +52,43 @@ function useStyleConfig() {
|
|
|
26
52
|
document.body.style.setProperty("--" + colorName + "-" + i + "-hsl", colorHsl(hexColor, i));
|
|
27
53
|
}
|
|
28
54
|
const color6 = colorPalette(hexColor, 6);
|
|
55
|
+
const color = tinycolor(color6);
|
|
29
56
|
if (colorName == "primary") {
|
|
30
57
|
document.body.style.setProperty("--primary-a", color6);
|
|
31
|
-
document.body.style.setProperty("--primary-b",
|
|
32
|
-
document.body.style.setProperty("--primary-c",
|
|
33
|
-
document.body.style.setProperty("--primary-d",
|
|
34
|
-
document.body.style.setProperty("--primary-e",
|
|
58
|
+
document.body.style.setProperty("--primary-b", color.clone().lighten(10));
|
|
59
|
+
document.body.style.setProperty("--primary-c", color.clone().darken(10));
|
|
60
|
+
document.body.style.setProperty("--primary-d", color.clone().lighten(20));
|
|
61
|
+
document.body.style.setProperty("--primary-e", color.clone().lighten(40));
|
|
35
62
|
document.body.style.setProperty("--border-color-hover", "var(--primary-6)");
|
|
36
63
|
document.body.style.setProperty("--bg-color-selected", "var(--primary-6)");
|
|
37
64
|
document.body.style.setProperty("--bg-color-selected-light", "hsl(var(--primary-6-hsl) / 14%)");
|
|
38
65
|
document.body.style.setProperty("--primary-color", "var(--primary-6)");
|
|
39
66
|
document.body.style.setProperty("--primary-color-shadow", "hsl(var(--primary-6-hsl) / 20%)");
|
|
40
67
|
document.body.style.setProperty("--primary-color-shadow-secondary", "hsl(var(--primary-6-hsl) / 15%)");
|
|
68
|
+
} else if (colorName == "success") {
|
|
69
|
+
document.body.style.setProperty("--success-a", color6);
|
|
70
|
+
document.body.style.setProperty("--success-b", color.clone().lighten(10));
|
|
71
|
+
document.body.style.setProperty("--success-c", color.clone().darken(10));
|
|
72
|
+
document.body.style.setProperty("--success-d", color.clone().lighten(20));
|
|
73
|
+
document.body.style.setProperty("--success-e", color.clone().lighten(45));
|
|
74
|
+
} else if (colorName == "info") {
|
|
75
|
+
document.body.style.setProperty("--info-a", color6);
|
|
76
|
+
document.body.style.setProperty("--info-b", color.clone().lighten(10));
|
|
77
|
+
document.body.style.setProperty("--info-c", color.clone().darken(10));
|
|
78
|
+
document.body.style.setProperty("--info-d", color.clone().lighten(20));
|
|
79
|
+
document.body.style.setProperty("--info-e", color.clone().lighten(45));
|
|
80
|
+
} else if (colorName == "warning") {
|
|
81
|
+
document.body.style.setProperty("--warning-a", color6);
|
|
82
|
+
document.body.style.setProperty("--warning-b", color.clone().lighten(10));
|
|
83
|
+
document.body.style.setProperty("--warning-c", color.clone().darken(10));
|
|
84
|
+
document.body.style.setProperty("--warning-d", color.clone().lighten(20));
|
|
85
|
+
document.body.style.setProperty("--warning-e", color.clone().lighten(40));
|
|
86
|
+
} else if (colorName == "danger") {
|
|
87
|
+
document.body.style.setProperty("--danger-a", color6);
|
|
88
|
+
document.body.style.setProperty("--danger-b", color.clone().lighten(10));
|
|
89
|
+
document.body.style.setProperty("--danger-c", color.clone().darken(10));
|
|
90
|
+
document.body.style.setProperty("--danger-d", color.clone().lighten(20));
|
|
91
|
+
document.body.style.setProperty("--danger-e", color.clone().lighten(40));
|
|
41
92
|
}
|
|
42
93
|
};
|
|
43
94
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const colorPalette = require("../colorPalette.js");
|
|
4
|
+
const tinycolor = require("tinycolor2");
|
|
4
5
|
function useStyleConfig() {
|
|
5
6
|
const updateColor = (style, hexColor, colorName) => {
|
|
6
7
|
for (let i = 1; i <= 10; i++) {
|
|
@@ -8,18 +9,43 @@ function useStyleConfig() {
|
|
|
8
9
|
style["--" + colorName + "-" + i + "-hsl"] = colorPalette.colorHsl(hexColor, i);
|
|
9
10
|
}
|
|
10
11
|
const color6 = colorPalette.colorPalette(hexColor, 6);
|
|
12
|
+
const color = tinycolor(color6);
|
|
11
13
|
if (colorName == "primary") {
|
|
12
14
|
style["--primary-a"] = color6;
|
|
13
|
-
style["--primary-b"] =
|
|
14
|
-
style["--primary-c"] =
|
|
15
|
-
style["--primary-d"] =
|
|
16
|
-
style["--primary-e"] =
|
|
15
|
+
style["--primary-b"] = color.clone().lighten(10);
|
|
16
|
+
style["--primary-c"] = color.clone().darken(10);
|
|
17
|
+
style["--primary-d"] = color.clone().lighten(20);
|
|
18
|
+
style["--primary-e"] = color.clone().lighten(40);
|
|
17
19
|
style["--border-color-hover"] = "var(--primary-6)";
|
|
18
20
|
style["--bg-color-selected"] = "var(--primary-6)";
|
|
19
21
|
style["--bg-color-selected-light"] = "hsl(var(--primary-6-hsl) / 14%)";
|
|
20
22
|
style["--primary-color"] = "var(--primary-6)";
|
|
21
23
|
style["--primary-color-shadow"] = "hsl(var(--primary-6-hsl) / 20%)";
|
|
22
24
|
style["--primary-color-shadow-secondary"] = "hsl(var(--primary-6-hsl) / 15%)";
|
|
25
|
+
} else if (colorName == "success") {
|
|
26
|
+
style["--success-a"] = color6;
|
|
27
|
+
style["--success-b"] = color.clone().lighten(10);
|
|
28
|
+
style["--success-c"] = color.clone().darken(10);
|
|
29
|
+
style["--success-d"] = color.clone().lighten(20);
|
|
30
|
+
style["--success-e"] = color.clone().lighten(45);
|
|
31
|
+
} else if (colorName == "info") {
|
|
32
|
+
style["--info-a"] = color6;
|
|
33
|
+
style["--info-b"] = color.clone().lighten(10);
|
|
34
|
+
style["--info-c"] = color.clone().darken(10);
|
|
35
|
+
style["--info-d"] = color.clone().lighten(20);
|
|
36
|
+
style["--info-e"] = color.clone().lighten(45);
|
|
37
|
+
} else if (colorName == "warning") {
|
|
38
|
+
style["--warning-a"] = color6;
|
|
39
|
+
style["--warning-b"] = color.clone().lighten(10);
|
|
40
|
+
style["--warning-c"] = color.clone().darken(10);
|
|
41
|
+
style["--warning-d"] = color.clone().lighten(20);
|
|
42
|
+
style["--warning-e"] = color.clone().lighten(40);
|
|
43
|
+
} else if (colorName == "danger") {
|
|
44
|
+
style["--danger-a"] = color6;
|
|
45
|
+
style["--danger-b"] = color.clone().lighten(10);
|
|
46
|
+
style["--danger-c"] = color.clone().darken(10);
|
|
47
|
+
style["--danger-d"] = color.clone().lighten(20);
|
|
48
|
+
style["--danger-e"] = color.clone().lighten(40);
|
|
23
49
|
}
|
|
24
50
|
};
|
|
25
51
|
const initColor = (hexColor, colorName) => {
|
|
@@ -28,18 +54,43 @@ function useStyleConfig() {
|
|
|
28
54
|
document.body.style.setProperty("--" + colorName + "-" + i + "-hsl", colorPalette.colorHsl(hexColor, i));
|
|
29
55
|
}
|
|
30
56
|
const color6 = colorPalette.colorPalette(hexColor, 6);
|
|
57
|
+
const color = tinycolor(color6);
|
|
31
58
|
if (colorName == "primary") {
|
|
32
59
|
document.body.style.setProperty("--primary-a", color6);
|
|
33
|
-
document.body.style.setProperty("--primary-b",
|
|
34
|
-
document.body.style.setProperty("--primary-c",
|
|
35
|
-
document.body.style.setProperty("--primary-d",
|
|
36
|
-
document.body.style.setProperty("--primary-e",
|
|
60
|
+
document.body.style.setProperty("--primary-b", color.clone().lighten(10));
|
|
61
|
+
document.body.style.setProperty("--primary-c", color.clone().darken(10));
|
|
62
|
+
document.body.style.setProperty("--primary-d", color.clone().lighten(20));
|
|
63
|
+
document.body.style.setProperty("--primary-e", color.clone().lighten(40));
|
|
37
64
|
document.body.style.setProperty("--border-color-hover", "var(--primary-6)");
|
|
38
65
|
document.body.style.setProperty("--bg-color-selected", "var(--primary-6)");
|
|
39
66
|
document.body.style.setProperty("--bg-color-selected-light", "hsl(var(--primary-6-hsl) / 14%)");
|
|
40
67
|
document.body.style.setProperty("--primary-color", "var(--primary-6)");
|
|
41
68
|
document.body.style.setProperty("--primary-color-shadow", "hsl(var(--primary-6-hsl) / 20%)");
|
|
42
69
|
document.body.style.setProperty("--primary-color-shadow-secondary", "hsl(var(--primary-6-hsl) / 15%)");
|
|
70
|
+
} else if (colorName == "success") {
|
|
71
|
+
document.body.style.setProperty("--success-a", color6);
|
|
72
|
+
document.body.style.setProperty("--success-b", color.clone().lighten(10));
|
|
73
|
+
document.body.style.setProperty("--success-c", color.clone().darken(10));
|
|
74
|
+
document.body.style.setProperty("--success-d", color.clone().lighten(20));
|
|
75
|
+
document.body.style.setProperty("--success-e", color.clone().lighten(45));
|
|
76
|
+
} else if (colorName == "info") {
|
|
77
|
+
document.body.style.setProperty("--info-a", color6);
|
|
78
|
+
document.body.style.setProperty("--info-b", color.clone().lighten(10));
|
|
79
|
+
document.body.style.setProperty("--info-c", color.clone().darken(10));
|
|
80
|
+
document.body.style.setProperty("--info-d", color.clone().lighten(20));
|
|
81
|
+
document.body.style.setProperty("--info-e", color.clone().lighten(45));
|
|
82
|
+
} else if (colorName == "warning") {
|
|
83
|
+
document.body.style.setProperty("--warning-a", color6);
|
|
84
|
+
document.body.style.setProperty("--warning-b", color.clone().lighten(10));
|
|
85
|
+
document.body.style.setProperty("--warning-c", color.clone().darken(10));
|
|
86
|
+
document.body.style.setProperty("--warning-d", color.clone().lighten(20));
|
|
87
|
+
document.body.style.setProperty("--warning-e", color.clone().lighten(40));
|
|
88
|
+
} else if (colorName == "danger") {
|
|
89
|
+
document.body.style.setProperty("--danger-a", color6);
|
|
90
|
+
document.body.style.setProperty("--danger-b", color.clone().lighten(10));
|
|
91
|
+
document.body.style.setProperty("--danger-c", color.clone().darken(10));
|
|
92
|
+
document.body.style.setProperty("--danger-d", color.clone().lighten(20));
|
|
93
|
+
document.body.style.setProperty("--danger-e", color.clone().lighten(40));
|
|
43
94
|
}
|
|
44
95
|
};
|
|
45
96
|
return {
|