邹方成 2a89a1ab9d
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 39s
feat(admin): 更新前端资源文件及修复相关功能
refactor(service): 修改banner和guild删除逻辑为软删除
fix(service): 修复删除操作使用软删除而非物理删除

build: 添加SQLite测试仓库实现
docs: 新增奖励管理字段拆分和批量抽奖UI改造文档

ci: 更新CI忽略文件
style: 清理无用资源文件
2025-11-19 01:35:55 +08:00

2 lines
20 KiB
JavaScript

var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,i=(e,r,a)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&i(t,r,e[r]);if(a)for(var r of a(e))n.call(e,r)&&i(t,r,e[r]);return t},l=(t,a)=>e(t,r(a));import{c,a3 as u,b$ as f,a as h,bx as d,c0 as g,a2 as p,ak as b,c1 as v,ae as m,bO as y,X as x,_ as k,d as w,y as S,f as M,z as A,e as H,k as _,F as B,j as R,u as F,ab as N,i as j,au as $,Y as O,a7 as V,r as E,ao as I,ap as q,aq as z}from"./index-CZ0Lvzl5.js";import{u as P}from"./index-MV2EqMi7.js";import{a as C}from"./use-form-item-BsnpemL_.js";import{u as T,b as W}from"./use-form-common-props-U6f9D53_.js";const D=Symbol("buttonGroupContextKey"),U=p({size:y,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:m},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:m,default:()=>v},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:b([String,Object]),default:"button"}}),G={click:t=>t instanceof MouseEvent};function L(t,e){(function(t){return"string"==typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=360===e?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:t=360===e?(t<0?t%e+e:t%e)/parseFloat(String(e)):t%e/parseFloat(String(e))}function K(t){return Math.min(1,Math.max(0,t))}function X(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Y(t){return t<=1?"".concat(100*Number(t),"%"):t}function J(t){return 1===t.length?"0"+t:String(t)}function Q(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var a=Math.max(t,e,r),o=Math.min(t,e,r),n=0,i=0,s=(a+o)/2;if(a===o)i=0,n=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,l:s}}function Z(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*r*(e-t):r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function tt(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var a=Math.max(t,e,r),o=Math.min(t,e,r),n=0,i=a,s=a-o,l=0===a?0:s/a;if(a===o)n=0;else{switch(a){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:l,v:i}}function et(t,e,r,a){var o=[J(Math.round(t).toString(16)),J(Math.round(e).toString(16)),J(Math.round(r).toString(16))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function rt(t){return at(t)/255}function at(t){return parseInt(t,16)}var ot={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function nt(t){var e,r,a,o={r:0,g:0,b:0},n=1,i=null,s=null,l=null,c=!1,u=!1;return"string"==typeof t&&(t=function(t){if(t=t.trim().toLowerCase(),0===t.length)return!1;var e=!1;if(ot[t])t=ot[t],e=!0;else if("transparent"===t)return{r:0,g:0,b:0,a:0,format:"name"};var r=ct.rgb.exec(t);if(r)return{r:r[1],g:r[2],b:r[3]};if(r=ct.rgba.exec(t),r)return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=ct.hsl.exec(t),r)return{h:r[1],s:r[2],l:r[3]};if(r=ct.hsla.exec(t),r)return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=ct.hsv.exec(t),r)return{h:r[1],s:r[2],v:r[3]};if(r=ct.hsva.exec(t),r)return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=ct.hex8.exec(t),r)return{r:at(r[1]),g:at(r[2]),b:at(r[3]),a:rt(r[4]),format:e?"name":"hex8"};if(r=ct.hex6.exec(t),r)return{r:at(r[1]),g:at(r[2]),b:at(r[3]),format:e?"name":"hex"};if(r=ct.hex4.exec(t),r)return{r:at(r[1]+r[1]),g:at(r[2]+r[2]),b:at(r[3]+r[3]),a:rt(r[4]+r[4]),format:e?"name":"hex8"};if(r=ct.hex3.exec(t),r)return{r:at(r[1]+r[1]),g:at(r[2]+r[2]),b:at(r[3]+r[3]),format:e?"name":"hex"};return!1}(t)),"object"==typeof t&&(ut(t.r)&&ut(t.g)&&ut(t.b)?(e=t.r,r=t.g,a=t.b,o={r:255*L(e,255),g:255*L(r,255),b:255*L(a,255)},c=!0,u="%"===String(t.r).substr(-1)?"prgb":"rgb"):ut(t.h)&&ut(t.s)&&ut(t.v)?(i=Y(t.s),s=Y(t.v),o=function(t,e,r){t=6*L(t,360),e=L(e,100),r=L(r,100);var a=Math.floor(t),o=t-a,n=r*(1-e),i=r*(1-o*e),s=r*(1-(1-o)*e),l=a%6;return{r:255*[r,i,n,n,s,r][l],g:255*[s,r,r,i,n,n][l],b:255*[n,n,s,r,r,i][l]}}(t.h,i,s),c=!0,u="hsv"):ut(t.h)&&ut(t.s)&&ut(t.l)&&(i=Y(t.s),l=Y(t.l),o=function(t,e,r){var a,o,n;if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)o=r,n=r,a=r;else{var i=r<.5?r*(1+e):r+e-r*e,s=2*r-i;a=Z(s,i,t+1/3),o=Z(s,i,t),n=Z(s,i,t-1/3)}return{r:255*a,g:255*o,b:255*n}}(t.h,i,l),c=!0,u="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=X(n),{ok:c,format:t.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var it="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),st="[\\s|\\(]+(".concat(it,")[,|\\s]+(").concat(it,")[,|\\s]+(").concat(it,")\\s*\\)?"),lt="[\\s|\\(]+(".concat(it,")[,|\\s]+(").concat(it,")[,|\\s]+(").concat(it,")[,|\\s]+(").concat(it,")\\s*\\)?"),ct={CSS_UNIT:new RegExp(it),rgb:new RegExp("rgb"+st),rgba:new RegExp("rgba"+lt),hsl:new RegExp("hsl"+st),hsla:new RegExp("hsla"+lt),hsv:new RegExp("hsv"+st),hsva:new RegExp("hsva"+lt),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 ut(t){return Boolean(ct.CSS_UNIT.exec(String(t)))}var ft=function(){function t(e,r){var a;if(void 0===e&&(e=""),void 0===r&&(r={}),e instanceof t)return e;"number"==typeof e&&(e=function(t){return{r:t>>16,g:(65280&t)>>8,b:255&t}}(e)),this.originalInput=e;var o=nt(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(a=r.format)&&void 0!==a?a:o.format,this.gradientType=r.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.isValid=o.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},t.prototype.getLuminance=function(){var t=this.toRgb(),e=t.r/255,r=t.g/255,a=t.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(t){return this.a=X(t),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){return 0===this.toHsl().s},t.prototype.toHsv=function(){var t=tt(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},t.prototype.toHsvString=function(){var t=tt(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1===this.a?"hsv(".concat(e,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(e,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var t=Q(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},t.prototype.toHslString=function(){var t=Q(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1===this.a?"hsl(".concat(e,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(e,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(t){return void 0===t&&(t=!1),et(this.r,this.g,this.b,t)},t.prototype.toHexString=function(t){return void 0===t&&(t=!1),"#"+this.toHex(t)},t.prototype.toHex8=function(t){return void 0===t&&(t=!1),function(t,e,r,a,o){var n,i=[J(Math.round(t).toString(16)),J(Math.round(e).toString(16)),J(Math.round(r).toString(16)),J((n=a,Math.round(255*parseFloat(n)).toString(16)))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,t)},t.prototype.toHex8String=function(t){return void 0===t&&(t=!1),"#"+this.toHex8(t)},t.prototype.toHexShortString=function(t){return void 0===t&&(t=!1),1===this.a?this.toHexString(t):this.toHex8String(t)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),r=Math.round(this.b);return 1===this.a?"rgb(".concat(t,", ").concat(e,", ").concat(r,")"):"rgba(".concat(t,", ").concat(e,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var t=function(t){return"".concat(Math.round(100*L(t,255)),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var t=function(t){return Math.round(100*L(t,255))};return 1===this.a?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var t="#"+et(this.r,this.g,this.b,!1),e=0,r=Object.entries(ot);e<r.length;e++){var a=r[e],o=a[0];if(t===a[1])return o}return!1},t.prototype.toString=function(t){var e=Boolean(t);t=null!=t?t:this.format;var r=!1,a=this.a<1&&this.a>=0;return e||!a||!t.startsWith("hex")&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this.a?this.toName():this.toRgbString()},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=K(r.l),new t(r)},t.prototype.brighten=function(e){void 0===e&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),new t(r)},t.prototype.darken=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=K(r.l),new t(r)},t.prototype.tint=function(t){return void 0===t&&(t=10),this.mix("white",t)},t.prototype.shade=function(t){return void 0===t&&(t=10),this.mix("black",t)},t.prototype.desaturate=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=K(r.s),new t(r)},t.prototype.saturate=function(e){void 0===e&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=K(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),a=(r.h+e)%360;return r.h=a<0?360+a:a,new t(r)},t.prototype.mix=function(e,r){void 0===r&&(r=50);var a=this.toRgb(),o=new t(e).toRgb(),n=r/100;return new t({r:(o.r-a.r)*n+a.r,g:(o.g-a.g)*n+a.g,b:(o.b-a.b)*n+a.b,a:(o.a-a.a)*n+a.a})},t.prototype.analogous=function(e,r){void 0===e&&(e=6),void 0===r&&(r=30);var a=this.toHsl(),o=360/r,n=[this];for(a.h=(a.h-(o*e>>1)+720)%360;--e;)a.h=(a.h+o)%360,n.push(new t(a));return n},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var r=this.toHsv(),a=r.h,o=r.s,n=r.v,i=[],s=1/e;e--;)i.push(new t({h:a,s:o,v:n})),n=(n+s)%1;return i},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),a=new t(e).toRgb(),o=r.a+a.a*(1-r.a);return new t({r:(r.r*r.a+a.r*a.a*(1-r.a))/o,g:(r.g*r.a+a.g*a.a*(1-r.a))/o,b:(r.b*r.a+a.b*a.a*(1-r.a))/o,a:o})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),a=r.h,o=[this],n=360/e,i=1;i<e;i++)o.push(new t({h:(a+i*n)%360,s:r.s,l:r.l}));return o},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function ht(t,e=20){return t.mix("#141414",e).toString()}const dt=w({name:"ElButton"});var gt=k(w(l(s({},dt),{props:U,emits:G,setup(t,{expose:e,emit:r}){const a=t,o=function(t){const e=W(),r=x("button");return c(()=>{let a={},o=t.color;if(o){const n=o.match(/var\((.*?)\)/);n&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(n[1]));const i=new ft(o),s=t.dark?i.tint(20).toString():ht(i,20);if(t.plain)a=r.cssVarBlock({"bg-color":t.dark?ht(i,90):i.tint(90).toString(),"text-color":o,"border-color":t.dark?ht(i,50):i.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":s,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(a[r.cssVarBlockName("disabled-bg-color")]=t.dark?ht(i,90):i.tint(90).toString(),a[r.cssVarBlockName("disabled-text-color")]=t.dark?ht(i,50):i.tint(50).toString(),a[r.cssVarBlockName("disabled-border-color")]=t.dark?ht(i,80):i.tint(80).toString());else{const n=t.dark?ht(i,30):i.tint(30).toString(),l=i.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(a=r.cssVarBlock({"bg-color":o,"text-color":l,"border-color":o,"hover-bg-color":n,"hover-text-color":l,"hover-border-color":n,"active-bg-color":s,"active-border-color":s}),e.value){const e=t.dark?ht(i,50):i.tint(50).toString();a[r.cssVarBlockName("disabled-bg-color")]=e,a[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,a[r.cssVarBlockName("disabled-border-color")]=e}}}return a})}(a),n=x("button"),{_ref:i,_size:s,_type:l,_disabled:p,_props:b,_plain:v,_round:m,_text:y,shouldAddSpace:k,handleClick:w}=((t,e)=>{P({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},c(()=>"text"===t.type));const r=u(D,void 0),a=f("button"),{form:o}=C(),n=T(c(()=>null==r?void 0:r.size)),i=W(),s=h(),l=d(),p=c(()=>{var e;return t.type||(null==r?void 0:r.type)||(null==(e=a.value)?void 0:e.type)||""}),b=c(()=>{var e,r,o;return null!=(o=null!=(r=t.autoInsertSpace)?r:null==(e=a.value)?void 0:e.autoInsertSpace)&&o}),v=c(()=>{var e,r,o;return null!=(o=null!=(r=t.plain)?r:null==(e=a.value)?void 0:e.plain)&&o}),m=c(()=>{var e,r,o;return null!=(o=null!=(r=t.round)?r:null==(e=a.value)?void 0:e.round)&&o}),y=c(()=>{var e,r,o;return null!=(o=null!=(r=t.text)?r:null==(e=a.value)?void 0:e.text)&&o}),x=c(()=>"button"===t.tag?{ariaDisabled:i.value||t.loading,disabled:i.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),k=c(()=>{var t;const e=null==(t=l.default)?void 0:t.call(l);if(b.value&&1===(null==e?void 0:e.length)){const t=e[0];if((null==t?void 0:t.type)===g){const e=t.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(e.trim())}}return!1});return{_disabled:i,_size:n,_type:p,_ref:s,_props:x,_plain:v,_round:m,_text:y,shouldAddSpace:k,handleClick:r=>{i.value||t.loading?r.stopPropagation():("reset"===t.nativeType&&(null==o||o.resetFields()),e("click",r))}}})(a,r),V=c(()=>[n.b(),n.m(l.value),n.m(s.value),n.is("disabled",p.value),n.is("loading",a.loading),n.is("plain",v.value),n.is("round",m.value),n.is("circle",a.circle),n.is("text",y.value),n.is("link",a.link),n.is("has-bg",a.bg)]);return e({ref:i,size:s,type:l,disabled:p,shouldAddSpace:k}),(t,e)=>(M(),S($(t.tag),O({ref_key:"_ref",ref:i},F(b),{class:F(V),style:F(o),onClick:F(w)}),{default:A(()=>[t.loading?(M(),H(B,{key:0},[t.$slots.loading?R(t.$slots,"loading",{key:0}):(M(),S(F(N),{key:1,class:j(F(n).is("loading"))},{default:A(()=>[(M(),S($(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||t.$slots.icon?(M(),S(F(N),{key:1},{default:A(()=>[t.icon?(M(),S($(t.icon),{key:0})):R(t.$slots,"icon",{key:1})]),_:3})):_("v-if",!0),t.$slots.default?(M(),H("span",{key:2,class:j({[F(n).em("text","expand")]:F(k)})},[R(t.$slots,"default")],2)):_("v-if",!0)]),_:3},16,["class","style","onClick"]))}})),[["__file","button.vue"]]);const pt={size:U.size,type:U.type},bt=w({name:"ElButtonGroup"});var vt=k(w(l(s({},bt),{props:pt,setup(t){const e=t;V(D,E({size:I(e,"size"),type:I(e,"type")}));const r=x("button");return(t,e)=>(M(),H("div",{class:j(F(r).b("group"))},[R(t.$slots,"default")],2))}})),[["__file","button-group.vue"]]);const mt=q(gt,{ButtonGroup:vt});z(vt);export{mt as E,ft as T};