"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[34755],{ /***/ 24969: /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js + 1 modules ***! \*****************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { "Z": function() { return /* binding */ icons_PlusOutlined; } }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(87462); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(67294); ;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js // This icon file is generated automatically. var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" }; /* harmony default export */ var asn_PlusOutlined = (PlusOutlined); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules var AntdIcon = __webpack_require__(74643); ;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var PlusOutlined_PlusOutlined = function PlusOutlined(props, ref) { return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_PlusOutlined })); }; if (false) {} /* harmony default export */ var icons_PlusOutlined = (/*#__PURE__*/react.forwardRef(PlusOutlined_PlusOutlined)); /***/ }), /***/ 34755: /*!*********************************************************!*\ !*** ./node_modules/antd/es/tabs/index.js + 28 modules ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { "Z": function() { return /* binding */ tabs; } }); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules var CloseOutlined = __webpack_require__(97937); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules var EllipsisOutlined = __webpack_require__(89705); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js + 1 modules var PlusOutlined = __webpack_require__(24969); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(94184); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(87462); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__(4942); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__(1413); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__(97685); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__(71002); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(45987); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(67294); // EXTERNAL MODULE: ./node_modules/rc-util/es/isMobile.js var isMobile = __webpack_require__(31131); // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js var useMergedState = __webpack_require__(21770); // EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 11 modules var es = __webpack_require__(62874); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabContext.js /* harmony default export */ var TabContext = (/*#__PURE__*/(0,react.createContext)(null)); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabPanelList/TabPane.js var TabPane = /*#__PURE__*/react.forwardRef(function (_ref, ref) { var prefixCls = _ref.prefixCls, className = _ref.className, style = _ref.style, id = _ref.id, active = _ref.active, tabKey = _ref.tabKey, children = _ref.children; return /*#__PURE__*/react.createElement("div", { id: id && "".concat(id, "-panel-").concat(tabKey), role: "tabpanel", tabIndex: active ? 0 : -1, "aria-labelledby": id && "".concat(id, "-tab-").concat(tabKey), "aria-hidden": !active, style: style, className: classnames_default()(prefixCls, active && "".concat(prefixCls, "-active"), className), ref: ref }, children); }); if (false) {} /* harmony default export */ var TabPanelList_TabPane = (TabPane); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabPanelList/index.js var _excluded = ["key", "forceRender", "style", "className"]; function TabPanelList(_ref) { var id = _ref.id, activeKey = _ref.activeKey, animated = _ref.animated, tabPosition = _ref.tabPosition, destroyInactiveTabPane = _ref.destroyInactiveTabPane; var _React$useContext = react.useContext(TabContext), prefixCls = _React$useContext.prefixCls, tabs = _React$useContext.tabs; var tabPaneAnimated = animated.tabPane; var tabPanePrefixCls = "".concat(prefixCls, "-tabpane"); return /*#__PURE__*/react.createElement("div", { className: classnames_default()("".concat(prefixCls, "-content-holder")) }, /*#__PURE__*/react.createElement("div", { className: classnames_default()("".concat(prefixCls, "-content"), "".concat(prefixCls, "-content-").concat(tabPosition), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-content-animated"), tabPaneAnimated)) }, tabs.map(function (_ref2) { var key = _ref2.key, forceRender = _ref2.forceRender, paneStyle = _ref2.style, paneClassName = _ref2.className, restTabProps = (0,objectWithoutProperties/* default */.Z)(_ref2, _excluded); var active = key === activeKey; return /*#__PURE__*/react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({ key: key, visible: active, forceRender: forceRender, removeOnLeave: !!destroyInactiveTabPane, leavedClassName: "".concat(tabPanePrefixCls, "-hidden") }, animated.tabPaneMotion), function (_ref3, ref) { var motionStyle = _ref3.style, motionClassName = _ref3.className; return /*#__PURE__*/react.createElement(TabPanelList_TabPane, (0,esm_extends/* default */.Z)({}, restTabProps, { prefixCls: tabPanePrefixCls, id: id, tabKey: key, animated: tabPaneAnimated, active: active, style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, paneStyle), motionStyle), className: classnames_default()(paneClassName, motionClassName), ref: ref })); }); }))); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__(74902); // EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js + 4 modules var rc_resize_observer_es = __webpack_require__(48555); // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useEvent.js var useEvent = __webpack_require__(66680); // EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js var raf = __webpack_require__(75164); // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js var es_ref = __webpack_require__(42550); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useOffsets.js var DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0 }; function useOffsets(tabs, tabSizes, holderScrollWidth) { return (0,react.useMemo)(function () { var _tabs$; var map = new Map(); var lastOffset = tabSizes.get((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key) || DEFAULT_SIZE; var rightOffset = lastOffset.left + lastOffset.width; for (var i = 0; i < tabs.length; i += 1) { var key = tabs[i].key; var data = tabSizes.get(key); // Reuse last one when not exist yet if (!data) { var _tabs; data = tabSizes.get((_tabs = tabs[i - 1]) === null || _tabs === void 0 ? void 0 : _tabs.key) || DEFAULT_SIZE; } var entity = map.get(key) || (0,objectSpread2/* default */.Z)({}, data); // Right entity.right = rightOffset - entity.left - entity.width; // Update entity map.set(key, entity); } return map; }, [tabs.map(function (tab) { return tab.key; }).join('_'), tabSizes, holderScrollWidth]); } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useSyncState.js function useSyncState(defaultState, onChange) { var stateRef = react.useRef(defaultState); var _React$useState = react.useState({}), _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), forceUpdate = _React$useState2[1]; function setState(updater) { var newValue = typeof updater === 'function' ? updater(stateRef.current) : updater; if (newValue !== stateRef.current) { onChange(newValue, stateRef.current); } stateRef.current = newValue; forceUpdate({}); } return [stateRef.current, setState]; } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useTouchMove.js var MIN_SWIPE_DISTANCE = 0.1; var STOP_SWIPE_DISTANCE = 0.01; var REFRESH_INTERVAL = 20; var SPEED_OFF_MULTIPLE = Math.pow(0.995, REFRESH_INTERVAL); // ================================= Hook ================================= function useTouchMove(ref, onOffset) { var _useState = (0,react.useState)(), _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), touchPosition = _useState2[0], setTouchPosition = _useState2[1]; var _useState3 = (0,react.useState)(0), _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), lastTimestamp = _useState4[0], setLastTimestamp = _useState4[1]; var _useState5 = (0,react.useState)(0), _useState6 = (0,slicedToArray/* default */.Z)(_useState5, 2), lastTimeDiff = _useState6[0], setLastTimeDiff = _useState6[1]; var _useState7 = (0,react.useState)(), _useState8 = (0,slicedToArray/* default */.Z)(_useState7, 2), lastOffset = _useState8[0], setLastOffset = _useState8[1]; var motionRef = (0,react.useRef)(); // ========================= Events ========================= // >>> Touch events function onTouchStart(e) { var _e$touches$ = e.touches[0], screenX = _e$touches$.screenX, screenY = _e$touches$.screenY; setTouchPosition({ x: screenX, y: screenY }); window.clearInterval(motionRef.current); } function onTouchMove(e) { if (!touchPosition) return; e.preventDefault(); var _e$touches$2 = e.touches[0], screenX = _e$touches$2.screenX, screenY = _e$touches$2.screenY; setTouchPosition({ x: screenX, y: screenY }); var offsetX = screenX - touchPosition.x; var offsetY = screenY - touchPosition.y; onOffset(offsetX, offsetY); var now = Date.now(); setLastTimestamp(now); setLastTimeDiff(now - lastTimestamp); setLastOffset({ x: offsetX, y: offsetY }); } function onTouchEnd() { if (!touchPosition) return; setTouchPosition(null); setLastOffset(null); // Swipe if needed if (lastOffset) { var distanceX = lastOffset.x / lastTimeDiff; var distanceY = lastOffset.y / lastTimeDiff; var absX = Math.abs(distanceX); var absY = Math.abs(distanceY); // Skip swipe if low distance if (Math.max(absX, absY) < MIN_SWIPE_DISTANCE) return; var currentX = distanceX; var currentY = distanceY; motionRef.current = window.setInterval(function () { if (Math.abs(currentX) < STOP_SWIPE_DISTANCE && Math.abs(currentY) < STOP_SWIPE_DISTANCE) { window.clearInterval(motionRef.current); return; } currentX *= SPEED_OFF_MULTIPLE; currentY *= SPEED_OFF_MULTIPLE; onOffset(currentX * REFRESH_INTERVAL, currentY * REFRESH_INTERVAL); }, REFRESH_INTERVAL); } } // >>> Wheel event var lastWheelDirectionRef = (0,react.useRef)(); function onWheel(e) { var deltaX = e.deltaX, deltaY = e.deltaY; // Convert both to x & y since wheel only happened on PC var mixed = 0; var absX = Math.abs(deltaX); var absY = Math.abs(deltaY); if (absX === absY) { mixed = lastWheelDirectionRef.current === 'x' ? deltaX : deltaY; } else if (absX > absY) { mixed = deltaX; lastWheelDirectionRef.current = 'x'; } else { mixed = deltaY; lastWheelDirectionRef.current = 'y'; } if (onOffset(-mixed, -mixed)) { e.preventDefault(); } } // ========================= Effect ========================= var touchEventsRef = (0,react.useRef)(null); touchEventsRef.current = { onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onTouchEnd, onWheel: onWheel }; react.useEffect(function () { function onProxyTouchStart(e) { touchEventsRef.current.onTouchStart(e); } function onProxyTouchMove(e) { touchEventsRef.current.onTouchMove(e); } function onProxyTouchEnd(e) { touchEventsRef.current.onTouchEnd(e); } function onProxyWheel(e) { touchEventsRef.current.onWheel(e); } document.addEventListener('touchmove', onProxyTouchMove, { passive: false }); document.addEventListener('touchend', onProxyTouchEnd, { passive: false }); // No need to clean up since element removed ref.current.addEventListener('touchstart', onProxyTouchStart, { passive: false }); ref.current.addEventListener('wheel', onProxyWheel); return function () { document.removeEventListener('touchmove', onProxyTouchMove); document.removeEventListener('touchend', onProxyTouchEnd); }; }, []); } // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js var useLayoutEffect = __webpack_require__(8410); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useUpdate.js /** * Help to merge callback with `useLayoutEffect`. * One time will only trigger once. */ function useUpdate(callback) { var _useState = (0,react.useState)(0), _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), count = _useState2[0], setCount = _useState2[1]; var effectRef = (0,react.useRef)(0); var callbackRef = (0,react.useRef)(); callbackRef.current = callback; // Trigger on `useLayoutEffect` (0,useLayoutEffect/* useLayoutUpdateEffect */.o)(function () { var _callbackRef$current; (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef); }, [count]); // Trigger to update count return function () { if (effectRef.current !== count) { return; } effectRef.current += 1; setCount(effectRef.current); }; } function useUpdateState(defaultState) { var batchRef = (0,react.useRef)([]); var _useState3 = (0,react.useState)({}), _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), forceUpdate = _useState4[1]; var state = (0,react.useRef)(typeof defaultState === 'function' ? defaultState() : defaultState); var flushUpdate = useUpdate(function () { var current = state.current; batchRef.current.forEach(function (callback) { current = callback(current); }); batchRef.current = []; state.current = current; forceUpdate({}); }); function updater(callback) { batchRef.current.push(callback); flushUpdate(); } return [state.current, updater]; } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useVisibleRange.js var useVisibleRange_DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0, right: 0 }; function useVisibleRange(tabOffsets, visibleTabContentValue, transform, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, _ref) { var tabs = _ref.tabs, tabPosition = _ref.tabPosition, rtl = _ref.rtl; var charUnit; var position; var transformSize; if (['top', 'bottom'].includes(tabPosition)) { charUnit = 'width'; position = rtl ? 'right' : 'left'; transformSize = Math.abs(transform); } else { charUnit = 'height'; position = 'top'; transformSize = -transform; } return (0,react.useMemo)(function () { if (!tabs.length) { return [0, 0]; } var len = tabs.length; var endIndex = len; for (var i = 0; i < len; i += 1) { var offset = tabOffsets.get(tabs[i].key) || useVisibleRange_DEFAULT_SIZE; if (offset[position] + offset[charUnit] > transformSize + visibleTabContentValue) { endIndex = i - 1; break; } } var startIndex = 0; for (var _i = len - 1; _i >= 0; _i -= 1) { var _offset = tabOffsets.get(tabs[_i].key) || useVisibleRange_DEFAULT_SIZE; if (_offset[position] < transformSize) { startIndex = _i + 1; break; } } return startIndex >= endIndex ? [0, 0] : [startIndex, endIndex]; }, [tabOffsets, visibleTabContentValue, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, transformSize, tabPosition, tabs.map(function (tab) { return tab.key; }).join('_'), rtl]); } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/util.js /** * We trade Map as deps which may change with same value but different ref object. * We should make it as hash for deps * */ function stringify(obj) { var tgt; if (obj instanceof Map) { tgt = {}; obj.forEach(function (v, k) { tgt[k] = v; }); } else { tgt = obj; } return JSON.stringify(tgt); } var RC_TABS_DOUBLE_QUOTE = 'TABS_DQ'; function genDataNodeKey(key) { return String(key).replace(/"/g, RC_TABS_DOUBLE_QUOTE); } function getRemovable(closable, closeIcon, editable, disabled) { if ( // Only editable tabs can be removed !editable || // Tabs cannot be removed when disabled disabled || // closable is false closable === false || // If closable is undefined, the remove button should be hidden when closeIcon is null or false closable === undefined && (closeIcon === false || closeIcon === null)) { return false; } return true; } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/AddButton.js function AddButton(_ref, ref) { var prefixCls = _ref.prefixCls, editable = _ref.editable, locale = _ref.locale, style = _ref.style; if (!editable || editable.showAdd === false) { return null; } return /*#__PURE__*/react.createElement("button", { ref: ref, type: "button", className: "".concat(prefixCls, "-nav-add"), style: style, "aria-label": (locale === null || locale === void 0 ? void 0 : locale.addAriaLabel) || 'Add tab', onClick: function onClick(event) { editable.onEdit('add', { event: event }); } }, editable.addIcon || '+'); } /* harmony default export */ var TabNavList_AddButton = (/*#__PURE__*/react.forwardRef(AddButton)); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/ExtraContent.js var ExtraContent = /*#__PURE__*/react.forwardRef(function (_ref, ref) { var position = _ref.position, prefixCls = _ref.prefixCls, extra = _ref.extra; if (!extra) return null; var content; // Parse extra var assertExtra = {}; if ((0,esm_typeof/* default */.Z)(extra) === 'object' && ! /*#__PURE__*/react.isValidElement(extra)) { assertExtra = extra; } else { assertExtra.right = extra; } if (position === 'right') { content = assertExtra.right; } if (position === 'left') { content = assertExtra.left; } return content ? /*#__PURE__*/react.createElement("div", { className: "".concat(prefixCls, "-extra-content"), ref: ref }, content) : null; }); if (false) {} /* harmony default export */ var TabNavList_ExtraContent = (ExtraContent); // EXTERNAL MODULE: ./node_modules/@rc-component/trigger/es/index.js + 42 modules var trigger_es = __webpack_require__(62709); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__(15105); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-dropdown/es/hooks/useAccessibility.js var ESC = KeyCode/* default.ESC */.Z.ESC, TAB = KeyCode/* default.TAB */.Z.TAB; function useAccessibility(_ref) { var visible = _ref.visible, triggerRef = _ref.triggerRef, onVisibleChange = _ref.onVisibleChange, autoFocus = _ref.autoFocus, overlayRef = _ref.overlayRef; var focusMenuRef = react.useRef(false); var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() { if (visible) { var _triggerRef$current, _triggerRef$current$f; (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : (_triggerRef$current$f = _triggerRef$current.focus) === null || _triggerRef$current$f === void 0 ? void 0 : _triggerRef$current$f.call(_triggerRef$current); onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(false); } }; var focusMenu = function focusMenu() { var _overlayRef$current; if ((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.focus) { overlayRef.current.focus(); focusMenuRef.current = true; return true; } return false; }; var handleKeyDown = function handleKeyDown(event) { switch (event.keyCode) { case ESC: handleCloseMenuAndReturnFocus(); break; case TAB: { var focusResult = false; if (!focusMenuRef.current) { focusResult = focusMenu(); } if (focusResult) { event.preventDefault(); } else { handleCloseMenuAndReturnFocus(); } break; } } }; react.useEffect(function () { if (visible) { window.addEventListener("keydown", handleKeyDown); if (autoFocus) { // FIXME: hack with raf (0,raf/* default */.Z)(focusMenu, 3); } return function () { window.removeEventListener("keydown", handleKeyDown); focusMenuRef.current = false; }; } return function () { focusMenuRef.current = false; }; }, [visible]); // eslint-disable-line react-hooks/exhaustive-deps } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-dropdown/es/Overlay.js var Overlay = /*#__PURE__*/(0,react.forwardRef)(function (props, ref) { var overlay = props.overlay, arrow = props.arrow, prefixCls = props.prefixCls; var overlayNode = (0,react.useMemo)(function () { var overlayElement; if (typeof overlay === 'function') { overlayElement = overlay(); } else { overlayElement = overlay; } return overlayElement; }, [overlay]); var composedRef = (0,es_ref/* composeRef */.sQ)(ref, overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.ref); return /*#__PURE__*/react.createElement(react.Fragment, null, arrow && /*#__PURE__*/react.createElement("div", { className: "".concat(prefixCls, "-arrow") }), /*#__PURE__*/react.cloneElement(overlayNode, { ref: (0,es_ref/* supportRef */.Yr)(overlayNode) ? composedRef : undefined })); }); /* harmony default export */ var es_Overlay = (Overlay); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-dropdown/es/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset } }; /* harmony default export */ var es_placements = (placements); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-dropdown/es/Dropdown.js var Dropdown_excluded = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"]; function Dropdown(props, ref) { var _children$props; var _props$arrow = props.arrow, arrow = _props$arrow === void 0 ? false : _props$arrow, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls, transitionName = props.transitionName, animation = props.animation, align = props.align, _props$placement = props.placement, placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement, _props$placements = props.placements, placements = _props$placements === void 0 ? es_placements : _props$placements, getPopupContainer = props.getPopupContainer, showAction = props.showAction, hideAction = props.hideAction, overlayClassName = props.overlayClassName, overlayStyle = props.overlayStyle, visible = props.visible, _props$trigger = props.trigger, trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger, autoFocus = props.autoFocus, overlay = props.overlay, children = props.children, onVisibleChange = props.onVisibleChange, otherProps = (0,objectWithoutProperties/* default */.Z)(props, Dropdown_excluded); var _React$useState = react.useState(), _React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2), triggerVisible = _React$useState2[0], setTriggerVisible = _React$useState2[1]; var mergedVisible = 'visible' in props ? visible : triggerVisible; var triggerRef = react.useRef(null); var overlayRef = react.useRef(null); var childRef = react.useRef(null); react.useImperativeHandle(ref, function () { return triggerRef.current; }); var handleVisibleChange = function handleVisibleChange(newVisible) { setTriggerVisible(newVisible); onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(newVisible); }; useAccessibility({ visible: mergedVisible, triggerRef: childRef, onVisibleChange: handleVisibleChange, autoFocus: autoFocus, overlayRef: overlayRef }); var onClick = function onClick(e) { var onOverlayClick = props.onOverlayClick; setTriggerVisible(false); if (onOverlayClick) { onOverlayClick(e); } }; var getMenuElement = function getMenuElement() { return /*#__PURE__*/react.createElement(es_Overlay, { ref: overlayRef, overlay: overlay, prefixCls: prefixCls, arrow: arrow }); }; var getMenuElementOrLambda = function getMenuElementOrLambda() { if (typeof overlay === 'function') { return getMenuElement; } return getMenuElement(); }; var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() { var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger, alignPoint = props.alignPoint; if ('minOverlayWidthMatchTrigger' in props) { return minOverlayWidthMatchTrigger; } return !alignPoint; }; var getOpenClassName = function getOpenClassName() { var openClassName = props.openClassName; if (openClassName !== undefined) { return openClassName; } return "".concat(prefixCls, "-open"); }; var childrenNode = /*#__PURE__*/react.cloneElement(children, { className: classnames_default()((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()), ref: (0,es_ref/* supportRef */.Yr)(children) ? (0,es_ref/* composeRef */.sQ)(childRef, children.ref) : undefined }); var triggerHideAction = hideAction; if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) { triggerHideAction = ['click']; } return /*#__PURE__*/react.createElement(trigger_es/* default */.Z, (0,esm_extends/* default */.Z)({ builtinPlacements: placements }, otherProps, { prefixCls: prefixCls, ref: triggerRef, popupClassName: classnames_default()(overlayClassName, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-show-arrow"), arrow)), popupStyle: overlayStyle, action: trigger, showAction: showAction, hideAction: triggerHideAction, popupPlacement: placement, popupAlign: align, popupTransitionName: transitionName, popupAnimation: animation, popupVisible: mergedVisible, stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '', popup: getMenuElementOrLambda(), onPopupVisibleChange: handleVisibleChange, onPopupClick: onClick, getPopupContainer: getPopupContainer }), childrenNode); } /* harmony default export */ var es_Dropdown = (/*#__PURE__*/react.forwardRef(Dropdown)); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-dropdown/es/index.js /* harmony default export */ var rc_dropdown_es = (es_Dropdown); // EXTERNAL MODULE: ./node_modules/rc-menu/es/index.js + 34 modules var rc_menu_es = __webpack_require__(53291); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/OperationNode.js function OperationNode(_ref, ref) { var prefixCls = _ref.prefixCls, id = _ref.id, tabs = _ref.tabs, locale = _ref.locale, mobile = _ref.mobile, _ref$moreIcon = _ref.moreIcon, moreIcon = _ref$moreIcon === void 0 ? 'More' : _ref$moreIcon, moreTransitionName = _ref.moreTransitionName, style = _ref.style, className = _ref.className, editable = _ref.editable, tabBarGutter = _ref.tabBarGutter, rtl = _ref.rtl, removeAriaLabel = _ref.removeAriaLabel, onTabClick = _ref.onTabClick, getPopupContainer = _ref.getPopupContainer, popupClassName = _ref.popupClassName; // ======================== Dropdown ======================== var _useState = (0,react.useState)(false), _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), open = _useState2[0], setOpen = _useState2[1]; var _useState3 = (0,react.useState)(null), _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), selectedKey = _useState4[0], setSelectedKey = _useState4[1]; var popupId = "".concat(id, "-more-popup"); var dropdownPrefix = "".concat(prefixCls, "-dropdown"); var selectedItemId = selectedKey !== null ? "".concat(popupId, "-").concat(selectedKey) : null; var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel; function onRemoveTab(event, key) { event.preventDefault(); event.stopPropagation(); editable.onEdit('remove', { key: key, event: event }); } var menu = /*#__PURE__*/react.createElement(rc_menu_es/* default */.ZP, { onClick: function onClick(_ref2) { var key = _ref2.key, domEvent = _ref2.domEvent; onTabClick(key, domEvent); setOpen(false); }, prefixCls: "".concat(dropdownPrefix, "-menu"), id: popupId, tabIndex: -1, role: "listbox", "aria-activedescendant": selectedItemId, selectedKeys: [selectedKey], "aria-label": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown' }, tabs.map(function (tab) { var closable = tab.closable, disabled = tab.disabled, closeIcon = tab.closeIcon, key = tab.key, label = tab.label; var removable = getRemovable(closable, closeIcon, editable, disabled); return /*#__PURE__*/react.createElement(rc_menu_es/* MenuItem */.sN, { key: key, id: "".concat(popupId, "-").concat(key), role: "option", "aria-controls": id && "".concat(id, "-panel-").concat(key), disabled: disabled }, /*#__PURE__*/react.createElement("span", null, label), removable && /*#__PURE__*/react.createElement("button", { type: "button", "aria-label": removeAriaLabel || 'remove', tabIndex: 0, className: "".concat(dropdownPrefix, "-menu-item-remove"), onClick: function onClick(e) { e.stopPropagation(); onRemoveTab(e, key); } }, closeIcon || editable.removeIcon || '×')); })); function selectOffset(offset) { var enabledTabs = tabs.filter(function (tab) { return !tab.disabled; }); var selectedIndex = enabledTabs.findIndex(function (tab) { return tab.key === selectedKey; }) || 0; var len = enabledTabs.length; for (var i = 0; i < len; i += 1) { selectedIndex = (selectedIndex + offset + len) % len; var tab = enabledTabs[selectedIndex]; if (!tab.disabled) { setSelectedKey(tab.key); return; } } } function onKeyDown(e) { var which = e.which; if (!open) { if ([KeyCode/* default.DOWN */.Z.DOWN, KeyCode/* default.SPACE */.Z.SPACE, KeyCode/* default.ENTER */.Z.ENTER].includes(which)) { setOpen(true); e.preventDefault(); } return; } switch (which) { case KeyCode/* default.UP */.Z.UP: selectOffset(-1); e.preventDefault(); break; case KeyCode/* default.DOWN */.Z.DOWN: selectOffset(1); e.preventDefault(); break; case KeyCode/* default.ESC */.Z.ESC: setOpen(false); break; case KeyCode/* default.SPACE */.Z.SPACE: case KeyCode/* default.ENTER */.Z.ENTER: if (selectedKey !== null) onTabClick(selectedKey, e); break; } } // ========================= Effect ========================= (0,react.useEffect)(function () { // We use query element here to avoid React strict warning var ele = document.getElementById(selectedItemId); if (ele && ele.scrollIntoView) { ele.scrollIntoView(false); } }, [selectedKey]); (0,react.useEffect)(function () { if (!open) { setSelectedKey(null); } }, [open]); // ========================= Render ========================= var moreStyle = (0,defineProperty/* default */.Z)({}, rtl ? 'marginRight' : 'marginLeft', tabBarGutter); if (!tabs.length) { moreStyle.visibility = 'hidden'; moreStyle.order = 1; } var overlayClassName = classnames_default()((0,defineProperty/* default */.Z)({}, "".concat(dropdownPrefix, "-rtl"), rtl)); var moreNode = mobile ? null : /*#__PURE__*/react.createElement(rc_dropdown_es, { prefixCls: dropdownPrefix, overlay: menu, trigger: ['hover'], visible: tabs.length ? open : false, transitionName: moreTransitionName, onVisibleChange: setOpen, overlayClassName: classnames_default()(overlayClassName, popupClassName), mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, getPopupContainer: getPopupContainer }, /*#__PURE__*/react.createElement("button", { type: "button", className: "".concat(prefixCls, "-nav-more"), style: moreStyle, tabIndex: -1, "aria-hidden": "true", "aria-haspopup": "listbox", "aria-controls": popupId, id: "".concat(id, "-more"), "aria-expanded": open, onKeyDown: onKeyDown }, moreIcon)); return /*#__PURE__*/react.createElement("div", { className: classnames_default()("".concat(prefixCls, "-nav-operations"), className), style: style, ref: ref }, moreNode, /*#__PURE__*/react.createElement(TabNavList_AddButton, { prefixCls: prefixCls, locale: locale, editable: editable })); } /* harmony default export */ var TabNavList_OperationNode = (/*#__PURE__*/react.memo( /*#__PURE__*/react.forwardRef(OperationNode), function (_, next) { return ( // https://github.com/ant-design/ant-design/issues/32544 // We'd better remove syntactic sugar in `rc-menu` since this has perf issue next.tabMoving ); })); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/TabNode.js function TabNode(_ref) { var _classNames; var prefixCls = _ref.prefixCls, id = _ref.id, active = _ref.active, _ref$tab = _ref.tab, key = _ref$tab.key, label = _ref$tab.label, disabled = _ref$tab.disabled, closeIcon = _ref$tab.closeIcon, closable = _ref.closable, renderWrapper = _ref.renderWrapper, removeAriaLabel = _ref.removeAriaLabel, editable = _ref.editable, onClick = _ref.onClick, onFocus = _ref.onFocus, style = _ref.style; var tabPrefix = "".concat(prefixCls, "-tab"); var removable = getRemovable(closable, closeIcon, editable, disabled); function onInternalClick(e) { if (disabled) { return; } onClick(e); } function onRemoveTab(event) { event.preventDefault(); event.stopPropagation(); editable.onEdit('remove', { key: key, event: event }); } var node = /*#__PURE__*/react.createElement("div", { key: key // ref={ref} , "data-node-key": genDataNodeKey(key), className: classnames_default()(tabPrefix, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(tabPrefix, "-with-remove"), removable), (0,defineProperty/* default */.Z)(_classNames, "".concat(tabPrefix, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(tabPrefix, "-disabled"), disabled), _classNames)), style: style, onClick: onInternalClick }, /*#__PURE__*/react.createElement("div", { role: "tab", "aria-selected": active, id: id && "".concat(id, "-tab-").concat(key), className: "".concat(tabPrefix, "-btn"), "aria-controls": id && "".concat(id, "-panel-").concat(key), "aria-disabled": disabled, tabIndex: disabled ? null : 0, onClick: function onClick(e) { e.stopPropagation(); onInternalClick(e); }, onKeyDown: function onKeyDown(e) { if ([KeyCode/* default.SPACE */.Z.SPACE, KeyCode/* default.ENTER */.Z.ENTER].includes(e.which)) { e.preventDefault(); onInternalClick(e); } }, onFocus: onFocus }, label), removable && /*#__PURE__*/react.createElement("button", { type: "button", "aria-label": removeAriaLabel || 'remove', tabIndex: 0, className: "".concat(tabPrefix, "-remove"), onClick: function onClick(e) { e.stopPropagation(); onRemoveTab(e); } }, closeIcon || editable.removeIcon || '×')); return renderWrapper ? renderWrapper(node) : node; } /* harmony default export */ var TabNavList_TabNode = (TabNode); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/index.js var getSize = function getSize(refObj) { var _ref = refObj.current || {}, _ref$offsetWidth = _ref.offsetWidth, offsetWidth = _ref$offsetWidth === void 0 ? 0 : _ref$offsetWidth, _ref$offsetHeight = _ref.offsetHeight, offsetHeight = _ref$offsetHeight === void 0 ? 0 : _ref$offsetHeight; return [offsetWidth, offsetHeight]; }; /** * Convert `SizeInfo` to unit value. Such as [123, 456] with `top` position get `123` */ var getUnitValue = function getUnitValue(size, tabPositionTopOrBottom) { return size[tabPositionTopOrBottom ? 0 : 1]; }; function TabNavList(props, ref) { var _classNames; var _React$useContext = react.useContext(TabContext), prefixCls = _React$useContext.prefixCls, tabs = _React$useContext.tabs; var className = props.className, style = props.style, id = props.id, animated = props.animated, activeKey = props.activeKey, rtl = props.rtl, extra = props.extra, editable = props.editable, locale = props.locale, tabPosition = props.tabPosition, tabBarGutter = props.tabBarGutter, children = props.children, onTabClick = props.onTabClick, onTabScroll = props.onTabScroll; var containerRef = (0,react.useRef)(); var extraLeftRef = (0,react.useRef)(); var extraRightRef = (0,react.useRef)(); var tabsWrapperRef = (0,react.useRef)(); var tabListRef = (0,react.useRef)(); var operationsRef = (0,react.useRef)(); var innerAddButtonRef = (0,react.useRef)(); // const [getBtnRef, removeBtnRef] = useRefs(); var tabPositionTopOrBottom = tabPosition === 'top' || tabPosition === 'bottom'; var _useSyncState = useSyncState(0, function (next, prev) { if (tabPositionTopOrBottom && onTabScroll) { onTabScroll({ direction: next > prev ? 'left' : 'right' }); } }), _useSyncState2 = (0,slicedToArray/* default */.Z)(_useSyncState, 2), transformLeft = _useSyncState2[0], setTransformLeft = _useSyncState2[1]; var _useSyncState3 = useSyncState(0, function (next, prev) { if (!tabPositionTopOrBottom && onTabScroll) { onTabScroll({ direction: next > prev ? 'top' : 'bottom' }); } }), _useSyncState4 = (0,slicedToArray/* default */.Z)(_useSyncState3, 2), transformTop = _useSyncState4[0], setTransformTop = _useSyncState4[1]; var _useState = (0,react.useState)([0, 0]), _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), containerExcludeExtraSize = _useState2[0], setContainerExcludeExtraSize = _useState2[1]; var _useState3 = (0,react.useState)([0, 0]), _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), tabContentSize = _useState4[0], setTabContentSize = _useState4[1]; var _useState5 = (0,react.useState)([0, 0]), _useState6 = (0,slicedToArray/* default */.Z)(_useState5, 2), addSize = _useState6[0], setAddSize = _useState6[1]; var _useState7 = (0,react.useState)([0, 0]), _useState8 = (0,slicedToArray/* default */.Z)(_useState7, 2), operationSize = _useState8[0], setOperationSize = _useState8[1]; var _useUpdateState = useUpdateState(new Map()), _useUpdateState2 = (0,slicedToArray/* default */.Z)(_useUpdateState, 2), tabSizes = _useUpdateState2[0], setTabSizes = _useUpdateState2[1]; var tabOffsets = useOffsets(tabs, tabSizes, tabContentSize[0]); // ========================== Unit ========================= var containerExcludeExtraSizeValue = getUnitValue(containerExcludeExtraSize, tabPositionTopOrBottom); var tabContentSizeValue = getUnitValue(tabContentSize, tabPositionTopOrBottom); var addSizeValue = getUnitValue(addSize, tabPositionTopOrBottom); var operationSizeValue = getUnitValue(operationSize, tabPositionTopOrBottom); var needScroll = containerExcludeExtraSizeValue < tabContentSizeValue + addSizeValue; var visibleTabContentValue = needScroll ? containerExcludeExtraSizeValue - operationSizeValue : containerExcludeExtraSizeValue - addSizeValue; // ========================== Util ========================= var operationsHiddenClassName = "".concat(prefixCls, "-nav-operations-hidden"); var transformMin = 0; var transformMax = 0; if (!tabPositionTopOrBottom) { transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue); transformMax = 0; } else if (rtl) { transformMin = 0; transformMax = Math.max(0, tabContentSizeValue - visibleTabContentValue); } else { transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue); transformMax = 0; } function alignInRange(value) { if (value < transformMin) { return transformMin; } if (value > transformMax) { return transformMax; } return value; } // ========================= Mobile ======================== var touchMovingRef = (0,react.useRef)(); var _useState9 = (0,react.useState)(), _useState10 = (0,slicedToArray/* default */.Z)(_useState9, 2), lockAnimation = _useState10[0], setLockAnimation = _useState10[1]; function doLockAnimation() { setLockAnimation(Date.now()); } function clearTouchMoving() { window.clearTimeout(touchMovingRef.current); } useTouchMove(tabsWrapperRef, function (offsetX, offsetY) { function doMove(setState, offset) { setState(function (value) { var newValue = alignInRange(value + offset); return newValue; }); } // Skip scroll if place is enough if (!needScroll) { return false; } if (tabPositionTopOrBottom) { doMove(setTransformLeft, offsetX); } else { doMove(setTransformTop, offsetY); } clearTouchMoving(); doLockAnimation(); return true; }); (0,react.useEffect)(function () { clearTouchMoving(); if (lockAnimation) { touchMovingRef.current = window.setTimeout(function () { setLockAnimation(0); }, 100); } return clearTouchMoving; }, [lockAnimation]); // ===================== Visible Range ===================== // Render tab node & collect tab offset var _useVisibleRange = useVisibleRange(tabOffsets, // Container visibleTabContentValue, // Transform tabPositionTopOrBottom ? transformLeft : transformTop, // Tabs tabContentSizeValue, // Add addSizeValue, // Operation operationSizeValue, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { tabs: tabs })), _useVisibleRange2 = (0,slicedToArray/* default */.Z)(_useVisibleRange, 2), visibleStart = _useVisibleRange2[0], visibleEnd = _useVisibleRange2[1]; // ========================= Scroll ======================== var scrollToTab = (0,useEvent/* default */.Z)(function () { var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeKey; var tabOffset = tabOffsets.get(key) || { width: 0, height: 0, left: 0, right: 0, top: 0 }; if (tabPositionTopOrBottom) { // ============ Align with top & bottom ============ var newTransform = transformLeft; // RTL if (rtl) { if (tabOffset.right < transformLeft) { newTransform = tabOffset.right; } else if (tabOffset.right + tabOffset.width > transformLeft + visibleTabContentValue) { newTransform = tabOffset.right + tabOffset.width - visibleTabContentValue; } } // LTR else if (tabOffset.left < -transformLeft) { newTransform = -tabOffset.left; } else if (tabOffset.left + tabOffset.width > -transformLeft + visibleTabContentValue) { newTransform = -(tabOffset.left + tabOffset.width - visibleTabContentValue); } setTransformTop(0); setTransformLeft(alignInRange(newTransform)); } else { // ============ Align with left & right ============ var _newTransform = transformTop; if (tabOffset.top < -transformTop) { _newTransform = -tabOffset.top; } else if (tabOffset.top + tabOffset.height > -transformTop + visibleTabContentValue) { _newTransform = -(tabOffset.top + tabOffset.height - visibleTabContentValue); } setTransformLeft(0); setTransformTop(alignInRange(_newTransform)); } }); // ========================== Tab ========================== var tabNodeStyle = {}; if (tabPosition === 'top' || tabPosition === 'bottom') { tabNodeStyle[rtl ? 'marginRight' : 'marginLeft'] = tabBarGutter; } else { tabNodeStyle.marginTop = tabBarGutter; } var tabNodes = tabs.map(function (tab, i) { var key = tab.key; return /*#__PURE__*/react.createElement(TabNavList_TabNode, { id: id, prefixCls: prefixCls, key: key, tab: tab /* first node should not have margin left */, style: i === 0 ? undefined : tabNodeStyle, closable: tab.closable, editable: editable, active: key === activeKey, renderWrapper: children, removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel, onClick: function onClick(e) { onTabClick(key, e); }, onFocus: function onFocus() { scrollToTab(key); doLockAnimation(); if (!tabsWrapperRef.current) { return; } // Focus element will make scrollLeft change which we should reset back if (!rtl) { tabsWrapperRef.current.scrollLeft = 0; } tabsWrapperRef.current.scrollTop = 0; } }); }); // Update buttons records var updateTabSizes = function updateTabSizes() { return setTabSizes(function () { var newSizes = new Map(); tabs.forEach(function (_ref2) { var _tabListRef$current; var key = _ref2.key; var btnNode = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.querySelector("[data-node-key=\"".concat(genDataNodeKey(key), "\"]")); if (btnNode) { newSizes.set(key, { width: btnNode.offsetWidth, height: btnNode.offsetHeight, left: btnNode.offsetLeft, top: btnNode.offsetTop }); } }); return newSizes; }); }; (0,react.useEffect)(function () { updateTabSizes(); }, [tabs.map(function (tab) { return tab.key; }).join('_')]); var onListHolderResize = useUpdate(function () { // Update wrapper records var containerSize = getSize(containerRef); var extraLeftSize = getSize(extraLeftRef); var extraRightSize = getSize(extraRightRef); setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]); var newAddSize = getSize(innerAddButtonRef); setAddSize(newAddSize); var newOperationSize = getSize(operationsRef); setOperationSize(newOperationSize); // Which includes add button size var tabContentFullSize = getSize(tabListRef); setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]); // Update buttons records updateTabSizes(); }); // ======================== Dropdown ======================= var startHiddenTabs = tabs.slice(0, visibleStart); var endHiddenTabs = tabs.slice(visibleEnd + 1); var hiddenTabs = [].concat((0,toConsumableArray/* default */.Z)(startHiddenTabs), (0,toConsumableArray/* default */.Z)(endHiddenTabs)); // =================== Link & Operations =================== var _useState11 = (0,react.useState)(), _useState12 = (0,slicedToArray/* default */.Z)(_useState11, 2), inkStyle = _useState12[0], setInkStyle = _useState12[1]; var activeTabOffset = tabOffsets.get(activeKey); // Delay set ink style to avoid remove tab blink var inkBarRafRef = (0,react.useRef)(); function cleanInkBarRaf() { raf/* default.cancel */.Z.cancel(inkBarRafRef.current); } (0,react.useEffect)(function () { var newInkStyle = {}; if (activeTabOffset) { if (tabPositionTopOrBottom) { if (rtl) { newInkStyle.right = activeTabOffset.right; } else { newInkStyle.left = activeTabOffset.left; } newInkStyle.width = activeTabOffset.width; } else { newInkStyle.top = activeTabOffset.top; newInkStyle.height = activeTabOffset.height; } } cleanInkBarRaf(); inkBarRafRef.current = (0,raf/* default */.Z)(function () { setInkStyle(newInkStyle); }); return cleanInkBarRaf; }, [activeTabOffset, tabPositionTopOrBottom, rtl]); // ========================= Effect ======================== (0,react.useEffect)(function () { scrollToTab(); // eslint-disable-next-line }, [activeKey, transformMin, transformMax, stringify(activeTabOffset), stringify(tabOffsets), tabPositionTopOrBottom]); // Should recalculate when rtl changed (0,react.useEffect)(function () { onListHolderResize(); // eslint-disable-next-line }, [rtl]); // ========================= Render ======================== var hasDropdown = !!hiddenTabs.length; var wrapPrefix = "".concat(prefixCls, "-nav-wrap"); var pingLeft; var pingRight; var pingTop; var pingBottom; if (tabPositionTopOrBottom) { if (rtl) { pingRight = transformLeft > 0; pingLeft = transformLeft !== transformMax; } else { pingLeft = transformLeft < 0; pingRight = transformLeft !== transformMin; } } else { pingTop = transformTop < 0; pingBottom = transformTop !== transformMin; } return /*#__PURE__*/react.createElement(rc_resize_observer_es/* default */.Z, { onResize: onListHolderResize }, /*#__PURE__*/react.createElement("div", { ref: (0,es_ref/* useComposeRef */.x1)(ref, containerRef), role: "tablist", className: classnames_default()("".concat(prefixCls, "-nav"), className), style: style, onKeyDown: function onKeyDown() { // No need animation when use keyboard doLockAnimation(); } }, /*#__PURE__*/react.createElement(TabNavList_ExtraContent, { ref: extraLeftRef, position: "left", extra: extra, prefixCls: prefixCls }), /*#__PURE__*/react.createElement("div", { className: classnames_default()(wrapPrefix, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(wrapPrefix, "-ping-left"), pingLeft), (0,defineProperty/* default */.Z)(_classNames, "".concat(wrapPrefix, "-ping-right"), pingRight), (0,defineProperty/* default */.Z)(_classNames, "".concat(wrapPrefix, "-ping-top"), pingTop), (0,defineProperty/* default */.Z)(_classNames, "".concat(wrapPrefix, "-ping-bottom"), pingBottom), _classNames)), ref: tabsWrapperRef }, /*#__PURE__*/react.createElement(rc_resize_observer_es/* default */.Z, { onResize: onListHolderResize }, /*#__PURE__*/react.createElement("div", { ref: tabListRef, className: "".concat(prefixCls, "-nav-list"), style: { transform: "translate(".concat(transformLeft, "px, ").concat(transformTop, "px)"), transition: lockAnimation ? 'none' : undefined } }, tabNodes, /*#__PURE__*/react.createElement(TabNavList_AddButton, { ref: innerAddButtonRef, prefixCls: prefixCls, locale: locale, editable: editable, style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, tabNodes.length === 0 ? undefined : tabNodeStyle), {}, { visibility: hasDropdown ? 'hidden' : null }) }), /*#__PURE__*/react.createElement("div", { className: classnames_default()("".concat(prefixCls, "-ink-bar"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-ink-bar-animated"), animated.inkBar)), style: inkStyle })))), /*#__PURE__*/react.createElement(TabNavList_OperationNode, (0,esm_extends/* default */.Z)({}, props, { removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel, ref: operationsRef, prefixCls: prefixCls, tabs: hiddenTabs, className: !hasDropdown && operationsHiddenClassName, tabMoving: !!lockAnimation })), /*#__PURE__*/react.createElement(TabNavList_ExtraContent, { ref: extraRightRef, position: "right", extra: extra, prefixCls: prefixCls }))); /* eslint-enable */ } /* harmony default export */ var es_TabNavList = (/*#__PURE__*/react.forwardRef(TabNavList)); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/Wrapper.js var Wrapper_excluded = ["renderTabBar"], _excluded2 = ["label", "key"]; // zombieJ: To compatible with `renderTabBar` usage. // We have to create a TabNavList components. function TabNavListWrapper(_ref) { var renderTabBar = _ref.renderTabBar, restProps = (0,objectWithoutProperties/* default */.Z)(_ref, Wrapper_excluded); var _React$useContext = react.useContext(TabContext), tabs = _React$useContext.tabs; if (renderTabBar) { var tabNavBarProps = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, restProps), {}, { // Legacy support. We do not use this actually panes: tabs.map(function (_ref2) { var label = _ref2.label, key = _ref2.key, restTabProps = (0,objectWithoutProperties/* default */.Z)(_ref2, _excluded2); return /*#__PURE__*/react.createElement(TabPanelList_TabPane, (0,esm_extends/* default */.Z)({ tab: label, key: key, tabKey: key }, restTabProps)); }) }); return renderTabBar(tabNavBarProps, es_TabNavList); } return /*#__PURE__*/react.createElement(es_TabNavList, restProps); } // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__(80334); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useAnimateConfig.js function useAnimateConfig() { var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { inkBar: true, tabPane: false }; var mergedAnimated; if (animated === false) { mergedAnimated = { inkBar: false, tabPane: false }; } else if (animated === true) { mergedAnimated = { inkBar: true, tabPane: false }; } else { mergedAnimated = (0,objectSpread2/* default */.Z)({ inkBar: true }, (0,esm_typeof/* default */.Z)(animated) === 'object' ? animated : {}); } // Enable tabPane animation if provide motion if (mergedAnimated.tabPaneMotion && mergedAnimated.tabPane === undefined) { mergedAnimated.tabPane = true; } if (!mergedAnimated.tabPaneMotion && mergedAnimated.tabPane) { if (false) {} mergedAnimated.tabPane = false; } return mergedAnimated; } ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/Tabs.js var Tabs_excluded = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "moreIcon", "moreTransitionName", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName"]; // Accessibility https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role /** * Should added antd: * - type * * Removed: * - onNextClick * - onPrevClick * - keyboard */ // Used for accessibility var uuid = 0; function Tabs(_ref, ref) { var _classNames; var id = _ref.id, _ref$prefixCls = _ref.prefixCls, prefixCls = _ref$prefixCls === void 0 ? 'rc-tabs' : _ref$prefixCls, className = _ref.className, items = _ref.items, direction = _ref.direction, activeKey = _ref.activeKey, defaultActiveKey = _ref.defaultActiveKey, editable = _ref.editable, animated = _ref.animated, _ref$tabPosition = _ref.tabPosition, tabPosition = _ref$tabPosition === void 0 ? 'top' : _ref$tabPosition, tabBarGutter = _ref.tabBarGutter, tabBarStyle = _ref.tabBarStyle, tabBarExtraContent = _ref.tabBarExtraContent, locale = _ref.locale, moreIcon = _ref.moreIcon, moreTransitionName = _ref.moreTransitionName, destroyInactiveTabPane = _ref.destroyInactiveTabPane, renderTabBar = _ref.renderTabBar, onChange = _ref.onChange, onTabClick = _ref.onTabClick, onTabScroll = _ref.onTabScroll, getPopupContainer = _ref.getPopupContainer, popupClassName = _ref.popupClassName, restProps = (0,objectWithoutProperties/* default */.Z)(_ref, Tabs_excluded); var tabs = react.useMemo(function () { return (items || []).filter(function (item) { return item && (0,esm_typeof/* default */.Z)(item) === 'object' && 'key' in item; }); }, [items]); var rtl = direction === 'rtl'; var mergedAnimated = useAnimateConfig(animated); // ======================== Mobile ======================== var _useState = (0,react.useState)(false), _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), mobile = _useState2[0], setMobile = _useState2[1]; (0,react.useEffect)(function () { // Only update on the client side setMobile((0,isMobile/* default */.Z)()); }, []); // ====================== Active Key ====================== var _useMergedState = (0,useMergedState/* default */.Z)(function () { var _tabs$; return (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key; }, { value: activeKey, defaultValue: defaultActiveKey }), _useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2), mergedActiveKey = _useMergedState2[0], setMergedActiveKey = _useMergedState2[1]; var _useState3 = (0,react.useState)(function () { return tabs.findIndex(function (tab) { return tab.key === mergedActiveKey; }); }), _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), activeIndex = _useState4[0], setActiveIndex = _useState4[1]; // Reset active key if not exist anymore (0,react.useEffect)(function () { var newActiveIndex = tabs.findIndex(function (tab) { return tab.key === mergedActiveKey; }); if (newActiveIndex === -1) { var _tabs$newActiveIndex; newActiveIndex = Math.max(0, Math.min(activeIndex, tabs.length - 1)); setMergedActiveKey((_tabs$newActiveIndex = tabs[newActiveIndex]) === null || _tabs$newActiveIndex === void 0 ? void 0 : _tabs$newActiveIndex.key); } setActiveIndex(newActiveIndex); }, [tabs.map(function (tab) { return tab.key; }).join('_'), mergedActiveKey, activeIndex]); // ===================== Accessibility ==================== var _useMergedState3 = (0,useMergedState/* default */.Z)(null, { value: id }), _useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2), mergedId = _useMergedState4[0], setMergedId = _useMergedState4[1]; // Async generate id to avoid ssr mapping failed (0,react.useEffect)(function () { if (!id) { setMergedId("rc-tabs-".concat( false ? 0 : uuid)); uuid += 1; } }, []); // ======================== Events ======================== function onInternalTabClick(key, e) { onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(key, e); var isActiveChanged = key !== mergedActiveKey; setMergedActiveKey(key); if (isActiveChanged) { onChange === null || onChange === void 0 ? void 0 : onChange(key); } } // ======================== Render ======================== var sharedProps = { id: mergedId, activeKey: mergedActiveKey, animated: mergedAnimated, tabPosition: tabPosition, rtl: rtl, mobile: mobile }; var tabNavBar; var tabNavBarProps = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, sharedProps), {}, { editable: editable, locale: locale, moreIcon: moreIcon, moreTransitionName: moreTransitionName, tabBarGutter: tabBarGutter, onTabClick: onInternalTabClick, onTabScroll: onTabScroll, extra: tabBarExtraContent, style: tabBarStyle, panes: null, getPopupContainer: getPopupContainer, popupClassName: popupClassName }); return /*#__PURE__*/react.createElement(TabContext.Provider, { value: { tabs: tabs, prefixCls: prefixCls } }, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({ ref: ref, id: id, className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(tabPosition), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-mobile"), mobile), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-editable"), editable), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), rtl), _classNames), className) }, restProps), tabNavBar, /*#__PURE__*/react.createElement(TabNavListWrapper, (0,esm_extends/* default */.Z)({}, tabNavBarProps, { renderTabBar: renderTabBar })), /*#__PURE__*/react.createElement(TabPanelList, (0,esm_extends/* default */.Z)({ destroyInactiveTabPane: destroyInactiveTabPane }, sharedProps, { animated: mergedAnimated })))); } var ForwardTabs = /*#__PURE__*/react.forwardRef(Tabs); if (false) {} /* harmony default export */ var es_Tabs = (ForwardTabs); ;// CONCATENATED MODULE: ./node_modules/rc-tabs/es/index.js /* harmony default export */ var rc_tabs_es = (es_Tabs); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js var context = __webpack_require__(53124); // EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js var useSize = __webpack_require__(98675); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/TabPane.js const TabPane_TabPane = () => null; if (false) {} /* harmony default export */ var tabs_TabPane = (TabPane_TabPane); // EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js var motion = __webpack_require__(33603); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/hooks/useAnimateConfig.js const useAnimateConfig_motion = { motionAppear: false, motionEnter: true, motionLeave: true }; function useAnimateConfig_useAnimateConfig(prefixCls) { let animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { inkBar: true, tabPane: false }; let mergedAnimated; if (animated === false) { mergedAnimated = { inkBar: false, tabPane: false }; } else if (animated === true) { mergedAnimated = { inkBar: true, tabPane: true }; } else { mergedAnimated = Object.assign({ inkBar: true }, typeof animated === 'object' ? animated : {}); } if (mergedAnimated.tabPane) { mergedAnimated.tabPaneMotion = Object.assign(Object.assign({}, useAnimateConfig_motion), { motionName: (0,motion/* getTransitionName */.mL)(prefixCls, 'switch') }); } return mergedAnimated; } // EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__(37419); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/hooks/useLegacyItems.js var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function filter(items) { return items.filter(item => item); } function useLegacyItems(items, children) { if (items) { return items; } false ? 0 : void 0; const childrenItems = (0,toArray/* default */.Z)(children).map(node => { if ( /*#__PURE__*/react.isValidElement(node)) { const { key, props } = node; const _a = props || {}, { tab } = _a, restProps = __rest(_a, ["tab"]); const item = Object.assign(Object.assign({ key: String(key) }, restProps), { label: tab }); return item; } return null; }); return filter(childrenItems); } // EXTERNAL MODULE: ./node_modules/antd/es/style/index.js var style = __webpack_require__(14747); // EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js var genComponentStyleHook = __webpack_require__(67968); // EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js var statistic = __webpack_require__(45503); // EXTERNAL MODULE: ./node_modules/antd/es/style/motion/slide.js var slide = __webpack_require__(67771); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/style/motion.js const genMotionStyle = token => { const { componentCls, motionDurationSlow } = token; return [{ [componentCls]: { [`${componentCls}-switch`]: { '&-appear, &-enter': { transition: 'none', '&-start': { opacity: 0 }, '&-active': { opacity: 1, transition: `opacity ${motionDurationSlow}` } }, '&-leave': { position: 'absolute', transition: 'none', inset: 0, '&-start': { opacity: 1 }, '&-active': { opacity: 0, transition: `opacity ${motionDurationSlow}` } } } } }, // Follow code may reuse in other components [(0,slide/* initSlideMotion */.oN)(token, 'slide-up'), (0,slide/* initSlideMotion */.oN)(token, 'slide-down')]]; }; /* harmony default export */ var style_motion = (genMotionStyle); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/style/index.js const genCardStyle = token => { const { componentCls, tabsCardPadding, cardBg, cardGutter, colorBorderSecondary, itemSelectedColor } = token; return { [`${componentCls}-card`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab`]: { margin: 0, padding: tabsCardPadding, background: cardBg, border: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`, transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}` }, [`${componentCls}-tab-active`]: { color: itemSelectedColor, background: token.colorBgContainer }, [`${componentCls}-ink-bar`]: { visibility: 'hidden' } }, // ========================== Top & Bottom ========================== [`&${componentCls}-top, &${componentCls}-bottom`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab + ${componentCls}-tab`]: { marginLeft: { _skip_check_: true, value: `${cardGutter}px` } } } }, [`&${componentCls}-top`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab`]: { borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0` }, [`${componentCls}-tab-active`]: { borderBottomColor: token.colorBgContainer } } }, [`&${componentCls}-bottom`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab`]: { borderRadius: `0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px` }, [`${componentCls}-tab-active`]: { borderTopColor: token.colorBgContainer } } }, // ========================== Left & Right ========================== [`&${componentCls}-left, &${componentCls}-right`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab + ${componentCls}-tab`]: { marginTop: `${cardGutter}px` } } }, [`&${componentCls}-left`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab`]: { borderRadius: { _skip_check_: true, value: `${token.borderRadiusLG}px 0 0 ${token.borderRadiusLG}px` } }, [`${componentCls}-tab-active`]: { borderRightColor: { _skip_check_: true, value: token.colorBgContainer } } } }, [`&${componentCls}-right`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab`]: { borderRadius: { _skip_check_: true, value: `0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px 0` } }, [`${componentCls}-tab-active`]: { borderLeftColor: { _skip_check_: true, value: token.colorBgContainer } } } } } }; }; const genDropdownStyle = token => { const { componentCls, itemHoverColor, dropdownEdgeChildVerticalPadding } = token; return { [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { position: 'absolute', top: -9999, left: { _skip_check_: true, value: -9999 }, zIndex: token.zIndexPopup, display: 'block', '&-hidden': { display: 'none' }, [`${componentCls}-dropdown-menu`]: { maxHeight: token.tabsDropdownHeight, margin: 0, padding: `${dropdownEdgeChildVerticalPadding}px 0`, overflowX: 'hidden', overflowY: 'auto', textAlign: { _skip_check_: true, value: 'left' }, listStyleType: 'none', backgroundColor: token.colorBgContainer, backgroundClip: 'padding-box', borderRadius: token.borderRadiusLG, outline: 'none', boxShadow: token.boxShadowSecondary, '&-item': Object.assign(Object.assign({}, style/* textEllipsis */.vS), { display: 'flex', alignItems: 'center', minWidth: token.tabsDropdownWidth, margin: 0, padding: `${token.paddingXXS}px ${token.paddingSM}px`, color: token.colorText, fontWeight: 'normal', fontSize: token.fontSize, lineHeight: token.lineHeight, cursor: 'pointer', transition: `all ${token.motionDurationSlow}`, '> span': { flex: 1, whiteSpace: 'nowrap' }, '&-remove': { flex: 'none', marginLeft: { _skip_check_: true, value: token.marginSM }, color: token.colorTextDescription, fontSize: token.fontSizeSM, background: 'transparent', border: 0, cursor: 'pointer', '&:hover': { color: itemHoverColor } }, '&:hover': { background: token.controlItemBgHover }, '&-disabled': { '&, &:hover': { color: token.colorTextDisabled, background: 'transparent', cursor: 'not-allowed' } } }) } }) }; }; const genPositionStyle = token => { const { componentCls, margin, colorBorderSecondary, horizontalMargin, verticalItemPadding, verticalItemMargin } = token; return { // ========================== Top & Bottom ========================== [`${componentCls}-top, ${componentCls}-bottom`]: { flexDirection: 'column', [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { margin: horizontalMargin, '&::before': { position: 'absolute', right: { _skip_check_: true, value: 0 }, left: { _skip_check_: true, value: 0 }, borderBottom: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`, content: "''" }, [`${componentCls}-ink-bar`]: { height: token.lineWidthBold, '&-animated': { transition: `width ${token.motionDurationSlow}, left ${token.motionDurationSlow}, right ${token.motionDurationSlow}` } }, [`${componentCls}-nav-wrap`]: { '&::before, &::after': { top: 0, bottom: 0, width: token.controlHeight }, '&::before': { left: { _skip_check_: true, value: 0 }, boxShadow: token.boxShadowTabsOverflowLeft }, '&::after': { right: { _skip_check_: true, value: 0 }, boxShadow: token.boxShadowTabsOverflowRight }, [`&${componentCls}-nav-wrap-ping-left::before`]: { opacity: 1 }, [`&${componentCls}-nav-wrap-ping-right::after`]: { opacity: 1 } } } }, [`${componentCls}-top`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { '&::before': { bottom: 0 }, [`${componentCls}-ink-bar`]: { bottom: 0 } } }, [`${componentCls}-bottom`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { order: 1, marginTop: `${margin}px`, marginBottom: 0, '&::before': { top: 0 }, [`${componentCls}-ink-bar`]: { top: 0 } }, [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: { order: 0 } }, // ========================== Left & Right ========================== [`${componentCls}-left, ${componentCls}-right`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { flexDirection: 'column', minWidth: token.controlHeight * 1.25, // >>>>>>>>>>> Tab [`${componentCls}-tab`]: { padding: verticalItemPadding, textAlign: 'center' }, [`${componentCls}-tab + ${componentCls}-tab`]: { margin: verticalItemMargin }, // >>>>>>>>>>> Nav [`${componentCls}-nav-wrap`]: { flexDirection: 'column', '&::before, &::after': { right: { _skip_check_: true, value: 0 }, left: { _skip_check_: true, value: 0 }, height: token.controlHeight }, '&::before': { top: 0, boxShadow: token.boxShadowTabsOverflowTop }, '&::after': { bottom: 0, boxShadow: token.boxShadowTabsOverflowBottom }, [`&${componentCls}-nav-wrap-ping-top::before`]: { opacity: 1 }, [`&${componentCls}-nav-wrap-ping-bottom::after`]: { opacity: 1 } }, // >>>>>>>>>>> Ink Bar [`${componentCls}-ink-bar`]: { width: token.lineWidthBold, '&-animated': { transition: `height ${token.motionDurationSlow}, top ${token.motionDurationSlow}` } }, [`${componentCls}-nav-list, ${componentCls}-nav-operations`]: { flex: '1 0 auto', flexDirection: 'column' } } }, [`${componentCls}-left`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-ink-bar`]: { right: { _skip_check_: true, value: 0 } } }, [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: { marginLeft: { _skip_check_: true, value: `-${token.lineWidth}px` }, borderLeft: { _skip_check_: true, value: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}` }, [`> ${componentCls}-content > ${componentCls}-tabpane`]: { paddingLeft: { _skip_check_: true, value: token.paddingLG } } } }, [`${componentCls}-right`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { order: 1, [`${componentCls}-ink-bar`]: { left: { _skip_check_: true, value: 0 } } }, [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: { order: 0, marginRight: { _skip_check_: true, value: -token.lineWidth }, borderRight: { _skip_check_: true, value: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}` }, [`> ${componentCls}-content > ${componentCls}-tabpane`]: { paddingRight: { _skip_check_: true, value: token.paddingLG } } } } }; }; const genSizeStyle = token => { const { componentCls, cardPaddingSM, cardPaddingLG, horizontalItemPaddingSM, horizontalItemPaddingLG } = token; return { [componentCls]: { '&-small': { [`> ${componentCls}-nav`]: { [`${componentCls}-tab`]: { padding: horizontalItemPaddingSM, fontSize: token.titleFontSizeSM } } }, '&-large': { [`> ${componentCls}-nav`]: { [`${componentCls}-tab`]: { padding: horizontalItemPaddingLG, fontSize: token.titleFontSizeLG } } } }, [`${componentCls}-card`]: { [`&${componentCls}-small`]: { [`> ${componentCls}-nav`]: { [`${componentCls}-tab`]: { padding: cardPaddingSM } }, [`&${componentCls}-bottom`]: { [`> ${componentCls}-nav ${componentCls}-tab`]: { borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px` } }, [`&${componentCls}-top`]: { [`> ${componentCls}-nav ${componentCls}-tab`]: { borderRadius: `${token.borderRadius}px ${token.borderRadius}px 0 0` } }, [`&${componentCls}-right`]: { [`> ${componentCls}-nav ${componentCls}-tab`]: { borderRadius: { _skip_check_: true, value: `0 ${token.borderRadius}px ${token.borderRadius}px 0` } } }, [`&${componentCls}-left`]: { [`> ${componentCls}-nav ${componentCls}-tab`]: { borderRadius: { _skip_check_: true, value: `${token.borderRadius}px 0 0 ${token.borderRadius}px` } } } }, [`&${componentCls}-large`]: { [`> ${componentCls}-nav`]: { [`${componentCls}-tab`]: { padding: cardPaddingLG } } } } }; }; const genTabStyle = token => { const { componentCls, itemActiveColor, itemHoverColor, iconCls, tabsHorizontalItemMargin, horizontalItemPadding, itemSelectedColor } = token; const tabCls = `${componentCls}-tab`; return { [tabCls]: { position: 'relative', display: 'inline-flex', alignItems: 'center', padding: horizontalItemPadding, fontSize: token.titleFontSize, background: 'transparent', border: 0, outline: 'none', cursor: 'pointer', '&-btn, &-remove': Object.assign({ '&:focus:not(:focus-visible), &:active': { color: itemActiveColor } }, (0,style/* genFocusStyle */.Qy)(token)), '&-btn': { outline: 'none', transition: 'all 0.3s' }, '&-remove': { flex: 'none', marginRight: { _skip_check_: true, value: -token.marginXXS }, marginLeft: { _skip_check_: true, value: token.marginXS }, color: token.colorTextDescription, fontSize: token.fontSizeSM, background: 'transparent', border: 'none', outline: 'none', cursor: 'pointer', transition: `all ${token.motionDurationSlow}`, '&:hover': { color: token.colorTextHeading } }, '&:hover': { color: itemHoverColor }, [`&${tabCls}-active ${tabCls}-btn`]: { color: itemSelectedColor, textShadow: token.tabsActiveTextShadow }, [`&${tabCls}-disabled`]: { color: token.colorTextDisabled, cursor: 'not-allowed' }, [`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: { '&:focus, &:active': { color: token.colorTextDisabled } }, [`& ${tabCls}-remove ${iconCls}`]: { margin: 0 }, [iconCls]: { marginRight: { _skip_check_: true, value: token.marginSM } } }, [`${tabCls} + ${tabCls}`]: { margin: { _skip_check_: true, value: tabsHorizontalItemMargin } } }; }; const genRtlStyle = token => { const { componentCls, tabsHorizontalItemMarginRTL, iconCls, cardGutter } = token; const rtlCls = `${componentCls}-rtl`; return { [rtlCls]: { direction: 'rtl', [`${componentCls}-nav`]: { [`${componentCls}-tab`]: { margin: { _skip_check_: true, value: tabsHorizontalItemMarginRTL }, [`${componentCls}-tab:last-of-type`]: { marginLeft: { _skip_check_: true, value: 0 } }, [iconCls]: { marginRight: { _skip_check_: true, value: 0 }, marginLeft: { _skip_check_: true, value: `${token.marginSM}px` } }, [`${componentCls}-tab-remove`]: { marginRight: { _skip_check_: true, value: `${token.marginXS}px` }, marginLeft: { _skip_check_: true, value: `-${token.marginXXS}px` }, [iconCls]: { margin: 0 } } } }, [`&${componentCls}-left`]: { [`> ${componentCls}-nav`]: { order: 1 }, [`> ${componentCls}-content-holder`]: { order: 0 } }, [`&${componentCls}-right`]: { [`> ${componentCls}-nav`]: { order: 0 }, [`> ${componentCls}-content-holder`]: { order: 1 } }, // ====================== Card ====================== [`&${componentCls}-card${componentCls}-top, &${componentCls}-card${componentCls}-bottom`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-tab + ${componentCls}-tab`]: { marginRight: { _skip_check_: true, value: cardGutter }, marginLeft: { _skip_check_: true, value: 0 } } } } }, [`${componentCls}-dropdown-rtl`]: { direction: 'rtl' }, [`${componentCls}-menu-item`]: { [`${componentCls}-dropdown-rtl`]: { textAlign: { _skip_check_: true, value: 'right' } } } }; }; const genTabsStyle = token => { const { componentCls, tabsCardPadding, cardHeight, cardGutter, itemHoverColor, itemActiveColor, colorBorderSecondary } = token; return { [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { display: 'flex', // ========================== Navigation ========================== [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { position: 'relative', display: 'flex', flex: 'none', alignItems: 'center', [`${componentCls}-nav-wrap`]: { position: 'relative', display: 'flex', flex: 'auto', alignSelf: 'stretch', overflow: 'hidden', whiteSpace: 'nowrap', transform: 'translate(0)', // >>>>> Ping shadow '&::before, &::after': { position: 'absolute', zIndex: 1, opacity: 0, transition: `opacity ${token.motionDurationSlow}`, content: "''", pointerEvents: 'none' } }, [`${componentCls}-nav-list`]: { position: 'relative', display: 'flex', transition: `opacity ${token.motionDurationSlow}` }, // >>>>>>>> Operations [`${componentCls}-nav-operations`]: { display: 'flex', alignSelf: 'stretch' }, [`${componentCls}-nav-operations-hidden`]: { position: 'absolute', visibility: 'hidden', pointerEvents: 'none' }, [`${componentCls}-nav-more`]: { position: 'relative', padding: tabsCardPadding, background: 'transparent', border: 0, color: token.colorText, '&::after': { position: 'absolute', right: { _skip_check_: true, value: 0 }, bottom: 0, left: { _skip_check_: true, value: 0 }, height: token.controlHeightLG / 8, transform: 'translateY(100%)', content: "''" } }, [`${componentCls}-nav-add`]: Object.assign({ minWidth: cardHeight, marginLeft: { _skip_check_: true, value: cardGutter }, padding: `0 ${token.paddingXS}px`, background: 'transparent', border: `${token.lineWidth}px ${token.lineType} ${colorBorderSecondary}`, borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`, outline: 'none', cursor: 'pointer', color: token.colorText, transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`, '&:hover': { color: itemHoverColor }, '&:active, &:focus:not(:focus-visible)': { color: itemActiveColor } }, (0,style/* genFocusStyle */.Qy)(token)) }, [`${componentCls}-extra-content`]: { flex: 'none' }, // ============================ InkBar ============================ [`${componentCls}-ink-bar`]: { position: 'absolute', background: token.inkBarColor, pointerEvents: 'none' } }), genTabStyle(token)), { // =========================== TabPanes =========================== [`${componentCls}-content`]: { position: 'relative', width: '100%' }, [`${componentCls}-content-holder`]: { flex: 'auto', minWidth: 0, minHeight: 0 }, [`${componentCls}-tabpane`]: { outline: 'none', '&-hidden': { display: 'none' } } }), [`${componentCls}-centered`]: { [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: { [`${componentCls}-nav-wrap`]: { [`&:not([class*='${componentCls}-nav-wrap-ping'])`]: { justifyContent: 'center' } } } } }; }; // ============================== Export ============================== /* harmony default export */ var tabs_style = ((0,genComponentStyleHook/* default */.Z)('Tabs', token => { const tabsToken = (0,statistic/* merge */.TS)(token, { // `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight` tabsCardPadding: token.cardPadding || `${(token.cardHeight - Math.round(token.fontSize * token.lineHeight)) / 2 - token.lineWidth}px ${token.padding}px`, dropdownEdgeChildVerticalPadding: token.paddingXXS, tabsActiveTextShadow: '0 0 0.25px currentcolor', tabsDropdownHeight: 200, tabsDropdownWidth: 120, tabsHorizontalItemMargin: `0 0 0 ${token.horizontalItemGutter}px`, tabsHorizontalItemMarginRTL: `0 0 0 ${token.horizontalItemGutter}px` }); return [genSizeStyle(tabsToken), genRtlStyle(tabsToken), genPositionStyle(tabsToken), genDropdownStyle(tabsToken), genCardStyle(tabsToken), genTabsStyle(tabsToken), style_motion(tabsToken)]; }, token => { const cardHeight = token.controlHeightLG; return { zIndexPopup: token.zIndexPopupBase + 50, cardBg: token.colorFillAlter, cardHeight, // Initialize with empty string, because cardPadding will be calculated with cardHeight by default. cardPadding: ``, cardPaddingSM: `${token.paddingXXS * 1.5}px ${token.padding}px`, cardPaddingLG: `${token.paddingXS}px ${token.padding}px ${token.paddingXXS * 1.5}px`, titleFontSize: token.fontSize, titleFontSizeLG: token.fontSizeLG, titleFontSizeSM: token.fontSize, inkBarColor: token.colorPrimary, horizontalMargin: `0 0 ${token.margin}px 0`, horizontalItemGutter: 32, // Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default. horizontalItemMargin: ``, horizontalItemMarginRTL: ``, horizontalItemPadding: `${token.paddingSM}px 0`, horizontalItemPaddingSM: `${token.paddingXS}px 0`, horizontalItemPaddingLG: `${token.padding}px 0`, verticalItemPadding: `${token.paddingXS}px ${token.paddingLG}px`, verticalItemMargin: `${token.margin}px 0 0 0`, itemSelectedColor: token.colorPrimary, itemHoverColor: token.colorPrimaryHover, itemActiveColor: token.colorPrimaryActive, cardGutter: token.marginXXS / 2 }; })); ;// CONCATENATED MODULE: ./node_modules/antd/es/tabs/index.js 'use client'; var tabs_rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; const tabs_Tabs = props => { const { type, className, rootClassName, size: customSize, onEdit, hideAdd, centered, addIcon, popupClassName, children, items, animated, style } = props, otherProps = tabs_rest(props, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "popupClassName", "children", "items", "animated", "style"]); const { prefixCls: customizePrefixCls, moreIcon = /*#__PURE__*/react.createElement(EllipsisOutlined/* default */.Z, null) } = otherProps; const { direction, tabs, getPrefixCls, getPopupContainer } = react.useContext(context/* ConfigContext */.E_); const prefixCls = getPrefixCls('tabs', customizePrefixCls); const [wrapSSR, hashId] = tabs_style(prefixCls); let editable; if (type === 'editable-card') { editable = { onEdit: (editType, _ref) => { let { key, event } = _ref; onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === 'add' ? event : key, editType); }, removeIcon: /*#__PURE__*/react.createElement(CloseOutlined/* default */.Z, null), addIcon: addIcon || /*#__PURE__*/react.createElement(PlusOutlined/* default */.Z, null), showAdd: hideAdd !== true }; } const rootPrefixCls = getPrefixCls(); false ? 0 : void 0; const mergedItems = useLegacyItems(items, children); const mergedAnimated = useAnimateConfig_useAnimateConfig(prefixCls, animated); const size = (0,useSize/* default */.Z)(customSize); const mergedStyle = Object.assign(Object.assign({}, tabs === null || tabs === void 0 ? void 0 : tabs.style), style); return wrapSSR( /*#__PURE__*/react.createElement(rc_tabs_es, Object.assign({ direction: direction, getPopupContainer: getPopupContainer, moreTransitionName: `${rootPrefixCls}-slide-up` }, otherProps, { items: mergedItems, className: classnames_default()({ [`${prefixCls}-${size}`]: size, [`${prefixCls}-card`]: ['card', 'editable-card'].includes(type), [`${prefixCls}-editable-card`]: type === 'editable-card', [`${prefixCls}-centered`]: centered }, tabs === null || tabs === void 0 ? void 0 : tabs.className, className, rootClassName, hashId), popupClassName: classnames_default()(popupClassName, hashId), style: mergedStyle, editable: editable, moreIcon: moreIcon, prefixCls: prefixCls, animated: mergedAnimated }))); }; tabs_Tabs.TabPane = tabs_TabPane; if (false) {} /* harmony default export */ var tabs = (tabs_Tabs); /***/ }), /***/ 31131: /*!*********************************************!*\ !*** ./node_modules/rc-util/es/isMobile.js ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { /* harmony default export */ __webpack_exports__["Z"] = (function () { if (typeof navigator === 'undefined' || typeof window === 'undefined') { return false; } var agent = navigator.userAgent || navigator.vendor || window.opera; return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4)); }); /***/ }) }]);