react-dyn-tabs
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -0,1 +1,8 @@ | ||
# v6.2.1 | ||
- Fix tablistStyle issue when when adding MoreButtonPlgin | ||
- Improve document | ||
- Fix type issue of `MoreButtonPlugin` | ||
- Update demo | ||
# v6.2.0 | ||
@@ -2,0 +9,0 @@ |
/** | ||
* react-dyn-tabs - Create responsive and dynamic tabs in React. This library supports ARIA accessibility and provides complete control over tab management using hooks. | ||
* | ||
* @version v6.2.0 | ||
* @version v6.2.1 | ||
* @homepage https://dev-javascript.github.io/react-dyn-tabs/ | ||
@@ -9,3 +9,3 @@ * @author dev-javascript javascript.code.dev@gmail.com | ||
*/ | ||
!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,m=o.forEach,b=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())}}},O=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 m(){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 b(){if(p("storeStyle invoked."),i(a)){var t=m();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 O(){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=O());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%"]),m=l(["position: absolute","left: 0","top: 0"]),b=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=m,E.style.cssText=g,x.style.cssText=b,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 m=i(a).style;r(a,m.width,m.height)}else p("Aborting because element has been uninstalled")}function T(){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=m(),i(a).startSize={width:t.width,height:t.height},p("Element start size",i(a).startSize),n.add(0,b),n.add(1,S),n.add(2,D),n.add(3,T),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"),O(),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 T(t){return Array.isArray(t)||void 0!==t.length}function C(t){if(Array.isArray(t))return t;var e=[];return m(t,(function(t){e.push(t)})),e}function z(t){return t&&1===t.nodeType}var I=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:O});e=i}var o=t.reporter;o||(o=_(!1===o));var r=k(t,"batchProcessor",x({reporter:o})),s={};s.callOnAdd=!!k(t,"callOnAdd",!0),s.debug=!!k(t,"debug",!1);var a,l=v(e),c=b({stateHandler:O}),u=k(t,"strategy","object"),d=k(t,"important",!1),f={reporter:o,batchProcessor:r,stateHandler:O,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);m(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(!T(n))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=C(n)}var f=0,h=k(t,"callOnAdd",s.callOnAdd),g=k(t,"onReady",(function(){})),b=k(t,"debug",s.debug);m(n,(function(t){O.getState(t)||(O.initState(t),e.set(t));var s=e.get(t);if(b&&o.log("Attaching listener to element",s,t),!c.isDetectable(t))return b&&o.log(s,"Not detectable."),c.isBusy(t)?(b&&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()}))):(b&&o.log(s,"Making detectable..."),c.markBusy(t,!0),a.makeDetectable({debug:b,important:d},t,(function(t){if(b&&o.log(s,"onElementDetectable"),O.getState(t)){c.markAsDetectable(t),c.markBusy(t,!1),a.addListener(t,r),u(h,t,i);var e=O.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]&&m(p[s],(function(t){t()}))}else b&&o.log(s,"Element uninstalled before being detectable.");delete p[s],++f===n.length&&g()})));b&&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(!T(t))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=C(t)}m(t,(function(t){l.removeAllListeners(t),a.uninstall(t),O.cleanState(t)}))},initDocument:function(t){a.initDocument&&a.initDocument(t)}}};function k(t,e,n){var i=t[e];return null==i&&void 0!==n?n:i}var P=n(I),A=function(){var t=P({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 M(t){var e=t.el,n=t.sizeDimension,i=t.sizeDirections;this._el=e,this._sizeDimension=n,this._sizeDirections=i}function B(t,e){this._geElInstance=t.geElInstance,this.els=new Map,this._sizeFactory(e.isVertical)}function j(){return Function.prototype.bind.apply(B,[this||null,{geElInstance:function(t){return new M(t)}}].concat(Array.prototype.slice.call(arguments)))()}M.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()},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}},B.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 L=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)},R={_distanceFactory:function(t,e){this.getDistance=1==t?this._getVerticalDistance:"ltr"===e?this._getLtrDistance:this._getRtlDistance},_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}};L.prototype=Object.create(B.prototype),Object.assign(L.prototype,R).constructor=L;var H=L.bind(null,{Base:function(){j.apply(this,arguments)}}),F=function(t){var e=arguments;this._setOptions(e[1]),this._tablistEl=null;var n=e[0]().getElManagementIns;this._getElManagementIns=n,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.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._getSelectedTabInfo(this._tabs,t);return this._validateSliderMinSize(o)?this._hideTabs(this._findFirstHiddenTabIndexFactory(o,this._getSearchBoundries(o),this._getOrder(i)),o):this._hideTabs(0,o,!0)},_validateSliderMinSize:function(t){return!(t.overflowFullSize+this.els.getEl(this._options.buttonElement).getFullSize()>=this.els.getEl(this._options.containerElement).getSize())},_getOrder:function(t){return Math.abs(this.els.getDistance(t).value)>this.els.getEl(this._options.containerElement).getSize()?"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.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)}};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:A,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",mt="left",bt="auto",vt=[pt,ht,gt,mt],yt="start",wt="end",_t="clippingParents",Et="viewport",xt="popper",Ot="reference",St=vt.reduce((function(t,e){return t.concat([e+"-"+yt,e+"-"+wt])}),[]),Dt=[].concat(vt,[bt]).reduce((function(t,e){return t.concat([e,e+"-"+yt,e+"-"+wt])}),[]),Tt=["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 It(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 kt(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 Pt(t){return t.split("-")[0]}function At(t){return t.split("-")[1]}function Mt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Bt(t){var e,n=t.reference,i=t.element,o=t.placement,r=o?Pt(o):null,s=o?At(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 mt:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=r?Mt(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 jt(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,m=i.padding,b=void 0===m?0:m,v=function(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}("number"!=typeof b?b:(n=b,vt.reduce((function(t,e){return t[e]=n,t}),{}))),y=p===xt?Ot:xt,w=t.rects.popper,_=t.elements[g?y:p],E=function(t,e,n,i){var o="clippingParents"===e?kt(t):[].concat(e),r=[].concat(o,[n]),s=r[0],a=r.reduce((function(e,n){var o=It(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}),It(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),O=Bt({reference:x,element:w,strategy:"absolute",placement:r}),S=zt(Object.assign({},w,O)),D=p===xt?S:x,T={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(T).forEach((function(t){var e=[gt,ht].indexOf(t)>=0?1:-1,n=[pt,ht].indexOf(t)>=0?"y":"x";T[t]+=z[n]*e}))}return T}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Rt(){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?Lt:o;return function(t,e,n){void 0===n&&(n=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,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 Tt.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(Rt(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(!Rt(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,m="function"==typeof u?u({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var b=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=mt,w=pt,_=window;if(c){var E=ft(n),x="clientHeight",O="clientWidth";if(E===V(n)&&"static"!==it(E=et(n)).position&&"absolute"===a&&(x="scrollHeight",O="scrollWidth"),o===pt||(o===mt||o===gt)&&r===wt)w=ht,g-=(d&&E===_&&_.visualViewport?_.visualViewport.height:E[x])-i.height,g*=l?1:-1;if(o===mt||(o===pt||o===ht)&&r===wt)y=gt,p-=(d&&E===_&&_.visualViewport?_.visualViewport.width:E[O])-i.width,p*=l?1:-1}var S,D=Object.assign({position:a},c&&Wt),T=!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=T.x,g=T.y,l?Object.assign({},D,((S={})[w]=v?"0":"",S[y]=b?"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]=b?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]=Bt({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:Pt(e.placement),variation:At(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=At(i),d=u?a?St:St.filter((function(t){return At(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]=jt(t,{placement:n,boundary:o,rootBoundary:r,padding:s})[Pt(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,m=e.options.placement,b=Pt(m),v=l||(b===m||!h?[Gt(m)]:function(t){if(Pt(t)===bt)return[];var e=Gt(t);return[Yt(t),e,Yt(e)]}(m)),y=[m].concat(v).reduce((function(t,n){return t.concat(Pt(n)===bt?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,O=y[0],S=0;S<y.length;S++){var D=y[S],T=Pt(D),C=At(D)===yt,z=[pt,ht].indexOf(T)>=0,I=z?"width":"height",k=jt(e,{placement:D,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=z?C?gt:mt:C?ht:pt;w[I]>_[I]&&(P=Gt(P));var A=Gt(P),M=[];if(r&&M.push(k[T]<=0),a&&M.push(k[P]<=0,k[A]<=0),M.every((function(t){return t}))){O=D,x=!1;break}E.set(D,M)}if(x)for(var B=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 O=e,"break"},j=h?3:1;j>0;j--){if("break"===B(j))break}e.placement!==O&&(e.modifiersData[i]._skip=!0,e.placement=O,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,m=jt(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=Pt(e.placement),v=At(e.placement),y=!v,w=Mt(b),_="x"===w?"y":"x",E=e.modifiersData.popperOffsets,x=e.rects.reference,O=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),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(E){if(r){var z,I="y"===w?pt:mt,k="y"===w?ht:gt,P="y"===w?"height":"width",A=E[w],M=A+m[I],B=A-m[k],j=p?-O[P]/2:0,L=v===yt?x[P]:O[P],R=v===yt?-O[P]:-x[P],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[I],V=N[k],q=Qt(0,x[P],F[P]),U=y?x[P]/2-j-q-W-D.mainAxis:L-q-W-D.mainAxis,G=y?-x[P]/2+j+q+V+D.mainAxis:R+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==T?void 0:T[w])?z:0,Z=A+G-Q,$=Qt(p?Y(M,A+U-Q-K):M,A,p?X(B,Z):B);E[w]=$,C[w]=$-A}if(a){var tt,et="x"===w?pt:mt,nt="x"===w?ht:gt,it=E[_],ot="y"===_?"height":"width",rt=it+m[et],at=it-m[nt],lt=-1!==[pt,mt].indexOf(b),ct=null!=(tt=null==T?void 0:T[_])?tt:0,ut=lt?rt:it-x[ot]-O[ot]-ct+D.altAxis,dt=lt?it+x[ot]+O[ot]-ct-D.altAxis:at,bt=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[_]=bt,C[_]=bt-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(){this._CleanBackdropEvent(),this._cleanSelectEvent()},_registerSelectEvent:function(){this._api.on("onSelect",this._onSelectTab)},_cleanSelectEvent:function(){(null==this?void 0:this._api)&&this._api.off&&this._api.off("onSelect",this._onSelectTab)},onMount:function(){this._registerSelectEvent()}}))(this)}function ue(){return ue=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},ue.apply(null,arguments)}function de(){return de=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},de.apply(null,arguments)}function fe(e,n,i){var o=e.moreButtonPlugin_buttonComponent,r=e.ShowMoreTabs,s=e.moreButtonPlugin_iconComponent;fe.setSetting(n),fe.setDefaultOptions(n,i,o,s),fe.setTablistView(i),fe.setMoreButtonPlugin(n,i,r,fe.ShowMoreButton,t.memo),fe.setTablistOverflow(i)}return fe.ShowMoreButton=function(e,n){var i=e.ShowMoreTabs,o=e.components,r=o.useForceUpdate,s=o.useRootState;r();var a=s(),l=a.openTabIDs,c=a.selectedTabID;return t.createElement(i,de({},n,{ctx:e.ctx,openTabIDs:l,selectedTabID:c}),n.children)},fe.setMoreButtonPlugin=function(t,e,n,i,o){e.MoreButtonPlugin=o(i.bind(void 0,{ctx:t,components:e,ShowMoreTabs:n}),(function(){return!0}))},fe.setTablistOverflow=function(e){e.OriginalTablistOverflow||(e.OriginalTablistOverflow=e.TablistOverflow,e.TablistOverflow=function(n){return t.createElement(e.OriginalTablistOverflow,n,n.children,t.createElement(e.MoreButtonPlugin,null))})},fe.setTablistView=function(t){t.TablistView=t.TablistViewFactory.bind(void 0,(function(e){return{tablistViewPropsManager:function(){var n=t.tablistViewPropsManager(e).className;return{className:n+=" rc-dyn-tabs-responsive"}}}}))},fe.setDefaultOptions=function(t,e,n,i){t.optionsManager.options=Object.assign({moreButtonPlugin_buttonComponent:n({ctx:t,components:e}),moreButtonPlugin_iconComponent:i,moreButtonPlugin_buttonTooltip:"show more"},t.optionsManager.options)},fe.setSetting=function(t){t.optionsManager.setting.showMoreContainerClass="rc-dyn-tabs-showmorebutton-container",t.optionsManager.setting.showMoreButtonClass="rc-dyn-tabs-showmorebutton",t.optionsManager.setting.showMorePopperClass="rc-dyn-tabs-popper"},fe.bind(void 0,{moreButtonPlugin_buttonComponent:function(e){void 0===e&&(e={});return t.memo(re.bind(null,(function(){return ue({Popper:ie,Api:ce},e)})))},ShowMoreTabs:W,moreButtonPlugin_iconComponent:function(e){var n={};return"rtl"===e.instance.getOption("direction")&&(n.transform="rotate(180deg)"),t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",style:n},t.createElement("path",{fill:"gray",d:"M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"}))}})})); | ||
!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,m=o.forEach,b=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())}}},O=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 m(){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 b(){if(p("storeStyle invoked."),i(a)){var t=m();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 O(){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=O());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%"]),m=l(["position: absolute","left: 0","top: 0"]),b=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=m,E.style.cssText=g,x.style.cssText=b,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 m=i(a).style;r(a,m.width,m.height)}else p("Aborting because element has been uninstalled")}function T(){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=m(),i(a).startSize={width:t.width,height:t.height},p("Element start size",i(a).startSize),n.add(0,b),n.add(1,S),n.add(2,D),n.add(3,T),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"),O(),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 T(t){return Array.isArray(t)||void 0!==t.length}function C(t){if(Array.isArray(t))return t;var e=[];return m(t,(function(t){e.push(t)})),e}function z(t){return t&&1===t.nodeType}var I=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:O});e=i}var o=t.reporter;o||(o=_(!1===o));var r=k(t,"batchProcessor",x({reporter:o})),s={};s.callOnAdd=!!k(t,"callOnAdd",!0),s.debug=!!k(t,"debug",!1);var a,l=v(e),c=b({stateHandler:O}),u=k(t,"strategy","object"),d=k(t,"important",!1),f={reporter:o,batchProcessor:r,stateHandler:O,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);m(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(!T(n))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=C(n)}var f=0,h=k(t,"callOnAdd",s.callOnAdd),g=k(t,"onReady",(function(){})),b=k(t,"debug",s.debug);m(n,(function(t){O.getState(t)||(O.initState(t),e.set(t));var s=e.get(t);if(b&&o.log("Attaching listener to element",s,t),!c.isDetectable(t))return b&&o.log(s,"Not detectable."),c.isBusy(t)?(b&&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()}))):(b&&o.log(s,"Making detectable..."),c.markBusy(t,!0),a.makeDetectable({debug:b,important:d},t,(function(t){if(b&&o.log(s,"onElementDetectable"),O.getState(t)){c.markAsDetectable(t),c.markBusy(t,!1),a.addListener(t,r),u(h,t,i);var e=O.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]&&m(p[s],(function(t){t()}))}else b&&o.log(s,"Element uninstalled before being detectable.");delete p[s],++f===n.length&&g()})));b&&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(!T(t))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=C(t)}m(t,(function(t){l.removeAllListeners(t),a.uninstall(t),O.cleanState(t)}))},initDocument:function(t){a.initDocument&&a.initDocument(t)}}};function k(t,e,n){var i=t[e];return null==i&&void 0!==n?n:i}var P=n(I),A=function(){var t=P({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 M(t){var e=t.el,n=t.sizeDimension,i=t.sizeDirections;this._el=e,this._sizeDimension=n,this._sizeDirections=i}function B(t,e){this._geElInstance=t.geElInstance,this.els=new Map,this._sizeFactory(e.isVertical)}function j(){return Function.prototype.bind.apply(B,[this||null,{geElInstance:function(t){return new M(t)}}].concat(Array.prototype.slice.call(arguments)))()}M.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()},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}},B.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 L=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)},R={_distanceFactory:function(t,e){this.getDistance=1==t?this._getVerticalDistance:"ltr"===e?this._getLtrDistance:this._getRtlDistance},_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}};L.prototype=Object.create(B.prototype),Object.assign(L.prototype,R).constructor=L;var H=L.bind(null,{Base:function(){j.apply(this,arguments)}}),F=function(t){var e=arguments;this._setOptions(e[1]),this._tablistEl=null;var n=e[0]().getElManagementIns;this._getElManagementIns=n,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.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._getSelectedTabInfo(this._tabs,t);return this._validateSliderMinSize(o)?this._hideTabs(this._findFirstHiddenTabIndexFactory(o,this._getSearchBoundries(o),this._getOrder(i)),o):this._hideTabs(0,o,!0)},_validateSliderMinSize:function(t){return!(t.overflowFullSize+this.els.getEl(this._options.buttonElement).getFullSize()>=this.els.getEl(this._options.containerElement).getSize())},_getOrder:function(t){return Math.abs(this.els.getDistance(t).value)>this.els.getEl(this._options.containerElement).getSize()?"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.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)}};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:A,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",mt="left",bt="auto",vt=[pt,ht,gt,mt],yt="start",wt="end",_t="clippingParents",Et="viewport",xt="popper",Ot="reference",St=vt.reduce((function(t,e){return t.concat([e+"-"+yt,e+"-"+wt])}),[]),Dt=[].concat(vt,[bt]).reduce((function(t,e){return t.concat([e,e+"-"+yt,e+"-"+wt])}),[]),Tt=["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 It(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 kt(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 Pt(t){return t.split("-")[0]}function At(t){return t.split("-")[1]}function Mt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Bt(t){var e,n=t.reference,i=t.element,o=t.placement,r=o?Pt(o):null,s=o?At(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 mt:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=r?Mt(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 jt(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,m=i.padding,b=void 0===m?0:m,v=function(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}("number"!=typeof b?b:(n=b,vt.reduce((function(t,e){return t[e]=n,t}),{}))),y=p===xt?Ot:xt,w=t.rects.popper,_=t.elements[g?y:p],E=function(t,e,n,i){var o="clippingParents"===e?kt(t):[].concat(e),r=[].concat(o,[n]),s=r[0],a=r.reduce((function(e,n){var o=It(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}),It(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),O=Bt({reference:x,element:w,strategy:"absolute",placement:r}),S=zt(Object.assign({},w,O)),D=p===xt?S:x,T={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(T).forEach((function(t){var e=[gt,ht].indexOf(t)>=0?1:-1,n=[pt,ht].indexOf(t)>=0?"y":"x";T[t]+=z[n]*e}))}return T}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Rt(){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?Lt:o;return function(t,e,n){void 0===n&&(n=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,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 Tt.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(Rt(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(!Rt(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,m="function"==typeof u?u({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var b=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=mt,w=pt,_=window;if(c){var E=ft(n),x="clientHeight",O="clientWidth";if(E===V(n)&&"static"!==it(E=et(n)).position&&"absolute"===a&&(x="scrollHeight",O="scrollWidth"),o===pt||(o===mt||o===gt)&&r===wt)w=ht,g-=(d&&E===_&&_.visualViewport?_.visualViewport.height:E[x])-i.height,g*=l?1:-1;if(o===mt||(o===pt||o===ht)&&r===wt)y=gt,p-=(d&&E===_&&_.visualViewport?_.visualViewport.width:E[O])-i.width,p*=l?1:-1}var S,D=Object.assign({position:a},c&&Wt),T=!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=T.x,g=T.y,l?Object.assign({},D,((S={})[w]=v?"0":"",S[y]=b?"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]=b?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]=Bt({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:Pt(e.placement),variation:At(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=At(i),d=u?a?St:St.filter((function(t){return At(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]=jt(t,{placement:n,boundary:o,rootBoundary:r,padding:s})[Pt(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,m=e.options.placement,b=Pt(m),v=l||(b===m||!h?[Gt(m)]:function(t){if(Pt(t)===bt)return[];var e=Gt(t);return[Yt(t),e,Yt(e)]}(m)),y=[m].concat(v).reduce((function(t,n){return t.concat(Pt(n)===bt?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,O=y[0],S=0;S<y.length;S++){var D=y[S],T=Pt(D),C=At(D)===yt,z=[pt,ht].indexOf(T)>=0,I=z?"width":"height",k=jt(e,{placement:D,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=z?C?gt:mt:C?ht:pt;w[I]>_[I]&&(P=Gt(P));var A=Gt(P),M=[];if(r&&M.push(k[T]<=0),a&&M.push(k[P]<=0,k[A]<=0),M.every((function(t){return t}))){O=D,x=!1;break}E.set(D,M)}if(x)for(var B=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 O=e,"break"},j=h?3:1;j>0;j--){if("break"===B(j))break}e.placement!==O&&(e.modifiersData[i]._skip=!0,e.placement=O,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,m=jt(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=Pt(e.placement),v=At(e.placement),y=!v,w=Mt(b),_="x"===w?"y":"x",E=e.modifiersData.popperOffsets,x=e.rects.reference,O=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),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(E){if(r){var z,I="y"===w?pt:mt,k="y"===w?ht:gt,P="y"===w?"height":"width",A=E[w],M=A+m[I],B=A-m[k],j=p?-O[P]/2:0,L=v===yt?x[P]:O[P],R=v===yt?-O[P]:-x[P],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[I],V=N[k],q=Qt(0,x[P],F[P]),U=y?x[P]/2-j-q-W-D.mainAxis:L-q-W-D.mainAxis,G=y?-x[P]/2+j+q+V+D.mainAxis:R+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==T?void 0:T[w])?z:0,Z=A+G-Q,$=Qt(p?Y(M,A+U-Q-K):M,A,p?X(B,Z):B);E[w]=$,C[w]=$-A}if(a){var tt,et="x"===w?pt:mt,nt="x"===w?ht:gt,it=E[_],ot="y"===_?"height":"width",rt=it+m[et],at=it-m[nt],lt=-1!==[pt,mt].indexOf(b),ct=null!=(tt=null==T?void 0:T[_])?tt:0,ut=lt?rt:it-x[ot]-O[ot]-ct+D.altAxis,dt=lt?it+x[ot]+O[ot]-ct-D.altAxis:at,bt=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[_]=bt,C[_]=bt-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(){this._CleanBackdropEvent(),this._cleanSelectEvent()},_registerSelectEvent:function(){this._api.on("onSelect",this._onSelectTab)},_cleanSelectEvent:function(){(null==this?void 0:this._api)&&this._api.off&&this._api.off("onSelect",this._onSelectTab)},onMount:function(){this._registerSelectEvent()}}))(this)}function ue(){return ue=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},ue.apply(null,arguments)}function de(){return de=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},de.apply(null,arguments)}function fe(e,n,i){var o=e.moreButtonPlugin_buttonComponent,r=e.ShowMoreTabs,s=e.moreButtonPlugin_iconComponent;fe.setSetting(n),fe.setDefaultOptions(n,i,o,s),fe.setTablistView(i),fe.setMoreButtonPlugin(n,i,r,fe.ShowMoreButton,t.memo),fe.setTablistOverflow(i)}return fe.ShowMoreButton=function(e,n){var i=e.ShowMoreTabs,o=e.components,r=o.useForceUpdate,s=o.useRootState;r();var a=s(),l=a.openTabIDs,c=a.selectedTabID;return t.createElement(i,de({},n,{ctx:e.ctx,openTabIDs:l,selectedTabID:c}),n.children)},fe.setMoreButtonPlugin=function(t,e,n,i,o){e.MoreButtonPlugin=o(i.bind(void 0,{ctx:t,components:e,ShowMoreTabs:n}),(function(){return!0}))},fe.setTablistOverflow=function(e){e.OriginalTablistOverflow||(e.OriginalTablistOverflow=e.TablistOverflow,e.TablistOverflow=function(n){return t.createElement(e.OriginalTablistOverflow,n,n.children,t.createElement(e.MoreButtonPlugin,null))})},fe.setTablistView=function(t){t.TablistView=t.TablistViewFactory.bind(void 0,(function(e){return{tablistViewPropsManager:function(){var n=t.tablistViewPropsManager(e);return n.className+=" rc-dyn-tabs-responsive",n}}}))},fe.setDefaultOptions=function(t,e,n,i){t.optionsManager.options=Object.assign({moreButtonPlugin_buttonComponent:n({ctx:t,components:e}),moreButtonPlugin_iconComponent:i,moreButtonPlugin_buttonTooltip:"show more"},t.optionsManager.options)},fe.setSetting=function(t){t.optionsManager.setting.showMoreContainerClass="rc-dyn-tabs-showmorebutton-container",t.optionsManager.setting.showMoreButtonClass="rc-dyn-tabs-showmorebutton",t.optionsManager.setting.showMorePopperClass="rc-dyn-tabs-popper"},fe.bind(void 0,{moreButtonPlugin_buttonComponent:function(e){void 0===e&&(e={});return t.memo(re.bind(null,(function(){return ue({Popper:ie,Api:ce},e)})))},ShowMoreTabs:W,moreButtonPlugin_iconComponent:function(e){var n={};return"rtl"===e.instance.getOption("direction")&&(n.transform="rotate(180deg)"),t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",style:n},t.createElement("path",{fill:"gray",d:"M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"}))}})})); | ||
//# sourceMappingURL=more-button-plugin.umd.min.js.map |
/** | ||
* react-dyn-tabs - Create responsive and dynamic tabs in React. This library supports ARIA accessibility and provides complete control over tab management using hooks. | ||
* | ||
* @version v6.2.0 | ||
* @version v6.2.1 | ||
* @homepage https://dev-javascript.github.io/react-dyn-tabs/ | ||
@@ -6,0 +6,0 @@ * @author dev-javascript javascript.code.dev@gmail.com |
/** | ||
* react-dyn-tabs - Create responsive and dynamic tabs in React. This library supports ARIA accessibility and provides complete control over tab management using hooks. | ||
* | ||
* @version v6.2.0 | ||
* @version v6.2.1 | ||
* @homepage https://dev-javascript.github.io/react-dyn-tabs/ | ||
@@ -6,0 +6,0 @@ * @author dev-javascript javascript.code.dev@gmail.com |
@@ -98,3 +98,3 @@ import React, { FunctionComponent, FC, PropsWithChildren } from 'react'; | ||
type Panellist = FunctionComponent<{}>; | ||
declare const useDynTabs: (options?: Options) => [Tablist, Panellist, Ready]; | ||
declare const useDynTabs: (options?: Options, plugins?: Array<(instance: any, components: any) => void>) => [Tablist, Panellist, Ready]; | ||
export default useDynTabs; |
@@ -59,8 +59,5 @@ "use strict"; | ||
tablistViewPropsManager: function tablistViewPropsManager() { | ||
var _components$tablistVi = components.tablistViewPropsManager(ins), | ||
className = _components$tablistVi.className; | ||
className += ' rc-dyn-tabs-responsive'; | ||
return { | ||
className: className | ||
}; | ||
var attrs = components.tablistViewPropsManager(ins); | ||
attrs.className += ' rc-dyn-tabs-responsive'; | ||
return attrs; | ||
} | ||
@@ -67,0 +64,0 @@ }; |
@@ -50,8 +50,5 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
tablistViewPropsManager: function tablistViewPropsManager() { | ||
var _components$tablistVi = components.tablistViewPropsManager(ins), | ||
className = _components$tablistVi.className; | ||
className += ' rc-dyn-tabs-responsive'; | ||
return { | ||
className: className | ||
}; | ||
var attrs = components.tablistViewPropsManager(ins); | ||
attrs.className += ' rc-dyn-tabs-responsive'; | ||
return attrs; | ||
} | ||
@@ -58,0 +55,0 @@ }; |
{ | ||
"name": "react-dyn-tabs", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"private": false, | ||
@@ -11,2 +11,7 @@ "description": "Create responsive and dynamic tabs in React. This library supports ARIA accessibility and provides complete control over tab management using hooks.", | ||
"responsive", | ||
"react-dynamic-tabs", | ||
"react-responsive-tabs", | ||
"react-tabs", | ||
"react-tab-component", | ||
"react-tabs-component", | ||
"more-button", | ||
@@ -20,3 +25,2 @@ "view-more", | ||
"react-hooks", | ||
"react-tabs", | ||
"tab-navigation", | ||
@@ -29,3 +33,4 @@ "web-development", | ||
"accessibility", | ||
"accessible" | ||
"accessible", | ||
"react-accessible-tabs" | ||
], | ||
@@ -32,0 +37,0 @@ "author": { |
{ | ||
"main": "../../lib/cjs/plugins/moreButtonPlugin/index.js", | ||
"module": "../../lib/esm/plugins/moreButtonPlugin/index.js", | ||
"sideEffects": false | ||
} | ||
"main": "../../lib/cjs/plugins/moreButtonPlugin/index.js", | ||
"module": "../../lib/esm/plugins/moreButtonPlugin/index.js", | ||
"types": "./index.d.ts", | ||
"sideEffects": false | ||
} |
@@ -37,2 +37,3 @@ # react-dyn-tabs | ||
- [Simple Manipulation Example](#simple-manipulation-example) | ||
- [ready function](#ready-function) | ||
- [Options](#options) | ||
@@ -172,3 +173,5 @@ - [tabs](#tabs) | ||
const [TabList, PanelList, ready] = useDynTabs(initialOptions); | ||
const addTab3 = function () { | ||
// use ready function to access the instance object | ||
ready((instance) => { | ||
@@ -196,18 +199,31 @@ // open tab 3 | ||
**NOTE :** | ||
## ready function | ||
- Use `ready` function to access the `instance` object | ||
The `ready` function in the `react-dyn-tabs` library is part of the array returned by the `useDynTabs` hook, alongside the `TabList` and `PanelList` components. This function allows developers to execute a callback when the `TabList` and `PanelList` components are fully mounted, providing access to the instance object for further manipulation. | ||
```js | ||
ready((instance) => { | ||
// manipulate tabs using instance object here | ||
}); | ||
``` | ||
### Key Features | ||
- `ready` function accepts a `callback` as its parameter and executes it as soon as Tabs get mounted. | ||
- **Multiple Calls**: Developers can invoke the `ready` function multiple times without any issues. | ||
- **Stable Identity**: The reference to the `ready` function remains stable across component re-renders, ensuring consistent behavior. | ||
- **Immediate Execution**: If the `ready` function is called after the tabs have already been mounted, the provided callback will be executed immediately. | ||
- If `ready` function is called after the Tabs has been mounted, the `callback` passed in will be executed immediately. | ||
### Example Usage | ||
- `ready` function can be executed multiple times and its identity is stable and won’t change on re-renders. | ||
```js | ||
const [TabList, PanelList, ready] = useDynTabs(initialOptions); | ||
const addTab3 = function () { | ||
ready((instance) => { | ||
// open tab 3 | ||
instance.open({id: '3', title: 'Tab 3', panelComponent: (props) => <p> panel 3 </p>}).then(() => { | ||
console.log('tab 3 is open'); | ||
}); | ||
// switch to tab 3 | ||
instance.select('3').then(() => { | ||
console.log('tab 3 is selected'); | ||
}); | ||
}); | ||
}; | ||
``` | ||
## Options | ||
@@ -487,2 +503,10 @@ | ||
#### Notes | ||
- If the `theme` option is not provided then all imported themes CSS will be applied to the `Tablist`. | ||
- If the `theme` option is set to a empty string then imported themes CSS will not be applied to the `Tablist`. | ||
- You can create your own theme CSS and set the `theme` option to your theme class name | ||
### tablistStyle | ||
@@ -1333,2 +1357,8 @@ | ||
**unpkg Link** | ||
```js | ||
<script src="https://unpkg.com/react-dyn-tabs@latest/dist/more-button-plugin.umd.min.js"></script> | ||
``` | ||
## Render custom components at the end of the Tablist | ||
@@ -1335,0 +1365,0 @@ |
@@ -54,5 +54,5 @@ import React, {memo} from 'react'; | ||
tablistViewPropsManager: () => { | ||
let {className} = components.tablistViewPropsManager(ins); | ||
className += ' rc-dyn-tabs-responsive'; | ||
return {className}; | ||
const attrs = components.tablistViewPropsManager(ins); | ||
attrs.className += ' rc-dyn-tabs-responsive'; | ||
return attrs; | ||
}, | ||
@@ -59,0 +59,0 @@ })); |
const webpack = require('webpack'); | ||
const {version} = require('./package'); | ||
const {version, name} = require('./package'); | ||
const path = require('path'); | ||
module.exports = { | ||
title: 'react-dyn-tabs', | ||
title: name, | ||
template: { | ||
head: { | ||
meta: [ | ||
{ | ||
name: 'description', | ||
content: | ||
'react-dyn-tabs : create responsive and dynamic tabs, supports ARIA accessibility and provides complete control over tab management using hook.', | ||
}, | ||
], | ||
}, | ||
}, | ||
getComponentPathLine(componentPath) { | ||
@@ -8,0 +19,0 @@ return ``; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1544398
240
16427
1476