System.register(["./preload-helper-legacy.CIXZiioE.js","./motion-legacy.C4TziduP.js","./useState-legacy.C_VuFIfe.js"],function(e,t){"use strict";var o,a,n,r,l,s,i,u,c,d,p,v,m,f,b,g,h,y,w;return{setters:[e=>{o=e.g,a=e.bT,n=e.h,r=e.d,l=e.o,s=e.v,i=e.U,u=e.y,c=e.s,d=e.aC,p=e.k,v=e.u,m=e.a,f=e.i,b=e.e,g=e.x},e=>{h=e.w,y=e.f},e=>{w=e.u}],execute:function(){const t=e=>{const{componentCls:t,colorPrimary:o}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${o})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},C=o("Wave",e=>[t(e)]);function x(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3]&&t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}function E(e){return Number.isNaN(e)?0:e}const T=r({props:{target:u(),className:String},setup(e){const t=c(null),[o,r]=w(null),[u,d]=w([]),[p,v]=w(0),[m,f]=w(0),[b,g]=w(0),[y,C]=w(0),[T,N]=w(!1);function R(){const{target:t}=e,o=getComputedStyle(t);r(function(e){const{borderTopColor:t,borderColor:o,backgroundColor:a}=getComputedStyle(e);return x(t)?t:x(o)?o:x(a)?a:null}(t));const a="static"===o.position,{borderLeftWidth:n,borderTopWidth:l}=o;v(a?t.offsetLeft:E(-parseFloat(n))),f(a?t.offsetTop:E(-parseFloat(l))),g(t.offsetWidth),C(t.offsetHeight);const{borderTopLeftRadius:s,borderTopRightRadius:i,borderBottomLeftRadius:u,borderBottomRightRadius:c}=o;d([s,i,c,u].map(e=>E(parseFloat(e))))}let S,$,L;const k=()=>{clearTimeout(L),h.cancel($),null==S||S.disconnect()},W=()=>{var e;const o=null===(e=t.value)||void 0===e?void 0:e.parentElement;o&&(a(null,o),o.parentElement&&o.parentElement.removeChild(o))};l(()=>{k(),L=setTimeout(()=>{W()},5e3);const{target:t}=e;t&&($=h(()=>{R(),N(!0)}),"undefined"!=typeof ResizeObserver&&(S=new ResizeObserver(R),S.observe(t)))}),s(()=>{k()});const j=e=>{"opacity"===e.propertyName&&W()};return()=>{if(!T.value)return null;const a={left:`${p.value}px`,top:`${m.value}px`,width:`${b.value}px`,height:`${y.value}px`,borderRadius:u.value.map(e=>`${e}px`).join(" ")};return o&&(a["--wave-color"]=o.value),n(i,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[n("div",{ref:t,class:e.className,style:a,onTransitionend:j},null)]})}}});function N(e,t){const o=p();let r;return s(()=>{null==r||r()}),function(){var l;const s=d(o);null==r||r(),!(null===(l=null==t?void 0:t.value)||void 0===l?void 0:l.disabled)&&s&&(r=function(e,t){const o=document.createElement("div");return o.style.position="absolute",o.style.left="0px",o.style.top="0px",null==e||e.insertBefore(o,null==e?void 0:e.firstChild),a(n(T,{target:e,className:t},null),o),()=>{a(null,o),o.parentElement&&o.parentElement.removeChild(o)}}(s,e.value))}}e("W",r({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:o}=t;const a=p(),{prefixCls:n,wave:r}=v("wave",e),[,i]=C(n),u=N(f(()=>b(n.value,i.value)),r);let c;const h=()=>{d(a).removeEventListener("click",c,!0)};return l(()=>{m(()=>e.disabled,()=>{h(),g(()=>{const t=d(a);null==t||t.removeEventListener("click",c,!0),t&&1===t.nodeType&&!e.disabled&&(c=e=>{"INPUT"===e.target.tagName||!y(e.target)||!t.getAttribute||t.getAttribute("disabled")||t.disabled||t.className.includes("disabled")||t.className.includes("-leave")||u()},t.addEventListener("click",c,!0))})},{immediate:!0,flush:"post"})}),s(()=>{h()}),()=>{var e;return null===(e=o.default)||void 0===e?void 0:e.call(o)[0]}}}))}}});
