import{co as e,aK as n,aC as r,aE as o,aM as t,aN as a,aT as i,bV as l,b$ as s}from"./index.js?v=1723125373998";import{l as d,k as c,p as u,L as g,F as h}from"./vue.js?v=1723125373998";let m=!1;const b={name:"Skeleton",common:n,self:e=>{const{heightSmall:n,heightMedium:r,heightLarge:o,borderRadius:t}=e;return{color:"#eee",colorEnd:"#ddd",borderRadius:t,heightSmall:n,heightMedium:r,heightLarge:o}}},p=r([o("skeleton","\n height: 1em;\n width: 100%;\n transition:\n --n-color-start .3s var(--n-bezier),\n --n-color-end .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n animation: 2s skeleton-loading infinite cubic-bezier(0.36, 0, 0.64, 1);\n background-color: var(--n-color-start);\n "),r("@keyframes skeleton-loading","\n 0% {\n background: var(--n-color-start);\n }\n 40% {\n background: var(--n-color-end);\n }\n 80% {\n background: var(--n-color-start);\n }\n 100% {\n background: var(--n-color-start);\n }\n ")]),v=d({name:"Skeleton",inheritAttrs:!1,props:Object.assign(Object.assign({},a.props),{text:Boolean,round:Boolean,circle:Boolean,height:[String,Number],width:[String,Number],size:String,repeat:{type:Number,default:1},animated:{type:Boolean,default:!0},sharp:{type:Boolean,default:!0}}),setup(n){!function(){if(e&&window.CSS&&!m&&(m=!0,"registerProperty"in(null===window||void 0===window?void 0:window.CSS)))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch(n){}}();const{mergedClsPrefixRef:r}=t(n),o=a("Skeleton","-skeleton",p,b,n,r);return{mergedClsPrefix:r,style:c((()=>{var e,r;const t=o.value,{common:{cubicBezierEaseInOut:a}}=t,s=t.self,{color:d,colorEnd:c,borderRadius:u}=s;let g;const{circle:h,sharp:m,round:b,width:p,height:v,size:f,text:k,animated:y}=n;void 0!==f&&(g=s[i("height",f)]);const S=h?null!==(e=null!=p?p:v)&&void 0!==e?e:g:p,w=null!==(r=h&&null!=p?p:v)&&void 0!==r?r:g;return{display:k?"inline-block":"",verticalAlign:k?"-0.125em":"",borderRadius:h?"50%":b?"4096px":m?"":u,width:"number"==typeof S?l(S):S,height:"number"==typeof w?l(w):w,animation:y?"":"none","--n-bezier":a,"--n-color-start":d,"--n-color-end":c}}))}},render(){const{repeat:e,style:n,mergedClsPrefix:r,$attrs:o}=this,t=u("div",g({class:"".concat(r,"-skeleton"),style:n},o));return e>1?u(h,null,s(e,null).map((e=>[t,"\n"]))):t}});export{v as _};
