react-dyn-tabs
Version:
React dynamic tabs with full API
9 lines • 53.2 kB
JavaScript
/**
* react-dyn-tabs - React dynamic tabs with full API
*
* @version v6.2.2
* @homepage https://dev-javascript.github.io/react-dyn-tabs/
* @author dev-javascript javascript.code.dev@gmail.com
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).MoreButtonPlugin=e(t.React)}(this,(function(t){"use strict";var e=function(t){var e=t.getResizerIns,n=t.btnRef,i=t.ctx,o=t.setHiddenTabIDs;this.api=i,this.tablistEl=null,this.getResizerIns=e,this.tablistContainerEl=null,this.tabs=null,this.tabsCount=null,this.btnRef=n,this._setHiddenTabIDs=o};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Object.assign(e.prototype,{setResizer:function(){this.tablistEl=this.btnRef.current.previousSibling,this.tablistContainerEl=this.tablistEl.parentElement.parentElement,this.tablistViewEl=this.tablistContainerEl.parentElement,this._resizer=this.getResizerIns({containerElement:this.tablistContainerEl,buttonElement:this.btnRef.current,tablistElement:this.tablistEl})},installResizer:function(t){var e=this;t.debncListenTo(this.tablistViewEl,(function(){return e.resize()}))},uninstallResizer:function(t){this.tablistViewEl&&t&&t.uninstall(this.tablistViewEl)},_validateTabsCount:function(t){if(this.tabs=this.tablistEl.children,this.tabsCount=this.tabs.length,t.openTabIDs.length!==this.tabsCount)throw new Error("tablist children's length is not equal to openTabIDs length");return!0},resize:function(){var t=this.api,e=t.getData();if(!1===this._validateTabsCount(e))return this._setHiddenTabIDs("");var n=e.openTabIDs,i=e.selectedTabID,o=n.indexOf(i),r=this._resizer.resize(o,t.getOption("direction"),t.getOption("isVertical"));if(!r.length)return this._setHiddenTabIDs("");this._setHiddenTabIDs(r.map((function(t){var e=t.index;return n[e]})).toString())}});var i={exports:{}};(i.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var i=e(t[n]);if(i)return i}};var o=i.exports,r={exports:{}},s=r.exports={};s.isIE=function(t){return(-1!==(e=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/"))&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:undefined}());var e},s.isLegacyOpera=function(){return!!window.opera};var a=r.exports,l={exports:{}};(l.exports={}).getOption=function(t,e,n){var i=t[e];if(null==i&&void 0!==n)return n;return i};var c=l.exports;function u(){var t={},e=0,n=0,i=0;return{add:function(o,r){r||(r=o,o=0),o>n?n=o:o<i&&(i=o),t[o]||(t[o]=[]),t[o].push(r),e++},process:function(){for(var e=i;e<=n;e++)for(var o=t[e],r=0;r<o.length;r++){(0,o[r])()}},size:function(){return e}}}var d="_erd";function f(t){return t[d]}var p={initState:function(t){return t[d]={},f(t)},getState:f,cleanState:function(t){delete t[d]}},h=a,g=o.forEach,b=o.forEach,m=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}},v=function(t){var e={};function n(n){var i=t.get(n);return void 0===i?[]:e[i]||[]}return{get:n,add:function(n,i){var o=t.get(n);e[o]||(e[o]=[]),e[o].push(i)},removeListener:function(t,e){for(var i=n(t),o=0,r=i.length;o<r;++o)if(i[o]===e){i.splice(o,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}},y=function(){var t=1;return{generate:function(){return t++}}},w=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var i=n(t);if(!i)throw new Error("setId required the element to have a resize detection state.");var o=e.generate();return i.id=o,o}}},_=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var i=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n},E=a,x=function(t){var e=(t=t||{}).reporter,n=c.getOption(t,"async",!0),i=c.getOption(t,"auto",!0);i&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var o,r=u(),s=!1;function a(){for(s=!0;r.size();){var t=r;r=u(),t.process()}s=!1}function l(){var t;t=a,o=setTimeout(t,0)}return{add:function(t,e){!s&&i&&n&&0===r.size()&&l(),r.add(t,e)},force:function(t){s||(void 0===t&&(t=n),o&&(clearTimeout(o),o=null),t?l():a())}}},T=p,S=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function o(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function r(t){return i(t).object}return{makeDetectable:function(t,r,s){s||(s=r,r=t,t=null),(t=t||{}).debug,h.isIE(8)?s(r):function(r,s){var a=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),l=!1,c=window.getComputedStyle(r),u=r.offsetWidth,d=r.offsetHeight;function f(){function n(){if("static"===c.position){r.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,i,o){var r=i[o];"auto"!==r&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+o+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+o+" will be set to 0. Element: ",n),n.style.setProperty(o,"0",t.important?"important":""))};n(e,r,c,"top"),n(e,r,c,"right"),n(e,r,c,"bottom"),n(e,r,c,"left")}}""!==c.position&&(n(),l=!0);var o=document.createElement("object");o.style.cssText=a,o.tabIndex=-1,o.type="text/html",o.setAttribute("aria-hidden","true"),o.onload=function(){l||n(),function t(e,n){if(!e.contentDocument){var o=i(e);return o.checkForObjectDocumentTimeoutId&&window.clearTimeout(o.checkForObjectDocumentTimeoutId),void(o.checkForObjectDocumentTimeoutId=setTimeout((function(){o.checkForObjectDocumentTimeoutId=0,t(e,n)}),100))}n(e.contentDocument)}(this,(function(t){s(r)}))},h.isIE()||(o.data="about:blank"),i(r)&&(r.appendChild(o),i(r).object=o,h.isIE()&&(o.data="about:blank"))}i(r).startSize={width:u,height:d},n?n.add(f):f()}(r,s)},addListener:function(t,e){function n(){e(t)}if(h.isIE(8))i(t).object={proxy:n},t.attachEvent("onresize",n);else{var o=r(t);if(!o)throw new Error("Element is not detectable by this strategy.");o.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(i(t)){var e=r(t);e&&(h.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),i(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(t).checkForObjectDocumentTimeoutId),delete i(t).object)}}}},D=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;t.stateHandler.hasState;var o=t.idHandler;if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var r=function(){var t=500,e=500,n=document.createElement("div");n.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var i=document.createElement("div");i.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),i.appendChild(n),document.body.insertBefore(i,document.body.firstChild);var o=t-i.clientWidth,r=e-i.clientHeight;return document.body.removeChild(i),{width:o,height:r}}(),s="erd_scroll_detection_container";function a(t){!function(t,e,n){function i(n,i){i=i||function(e){t.head.appendChild(e)};var o=t.createElement("style");return o.innerHTML=n,o.id=e,i(o),o}if(!t.getElementById(e)){var o=n+"_animation",r=n+"_animation_active",s="/* Created by the element-resize-detector library. */\n";s+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",s+="."+r+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+o,"animation-name: "+o])+" }\n",s+="@-webkit-keyframes "+o+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",i(s+="@keyframes "+o+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,"erd_scroll_detection_scrollbar_style",s)}function l(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function c(t,n,i){if(t.addEventListener)t.addEventListener(n,i);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,i)}}function u(t,n,i){if(t.removeEventListener)t.removeEventListener(n,i);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,i)}}function d(t){return i(t).container.childNodes[0].childNodes[0].childNodes[0]}function f(t){return i(t).container.childNodes[0].childNodes[0].childNodes[1]}return a(window.document),{makeDetectable:function(t,a,u){function p(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(a),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var i=0;i<n.length;i++)e.log(n[i])}}function h(t){var e=i(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function b(){var t=window.getComputedStyle(a),e={};return e.position=t.position,e.width=a.offsetWidth,e.height=a.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function m(){if(p("storeStyle invoked."),i(a)){var t=b();i(a).style=t}else p("Aborting because element has been uninstalled")}function v(t,e,n){i(t).lastWidth=e,i(t).lastHeight=n}function y(){return 2*r.width+1}function w(){return 2*r.height+1}function _(t){return t+10+y()}function E(t){return t+10+w()}function x(t,e,n){var i=d(t),o=f(t),r=_(e),s=E(n),a=function(t){return 2*t+y()}(e),l=function(t){return 2*t+w()}(n);i.scrollLeft=r,i.scrollTop=s,o.scrollLeft=a,o.scrollTop=l}function T(){var t=i(a).container;if(!t){(t=document.createElement("div")).className=s,t.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(a).container=t,function(t){t.className+=" "+s+"_animation_active"}(t),a.appendChild(t);var e=function(){i(a).onRendered&&i(a).onRendered()};c(t,"animationstart",e),i(a).onAnimationStart=e}return t}function S(){if(p("Injecting elements"),i(a)){!function(){var n=i(a).style;if("static"===n.position){a.style.setProperty("position","relative",t.important?"important":"");var o=function(t,e,n,i){var o=n[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};o(e,a,n,"top"),o(e,a,n,"right"),o(e,a,n,"bottom"),o(e,a,n,"left")}}();var n=i(a).container;n||(n=T());var o=r.width,u=r.height,d=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),f=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(function(t,e,n,i){return["left: "+(t=t?t+"px":"0"),"top: "+(e=e?e+"px":"0"),"right: "+(i=i?i+"px":"0"),"bottom: "+(n=n?n+"px":"0")]}(-(1+o),-(1+u),-u,-o))),h=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=l(["position: absolute","left: 0","top: 0"]),m=l(["position: absolute","width: 200%","height: 200%"]),v=document.createElement("div"),y=document.createElement("div"),w=document.createElement("div"),_=document.createElement("div"),E=document.createElement("div"),x=document.createElement("div");v.dir="ltr",v.style.cssText=d,v.className=s,y.className=s,y.style.cssText=f,w.style.cssText=h,_.style.cssText=b,E.style.cssText=g,x.style.cssText=m,w.appendChild(_),E.appendChild(x),y.appendChild(w),y.appendChild(E),v.appendChild(y),n.appendChild(v),c(w,"scroll",S),c(E,"scroll",D),i(a).onExpandScroll=S,i(a).onShrinkScroll=D}else p("Aborting because element has been uninstalled");function S(){var t=i(a);t&&t.onExpand?t.onExpand():p("Aborting expand scroll handler: element has been uninstalled")}function D(){var t=i(a);t&&t.onShrink?t.onShrink():p("Aborting shrink scroll handler: element has been uninstalled")}}function D(){function r(e,n,i){var o=function(t){return d(t).childNodes[0]}(e),r=_(n),s=E(i);o.style.setProperty("width",r+"px",t.important?"important":""),o.style.setProperty("height",s+"px",t.important?"important":"")}function s(s){var c=a.offsetWidth,u=a.offsetHeight,d=c!==i(a).lastWidth||u!==i(a).lastHeight;p("Storing current size",c,u),v(a,c,u),n.add(0,(function(){if(d)if(i(a))if(l()){if(t.debug){var n=a.offsetWidth,s=a.offsetHeight;n===c&&s===u||e.warn(o.get(a),"Scroll: Size changed before updating detector elements.")}r(a,c,u)}else p("Aborting because element container has not been initialized");else p("Aborting because element has been uninstalled")})),n.add(1,(function(){i(a)?l()?x(a,c,u):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),d&&s&&n.add(2,(function(){i(a)?l()?s():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function l(){return!!i(a).container}function c(){p("notifyListenersIfNeeded invoked");var t=i(a);return void 0===i(a).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?p("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void g(i(a).listeners,(function(t){t(a)})))}function u(){p("Scroll detected."),h(a)?p("Scroll event fired while unrendered. Ignoring..."):s(c)}if(p("registerListenersAndPositionElements invoked."),i(a)){i(a).onRendered=function(){if(p("startanimation triggered."),h(a))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var t=d(a),e=f(a);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),s(c))}},i(a).onExpand=u,i(a).onShrink=u;var b=i(a).style;r(a,b.width,b.height)}else p("Aborting because element has been uninstalled")}function O(){if(p("finalizeDomMutation invoked."),i(a)){var t=i(a).style;v(a,t.width,t.height),x(a,t.width,t.height)}else p("Aborting because element has been uninstalled")}function C(){u(a)}function z(){var t;p("Installing..."),i(a).listeners=[],t=b(),i(a).startSize={width:t.width,height:t.height},p("Element start size",i(a).startSize),n.add(0,m),n.add(1,S),n.add(2,D),n.add(3,O),n.add(4,C)}u||(u=a,a=t,t=null),t=t||{},p("Making detectable..."),!function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(a)?z():(p("Element is detached"),T(),p("Waiting until element is attached..."),i(a).onRendered=function(){p("Element is now attached"),z()})},addListener:function(t,e){if(!i(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(t).listeners.push(e)},uninstall:function(t){var e=i(t);e&&(e.onExpandScroll&&u(d(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&u(f(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&u(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:a}};function O(t){return Array.isArray(t)||void 0!==t.length}function C(t){if(Array.isArray(t))return t;var e=[];return b(t,(function(t){e.push(t)})),e}function z(t){return t&&1===t.nodeType}var P=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=y(),i=w({idGenerator:n,stateHandler:T});e=i}var o=t.reporter;o||(o=_(!1===o));var r=I(t,"batchProcessor",x({reporter:o})),s={};s.callOnAdd=!!I(t,"callOnAdd",!0),s.debug=!!I(t,"debug",!1);var a,l=v(e),c=m({stateHandler:T}),u=I(t,"strategy","object"),d=I(t,"important",!1),f={reporter:o,batchProcessor:r,stateHandler:T,idHandler:e,important:d};if("scroll"===u&&(E.isLegacyOpera()?(o.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),u="object"):E.isIE(9)&&(o.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),u="object")),"scroll"===u)a=D(f);else{if("object"!==u)throw new Error("Invalid strategy name: "+u);a=S(f)}var p={};return{listenTo:function(t,n,i){function r(t){var e=l.get(t);b(e,(function(e){e(t)}))}function u(t,e,n){l.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(z(n))n=[n];else{if(!O(n))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=C(n)}var f=0,h=I(t,"callOnAdd",s.callOnAdd),g=I(t,"onReady",(function(){})),m=I(t,"debug",s.debug);b(n,(function(t){T.getState(t)||(T.initState(t),e.set(t));var s=e.get(t);if(m&&o.log("Attaching listener to element",s,t),!c.isDetectable(t))return m&&o.log(s,"Not detectable."),c.isBusy(t)?(m&&o.log(s,"System busy making it detectable"),u(h,t,i),p[s]=p[s]||[],void p[s].push((function(){++f===n.length&&g()}))):(m&&o.log(s,"Making detectable..."),c.markBusy(t,!0),a.makeDetectable({debug:m,important:d},t,(function(t){if(m&&o.log(s,"onElementDetectable"),T.getState(t)){c.markAsDetectable(t),c.markBusy(t,!1),a.addListener(t,r),u(h,t,i);var e=T.getState(t);if(e&&e.startSize){var l=t.offsetWidth,d=t.offsetHeight;e.startSize.width===l&&e.startSize.height===d||r(t)}p[s]&&b(p[s],(function(t){t()}))}else m&&o.log(s,"Element uninstalled before being detectable.");delete p[s],++f===n.length&&g()})));m&&o.log(s,"Already detecable, adding listener."),u(h,t,i),f++})),f===n.length&&g()},removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:function(t){if(!t)return o.error("At least one element is required.");if(z(t))t=[t];else{if(!O(t))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=C(t)}b(t,(function(t){l.removeAllListeners(t),a.uninstall(t),T.cleanState(t)}))},initDocument:function(t){a.initDocument&&a.initDocument(t)}}};function I(t,e,n){var i=t[e];return null==i&&void 0!==n?n:i}var k=n(P),M=function(){var t=k({strategy:"scroll",callOnAdd:!0});return t.debncListenTo=function(e,n){return t.listenTo(e,(i=n,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];clearTimeout(o),o=setTimeout((function(){var t;clearTimeout(o),((t=window).requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)})((function(){return i.apply(void 0,e)}))}),10)}));var i,o},t};function A(t){var e=t.el,n=t.sizeDimension,i=t.sizeDirections;this._el=e,this._sizeDimension=n,this._sizeDirections=i}function R(t,e){this._geElInstance=t.geElInstance,this.els=new Map,this._sizeFactory(e.isVertical)}function B(){return Function.prototype.bind.apply(R,[this||null,{geElInstance:function(t){return new A(t)}}].concat(Array.prototype.slice.call(arguments)))()}A.prototype={getStyle:function(){return this._style=this._style||this._el.currentStyle||window.getComputedStyle(this._el)},getPos:function(){return this._pos=this._pos||this._el.getBoundingClientRect()},getSpacing:function(t){var e=this.getStyle();return parseFloat(e["margin"+t])+parseFloat(e["padding"+t])+parseFloat(e["border"+t+"Width"])},getSize:function(){return this.size=this.size||(e=(t=this).getStyle(),t.getPos()[t._sizeDimension]-parseFloat(e["padding"+t._sizeDirections[0]])-parseFloat(e["padding"+t._sizeDirections[1]])-parseFloat(e["border"+t._sizeDirections[1]+"Width"])-parseFloat(e["border"+t._sizeDirections[0]+"Width"]));var t,e},getFullSize:function(){return this.fullSize=this.fullSize||(e=(t=this).getStyle(),t.getPos()[t._sizeDimension]+parseFloat(e["margin"+t._sizeDirections[0]])+parseFloat(e["margin"+t._sizeDirections[1]]));var t,e}},R.prototype={_sizeFactory:function(t){!0===t?(this._sizeDimension="height",this._sizeDirections=["Top","Bottom"]):(this._sizeDimension="width",this._sizeDirections=["Left","Right"])},getEl:function(t){return this.els.has(t)||this.els.set(t,this._geElInstance({el:t,sizeDimension:this._sizeDimension,sizeDirections:this._sizeDirections})),this.els.get(t)}};var j=function(t,e){var n=e.baseEl,i=e.isVertical,o=e.dir;t.Base.call(this,{isVertical:i}),this.baseEl=n,this._distanceFactory(i,o)},L={_distanceFactory:function(t,e){return this.getDistance=1==t?this._getVerticalDistance:"ltr"===e?this._getLtrDistance:this._getRtlDistance,this},_getVerticalDistance:function(t){var e=this.getEl(this.baseEl);return this._getResult(e.getPos().bottom-this.getEl(t).getPos().bottom-parseFloat(e.getStyle().paddingBottom))},_getRtlDistance:function(t){var e=this.getEl(this.baseEl);return this._getResult(this.getEl(t).getPos().left-e.getPos().left-parseFloat(e.getStyle().paddingLeft))},_getLtrDistance:function(t){var e=this.getEl(this.baseEl);return this._getResult(e.getPos().right-this.getEl(t).getPos().right-parseFloat(e.getStyle().paddingRight))},_getResult:function(t){var e=Object.create({sub:function(t){return this.value=this.value-t,this}});return e.value=t,e}};j.prototype=Object.create(R.prototype),Object.assign(j.prototype,L).constructor=j;var H=j.bind(null,{Base:function(){B.apply(this,arguments)}}),F=function(){var t=arguments;this._setOptions(t[1]),this._tablistEl=null;var e=t[0]().getElManagementIns;this._getElManagementIns=e,this._tabs=null,this._tabsCount=null,this._setEls()};F.prototype={_setOptions:function(t){this._options=Object.assign({},{containerDisplay:"flex",tabDisplay:"inline-flex",buttonElement:null,containerElement:null,tablistElement:null},t)},_setEls:function(){return this._tablistEl=this._options.tablistElement,this._tablistEl.style.overflow="visible",this._options.containerElement.style.overflow="hidden",this._options.containerElement.style.whiteSpace="nowrap",this},_showBtn:function(){this._options.buttonElement.style.opacity=1,this._options.buttonElement.style.position="relative",this._options.buttonElement.style.pointerEvents="all"},_hideBtn:function(){this._options.buttonElement.style.opacity=0,this._options.buttonElement.style.position="absolute",this._options.buttonElement.style.pointerEvents="none"},_checkOverflow:function(t){return this.els.getDistance(t).value<0},_showAll:function(){this._options.containerElement.style.display="none";for(var t=this._options.tabDisplay,e=0,n=this._tablistEl.children,i=n.length;e<i;e++)n[e].style.display=t;this._hideBtn(),this._options.containerElement.style.display=this._options.containerDisplay},_hideTabs:function(t,e,n){var i=[];this._options.containerElement.style.display="none";for(var o=e.index,r=t,s=this._tabsCount;r<s;r++)(n||r!==o)&&(this._tabs[r].style.display="none",i.push({el:this._tabs[r],index:r}));return this._showBtn(),this._options.containerElement.style.display=this._options.containerDisplay,i},_getSelectedTabInfo:function(t,e){var n=e,i=n>=0?t[n]:null;return{index:n,overflowFullSize:!!i&&this.els.getDistance(i).sub(this.els.getEl(this._options.tablistElement).getSpacing(this._btnPositionRelativeToTablist)).sub(this.els.getEl(this._options.buttonElement).getFullSize()).value<=0?this.els.getEl(i).getFullSize():0}},_validateTabsCount:function(){return this._tabs=this._tablistEl.children,this._tabsCount=this._tabs.length,!!this._tabsCount},resize:function(t,e,n){if(void 0===t&&(t=""),void 0===e&&(e="ltr"),void 0===n&&(n=!1),!1===this._validateTabsCount())return[];this._showAll(),this.els=this._getElManagementIns({baseEl:this._options.containerElement,isVertical:n,dir:e});var i=this._tabs[this._tabsCount-1];if(!1===this._checkOverflow(i))return[];var o=this._setBtnPositionRelativeToTablist(n,e)._getSelectedTabInfo(this._tabs,t);return this._validateSliderMinSize(o)?this._hideTabs(this._findFirstHiddenTabIndexFactory(o,this._getSearchBoundries(o),this._getOrder(this._tabs[0],i)),o):this._hideTabs(0,o,!0)},_validateSliderMinSize:function(t){return!(this.els.getEl(this._options.tablistElement).getSpacing(this._btnReversePositionRelativeToTablist)+t.overflowFullSize+this.els.getEl(this._options.tablistElement).getSpacing(this._btnPositionRelativeToTablist)+this.els.getEl(this._options.buttonElement).getFullSize()>=this.els.getEl(this._options.containerElement).getSize())},_getOrder:function(t,e){return Math.abs(this.els.getDistance(e).value)>Math.abs(this.els.getDistance(t).value)?"asc":"desc"},_getSearchBoundries:function(t){var e=t.overflowFullSize,n=t.index;return n<0?[0,this._tabsCount-2]:e>0?[0,n-1]:[n+1,this._tabsCount-2]},_getTabDis:function(t,e){return this.els.getDistance(e).sub(t.overflowFullSize).sub(this.els.getEl(this._options.tablistElement).getSpacing(this._btnPositionRelativeToTablist)).sub(this.els.getEl(this._options.buttonElement).getFullSize())},_findFirstHiddenTabIndexDSCE:function(t,e,n){for(var i=this._tabsCount-1,o=n;o>=e&&this._getTabDis(t,this._tabs[o]).value<=0;o--)i=o;return i},_findFirstHiddenTabIndexASC:function(t,e,n){for(var i=e;i<=n;i++)if(this._getTabDis(t,this._tabs[i]).value<=0)return i;return this._tabsCount-1},_findFirstHiddenTabIndexFactory:function(t,e,n){var i=e[0],o=e[1];return"asc"===n?this._findFirstHiddenTabIndexASC(t,i,o):this._findFirstHiddenTabIndexDSCE(t,i,o)},_setBtnPositionRelativeToTablist:function(t,e){if(!this._btnPositionRelativeToTablist){var n="",i="";1==t?(n="Bottom",i="Top"):"ltr"===e?(n="Right",i="Left"):(n="Left",i="Right"),this._btnPositionRelativeToTablist=n,this._btnReversePositionRelativeToTablist=i}return this}};var N=F.bind(void 0,(function(){return{getElManagementIns:function(t){return new H(t)}}}));var W=function(e,n){var i=n.ctx,o=n.openTabIDs,r=n.selectedTabID,s=t.useState(""),a=s[0],l=s[1],c=e(),u=c.getInstance,d=c.getResizeDetectorIns,f=t.useRef();f.current=f.current||{ins:u(i,l)};var p=f.current.ins,h=o.toString();t.useLayoutEffect((function(){p.setResizer()}),[]),t.useLayoutEffect((function(){var t=d();return p.installResizer(t),function(){p.uninstallResizer(t)}}),[]),t.useLayoutEffect((function(){p.resize()}),[h,r]);var g=i.getOption("moreButtonPlugin_buttonComponent");return t.createElement("div",{ref:p.btnRef,className:i.getSetting("tabClass")+" "+i.getSetting("showMoreContainerClass")},t.createElement(g,{hiddenTabIDs:a,instance:i.userProxy}))}.bind(null,(function(){return{getResizeDetectorIns:M,getInstance:function(n,i){return new e({setHiddenTabIDs:i,btnRef:t.createRef(),getResizerIns:function(t){return new(Function.prototype.bind.apply(N))(t)},ctx:n})}}}));function V(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function q(t){return t instanceof V(t).Element||t instanceof Element}function U(t){return t instanceof V(t).HTMLElement||t instanceof HTMLElement}function G(t){return"undefined"!=typeof ShadowRoot&&(t instanceof V(t).ShadowRoot||t instanceof ShadowRoot)}var X=Math.max,Y=Math.min,J=Math.round;function K(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Q(){return!/^((?!chrome|android).)*safari/i.test(K())}function Z(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),o=1,r=1;e&&U(t)&&(o=t.offsetWidth>0&&J(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&J(i.height)/t.offsetHeight||1);var s=(q(t)?V(t):window).visualViewport,a=!Q()&&n,l=(i.left+(a&&s?s.offsetLeft:0))/o,c=(i.top+(a&&s?s.offsetTop:0))/r,u=i.width/o,d=i.height/r;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $(t){var e=V(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function tt(t){return t?(t.nodeName||"").toLowerCase():null}function et(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function nt(t){return Z(et(t)).left+$(t).scrollLeft}function it(t){return V(t).getComputedStyle(t)}function ot(t){var e=it(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function rt(t,e,n){void 0===n&&(n=!1);var i,o,r=U(e),s=U(e)&&function(t){var e=t.getBoundingClientRect(),n=J(e.width)/t.offsetWidth||1,i=J(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=et(e),l=Z(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==tt(e)||ot(a))&&(c=(i=e)!==V(i)&&U(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:$(i)),U(e)?((u=Z(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=nt(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function st(t){var e=Z(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function at(t){return"html"===tt(t)?t:t.assignedSlot||t.parentNode||(G(t)?t.host:null)||et(t)}function lt(t){return["html","body","#document"].indexOf(tt(t))>=0?t.ownerDocument.body:U(t)&&ot(t)?t:lt(at(t))}function ct(t,e){var n;void 0===e&&(e=[]);var i=lt(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),r=V(i),s=o?[r].concat(r.visualViewport||[],ot(i)?i:[]):i,a=e.concat(s);return o?a:a.concat(ct(at(s)))}function ut(t){return["table","td","th"].indexOf(tt(t))>=0}function dt(t){return U(t)&&"fixed"!==it(t).position?t.offsetParent:null}function ft(t){for(var e=V(t),n=dt(t);n&&ut(n)&&"static"===it(n).position;)n=dt(n);return n&&("html"===tt(n)||"body"===tt(n)&&"static"===it(n).position)?e:n||function(t){var e=/firefox/i.test(K());if(/Trident/i.test(K())&&U(t)&&"fixed"===it(t).position)return null;var n=at(t);for(G(n)&&(n=n.host);U(n)&&["html","body"].indexOf(tt(n))<0;){var i=it(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}var pt="top",ht="bottom",gt="right",bt="left",mt="auto",vt=[pt,ht,gt,bt],yt="start",wt="end",_t="clippingParents",Et="viewport",xt="popper",Tt="reference",St=vt.reduce((function(t,e){return t.concat([e+"-"+yt,e+"-"+wt])}),[]),Dt=[].concat(vt,[mt]).reduce((function(t,e){return t.concat([e,e+"-"+yt,e+"-"+wt])}),[]),Ot=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ct(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function zt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Pt(t,e,n){return e===Et?zt(function(t,e){var n=V(t),i=et(t),o=n.visualViewport,r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;var c=Q();(c||!c&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a+nt(t),y:l}}(t,n)):q(e)?function(t,e){var n=Z(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):zt(function(t){var e,n=et(t),i=$(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+nt(t),l=-i.scrollTop;return"rtl"===it(o||n).direction&&(a+=X(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:l}}(et(t)))}function It(t){var e=ct(at(t)),n=["absolute","fixed"].indexOf(it(t).position)>=0&&U(t)?ft(t):t;return q(n)?e.filter((function(t){return q(t)&&function(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&G(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}(t,n)&&"body"!==tt(t)})):[]}function kt(t){return t.split("-")[0]}function Mt(t){return t.split("-")[1]}function At(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Rt(t){var e,n=t.reference,i=t.element,o=t.placement,r=o?kt(o):null,s=o?Mt(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(r){case pt:e={x:a,y:n.y-i.height};break;case ht:e={x:a,y:n.y+n.height};break;case gt:e={x:n.x+n.width,y:l};break;case bt:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=r?At(r):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case yt:e[c]=e[c]-(n[u]/2-i[u]/2);break;case wt:e[c]=e[c]+(n[u]/2-i[u]/2)}}return e}function Bt(t,e){void 0===e&&(e={});var n,i=e,o=i.placement,r=void 0===o?t.placement:o,s=i.strategy,a=void 0===s?t.strategy:s,l=i.boundary,c=void 0===l?_t:l,u=i.rootBoundary,d=void 0===u?Et:u,f=i.elementContext,p=void 0===f?xt:f,h=i.altBoundary,g=void 0!==h&&h,b=i.padding,m=void 0===b?0:b,v=function(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}("number"!=typeof m?m:(n=m,vt.reduce((function(t,e){return t[e]=n,t}),{}))),y=p===xt?Tt:xt,w=t.rects.popper,_=t.elements[g?y:p],E=function(t,e,n,i){var o="clippingParents"===e?It(t):[].concat(e),r=[].concat(o,[n]),s=r[0],a=r.reduce((function(e,n){var o=Pt(t,n,i);return e.top=X(o.top,e.top),e.right=Y(o.right,e.right),e.bottom=Y(o.bottom,e.bottom),e.left=X(o.left,e.left),e}),Pt(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(q(_)?_:_.contextElement||et(t.elements.popper),c,d,a),x=Z(t.elements.reference),T=Rt({reference:x,element:w,strategy:"absolute",placement:r}),S=zt(Object.assign({},w,T)),D=p===xt?S:x,O={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},C=t.modifiersData.offset;if(p===xt&&C){var z=C[r];Object.keys(O).forEach((function(t){var e=[gt,ht].indexOf(t)>=0?1:-1,n=[pt,ht].indexOf(t)>=0?"y":"x";O[t]+=z[n]*e}))}return O}var jt={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ht(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,r=void 0===o?jt:o;return function(t,e,n){void 0===n&&(n=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},jt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:q(t)?ct(t):t.contextElement?ct(t.contextElement):[],popper:ct(e)};var s,c,f=function(t){var e=Ct(t);return Ot.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(i,a.options.modifiers),c=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=f.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,o=t.effect;if("function"==typeof o){var r=o({state:a,name:e,instance:u,options:i}),s=function(){};l.push(r||s)}})),u.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(Lt(e,n)){a.rects={reference:rt(e,ft(n),"fixed"===a.options.strategy),popper:st(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var o=a.orderedModifiers[i],r=o.fn,s=o.options,l=void 0===s?{}:s,d=o.name;"function"==typeof r&&(a=r({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){u.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(o())}))}))),s}),destroy:function(){d(),c=!0}};if(!Lt(t,e))return u;function d(){l.forEach((function(t){return t()})),l=[]}return u.setOptions(n).then((function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)})),u}}var Ft={passive:!0};var Nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,r=void 0===o||o,s=i.resize,a=void 0===s||s,l=V(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,Ft)})),a&&l.addEventListener("resize",n.update,Ft),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,Ft)})),a&&l.removeEventListener("resize",n.update,Ft)}},data:{}};var Wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e,n=t.popper,i=t.popperRect,o=t.placement,r=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=s.x,p=void 0===f?0:f,h=s.y,g=void 0===h?0:h,b="function"==typeof u?u({x:p,y:g}):{x:p,y:g};p=b.x,g=b.y;var m=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=bt,w=pt,_=window;if(c){var E=ft(n),x="clientHeight",T="clientWidth";if(E===V(n)&&"static"!==it(E=et(n)).position&&"absolute"===a&&(x="scrollHeight",T="scrollWidth"),o===pt||(o===bt||o===gt)&&r===wt)w=ht,g-=(d&&E===_&&_.visualViewport?_.visualViewport.height:E[x])-i.height,g*=l?1:-1;if(o===bt||(o===pt||o===ht)&&r===wt)y=gt,p-=(d&&E===_&&_.visualViewport?_.visualViewport.width:E[T])-i.width,p*=l?1:-1}var S,D=Object.assign({position:a},c&&Wt),O=!0===u?function(t,e){var n=t.x,i=t.y,o=e.devicePixelRatio||1;return{x:J(n*o)/o||0,y:J(i*o)/o||0}}({x:p,y:g},V(n)):{x:p,y:g};return p=O.x,g=O.y,l?Object.assign({},D,((S={})[w]=v?"0":"",S[y]=m?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",S)):Object.assign({},D,((e={})[w]=v?g+"px":"",e[y]=m?p+"px":"",e.transform="",e))}var qt=Ht({defaultModifiers:[Nt,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=Rt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,r=n.adaptive,s=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:kt(e.placement),variation:Mt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Vt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Vt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];U(o)&&tt(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});U(i)&&tt(i)&&(Object.assign(i.style,r),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]}]}),Ut={left:"right",right:"left",bottom:"top",top:"bottom"};function Gt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ut[t]}))}var Xt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Xt[t]}))}function Jt(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,r=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Dt:l,u=Mt(i),d=u?a?St:St.filter((function(t){return Mt(t)===u})):vt,f=d.filter((function(t){return c.indexOf(t)>=0}));0===f.length&&(f=d);var p=f.reduce((function(e,n){return e[n]=Bt(t,{placement:n,boundary:o,rootBoundary:r,padding:s})[kt(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}var Kt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,g=n.allowedAutoPlacements,b=e.options.placement,m=kt(b),v=l||(m===b||!h?[Gt(b)]:function(t){if(kt(t)===mt)return[];var e=Gt(t);return[Yt(t),e,Yt(e)]}(b)),y=[b].concat(v).reduce((function(t,n){return t.concat(kt(n)===mt?Jt(e,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):n)}),[]),w=e.rects.reference,_=e.rects.popper,E=new Map,x=!0,T=y[0],S=0;S<y.length;S++){var D=y[S],O=kt(D),C=Mt(D)===yt,z=[pt,ht].indexOf(O)>=0,P=z?"width":"height",I=Bt(e,{placement:D,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),k=z?C?gt:bt:C?ht:pt;w[P]>_[P]&&(k=Gt(k));var M=Gt(k),A=[];if(r&&A.push(I[O]<=0),a&&A.push(I[k]<=0,I[M]<=0),A.every((function(t){return t}))){T=D,x=!1;break}E.set(D,A)}if(x)for(var R=function(t){var e=y.find((function(e){var n=E.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},B=h?3:1;B>0;B--){if("break"===R(B))break}e.placement!==T&&(e.modifiersData[i]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qt(t,e,n){return X(t,Y(e,n))}var Zt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,g=void 0===h?0:h,b=Bt(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),m=kt(e.placement),v=Mt(e.placement),y=!v,w=At(m),_="x"===w?"y":"x",E=e.modifiersData.popperOffsets,x=e.rects.reference,T=e.rects.popper,S="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,D="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(E){if(r){var z,P="y"===w?pt:bt,I="y"===w?ht:gt,k="y"===w?"height":"width",M=E[w],A=M+b[P],R=M-b[I],B=p?-T[k]/2:0,j=v===yt?x[k]:T[k],L=v===yt?-T[k]:-x[k],H=e.elements.arrow,F=p&&H?st(H):{width:0,height:0},N=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=N[P],V=N[I],q=Qt(0,x[k],F[k]),U=y?x[k]/2-B-q-W-D.mainAxis:j-q-W-D.mainAxis,G=y?-x[k]/2+B+q+V+D.mainAxis:L+q+V+D.mainAxis,J=e.elements.arrow&&ft(e.elements.arrow),K=J?"y"===w?J.clientTop||0:J.clientLeft||0:0,Q=null!=(z=null==O?void 0:O[w])?z:0,Z=M+G-Q,$=Qt(p?Y(A,M+U-Q-K):A,M,p?X(R,Z):R);E[w]=$,C[w]=$-M}if(a){var tt,et="x"===w?pt:bt,nt="x"===w?ht:gt,it=E[_],ot="y"===_?"height":"width",rt=it+b[et],at=it-b[nt],lt=-1!==[pt,bt].indexOf(m),ct=null!=(tt=null==O?void 0:O[_])?tt:0,ut=lt?rt:it-x[ot]-T[ot]-ct+D.altAxis,dt=lt?it+x[ot]+T[ot]-ct-D.altAxis:at,mt=p&<?function(t,e,n){var i=Qt(t,e,n);return i>n?n:i}(ut,it,dt):Qt(p?ut:rt,it,p?dt:at);E[_]=mt,C[_]=mt-it}e.modifiersData[i]=C}},requiresIfExists:["offset"]};function $t(t,e){return qt(t,e,{placement:"bottom",strategy:"fixed",modifiers:[Kt,Zt]})}function te(t,e){var n=t.getBoundingClientRect(),i=n.top,o=n.bottom;return o=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-o,Math.max(i,o)-e}function ee(t){var e=t.optionsManager.setting,n=e.showMorePopperClass,i=e.tablistViewClass,o=e.verticalClass,r=e.rtlClass;return i+" "+o+" "+("rtl"==t.getOption("direction")?r+" ":"")+n}Zt.options={padding:8};var ne=function(t){t.nativeEvent.stopImmediatePropagation()},ie=function(e,n){var i=e(),o=i.createPopper,r=i.getPopperMaxHeight,s=i.getClassName,a=i.clk,l=n.TabsComponent,c=n.instance,u=n.hiddenTabIDs,d=n.btnRef,f=t.useRef(),p=t.useRef();p.current=p.current||{},t.useLayoutEffect((function(){f.current.style.maxHeight=r(d.current,15)+"px";var t=o(d.current,f.current);return p.current.popperIns=t,function(){t.destroy()}}),[]),t.useLayoutEffect((function(){p.current&&p.current.popperIns&&p.current.popperIns.update()}),[u]);var h=c.getData().selectedTabID,g=u?u.split(","):[];return t.createElement(t.Fragment,null,t.createElement("div",{onClick:a,ref:f,className:s(c)},t.createElement(l,{selectedTabID:h,openTabIDs:g,dir:c.getOption("direction"),isVertical:!0})))}.bind(null,(function(){return{createPopper:$t,getPopperMaxHeight:te,getClassName:ee,clk:ne}}));function oe(){return oe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(null,arguments)}function re(e,n){var i=e(),o=i.Popper,r=i.Api,s=i.ctx,a=i.components,l=t.useState(!1),c=l[0],u=l[1],d=t.useRef(),f=t.useRef();a.useForceUpdate(),f.current=f.current||r.call(s,a,u);var p=t.useCallback((function(t){f.current.onButtonClick(t,c)}),[c]);t.useEffect((function(){return f.current.onMount(),function(){(null==f?void 0:f.current)&&f.current.onDestroy&&f.current.onDestroy()}}),[]);var h=s.getOption("moreButtonPlugin_iconComponent");return t.createElement(t.Fragment,null,t.createElement("div",f.current.btnPropsGenerator(p,d,c),t.createElement(h,{instance:n.instance})),c?t.createElement(o,oe({},n,{instance:s,TabsComponent:f.current.TabsComponent,btnRef:d})):null)}var se=["aria-controls","aria-expanded","aria-selected","id"];function ae(){return ae=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ae.apply(null,arguments)}var le=0;function ce(e,n){return new(this.helper.module((function(t){this._components=e,this._api=t,this._counter=le++,this._buttonID=this._getButtonID(),this._tablistID=this._getTabListID(),this.TabsComponent=this._getTabsComponent(),this._closePopper=function(){n(!1)},this._togglePopper=function(t){n(!t)},this._onBackdropClick=this._onBackdropClick.bind(this),this._onSelectTab=this._onSelectTab.bind(this)}),{_getTabListID:function(){return"rc-dyn-tabs-popupcontainer_"+this._counter},_getButtonID:function(){return"rc-dyn-tabs-more-button-"+this._counter},btnPropsGenerator:function(t,e,n){var i={onClick:t,ref:e,className:this._api.getSetting("titleClass")+" "+this._api.getSetting("showMoreButtonClass"),title:this._api.getOption("moreButtonPlugin_buttonTooltip")};return this._api.getOption("accessibility")&&(i.tabIndex=0,i.role="button",i["aria-haspopup"]="true",i["aria-label"]=i.title,i.id=this._buttonID,i["aria-controls"]=this._tablistID,i["aria-expanded"]=n),i},_getTabsComponent:function(){var n=this,i=this._buttonID,o=this._tablistID;return this._components.Tabs=t.forwardRef(this._components.TabsFactory.bind(void 0,(function(t){return{Tab:n._getTabComponent(),TabsPropsManager:function(e){return function(t,e){var n=e.dir,r=e.isVertical,s={className:t.getSetting("tablistClass")+" "+t.getSetting(n+"Class")};return r&&(s.className+=" "+t.getSetting("verticalClass")),t.getOption("accessibility")&&(s.role="menu",s["aria-labelledby"]=i,s.id=o),s}(t,e)}}}))),e.Tabs},_getTabComponent:function(){var t=this;return this._components.memomizeTab(this._components.TabFactory.bind(void 0,(function(e){return{tabPropsManager:function(n){var i=t._components.tabPropsManager(e,n);i["aria-controls"],i["aria-expanded"],i["aria-selected"],i.id;var o=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(i,se);return o.role&&(o.role="menuitem"),o},tabInnerPropsManager:function(n){return ae({},t._components.tabInnerPropsManager(e,n),{popup:!0})},closeIconPropsManager:function(){return t._components.closeIconPropsManager(e)}}})))},onButtonClick:function(t,e){t.stopPropagation(),this._registerBackdropEvent()._togglePopper(e)},_onBackdropClick:function(){this._closePopper()},_onSelectTab:function(){this._closePopper()},_registerBackdropEvent:function(){return window.document.removeEventListener("click",this._onBackdropClick,{once:!0}),window.document.addEventListener("click",this._onBackdropClick,{once:!0}),this},_CleanBackdropEvent:function(){return window.document.removeEventListener("click",this._onBackdropClick,{once:!0}),this},onDestroy:function(){t