import{aBasje,aCasnt,aDasht,ciasmt,dgasgt,aqas$t,sasW,easke,b6asme,dasle,rasQ,kasH,Cash,aPasie,ctasZ,b7asCe,aIasT,aRasF,aXaswe,cxasD,oasTe,a1asoe,bmasyt,bnasxt,dhashe,aQaste,aWasge,a_as_t,baasSt,bcasCt,bdasTt,beasot,czaswt,diasit,aKaslt,bTasPt,a$asRt,bbasIt,djasEt,cUasDe,aLasBt,cEasLt,bDasAt,aTasxe,aSasDt,aUasOt}from"./vNwORUzZ.js";import{uaskt,EasMt,MasNt,_asWt}from"./DthsPRuY.js";import{DasHt}from"./CDTKgsv-.js";import{RasFe}from"./DsBtkfRw.js";import{uaszt}from"./jWeiyGsk.js";import{hasGt}from"./CRGbT1rP.js";import{fasKt}from"./BZwHMXHs.js";import{iasXt}from"./BbN7I0i_.js";import{uasVe}from"./Bm2ySzQc.js";import{iasYe}from"./BuV2w3Jf.js";functionjt(e,t,a,i){if(!je(e))returne;t=nt(t,e);for(varo=-1,l=t.length,n=l-1,s=e;s!=null&&++o<l;){varv=ht(t[o]),c=a;if(v==="__proto__"||v==="constructor"||v==="prototype")returne;if(o!=n){varp=s[v];c=void0,c===void0&&(c=je(p)?p:mt(t[o+1])?[]:{})}gt(s,v,c),s=s[v]}returne}functionFt(e,t,a){for(vari=-1,o=t.length,l={};++i<o;){varn=t[i],s=$t(e,n);a(s,n)&&jt(l,nt(n,e),s)}returnl}functionVt(e,t){returnFt(e,t,function(a,i){returnGt(e,i)})}varrt=Kt(function(e,t){returne==null?{}:Vt(e,t)});functionYt(e){constt=W(),a=W(!1);functioni(){for(varo=arguments.length,l=newArray(o),n=0;n<o;n++)l[n]=arguments[n];a.value||(me.cancel(t.value),t.value=me(()=>{e(...l)}))}returnke(()=>{a.value=!0,me.cancel(t.value)}),i}functionUt(e){constt=W([]),a=W(typeofe=="function"?e():e),i=Yt(()=>{letl=a.value;t.value.forEach(n=>{l=n(l)}),t.value=[],a.value=l});functiono(l){t.value.push(l),i()}return[a,o]}constqt=le({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:i}=t;consto=Q();functionl(v){varc;!((c=e.tab)===null||c===void0)&&c.disabled||e.onClick(v)}a({domRef:o});functionn(v){varc;v.preventDefault(),v.stopPropagation(),e.editable.onEdit("remove",{key:(c=e.tab)===null||c===void0?void0:c.key,event:v})}consts=H(()=>{varv;returne.editable&&e.closable!==!1&&!(!((v=e.tab)===null||v===void0)&&v.disabled)});return()=>{varv;const{prefixCls:c,id:p,active:S,tab:{key:m,tab:d,disabled:y,closeIcon:x},renderWrapper:w,removeAriaLabel:C,editable:O,onFocus:G}=e,k=`${c}-tab`,r=h("div",{key:m,ref:o,class:ie(k,{[`${k}-with-remove`]:s.value,[`${k}-active`]:S,[`${k}-disabled`]:y}),style:i.style,onClick:l},[h("div",{role:"tab","aria-selected":S,id:p&&`${p}-tab-${m}`,class:`${k}-btn`,"aria-controls":p&&`${p}-panel-${m}`,"aria-disabled":y,tabindex:y?null:0,onClick:g=>{g.stopPropagation(),l(g)},onKeydown:g=>{[Z.SPACE,Z.ENTER].includes(g.which)&&(g.preventDefault(),l(g))},onFocus:G},[typeofd=="function"?d():d]),s.value&&h("button",{type:"button","aria-label":C||"remove",tabindex:0,class:`${k}-remove`,onClick:g=>{g.stopPropagation(),n(g)}},[(x==null?void0:x())||((v=O.removeIcon)===null||v===void0?void0:v.call(O))||"×"])]);returnw?w(r):r}}}),Ue={width:0,height:0,left:0,top:0};functionZt(e,t){consta=Q(newMap);returnCe(()=>{vari,o;constl=newMap,n=e.value,s=t.value.get((i=n[0])===null||i===void0?void0:i.key)||Ue,v=s.left+s.width;for(letc=0;c<n.length;c+=1){const{key:p}=n[c];letS=t.value.get(p);S||(S=t.value.get((o=n[c-1])===null||o===void0?void0:o.key)||Ue);constm=l.get(p)||T({},S);m.right=v-m.left-m.width,l.set(p,m)}a.value=newMap(l)}),a}constst=le({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void0}},setup(e,t){let{expose:a,attrs:i}=t;consto=Q();returna({domRef:o}),()=>{const{prefixCls:l,editable:n,locale:s}=e;return!n||n.showAdd===!1?null:h("button",{ref:o,type:"button",class:`${l}-nav-add`,style:i.style,"aria-label":(s==null?void0:s.addAriaLabel)||"Add ta
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before,&::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,