owncast/static/web/_next/static/chunks/3243-eadd2072054b8853.js
2024-06-17 12:34:10 +00:00

1 line
No EOL
20 KiB
JavaScript
Vendored

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3243],{3243:function(e,t,n){n.d(t,{Z:function(){return ei}});var a=n(4942),r=n(87462),o=n(33202),i=n(48149),c=n(1413),l=n(67294),u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},s=n(97902),f=l.forwardRef(function(e,t){return l.createElement(s.Z,(0,c.Z)((0,c.Z)({},e),{},{ref:t,icon:u}))}),d=n(93967),v=n.n(d),m=n(97685),b=n(71002),p=n(45987),h=n(48880),y=n(54043),Z=n(58193),g=(0,l.createContext)(null),E=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.className,r=e.style,o=e.id,i=e.active,c=e.tabKey,u=e.children;return l.createElement("div",{id:o&&"".concat(o,"-panel-").concat(c),role:"tabpanel",tabIndex:i?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(c),"aria-hidden":!i,style:r,className:v()(n,i&&"".concat(n,"-active"),a),ref:t},u)}),k=["key","forceRender","style","className"];function x(e){var t=e.id,n=e.activeKey,o=e.animated,i=e.tabPosition,u=e.destroyInactiveTabPane,s=l.useContext(g),f=s.prefixCls,d=s.tabs,m=o.tabPane,b="".concat(f,"-tabpane");return l.createElement("div",{className:v()("".concat(f,"-content-holder"))},l.createElement("div",{className:v()("".concat(f,"-content"),"".concat(f,"-content-").concat(i),(0,a.Z)({},"".concat(f,"-content-animated"),m))},d.map(function(e){var a=e.key,i=e.forceRender,s=e.style,f=e.className,d=(0,p.Z)(e,k),h=a===n;return l.createElement(Z.default,(0,r.Z)({key:a,visible:h,forceRender:i,removeOnLeave:!!u,leavedClassName:"".concat(b,"-hidden")},o.tabPaneMotion),function(e,n){var o=e.style,i=e.className;return l.createElement(E,(0,r.Z)({},d,{prefixCls:b,id:t,tabKey:a,animated:m,active:h,style:(0,c.Z)((0,c.Z)({},s),o),className:v()(f,i),ref:n}))})})))}var C=n(74902),w=n(48555),P=n(25849),N=n(84184),T=n(91463),S={width:0,height:0,left:0,top:0};function I(e,t){var n=l.useRef(e),a=l.useState({}),r=(0,m.Z)(a,2)[1];return[n.current,function(e){var a="function"==typeof e?e(n.current):e;a!==n.current&&t(a,n.current),n.current=a,r({})}]}var R=n(14032);function M(e){var t=(0,l.useState)(0),n=(0,m.Z)(t,2),a=n[0],r=n[1],o=(0,l.useRef)(0),i=(0,l.useRef)();return i.current=e,(0,R.o)(function(){var e;null===(e=i.current)||void 0===e||e.call(i)},[a]),function(){o.current===a&&(o.current+=1,r(o.current))}}var B={width:0,height:0,left:0,top:0,right:0};function L(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}function O(e){return String(e).replace(/"/g,"TABS_DQ")}var A=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.editable,r=e.locale,o=e.style;return a&&!1!==a.showAdd?l.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==r?void 0:r.addAriaLabel)||"Add tab",onClick:function(e){a.onEdit("add",{event:e})}},a.addIcon||"+"):null}),D=l.forwardRef(function(e,t){var n,a=e.position,r=e.prefixCls,o=e.extra;if(!o)return null;var i={};return"object"!==(0,b.Z)(o)||l.isValidElement(o)?i.right=o:i=o,"right"===a&&(n=i.right),"left"===a&&(n=i.left),n?l.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},n):null}),j=n(60057),K=n(97868),_=n(28778),q=l.memo(l.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,o=e.tabs,i=e.locale,c=e.mobile,u=e.moreIcon,s=e.moreTransitionName,f=e.style,d=e.className,b=e.editable,p=e.tabBarGutter,h=e.rtl,y=e.removeAriaLabel,Z=e.onTabClick,g=e.getPopupContainer,E=e.popupClassName,k=(0,l.useState)(!1),x=(0,m.Z)(k,2),C=x[0],w=x[1],P=(0,l.useState)(null),N=(0,m.Z)(P,2),T=N[0],S=N[1],I="".concat(r,"-more-popup"),R="".concat(n,"-dropdown"),M=null!==T?"".concat(I,"-").concat(T):null,B=null==i?void 0:i.dropdownAriaLabel,L=l.createElement(K.ZP,{onClick:function(e){Z(e.key,e.domEvent),w(!1)},prefixCls:"".concat(R,"-menu"),id:I,tabIndex:-1,role:"listbox","aria-activedescendant":M,selectedKeys:[T],"aria-label":void 0!==B?B:"expanded dropdown"},o.map(function(e){var t=b&&!1!==e.closable&&!e.disabled;return l.createElement(K.sN,{key:e.key,id:"".concat(I,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},l.createElement("span",null,e.label),t&&l.createElement("button",{type:"button","aria-label":y||"remove",tabIndex:0,className:"".concat(R,"-menu-item-remove"),onClick:function(t){var n;t.stopPropagation(),n=e.key,t.preventDefault(),t.stopPropagation(),b.onEdit("remove",{key:n,event:t})}},e.closeIcon||b.removeIcon||"\xd7"))}));function O(e){for(var t=o.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===T})||0,a=t.length,r=0;r<a;r+=1){var i=t[n=(n+e+a)%a];if(!i.disabled){S(i.key);return}}}(0,l.useEffect)(function(){var e=document.getElementById(M);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[T]),(0,l.useEffect)(function(){C||S(null)},[C]);var D=(0,a.Z)({},h?"marginRight":"marginLeft",p);o.length||(D.visibility="hidden",D.order=1);var q=v()((0,a.Z)({},"".concat(R,"-rtl"),h)),W=c?null:l.createElement(j.Z,{prefixCls:R,overlay:L,trigger:["hover"],visible:!!o.length&&C,transitionName:s,onVisibleChange:w,overlayClassName:v()(q,E),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:g},l.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:D,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":I,id:"".concat(r,"-more"),"aria-expanded":C,onKeyDown:function(e){var t=e.which;if(!C){[_.Z.DOWN,_.Z.SPACE,_.Z.ENTER].includes(t)&&(w(!0),e.preventDefault());return}switch(t){case _.Z.UP:O(-1),e.preventDefault();break;case _.Z.DOWN:O(1),e.preventDefault();break;case _.Z.ESC:w(!1);break;case _.Z.SPACE:case _.Z.ENTER:null!==T&&Z(T,e)}}},void 0===u?"More":u));return l.createElement("div",{className:v()("".concat(n,"-nav-operations"),d),style:f,ref:t},W,l.createElement(A,{prefixCls:n,locale:i,editable:b}))}),function(e,t){return t.tabMoving}),W=function(e){var t,n=e.prefixCls,r=e.id,o=e.active,i=e.tab,c=i.key,u=i.label,s=i.disabled,f=i.closeIcon,d=e.closable,m=e.renderWrapper,b=e.removeAriaLabel,p=e.editable,h=e.onClick,y=e.onFocus,Z=e.style,g="".concat(n,"-tab"),E=p&&!1!==d&&!s;function k(e){s||h(e)}var x=l.createElement("div",{key:c,"data-node-key":O(c),className:v()(g,(t={},(0,a.Z)(t,"".concat(g,"-with-remove"),E),(0,a.Z)(t,"".concat(g,"-active"),o),(0,a.Z)(t,"".concat(g,"-disabled"),s),t)),style:Z,onClick:k},l.createElement("div",{role:"tab","aria-selected":o,id:r&&"".concat(r,"-tab-").concat(c),className:"".concat(g,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(c),"aria-disabled":s,tabIndex:s?null:0,onClick:function(e){e.stopPropagation(),k(e)},onKeyDown:function(e){[_.Z.SPACE,_.Z.ENTER].includes(e.which)&&(e.preventDefault(),k(e))},onFocus:y},u),E&&l.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(g,"-remove"),onClick:function(e){e.stopPropagation(),e.preventDefault(),e.stopPropagation(),p.onEdit("remove",{key:c,event:e})}},f||p.removeIcon||"\xd7"));return m?m(x):x},V=function(e){var t=e.current||{},n=t.offsetWidth,a=t.offsetHeight;return[void 0===n?0:n,void 0===a?0:a]},z=function(e,t){return e[t?0:1]},G=l.forwardRef(function(e,t){var n,o,i,u,s,f,d,b,p,h,y,Z,E,k,x,R,j,K,_,G,F,H,X,Y,J,Q,U,$,ee,et,en,ea,er,eo,ei,ec,el,eu,es,ef,ed=l.useContext(g),ev=ed.prefixCls,em=ed.tabs,eb=e.className,ep=e.style,eh=e.id,ey=e.animated,eZ=e.activeKey,eg=e.rtl,eE=e.extra,ek=e.editable,ex=e.locale,eC=e.tabPosition,ew=e.tabBarGutter,eP=e.children,eN=e.onTabClick,eT=e.onTabScroll,eS=(0,l.useRef)(),eI=(0,l.useRef)(),eR=(0,l.useRef)(),eM=(0,l.useRef)(),eB=(0,l.useRef)(),eL=(0,l.useRef)(),eO=(0,l.useRef)(),eA="top"===eC||"bottom"===eC,eD=I(0,function(e,t){eA&&eT&&eT({direction:e>t?"left":"right"})}),ej=(0,m.Z)(eD,2),eK=ej[0],e_=ej[1],eq=I(0,function(e,t){!eA&&eT&&eT({direction:e>t?"top":"bottom"})}),eW=(0,m.Z)(eq,2),eV=eW[0],ez=eW[1],eG=(0,l.useState)([0,0]),eF=(0,m.Z)(eG,2),eH=eF[0],eX=eF[1],eY=(0,l.useState)([0,0]),eJ=(0,m.Z)(eY,2),eQ=eJ[0],eU=eJ[1],e$=(0,l.useState)([0,0]),e0=(0,m.Z)(e$,2),e1=e0[0],e2=e0[1],e8=(0,l.useState)([0,0]),e4=(0,m.Z)(e8,2),e6=e4[0],e7=e4[1],e9=(n=new Map,o=(0,l.useRef)([]),i=(0,l.useState)({}),u=(0,m.Z)(i,2)[1],s=(0,l.useRef)("function"==typeof n?n():n),f=M(function(){var e=s.current;o.current.forEach(function(t){e=t(e)}),o.current=[],s.current=e,u({})}),[s.current,function(e){o.current.push(e),f()}]),e3=(0,m.Z)(e9,2),e5=e3[0],te=e3[1],tt=(d=eQ[0],(0,l.useMemo)(function(){for(var e=new Map,t=e5.get(null===(r=em[0])||void 0===r?void 0:r.key)||S,n=t.left+t.width,a=0;a<em.length;a+=1){var r,o,i=em[a].key,l=e5.get(i);l||(l=e5.get(null===(o=em[a-1])||void 0===o?void 0:o.key)||S);var u=e.get(i)||(0,c.Z)({},l);u.right=n-u.left-u.width,e.set(i,u)}return e},[em.map(function(e){return e.key}).join("_"),e5,d])),tn=z(eH,eA),ta=z(eQ,eA),tr=z(e1,eA),to=z(e6,eA),ti=tn<ta+tr,tc=ti?tn-to:tn-tr,tl="".concat(ev,"-nav-operations-hidden"),tu=0,ts=0;function tf(e){return e<tu?tu:e>ts?ts:e}eA&&eg?(tu=0,ts=Math.max(0,ta-tc)):(tu=Math.min(0,tc-ta),ts=0);var td=(0,l.useRef)(),tv=(0,l.useState)(),tm=(0,m.Z)(tv,2),tb=tm[0],tp=tm[1];function th(){tp(Date.now())}function ty(){window.clearTimeout(td.current)}b=function(e,t){function n(e,t){e(function(e){return tf(e+t)})}return!!ti&&(eA?n(e_,e):n(ez,t),ty(),th(),!0)},p=(0,l.useState)(),y=(h=(0,m.Z)(p,2))[0],Z=h[1],E=(0,l.useState)(0),x=(k=(0,m.Z)(E,2))[0],R=k[1],j=(0,l.useState)(0),_=(K=(0,m.Z)(j,2))[0],G=K[1],F=(0,l.useState)(),X=(H=(0,m.Z)(F,2))[0],Y=H[1],J=(0,l.useRef)(),Q=(0,l.useRef)(),(U=(0,l.useRef)(null)).current={onTouchStart:function(e){var t=e.touches[0];Z({x:t.screenX,y:t.screenY}),window.clearInterval(J.current)},onTouchMove:function(e){if(y){e.preventDefault();var t=e.touches[0],n=t.screenX,a=t.screenY;Z({x:n,y:a});var r=n-y.x,o=a-y.y;b(r,o);var i=Date.now();R(i),G(i-x),Y({x:r,y:o})}},onTouchEnd:function(){if(y&&(Z(null),Y(null),X)){var e=X.x/_,t=X.y/_;if(!(.1>Math.max(Math.abs(e),Math.abs(t)))){var n=e,a=t;J.current=window.setInterval(function(){if(.01>Math.abs(n)&&.01>Math.abs(a)){window.clearInterval(J.current);return}n*=.9046104802746175,a*=.9046104802746175,b(20*n,20*a)},20)}}},onWheel:function(e){var t=e.deltaX,n=e.deltaY,a=0,r=Math.abs(t),o=Math.abs(n);r===o?a="x"===Q.current?t:n:r>o?(a=t,Q.current="x"):(a=n,Q.current="y"),b(-a,-a)&&e.preventDefault()}},l.useEffect(function(){function e(e){U.current.onTouchMove(e)}function t(e){U.current.onTouchEnd(e)}return document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",t,{passive:!1}),eM.current.addEventListener("touchstart",function(e){U.current.onTouchStart(e)},{passive:!1}),eM.current.addEventListener("wheel",function(e){U.current.onWheel(e)}),function(){document.removeEventListener("touchmove",e),document.removeEventListener("touchend",t)}},[]),(0,l.useEffect)(function(){return ty(),tb&&(td.current=window.setTimeout(function(){tp(0)},100)),ty},[tb]);var tZ=($=eA?eK:eV,er=(ee=(0,c.Z)((0,c.Z)({},e),{},{tabs:em})).tabs,eo=ee.tabPosition,ei=ee.rtl,["top","bottom"].includes(eo)?(et="width",en=ei?"right":"left",ea=Math.abs($)):(et="height",en="top",ea=-$),(0,l.useMemo)(function(){if(!er.length)return[0,0];for(var e=er.length,t=e,n=0;n<e;n+=1){var a=tt.get(er[n].key)||B;if(a[en]+a[et]>ea+tc){t=n-1;break}}for(var r=0,o=e-1;o>=0;o-=1)if((tt.get(er[o].key)||B)[en]<ea){r=o+1;break}return[r,t]},[tt,tc,ta,tr,to,ea,eo,er.map(function(e){return e.key}).join("_"),ei])),tg=(0,m.Z)(tZ,2),tE=tg[0],tk=tg[1],tx=(0,P.Z)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eZ,t=tt.get(e)||{width:0,height:0,left:0,right:0,top:0};if(eA){var n=eK;eg?t.right<eK?n=t.right:t.right+t.width>eK+tc&&(n=t.right+t.width-tc):t.left<-eK?n=-t.left:t.left+t.width>-eK+tc&&(n=-(t.left+t.width-tc)),ez(0),e_(tf(n))}else{var a=eV;t.top<-eV?a=-t.top:t.top+t.height>-eV+tc&&(a=-(t.top+t.height-tc)),e_(0),ez(tf(a))}}),tC={};"top"===eC||"bottom"===eC?tC[eg?"marginRight":"marginLeft"]=ew:tC.marginTop=ew;var tw=em.map(function(e,t){var n=e.key;return l.createElement(W,{id:eh,prefixCls:ev,key:n,tab:e,style:0===t?void 0:tC,closable:e.closable,editable:ek,active:n===eZ,renderWrapper:eP,removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,onClick:function(e){eN(n,e)},onFocus:function(){tx(n),th(),eM.current&&(eg||(eM.current.scrollLeft=0),eM.current.scrollTop=0)}})}),tP=function(){return te(function(){var e=new Map;return em.forEach(function(t){var n,a=t.key,r=null===(n=eB.current)||void 0===n?void 0:n.querySelector('[data-node-key="'.concat(O(a),'"]'));r&&e.set(a,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})}),e})};(0,l.useEffect)(function(){tP()},[em.map(function(e){return e.key}).join("_")]);var tN=M(function(){var e=V(eS),t=V(eI),n=V(eR);eX([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var a=V(eO);e2(a),e7(V(eL));var r=V(eB);eU([r[0]-a[0],r[1]-a[1]]),tP()}),tT=em.slice(0,tE),tS=em.slice(tk+1),tI=[].concat((0,C.Z)(tT),(0,C.Z)(tS)),tR=(0,l.useState)(),tM=(0,m.Z)(tR,2),tB=tM[0],tL=tM[1],tO=tt.get(eZ),tA=(0,l.useRef)();function tD(){N.Z.cancel(tA.current)}(0,l.useEffect)(function(){var e={};return tO&&(eA?(eg?e.right=tO.right:e.left=tO.left,e.width=tO.width):(e.top=tO.top,e.height=tO.height)),tD(),tA.current=(0,N.Z)(function(){tL(e)}),tD},[tO,eA,eg]),(0,l.useEffect)(function(){tx()},[eZ,tu,ts,L(tO),L(tt),eA]),(0,l.useEffect)(function(){tN()},[eg]);var tj=!!tI.length,tK="".concat(ev,"-nav-wrap");return eA?eg?(eu=eK>0,el=eK!==ts):(el=eK<0,eu=eK!==tu):(es=eV<0,ef=eV!==tu),l.createElement(w.default,{onResize:tN},l.createElement("div",{ref:(0,T.x1)(t,eS),role:"tablist",className:v()("".concat(ev,"-nav"),eb),style:ep,onKeyDown:function(){th()}},l.createElement(D,{ref:eI,position:"left",extra:eE,prefixCls:ev}),l.createElement("div",{className:v()(tK,(ec={},(0,a.Z)(ec,"".concat(tK,"-ping-left"),el),(0,a.Z)(ec,"".concat(tK,"-ping-right"),eu),(0,a.Z)(ec,"".concat(tK,"-ping-top"),es),(0,a.Z)(ec,"".concat(tK,"-ping-bottom"),ef),ec)),ref:eM},l.createElement(w.default,{onResize:tN},l.createElement("div",{ref:eB,className:"".concat(ev,"-nav-list"),style:{transform:"translate(".concat(eK,"px, ").concat(eV,"px)"),transition:tb?"none":void 0}},tw,l.createElement(A,{ref:eO,prefixCls:ev,locale:ex,editable:ek,style:(0,c.Z)((0,c.Z)({},0===tw.length?void 0:tC),{},{visibility:tj?"hidden":null})}),l.createElement("div",{className:v()("".concat(ev,"-ink-bar"),(0,a.Z)({},"".concat(ev,"-ink-bar-animated"),ey.inkBar)),style:tB})))),l.createElement(q,(0,r.Z)({},e,{removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,ref:eL,prefixCls:ev,tabs:tI,className:!tj&&tl,tabMoving:!!tb})),l.createElement(D,{ref:eR,position:"right",extra:eE,prefixCls:ev})))}),F=["renderTabBar"],H=["label","key"];function X(e){var t=e.renderTabBar,n=(0,p.Z)(e,F),a=l.useContext(g).tabs;return t?t((0,c.Z)((0,c.Z)({},n),{},{panes:a.map(function(e){var t=e.label,n=e.key,a=(0,p.Z)(e,H);return l.createElement(E,(0,r.Z)({tab:t,key:n,tabKey:n},a))})}),G):l.createElement(G,n)}n(10341);var Y=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName"],J=0,Q=l.forwardRef(function(e,t){var n,o,i=e.id,u=e.prefixCls,s=void 0===u?"rc-tabs":u,f=e.className,d=e.items,Z=e.direction,E=e.activeKey,k=e.defaultActiveKey,C=e.editable,w=e.animated,P=e.tabPosition,N=void 0===P?"top":P,T=e.tabBarGutter,S=e.tabBarStyle,I=e.tabBarExtraContent,R=e.locale,M=e.moreIcon,B=e.moreTransitionName,L=e.destroyInactiveTabPane,O=e.renderTabBar,A=e.onChange,D=e.onTabClick,j=e.onTabScroll,K=e.getPopupContainer,_=e.popupClassName,q=(0,p.Z)(e,Y),W=l.useMemo(function(){return(d||[]).filter(function(e){return e&&"object"===(0,b.Z)(e)&&"key"in e})},[d]),V="rtl"===Z,z=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:(0,c.Z)({inkBar:!0},"object"===(0,b.Z)(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(w),G=(0,l.useState)(!1),F=(0,m.Z)(G,2),H=F[0],Q=F[1];(0,l.useEffect)(function(){Q((0,h.Z)())},[]);var U=(0,y.Z)(function(){var e;return null===(e=W[0])||void 0===e?void 0:e.key},{value:E,defaultValue:k}),$=(0,m.Z)(U,2),ee=$[0],et=$[1],en=(0,l.useState)(function(){return W.findIndex(function(e){return e.key===ee})}),ea=(0,m.Z)(en,2),er=ea[0],eo=ea[1];(0,l.useEffect)(function(){var e,t=W.findIndex(function(e){return e.key===ee});-1===t&&(t=Math.max(0,Math.min(er,W.length-1)),et(null===(e=W[t])||void 0===e?void 0:e.key)),eo(t)},[W.map(function(e){return e.key}).join("_"),ee,er]);var ei=(0,y.Z)(null,{value:i}),ec=(0,m.Z)(ei,2),el=ec[0],eu=ec[1];(0,l.useEffect)(function(){i||(eu("rc-tabs-".concat(J)),J+=1)},[]);var es={id:el,activeKey:ee,animated:z,tabPosition:N,rtl:V,mobile:H},ef=(0,c.Z)((0,c.Z)({},es),{},{editable:C,locale:R,moreIcon:M,moreTransitionName:B,tabBarGutter:T,onTabClick:function(e,t){null==D||D(e,t);var n=e!==ee;et(e),n&&(null==A||A(e))},onTabScroll:j,extra:I,style:S,panes:null,getPopupContainer:K,popupClassName:_});return l.createElement(g.Provider,{value:{tabs:W,prefixCls:s}},l.createElement("div",(0,r.Z)({ref:t,id:i,className:v()(s,"".concat(s,"-").concat(N),(n={},(0,a.Z)(n,"".concat(s,"-mobile"),H),(0,a.Z)(n,"".concat(s,"-editable"),C),(0,a.Z)(n,"".concat(s,"-rtl"),V),n),f)},q),o,l.createElement(X,(0,r.Z)({},ef,{renderTabBar:O})),l.createElement(x,(0,r.Z)({destroyInactiveTabPane:L},es,{animated:z}))))}),U=n(93565),$=n(60474),ee=n(71775),et={motionAppear:!1,motionEnter:!0,motionLeave:!0},en=n(74533),ea=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},er=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function eo(e){var t,n=e.type,c=e.className,u=e.size,s=e.onEdit,d=e.hideAdd,m=e.centered,p=e.addIcon,h=e.children,y=e.items,Z=e.animated,g=er(e,["type","className","size","onEdit","hideAdd","centered","addIcon","children","items","animated"]),E=g.prefixCls,k=g.moreIcon,x=void 0===k?l.createElement(i.Z,null):k,C=l.useContext(U.E_),w=C.getPrefixCls,P=C.direction,N=C.getPopupContainer,T=w("tabs",E);"editable-card"===n&&(t={onEdit:function(e,t){var n=t.key,a=t.event;null==s||s("add"===e?a:n,e)},removeIcon:l.createElement(o.Z,null),addIcon:p||l.createElement(f,null),showAdd:!0!==d});var S=w(),I=y||(0,en.Z)(h).map(function(e){if(l.isValidElement(e)){var t=e.key,n=e.props||{},a=n.tab,o=ea(n,["tab"]);return(0,r.Z)((0,r.Z)({key:String(t)},o),{label:a})}return null}).filter(function(e){return e}),R=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return(t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:(0,r.Z)({inkBar:!0},"object"===(0,b.Z)(n)?n:{})).tabPane&&(t.tabPaneMotion=(0,r.Z)((0,r.Z)({},et),{motionName:(0,ee.mL)(e,"switch")})),t}(T,Z);return l.createElement($.Z.Consumer,null,function(e){var o=void 0!==u?u:e;return l.createElement(Q,(0,r.Z)({direction:P,getPopupContainer:N,moreTransitionName:"".concat(S,"-slide-up")},g,{items:I,className:v()((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(T,"-").concat(o),o),"".concat(T,"-card"),["card","editable-card"].includes(n)),"".concat(T,"-editable-card"),"editable-card"===n),"".concat(T,"-centered"),m),c),editable:t,moreIcon:x,prefixCls:T,animated:R}))})}eo.TabPane=function(){return null};var ei=eo}}]);