{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, UniqueComponentId, classNames, ObjectUtils } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar TabPanel = /*#__PURE__*/function (_Component) {\n _inherits(TabPanel, _Component);\n\n var _super = _createSuper(TabPanel);\n\n function TabPanel() {\n _classCallCheck(this, TabPanel);\n\n return _super.apply(this, arguments);\n }\n\n return _createClass(TabPanel);\n}(Component);\n\n_defineProperty(TabPanel, \"defaultProps\", {\n header: null,\n headerTemplate: null,\n leftIcon: null,\n rightIcon: null,\n closable: false,\n disabled: false,\n style: null,\n className: null,\n headerStyle: null,\n headerClassName: null,\n contentStyle: null,\n contentClassName: null\n});\n\nvar TabView = /*#__PURE__*/function (_Component2) {\n _inherits(TabView, _Component2);\n\n var _super2 = _createSuper(TabView);\n\n function TabView(props) {\n var _this;\n\n _classCallCheck(this, TabView);\n\n _this = _super2.call(this, props);\n var state = {\n id: props.id,\n backwardIsDisabled: true,\n forwardIsDisabled: false,\n hiddenTabs: []\n };\n\n if (!_this.props.onTabChange) {\n state = _objectSpread(_objectSpread({}, state), {}, {\n activeIndex: props.activeIndex\n });\n }\n\n _this.state = state;\n _this.navBackward = _this.navBackward.bind(_assertThisInitialized(_this));\n _this.navForward = _this.navForward.bind(_assertThisInitialized(_this));\n _this.onScroll = _this.onScroll.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TabView, [{\n key: \"getActiveIndex\",\n value: function getActiveIndex() {\n return this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(index) {\n return index === this.getActiveIndex();\n }\n }, {\n key: \"shouldTabRender\",\n value: function shouldTabRender(tab, index) {\n return tab && tab.type === TabPanel && this.state.hiddenTabs.every(function (_i) {\n return _i !== index;\n });\n }\n }, {\n key: \"findVisibleActiveTab\",\n value: function findVisibleActiveTab(i) {\n var _this2 = this;\n\n var tabsInfo = React.Children.map(this.props.children, function (tab, index) {\n if (_this2.shouldTabRender(tab, index)) {\n return {\n tab: tab,\n index: index\n };\n }\n });\n return tabsInfo.find(function (_ref) {\n var tab = _ref.tab,\n index = _ref.index;\n return !tab.props.disabled && index >= i;\n }) || tabsInfo.reverse().find(function (_ref2) {\n var tab = _ref2.tab,\n index = _ref2.index;\n return !tab.props.disabled && i > index;\n });\n }\n }, {\n key: \"onTabHeaderClose\",\n value: function onTabHeaderClose(event, index) {\n var _this3 = this;\n\n var hiddenTabs = [].concat(_toConsumableArray(this.state.hiddenTabs), [index]);\n this.setState({\n hiddenTabs: hiddenTabs\n }, function () {\n var tabInfo = _this3.findVisibleActiveTab(index);\n\n tabInfo && _this3.onTabHeaderClick(event, tabInfo.tab, tabInfo.index);\n });\n\n if (this.props.onTabClose) {\n this.props.onTabClose({\n originalEvent: event,\n index: index\n });\n }\n\n event.preventDefault();\n }\n }, {\n key: \"onTabHeaderClick\",\n value: function onTabHeaderClick(event, tab, index) {\n if (!tab.props.disabled) {\n if (this.props.onTabChange) {\n this.props.onTabChange({\n originalEvent: event,\n index: index\n });\n } else {\n this.setState({\n activeIndex: index\n });\n }\n }\n\n this.updateScrollBar(index);\n event.preventDefault();\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event, tab, index) {\n if (event.code === 'Enter') {\n this.onTabHeaderClick(event, tab, index);\n }\n }\n }, {\n key: \"updateInkBar\",\n value: function updateInkBar() {\n var activeIndex = this.getActiveIndex();\n var tabHeader = this[\"tab_\".concat(activeIndex)];\n this.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';\n this.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.nav).left + 'px';\n }\n }, {\n key: \"updateScrollBar\",\n value: function updateScrollBar(index) {\n var tabHeader = this[\"tab_\".concat(index)];\n\n if (tabHeader) {\n tabHeader.scrollIntoView({\n block: 'nearest'\n });\n }\n }\n }, {\n key: \"updateButtonState\",\n value: function updateButtonState() {\n var content = this.content;\n var scrollLeft = content.scrollLeft,\n scrollWidth = content.scrollWidth;\n var width = DomHandler.getWidth(content);\n this.setState({\n backwardIsDisabled: scrollLeft === 0\n });\n this.setState({\n forwardIsDisabled: scrollLeft === scrollWidth - width\n });\n }\n }, {\n key: \"onScroll\",\n value: function onScroll(event) {\n this.props.scrollable && this.updateButtonState();\n event.preventDefault();\n }\n }, {\n key: \"getVisibleButtonWidths\",\n value: function getVisibleButtonWidths() {\n var prevBtn = this.prevBtn;\n var nextBtn = this.nextBtn;\n return [prevBtn, nextBtn].reduce(function (acc, el) {\n return el ? acc + DomHandler.getWidth(el) : acc;\n }, 0);\n }\n }, {\n key: \"navBackward\",\n value: function navBackward() {\n var content = this.content;\n var width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft - width;\n content.scrollLeft = pos <= 0 ? 0 : pos;\n }\n }, {\n key: \"navForward\",\n value: function navForward() {\n var content = this.content;\n var width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft + width;\n var lastPos = content.scrollWidth - width;\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var state = {\n backwardIsDisabled: true,\n forwardIsDisabled: false,\n hiddenTabs: []\n };\n\n if (this.props.onTabChange) {\n this.props.onTabChange({\n index: this.props.activeIndex\n });\n } else {\n state = _objectSpread(_objectSpread({}, state), {}, {\n activeIndex: this.props.activeIndex\n });\n }\n\n this.setState(state);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!this.state.id) {\n this.setState({\n id: UniqueComponentId()\n });\n }\n\n this.updateInkBar();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n this.updateInkBar();\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n this.updateScrollBar(this.props.activeIndex);\n }\n }\n }, {\n key: \"renderTabHeader\",\n value: function renderTabHeader(tab, index) {\n var _this4 = this;\n\n var selected = this.isSelected(index);\n\n var style = _objectSpread(_objectSpread({}, tab.props.headerStyle || {}), tab.props.style || {});\n\n var className = classNames('p-unselectable-text', {\n 'p-tabview-selected p-highlight': selected,\n 'p-disabled': tab.props.disabled\n }, tab.props.headerClassName, tab.props.className);\n var id = this.state.id + '_header_' + index;\n var ariaControls = this.state.id + '_content_' + index;\n var tabIndex = tab.props.disabled ? null : 0;\n var leftIconElement = tab.props.leftIcon && /*#__PURE__*/React.createElement(\"i\", {\n className: tab.props.leftIcon\n });\n var titleElement = /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-tabview-title\"\n }, tab.props.header);\n var rightIconElement = tab.props.rightIcon && /*#__PURE__*/React.createElement(\"i\", {\n className: tab.props.rightIcon\n });\n var closableIconElement = tab.props.closable && /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-tabview-close pi pi-times\",\n onClick: function onClick(e) {\n return _this4.onTabHeaderClose(e, index);\n }\n });\n var content =\n /*#__PURE__*/\n\n /* eslint-disable */\n React.createElement(\"a\", {\n role: \"tab\",\n className: \"p-tabview-nav-link\",\n onClick: function onClick(event) {\n return _this4.onTabHeaderClick(event, tab, index);\n },\n id: id,\n onKeyDown: function onKeyDown(event) {\n return _this4.onKeyDown(event, tab, index);\n },\n \"aria-controls\": ariaControls,\n \"aria-selected\": selected,\n tabIndex: tabIndex\n }, leftIconElement, titleElement, rightIconElement, closableIconElement, /*#__PURE__*/React.createElement(Ripple, null))\n /* eslint-enable */\n ;\n\n if (tab.props.headerTemplate) {\n var defaultContentOptions = {\n className: 'p-tabview-nav-link',\n titleClassName: 'p-tabview-title',\n onClick: function onClick(event) {\n return _this4.onTabHeaderClick(event, tab, index);\n },\n onKeyDown: function onKeyDown(event) {\n return _this4.onKeyDown(event, tab, index);\n },\n leftIconElement: leftIconElement,\n titleElement: titleElement,\n rightIconElement: rightIconElement,\n element: content,\n props: this.props,\n index: index,\n selected: selected,\n ariaControls: ariaControls\n };\n content = ObjectUtils.getJSXElement(tab.props.headerTemplate, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n ref: function ref(el) {\n return _this4[\"tab_\".concat(index)] = el;\n },\n className: className,\n style: style,\n role: \"presentation\"\n }, content);\n }\n }, {\n key: \"renderTabHeaders\",\n value: function renderTabHeaders() {\n var _this5 = this;\n\n return React.Children.map(this.props.children, function (tab, index) {\n if (_this5.shouldTabRender(tab, index)) {\n return _this5.renderTabHeader(tab, index);\n }\n });\n }\n }, {\n key: \"renderNavigator\",\n value: function renderNavigator() {\n var _this6 = this;\n\n var headers = this.renderTabHeaders();\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this6.content = el;\n },\n id: this.props.id,\n className: \"p-tabview-nav-content\",\n style: this.props.style,\n onScroll: this.onScroll\n }, /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this6.nav = el;\n },\n className: \"p-tabview-nav\",\n role: \"tablist\"\n }, headers, /*#__PURE__*/React.createElement(\"li\", {\n ref: function ref(el) {\n return _this6.inkbar = el;\n },\n className: \"p-tabview-ink-bar\"\n })));\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this7 = this;\n\n var contents = React.Children.map(this.props.children, function (tab, index) {\n if (_this7.shouldTabRender(tab, index) && (!_this7.props.renderActiveOnly || _this7.isSelected(index))) {\n return _this7.createContent(tab, index);\n }\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tabview-panels\"\n }, contents);\n }\n }, {\n key: \"createContent\",\n value: function createContent(tab, index) {\n var selected = this.isSelected(index);\n\n var style = _objectSpread(_objectSpread({}, tab.props.contentStyle || {}), tab.props.style || {});\n\n var className = classNames(tab.props.contentClassName, tab.props.className, 'p-tabview-panel', {\n 'p-hidden': !selected\n });\n var id = this.state.id + '_content_' + index;\n var ariaLabelledBy = this.state.id + '_header_' + index;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-hidden\": !selected,\n className: className,\n style: style,\n role: \"tabpanel\"\n }, !this.props.renderActiveOnly ? tab.props.children : selected && tab.props.children);\n }\n }, {\n key: \"renderPrevButton\",\n value: function renderPrevButton() {\n var _this8 = this;\n\n if (this.props.scrollable && !this.state.backwardIsDisabled) {\n return /*#__PURE__*/React.createElement(\"button\", {\n ref: function ref(el) {\n return _this8.prevBtn = el;\n },\n className: \"p-tabview-nav-prev p-tabview-nav-btn p-link\",\n onClick: this.navBackward,\n type: \"button\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-left\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n\n return null;\n }\n }, {\n key: \"renderNextButton\",\n value: function renderNextButton() {\n var _this9 = this;\n\n if (this.props.scrollable && !this.state.forwardIsDisabled) {\n return /*#__PURE__*/React.createElement(\"button\", {\n ref: function ref(el) {\n return _this9.nextBtn = el;\n },\n className: \"p-tabview-nav-next p-tabview-nav-btn p-link\",\n onClick: this.navForward,\n type: \"button\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-right\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-tabview p-component', this.props.className, {\n 'p-tabview-scrollable': this.props.scrollable\n });\n var navigator = this.renderNavigator();\n var content = this.renderContent();\n var prevButton = this.renderPrevButton();\n var nextButton = this.renderNextButton();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tabview-nav-container\"\n }, prevButton, navigator, nextButton), content);\n }\n }]);\n\n return TabView;\n}(Component);\n\n_defineProperty(TabView, \"defaultProps\", {\n id: null,\n activeIndex: 0,\n style: null,\n className: null,\n renderActiveOnly: true,\n onTabChange: null,\n onTabClose: null,\n scrollable: false\n});\n\nexport { TabPanel, TabView };","map":{"version":3,"names":["React","Component","DomHandler","UniqueComponentId","classNames","ObjectUtils","Ripple","_arrayLikeToArray","arr","len","length","i","arr2","Array","_arrayWithoutHoles","isArray","_iterableToArray","iter","Symbol","iterator","from","_unsupportedIterableToArray","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","_nonIterableSpread","TypeError","_toConsumableArray","_assertThisInitialized","self","ReferenceError","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","key","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","_setPrototypeOf","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","value","_typeof","obj","_possibleConstructorReturn","_getPrototypeOf","getPrototypeOf","_defineProperty","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","source","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","TabPanel","_Component","_super","header","headerTemplate","leftIcon","rightIcon","closable","disabled","style","className","headerStyle","headerClassName","contentStyle","contentClassName","TabView","_Component2","_super2","_this","state","id","backwardIsDisabled","forwardIsDisabled","hiddenTabs","onTabChange","activeIndex","navBackward","bind","navForward","onScroll","getActiveIndex","isSelected","index","shouldTabRender","tab","type","every","_i","findVisibleActiveTab","_this2","tabsInfo","Children","map","children","find","_ref","reverse","_ref2","onTabHeaderClose","event","_this3","concat","setState","tabInfo","onTabHeaderClick","onTabClose","originalEvent","preventDefault","updateScrollBar","onKeyDown","code","updateInkBar","tabHeader","inkbar","width","getWidth","left","getOffset","nav","scrollIntoView","block","updateButtonState","content","scrollLeft","scrollWidth","scrollable","getVisibleButtonWidths","prevBtn","nextBtn","reduce","acc","el","pos","lastPos","reset","componentDidMount","componentDidUpdate","prevProps","renderTabHeader","_this4","selected","ariaControls","tabIndex","leftIconElement","createElement","titleElement","rightIconElement","closableIconElement","onClick","role","defaultContentOptions","titleClassName","element","getJSXElement","ref","renderTabHeaders","_this5","renderNavigator","_this6","headers","renderContent","_this7","contents","renderActiveOnly","createContent","ariaLabelledBy","renderPrevButton","_this8","renderNextButton","_this9","render","navigator","prevButton","nextButton"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/tabview/tabview.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, UniqueComponentId, classNames, ObjectUtils } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar TabPanel = /*#__PURE__*/function (_Component) {\n _inherits(TabPanel, _Component);\n\n var _super = _createSuper(TabPanel);\n\n function TabPanel() {\n _classCallCheck(this, TabPanel);\n\n return _super.apply(this, arguments);\n }\n\n return _createClass(TabPanel);\n}(Component);\n\n_defineProperty(TabPanel, \"defaultProps\", {\n header: null,\n headerTemplate: null,\n leftIcon: null,\n rightIcon: null,\n closable: false,\n disabled: false,\n style: null,\n className: null,\n headerStyle: null,\n headerClassName: null,\n contentStyle: null,\n contentClassName: null\n});\n\nvar TabView = /*#__PURE__*/function (_Component2) {\n _inherits(TabView, _Component2);\n\n var _super2 = _createSuper(TabView);\n\n function TabView(props) {\n var _this;\n\n _classCallCheck(this, TabView);\n\n _this = _super2.call(this, props);\n var state = {\n id: props.id,\n backwardIsDisabled: true,\n forwardIsDisabled: false,\n hiddenTabs: []\n };\n\n if (!_this.props.onTabChange) {\n state = _objectSpread(_objectSpread({}, state), {}, {\n activeIndex: props.activeIndex\n });\n }\n\n _this.state = state;\n _this.navBackward = _this.navBackward.bind(_assertThisInitialized(_this));\n _this.navForward = _this.navForward.bind(_assertThisInitialized(_this));\n _this.onScroll = _this.onScroll.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(TabView, [{\n key: \"getActiveIndex\",\n value: function getActiveIndex() {\n return this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;\n }\n }, {\n key: \"isSelected\",\n value: function isSelected(index) {\n return index === this.getActiveIndex();\n }\n }, {\n key: \"shouldTabRender\",\n value: function shouldTabRender(tab, index) {\n return tab && tab.type === TabPanel && this.state.hiddenTabs.every(function (_i) {\n return _i !== index;\n });\n }\n }, {\n key: \"findVisibleActiveTab\",\n value: function findVisibleActiveTab(i) {\n var _this2 = this;\n\n var tabsInfo = React.Children.map(this.props.children, function (tab, index) {\n if (_this2.shouldTabRender(tab, index)) {\n return {\n tab: tab,\n index: index\n };\n }\n });\n return tabsInfo.find(function (_ref) {\n var tab = _ref.tab,\n index = _ref.index;\n return !tab.props.disabled && index >= i;\n }) || tabsInfo.reverse().find(function (_ref2) {\n var tab = _ref2.tab,\n index = _ref2.index;\n return !tab.props.disabled && i > index;\n });\n }\n }, {\n key: \"onTabHeaderClose\",\n value: function onTabHeaderClose(event, index) {\n var _this3 = this;\n\n var hiddenTabs = [].concat(_toConsumableArray(this.state.hiddenTabs), [index]);\n this.setState({\n hiddenTabs: hiddenTabs\n }, function () {\n var tabInfo = _this3.findVisibleActiveTab(index);\n\n tabInfo && _this3.onTabHeaderClick(event, tabInfo.tab, tabInfo.index);\n });\n\n if (this.props.onTabClose) {\n this.props.onTabClose({\n originalEvent: event,\n index: index\n });\n }\n\n event.preventDefault();\n }\n }, {\n key: \"onTabHeaderClick\",\n value: function onTabHeaderClick(event, tab, index) {\n if (!tab.props.disabled) {\n if (this.props.onTabChange) {\n this.props.onTabChange({\n originalEvent: event,\n index: index\n });\n } else {\n this.setState({\n activeIndex: index\n });\n }\n }\n\n this.updateScrollBar(index);\n event.preventDefault();\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event, tab, index) {\n if (event.code === 'Enter') {\n this.onTabHeaderClick(event, tab, index);\n }\n }\n }, {\n key: \"updateInkBar\",\n value: function updateInkBar() {\n var activeIndex = this.getActiveIndex();\n var tabHeader = this[\"tab_\".concat(activeIndex)];\n this.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px';\n this.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.nav).left + 'px';\n }\n }, {\n key: \"updateScrollBar\",\n value: function updateScrollBar(index) {\n var tabHeader = this[\"tab_\".concat(index)];\n\n if (tabHeader) {\n tabHeader.scrollIntoView({\n block: 'nearest'\n });\n }\n }\n }, {\n key: \"updateButtonState\",\n value: function updateButtonState() {\n var content = this.content;\n var scrollLeft = content.scrollLeft,\n scrollWidth = content.scrollWidth;\n var width = DomHandler.getWidth(content);\n this.setState({\n backwardIsDisabled: scrollLeft === 0\n });\n this.setState({\n forwardIsDisabled: scrollLeft === scrollWidth - width\n });\n }\n }, {\n key: \"onScroll\",\n value: function onScroll(event) {\n this.props.scrollable && this.updateButtonState();\n event.preventDefault();\n }\n }, {\n key: \"getVisibleButtonWidths\",\n value: function getVisibleButtonWidths() {\n var prevBtn = this.prevBtn;\n var nextBtn = this.nextBtn;\n return [prevBtn, nextBtn].reduce(function (acc, el) {\n return el ? acc + DomHandler.getWidth(el) : acc;\n }, 0);\n }\n }, {\n key: \"navBackward\",\n value: function navBackward() {\n var content = this.content;\n var width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft - width;\n content.scrollLeft = pos <= 0 ? 0 : pos;\n }\n }, {\n key: \"navForward\",\n value: function navForward() {\n var content = this.content;\n var width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft + width;\n var lastPos = content.scrollWidth - width;\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var state = {\n backwardIsDisabled: true,\n forwardIsDisabled: false,\n hiddenTabs: []\n };\n\n if (this.props.onTabChange) {\n this.props.onTabChange({\n index: this.props.activeIndex\n });\n } else {\n state = _objectSpread(_objectSpread({}, state), {}, {\n activeIndex: this.props.activeIndex\n });\n }\n\n this.setState(state);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!this.state.id) {\n this.setState({\n id: UniqueComponentId()\n });\n }\n\n this.updateInkBar();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n this.updateInkBar();\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n this.updateScrollBar(this.props.activeIndex);\n }\n }\n }, {\n key: \"renderTabHeader\",\n value: function renderTabHeader(tab, index) {\n var _this4 = this;\n\n var selected = this.isSelected(index);\n\n var style = _objectSpread(_objectSpread({}, tab.props.headerStyle || {}), tab.props.style || {});\n\n var className = classNames('p-unselectable-text', {\n 'p-tabview-selected p-highlight': selected,\n 'p-disabled': tab.props.disabled\n }, tab.props.headerClassName, tab.props.className);\n var id = this.state.id + '_header_' + index;\n var ariaControls = this.state.id + '_content_' + index;\n var tabIndex = tab.props.disabled ? null : 0;\n var leftIconElement = tab.props.leftIcon && /*#__PURE__*/React.createElement(\"i\", {\n className: tab.props.leftIcon\n });\n var titleElement = /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-tabview-title\"\n }, tab.props.header);\n var rightIconElement = tab.props.rightIcon && /*#__PURE__*/React.createElement(\"i\", {\n className: tab.props.rightIcon\n });\n var closableIconElement = tab.props.closable && /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-tabview-close pi pi-times\",\n onClick: function onClick(e) {\n return _this4.onTabHeaderClose(e, index);\n }\n });\n var content =\n /*#__PURE__*/\n\n /* eslint-disable */\n React.createElement(\"a\", {\n role: \"tab\",\n className: \"p-tabview-nav-link\",\n onClick: function onClick(event) {\n return _this4.onTabHeaderClick(event, tab, index);\n },\n id: id,\n onKeyDown: function onKeyDown(event) {\n return _this4.onKeyDown(event, tab, index);\n },\n \"aria-controls\": ariaControls,\n \"aria-selected\": selected,\n tabIndex: tabIndex\n }, leftIconElement, titleElement, rightIconElement, closableIconElement, /*#__PURE__*/React.createElement(Ripple, null))\n /* eslint-enable */\n ;\n\n if (tab.props.headerTemplate) {\n var defaultContentOptions = {\n className: 'p-tabview-nav-link',\n titleClassName: 'p-tabview-title',\n onClick: function onClick(event) {\n return _this4.onTabHeaderClick(event, tab, index);\n },\n onKeyDown: function onKeyDown(event) {\n return _this4.onKeyDown(event, tab, index);\n },\n leftIconElement: leftIconElement,\n titleElement: titleElement,\n rightIconElement: rightIconElement,\n element: content,\n props: this.props,\n index: index,\n selected: selected,\n ariaControls: ariaControls\n };\n content = ObjectUtils.getJSXElement(tab.props.headerTemplate, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n ref: function ref(el) {\n return _this4[\"tab_\".concat(index)] = el;\n },\n className: className,\n style: style,\n role: \"presentation\"\n }, content);\n }\n }, {\n key: \"renderTabHeaders\",\n value: function renderTabHeaders() {\n var _this5 = this;\n\n return React.Children.map(this.props.children, function (tab, index) {\n if (_this5.shouldTabRender(tab, index)) {\n return _this5.renderTabHeader(tab, index);\n }\n });\n }\n }, {\n key: \"renderNavigator\",\n value: function renderNavigator() {\n var _this6 = this;\n\n var headers = this.renderTabHeaders();\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this6.content = el;\n },\n id: this.props.id,\n className: \"p-tabview-nav-content\",\n style: this.props.style,\n onScroll: this.onScroll\n }, /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this6.nav = el;\n },\n className: \"p-tabview-nav\",\n role: \"tablist\"\n }, headers, /*#__PURE__*/React.createElement(\"li\", {\n ref: function ref(el) {\n return _this6.inkbar = el;\n },\n className: \"p-tabview-ink-bar\"\n })));\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this7 = this;\n\n var contents = React.Children.map(this.props.children, function (tab, index) {\n if (_this7.shouldTabRender(tab, index) && (!_this7.props.renderActiveOnly || _this7.isSelected(index))) {\n return _this7.createContent(tab, index);\n }\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tabview-panels\"\n }, contents);\n }\n }, {\n key: \"createContent\",\n value: function createContent(tab, index) {\n var selected = this.isSelected(index);\n\n var style = _objectSpread(_objectSpread({}, tab.props.contentStyle || {}), tab.props.style || {});\n\n var className = classNames(tab.props.contentClassName, tab.props.className, 'p-tabview-panel', {\n 'p-hidden': !selected\n });\n var id = this.state.id + '_content_' + index;\n var ariaLabelledBy = this.state.id + '_header_' + index;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-hidden\": !selected,\n className: className,\n style: style,\n role: \"tabpanel\"\n }, !this.props.renderActiveOnly ? tab.props.children : selected && tab.props.children);\n }\n }, {\n key: \"renderPrevButton\",\n value: function renderPrevButton() {\n var _this8 = this;\n\n if (this.props.scrollable && !this.state.backwardIsDisabled) {\n return /*#__PURE__*/React.createElement(\"button\", {\n ref: function ref(el) {\n return _this8.prevBtn = el;\n },\n className: \"p-tabview-nav-prev p-tabview-nav-btn p-link\",\n onClick: this.navBackward,\n type: \"button\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-left\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n\n return null;\n }\n }, {\n key: \"renderNextButton\",\n value: function renderNextButton() {\n var _this9 = this;\n\n if (this.props.scrollable && !this.state.forwardIsDisabled) {\n return /*#__PURE__*/React.createElement(\"button\", {\n ref: function ref(el) {\n return _this9.nextBtn = el;\n },\n className: \"p-tabview-nav-next p-tabview-nav-btn p-link\",\n onClick: this.navForward,\n type: \"button\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"pi pi-chevron-right\"\n }), /*#__PURE__*/React.createElement(Ripple, null));\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-tabview p-component', this.props.className, {\n 'p-tabview-scrollable': this.props.scrollable\n });\n var navigator = this.renderNavigator();\n var content = this.renderContent();\n var prevButton = this.renderPrevButton();\n var nextButton = this.renderNextButton();\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tabview-nav-container\"\n }, prevButton, navigator, nextButton), content);\n }\n }]);\n\n return TabView;\n}(Component);\n\n_defineProperty(TabView, \"defaultProps\", {\n id: null,\n activeIndex: 0,\n style: null,\n className: null,\n renderActiveOnly: true,\n onTabChange: null,\n onTabClose: null,\n scrollable: false\n});\n\nexport { TabPanel, TabView };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,iBAArB,EAAwCC,UAAxC,EAAoDC,WAApD,QAAuE,kBAAvE;AACA,SAASC,MAAT,QAAuB,mBAAvB;;AAEA,SAASC,iBAAT,CAA2BC,GAA3B,EAAgCC,GAAhC,EAAqC;EACnC,IAAIA,GAAG,IAAI,IAAP,IAAeA,GAAG,GAAGD,GAAG,CAACE,MAA7B,EAAqCD,GAAG,GAAGD,GAAG,CAACE,MAAV;;EAErC,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWC,IAAI,GAAG,IAAIC,KAAJ,CAAUJ,GAAV,CAAvB,EAAuCE,CAAC,GAAGF,GAA3C,EAAgDE,CAAC,EAAjD,EAAqD;IACnDC,IAAI,CAACD,CAAD,CAAJ,GAAUH,GAAG,CAACG,CAAD,CAAb;EACD;;EAED,OAAOC,IAAP;AACD;;AAED,SAASE,kBAAT,CAA4BN,GAA5B,EAAiC;EAC/B,IAAIK,KAAK,CAACE,OAAN,CAAcP,GAAd,CAAJ,EAAwB,OAAOD,iBAAiB,CAACC,GAAD,CAAxB;AACzB;;AAED,SAASQ,gBAAT,CAA0BC,IAA1B,EAAgC;EAC9B,IAAI,OAAOC,MAAP,KAAkB,WAAlB,IAAiCD,IAAI,CAACC,MAAM,CAACC,QAAR,CAAJ,IAAyB,IAA1D,IAAkEF,IAAI,CAAC,YAAD,CAAJ,IAAsB,IAA5F,EAAkG,OAAOJ,KAAK,CAACO,IAAN,CAAWH,IAAX,CAAP;AACnG;;AAED,SAASI,2B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