"use strict"; (self["webpackChunk_core_volunteer_app"] = self["webpackChunk_core_volunteer_app"] || []).push([["vendors-node_modules_antd_lib_style_compact-item-vertical_js-node_modules_antd_lib_style_comp-3a3284"],{ /***/ "../../../node_modules/antd/lib/style/compact-item-vertical.js": /*!*********************************************************************!*\ !*** ../../../node_modules/antd/lib/style/compact-item-vertical.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.genCompactItemVerticalStyle = genCompactItemVerticalStyle; function compactItemVerticalBorder(token, parentCls, prefixCls) { return { // border collapse [`&-item:not(${parentCls}-last-item)`]: { marginBottom: token.calc(token.lineWidth).mul(-1).equal() }, [`&-item:not(${prefixCls}-status-success)`]: { zIndex: 2 }, '&-item': { '&:hover,&:focus,&:active': { zIndex: 3 }, '&[disabled]': { zIndex: 0 } } }; } function compactItemBorderVerticalRadius(prefixCls, parentCls) { return { [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: { borderRadius: 0 }, [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: { [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: { borderEndEndRadius: 0, borderEndStartRadius: 0 } }, [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: { [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: { borderStartStartRadius: 0, borderStartEndRadius: 0 } } }; } function genCompactItemVerticalStyle(token) { const compactCls = `${token.componentCls}-compact-vertical`; return { [compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls, token.componentCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls)) }; } /***/ }), /***/ "../../../node_modules/antd/lib/style/compact-item.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/style/compact-item.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.genCompactItemStyle = genCompactItemStyle; // handle border collapse function compactItemBorder(token, parentCls, options, prefixCls) { const { focusElCls, focus, borderElCls } = options; const childCombinator = borderElCls ? '> *' : ''; const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(','); return { [`&-item:not(${parentCls}-last-item)`]: { marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal() }, [`&-item:not(${prefixCls}-status-success)`]: { zIndex: 2 }, '&-item': Object.assign(Object.assign({ [hoverEffects]: { zIndex: 3 } }, focusElCls ? { [`&${focusElCls}`]: { zIndex: 3 } } : {}), { [`&[disabled] ${childCombinator}`]: { zIndex: 0 } }) }; } // handle border-radius function compactItemBorderRadius(prefixCls, parentCls, options) { const { borderElCls } = options; const childCombinator = borderElCls ? `> ${borderElCls}` : ''; return { [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: { borderRadius: 0 }, [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: { [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: { borderStartEndRadius: 0, borderEndEndRadius: 0 } }, [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: { [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: { borderStartStartRadius: 0, borderEndStartRadius: 0 } } }; } function genCompactItemStyle(token, options = { focus: true }) { const { componentCls } = token; const { componentCls: customizePrefixCls } = options; const mergedComponentCls = customizePrefixCls || componentCls; const compactCls = `${mergedComponentCls}-compact`; return { [compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options, mergedComponentCls)), compactItemBorderRadius(mergedComponentCls, compactCls, options)) }; } /***/ }), /***/ "../../../node_modules/antd/lib/style/index.js": /*!*****************************************************!*\ !*** ../../../node_modules/antd/lib/style/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.textEllipsis = exports.resetIcon = exports.resetComponent = exports.operationUnit = exports.genLinkStyle = exports.genIconStyle = exports.genFocusStyle = exports.genFocusOutline = exports.genCommonStyle = exports.clearFix = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const textEllipsis = exports.textEllipsis = { overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }; const resetComponent = (token, needInheritFontFamily = false) => ({ boxSizing: 'border-box', margin: 0, padding: 0, color: token.colorText, fontSize: token.fontSize, // font-variant: @font-variant-base; lineHeight: token.lineHeight, listStyle: 'none', // font-feature-settings: @font-feature-settings-base; fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily }); exports.resetComponent = resetComponent; const resetIcon = () => ({ display: 'inline-flex', alignItems: 'center', color: 'inherit', fontStyle: 'normal', lineHeight: 0, textAlign: 'center', textTransform: 'none', // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 verticalAlign: '-0.125em', textRendering: 'optimizeLegibility', '-webkit-font-smoothing': 'antialiased', '-moz-osx-font-smoothing': 'grayscale', '> *': { lineHeight: 1 }, svg: { display: 'inline-block' } }); exports.resetIcon = resetIcon; const clearFix = () => ({ // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229 '&::before': { display: 'table', content: '""' }, '&::after': { // https://github.com/ant-design/ant-design/issues/21864 display: 'table', clear: 'both', content: '""' } }); exports.clearFix = clearFix; const genLinkStyle = token => ({ a: { color: token.colorLink, textDecoration: token.linkDecoration, backgroundColor: 'transparent', // remove the gray background on active links in IE 10. outline: 'none', cursor: 'pointer', transition: `color ${token.motionDurationSlow}`, '-webkit-text-decoration-skip': 'objects', // remove gaps in links underline in iOS 8+ and Safari 8+. '&:hover': { color: token.colorLinkHover }, '&:active': { color: token.colorLinkActive }, '&:active, &:hover': { textDecoration: token.linkHoverDecoration, outline: 0 }, // https://github.com/ant-design/ant-design/issues/22503 '&:focus': { textDecoration: token.linkFocusDecoration, outline: 0 }, '&[disabled]': { color: token.colorTextDisabled, cursor: 'not-allowed' } } }); exports.genLinkStyle = genLinkStyle; const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => { const prefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`; const rootPrefixSelector = rootCls ? `.${rootCls}` : prefixSelector; const resetStyle = { boxSizing: 'border-box', '&::before, &::after': { boxSizing: 'border-box' } }; let resetFontStyle = {}; if (resetFont !== false) { resetFontStyle = { fontFamily: token.fontFamily, fontSize: token.fontSize }; } return { [rootPrefixSelector]: Object.assign(Object.assign(Object.assign({}, resetFontStyle), resetStyle), { [prefixSelector]: resetStyle }) }; }; exports.genCommonStyle = genCommonStyle; const genFocusOutline = (token, offset) => ({ outline: `${(0, _cssinjs.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`, outlineOffset: offset !== null && offset !== void 0 ? offset : 1, transition: 'outline-offset 0s, outline 0s' }); exports.genFocusOutline = genFocusOutline; const genFocusStyle = (token, offset) => ({ '&:focus-visible': genFocusOutline(token, offset) }); exports.genFocusStyle = genFocusStyle; const genIconStyle = iconPrefixCls => ({ [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), { [`.${iconPrefixCls} .${iconPrefixCls}-icon`]: { display: 'block' } }) }); exports.genIconStyle = genIconStyle; const operationUnit = token => Object.assign(Object.assign({ // FIXME: This use link but is a operation unit. Seems should be a colorPrimary. // And Typography use this to generate link style which should not do this. color: token.colorLink, textDecoration: token.linkDecoration, outline: 'none', cursor: 'pointer', transition: `all ${token.motionDurationSlow}`, border: 0, padding: 0, background: 'none', userSelect: 'none' }, genFocusStyle(token)), { '&:hover': { color: token.colorLinkHover, textDecoration: token.linkHoverDecoration }, '&:focus': { color: token.colorLinkHover, textDecoration: token.linkFocusDecoration }, '&:active': { color: token.colorLinkActive, textDecoration: token.linkHoverDecoration } }); exports.operationUnit = operationUnit; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/collapse.js": /*!***************************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/collapse.js ***! \***************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; const genCollapseMotion = token => ({ [token.componentCls]: { // For common/openAnimation [`${token.antCls}-motion-collapse-legacy`]: { overflow: 'hidden', '&-active': { transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` } }, [`${token.antCls}-motion-collapse`]: { overflow: 'hidden', transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` } } }); var _default = exports["default"] = genCollapseMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/fade.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/fade.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.initFadeMotion = exports.fadeOut = exports.fadeIn = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _motion = __webpack_require__(/*! ./motion */ "../../../node_modules/antd/lib/style/motion/motion.js"); const fadeIn = exports.fadeIn = new _cssinjs.Keyframes('antFadeIn', { '0%': { opacity: 0 }, '100%': { opacity: 1 } }); const fadeOut = exports.fadeOut = new _cssinjs.Keyframes('antFadeOut', { '0%': { opacity: 1 }, '100%': { opacity: 0 } }); const initFadeMotion = (token, sameLevel = false) => { const { antCls } = token; const motionCls = `${antCls}-fade`; const sameLevelPrefix = sameLevel ? '&' : ''; return [(0, _motion.initMotion)(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), { [` ${sameLevelPrefix}${motionCls}-enter, ${sameLevelPrefix}${motionCls}-appear `]: { opacity: 0, animationTimingFunction: 'linear' }, [`${sameLevelPrefix}${motionCls}-leave`]: { animationTimingFunction: 'linear' } }]; }; exports.initFadeMotion = initFadeMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/index.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/index.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "fadeIn", ({ enumerable: true, get: function () { return _fade.fadeIn; } })); Object.defineProperty(exports, "fadeOut", ({ enumerable: true, get: function () { return _fade.fadeOut; } })); Object.defineProperty(exports, "genCollapseMotion", ({ enumerable: true, get: function () { return _collapse.default; } })); Object.defineProperty(exports, "initFadeMotion", ({ enumerable: true, get: function () { return _fade.initFadeMotion; } })); Object.defineProperty(exports, "initMoveMotion", ({ enumerable: true, get: function () { return _move.initMoveMotion; } })); Object.defineProperty(exports, "initSlideMotion", ({ enumerable: true, get: function () { return _slide.initSlideMotion; } })); Object.defineProperty(exports, "initZoomMotion", ({ enumerable: true, get: function () { return _zoom.initZoomMotion; } })); Object.defineProperty(exports, "moveDownIn", ({ enumerable: true, get: function () { return _move.moveDownIn; } })); Object.defineProperty(exports, "moveDownOut", ({ enumerable: true, get: function () { return _move.moveDownOut; } })); Object.defineProperty(exports, "moveLeftIn", ({ enumerable: true, get: function () { return _move.moveLeftIn; } })); Object.defineProperty(exports, "moveLeftOut", ({ enumerable: true, get: function () { return _move.moveLeftOut; } })); Object.defineProperty(exports, "moveRightIn", ({ enumerable: true, get: function () { return _move.moveRightIn; } })); Object.defineProperty(exports, "moveRightOut", ({ enumerable: true, get: function () { return _move.moveRightOut; } })); Object.defineProperty(exports, "moveUpIn", ({ enumerable: true, get: function () { return _move.moveUpIn; } })); Object.defineProperty(exports, "moveUpOut", ({ enumerable: true, get: function () { return _move.moveUpOut; } })); Object.defineProperty(exports, "slideDownIn", ({ enumerable: true, get: function () { return _slide.slideDownIn; } })); Object.defineProperty(exports, "slideDownOut", ({ enumerable: true, get: function () { return _slide.slideDownOut; } })); Object.defineProperty(exports, "slideLeftIn", ({ enumerable: true, get: function () { return _slide.slideLeftIn; } })); Object.defineProperty(exports, "slideLeftOut", ({ enumerable: true, get: function () { return _slide.slideLeftOut; } })); Object.defineProperty(exports, "slideRightIn", ({ enumerable: true, get: function () { return _slide.slideRightIn; } })); Object.defineProperty(exports, "slideRightOut", ({ enumerable: true, get: function () { return _slide.slideRightOut; } })); Object.defineProperty(exports, "slideUpIn", ({ enumerable: true, get: function () { return _slide.slideUpIn; } })); Object.defineProperty(exports, "slideUpOut", ({ enumerable: true, get: function () { return _slide.slideUpOut; } })); Object.defineProperty(exports, "zoomBigIn", ({ enumerable: true, get: function () { return _zoom.zoomBigIn; } })); Object.defineProperty(exports, "zoomBigOut", ({ enumerable: true, get: function () { return _zoom.zoomBigOut; } })); Object.defineProperty(exports, "zoomDownIn", ({ enumerable: true, get: function () { return _zoom.zoomDownIn; } })); Object.defineProperty(exports, "zoomDownOut", ({ enumerable: true, get: function () { return _zoom.zoomDownOut; } })); Object.defineProperty(exports, "zoomIn", ({ enumerable: true, get: function () { return _zoom.zoomIn; } })); Object.defineProperty(exports, "zoomLeftIn", ({ enumerable: true, get: function () { return _zoom.zoomLeftIn; } })); Object.defineProperty(exports, "zoomLeftOut", ({ enumerable: true, get: function () { return _zoom.zoomLeftOut; } })); Object.defineProperty(exports, "zoomOut", ({ enumerable: true, get: function () { return _zoom.zoomOut; } })); Object.defineProperty(exports, "zoomRightIn", ({ enumerable: true, get: function () { return _zoom.zoomRightIn; } })); Object.defineProperty(exports, "zoomRightOut", ({ enumerable: true, get: function () { return _zoom.zoomRightOut; } })); Object.defineProperty(exports, "zoomUpIn", ({ enumerable: true, get: function () { return _zoom.zoomUpIn; } })); Object.defineProperty(exports, "zoomUpOut", ({ enumerable: true, get: function () { return _zoom.zoomUpOut; } })); var _collapse = _interopRequireDefault(__webpack_require__(/*! ./collapse */ "../../../node_modules/antd/lib/style/motion/collapse.js")); var _fade = __webpack_require__(/*! ./fade */ "../../../node_modules/antd/lib/style/motion/fade.js"); var _move = __webpack_require__(/*! ./move */ "../../../node_modules/antd/lib/style/motion/move.js"); var _slide = __webpack_require__(/*! ./slide */ "../../../node_modules/antd/lib/style/motion/slide.js"); var _zoom = __webpack_require__(/*! ./zoom */ "../../../node_modules/antd/lib/style/motion/zoom.js"); /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/motion.js": /*!*************************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/motion.js ***! \*************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.initMotion = void 0; const initMotionCommon = duration => ({ animationDuration: duration, animationFillMode: 'both' }); // FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove const initMotionCommonLeave = duration => ({ animationDuration: duration, animationFillMode: 'both' }); const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel = false) => { const sameLevelPrefix = sameLevel ? '&' : ''; return { [` ${sameLevelPrefix}${motionCls}-enter, ${sameLevelPrefix}${motionCls}-appear `]: Object.assign(Object.assign({}, initMotionCommon(duration)), { animationPlayState: 'paused' }), [`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), { animationPlayState: 'paused' }), [` ${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active, ${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active `]: { animationName: inKeyframes, animationPlayState: 'running' }, [`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: { animationName: outKeyframes, animationPlayState: 'running', pointerEvents: 'none' } }; }; exports.initMotion = initMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/move.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/move.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.moveUpOut = exports.moveUpIn = exports.moveRightOut = exports.moveRightIn = exports.moveLeftOut = exports.moveLeftIn = exports.moveDownOut = exports.moveDownIn = exports.initMoveMotion = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _motion = __webpack_require__(/*! ./motion */ "../../../node_modules/antd/lib/style/motion/motion.js"); const moveDownIn = exports.moveDownIn = new _cssinjs.Keyframes('antMoveDownIn', { '0%': { transform: 'translate3d(0, 100%, 0)', transformOrigin: '0 0', opacity: 0 }, '100%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 } }); const moveDownOut = exports.moveDownOut = new _cssinjs.Keyframes('antMoveDownOut', { '0%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 }, '100%': { transform: 'translate3d(0, 100%, 0)', transformOrigin: '0 0', opacity: 0 } }); const moveLeftIn = exports.moveLeftIn = new _cssinjs.Keyframes('antMoveLeftIn', { '0%': { transform: 'translate3d(-100%, 0, 0)', transformOrigin: '0 0', opacity: 0 }, '100%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 } }); const moveLeftOut = exports.moveLeftOut = new _cssinjs.Keyframes('antMoveLeftOut', { '0%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 }, '100%': { transform: 'translate3d(-100%, 0, 0)', transformOrigin: '0 0', opacity: 0 } }); const moveRightIn = exports.moveRightIn = new _cssinjs.Keyframes('antMoveRightIn', { '0%': { transform: 'translate3d(100%, 0, 0)', transformOrigin: '0 0', opacity: 0 }, '100%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 } }); const moveRightOut = exports.moveRightOut = new _cssinjs.Keyframes('antMoveRightOut', { '0%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 }, '100%': { transform: 'translate3d(100%, 0, 0)', transformOrigin: '0 0', opacity: 0 } }); const moveUpIn = exports.moveUpIn = new _cssinjs.Keyframes('antMoveUpIn', { '0%': { transform: 'translate3d(0, -100%, 0)', transformOrigin: '0 0', opacity: 0 }, '100%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 } }); const moveUpOut = exports.moveUpOut = new _cssinjs.Keyframes('antMoveUpOut', { '0%': { transform: 'translate3d(0, 0, 0)', transformOrigin: '0 0', opacity: 1 }, '100%': { transform: 'translate3d(0, -100%, 0)', transformOrigin: '0 0', opacity: 0 } }); const moveMotion = { 'move-up': { inKeyframes: moveUpIn, outKeyframes: moveUpOut }, 'move-down': { inKeyframes: moveDownIn, outKeyframes: moveDownOut }, 'move-left': { inKeyframes: moveLeftIn, outKeyframes: moveLeftOut }, 'move-right': { inKeyframes: moveRightIn, outKeyframes: moveRightOut } }; const initMoveMotion = (token, motionName) => { const { antCls } = token; const motionCls = `${antCls}-${motionName}`; const { inKeyframes, outKeyframes } = moveMotion[motionName]; return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), { [` ${motionCls}-enter, ${motionCls}-appear `]: { opacity: 0, animationTimingFunction: token.motionEaseOutCirc }, [`${motionCls}-leave`]: { animationTimingFunction: token.motionEaseInOutCirc } }]; }; exports.initMoveMotion = initMoveMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/slide.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/slide.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.slideUpOut = exports.slideUpIn = exports.slideRightOut = exports.slideRightIn = exports.slideLeftOut = exports.slideLeftIn = exports.slideDownOut = exports.slideDownIn = exports.initSlideMotion = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _motion = __webpack_require__(/*! ./motion */ "../../../node_modules/antd/lib/style/motion/motion.js"); const slideUpIn = exports.slideUpIn = new _cssinjs.Keyframes('antSlideUpIn', { '0%': { transform: 'scaleY(0.8)', transformOrigin: '0% 0%', opacity: 0 }, '100%': { transform: 'scaleY(1)', transformOrigin: '0% 0%', opacity: 1 } }); const slideUpOut = exports.slideUpOut = new _cssinjs.Keyframes('antSlideUpOut', { '0%': { transform: 'scaleY(1)', transformOrigin: '0% 0%', opacity: 1 }, '100%': { transform: 'scaleY(0.8)', transformOrigin: '0% 0%', opacity: 0 } }); const slideDownIn = exports.slideDownIn = new _cssinjs.Keyframes('antSlideDownIn', { '0%': { transform: 'scaleY(0.8)', transformOrigin: '100% 100%', opacity: 0 }, '100%': { transform: 'scaleY(1)', transformOrigin: '100% 100%', opacity: 1 } }); const slideDownOut = exports.slideDownOut = new _cssinjs.Keyframes('antSlideDownOut', { '0%': { transform: 'scaleY(1)', transformOrigin: '100% 100%', opacity: 1 }, '100%': { transform: 'scaleY(0.8)', transformOrigin: '100% 100%', opacity: 0 } }); const slideLeftIn = exports.slideLeftIn = new _cssinjs.Keyframes('antSlideLeftIn', { '0%': { transform: 'scaleX(0.8)', transformOrigin: '0% 0%', opacity: 0 }, '100%': { transform: 'scaleX(1)', transformOrigin: '0% 0%', opacity: 1 } }); const slideLeftOut = exports.slideLeftOut = new _cssinjs.Keyframes('antSlideLeftOut', { '0%': { transform: 'scaleX(1)', transformOrigin: '0% 0%', opacity: 1 }, '100%': { transform: 'scaleX(0.8)', transformOrigin: '0% 0%', opacity: 0 } }); const slideRightIn = exports.slideRightIn = new _cssinjs.Keyframes('antSlideRightIn', { '0%': { transform: 'scaleX(0.8)', transformOrigin: '100% 0%', opacity: 0 }, '100%': { transform: 'scaleX(1)', transformOrigin: '100% 0%', opacity: 1 } }); const slideRightOut = exports.slideRightOut = new _cssinjs.Keyframes('antSlideRightOut', { '0%': { transform: 'scaleX(1)', transformOrigin: '100% 0%', opacity: 1 }, '100%': { transform: 'scaleX(0.8)', transformOrigin: '100% 0%', opacity: 0 } }); const slideMotion = { 'slide-up': { inKeyframes: slideUpIn, outKeyframes: slideUpOut }, 'slide-down': { inKeyframes: slideDownIn, outKeyframes: slideDownOut }, 'slide-left': { inKeyframes: slideLeftIn, outKeyframes: slideLeftOut }, 'slide-right': { inKeyframes: slideRightIn, outKeyframes: slideRightOut } }; const initSlideMotion = (token, motionName) => { const { antCls } = token; const motionCls = `${antCls}-${motionName}`; const { inKeyframes, outKeyframes } = slideMotion[motionName]; return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), { [` ${motionCls}-enter, ${motionCls}-appear `]: { transform: 'scale(0)', transformOrigin: '0% 0%', opacity: 0, animationTimingFunction: token.motionEaseOutQuint, '&-prepare': { transform: 'scale(1)' } }, [`${motionCls}-leave`]: { animationTimingFunction: token.motionEaseInQuint } }]; }; exports.initSlideMotion = initSlideMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/motion/zoom.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/style/motion/zoom.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.zoomUpOut = exports.zoomUpIn = exports.zoomRightOut = exports.zoomRightIn = exports.zoomOut = exports.zoomLeftOut = exports.zoomLeftIn = exports.zoomIn = exports.zoomDownOut = exports.zoomDownIn = exports.zoomBigOut = exports.zoomBigIn = exports.initZoomMotion = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _motion = __webpack_require__(/*! ./motion */ "../../../node_modules/antd/lib/style/motion/motion.js"); const zoomIn = exports.zoomIn = new _cssinjs.Keyframes('antZoomIn', { '0%': { transform: 'scale(0.2)', opacity: 0 }, '100%': { transform: 'scale(1)', opacity: 1 } }); const zoomOut = exports.zoomOut = new _cssinjs.Keyframes('antZoomOut', { '0%': { transform: 'scale(1)' }, '100%': { transform: 'scale(0.2)', opacity: 0 } }); const zoomBigIn = exports.zoomBigIn = new _cssinjs.Keyframes('antZoomBigIn', { '0%': { transform: 'scale(0.8)', opacity: 0 }, '100%': { transform: 'scale(1)', opacity: 1 } }); const zoomBigOut = exports.zoomBigOut = new _cssinjs.Keyframes('antZoomBigOut', { '0%': { transform: 'scale(1)' }, '100%': { transform: 'scale(0.8)', opacity: 0 } }); const zoomUpIn = exports.zoomUpIn = new _cssinjs.Keyframes('antZoomUpIn', { '0%': { transform: 'scale(0.8)', transformOrigin: '50% 0%', opacity: 0 }, '100%': { transform: 'scale(1)', transformOrigin: '50% 0%' } }); const zoomUpOut = exports.zoomUpOut = new _cssinjs.Keyframes('antZoomUpOut', { '0%': { transform: 'scale(1)', transformOrigin: '50% 0%' }, '100%': { transform: 'scale(0.8)', transformOrigin: '50% 0%', opacity: 0 } }); const zoomLeftIn = exports.zoomLeftIn = new _cssinjs.Keyframes('antZoomLeftIn', { '0%': { transform: 'scale(0.8)', transformOrigin: '0% 50%', opacity: 0 }, '100%': { transform: 'scale(1)', transformOrigin: '0% 50%' } }); const zoomLeftOut = exports.zoomLeftOut = new _cssinjs.Keyframes('antZoomLeftOut', { '0%': { transform: 'scale(1)', transformOrigin: '0% 50%' }, '100%': { transform: 'scale(0.8)', transformOrigin: '0% 50%', opacity: 0 } }); const zoomRightIn = exports.zoomRightIn = new _cssinjs.Keyframes('antZoomRightIn', { '0%': { transform: 'scale(0.8)', transformOrigin: '100% 50%', opacity: 0 }, '100%': { transform: 'scale(1)', transformOrigin: '100% 50%' } }); const zoomRightOut = exports.zoomRightOut = new _cssinjs.Keyframes('antZoomRightOut', { '0%': { transform: 'scale(1)', transformOrigin: '100% 50%' }, '100%': { transform: 'scale(0.8)', transformOrigin: '100% 50%', opacity: 0 } }); const zoomDownIn = exports.zoomDownIn = new _cssinjs.Keyframes('antZoomDownIn', { '0%': { transform: 'scale(0.8)', transformOrigin: '50% 100%', opacity: 0 }, '100%': { transform: 'scale(1)', transformOrigin: '50% 100%' } }); const zoomDownOut = exports.zoomDownOut = new _cssinjs.Keyframes('antZoomDownOut', { '0%': { transform: 'scale(1)', transformOrigin: '50% 100%' }, '100%': { transform: 'scale(0.8)', transformOrigin: '50% 100%', opacity: 0 } }); const zoomMotion = { zoom: { inKeyframes: zoomIn, outKeyframes: zoomOut }, 'zoom-big': { inKeyframes: zoomBigIn, outKeyframes: zoomBigOut }, 'zoom-big-fast': { inKeyframes: zoomBigIn, outKeyframes: zoomBigOut }, 'zoom-left': { inKeyframes: zoomLeftIn, outKeyframes: zoomLeftOut }, 'zoom-right': { inKeyframes: zoomRightIn, outKeyframes: zoomRightOut }, 'zoom-up': { inKeyframes: zoomUpIn, outKeyframes: zoomUpOut }, 'zoom-down': { inKeyframes: zoomDownIn, outKeyframes: zoomDownOut } }; const initZoomMotion = (token, motionName) => { const { antCls } = token; const motionCls = `${antCls}-${motionName}`; const { inKeyframes, outKeyframes } = zoomMotion[motionName]; return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), { [` ${motionCls}-enter, ${motionCls}-appear `]: { transform: 'scale(0)', opacity: 0, animationTimingFunction: token.motionEaseOutCirc, '&-prepare': { transform: 'none' } }, [`${motionCls}-leave`]: { animationTimingFunction: token.motionEaseInOutCirc } }]; }; exports.initZoomMotion = initZoomMotion; /***/ }), /***/ "../../../node_modules/antd/lib/style/placementArrow.js": /*!**************************************************************!*\ !*** ../../../node_modules/antd/lib/style/placementArrow.js ***! \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MAX_VERTICAL_CONTENT_RADIUS = void 0; exports["default"] = getArrowStyle; exports.getArrowOffsetToken = getArrowOffsetToken; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _roundedArrow = __webpack_require__(/*! ./roundedArrow */ "../../../node_modules/antd/lib/style/roundedArrow.js"); const MAX_VERTICAL_CONTENT_RADIUS = exports.MAX_VERTICAL_CONTENT_RADIUS = 8; function getArrowOffsetToken(options) { const { contentRadius, limitVerticalRadius } = options; const arrowOffset = contentRadius > 12 ? contentRadius + 2 : 12; const arrowOffsetVertical = limitVerticalRadius ? MAX_VERTICAL_CONTENT_RADIUS : arrowOffset; return { arrowOffsetHorizontal: arrowOffset, arrowOffsetVertical }; } function isInject(valid, code) { if (!valid) { return {}; } return code; } function getArrowStyle(token, colorBg, options) { const { componentCls, boxShadowPopoverArrow, arrowOffsetVertical, arrowOffsetHorizontal } = token; const { arrowDistance = 0, arrowPlacement = { left: true, right: true, top: true, bottom: true } } = options || {}; return { [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({ // ============================ Basic ============================ [`${componentCls}-arrow`]: [Object.assign(Object.assign({ position: 'absolute', zIndex: 1, display: 'block' }, (0, _roundedArrow.genRoundedArrow)(token, colorBg, boxShadowPopoverArrow)), { '&:before': { background: colorBg } })] }, isInject(!!arrowPlacement.top, { [[`&-placement-top > ${componentCls}-arrow`, `&-placement-topLeft > ${componentCls}-arrow`, `&-placement-topRight > ${componentCls}-arrow`].join(',')]: { bottom: arrowDistance, transform: 'translateY(100%) rotate(180deg)' }, [`&-placement-top > ${componentCls}-arrow`]: { left: { _skip_check_: true, value: '50%' }, transform: 'translateX(-50%) translateY(100%) rotate(180deg)' }, '&-placement-topLeft': { '--arrow-offset-horizontal': arrowOffsetHorizontal, [`> ${componentCls}-arrow`]: { left: { _skip_check_: true, value: arrowOffsetHorizontal } } }, '&-placement-topRight': { '--arrow-offset-horizontal': `calc(100% - ${(0, _cssinjs.unit)(arrowOffsetHorizontal)})`, [`> ${componentCls}-arrow`]: { right: { _skip_check_: true, value: arrowOffsetHorizontal } } } })), isInject(!!arrowPlacement.bottom, { [[`&-placement-bottom > ${componentCls}-arrow`, `&-placement-bottomLeft > ${componentCls}-arrow`, `&-placement-bottomRight > ${componentCls}-arrow`].join(',')]: { top: arrowDistance, transform: `translateY(-100%)` }, [`&-placement-bottom > ${componentCls}-arrow`]: { left: { _skip_check_: true, value: '50%' }, transform: `translateX(-50%) translateY(-100%)` }, '&-placement-bottomLeft': { '--arrow-offset-horizontal': arrowOffsetHorizontal, [`> ${componentCls}-arrow`]: { left: { _skip_check_: true, value: arrowOffsetHorizontal } } }, '&-placement-bottomRight': { '--arrow-offset-horizontal': `calc(100% - ${(0, _cssinjs.unit)(arrowOffsetHorizontal)})`, [`> ${componentCls}-arrow`]: { right: { _skip_check_: true, value: arrowOffsetHorizontal } } } })), isInject(!!arrowPlacement.left, { [[`&-placement-left > ${componentCls}-arrow`, `&-placement-leftTop > ${componentCls}-arrow`, `&-placement-leftBottom > ${componentCls}-arrow`].join(',')]: { right: { _skip_check_: true, value: arrowDistance }, transform: 'translateX(100%) rotate(90deg)' }, [`&-placement-left > ${componentCls}-arrow`]: { top: { _skip_check_: true, value: '50%' }, transform: 'translateY(-50%) translateX(100%) rotate(90deg)' }, [`&-placement-leftTop > ${componentCls}-arrow`]: { top: arrowOffsetVertical }, [`&-placement-leftBottom > ${componentCls}-arrow`]: { bottom: arrowOffsetVertical } })), isInject(!!arrowPlacement.right, { [[`&-placement-right > ${componentCls}-arrow`, `&-placement-rightTop > ${componentCls}-arrow`, `&-placement-rightBottom > ${componentCls}-arrow`].join(',')]: { left: { _skip_check_: true, value: arrowDistance }, transform: 'translateX(-100%) rotate(-90deg)' }, [`&-placement-right > ${componentCls}-arrow`]: { top: { _skip_check_: true, value: '50%' }, transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)' }, [`&-placement-rightTop > ${componentCls}-arrow`]: { top: arrowOffsetVertical }, [`&-placement-rightBottom > ${componentCls}-arrow`]: { bottom: arrowOffsetVertical } })) }; } /***/ }), /***/ "../../../node_modules/antd/lib/style/roundedArrow.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/style/roundedArrow.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.genRoundedArrow = void 0; exports.getArrowToken = getArrowToken; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); function getArrowToken(token) { const { sizePopupArrow, borderRadiusXS, borderRadiusOuter } = token; const unitWidth = sizePopupArrow / 2; const ax = 0; const ay = unitWidth; const bx = borderRadiusOuter * 1 / Math.sqrt(2); const by = unitWidth - borderRadiusOuter * (1 - 1 / Math.sqrt(2)); const cx = unitWidth - borderRadiusXS * (1 / Math.sqrt(2)); const cy = borderRadiusOuter * (Math.sqrt(2) - 1) + borderRadiusXS * (1 / Math.sqrt(2)); const dx = 2 * unitWidth - cx; const dy = cy; const ex = 2 * unitWidth - bx; const ey = by; const fx = 2 * unitWidth - ax; const fy = ay; const shadowWidth = unitWidth * Math.sqrt(2) + borderRadiusOuter * (Math.sqrt(2) - 2); const polygonOffset = borderRadiusOuter * (Math.sqrt(2) - 1); const arrowPolygon = `polygon(${polygonOffset}px 100%, 50% ${polygonOffset}px, ${2 * unitWidth - polygonOffset}px 100%, ${polygonOffset}px 100%)`; const arrowPath = `path('M ${ax} ${ay} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${bx} ${by} L ${cx} ${cy} A ${borderRadiusXS} ${borderRadiusXS} 0 0 1 ${dx} ${dy} L ${ex} ${ey} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${fx} ${fy} Z')`; return { arrowShadowWidth: shadowWidth, arrowPath, arrowPolygon }; } const genRoundedArrow = (token, bgColor, boxShadow) => { const { sizePopupArrow, arrowPolygon, arrowPath, arrowShadowWidth, borderRadiusXS, calc } = token; return { pointerEvents: 'none', width: sizePopupArrow, height: sizePopupArrow, overflow: 'hidden', '&::before': { position: 'absolute', bottom: 0, insetInlineStart: 0, width: sizePopupArrow, height: calc(sizePopupArrow).div(2).equal(), background: bgColor, clipPath: { _multi_value_: true, value: [arrowPolygon, arrowPath] }, content: '""' }, '&::after': { content: '""', position: 'absolute', width: arrowShadowWidth, height: arrowShadowWidth, bottom: 0, insetInline: 0, margin: 'auto', borderRadius: { _skip_check_: true, value: `0 0 ${(0, _cssinjs.unit)(borderRadiusXS)} 0` }, transform: 'translateY(50%) rotate(-135deg)', boxShadow, zIndex: 0, background: 'transparent' } }; }; exports.genRoundedArrow = genRoundedArrow; /***/ }), /***/ "../../../node_modules/antd/lib/table/Column.js": /*!******************************************************!*\ !*** ../../../node_modules/antd/lib/table/Column.js ***! \******************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; /* istanbul ignore next */ /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */ const Column = _ => null; var _default = exports["default"] = Column; /***/ }), /***/ "../../../node_modules/antd/lib/table/ColumnGroup.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/table/ColumnGroup.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; /* istanbul ignore next */ /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */ const ColumnGroup = _ => null; var _default = exports["default"] = ColumnGroup; /***/ }), /***/ "../../../node_modules/antd/lib/table/ExpandIcon.js": /*!**********************************************************!*\ !*** ../../../node_modules/antd/lib/table/ExpandIcon.js ***! \**********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../../../node_modules/classnames/index.js")); function renderExpandIcon(locale) { return props => { const { prefixCls, onExpand, record, expanded, expandable } = props; const iconPrefix = `${prefixCls}-row-expand-icon`; return /*#__PURE__*/React.createElement("button", { type: "button", onClick: e => { onExpand(record, e); e.stopPropagation(); }, className: (0, _classnames.default)(iconPrefix, { [`${iconPrefix}-spaced`]: !expandable, [`${iconPrefix}-expanded`]: expandable && expanded, [`${iconPrefix}-collapsed`]: expandable && !expanded }), "aria-label": expanded ? locale.collapse : locale.expand, "aria-expanded": expanded }); }; } var _default = exports["default"] = renderExpandIcon; /***/ }), /***/ "../../../node_modules/antd/lib/table/InternalTable.js": /*!*************************************************************!*\ !*** ../../../node_modules/antd/lib/table/InternalTable.js ***! \*************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../../../node_modules/classnames/index.js")); var _rcTable = __webpack_require__(/*! rc-table */ "../../../node_modules/rc-table/es/index.js"); var _useColumns = __webpack_require__(/*! rc-table/lib/hooks/useColumns */ "../../../node_modules/rc-table/lib/hooks/useColumns/index.js"); var _omit = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/omit */ "../../../node_modules/rc-util/lib/omit.js")); var _hooks = __webpack_require__(/*! ../_util/hooks */ "../../../node_modules/antd/lib/_util/hooks/index.js"); var _scrollTo = _interopRequireDefault(__webpack_require__(/*! ../_util/scrollTo */ "../../../node_modules/antd/lib/_util/scrollTo.js")); var _warning = __webpack_require__(/*! ../_util/warning */ "../../../node_modules/antd/lib/_util/warning.js"); var _configProvider = _interopRequireDefault(__webpack_require__(/*! ../config-provider */ "../../../node_modules/antd/lib/config-provider/index.js")); var _context = __webpack_require__(/*! ../config-provider/context */ "../../../node_modules/antd/lib/config-provider/context.js"); var _defaultRenderEmpty = _interopRequireDefault(__webpack_require__(/*! ../config-provider/defaultRenderEmpty */ "../../../node_modules/antd/lib/config-provider/defaultRenderEmpty.js")); var _useCSSVarCls = _interopRequireDefault(__webpack_require__(/*! ../config-provider/hooks/useCSSVarCls */ "../../../node_modules/antd/lib/config-provider/hooks/useCSSVarCls.js")); var _useSize = _interopRequireDefault(__webpack_require__(/*! ../config-provider/hooks/useSize */ "../../../node_modules/antd/lib/config-provider/hooks/useSize.js")); var _useBreakpoint = _interopRequireDefault(__webpack_require__(/*! ../grid/hooks/useBreakpoint */ "../../../node_modules/antd/lib/grid/hooks/useBreakpoint.js")); var _en_US = _interopRequireDefault(__webpack_require__(/*! ../locale/en_US */ "../../../node_modules/antd/lib/locale/en_US.js")); var _pagination = _interopRequireDefault(__webpack_require__(/*! ../pagination */ "../../../node_modules/antd/lib/pagination/index.js")); var _spin = _interopRequireDefault(__webpack_require__(/*! ../spin */ "../../../node_modules/antd/lib/spin/index.js")); var _internal = __webpack_require__(/*! ../theme/internal */ "../../../node_modules/antd/lib/theme/internal.js"); var _ExpandIcon = _interopRequireDefault(__webpack_require__(/*! ./ExpandIcon */ "../../../node_modules/antd/lib/table/ExpandIcon.js")); var _useContainerWidth = _interopRequireDefault(__webpack_require__(/*! ./hooks/useContainerWidth */ "../../../node_modules/antd/lib/table/hooks/useContainerWidth.js")); var _useFilter = _interopRequireWildcard(__webpack_require__(/*! ./hooks/useFilter */ "../../../node_modules/antd/lib/table/hooks/useFilter/index.js")); var _useLazyKVMap = _interopRequireDefault(__webpack_require__(/*! ./hooks/useLazyKVMap */ "../../../node_modules/antd/lib/table/hooks/useLazyKVMap.js")); var _usePagination = _interopRequireWildcard(__webpack_require__(/*! ./hooks/usePagination */ "../../../node_modules/antd/lib/table/hooks/usePagination.js")); var _useSelection = _interopRequireDefault(__webpack_require__(/*! ./hooks/useSelection */ "../../../node_modules/antd/lib/table/hooks/useSelection.js")); var _useSorter = _interopRequireWildcard(__webpack_require__(/*! ./hooks/useSorter */ "../../../node_modules/antd/lib/table/hooks/useSorter.js")); var _useTitleColumns = _interopRequireDefault(__webpack_require__(/*! ./hooks/useTitleColumns */ "../../../node_modules/antd/lib/table/hooks/useTitleColumns.js")); var _RcTable = _interopRequireDefault(__webpack_require__(/*! ./RcTable */ "../../../node_modules/antd/lib/table/RcTable/index.js")); var _VirtualTable = _interopRequireDefault(__webpack_require__(/*! ./RcTable/VirtualTable */ "../../../node_modules/antd/lib/table/RcTable/VirtualTable.js")); var _style = _interopRequireDefault(__webpack_require__(/*! ./style */ "../../../node_modules/antd/lib/table/style/index.js")); const EMPTY_LIST = []; const InternalTable = (props, ref) => { var _a, _b; const { prefixCls: customizePrefixCls, className, rootClassName, style, size: customizeSize, bordered, dropdownPrefixCls: customizeDropdownPrefixCls, dataSource, pagination, rowSelection, rowKey = 'key', rowClassName, columns, children, childrenColumnName: legacyChildrenColumnName, onChange, getPopupContainer, loading, expandIcon, expandable, expandedRowRender, expandIconColumnIndex, indentSize, scroll, sortDirections, locale, showSorterTooltip = { target: 'full-header' }, virtual } = props; const warning = (0, _warning.devUseWarning)('Table'); if (true) { true ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : 0; } const baseColumns = React.useMemo(() => columns || (0, _useColumns.convertChildrenToColumns)(children), [columns, children]); const needResponsive = React.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]); const screens = (0, _useBreakpoint.default)(needResponsive); const mergedColumns = React.useMemo(() => { const matched = new Set(Object.keys(screens).filter(m => screens[m])); return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r))); }, [baseColumns, screens]); const tableProps = (0, _omit.default)(props, ['className', 'style', 'columns']); const { locale: contextLocale = _en_US.default, direction, table, renderEmpty, getPrefixCls, getPopupContainer: getContextPopupContainer } = React.useContext(_context.ConfigContext); const mergedSize = (0, _useSize.default)(customizeSize); const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale); const rawData = dataSource || EMPTY_LIST; const prefixCls = getPrefixCls('table', customizePrefixCls); const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls); const [, token] = (0, _internal.useToken)(); const rootCls = (0, _useCSSVarCls.default)(prefixCls); const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls); const mergedExpandable = Object.assign(Object.assign({ childrenColumnName: legacyChildrenColumnName, expandIconColumnIndex }, expandable), { expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon }); const { childrenColumnName = 'children' } = mergedExpandable; const expandType = React.useMemo(() => { if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) { return 'nest'; } if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) { return 'row'; } return null; }, [rawData]); const internalRefs = { body: React.useRef(null) }; // ============================ Width ============================= const getContainerWidth = (0, _useContainerWidth.default)(prefixCls); // ============================= Refs ============================= const rootRef = React.useRef(null); const tblRef = React.useRef(null); (0, _hooks.useProxyImperativeHandle)(ref, () => Object.assign(Object.assign({}, tblRef.current), { nativeElement: rootRef.current })); // ============================ RowKey ============================ const getRowKey = React.useMemo(() => { if (typeof rowKey === 'function') { return rowKey; } return record => record === null || record === void 0 ? void 0 : record[rowKey]; }, [rowKey]); const [getRecordByKey] = (0, _useLazyKVMap.default)(rawData, childrenColumnName, getRowKey); // ============================ Events ============================= const changeEventInfo = {}; const triggerOnChange = (info, action, reset = false) => { var _a, _b, _c, _d; const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info); if (reset) { (_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo); // Reset event param if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) { changeInfo.pagination.current = 1; } // Trigger pagination events if (pagination) { (_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize); } } if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) { (0, _scrollTo.default)(0, { getContainer: () => internalRefs.body.current }); } onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, { currentDataSource: (0, _useFilter.getFilterData)((0, _useSorter.getSortData)(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName), action }); }; /** * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read * state out and then put it back to title render. Move these code into `hooks` but still too * complex. We should provides Table props like `sorter` & `filter` to handle control in next big * version. */ // ============================ Sorter ============================= const onSorterChange = (sorter, sorterStates) => { triggerOnChange({ sorter, sorterStates }, 'sort', false); }; const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = (0, _useSorter.default)({ prefixCls, mergedColumns, onSorterChange, sortDirections: sortDirections || ['ascend', 'descend'], tableLocale, showSorterTooltip }); const sortedData = React.useMemo(() => (0, _useSorter.getSortData)(rawData, sortStates, childrenColumnName), [rawData, sortStates]); changeEventInfo.sorter = getSorters(); changeEventInfo.sorterStates = sortStates; // ============================ Filter ============================ const onFilterChange = (filters, filterStates) => { triggerOnChange({ filters, filterStates }, 'filter', true); }; const [transformFilterColumns, filterStates, filters] = (0, _useFilter.default)({ prefixCls, locale: tableLocale, dropdownPrefixCls, mergedColumns, onFilterChange, getPopupContainer: getPopupContainer || getContextPopupContainer, rootClassName: (0, _classnames.default)(rootClassName, rootCls) }); const mergedData = (0, _useFilter.getFilterData)(sortedData, filterStates, childrenColumnName); changeEventInfo.filters = filters; changeEventInfo.filterStates = filterStates; // ============================ Column ============================ const columnTitleProps = React.useMemo(() => { const mergedFilters = {}; Object.keys(filters).forEach(filterKey => { if (filters[filterKey] !== null) { mergedFilters[filterKey] = filters[filterKey]; } }); return Object.assign(Object.assign({}, sorterTitleProps), { filters: mergedFilters }); }, [sorterTitleProps, filters]); const [transformTitleColumns] = (0, _useTitleColumns.default)(columnTitleProps); // ========================== Pagination ========================== const onPaginationChange = (current, pageSize) => { triggerOnChange({ pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), { current, pageSize }) }, 'paginate'); }; const [mergedPagination, resetPagination] = (0, _usePagination.default)(mergedData.length, onPaginationChange, pagination); changeEventInfo.pagination = pagination === false ? {} : (0, _usePagination.getPaginationParam)(mergedPagination, pagination); changeEventInfo.resetPagination = resetPagination; // ============================= Data ============================= const pageData = React.useMemo(() => { if (pagination === false || !mergedPagination.pageSize) { return mergedData; } const { current = 1, total, pageSize = _usePagination.DEFAULT_PAGE_SIZE } = mergedPagination; true ? warning(current > 0, 'usage', '`current` should be positive number.') : 0; // Dynamic table data if (mergedData.length < total) { if (mergedData.length > pageSize) { true ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : 0; return mergedData.slice((current - 1) * pageSize, current * pageSize); } return mergedData; } return mergedData.slice((current - 1) * pageSize, current * pageSize); }, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]); // ========================== Selections ========================== const [transformSelectionColumns, selectedKeySet] = (0, _useSelection.default)({ prefixCls, data: mergedData, pageData, getRowKey, getRecordByKey, expandType, childrenColumnName, locale: tableLocale, getPopupContainer: getPopupContainer || getContextPopupContainer }, rowSelection); const internalRowClassName = (record, index, indent) => { let mergedRowClassName; if (typeof rowClassName === 'function') { mergedRowClassName = (0, _classnames.default)(rowClassName(record, index, indent)); } else { mergedRowClassName = (0, _classnames.default)(rowClassName); } return (0, _classnames.default)({ [`${prefixCls}-row-selected`]: selectedKeySet.has(getRowKey(record, index)) }, mergedRowClassName); }; // ========================== Expandable ========================== // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table` mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon; // Customize expandable icon mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || (0, _ExpandIcon.default)(tableLocale); // Adjust expand icon index, no overwrite expandIconColumnIndex if set. if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) { mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0; } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) { mergedExpandable.expandIconColumnIndex -= 1; } // Indent size if (typeof mergedExpandable.indentSize !== 'number') { mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15; } // ============================ Render ============================ const transformColumns = React.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]); const getPaginationNodes = () => { if (pagination === false || !(mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) { return {}; } const getPaginationSize = () => mergedPagination.size || (mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined); const renderPagination = position => { const align = position === 'left' ? 'start' : position === 'right' ? 'end' : position; return /*#__PURE__*/React.createElement(_pagination.default, Object.assign({}, mergedPagination, { align: mergedPagination.align || align, className: (0, _classnames.default)(`${prefixCls}-pagination`, mergedPagination.className), size: getPaginationSize() })); }; const defaultPosition = direction === 'rtl' ? 'left' : 'right'; const positions = mergedPagination.position; if (positions === null || !Array.isArray(positions)) { return { bottom: renderPagination(defaultPosition) }; } const topPosition = positions.find(pos => typeof pos === 'string' && pos.toLowerCase().includes('top')); const bottomPosition = positions.find(pos => typeof pos === 'string' && pos.toLowerCase().includes('bottom')); const isNone = positions.every(pos => `${pos}` === 'none'); const topAlign = topPosition ? topPosition.toLowerCase().replace('top', '') : ''; const bottomAlign = bottomPosition ? bottomPosition.toLowerCase().replace('bottom', '') : ''; const shouldDefaultBottom = !topPosition && !bottomPosition && !isNone; const renderTop = () => topAlign ? renderPagination(topAlign) : undefined; const renderBottom = () => { if (bottomAlign) { return renderPagination(bottomAlign); } if (shouldDefaultBottom) { return renderPagination(defaultPosition); } return undefined; }; return { top: renderTop(), bottom: renderBottom() }; }; // >>>>>>>>> Spinning const spinProps = React.useMemo(() => { if (typeof loading === 'boolean') { return { spinning: loading }; } else if (typeof loading === 'object' && loading !== null) { return Object.assign({ spinning: true }, loading); } else { return undefined; } }, [loading]); const wrapperClassNames = (0, _classnames.default)(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, { [`${prefixCls}-wrapper-rtl`]: direction === 'rtl' }, className, rootClassName, hashId); const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style); // ========== empty ========== const mergedEmptyNode = React.useMemo(() => { // When dataSource is null/undefined (detected by reference equality with EMPTY_LIST), // and the table is in a loading state, we only show the loading spinner without the empty placeholder. // For empty arrays (datasource={[]}), both loading and empty states would normally be shown. // discussion https://github.com/ant-design/ant-design/issues/54601#issuecomment-3158091383 if ((spinProps === null || spinProps === void 0 ? void 0 : spinProps.spinning) && rawData === EMPTY_LIST) { return null; } if (typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined') { return locale.emptyText; } return (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, { componentName: "Table" }); }, [spinProps === null || spinProps === void 0 ? void 0 : spinProps.spinning, rawData, locale === null || locale === void 0 ? void 0 : locale.emptyText, renderEmpty]); // ========================== Render ========================== const TableComponent = virtual ? _VirtualTable.default : _RcTable.default; // >>> Virtual Table props. We set height here since it will affect height collection const virtualProps = {}; const listItemHeight = React.useMemo(() => { const { fontSize, lineHeight, lineWidth, padding, paddingXS, paddingSM } = token; const fontHeight = Math.floor(fontSize * lineHeight); switch (mergedSize) { case 'middle': return paddingSM * 2 + fontHeight + lineWidth; case 'small': return paddingXS * 2 + fontHeight + lineWidth; default: return padding * 2 + fontHeight + lineWidth; } }, [token, mergedSize]); if (virtual) { virtualProps.listItemHeight = listItemHeight; } const { top: topPaginationNode, bottom: bottomPaginationNode } = getPaginationNodes(); return wrapCSSVar(/*#__PURE__*/React.createElement("div", { ref: rootRef, className: wrapperClassNames, style: mergedStyle }, /*#__PURE__*/React.createElement(_spin.default, Object.assign({ spinning: false }, spinProps), topPaginationNode, /*#__PURE__*/React.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, { ref: tblRef, columns: mergedColumns, direction: direction, expandable: mergedExpandable, prefixCls: prefixCls, className: (0, _classnames.default)({ [`${prefixCls}-middle`]: mergedSize === 'middle', [`${prefixCls}-small`]: mergedSize === 'small', [`${prefixCls}-bordered`]: bordered, [`${prefixCls}-empty`]: rawData.length === 0 }, cssVarCls, rootCls, hashId), data: pageData, rowKey: getRowKey, rowClassName: internalRowClassName, emptyText: mergedEmptyNode, // Internal internalHooks: _rcTable.INTERNAL_HOOKS, internalRefs: internalRefs, transformColumns: transformColumns, getContainerWidth: getContainerWidth, measureRowRender: measureRow => (/*#__PURE__*/React.createElement(_configProvider.default, { getPopupContainer: node => node }, measureRow)) })), bottomPaginationNode))); }; var _default = exports["default"] = /*#__PURE__*/React.forwardRef(InternalTable); /***/ }), /***/ "../../../node_modules/antd/lib/table/RcTable/VirtualTable.js": /*!********************************************************************!*\ !*** ../../../node_modules/antd/lib/table/RcTable/VirtualTable.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _rcTable = __webpack_require__(/*! rc-table */ "../../../node_modules/rc-table/es/index.js"); /** * Same as `rc-table` but we modify trigger children update logic instead. */ const RcVirtualTable = (0, _rcTable.genVirtualTable)((prev, next) => { const { _renderTimes: prevRenderTimes } = prev; const { _renderTimes: nextRenderTimes } = next; return prevRenderTimes !== nextRenderTimes; }); var _default = exports["default"] = RcVirtualTable; /***/ }), /***/ "../../../node_modules/antd/lib/table/RcTable/index.js": /*!*************************************************************!*\ !*** ../../../node_modules/antd/lib/table/RcTable/index.js ***! \*************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _rcTable = __webpack_require__(/*! rc-table */ "../../../node_modules/rc-table/es/index.js"); /** * Same as `rc-table` but we modify trigger children update logic instead. */ const RcTable = (0, _rcTable.genTable)((prev, next) => { const { _renderTimes: prevRenderTimes } = prev; const { _renderTimes: nextRenderTimes } = next; return prevRenderTimes !== nextRenderTimes; }); var _default = exports["default"] = RcTable; /***/ }), /***/ "../../../node_modules/antd/lib/table/Table.js": /*!*****************************************************!*\ !*** ../../../node_modules/antd/lib/table/Table.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _rcTable = __webpack_require__(/*! rc-table */ "../../../node_modules/rc-table/es/index.js"); var _Column = _interopRequireDefault(__webpack_require__(/*! ./Column */ "../../../node_modules/antd/lib/table/Column.js")); var _ColumnGroup = _interopRequireDefault(__webpack_require__(/*! ./ColumnGroup */ "../../../node_modules/antd/lib/table/ColumnGroup.js")); var _useSelection = __webpack_require__(/*! ./hooks/useSelection */ "../../../node_modules/antd/lib/table/hooks/useSelection.js"); var _InternalTable = _interopRequireDefault(__webpack_require__(/*! ./InternalTable */ "../../../node_modules/antd/lib/table/InternalTable.js")); const Table = (props, ref) => { const renderTimesRef = React.useRef(0); renderTimesRef.current += 1; return /*#__PURE__*/React.createElement(_InternalTable.default, Object.assign({}, props, { ref: ref, _renderTimes: renderTimesRef.current })); }; const ForwardTable = /*#__PURE__*/React.forwardRef(Table); ForwardTable.SELECTION_COLUMN = _useSelection.SELECTION_COLUMN; ForwardTable.EXPAND_COLUMN = _rcTable.EXPAND_COLUMN; ForwardTable.SELECTION_ALL = _useSelection.SELECTION_ALL; ForwardTable.SELECTION_INVERT = _useSelection.SELECTION_INVERT; ForwardTable.SELECTION_NONE = _useSelection.SELECTION_NONE; ForwardTable.Column = _Column.default; ForwardTable.ColumnGroup = _ColumnGroup.default; ForwardTable.Summary = _rcTable.Summary; if (true) { ForwardTable.displayName = 'Table'; } var _default = exports["default"] = ForwardTable; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useContainerWidth.js": /*!***********************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useContainerWidth.js ***! \***********************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = useContainerWidth; function useContainerWidth(prefixCls) { const getContainerWidth = (ele, width) => { const container = ele.querySelector(`.${prefixCls}-container`); let returnWidth = width; if (container) { const style = getComputedStyle(container); const borderLeft = Number.parseInt(style.borderLeftWidth, 10); const borderRight = Number.parseInt(style.borderRightWidth, 10); returnWidth = width - borderLeft - borderRight; } return returnWidth; }; return getContainerWidth; } /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterDropdown.js": /*!******************************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useFilter/FilterDropdown.js ***! \******************************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; exports.flattenKeys = flattenKeys; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../../../node_modules/@babel/runtime/helpers/toConsumableArray.js")); var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _FilterFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons/FilterFilled */ "../../../node_modules/@ant-design/icons/FilterFilled.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../../../node_modules/classnames/index.js")); var _isEqual = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/isEqual */ "../../../node_modules/rc-util/lib/isEqual.js")); var _extendsObject = _interopRequireDefault(__webpack_require__(/*! ../../../_util/extendsObject */ "../../../node_modules/antd/lib/_util/extendsObject.js")); var _hooks = __webpack_require__(/*! ../../../_util/hooks */ "../../../node_modules/antd/lib/_util/hooks/index.js"); var _warning = __webpack_require__(/*! ../../../_util/warning */ "../../../node_modules/antd/lib/_util/warning.js"); var _button = _interopRequireDefault(__webpack_require__(/*! ../../../button */ "../../../node_modules/antd/lib/button/index.js")); var _checkbox = _interopRequireDefault(__webpack_require__(/*! ../../../checkbox */ "../../../node_modules/antd/lib/checkbox/index.js")); var _context = __webpack_require__(/*! ../../../config-provider/context */ "../../../node_modules/antd/lib/config-provider/context.js"); var _dropdown = _interopRequireDefault(__webpack_require__(/*! ../../../dropdown */ "../../../node_modules/antd/lib/dropdown/index.js")); var _empty = _interopRequireDefault(__webpack_require__(/*! ../../../empty */ "../../../node_modules/antd/lib/empty/index.js")); var _menu = _interopRequireDefault(__webpack_require__(/*! ../../../menu */ "../../../node_modules/antd/lib/menu/index.js")); var _OverrideContext = __webpack_require__(/*! ../../../menu/OverrideContext */ "../../../node_modules/antd/lib/menu/OverrideContext.js"); var _radio = _interopRequireDefault(__webpack_require__(/*! ../../../radio */ "../../../node_modules/antd/lib/radio/index.js")); var _tree = _interopRequireDefault(__webpack_require__(/*! ../../../tree */ "../../../node_modules/antd/lib/tree/index.js")); var _FilterSearch = _interopRequireDefault(__webpack_require__(/*! ./FilterSearch */ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterSearch.js")); var _FilterWrapper = _interopRequireDefault(__webpack_require__(/*! ./FilterWrapper */ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterWrapper.js")); function flattenKeys(filters) { let keys = []; (filters || []).forEach(({ value, children }) => { keys.push(value); if (children) { keys = [].concat((0, _toConsumableArray2.default)(keys), (0, _toConsumableArray2.default)(flattenKeys(children))); } }); return keys; } function hasSubMenu(filters) { return filters.some(({ children }) => children); } function searchValueMatched(searchValue, text) { if (typeof text === 'string' || typeof text === 'number') { return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase()); } return false; } function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, searchValue, filterSearch }) { return filters.map((filter, index) => { const key = String(filter.value); if (filter.children) { return { key: key || index, label: filter.text, popupClassName: `${prefixCls}-dropdown-submenu`, children: renderFilterItems({ filters: filter.children, prefixCls, filteredKeys, filterMultiple, searchValue, filterSearch }) }; } const Component = filterMultiple ? _checkbox.default : _radio.default; const item = { key: filter.value !== undefined ? key : index, label: (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, { checked: filteredKeys.includes(key) }), /*#__PURE__*/React.createElement("span", null, filter.text))) }; if (searchValue.trim()) { if (typeof filterSearch === 'function') { return filterSearch(searchValue, filter) ? item : null; } return searchValueMatched(searchValue, filter.text) ? item : null; } return item; }); } function wrapStringListType(keys) { return keys || []; } const FilterDropdown = props => { var _a, _b, _c, _d; const { tablePrefixCls, prefixCls, column, dropdownPrefixCls, columnKey, filterOnClose, filterMultiple, filterMode = 'menu', filterSearch = false, filterState, triggerFilter, locale, children, getPopupContainer, rootClassName } = props; const { filterResetToDefaultFilteredValue, defaultFilteredValue, filterDropdownProps = {}, // Deprecated filterDropdownOpen, filterDropdownVisible, onFilterDropdownVisibleChange, onFilterDropdownOpenChange } = column; const [visible, setVisible] = React.useState(false); const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered)); const triggerVisible = newVisible => { var _a; setVisible(newVisible); (_a = filterDropdownProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(filterDropdownProps, newVisible); // deprecated onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible); onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible); }; // =================Warning=================== if (true) { const warning = (0, _warning.devUseWarning)('Table'); const deprecatedList = [['filterDropdownOpen', 'filterDropdownProps.open'], ['filterDropdownVisible', 'filterDropdownProps.open'], ['onFilterDropdownOpenChange', 'filterDropdownProps.onOpenChange'], ['onFilterDropdownVisibleChange', 'filterDropdownProps.onOpenChange']]; deprecatedList.forEach(([deprecatedName, newName]) => { warning.deprecated(!(deprecatedName in column), deprecatedName, newName); }); warning.deprecated(!('filterCheckall' in locale), 'filterCheckall', 'locale.filterCheckAll'); } const mergedVisible = (_d = (_c = (_b = filterDropdownProps.open) !== null && _b !== void 0 ? _b : filterDropdownOpen) !== null && _c !== void 0 ? _c : filterDropdownVisible) !== null && _d !== void 0 ? _d : visible; // inner state // ===================== Select Keys ===================== const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys; const [getFilteredKeysSync, setFilteredKeysSync] = (0, _hooks.useSyncState)(wrapStringListType(propFilteredKeys)); const onSelectKeys = ({ selectedKeys }) => { setFilteredKeysSync(selectedKeys); }; const onCheck = (keys, { node, checked }) => { if (!filterMultiple) { onSelectKeys({ selectedKeys: checked && node.key ? [node.key] : [] }); } else { onSelectKeys({ selectedKeys: keys }); } }; React.useEffect(() => { if (!visible) { return; } onSelectKeys({ selectedKeys: wrapStringListType(propFilteredKeys) }); }, [propFilteredKeys]); // ====================== Open Keys ====================== const [openKeys, setOpenKeys] = React.useState([]); const onOpenChange = keys => { setOpenKeys(keys); }; // search in tree mode column filter const [searchValue, setSearchValue] = React.useState(''); const onSearch = e => { const { value } = e.target; setSearchValue(value); }; // clear search value after close filter dropdown React.useEffect(() => { if (!visible) { setSearchValue(''); } }, [visible]); // ======================= Submit ======================== const internalTriggerFilter = keys => { const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null; if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) { return null; } if ((0, _isEqual.default)(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) { return null; } triggerFilter({ column, key: columnKey, filteredKeys: mergedKeys }); }; const onConfirm = () => { triggerVisible(false); internalTriggerFilter(getFilteredKeysSync()); }; const onReset = ({ confirm, closeDropdown } = { confirm: false, closeDropdown: false }) => { if (confirm) { internalTriggerFilter([]); } if (closeDropdown) { triggerVisible(false); } setSearchValue(''); if (filterResetToDefaultFilteredValue) { setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key))); } else { setFilteredKeysSync([]); } }; const doFilter = ({ closeDropdown } = { closeDropdown: true }) => { if (closeDropdown) { triggerVisible(false); } internalTriggerFilter(getFilteredKeysSync()); }; const onVisibleChange = (newVisible, info) => { if (info.source === 'trigger') { if (newVisible && propFilteredKeys !== undefined) { // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined) setFilteredKeysSync(wrapStringListType(propFilteredKeys)); } triggerVisible(newVisible); if (!newVisible && !column.filterDropdown && filterOnClose) { onConfirm(); } } }; // ======================== Style ======================== const dropdownMenuClass = (0, _classnames.default)({ [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || []) }); const onCheckAll = e => { if (e.target.checked) { const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key)); setFilteredKeysSync(allFilterKeys); } else { setFilteredKeysSync([]); } }; const getTreeData = ({ filters }) => (filters || []).map((filter, index) => { const key = String(filter.value); const item = { title: filter.text, key: filter.value !== undefined ? key : String(index) }; if (filter.children) { item.children = getTreeData({ filters: filter.children }); } return item; }); const getFilterData = node => { var _a; return Object.assign(Object.assign({}, node), { text: node.title, value: node.key, children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || [] }); }; let dropdownContent; const { direction, renderEmpty } = React.useContext(_context.ConfigContext); if (typeof column.filterDropdown === 'function') { dropdownContent = column.filterDropdown({ prefixCls: `${dropdownPrefixCls}-custom`, setSelectedKeys: selectedKeys => onSelectKeys({ selectedKeys: selectedKeys }), selectedKeys: getFilteredKeysSync(), confirm: doFilter, clearFilters: onReset, filters: column.filters, visible: mergedVisible, close: () => { triggerVisible(false); } }); } else if (column.filterDropdown) { dropdownContent = column.filterDropdown; } else { const selectedKeys = getFilteredKeysSync() || []; const getFilterComponent = () => { var _a, _b; const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : (/*#__PURE__*/React.createElement(_empty.default, { image: _empty.default.PRESENTED_IMAGE_SIMPLE, description: locale.filterEmptyText, styles: { image: { height: 24 } }, style: { margin: 0, padding: '16px 0' } })); if ((column.filters || []).length === 0) { return empty; } if (filterMode === 'tree') { return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FilterSearch.default, { filterSearch: filterSearch, value: searchValue, onChange: onSearch, tablePrefixCls: tablePrefixCls, locale: locale }), /*#__PURE__*/React.createElement("div", { className: `${tablePrefixCls}-filter-dropdown-tree` }, filterMultiple ? (/*#__PURE__*/React.createElement(_checkbox.default, { checked: selectedKeys.length === flattenKeys(column.filters).length, indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length, className: `${tablePrefixCls}-filter-dropdown-checkall`, onChange: onCheckAll }, (_b = locale === null || locale === void 0 ? void 0 : locale.filterCheckall) !== null && _b !== void 0 ? _b : locale === null || locale === void 0 ? void 0 : locale.filterCheckAll)) : null, /*#__PURE__*/React.createElement(_tree.default, { checkable: true, selectable: false, blockNode: true, multiple: filterMultiple, checkStrictly: !filterMultiple, className: `${dropdownPrefixCls}-menu`, onCheck: onCheck, checkedKeys: selectedKeys, selectedKeys: selectedKeys, showIcon: false, treeData: getTreeData({ filters: column.filters }), autoExpandParent: true, defaultExpandAll: true, filterTreeNode: searchValue.trim() ? node => { if (typeof filterSearch === 'function') { return filterSearch(searchValue, getFilterData(node)); } return searchValueMatched(searchValue, node.title); } : undefined }))); } const items = renderFilterItems({ filters: column.filters || [], filterSearch, prefixCls, filteredKeys: getFilteredKeysSync(), filterMultiple, searchValue }); const isEmpty = items.every(item => item === null); return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FilterSearch.default, { filterSearch: filterSearch, value: searchValue, onChange: onSearch, tablePrefixCls: tablePrefixCls, locale: locale }), isEmpty ? empty : (/*#__PURE__*/React.createElement(_menu.default, { selectable: true, multiple: filterMultiple, prefixCls: `${dropdownPrefixCls}-menu`, className: dropdownMenuClass, onSelect: onSelectKeys, onDeselect: onSelectKeys, selectedKeys: selectedKeys, getPopupContainer: getPopupContainer, openKeys: openKeys, onOpenChange: onOpenChange, items: items }))); }; const getResetDisabled = () => { if (filterResetToDefaultFilteredValue) { return (0, _isEqual.default)((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true); } return selectedKeys.length === 0; }; dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement("div", { className: `${prefixCls}-dropdown-btns` }, /*#__PURE__*/React.createElement(_button.default, { type: "link", size: "small", disabled: getResetDisabled(), onClick: () => onReset() }, locale.filterReset), /*#__PURE__*/React.createElement(_button.default, { type: "primary", size: "small", onClick: onConfirm }, locale.filterConfirm))); } // We should not block customize Menu with additional props if (column.filterDropdown) { dropdownContent = /*#__PURE__*/React.createElement(_OverrideContext.OverrideProvider, { selectable: undefined }, dropdownContent); } dropdownContent = /*#__PURE__*/React.createElement(_FilterWrapper.default, { className: `${prefixCls}-dropdown` }, dropdownContent); const getDropdownTrigger = () => { let filterIcon; if (typeof column.filterIcon === 'function') { filterIcon = column.filterIcon(filtered); } else if (column.filterIcon) { filterIcon = column.filterIcon; } else { filterIcon = /*#__PURE__*/React.createElement(_FilterFilled.default, null); } return /*#__PURE__*/React.createElement("span", { role: "button", tabIndex: -1, className: (0, _classnames.default)(`${prefixCls}-trigger`, { active: filtered }), onClick: e => { e.stopPropagation(); } }, filterIcon); }; const mergedDropdownProps = (0, _extendsObject.default)({ trigger: ['click'], placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight', children: getDropdownTrigger(), getPopupContainer }, Object.assign(Object.assign({}, filterDropdownProps), { rootClassName: (0, _classnames.default)(rootClassName, filterDropdownProps.rootClassName), open: mergedVisible, onOpenChange: onVisibleChange, popupRender: () => { if (typeof (filterDropdownProps === null || filterDropdownProps === void 0 ? void 0 : filterDropdownProps.dropdownRender) === 'function') { return filterDropdownProps.dropdownRender(dropdownContent); } return dropdownContent; } })); return /*#__PURE__*/React.createElement("div", { className: `${prefixCls}-column` }, /*#__PURE__*/React.createElement("span", { className: `${tablePrefixCls}-column-title` }, children), /*#__PURE__*/React.createElement(_dropdown.default, Object.assign({}, mergedDropdownProps))); }; var _default = exports["default"] = FilterDropdown; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterSearch.js": /*!****************************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useFilter/FilterSearch.js ***! \****************************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _SearchOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons/SearchOutlined */ "../../../node_modules/@ant-design/icons/SearchOutlined.js")); var _Input = _interopRequireDefault(__webpack_require__(/*! ../../../input/Input */ "../../../node_modules/antd/lib/input/Input.js")); const FilterSearch = props => { const { value, filterSearch, tablePrefixCls, locale, onChange } = props; if (!filterSearch) { return null; } return /*#__PURE__*/React.createElement("div", { className: `${tablePrefixCls}-filter-dropdown-search` }, /*#__PURE__*/React.createElement(_Input.default, { prefix: /*#__PURE__*/React.createElement(_SearchOutlined.default, null), placeholder: locale.filterSearchPlaceholder, onChange: onChange, value: value, // for skip min-width of input htmlSize: 1, className: `${tablePrefixCls}-filter-dropdown-search-input` })); }; var _default = exports["default"] = FilterSearch; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterWrapper.js": /*!*****************************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useFilter/FilterWrapper.js ***! \*****************************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _KeyCode = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/KeyCode */ "../../../node_modules/rc-util/lib/KeyCode.js")); const onKeyDown = event => { const { keyCode } = event; if (keyCode === _KeyCode.default.ENTER) { event.stopPropagation(); } }; const FilterDropdownMenuWrapper = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement("div", { className: props.className, onClick: e => e.stopPropagation(), onKeyDown: onKeyDown, ref: ref }, props.children))); if (true) { FilterDropdownMenuWrapper.displayName = 'FilterDropdownMenuWrapper'; } var _default = exports["default"] = FilterDropdownMenuWrapper; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useFilter/index.js": /*!*********************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useFilter/index.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; Object.defineProperty(exports, "flattenKeys", ({ enumerable: true, get: function () { return _FilterDropdown.flattenKeys; } })); exports.getFilterData = void 0; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../../../node_modules/@babel/runtime/helpers/toConsumableArray.js")); var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _warning = __webpack_require__(/*! ../../../_util/warning */ "../../../node_modules/antd/lib/_util/warning.js"); var _util = __webpack_require__(/*! ../../util */ "../../../node_modules/antd/lib/table/util.js"); var _FilterDropdown = _interopRequireWildcard(__webpack_require__(/*! ./FilterDropdown */ "../../../node_modules/antd/lib/table/hooks/useFilter/FilterDropdown.js")); const collectFilterStates = (columns, init, pos) => { let filterStates = []; (columns || []).forEach((column, index) => { var _a; const columnPos = (0, _util.getColumnPos)(index, pos); const filterDropdownIsDefined = column.filterDropdown !== undefined; if (column.filters || filterDropdownIsDefined || 'onFilter' in column) { if ('filteredValue' in column) { // Controlled let filteredValues = column.filteredValue; if (!filterDropdownIsDefined) { filteredValues = (_a = filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.map(String)) !== null && _a !== void 0 ? _a : filteredValues; } filterStates.push({ column, key: (0, _util.getColumnKey)(column, columnPos), filteredKeys: filteredValues, forceFiltered: column.filtered }); } else { // Uncontrolled filterStates.push({ column, key: (0, _util.getColumnKey)(column, columnPos), filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined, forceFiltered: column.filtered }); } } if ('children' in column) { filterStates = [].concat((0, _toConsumableArray2.default)(filterStates), (0, _toConsumableArray2.default)(collectFilterStates(column.children, init, columnPos))); } }); return filterStates; }; function injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, locale, triggerFilter, getPopupContainer, pos, rootClassName) { return columns.map((column, index) => { const columnPos = (0, _util.getColumnPos)(index, pos); const { filterOnClose = true, filterMultiple = true, filterMode, filterSearch } = column; let newColumn = column; if (newColumn.filters || newColumn.filterDropdown) { const columnKey = (0, _util.getColumnKey)(newColumn, columnPos); const filterState = filterStates.find(({ key }) => columnKey === key); newColumn = Object.assign(Object.assign({}, newColumn), { title: renderProps => (/*#__PURE__*/React.createElement(_FilterDropdown.default, { tablePrefixCls: prefixCls, prefixCls: `${prefixCls}-filter`, dropdownPrefixCls: dropdownPrefixCls, column: newColumn, columnKey: columnKey, filterState: filterState, filterOnClose: filterOnClose, filterMultiple: filterMultiple, filterMode: filterMode, filterSearch: filterSearch, triggerFilter: triggerFilter, locale: locale, getPopupContainer: getPopupContainer, rootClassName: rootClassName }, (0, _util.renderColumnTitle)(column.title, renderProps))) }); } if ('children' in newColumn) { newColumn = Object.assign(Object.assign({}, newColumn), { children: injectFilter(prefixCls, dropdownPrefixCls, newColumn.children, filterStates, locale, triggerFilter, getPopupContainer, columnPos, rootClassName) }); } return newColumn; }); } const generateFilterInfo = filterStates => { const currentFilters = {}; filterStates.forEach(({ key, filteredKeys, column }) => { const keyAsString = key; const { filters, filterDropdown } = column; if (filterDropdown) { currentFilters[keyAsString] = filteredKeys || null; } else if (Array.isArray(filteredKeys)) { const keys = (0, _FilterDropdown.flattenKeys)(filters); currentFilters[keyAsString] = keys.filter(originKey => filteredKeys.includes(String(originKey))); } else { currentFilters[keyAsString] = null; } }); return currentFilters; }; const getFilterData = (data, filterStates, childrenColumnName) => { const filterDatas = filterStates.reduce((currentData, filterState) => { const { column: { onFilter, filters }, filteredKeys } = filterState; if (onFilter && filteredKeys && filteredKeys.length) { return currentData // shallow copy .map(record => Object.assign({}, record)).filter(record => filteredKeys.some(key => { const keys = (0, _FilterDropdown.flattenKeys)(filters); const keyIndex = keys.findIndex(k => String(k) === String(key)); const realKey = keyIndex !== -1 ? keys[keyIndex] : key; // filter children if (record[childrenColumnName]) { record[childrenColumnName] = getFilterData(record[childrenColumnName], filterStates, childrenColumnName); } return onFilter(realKey, record); })); } return currentData; }, data); return filterDatas; }; exports.getFilterData = getFilterData; const getMergedColumns = rawMergedColumns => rawMergedColumns.flatMap(column => { if ('children' in column) { return [column].concat((0, _toConsumableArray2.default)(getMergedColumns(column.children || []))); } return [column]; }); const useFilter = props => { const { prefixCls, dropdownPrefixCls, mergedColumns: rawMergedColumns, onFilterChange, getPopupContainer, locale: tableLocale, rootClassName } = props; const warning = (0, _warning.devUseWarning)('Table'); const mergedColumns = React.useMemo(() => getMergedColumns(rawMergedColumns || []), [rawMergedColumns]); const [filterStates, setFilterStates] = React.useState(() => collectFilterStates(mergedColumns, true)); const mergedFilterStates = React.useMemo(() => { const collectedStates = collectFilterStates(mergedColumns, false); if (collectedStates.length === 0) { return collectedStates; } let filteredKeysIsAllNotControlled = true; let filteredKeysIsAllControlled = true; collectedStates.forEach(({ filteredKeys }) => { if (filteredKeys !== undefined) { filteredKeysIsAllNotControlled = false; } else { filteredKeysIsAllControlled = false; } }); // Return if not controlled if (filteredKeysIsAllNotControlled) { // Filter column may have been removed const keyList = (mergedColumns || []).map((column, index) => (0, _util.getColumnKey)(column, (0, _util.getColumnPos)(index))); return filterStates.filter(({ key }) => keyList.includes(key)).map(item => { const col = mergedColumns[keyList.indexOf(item.key)]; return Object.assign(Object.assign({}, item), { column: Object.assign(Object.assign({}, item.column), col), forceFiltered: col.filtered }); }); } true ? warning(filteredKeysIsAllControlled, 'usage', 'Columns should all contain `filteredValue` or not contain `filteredValue`.') : 0; return collectedStates; }, [mergedColumns, filterStates]); const filters = React.useMemo(() => generateFilterInfo(mergedFilterStates), [mergedFilterStates]); const triggerFilter = filterState => { const newFilterStates = mergedFilterStates.filter(({ key }) => key !== filterState.key); newFilterStates.push(filterState); setFilterStates(newFilterStates); onFilterChange(generateFilterInfo(newFilterStates), newFilterStates); }; const transformColumns = innerColumns => injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, tableLocale, triggerFilter, getPopupContainer, undefined, rootClassName); return [transformColumns, mergedFilterStates, filters]; }; var _default = exports["default"] = useFilter; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useLazyKVMap.js": /*!******************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useLazyKVMap.js ***! \******************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); const useLazyKVMap = (data, childrenColumnName, getRowKey) => { const mapCacheRef = React.useRef({}); function getRecordByKey(key) { var _a; if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) { const kvMap = new Map(); function dig(records) { records.forEach((record, index) => { const rowKey = getRowKey(record, index); kvMap.set(rowKey, record); if (record && typeof record === 'object' && childrenColumnName in record) { dig(record[childrenColumnName] || []); } }); } dig(data); mapCacheRef.current = { data, childrenColumnName, kvMap, getRowKey }; } return (_a = mapCacheRef.current.kvMap) === null || _a === void 0 ? void 0 : _a.get(key); } return [getRecordByKey]; }; var _default = exports["default"] = useLazyKVMap; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/usePagination.js": /*!*******************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/usePagination.js ***! \*******************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.DEFAULT_PAGE_SIZE = void 0; exports.getPaginationParam = getPaginationParam; var _react = __webpack_require__(/*! react */ "../../../node_modules/react/index.js"); var _extendsObject = _interopRequireDefault(__webpack_require__(/*! ../../_util/extendsObject */ "../../../node_modules/antd/lib/_util/extendsObject.js")); var __rest = void 0 && (void 0).__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 DEFAULT_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = 10; function getPaginationParam(mergedPagination, pagination) { const param = { current: mergedPagination.current, pageSize: mergedPagination.pageSize }; const paginationObj = pagination && typeof pagination === 'object' ? pagination : {}; Object.keys(paginationObj).forEach(pageProp => { const value = mergedPagination[pageProp]; if (typeof value !== 'function') { param[pageProp] = value; } }); return param; } function usePagination(total, onChange, pagination) { const _a = pagination && typeof pagination === 'object' ? pagination : {}, { total: paginationTotal = 0 } = _a, paginationObj = __rest(_a, ["total"]); const [innerPagination, setInnerPagination] = (0, _react.useState)(() => ({ current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1, pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE })); // ============ Basic Pagination Config ============ const mergedPagination = (0, _extendsObject.default)(innerPagination, paginationObj, { total: paginationTotal > 0 ? paginationTotal : total }); // Reset `current` if data length or pageSize changed const maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize); if (mergedPagination.current > maxPage) { // Prevent a maximum page count of 0 mergedPagination.current = maxPage || 1; } const refreshPagination = (current, pageSize) => { setInnerPagination({ current: current !== null && current !== void 0 ? current : 1, pageSize: pageSize || mergedPagination.pageSize }); }; const onInternalChange = (current, pageSize) => { var _a; if (pagination) { (_a = pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, current, pageSize); } refreshPagination(current, pageSize); onChange(current, pageSize || (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize)); }; if (pagination === false) { return [{}, () => {}]; } return [Object.assign(Object.assign({}, mergedPagination), { onChange: onInternalChange }), refreshPagination]; } var _default = exports["default"] = usePagination; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useSelection.js": /*!******************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useSelection.js ***! \******************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.SELECTION_NONE = exports.SELECTION_INVERT = exports.SELECTION_COLUMN = exports.SELECTION_ALL = void 0; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../../../node_modules/@babel/runtime/helpers/toConsumableArray.js")); var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var React = _react; var _DownOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons/DownOutlined */ "../../../node_modules/@ant-design/icons/DownOutlined.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../../../node_modules/classnames/index.js")); var _rcTable = __webpack_require__(/*! rc-table */ "../../../node_modules/rc-table/es/index.js"); var _util = __webpack_require__(/*! rc-tree/lib/util */ "../../../node_modules/rc-tree/lib/util.js"); var _conductUtil = __webpack_require__(/*! rc-tree/lib/utils/conductUtil */ "../../../node_modules/rc-tree/lib/utils/conductUtil.js"); var _treeUtil = __webpack_require__(/*! rc-tree/lib/utils/treeUtil */ "../../../node_modules/rc-tree/lib/utils/treeUtil.js"); var _useMergedState = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/hooks/useMergedState */ "../../../node_modules/rc-util/lib/hooks/useMergedState.js")); var _hooks = __webpack_require__(/*! ../../_util/hooks */ "../../../node_modules/antd/lib/_util/hooks/index.js"); var _warning = __webpack_require__(/*! ../../_util/warning */ "../../../node_modules/antd/lib/_util/warning.js"); var _checkbox = _interopRequireDefault(__webpack_require__(/*! ../../checkbox */ "../../../node_modules/antd/lib/checkbox/index.js")); var _dropdown = _interopRequireDefault(__webpack_require__(/*! ../../dropdown */ "../../../node_modules/antd/lib/dropdown/index.js")); var _radio = _interopRequireDefault(__webpack_require__(/*! ../../radio */ "../../../node_modules/antd/lib/radio/index.js")); // TODO: warning if use ajax!!! const SELECTION_COLUMN = exports.SELECTION_COLUMN = {}; const SELECTION_ALL = exports.SELECTION_ALL = 'SELECT_ALL'; const SELECTION_INVERT = exports.SELECTION_INVERT = 'SELECT_INVERT'; const SELECTION_NONE = exports.SELECTION_NONE = 'SELECT_NONE'; const EMPTY_LIST = []; const flattenData = (childrenColumnName, data, list = []) => { (data || []).forEach(record => { list.push(record); if (record && typeof record === 'object' && childrenColumnName in record) { flattenData(childrenColumnName, record[childrenColumnName], list); } }); return list; }; const useSelection = (config, rowSelection) => { const { preserveSelectedRowKeys, selectedRowKeys, defaultSelectedRowKeys, getCheckboxProps, getTitleCheckboxProps, onChange: onSelectionChange, onSelect, onSelectAll, onSelectInvert, onSelectNone, onSelectMultiple, columnWidth: selectionColWidth, type: selectionType, selections, fixed, renderCell: customizeRenderCell, hideSelectAll, checkStrictly = true } = rowSelection || {}; const { prefixCls, data, pageData, getRecordByKey, getRowKey, expandType, childrenColumnName, locale: tableLocale, getPopupContainer } = config; const warning = (0, _warning.devUseWarning)('Table'); // ========================= MultipleSelect ========================= const [multipleSelect, updatePrevSelectedIndex] = (0, _hooks.useMultipleSelect)(item => item); // ========================= Keys ========================= const [mergedSelectedKeys, setMergedSelectedKeys] = (0, _useMergedState.default)(selectedRowKeys || defaultSelectedRowKeys || EMPTY_LIST, { value: selectedRowKeys }); // ======================== Caches ======================== const preserveRecordsRef = React.useRef(new Map()); const updatePreserveRecordsCache = (0, _react.useCallback)(keys => { if (preserveSelectedRowKeys) { const newCache = new Map(); // Keep key if mark as preserveSelectedRowKeys keys.forEach(key => { let record = getRecordByKey(key); if (!record && preserveRecordsRef.current.has(key)) { record = preserveRecordsRef.current.get(key); } newCache.set(key, record); }); // Refresh to new cache preserveRecordsRef.current = newCache; } }, [getRecordByKey, preserveSelectedRowKeys]); // Update cache with selectedKeys React.useEffect(() => { updatePreserveRecordsCache(mergedSelectedKeys); }, [mergedSelectedKeys]); // Get flatten data const flattedData = (0, _react.useMemo)(() => flattenData(childrenColumnName, pageData), [childrenColumnName, pageData]); const { keyEntities } = (0, _react.useMemo)(() => { if (checkStrictly) { return { keyEntities: null }; } let convertData = data; if (preserveSelectedRowKeys) { // use flattedData keys const keysSet = new Set(flattedData.map((record, index) => getRowKey(record, index))); // remove preserveRecords that duplicate data const preserveRecords = Array.from(preserveRecordsRef.current).reduce((total, [key, value]) => keysSet.has(key) ? total : total.concat(value), []); convertData = [].concat((0, _toConsumableArray2.default)(convertData), (0, _toConsumableArray2.default)(preserveRecords)); } return (0, _treeUtil.convertDataToEntities)(convertData, { externalGetKey: getRowKey, childrenPropName: childrenColumnName }); }, [data, getRowKey, checkStrictly, childrenColumnName, preserveSelectedRowKeys, flattedData]); // Get all checkbox props const checkboxPropsMap = (0, _react.useMemo)(() => { const map = new Map(); flattedData.forEach((record, index) => { const key = getRowKey(record, index); const checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {}; map.set(key, checkboxProps); true ? warning(!('checked' in checkboxProps || 'defaultChecked' in checkboxProps), 'usage', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.') : 0; }); return map; }, [flattedData, getRowKey, getCheckboxProps]); const isCheckboxDisabled = (0, _react.useCallback)(r => { const rowKey = getRowKey(r); let checkboxProps; if (checkboxPropsMap.has(rowKey)) { checkboxProps = checkboxPropsMap.get(getRowKey(r)); } else { checkboxProps = getCheckboxProps ? getCheckboxProps(r) : undefined; } return !!(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.disabled); }, [checkboxPropsMap, getRowKey]); const [derivedSelectedKeys, derivedHalfSelectedKeys] = (0, _react.useMemo)(() => { if (checkStrictly) { return [mergedSelectedKeys || [], []]; } const { checkedKeys, halfCheckedKeys } = (0, _conductUtil.conductCheck)(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled); return [checkedKeys || [], halfCheckedKeys]; }, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]); const derivedSelectedKeySet = (0, _react.useMemo)(() => { const keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys; return new Set(keys); }, [derivedSelectedKeys, selectionType]); const derivedHalfSelectedKeySet = (0, _react.useMemo)(() => selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys), [derivedHalfSelectedKeys, selectionType]); // Reset if rowSelection reset React.useEffect(() => { if (!rowSelection) { setMergedSelectedKeys(EMPTY_LIST); } }, [!!rowSelection]); const setSelectedKeys = (0, _react.useCallback)((keys, method) => { let availableKeys; let records; updatePreserveRecordsCache(keys); if (preserveSelectedRowKeys) { availableKeys = keys; records = keys.map(key => preserveRecordsRef.current.get(key)); } else { // Filter key which not exist in the `dataSource` availableKeys = []; records = []; keys.forEach(key => { const record = getRecordByKey(key); if (record !== undefined) { availableKeys.push(key); records.push(record); } }); } setMergedSelectedKeys(availableKeys); onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(availableKeys, records, { type: method }); }, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]); // ====================== Selections ====================== // Trigger single `onSelect` event const triggerSingleSelection = (0, _react.useCallback)((key, selected, keys, event) => { if (onSelect) { const rows = keys.map(k => getRecordByKey(k)); onSelect(getRecordByKey(key), selected, rows, event); } setSelectedKeys(keys, 'single'); }, [onSelect, getRecordByKey, setSelectedKeys]); const mergedSelections = (0, _react.useMemo)(() => { if (!selections || hideSelectAll) { return null; } const selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE] : selections; return selectionList.map(selection => { if (selection === SELECTION_ALL) { return { key: 'all', text: tableLocale.selectionAll, onSelect() { setSelectedKeys(data.map((record, index) => getRowKey(record, index)).filter(key => { const checkProps = checkboxPropsMap.get(key); return !(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled) || derivedSelectedKeySet.has(key); }), 'all'); } }; } if (selection === SELECTION_INVERT) { return { key: 'invert', text: tableLocale.selectInvert, onSelect() { const keySet = new Set(derivedSelectedKeySet); pageData.forEach((record, index) => { const key = getRowKey(record, index); const checkProps = checkboxPropsMap.get(key); if (!(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled)) { if (keySet.has(key)) { keySet.delete(key); } else { keySet.add(key); } } }); const keys = Array.from(keySet); if (onSelectInvert) { warning.deprecated(false, 'onSelectInvert', 'onChange'); onSelectInvert(keys); } setSelectedKeys(keys, 'invert'); } }; } if (selection === SELECTION_NONE) { return { key: 'none', text: tableLocale.selectNone, onSelect() { onSelectNone === null || onSelectNone === void 0 ? void 0 : onSelectNone(); setSelectedKeys(Array.from(derivedSelectedKeySet).filter(key => { const checkProps = checkboxPropsMap.get(key); return checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled; }), 'none'); } }; } return selection; }).map(selection => Object.assign(Object.assign({}, selection), { onSelect: (...rest) => { var _a2; var _a; (_a = selection.onSelect) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [selection].concat(rest)); updatePrevSelectedIndex(null); } })); }, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]); // ======================= Columns ======================== const transformColumns = (0, _react.useCallback)(columns => { var _a; // >>>>>>>>>>> Skip if not exists `rowSelection` if (!rowSelection) { true ? warning(!columns.includes(SELECTION_COLUMN), 'usage', '`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`.') : 0; return columns.filter(col => col !== SELECTION_COLUMN); } // >>>>>>>>>>> Support selection let cloneColumns = (0, _toConsumableArray2.default)(columns); const keySet = new Set(derivedSelectedKeySet); // Record key only need check with enabled const recordKeys = flattedData.map(getRowKey).filter(key => !checkboxPropsMap.get(key).disabled); const checkedCurrentAll = recordKeys.every(key => keySet.has(key)); const checkedCurrentSome = recordKeys.some(key => keySet.has(key)); const onSelectAllChange = () => { const changeKeys = []; if (checkedCurrentAll) { recordKeys.forEach(key => { keySet.delete(key); changeKeys.push(key); }); } else { recordKeys.forEach(key => { if (!keySet.has(key)) { keySet.add(key); changeKeys.push(key); } }); } const keys = Array.from(keySet); onSelectAll === null || onSelectAll === void 0 ? void 0 : onSelectAll(!checkedCurrentAll, keys.map(k => getRecordByKey(k)), changeKeys.map(k => getRecordByKey(k))); setSelectedKeys(keys, 'all'); updatePrevSelectedIndex(null); }; // ===================== Render ===================== // Title Cell let title; let columnTitleCheckbox; if (selectionType !== 'radio') { let customizeSelections; if (mergedSelections) { const menu = { getPopupContainer, items: mergedSelections.map((selection, index) => { const { key, text, onSelect: onSelectionClick } = selection; return { key: key !== null && key !== void 0 ? key : index, onClick: () => { onSelectionClick === null || onSelectionClick === void 0 ? void 0 : onSelectionClick(recordKeys); }, label: text }; }) }; customizeSelections = /*#__PURE__*/React.createElement("div", { className: `${prefixCls}-selection-extra` }, /*#__PURE__*/React.createElement(_dropdown.default, { menu: menu, getPopupContainer: getPopupContainer }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(_DownOutlined.default, null)))); } const allDisabledData = flattedData.map((record, index) => { const key = getRowKey(record, index); const checkboxProps = checkboxPropsMap.get(key) || {}; return Object.assign({ checked: keySet.has(key) }, checkboxProps); }).filter(({ disabled }) => disabled); const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.length; const allDisabledAndChecked = allDisabled && allDisabledData.every(({ checked }) => checked); const allDisabledSomeChecked = allDisabled && allDisabledData.some(({ checked }) => checked); const customCheckboxProps = (getTitleCheckboxProps === null || getTitleCheckboxProps === void 0 ? void 0 : getTitleCheckboxProps()) || {}; const { onChange, disabled } = customCheckboxProps; columnTitleCheckbox = /*#__PURE__*/React.createElement(_checkbox.default, Object.assign({ "aria-label": customizeSelections ? 'Custom selection' : 'Select all' }, customCheckboxProps, { checked: !allDisabled ? !!flattedData.length && checkedCurrentAll : allDisabledAndChecked, indeterminate: !allDisabled ? !checkedCurrentAll && checkedCurrentSome : !allDisabledAndChecked && allDisabledSomeChecked, onChange: e => { onSelectAllChange(); onChange === null || onChange === void 0 ? void 0 : onChange(e); }, disabled: disabled !== null && disabled !== void 0 ? disabled : flattedData.length === 0 || allDisabled, skipGroup: true })); title = !hideSelectAll && (/*#__PURE__*/React.createElement("div", { className: `${prefixCls}-selection` }, columnTitleCheckbox, customizeSelections)); } // Body Cell let renderCell; if (selectionType === 'radio') { renderCell = (_, record, index) => { const key = getRowKey(record, index); const checked = keySet.has(key); const checkboxProps = checkboxPropsMap.get(key); return { node: (/*#__PURE__*/React.createElement(_radio.default, Object.assign({}, checkboxProps, { checked: checked, onClick: e => { var _a; e.stopPropagation(); (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e); }, onChange: event => { var _a; if (!keySet.has(key)) { triggerSingleSelection(key, true, [key], event.nativeEvent); } (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event); } }))), checked }; }; } else { renderCell = (_, record, index) => { var _a; const key = getRowKey(record, index); const checked = keySet.has(key); const indeterminate = derivedHalfSelectedKeySet.has(key); const checkboxProps = checkboxPropsMap.get(key); let mergedIndeterminate; if (expandType === 'nest') { mergedIndeterminate = indeterminate; true ? warning(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== 'boolean', 'usage', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.') : 0; } else { mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate; } // Record checked return { node: (/*#__PURE__*/React.createElement(_checkbox.default, Object.assign({}, checkboxProps, { indeterminate: mergedIndeterminate, checked: checked, skipGroup: true, onClick: e => { var _a; e.stopPropagation(); (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e); }, onChange: event => { var _a; const { nativeEvent } = event; const { shiftKey } = nativeEvent; const currentSelectedIndex = recordKeys.indexOf(key); const isMultiple = derivedSelectedKeys.some(item => recordKeys.includes(item)); if (shiftKey && checkStrictly && isMultiple) { const changedKeys = multipleSelect(currentSelectedIndex, recordKeys, keySet); const keys = Array.from(keySet); onSelectMultiple === null || onSelectMultiple === void 0 ? void 0 : onSelectMultiple(!checked, keys.map(recordKey => getRecordByKey(recordKey)), changedKeys.map(recordKey => getRecordByKey(recordKey))); setSelectedKeys(keys, 'multiple'); } else { // Single record selected const originCheckedKeys = derivedSelectedKeys; if (checkStrictly) { const checkedKeys = checked ? (0, _util.arrDel)(originCheckedKeys, key) : (0, _util.arrAdd)(originCheckedKeys, key); triggerSingleSelection(key, !checked, checkedKeys, nativeEvent); } else { // Always fill first const result = (0, _conductUtil.conductCheck)([].concat((0, _toConsumableArray2.default)(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled); const { checkedKeys, halfCheckedKeys } = result; let nextCheckedKeys = checkedKeys; // If remove, we do it again to correction if (checked) { const tempKeySet = new Set(checkedKeys); tempKeySet.delete(key); nextCheckedKeys = (0, _conductUtil.conductCheck)(Array.from(tempKeySet), { checked: false, halfCheckedKeys }, keyEntities, isCheckboxDisabled).checkedKeys; } triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent); } } if (checked) { updatePrevSelectedIndex(null); } else { updatePrevSelectedIndex(currentSelectedIndex); } (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event); } }))), checked }; }; } const renderSelectionCell = (_, record, index) => { const { node, checked } = renderCell(_, record, index); if (customizeRenderCell) { return customizeRenderCell(checked, record, index, node); } return node; }; // Insert selection column if not exist if (!cloneColumns.includes(SELECTION_COLUMN)) { // Always after expand icon if (cloneColumns.findIndex(col => { var _a; return ((_a = col[_rcTable.INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN'; }) === 0) { const [expandColumn, ...restColumns] = cloneColumns; cloneColumns = [expandColumn, SELECTION_COLUMN].concat((0, _toConsumableArray2.default)(restColumns)); } else { // Normal insert at first column cloneColumns = [SELECTION_COLUMN].concat((0, _toConsumableArray2.default)(cloneColumns)); } } // Deduplicate selection column const selectionColumnIndex = cloneColumns.indexOf(SELECTION_COLUMN); true ? warning(cloneColumns.filter(col => col === SELECTION_COLUMN).length <= 1, 'usage', 'Multiple `SELECTION_COLUMN` exist in `columns`.') : 0; cloneColumns = cloneColumns.filter((column, index) => column !== SELECTION_COLUMN || index === selectionColumnIndex); // Fixed column logic const prevCol = cloneColumns[selectionColumnIndex - 1]; const nextCol = cloneColumns[selectionColumnIndex + 1]; let mergedFixed = fixed; if (mergedFixed === undefined) { if ((nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed) !== undefined) { mergedFixed = nextCol.fixed; } else if ((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) !== undefined) { mergedFixed = prevCol.fixed; } } if (mergedFixed && prevCol && ((_a = prevCol[_rcTable.INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN' && prevCol.fixed === undefined) { prevCol.fixed = mergedFixed; } const columnCls = (0, _classnames.default)(`${prefixCls}-selection-col`, { [`${prefixCls}-selection-col-with-dropdown`]: selections && selectionType === 'checkbox' }); const renderColumnTitle = () => { if (!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.columnTitle)) { return title; } if (typeof rowSelection.columnTitle === 'function') { return rowSelection.columnTitle(columnTitleCheckbox); } return rowSelection.columnTitle; }; // Replace with real selection column const selectionColumn = { fixed: mergedFixed, width: selectionColWidth, className: `${prefixCls}-selection-column`, title: renderColumnTitle(), render: renderSelectionCell, onCell: rowSelection.onCell, align: rowSelection.align, [_rcTable.INTERNAL_COL_DEFINE]: { className: columnCls } }; return cloneColumns.map(col => col === SELECTION_COLUMN ? selectionColumn : col); }, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]); return [transformColumns, derivedSelectedKeySet]; }; var _default = exports["default"] = useSelection; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useSorter.js": /*!***************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useSorter.js ***! \***************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getSortData = exports["default"] = void 0; var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../../../node_modules/@babel/runtime/helpers/toConsumableArray.js")); var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _CaretDownOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons/CaretDownOutlined */ "../../../node_modules/@ant-design/icons/CaretDownOutlined.js")); var _CaretUpOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons/CaretUpOutlined */ "../../../node_modules/@ant-design/icons/CaretUpOutlined.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "../../../node_modules/classnames/index.js")); var _KeyCode = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/KeyCode */ "../../../node_modules/rc-util/lib/KeyCode.js")); var _tooltip = _interopRequireDefault(__webpack_require__(/*! ../../tooltip */ "../../../node_modules/antd/lib/tooltip/index.js")); var _util = __webpack_require__(/*! ../util */ "../../../node_modules/antd/lib/table/util.js"); const ASCEND = 'ascend'; const DESCEND = 'descend'; const getMultiplePriority = column => { if (typeof column.sorter === 'object' && typeof column.sorter.multiple === 'number') { return column.sorter.multiple; } return false; }; const getSortFunction = sorter => { if (typeof sorter === 'function') { return sorter; } if (sorter && typeof sorter === 'object' && sorter.compare) { return sorter.compare; } return false; }; const nextSortDirection = (sortDirections, current) => { if (!current) { return sortDirections[0]; } return sortDirections[sortDirections.indexOf(current) + 1]; }; const collectSortStates = (columns, init, pos) => { let sortStates = []; const pushState = (column, columnPos) => { sortStates.push({ column, key: (0, _util.getColumnKey)(column, columnPos), multiplePriority: getMultiplePriority(column), sortOrder: column.sortOrder }); }; (columns || []).forEach((column, index) => { const columnPos = (0, _util.getColumnPos)(index, pos); if (column.children) { if ('sortOrder' in column) { // Controlled pushState(column, columnPos); } sortStates = [].concat((0, _toConsumableArray2.default)(sortStates), (0, _toConsumableArray2.default)(collectSortStates(column.children, init, columnPos))); } else if (column.sorter) { if ('sortOrder' in column) { // Controlled pushState(column, columnPos); } else if (init && column.defaultSortOrder) { // Default sorter sortStates.push({ column, key: (0, _util.getColumnKey)(column, columnPos), multiplePriority: getMultiplePriority(column), sortOrder: column.defaultSortOrder }); } } }); return sortStates; }; const injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) => { const finalColumns = (columns || []).map((column, index) => { const columnPos = (0, _util.getColumnPos)(index, pos); let newColumn = column; if (newColumn.sorter) { const sortDirections = newColumn.sortDirections || defaultSortDirections; const showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip; const columnKey = (0, _util.getColumnKey)(newColumn, columnPos); const sorterState = sorterStates.find(({ key }) => key === columnKey); const sortOrder = sorterState ? sorterState.sortOrder : null; const nextSortOrder = nextSortDirection(sortDirections, sortOrder); let sorter; if (column.sortIcon) { sorter = column.sortIcon({ sortOrder }); } else { const upNode = sortDirections.includes(ASCEND) && (/*#__PURE__*/React.createElement(_CaretUpOutlined.default, { className: (0, _classnames.default)(`${prefixCls}-column-sorter-up`, { active: sortOrder === ASCEND }) })); const downNode = sortDirections.includes(DESCEND) && (/*#__PURE__*/React.createElement(_CaretDownOutlined.default, { className: (0, _classnames.default)(`${prefixCls}-column-sorter-down`, { active: sortOrder === DESCEND }) })); sorter = /*#__PURE__*/React.createElement("span", { className: (0, _classnames.default)(`${prefixCls}-column-sorter`, { [`${prefixCls}-column-sorter-full`]: !!(upNode && downNode) }) }, /*#__PURE__*/React.createElement("span", { className: `${prefixCls}-column-sorter-inner`, "aria-hidden": "true" }, upNode, downNode)); } const { cancelSort, triggerAsc, triggerDesc } = tableLocale || {}; let sortTip = cancelSort; if (nextSortOrder === DESCEND) { sortTip = triggerDesc; } else if (nextSortOrder === ASCEND) { sortTip = triggerAsc; } const tooltipProps = typeof showSorterTooltip === 'object' ? Object.assign({ title: sortTip }, showSorterTooltip) : { title: sortTip }; newColumn = Object.assign(Object.assign({}, newColumn), { className: (0, _classnames.default)(newColumn.className, { [`${prefixCls}-column-sort`]: sortOrder }), title: renderProps => { const columnSortersClass = `${prefixCls}-column-sorters`; const renderColumnTitleWrapper = /*#__PURE__*/React.createElement("span", { className: `${prefixCls}-column-title` }, (0, _util.renderColumnTitle)(column.title, renderProps)); const renderSortTitle = /*#__PURE__*/React.createElement("div", { className: columnSortersClass }, renderColumnTitleWrapper, sorter); if (showSorterTooltip) { if (typeof showSorterTooltip !== 'boolean' && (showSorterTooltip === null || showSorterTooltip === void 0 ? void 0 : showSorterTooltip.target) === 'sorter-icon') { return /*#__PURE__*/React.createElement("div", { className: (0, _classnames.default)(columnSortersClass, `${columnSortersClass}-tooltip-target-sorter`) }, renderColumnTitleWrapper, /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, tooltipProps), sorter)); } return /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, tooltipProps), renderSortTitle); } return renderSortTitle; }, onHeaderCell: col => { var _a; const cell = ((_a = column.onHeaderCell) === null || _a === void 0 ? void 0 : _a.call(column, col)) || {}; const originOnClick = cell.onClick; const originOKeyDown = cell.onKeyDown; cell.onClick = event => { triggerSorter({ column, key: columnKey, sortOrder: nextSortOrder, multiplePriority: getMultiplePriority(column) }); originOnClick === null || originOnClick === void 0 ? void 0 : originOnClick(event); }; cell.onKeyDown = event => { if (event.keyCode === _KeyCode.default.ENTER) { triggerSorter({ column, key: columnKey, sortOrder: nextSortOrder, multiplePriority: getMultiplePriority(column) }); originOKeyDown === null || originOKeyDown === void 0 ? void 0 : originOKeyDown(event); } }; const renderTitle = (0, _util.safeColumnTitle)(column.title, {}); const displayTitle = renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle.toString(); // Inform the screen-reader so it can tell the visually impaired user which column is sorted if (sortOrder) { cell['aria-sort'] = sortOrder === 'ascend' ? 'ascending' : 'descending'; } cell['aria-label'] = displayTitle || ''; cell.className = (0, _classnames.default)(cell.className, `${prefixCls}-column-has-sorters`); cell.tabIndex = 0; if (column.ellipsis) { cell.title = (renderTitle !== null && renderTitle !== void 0 ? renderTitle : '').toString(); } return cell; } }); } if ('children' in newColumn) { newColumn = Object.assign(Object.assign({}, newColumn), { children: injectSorter(prefixCls, newColumn.children, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos) }); } return newColumn; }); return finalColumns; }; const stateToInfo = sorterState => { const { column, sortOrder } = sorterState; return { column, order: sortOrder, field: column.dataIndex, columnKey: column.key }; }; const generateSorterInfo = sorterStates => { const activeSorters = sorterStates.filter(({ sortOrder }) => sortOrder).map(stateToInfo); // =========== Legacy compatible support =========== // https://github.com/ant-design/ant-design/pull/19226 if (activeSorters.length === 0 && sorterStates.length) { const lastIndex = sorterStates.length - 1; return Object.assign(Object.assign({}, stateToInfo(sorterStates[lastIndex])), { column: undefined, order: undefined, field: undefined, columnKey: undefined }); } if (activeSorters.length <= 1) { return activeSorters[0] || {}; } return activeSorters; }; const getSortData = (data, sortStates, childrenColumnName) => { const innerSorterStates = sortStates.slice().sort((a, b) => b.multiplePriority - a.multiplePriority); const cloneData = data.slice(); const runningSorters = innerSorterStates.filter(({ column: { sorter }, sortOrder }) => getSortFunction(sorter) && sortOrder); // Skip if no sorter needed if (!runningSorters.length) { return cloneData; } return cloneData.sort((record1, record2) => { for (let i = 0; i < runningSorters.length; i += 1) { const sorterState = runningSorters[i]; const { column: { sorter }, sortOrder } = sorterState; const compareFn = getSortFunction(sorter); if (compareFn && sortOrder) { const compareResult = compareFn(record1, record2, sortOrder); if (compareResult !== 0) { return sortOrder === ASCEND ? compareResult : -compareResult; } } } return 0; }).map(record => { const subRecords = record[childrenColumnName]; if (subRecords) { return Object.assign(Object.assign({}, record), { [childrenColumnName]: getSortData(subRecords, sortStates, childrenColumnName) }); } return record; }); }; exports.getSortData = getSortData; const useFilterSorter = props => { const { prefixCls, mergedColumns, sortDirections, tableLocale, showSorterTooltip, onSorterChange } = props; const [sortStates, setSortStates] = React.useState(() => collectSortStates(mergedColumns, true)); const getColumnKeys = (columns, pos) => { const newKeys = []; columns.forEach((item, index) => { const columnPos = (0, _util.getColumnPos)(index, pos); newKeys.push((0, _util.getColumnKey)(item, columnPos)); if (Array.isArray(item.children)) { const childKeys = getColumnKeys(item.children, columnPos); newKeys.push.apply(newKeys, (0, _toConsumableArray2.default)(childKeys)); } }); return newKeys; }; const mergedSorterStates = React.useMemo(() => { let validate = true; const collectedStates = collectSortStates(mergedColumns, false); // Return if not controlled if (!collectedStates.length) { const mergedColumnsKeys = getColumnKeys(mergedColumns); return sortStates.filter(({ key }) => mergedColumnsKeys.includes(key)); } const validateStates = []; function patchStates(state) { if (validate) { validateStates.push(state); } else { validateStates.push(Object.assign(Object.assign({}, state), { sortOrder: null })); } } let multipleMode = null; collectedStates.forEach(state => { if (multipleMode === null) { patchStates(state); if (state.sortOrder) { if (state.multiplePriority === false) { validate = false; } else { multipleMode = true; } } } else if (multipleMode && state.multiplePriority !== false) { patchStates(state); } else { validate = false; patchStates(state); } }); return validateStates; }, [mergedColumns, sortStates]); // Get render columns title required props const columnTitleSorterProps = React.useMemo(() => { var _a, _b; const sortColumns = mergedSorterStates.map(({ column, sortOrder }) => ({ column, order: sortOrder })); return { sortColumns, // Legacy sortColumn: (_a = sortColumns[0]) === null || _a === void 0 ? void 0 : _a.column, sortOrder: (_b = sortColumns[0]) === null || _b === void 0 ? void 0 : _b.order }; }, [mergedSorterStates]); const triggerSorter = sortState => { let newSorterStates; if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) { newSorterStates = [sortState]; } else { newSorterStates = [].concat((0, _toConsumableArray2.default)(mergedSorterStates.filter(({ key }) => key !== sortState.key)), [sortState]); } setSortStates(newSorterStates); onSorterChange(generateSorterInfo(newSorterStates), newSorterStates); }; const transformColumns = innerColumns => injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip); const getSorters = () => generateSorterInfo(mergedSorterStates); return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters]; }; var _default = exports["default"] = useFilterSorter; /***/ }), /***/ "../../../node_modules/antd/lib/table/hooks/useTitleColumns.js": /*!*********************************************************************!*\ !*** ../../../node_modules/antd/lib/table/hooks/useTitleColumns.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _interopRequireWildcard = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "../../../node_modules/@babel/runtime/helpers/interopRequireWildcard.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "../../../node_modules/react/index.js")); var _util = __webpack_require__(/*! ../util */ "../../../node_modules/antd/lib/table/util.js"); const fillTitle = (columns, columnTitleProps) => { const finalColumns = columns.map(column => { const cloneColumn = Object.assign({}, column); cloneColumn.title = (0, _util.renderColumnTitle)(column.title, columnTitleProps); if ('children' in cloneColumn) { cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps); } return cloneColumn; }); return finalColumns; }; const useTitleColumns = columnTitleProps => { const filledColumns = React.useCallback(columns => fillTitle(columns, columnTitleProps), [columnTitleProps]); return [filledColumns]; }; var _default = exports["default"] = useTitleColumns; /***/ }), /***/ "../../../node_modules/antd/lib/table/index.js": /*!*****************************************************!*\ !*** ../../../node_modules/antd/lib/table/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use client"; var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _Table = _interopRequireDefault(__webpack_require__(/*! ./Table */ "../../../node_modules/antd/lib/table/Table.js")); var _default = exports["default"] = _Table.default; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/bordered.js": /*!**************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/bordered.js ***! \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genBorderedStyle = token => { const { componentCls, lineWidth, lineType, tableBorderColor, tableHeaderBg, tablePaddingVertical, tablePaddingHorizontal, calc } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; const getSizeBorderStyle = (size, paddingVertical, paddingHorizontal) => ({ [`&${componentCls}-${size}`]: { [`> ${componentCls}-container`]: { [`> ${componentCls}-content, > ${componentCls}-body`]: { [` > table > tbody > tr > th, > table > tbody > tr > td `]: { [`> ${componentCls}-expanded-row-fixed`]: { margin: `${(0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}` } } } } } }); return { [`${componentCls}-wrapper`]: { [`${componentCls}${componentCls}-bordered`]: Object.assign(Object.assign(Object.assign({ // ============================ Title ============================= [`> ${componentCls}-title`]: { border: tableBorder, borderBottom: 0 }, // ============================ Content ============================ [`> ${componentCls}-container`]: { borderInlineStart: tableBorder, borderTop: tableBorder, [` > ${componentCls}-content, > ${componentCls}-header, > ${componentCls}-body, > ${componentCls}-summary `]: { '> table': { // ============================= Cell ============================= [` > thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td `]: { borderInlineEnd: tableBorder }, // ============================ Header ============================ '> thead': { '> tr:not(:last-child) > th': { borderBottom: tableBorder }, '> tr > th::before': { backgroundColor: 'transparent !important' } }, // Fixed right should provides additional border [` > thead > tr, > tbody > tr, > tfoot > tr `]: { [`> ${componentCls}-cell-fix-right-first::after`]: { borderInlineEnd: tableBorder } }, // ========================== Expandable ========================== [` > tbody > tr > th, > tbody > tr > td `]: { [`> ${componentCls}-expanded-row-fixed`]: { margin: `${(0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`, '&::after': { position: 'absolute', top: 0, insetInlineEnd: lineWidth, bottom: 0, borderInlineEnd: tableBorder, content: '""' } } } } } }, // ============================ Scroll ============================ [`&${componentCls}-scroll-horizontal`]: { [`> ${componentCls}-container > ${componentCls}-body`]: { '> table > tbody': { [` > tr${componentCls}-expanded-row, > tr${componentCls}-placeholder `]: { '> th, > td': { borderInlineEnd: 0 } } } } } }, getSizeBorderStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle)), getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall)), { // ============================ Footer ============================ [`> ${componentCls}-footer`]: { border: tableBorder, borderTop: 0 } }), // ============================ Nested ============================ [`${componentCls}-cell`]: { [`${componentCls}-container:first-child`]: { // :first-child to avoid the case when bordered and title is set borderTop: 0 }, // https://github.com/ant-design/ant-design/issues/35577 '&-scrollbar:not([rowspan])': { boxShadow: `0 ${(0, _cssinjs.unit)(lineWidth)} 0 ${(0, _cssinjs.unit)(lineWidth)} ${tableHeaderBg}` } }, [`${componentCls}-bordered ${componentCls}-cell-scrollbar`]: { borderInlineEnd: tableBorder } } }; }; var _default = exports["default"] = genBorderedStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/ellipsis.js": /*!**************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/ellipsis.js ***! \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _style = __webpack_require__(/*! ../../style */ "../../../node_modules/antd/lib/style/index.js"); const genEllipsisStyle = token => { const { componentCls } = token; return { [`${componentCls}-wrapper`]: { [`${componentCls}-cell-ellipsis`]: Object.assign(Object.assign({}, _style.textEllipsis), { wordBreak: 'keep-all', // Fixed first or last should special process [` &${componentCls}-cell-fix-left-last, &${componentCls}-cell-fix-right-first `]: { overflow: 'visible', [`${componentCls}-cell-content`]: { display: 'block', overflow: 'hidden', textOverflow: 'ellipsis' } }, [`${componentCls}-column-title`]: { overflow: 'hidden', textOverflow: 'ellipsis', wordBreak: 'keep-all' } }) } }; }; var _default = exports["default"] = genEllipsisStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/empty.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/empty.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; // ========================= Placeholder ========================== const genEmptyStyle = token => { const { componentCls } = token; return { [`${componentCls}-wrapper`]: { [`${componentCls}-tbody > tr${componentCls}-placeholder`]: { textAlign: 'center', color: token.colorTextDisabled, [` &:hover > th, &:hover > td, `]: { background: token.colorBgContainer } } } }; }; var _default = exports["default"] = genEmptyStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/expand.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/expand.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _style = __webpack_require__(/*! ../../style */ "../../../node_modules/antd/lib/style/index.js"); const genExpandStyle = token => { const { componentCls, antCls, motionDurationSlow, lineWidth, paddingXS, lineType, tableBorderColor, tableExpandIconBg, tableExpandColumnWidth, borderRadius, tablePaddingVertical, tablePaddingHorizontal, tableExpandedRowBg, paddingXXS, expandIconMarginTop, expandIconSize, expandIconHalfInner, expandIconScale, calc } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; const expandIconLineOffset = calc(paddingXXS).sub(lineWidth).equal(); return { [`${componentCls}-wrapper`]: { [`${componentCls}-expand-icon-col`]: { width: tableExpandColumnWidth }, [`${componentCls}-row-expand-icon-cell`]: { textAlign: 'center', [`${componentCls}-row-expand-icon`]: { display: 'inline-flex', float: 'none', verticalAlign: 'sub' } }, [`${componentCls}-row-indent`]: { height: 1, float: 'left' }, [`${componentCls}-row-expand-icon`]: Object.assign(Object.assign({}, (0, _style.operationUnit)(token)), { position: 'relative', float: 'left', width: expandIconSize, height: expandIconSize, color: 'inherit', lineHeight: (0, _cssinjs.unit)(expandIconSize), background: tableExpandIconBg, border: tableBorder, borderRadius, transform: `scale(${expandIconScale})`, '&:focus, &:hover, &:active': { borderColor: 'currentcolor' }, '&::before, &::after': { position: 'absolute', background: 'currentcolor', transition: `transform ${motionDurationSlow} ease-out`, content: '""' }, '&::before': { top: expandIconHalfInner, insetInlineEnd: expandIconLineOffset, insetInlineStart: expandIconLineOffset, height: lineWidth }, '&::after': { top: expandIconLineOffset, bottom: expandIconLineOffset, insetInlineStart: expandIconHalfInner, width: lineWidth, transform: 'rotate(90deg)' }, // Motion effect '&-collapsed::before': { transform: 'rotate(-180deg)' }, '&-collapsed::after': { transform: 'rotate(0deg)' }, '&-spaced': { '&::before, &::after': { display: 'none', content: 'none' }, background: 'transparent', border: 0, visibility: 'hidden' } }), [`${componentCls}-row-indent + ${componentCls}-row-expand-icon`]: { marginTop: expandIconMarginTop, marginInlineEnd: paddingXS }, [`tr${componentCls}-expanded-row`]: { '&, &:hover': { '> th, > td': { background: tableExpandedRowBg } }, // https://github.com/ant-design/ant-design/issues/25573 [`${antCls}-descriptions-view`]: { display: 'flex', table: { flex: 'auto', width: '100%' } } }, // With fixed [`${componentCls}-expanded-row-fixed`]: { position: 'relative', margin: `${(0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`, padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}` } } }; }; var _default = exports["default"] = genExpandStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/filter.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/filter.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _style = __webpack_require__(/*! ../../style */ "../../../node_modules/antd/lib/style/index.js"); const genFilterStyle = token => { const { componentCls, antCls, iconCls, tableFilterDropdownWidth, tableFilterDropdownSearchWidth, paddingXXS, paddingXS, colorText, lineWidth, lineType, tableBorderColor, headerIconColor, fontSizeSM, tablePaddingHorizontal, borderRadius, motionDurationSlow, colorIcon, colorPrimary, tableHeaderFilterActiveBg, colorTextDisabled, tableFilterDropdownBg, tableFilterDropdownHeight, controlItemBgHover, controlItemBgActive, boxShadowSecondary, filterDropdownMenuBg, calc } = token; const dropdownPrefixCls = `${antCls}-dropdown`; const tableFilterDropdownPrefixCls = `${componentCls}-filter-dropdown`; const treePrefixCls = `${antCls}-tree`; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; return [{ [`${componentCls}-wrapper`]: { [`${componentCls}-filter-column`]: { display: 'flex', justifyContent: 'space-between' }, [`${componentCls}-filter-trigger`]: { position: 'relative', display: 'flex', alignItems: 'center', marginBlock: calc(paddingXXS).mul(-1).equal(), marginInline: `${(0, _cssinjs.unit)(paddingXXS)} ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).div(2).mul(-1).equal())}`, padding: `0 ${(0, _cssinjs.unit)(paddingXXS)}`, color: headerIconColor, fontSize: fontSizeSM, borderRadius, cursor: 'pointer', transition: `all ${motionDurationSlow}`, '&:hover': { color: colorIcon, background: tableHeaderFilterActiveBg }, '&.active': { color: colorPrimary } } } }, { // Dropdown [`${antCls}-dropdown`]: { [tableFilterDropdownPrefixCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), { minWidth: tableFilterDropdownWidth, backgroundColor: tableFilterDropdownBg, borderRadius, boxShadow: boxShadowSecondary, overflow: 'hidden', // Reset menu [`${dropdownPrefixCls}-menu`]: { // https://github.com/ant-design/ant-design/issues/4916 // https://github.com/ant-design/ant-design/issues/19542 maxHeight: tableFilterDropdownHeight, overflowX: 'hidden', border: 0, boxShadow: 'none', borderRadius: 'unset', backgroundColor: filterDropdownMenuBg, '&:empty::after': { display: 'block', padding: `${(0, _cssinjs.unit)(paddingXS)} 0`, color: colorTextDisabled, fontSize: fontSizeSM, textAlign: 'center', content: '"Not Found"' } }, [`${tableFilterDropdownPrefixCls}-tree`]: { paddingBlock: `${(0, _cssinjs.unit)(paddingXS)} 0`, paddingInline: paddingXS, [treePrefixCls]: { padding: 0 }, [`${treePrefixCls}-treenode ${treePrefixCls}-node-content-wrapper:hover`]: { backgroundColor: controlItemBgHover }, [`${treePrefixCls}-treenode-checkbox-checked ${treePrefixCls}-node-content-wrapper`]: { '&, &:hover': { backgroundColor: controlItemBgActive } } }, [`${tableFilterDropdownPrefixCls}-search`]: { padding: paddingXS, borderBottom: tableBorder, '&-input': { input: { minWidth: tableFilterDropdownSearchWidth }, [iconCls]: { color: colorTextDisabled } } }, [`${tableFilterDropdownPrefixCls}-checkall`]: { width: '100%', marginBottom: paddingXXS, marginInlineStart: paddingXXS }, // Operation [`${tableFilterDropdownPrefixCls}-btns`]: { display: 'flex', justifyContent: 'space-between', padding: `${(0, _cssinjs.unit)(calc(paddingXS).sub(lineWidth).equal())} ${(0, _cssinjs.unit)(paddingXS)}`, overflow: 'hidden', borderTop: tableBorder } }) } }, // Dropdown Menu & SubMenu { // submenu of table filter dropdown [`${antCls}-dropdown ${tableFilterDropdownPrefixCls}, ${tableFilterDropdownPrefixCls}-submenu`]: { // Checkbox [`${antCls}-checkbox-wrapper + span`]: { paddingInlineStart: paddingXS, color: colorText }, '> ul': { maxHeight: 'calc(100vh - 130px)', overflowX: 'hidden', overflowY: 'auto' } } }]; }; var _default = exports["default"] = genFilterStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/fixed.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/fixed.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; const genFixedStyle = token => { const { componentCls, lineWidth, colorSplit, motionDurationSlow, zIndexTableFixed, tableBg, zIndexTableSticky, calc } = token; const shadowColor = colorSplit; // Follow style is magic of shadow which should not follow token: return { [`${componentCls}-wrapper`]: { [` ${componentCls}-cell-fix-left, ${componentCls}-cell-fix-right `]: { position: 'sticky !important', zIndex: zIndexTableFixed, background: tableBg }, [` ${componentCls}-cell-fix-left-first::after, ${componentCls}-cell-fix-left-last::after `]: { position: 'absolute', top: 0, right: { _skip_check_: true, value: 0 }, bottom: calc(lineWidth).mul(-1).equal(), width: 30, transform: 'translateX(100%)', transition: `box-shadow ${motionDurationSlow}`, content: '""', pointerEvents: 'none', // fix issues: https://github.com/ant-design/ant-design/issues/54587 willChange: 'transform' }, [`${componentCls}-cell-fix-left-all::after`]: { display: 'none' }, [` ${componentCls}-cell-fix-right-first::after, ${componentCls}-cell-fix-right-last::after `]: { position: 'absolute', top: 0, bottom: calc(lineWidth).mul(-1).equal(), left: { _skip_check_: true, value: 0 }, width: 30, transform: 'translateX(-100%)', transition: `box-shadow ${motionDurationSlow}`, content: '""', pointerEvents: 'none' }, [`${componentCls}-container`]: { position: 'relative', '&::before, &::after': { position: 'absolute', top: 0, bottom: 0, zIndex: calc(zIndexTableSticky).add(1).equal({ unit: false }), width: 30, transition: `box-shadow ${motionDurationSlow}`, content: '""', pointerEvents: 'none' }, '&::before': { insetInlineStart: 0 }, '&::after': { insetInlineEnd: 0 } }, [`${componentCls}-ping-left`]: { [`&:not(${componentCls}-has-fix-left) ${componentCls}-container::before`]: { boxShadow: `inset 10px 0 8px -8px ${shadowColor}` }, [` ${componentCls}-cell-fix-left-first::after, ${componentCls}-cell-fix-left-last::after `]: { boxShadow: `inset 10px 0 8px -8px ${shadowColor}` }, [`${componentCls}-cell-fix-left-last::before`]: { backgroundColor: 'transparent !important' } }, [`${componentCls}-ping-right`]: { [`&:not(${componentCls}-has-fix-right) ${componentCls}-container::after`]: { boxShadow: `inset -10px 0 8px -8px ${shadowColor}` }, [` ${componentCls}-cell-fix-right-first::after, ${componentCls}-cell-fix-right-last::after `]: { boxShadow: `inset -10px 0 8px -8px ${shadowColor}` } }, // Gapped fixed Columns do not show the shadow [`${componentCls}-fixed-column-gapped`]: { [` ${componentCls}-cell-fix-left-first::after, ${componentCls}-cell-fix-left-last::after, ${componentCls}-cell-fix-right-first::after, ${componentCls}-cell-fix-right-last::after `]: { boxShadow: 'none' } } } }; }; var _default = exports["default"] = genFixedStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/index.js": /*!***********************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/index.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareComponentToken = exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); var _fastColor = __webpack_require__(/*! @ant-design/fast-color */ "../../../node_modules/@ant-design/fast-color/es/index.js"); var _style = __webpack_require__(/*! ../../style */ "../../../node_modules/antd/lib/style/index.js"); var _internal = __webpack_require__(/*! ../../theme/internal */ "../../../node_modules/antd/lib/theme/internal.js"); var _bordered = _interopRequireDefault(__webpack_require__(/*! ./bordered */ "../../../node_modules/antd/lib/table/style/bordered.js")); var _ellipsis = _interopRequireDefault(__webpack_require__(/*! ./ellipsis */ "../../../node_modules/antd/lib/table/style/ellipsis.js")); var _empty = _interopRequireDefault(__webpack_require__(/*! ./empty */ "../../../node_modules/antd/lib/table/style/empty.js")); var _expand = _interopRequireDefault(__webpack_require__(/*! ./expand */ "../../../node_modules/antd/lib/table/style/expand.js")); var _filter = _interopRequireDefault(__webpack_require__(/*! ./filter */ "../../../node_modules/antd/lib/table/style/filter.js")); var _fixed = _interopRequireDefault(__webpack_require__(/*! ./fixed */ "../../../node_modules/antd/lib/table/style/fixed.js")); var _pagination = _interopRequireDefault(__webpack_require__(/*! ./pagination */ "../../../node_modules/antd/lib/table/style/pagination.js")); var _radius = _interopRequireDefault(__webpack_require__(/*! ./radius */ "../../../node_modules/antd/lib/table/style/radius.js")); var _rtl = _interopRequireDefault(__webpack_require__(/*! ./rtl */ "../../../node_modules/antd/lib/table/style/rtl.js")); var _selection = _interopRequireDefault(__webpack_require__(/*! ./selection */ "../../../node_modules/antd/lib/table/style/selection.js")); var _size = _interopRequireDefault(__webpack_require__(/*! ./size */ "../../../node_modules/antd/lib/table/style/size.js")); var _sorter = _interopRequireDefault(__webpack_require__(/*! ./sorter */ "../../../node_modules/antd/lib/table/style/sorter.js")); var _sticky = _interopRequireDefault(__webpack_require__(/*! ./sticky */ "../../../node_modules/antd/lib/table/style/sticky.js")); var _summary = _interopRequireDefault(__webpack_require__(/*! ./summary */ "../../../node_modules/antd/lib/table/style/summary.js")); var _virtual = _interopRequireDefault(__webpack_require__(/*! ./virtual */ "../../../node_modules/antd/lib/table/style/virtual.js")); const genTableStyle = token => { const { componentCls, fontWeightStrong, tablePaddingVertical, tablePaddingHorizontal, tableExpandColumnWidth, lineWidth, lineType, tableBorderColor, tableFontSize, tableBg, tableRadius, tableHeaderTextColor, motionDurationMid, tableHeaderBg, tableHeaderCellSplitColor, tableFooterTextColor, tableFooterBg, calc } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; return { [`${componentCls}-wrapper`]: Object.assign(Object.assign({ clear: 'both', maxWidth: '100%', // fix https://github.com/ant-design/ant-design/issues/46177 ['--rc-virtual-list-scrollbar-bg']: token.tableScrollBg }, (0, _style.clearFix)()), { [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), { fontSize: tableFontSize, background: tableBg, borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0`, // https://github.com/ant-design/ant-design/issues/47486 scrollbarColor: `${token.tableScrollThumbBg} ${token.tableScrollBg}` }), // https://github.com/ant-design/ant-design/issues/17611 table: { width: '100%', textAlign: 'start', borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0`, borderCollapse: 'separate', borderSpacing: 0 }, // ============================= Cell ============================== [` ${componentCls}-cell, ${componentCls}-thead > tr > th, ${componentCls}-tbody > tr > th, ${componentCls}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]: { position: 'relative', padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`, overflowWrap: 'break-word' }, // ============================ Title ============================= [`${componentCls}-title`]: { padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}` }, // ============================ Header ============================ [`${componentCls}-thead`]: { [` > tr > th, > tr > td `]: { position: 'relative', color: tableHeaderTextColor, fontWeight: fontWeightStrong, textAlign: 'start', background: tableHeaderBg, borderBottom: tableBorder, transition: `background ${motionDurationMid} ease`, "&[colspan]:not([colspan='1'])": { textAlign: 'center' }, [`&:not(:last-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell):not([colspan])::before`]: { position: 'absolute', top: '50%', insetInlineEnd: 0, width: 1, height: '1.6em', backgroundColor: tableHeaderCellSplitColor, transform: 'translateY(-50%)', transition: `background-color ${motionDurationMid}`, content: '""' } }, '> tr:not(:last-child) > th[colspan]': { borderBottom: 0 } }, // ============================ Body ============================ [`${componentCls}-tbody`]: { '> tr': { '> th, > td': { transition: `background ${motionDurationMid}, border-color ${motionDurationMid}`, borderBottom: tableBorder, // ========================= Nest Table =========================== [` > ${componentCls}-wrapper:only-child, > ${componentCls}-expanded-row-fixed > ${componentCls}-wrapper:only-child `]: { [componentCls]: { marginBlock: (0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal()), marginInline: `${(0, _cssinjs.unit)(calc(tableExpandColumnWidth).sub(tablePaddingHorizontal).equal())} ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`, [`${componentCls}-tbody > tr:last-child > td`]: { borderBottomWidth: 0, '&:first-child, &:last-child': { borderRadius: 0 } } } } }, '> th': { position: 'relative', color: tableHeaderTextColor, fontWeight: fontWeightStrong, textAlign: 'start', background: tableHeaderBg, borderBottom: tableBorder, transition: `background ${motionDurationMid} ease` }, // measure cell styles [`& > ${componentCls}-measure-cell`]: { paddingBlock: `0 !important`, borderBlock: `0 !important`, [`${componentCls}-measure-cell-content`]: { height: 0, overflow: 'hidden', pointerEvents: 'none' } } } }, // ============================ Footer ============================ [`${componentCls}-footer`]: { padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`, color: tableFooterTextColor, background: tableFooterBg } }) }; }; const prepareComponentToken = token => { const { colorFillAlter, colorBgContainer, colorTextHeading, colorFillSecondary, colorFillContent, controlItemBgActive, controlItemBgActiveHover, padding, paddingSM, paddingXS, colorBorderSecondary, borderRadiusLG, controlHeight, colorTextPlaceholder, fontSize, fontSizeSM, lineHeight, lineWidth, colorIcon, colorIconHover, opacityLoading, controlInteractiveSize } = token; const colorFillSecondarySolid = new _fastColor.FastColor(colorFillSecondary).onBackground(colorBgContainer).toHexString(); const colorFillContentSolid = new _fastColor.FastColor(colorFillContent).onBackground(colorBgContainer).toHexString(); const colorFillAlterSolid = new _fastColor.FastColor(colorFillAlter).onBackground(colorBgContainer).toHexString(); const baseColorAction = new _fastColor.FastColor(colorIcon); const baseColorActionHover = new _fastColor.FastColor(colorIconHover); const expandIconHalfInner = controlInteractiveSize / 2 - lineWidth; const expandIconSize = expandIconHalfInner * 2 + lineWidth * 3; return { headerBg: colorFillAlterSolid, headerColor: colorTextHeading, headerSortActiveBg: colorFillSecondarySolid, headerSortHoverBg: colorFillContentSolid, bodySortBg: colorFillAlterSolid, rowHoverBg: colorFillAlterSolid, rowSelectedBg: controlItemBgActive, rowSelectedHoverBg: controlItemBgActiveHover, rowExpandedBg: colorFillAlter, cellPaddingBlock: padding, cellPaddingInline: padding, cellPaddingBlockMD: paddingSM, cellPaddingInlineMD: paddingXS, cellPaddingBlockSM: paddingXS, cellPaddingInlineSM: paddingXS, borderColor: colorBorderSecondary, headerBorderRadius: borderRadiusLG, footerBg: colorFillAlterSolid, footerColor: colorTextHeading, cellFontSize: fontSize, cellFontSizeMD: fontSize, cellFontSizeSM: fontSize, headerSplitColor: colorBorderSecondary, fixedHeaderSortActiveBg: colorFillSecondarySolid, headerFilterHoverBg: colorFillContent, filterDropdownMenuBg: colorBgContainer, filterDropdownBg: colorBgContainer, expandIconBg: colorBgContainer, selectionColumnWidth: controlHeight, stickyScrollBarBg: colorTextPlaceholder, stickyScrollBarBorderRadius: 100, expandIconMarginTop: (fontSize * lineHeight - lineWidth * 3) / 2 - Math.ceil((fontSizeSM * 1.4 - lineWidth * 3) / 2), headerIconColor: baseColorAction.clone().setA(baseColorAction.a * opacityLoading).toRgbString(), headerIconHoverColor: baseColorActionHover.clone().setA(baseColorActionHover.a * opacityLoading).toRgbString(), expandIconHalfInner, expandIconSize, expandIconScale: controlInteractiveSize / expandIconSize }; }; exports.prepareComponentToken = prepareComponentToken; const zIndexTableFixed = 2; // ============================== Export ============================== var _default = exports["default"] = (0, _internal.genStyleHooks)('Table', token => { const { colorTextHeading, colorSplit, colorBgContainer, controlInteractiveSize: checkboxSize, headerBg, headerColor, headerSortActiveBg, headerSortHoverBg, bodySortBg, rowHoverBg, rowSelectedBg, rowSelectedHoverBg, rowExpandedBg, cellPaddingBlock, cellPaddingInline, cellPaddingBlockMD, cellPaddingInlineMD, cellPaddingBlockSM, cellPaddingInlineSM, borderColor, footerBg, footerColor, headerBorderRadius, cellFontSize, cellFontSizeMD, cellFontSizeSM, headerSplitColor, fixedHeaderSortActiveBg, headerFilterHoverBg, filterDropdownBg, expandIconBg, selectionColumnWidth, stickyScrollBarBg, calc } = token; const tableToken = (0, _internal.mergeToken)(token, { tableFontSize: cellFontSize, tableBg: colorBgContainer, tableRadius: headerBorderRadius, tablePaddingVertical: cellPaddingBlock, tablePaddingHorizontal: cellPaddingInline, tablePaddingVerticalMiddle: cellPaddingBlockMD, tablePaddingHorizontalMiddle: cellPaddingInlineMD, tablePaddingVerticalSmall: cellPaddingBlockSM, tablePaddingHorizontalSmall: cellPaddingInlineSM, tableBorderColor: borderColor, tableHeaderTextColor: headerColor, tableHeaderBg: headerBg, tableFooterTextColor: footerColor, tableFooterBg: footerBg, tableHeaderCellSplitColor: headerSplitColor, tableHeaderSortBg: headerSortActiveBg, tableHeaderSortHoverBg: headerSortHoverBg, tableBodySortBg: bodySortBg, tableFixedHeaderSortActiveBg: fixedHeaderSortActiveBg, tableHeaderFilterActiveBg: headerFilterHoverBg, tableFilterDropdownBg: filterDropdownBg, tableRowHoverBg: rowHoverBg, tableSelectedRowBg: rowSelectedBg, tableSelectedRowHoverBg: rowSelectedHoverBg, zIndexTableFixed, zIndexTableSticky: calc(zIndexTableFixed).add(1).equal({ unit: false }), tableFontSizeMiddle: cellFontSizeMD, tableFontSizeSmall: cellFontSizeSM, tableSelectionColumnWidth: selectionColumnWidth, tableExpandIconBg: expandIconBg, tableExpandColumnWidth: calc(checkboxSize).add(calc(token.padding).mul(2)).equal(), tableExpandedRowBg: rowExpandedBg, // Dropdown tableFilterDropdownWidth: 120, tableFilterDropdownHeight: 264, tableFilterDropdownSearchWidth: 140, // Virtual Scroll Bar tableScrollThumbSize: 8, // Mac scroll bar size tableScrollThumbBg: stickyScrollBarBg, tableScrollThumbBgHover: colorTextHeading, tableScrollBg: colorSplit }); return [genTableStyle(tableToken), (0, _pagination.default)(tableToken), (0, _summary.default)(tableToken), (0, _sorter.default)(tableToken), (0, _filter.default)(tableToken), (0, _bordered.default)(tableToken), (0, _radius.default)(tableToken), (0, _expand.default)(tableToken), (0, _summary.default)(tableToken), (0, _empty.default)(tableToken), (0, _selection.default)(tableToken), (0, _fixed.default)(tableToken), (0, _sticky.default)(tableToken), (0, _ellipsis.default)(tableToken), (0, _size.default)(tableToken), (0, _rtl.default)(tableToken), (0, _virtual.default)(tableToken)]; }, prepareComponentToken, { unitless: { expandIconScale: true } }); /***/ }), /***/ "../../../node_modules/antd/lib/table/style/pagination.js": /*!****************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/pagination.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genPaginationStyle = token => { const { componentCls, antCls, margin } = token; return { [`${componentCls}-wrapper ${componentCls}-pagination${antCls}-pagination`]: { margin: `${(0, _cssinjs.unit)(margin)} 0` } }; }; var _default = exports["default"] = genPaginationStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/radius.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/radius.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genRadiusStyle = token => { const { componentCls, tableRadius } = token; return { [`${componentCls}-wrapper`]: { [componentCls]: { // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574 [`${componentCls}-title, ${componentCls}-header`]: { borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0` }, [`${componentCls}-title + ${componentCls}-container`]: { borderStartStartRadius: 0, borderStartEndRadius: 0, // https://github.com/ant-design/ant-design/issues/41975 [`${componentCls}-header, table`]: { borderRadius: 0 }, 'table > thead > tr:first-child': { 'th:first-child, th:last-child, td:first-child, td:last-child': { borderRadius: 0 } } }, '&-container': { borderStartStartRadius: tableRadius, borderStartEndRadius: tableRadius, 'table > thead > tr:first-child': { '> *:first-child': { borderStartStartRadius: tableRadius }, '> *:last-child': { borderStartEndRadius: tableRadius } } }, '&-footer': { borderRadius: `0 0 ${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)}` } } } }; }; var _default = exports["default"] = genRadiusStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/rtl.js": /*!*********************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/rtl.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; const genStyle = token => { const { componentCls } = token; return { [`${componentCls}-wrapper-rtl`]: { direction: 'rtl', table: { direction: 'rtl' }, [`${componentCls}-pagination-left`]: { justifyContent: 'flex-end' }, [`${componentCls}-pagination-right`]: { justifyContent: 'flex-start' }, [`${componentCls}-row-expand-icon`]: { float: 'right', '&::after': { transform: 'rotate(-90deg)' }, '&-collapsed::before': { transform: 'rotate(180deg)' }, '&-collapsed::after': { transform: 'rotate(0deg)' } }, [`${componentCls}-container`]: { '&::before': { insetInlineStart: 'unset', insetInlineEnd: 0 }, '&::after': { insetInlineStart: 0, insetInlineEnd: 'unset' }, [`${componentCls}-row-indent`]: { float: 'right' } } } }; }; var _default = exports["default"] = genStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/selection.js": /*!***************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/selection.js ***! \***************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genSelectionStyle = token => { const { componentCls, antCls, iconCls, fontSizeIcon, padding, paddingXS, headerIconColor, headerIconHoverColor, tableSelectionColumnWidth, tableSelectedRowBg, tableSelectedRowHoverBg, tableRowHoverBg, tablePaddingHorizontal, calc } = token; return { [`${componentCls}-wrapper`]: { // ========================== Selections ========================== [`${componentCls}-selection-col`]: { width: tableSelectionColumnWidth, [`&${componentCls}-selection-col-with-dropdown`]: { width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).equal() } }, [`${componentCls}-bordered ${componentCls}-selection-col`]: { width: calc(tableSelectionColumnWidth).add(calc(paddingXS).mul(2)).equal(), [`&${componentCls}-selection-col-with-dropdown`]: { width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).add(calc(paddingXS).mul(2)).equal() } }, [` table tr th${componentCls}-selection-column, table tr td${componentCls}-selection-column, ${componentCls}-selection-column `]: { paddingInlineEnd: token.paddingXS, paddingInlineStart: token.paddingXS, textAlign: 'center', [`${antCls}-radio-wrapper`]: { marginInlineEnd: 0 } }, [`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: { zIndex: calc(token.zIndexTableFixed).add(1).equal({ unit: false }) }, [`table tr th${componentCls}-selection-column::after`]: { backgroundColor: 'transparent !important' }, [`${componentCls}-selection`]: { position: 'relative', display: 'inline-flex', flexDirection: 'column' }, [`${componentCls}-selection-extra`]: { position: 'absolute', top: 0, zIndex: 1, cursor: 'pointer', transition: `all ${token.motionDurationSlow}`, marginInlineStart: '100%', paddingInlineStart: (0, _cssinjs.unit)(calc(tablePaddingHorizontal).div(4).equal()), [iconCls]: { color: headerIconColor, fontSize: fontSizeIcon, verticalAlign: 'baseline', '&:hover': { color: headerIconHoverColor } } }, // ============================= Rows ============================= [`${componentCls}-tbody`]: { [`${componentCls}-row`]: { [`&${componentCls}-row-selected`]: { [`> ${componentCls}-cell`]: { background: tableSelectedRowBg, '&-row-hover': { background: tableSelectedRowHoverBg } } }, [`> ${componentCls}-cell-row-hover`]: { background: tableRowHoverBg } } } } }; }; var _default = exports["default"] = genSelectionStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/size.js": /*!**********************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/size.js ***! \**********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genSizeStyle = token => { const { componentCls, tableExpandColumnWidth, calc } = token; const getSizeStyle = (size, paddingVertical, paddingHorizontal, fontSize) => ({ [`${componentCls}${componentCls}-${size}`]: { fontSize, [` ${componentCls}-title, ${componentCls}-footer, ${componentCls}-cell, ${componentCls}-thead > tr > th, ${componentCls}-tbody > tr > th, ${componentCls}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]: { padding: `${(0, _cssinjs.unit)(paddingVertical)} ${(0, _cssinjs.unit)(paddingHorizontal)}` }, [`${componentCls}-filter-trigger`]: { marginInlineEnd: (0, _cssinjs.unit)(calc(paddingHorizontal).div(2).mul(-1).equal()) }, [`${componentCls}-expanded-row-fixed`]: { margin: `${(0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}` }, [`${componentCls}-tbody`]: { // ========================= Nest Table =========================== [`${componentCls}-wrapper:only-child ${componentCls}`]: { marginBlock: (0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal()), marginInline: `${(0, _cssinjs.unit)(calc(tableExpandColumnWidth).sub(paddingHorizontal).equal())} ${(0, _cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}` } }, // https://github.com/ant-design/ant-design/issues/35167 [`${componentCls}-selection-extra`]: { paddingInlineStart: (0, _cssinjs.unit)(calc(paddingHorizontal).div(4).equal()) } } }); return { [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall)) }; }; var _default = exports["default"] = genSizeStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/sorter.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/sorter.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; const genSorterStyle = token => { const { componentCls, marginXXS, fontSizeIcon, headerIconColor, headerIconHoverColor } = token; return { [`${componentCls}-wrapper`]: { [`${componentCls}-thead th${componentCls}-column-has-sorters`]: { outline: 'none', cursor: 'pointer', // why left 0s? Avoid column header move with transition when left is changed // https://github.com/ant-design/ant-design/issues/50588 transition: `all ${token.motionDurationSlow}, left 0s`, '&:hover': { background: token.tableHeaderSortHoverBg, '&::before': { backgroundColor: 'transparent !important' } }, '&:focus-visible': { color: token.colorPrimary }, // https://github.com/ant-design/ant-design/issues/30969 [` &${componentCls}-cell-fix-left:hover, &${componentCls}-cell-fix-right:hover `]: { background: token.tableFixedHeaderSortActiveBg } }, [`${componentCls}-thead th${componentCls}-column-sort`]: { background: token.tableHeaderSortBg, '&::before': { backgroundColor: 'transparent !important' } }, [`td${componentCls}-column-sort`]: { background: token.tableBodySortBg }, [`${componentCls}-column-title`]: { position: 'relative', zIndex: 1, flex: 1, minWidth: 0 }, [`${componentCls}-column-sorters`]: { display: 'flex', flex: 'auto', alignItems: 'center', justifyContent: 'space-between', '&::after': { position: 'absolute', inset: 0, width: '100%', height: '100%', content: '""' } }, [`${componentCls}-column-sorters-tooltip-target-sorter`]: { '&::after': { content: 'none' } }, [`${componentCls}-column-sorter`]: { marginInlineStart: marginXXS, color: headerIconColor, fontSize: 0, transition: `color ${token.motionDurationSlow}`, '&-inner': { display: 'inline-flex', flexDirection: 'column', alignItems: 'center' }, '&-up, &-down': { fontSize: fontSizeIcon, '&.active': { color: token.colorPrimary } }, [`${componentCls}-column-sorter-up + ${componentCls}-column-sorter-down`]: { marginTop: '-0.3em' } }, [`${componentCls}-column-sorters:hover ${componentCls}-column-sorter`]: { color: headerIconHoverColor } } }; }; var _default = exports["default"] = genSorterStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/sticky.js": /*!************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/sticky.js ***! \************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genStickyStyle = token => { const { componentCls, opacityLoading, tableScrollThumbBg, tableScrollThumbBgHover, tableScrollThumbSize, tableScrollBg, zIndexTableSticky, stickyScrollBarBorderRadius, lineWidth, lineType, tableBorderColor } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; return { [`${componentCls}-wrapper`]: { [`${componentCls}-sticky`]: { '&-holder': { position: 'sticky', zIndex: zIndexTableSticky, background: token.colorBgContainer }, '&-scroll': { position: 'sticky', bottom: 0, height: `${(0, _cssinjs.unit)(tableScrollThumbSize)} !important`, zIndex: zIndexTableSticky, display: 'flex', alignItems: 'center', background: tableScrollBg, borderTop: tableBorder, opacity: opacityLoading, '&:hover': { transformOrigin: 'center bottom' }, // fake scrollbar style of sticky '&-bar': { height: tableScrollThumbSize, backgroundColor: tableScrollThumbBg, borderRadius: stickyScrollBarBorderRadius, transition: `all ${token.motionDurationSlow}, transform 0s`, position: 'absolute', bottom: 0, '&:hover, &-active': { backgroundColor: tableScrollThumbBgHover } } } } } }; }; var _default = exports["default"] = genStickyStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/summary.js": /*!*************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/summary.js ***! \*************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genSummaryStyle = token => { const { componentCls, lineWidth, tableBorderColor, calc } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${token.lineType} ${tableBorderColor}`; return { [`${componentCls}-wrapper`]: { [`${componentCls}-summary`]: { position: 'relative', zIndex: token.zIndexTableFixed, background: token.tableBg, '> tr': { '> th, > td': { borderBottom: tableBorder } } }, [`div${componentCls}-summary`]: { boxShadow: `0 ${(0, _cssinjs.unit)(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}` } } }; }; var _default = exports["default"] = genSummaryStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/style/virtual.js": /*!*************************************************************!*\ !*** ../../../node_modules/antd/lib/table/style/virtual.js ***! \*************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _cssinjs = __webpack_require__(/*! @ant-design/cssinjs */ "../../../node_modules/@ant-design/cssinjs/es/index.js"); const genVirtualStyle = token => { const { componentCls, motionDurationMid, lineWidth, lineType, tableBorderColor, calc } = token; const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`; const rowCellCls = `${componentCls}-expanded-row-cell`; return { [`${componentCls}-wrapper`]: { // ========================== Row ========================== [`${componentCls}-tbody-virtual`]: { [`${componentCls}-tbody-virtual-holder-inner`]: { [` & > ${componentCls}-row, & > div:not(${componentCls}-row) > ${componentCls}-row `]: { display: 'flex', boxSizing: 'border-box', width: '100%' } }, [`${componentCls}-cell`]: { borderBottom: tableBorder, transition: `background ${motionDurationMid}` }, [`${componentCls}-expanded-row`]: { [`${rowCellCls}${rowCellCls}-fixed`]: { position: 'sticky', insetInlineStart: 0, overflow: 'hidden', width: `calc(var(--virtual-width) - ${(0, _cssinjs.unit)(lineWidth)})`, borderInlineEnd: 'none' } } }, // ======================== Border ========================= [`${componentCls}-bordered`]: { [`${componentCls}-tbody-virtual`]: { '&:after': { content: '""', insetInline: 0, bottom: 0, borderBottom: tableBorder, position: 'absolute' }, [`${componentCls}-cell`]: { borderInlineEnd: tableBorder, [`&${componentCls}-cell-fix-right-first:before`]: { content: '""', position: 'absolute', insetBlock: 0, insetInlineStart: calc(lineWidth).mul(-1).equal(), borderInlineStart: tableBorder } } }, // Empty placeholder [`&${componentCls}-virtual`]: { [`${componentCls}-placeholder ${componentCls}-cell`]: { borderInlineEnd: tableBorder, borderBottom: tableBorder } } } } }; }; var _default = exports["default"] = genVirtualStyle; /***/ }), /***/ "../../../node_modules/antd/lib/table/util.js": /*!****************************************************!*\ !*** ../../../node_modules/antd/lib/table/util.js ***! \****************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getColumnKey = void 0; exports.getColumnPos = getColumnPos; exports.safeColumnTitle = exports.renderColumnTitle = void 0; const getColumnKey = (column, defaultKey) => { if ('key' in column && column.key !== undefined && column.key !== null) { return column.key; } if (column.dataIndex) { return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex; } return defaultKey; }; exports.getColumnKey = getColumnKey; function getColumnPos(index, pos) { return pos ? `${pos}-${index}` : `${index}`; } const renderColumnTitle = (title, props) => { if (typeof title === 'function') { return title(props); } return title; }; /** * Safe get column title * * Should filter [object Object] * * @param title */ exports.renderColumnTitle = renderColumnTitle; const safeColumnTitle = (title, props) => { const res = renderColumnTitle(title, props); if (Object.prototype.toString.call(res) === '[object Object]') { return ''; } return res; }; exports.safeColumnTitle = safeColumnTitle; /***/ }), /***/ "../../../node_modules/antd/lib/tabs/TabPane.js": /*!******************************************************!*\ !*** ../../../node_modules/antd/lib/tabs/TabPane.js ***! \******************************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; const TabPane = () => null; if (true) { TabPane.displayName = 'DeprecatedTabPane'; } var _default = exports["default"] = TabPane; /***/ }) }]); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianMvdmVuZG9ycy1ub2RlX21vZHVsZXNfYW50ZF9saWJfc3R5bGVfY29tcGFjdC1pdGVtLXZlcnRpY2FsX2pzLW5vZGVfbW9kdWxlc19hbnRkX2xpYl9zdHlsZV9jb21wLTNhMzI4NC52b2x1bnRlZXJhcGkuNWNlODRmMDQzZDkyNzM5NTg2MjAuYnVuZGxlLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFhOztBQUViLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLG1DQUFtQztBQUNuQztBQUNBO0FBQ0E7QUFDQSxtQkFBbUIsVUFBVTtBQUM3QjtBQUNBLEtBQUs7QUFDTCxtQkFBbUIsVUFBVTtBQUM3QjtBQUNBLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQSxPQUFPO0FBQ1A7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG1CQUFtQixVQUFVLG1CQUFtQixVQUFVO0FBQzFEO0FBQ0EsS0FBSztBQUNMLGNBQWMsVUFBVSxrQkFBa0IsVUFBVTtBQUNwRCxjQUFjLFVBQVUsUUFBUSxVQUFVO0FBQzFDO0FBQ0E7QUFDQTtBQUNB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gICAgICAnJi1wbGFjZW1lbnQtdG9wTGVmdCc6IHtcbiAgICAgICAgJy0tYXJyb3ctb2Zmc2V0LWhvcml6b250YWwnOiBhcnJvd09mZnNldEhvcml6b250YWwsXG4gICAgICAgIFtgPiAke2NvbXBvbmVudENsc30tYXJyb3dgXToge1xuICAgICAgICAgIGxlZnQ6IHtcbiAgICAgICAgICAgIF9za2lwX2NoZWNrXzogdHJ1ZSxcbiAgICAgICAgICAgIHZhbHVlOiBhcnJvd09mZnNldEhvcml6b250YWxcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAnJi1wbGFjZW1lbnQtdG9wUmlnaHQnOiB7XG4gICAgICAgICctLWFycm93LW9mZnNldC1ob3Jpem9udGFsJzogYGNhbGMoMTAwJSAtICR7KDAsIF9jc3NpbmpzLnVuaXQpKGFycm93T2Zmc2V0SG9yaXpvbnRhbCl9KWAsXG4gICAgICAgIFtgPiAke2NvbXBvbmVudENsc30tYXJyb3dgXToge1xuICAgICAgICAgIHJpZ2h0OiB7XG4gICAgICAgICAgICBfc2tpcF9jaGVja186IHRydWUsXG4gICAgICAgICAgICB2YWx1ZTogYXJyb3dPZmZzZXRIb3Jpem9udGFsXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSkpLCBpc0luamVjdCghIWFycm93UGxhY2VtZW50LmJvdHRvbSwge1xuICAgICAgW1tgJi1wbGFjZW1lbnQtYm90dG9tID4gJHtjb21wb25lbnRDbHN9LWFycm93YCwgYCYtcGxhY2VtZW50LWJvdHRvbUxlZnQgPiAke2NvbXBvbmVudENsc30tYXJyb3dgLCBgJi1wbGFjZW1lbnQtYm90dG9tUmlnaHQgPiAke2NvbXBvbmVudENsc30tYXJyb3dgXS5qb2luKCcsJyldOiB7XG4gICAgICAgIHRvcDogYXJyb3dEaXN0YW5jZSxcbiAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlWSgtMTAwJSlgXG4gICAgICB9LFxu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0gPSBtZXJnZWRFeHBhbmRhYmxlO1xuICBjb25zdCBleHBhbmRUeXBlID0gUmVhY3QudXNlTWVtbygoKSA9PiB7XG4gICAgaWYgKHJhd0RhdGEuc29tZShpdGVtID0+IGl0ZW0gPT09IG51bGwgfHwgaXRlbSA9PT0gdm9pZCAwID8gdm9pZCAwIDogaXRlbVtjaGlsZHJlbkNvbHVtbk5hbWVdKSkge1xuICAgICAgcmV0dXJuICduZXN0JztcbiAgICB9XG4gICAgaWYgKGV4cGFuZGVkUm93UmVuZGVyIHx8IChleHBhbmRhYmxlID09PSBudWxsIHx8IGV4cGFuZGFibGUgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGV4cGFuZGFibGUuZXhwYW5kZWRSb3dSZW5kZXIpKSB7XG4gICAgICByZXR1cm4gJ3Jvdyc7XG4gICAgfVxuICAgIHJldHVybiBudWxsO1xuICB9LCBbcmF3RGF0YV0pO1xuICBjb25zdCBpbnRlcm5hbFJlZnMgPSB7XG4gICAgYm9keTogUmVhY3QudXNlUmVmKG51bGwpXG4gIH07XG4gIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gV2lkdGggPT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgY29uc3QgZ2V0Q29udGFpbmVyV2lkdGggPSAoMCwgX3VzZUNvbnRhaW5lcldpZHRoLmRlZmF1bHQpKHByZWZpeENscyk7XG4gIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09IFJlZnMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgY29uc3Qgcm9vdFJlZiA9IFJlYWN0LnVzZVJlZihudWxsKTtcbiAgY29uc3QgdGJsUmVmID0gUmVhY3QudXNlUmVmKG51bGwpO1xuICAoMCwgX2hvb2tzLnVzZVByb3h5SW1wZXJhdGl2ZUhhbmRsZSkocmVmLCAoKSA9PiBPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sIHRibFJlZi5jdXJyZW50KSwge1xuICAgIG5hdGl2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l9OT05FXSA6IHNlbGVjdGlvbnM7XG4gICAgcmV0dXJuIHNlbGVjdGlvbkxpc3QubWFwKHNlbGVjdGlvbiA9PiB7XG4gICAgICBpZiAoc2VsZWN0aW9uID09PSBTRUxFQ1RJT05fQUxMKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAga2V5OiAnYWxsJyxcbiAgICAgICAgICB0ZXh0OiB0YWJsZUxvY2FsZS5zZWxlY3Rpb25BbGwsXG4gICAgICAgICAgb25TZWxlY3QoKSB7XG4gICAgICAgICAgICBzZXRTZWxlY3RlZEtleXMoZGF0YS5tYXAoKHJlY29yZCwgaW5kZXgpID0+IGdldFJvd0tleShyZWNvcmQsIGluZGV4KSkuZmlsdGVyKGtleSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IGNoZWNrUHJvcHMgPSBjaGVja2JveFByb3BzTWFwLmdldChrZXkpO1xuICAgICAgICAgICAgICByZXR1cm4gIShjaGVja1Byb3BzID09PSBudWxsIHx8IGNoZWNrUHJvcHMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGNoZWNrUHJvcHMuZGlzYWJsZWQpIHx8IGRlcml2ZWRTZWxlY3RlZEtleVNldC5oYXMoa2V5KTtcbiAgICAgICAgICAgIH0pLCAnYWxsJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgaWYgKHNlbGVjdGlvbiA9PT0gU0VMRUNUSU9OX0lOVkVSVCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGtleTogJ2ludmVydCcsXG4gICAgICAgICAgdGV4dDogdGFibGVMb2NhbGUuc2VsZWN0SW52ZXJ0LFxuICAgICAgICAgIG9uU2VsZWN0KCkge1xuICAgICAgICAgICAgY29uc3Qga2V5U2V0ID0gbmV3IFNldChkZXJpdmVkU2VsZWN0ZWRLZXlTZXQpO1xuICAgICAgICAgICAgcGFnZURhdGEuZm9yRWFjaCgocmVjb3JkLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCBrZXkgPSBnZXRSb3dLZXkocmVjb3JkLCBpbmRleCk7XG4gICAgICAgICAgICAgIGNvbnN0IGNoZWNrUHJvcHMgPSBjaGVja2JveFByb3BzTWFwLmdldChrZXkpO1xuICAgICAgICAgICAgICBpZiAoIShjaGVja1Byb3BzID09PSBudWxsIHx8IGNoZWNrUHJvcHMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGNoZWNrUHJvcHMuZGlzYWJsZWQpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGtleVNldC5oYXMoa2V5KSkge1xuICAgICAgICAgICAgICAgICAga2V5U2V0LmRlbGV0ZShrZXkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBrZXlTZXQuYWRkKGtleSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNvbnN0IGtleXMgPSBBcnJheS5mcm9tKGtleVNldCk7XG4gICAgICAgICAgICBpZiAob25TZWxlY3RJbnZlcnQpIHtcbiAgICAgICAgICAgICAgd2FybmluZy5kZXByZWNhdGVkKGZhbHNlLCAnb25TZWxlY3RJbnZlcnQnLCAnb25DaGFuZ2UnKTtcbiAgICAgICAgICAgICAgb25TZWxlY3RJbnZlcnQoa2V5cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzZXRTZWxlY3RlZEtleXMoa2V5cywgJ2ludmVydCcpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIGlmIChzZWxlY3Rpb24gPT09IFNFTEVDVElPTl9OT05FKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAga2V5OiAnbm9uZScsXG4gICAgICAgICAgdGV4dDogdGFibGVMb2NhbGUuc2VsZWN0Tm9uZSxcbiAgICAgICAgICBvblNlbGVjdCgpIHtcbiAgICAgICAgICAgIG9uU2VsZWN0Tm9uZSA9PT0gbn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09PT09PT09PT09PT09PT1cbiAgICAvLyBUaXRsZSBDZWxsXG4gICAgbGV0IHRpdGxlO1xuICAgIGxldCBjb2x1bW5UaXRsZUNoZWNrYm94O1xuICAgIGlmIChzZWxlY3Rpb25UeXBlICE9PSAncmFkaW8nKSB7XG4gICAgICBsZXQgY3VzdG9taXplU2VsZWN0aW9ucztcbiAgICAgIGlmIChtZXJnZWRTZWxlY3Rpb25zKSB7XG4gICAgICAgIGNvbnN0IG1lbnUgPSB7XG4gICAgICAgICAgZ2V0UG9wdXBDb250YWluZXIsXG4gICAgICAgICAgaXRlbXM6IG1lcmdlZFNlbGVjdGlvbnMubWFwKChzZWxlY3Rpb24sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgb25TZWxlY3Q6IG9uU2VsZWN0aW9uQ2xpY2tcbiAgICAgICAgICAgIH0gPSBzZWxlY3Rpb247XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICBrZXk6IGtleSAhPT0gbnVsbCAmJiBrZXkgIT09IHZvaWQgMCA/IGtleSA6IGluZGV4LFxuICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgb25TZWxlY3Rpb25DbGljayA9PT0gbnVsbCB8fCBvblNlbGVjdGlvbkNsaWNrID09PSB2b2lkIDAgPyB2b2lkIDAgOiBvblNlbGVjdGlvbkNsaWNrKHJlY29yZEtleXMpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBsYWJlbDogdGV4dFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9KVxuICAgICAgICB9O1xuICAgICAgICBjdXN0b21pemVTZWxlY3Rpb25zID0gLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1xuICAgICAgICAgIGNsYXNzTmFtZTogYCR7cHJlZml4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LmFzc2lnbih7fSwgY2hlY2tib3hQcm9wcywge1xuICAgICAgICAgICAgY2hlY2tlZDogY2hlY2tlZCxcbiAgICAgICAgICAgIG9uQ2xpY2s6IGUgPT4ge1xuICAgICAgICAgICAgICB2YXIgX2E7XG4gICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgIChfYSA9IGNoZWNrYm94UHJvcHMgPT09IG51bGwgfHwgY2hlY2tib3hQcm9wcyA9PT0gdm9pZCAwID8gdm9pZCAwIDogY2hlY2tib3hQcm9wcy5vbkNsaWNrKSA9PT0gbnVsbCB8fCBfYSA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2EuY2FsbChjaGVja2JveFByb3BzLCBlKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbkNoYW5nZTogZXZlbnQgPT4ge1xuICAgICAgICAgICAgICB2YXIgX2E7XG4gICAgICAgICAgICAgIGlmICgha2V5U2V0LmhhcyhrZXkpKSB7XG4gICAgICAgICAgICAgICAgdHJpZ2dlclNpbmdsZVNlbGVjdGlvbihrZXksIHRydWUsIFtrZXldLCBldmVudC5uYXRpdmVFdmVudCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgKF9hID0gY2hlY2tib3hQcm9wcyA9PT0gbnVsbCB8fCBjaGVja2JveFByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjaGVja2JveFByb3BzLm9uQ2hhbmdlKSA9PT0gbnVsbCB8fCBfYSA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2EuY2FsbChjaGVja2JveFByb3BzLCBldmVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSkpKSxcbiAgICAgICAgICBjaGVja2VkXG4gICAgICAgIH07XG4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICByZW5kZXJDZWxsID0gKF8sIHJlY29yZCwgaW5kZXgpID0+IHtcbiAgICAgICAgdmFyIF9hO1xuICAgICAgICBjb25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AgICAgIH1cbiAgICAgICAgLy8gUmVjb3JkIGNoZWNrZWRcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBub2RlOiAoLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoX2NoZWNrYm94LmRlZmF1bHQsIE9iamVjdC5hc3NpZ24oe30sIGNoZWNrYm94UHJvcHMsIHtcbiAgICAgICAgICAgIGluZGV0ZXJtaW5hdGU6IG1lcmdlZEluZGV0ZXJtaW5hdGUsXG4gICAgICAgICAgICBjaGVja2VkOiBjaGVja2VkLFxuICAgICAgICAgICAgc2tpcEdyb3VwOiB0cnVlLFxuICAgICAgICAgICAgb25DbGljazogZSA9PiB7XG4gICAgICAgICAgICAgIHZhciBfYTtcbiAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgKF9hID0gY2hlY2tib3hQcm9wcyA9PT0gbnVsbCB8fCBjaGVja2JveFByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjaGVja2JveFByb3BzLm9uQ2xpY2spID09PSBudWxsIHx8IF9hID09PSB2b2lkIDAgPyB2b2lkIDAgOiBfYS5jYWxsKGNoZWNrYm94UHJvcHMsIGUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiBldmVudCA9PiB7XG4gICAgICAgICAgICAgIHZhciBfYTtcbiAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgIG5hdGl2ZUV2ZW50XG4gICAgICAgICAgICAgIH0gPSBldmVudDtcbiAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgIHNoaWZ0S2V5XG4gICAgICAgICAgICAgIH0gPSBuYXRpdmVFdmVudDtcbiAgICAgICAgICAgICAgY29uc3QgY3VycmVudFNlbGVjdGVkSW5kZXggPSByZWNvcmRLZXlzLmluZGV4T2Yoa2V5KTtcbiAgICAgICAgICAgICAgY29uc3QgaXNNdWx0aXBsZSA9IGRlcml2ZWRTZWxlY3RlZEtleXMuc29tZShpdGVtID0+IHJlY29yZEtleXMuaW5jbHVkZXMoaXRlbSkpO1xuICAgICAgICAgICAgICBpZiAoc2hpZnRLZXkgJiYgY2hlY2tTdHJpY3RseSAmJiBpc011bHRpcGxlKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY2hhbmdlZEtleXMgPSBtdWx0aXBsZVNlbGVjdChjdXJyZW50U2VsZWN0ZWRJbmRleCwgcmVjb3JkS2V5cywga2V5U2V0KTtcbiAgICAgICAgICAgICAgICBjb25zdCBrZXlzID0gQXJyYXkuZnJvbShrZXlTZXQpO1xuICAgICAgICAgICAgICAgIG9uU2VsZWN0TXVsdGlwbGUgPT09IG51bGwgfHwgb25TZWxlY3RNdWx0aXBsZSA9PT0gdm9pZCAwID8gdm9pZCAwIDogb25TZWxlY3RNdWx0aXBsZSghY2hlY2tlZCwga2V5cy5tYXAocmVjb3JkS2V5ID0+IGdldFJlY29yZEJ5S2V5KHJlY29yZEtleSkpLCBjaGFuZ2VkS2V5cy5tYXAocmVjb3JkS2V5ID0+IGdldFJlY29yZEJ5S2V5KHJlY29yZEtleSkpKTtcbiAgICAgICAgICAgICAgICBzZXRTZWxlY3RlZEtleXMoa2V5cywgJ211bHRpcGxlJyk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gU2luZ2xlIHJlY29yZCBzZWxlY3RlZFxuICAgICAgICAgICAgICAgIGNvbnN0IG9yaWdpbkNoZWNrZWRLZXlzID0gZGVyaXZlZFNlbGVjdGVkS2V5cztcbiAgICAgICAgICAgICAgICBpZiAoY2hlY2tTdHJpY3RseSkge1xuICAgICAgICAgICAgICAgICAgY29uc3QgY2hlY2tlZEtleXMgPSBjaGVja2VkID8gKDAsIF91dGlsLmFyckRlbCkob3JpZ2luQ2hlY2tlZEtleXMsIGtleSkgOiAoMCwgX3V0aWwuYXJyQWRkKShvcmlnaW5DaGVja2VkS2V5cywga2V5KTtcbiAgICAgICAgICAgICAgICAgIHRyaWdnZXJTaW5nbGVTZWxlY3Rpb24oa2V5LCAhY2hlY2tlZCwgY2hlY2tlZEtleXMsIG5hdGl2ZUV2ZW50KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgLy8gQWx3YXlzIGZpbGwgZmlyc3RcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9ICgwLCBfY29uZHVjdFV0aWwuY29uZHVjdENoZWNrKShbXS5jb25jYXQoKDAsIF90b0NvbnN1bWFibGVBcnJheTIuZGVmYXVsdCkob3JpZ2luQ2hlY2tlZEtleXMpLCBba2V5XSksIHRydWUsIGtleUVudGl0aWVzLCBpc0NoZWNrYm94RGlzYWJsZWQpO1xuICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICBjaGVja2VkS2V5cyxcbiAgICAgICAgICAgICAgICAgICAgaGFsZkNoZWNrZWRLZXlzXG4gICAgICAgICAgICAgICAgICB9ID0gcmVzdWx0O1xuICAgICAgICAgICAgICAgICAgbGV0IG5leHRDaGVja2VkS2V5cyA9IGNoZWNrZWRLZXlzO1xuICAgICAgICAgICAgICAgICAgLy8gSWYgcmVtb3ZlLCB3ZSBkbyBpdCBhZ2FpbiB0byBjb3JyZWN0aW9uXG4gICAgICAgICAgICAgICAgICBpZiAoY2hlY2tlZCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZW1wS2V5U2V0ID0gbmV3IFNldChjaGVja2VkS2V5cyk7XG4gICAgICAgICAgICAgICAgICAgIHRlbXBLZXlTZXQuZGVsZXRlKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIG5leHRDaGVja2VkS2V5cyA9ICgwLCBfY29uZHVjdFV0aWwuY29uZHVjdENoZWNrKShBcnJheS5mcm9tKHRlbXBLZXlTZXQpLCB7XG4gICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgaGFsZkNoZWNrZWRLZXlzXG4gICAgICAgICAgICAgICAgICAgIH0sIGtleUVudGl0aWVzLCBpc0NoZWNrYm94RGlzYWJsZWQpLmNoZWNrZWRLZXlzO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgdHJpZ2dlclNpbmdsZVNlbGVjdGlvbihrZXksICFjaGVja2VkLCBuZXh0Q2hlY2tlZEtleXMsIG5hdGl2ZUV2ZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKGNoZWNrZWQpIHtcbiAgICAgICAgICAgICAgICB1cGRhdGVQcmV2U2VsZWN0ZWRJbmRleChudWxsKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB1cGRhdGVQcmV2U2VsZWN0ZWRJbmRleChjdXJyZW50U2VsZWN0ZWRJbmRleCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgKF9hID0gY2hlY2tib3hQcm9wcyA9PT0gbnVsbCB8fCBjaGVja2JveFByb3BzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjaGVja2JveFByb3BzLm9uQ2hhbmdlKSA9PT0gbnVsbCB8fCBfYSA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2EuY2FsbChjaGVja2JveFByb3BzLCBldmVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSkpKSxcbiAgICAgICAgICBjaGVja2VkXG4gICAgICAgIH07XG4gICAgICB9O1xuICAgIH1cbiAgICBjb25zdCByZW5kZXJTZWxlY3Rpb25DZWxsID0gKF8sIHJlY29yZCwgaW5kZXgpID0+IHtcbiAgICAgIGNvbnN0IHtcbiAgICAgICAgbm9kZSxcbiAgICAgICAgY2hlY2tlZFxuICAgICAgfSA9IHJlbmRlckNlbGwoXywgcmVjb3JkLCBpbmRleCk7XG4gICAgICBpZiAoY3VzdG9taXplUmVuZGVyQ2VsbCkge1x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N0LmNyZWF0ZUVsZW1lbnQoX3Rvb2x0aXAuZGVmYXVsdCwgT2JqZWN0LmFzc2lnbih7fSwgdG9vbHRpcFByb3BzKSwgcmVuZGVyU29ydFRpdGxlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHJlbmRlclNvcnRUaXRsZTtcbiAgICAgICAgfSxcbiAgICAgICAgb25IZWFkZXJDZWxsOiBjb2wgPT4ge1xuICAgICAgICAgIHZhciBfYTtcbiAgICAgICAgICBjb25zdCBjZWxsID0gKChfYSA9IGNvbHVtbi5vbkhlYWRlckNlbGwpID09PSBudWxsIHx8IF9hID09PSB2b2lkIDAgPyB2b2lkIDAgOiBfYS5jYWxsKGNvbHVtbiwgY29sKSkgfHwge307XG4gICAgICAgICAgY29uc3Qgb3JpZ2luT25DbGljayA9IGNlbGwub25DbGljaztcbiAgICAgICAgICBjb25zdCBvcmlnaW5PS2V5RG93biA9IGNlbGwub25LZXlEb3duO1xuICAgICAgICAgIGNlbGwub25DbGljayA9IGV2ZW50ID0+IHtcbiAgICAgICAgICAgIHRyaWdnZXJTb3J0ZXIoe1xuICAgICAgICAgICAgICBjb2x1bW4sXG4gICAgICAgICAgICAgIGtleTogY29sdW1uS2V5LFxuICAgICAgICAgICAgICBzb3J0T3JkZXI6IG5leHRTb3J0T3JkZXIsXG4gICAgICAgICAgICAgIG11bHRpcGxlUHJpb3JpdHk6IGdldE11bHRpcGxlUHJpb3JpdHkoY29sdW1uKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBvcmlnaW5PbkNsaWNrID09PSBudWxsIHx8IG9yaWdpbk9uQ2xpY2sgPT09IHZvaWQgMCA/IHZvaWQgMCA6IG9yaWdpbk9uQ2xpY2soZXZlbnQpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgY2VsbC5vbktleURvd24gPSBldmVudCA9PiB7XG4gICAgICAgICAgICBpZiAoZXZlbnQua2V5Q29kZSA9PT0gX0tleUNvZGUuZGVmYXVsdC5FTlR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J9YDtcbiAgY29uc3QgZ2V0U2l6ZUJvcmRlclN0eWxlID0gKHNpemUsIHBhZGRpbmdWZXJ0aWNhbCwgcGFkZGluZ0hvcml6b250YWwpID0+ICh7XG4gICAgW2AmJHtjb21wb25lbnRDbHN9LSR7c2l6ZX1gXToge1xuICAgICAgW2A+ICR7Y29tcG9uZW50Q2xzfS1jb250YWluZXJgXToge1xuICAgICAgICBbYD4gJHtjb21wb25lbnRDbHN9LWNvbnRlbnQsID4gJHtjb21wb25lbnRDbHN9LWJvZHlgXToge1xuICAgICAgICAgIFtgXG4gICAgICAgICAgICA+IHRhYmxlID4gdGJvZHkgPiB0ciA+IHRoLFxuICAgICAgICAgICAgPiB0YWJsZSA+IHRib2R5ID4gdHIgPiB0ZFxuICAgICAgICAgIGBdOiB7XG4gICAgICAgICAgICBbYD4gJHtjb21wb25lbnRDbHN9LWV4cGFuZGVkLXJvdy1maXhlZGBdOiB7XG4gICAgICAgICAgICAgIG1hcmdpbjogYCR7KDAsIF9jc3NpbmpzLnVuaXQpKGNhbGMocGFkZGluZ1ZlcnRpY2FsKS5tdWwoLTEpLmVxdWFsKCkpfVxuICAgICAgICAgICAgICAkeygwLCBfY3NzaW5qcy51bml0KShjYWxjKGNhbGMocGFkZGluZ0hvcml6b250YWwpLmFkZChsaW5lV2lkdGgpKS5tdWwoLTEpLmVxdWFsKCkpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0pO1xuICByZXR1cm4ge1xuICAgIFtgJHtjb21wb25lbnRDbHN9LXdyYXBwZXJgXToge1xuICAgICAgW2Ake2NvbXBvbmVudENsc30ke2NvbXBvbmVudENsc30tYm9yZGVyZWRgXTogT2JqZWN0LmFzc2lnbihPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe1xuICAgICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09IFRpdGxlID09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICAgIFtgPiAke2NvbXBvbmVudENsc30tdGl0bGVgXToge1xuICAgICAgICAgIGJvcmRlcjogdGFibGVCb3JkZXIsXG4gICAgICAgICAgYm9yZGVyQm90dG9tOiAwXG4gICAgICAgIH0sXG4gICAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gQ29udGVudCA9PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICAgIFtgPiAke2NvbXBvbmVudENsc30tY29udGFpbmVyYF06IHtcbiAgICAgICAgICBib3JkZXJJbmxpbmVTdGFydDogdGFibGVCb3JkZXIsXG4gICAgICAgICAgYm9yZGVyVG9wOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICBbYFxuICAgICAgICAgICAgPiAke2NvbXBvbmVudENsc30tY29udGVudCxcbiAgICAgICAgICAgID4gJHtjb21wb25lbnRDbHN9LWhlYWRlcixcbiAgICAgICAgICAgID4gJHtjb21wb25lbnRDbHN9LWJvZHksXG4gICAgICAgICAgICA+ICR7Y29tcG9uZW50Q2xzfS1zdW1tYXJ5XG4gICAgICAgICAgYF06IHtcbiAgICAgICAgICAgICc+IHRhYmxlJzoge1xuICAgICAgICAgICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBDZWxsID09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICAgICAgICAgIFtgXG4gICAgICAgICAgICAgICAgPiB0aGVhZCA+IHRyID4gdGgsXG4gICAgICAgICAgICAgICAgPiB0aGVhZCA+IHRyID4gdGQsXG4gICAgICAgICAgICAgICAgPiB0Ym9keSA+IHRyID4gdGgsXG4gICAgICAgICAgICAgICAgPiB0Ym9keSA+IHRyID4gdGQsXG4gICAgICAgICAgICAgICAgPiB0Zm9vdCA+IHRyID4gdGgsXG4gICAgICAgICAgICAgICAgPiB0Zm9vdCA+IHRyID4gdGRcbiAgICAgICAgICAgICAgYF06IHtcbiAgICAgICAgICAgICAgICBib3JkZXJJbmxpbmVFbmQ6IHRhYmxlQm9yZGVyXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gSGVhZGVyID09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgICAgICAgICAgJz4gdGhlYWQnOiB7XG4gICAgICAgICAgICAgICAgJz4gdHI6bm90KDpsYXN0LWNoaWxkKSA+IHRoJzoge1xuICAgICAgICAgICAgICAgICAgYm9yZGVyQm90dG9tOiB0YWJsZUJvcmRlclxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgJz4gdHIgPiB0aDo6YmVmb3JlJzoge1xuICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiAndHJhbnNwYXJlbnQgIWltcG9ydGFudCdcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIC8vIEZpeGVkIHJpZ2h0IHNob3VsZCBwcm92aWRlcyBhZGRpdGlvbmFsIGJvcmRlclxuICAgICAgICAgICAgICBbYFxuICAgICAgICAgICAgICAgID4gdGhlYWQgPiB0cixcbiAgICAgICAgICAgICAgICA+IHRib2R5ID4gdHIsXG4gICAgICAgICAgICAgICAgPiB0Zm9vdCA+IHRyXG4gICAgICAgICAgICAgIGBdOiB7XG4gICAgICAgICAgICAgICAgW2A+ICR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1yaWdodC1maXJzdDo6YWZ0ZXJgXToge1xuICAgICAgICAgICAgICAgICAgYm9yZGVySW5saW5lRW5kOiB0YWJsZUJvcmRlclxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT0gRXhwYW5kYWJsZSA9PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgICAgICAgICAgICBbYFxuICAgICAgICAgICAgICAgID4gdGJvZHkgPiB0ciA+IHRoLFxuICAgICAgICAgICAgICAgID4gdGJvZHkgPiB0ciA+IHRkXG4gICAgICAgICAgICAgIGBdOiB7XG4gICAgICAgICAgICAgICAgW2A+ICR7Y29tcG9uZW50Q2xzfS1leHBhbmRlZC1yb3ctZml4ZWRgXToge1xuICAgICAgICAgICAgICAgICAgbWFyZ2luOiBgJHsoMCwgX2Nzc2luanMudW5pdCkoY2FsYyh0YWJsZVBhZGRpbmdWZXJ0aWNhbCkubXVsKC0xKS5lcXVhbCgpKX0gJHsoMCwgX2Nzc2luanMudW5pdCkoY2FsYyhjYWxjKHRhYmxlUGFkZGluZ0hvcml6b250YWwpLmFkZChsaW5lV2lkdGgpKS5tdWwoLTEpLmVxdWFsKCkpfWAsXG4gICAgICAgICAgICAgICAgICAnJjo6YWZ0ZXInOiB7XG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgICAgIGluc2V0SW5saW5lRW5kOiBsaW5lV2lkdGgsXG4gICAgICAgICAgICAgICAgICAgIGJvdHRvbTogMCxcbiAgICAgICAgICAgICAgICAgICAgYm9yZGVySW5saW5lRW5kOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICAgICAgICAgICAgY29udGVudDogJ1wiXCInXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09IFNjcm9sbCA9PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICAgIFtgJiR7Y29tcG9uZW50Q2xzfS1zY3JvbGwtaG9yaXpvbnRhbGBdOiB7XG4gICAgICAgICAgW2A+ICR7Y29tcG9uZW50Q2xzfS1jb250YWluZXIgPiAke2NvbXBvbmVudENsc30tYm9keWBdOiB7XG4gICAgICAgICAgICAnPiB0YWJsZSA+IHRib2R5Jzoge1xuICAgICAgICAgICAgICBbYFxuICAgICAgICAgICAgICAgID4gdHIke2NvbXBvbmVudENsc30tZXhwYW5kZWQtcm93LFxuICAgICAgICAgICAgICAgID4gdHIke2NvbXBvbmVudENsc30tcGxhY2Vob2xkZXJcbiAgICAgICAgICAgICAgYF06IHtcbiAgICAgICAgICAgICAgICAnPiB0aCwgPiB0ZCc6IHtcbiAgICAgICAgICAgICAgICAgIGJvcmRlcklubGluZUVuZDogMFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSwgZ2V0U2l6ZUJvcmRlclN0eWxlKCdtaWRkbGUnLCB0b2tlbi50YWJsZVBhZGRpbmdWZXJ0aWNhbE1pZGRsZSwgdG9rZW4udGFibGVQYWRkaW5nSG9yaXpvbnRhbE1pZGRsZSkpLCBnZXRTaXplQm9yZGVyU3R5bGUoJ3NtYWxsJywgdG9rZW4udGFibGVQYWRkaW5nVmVydGljYWxTbWFsbCwgdG9rZW4udGFibGVQYWRkaW5nSG9yaXpvbnRhbFNtYWxsKSksIHtcbiAgICAgICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBGb290ZXIgPT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgICAgICBbYD4gJHtjb21wb25lbnRDbHN9LWZvb3RlcmBdOiB7XG4gICAgICAgICAgYm9yZGVyOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICBib3JkZXJUb3A6IDBcbiAgICAgICAgfVxuICAgICAgfSksXG4gICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09IE5lc3RlZCA9PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1jZWxsYF06IHtcbiAgICAgICAgW2Ake2NvbXBvbmVudENsc30tY29udGFpbmVyOmZpcnN0LWNoaWxkYF06IHtcbiAgICAgICAgIC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nLFxuICAgICAgICAgIGJhY2tncm91bmQ6ICdjdXJyZW50Y29sb3InLFxuICAgICAgICAgIHRyYW5zaXRpb246IGB0cmFuc2Zvcm0gJHttb3Rpb25EdXJhdGlvblNsb3d9IGVhc2Utb3V0YCxcbiAgICAgICAgICBjb250ZW50OiAnXCJcIidcbiAgICAgICAgfSxcbiAgICAgICAgJyY6OmJlZm9yZSc6IHtcbiAgICAgICAgICB0b3A6IGV4cGFuZEljb25IYWxmSW5uZXIsXG4gICAgICAgICAgaW5zZXRJbmxpbmVFbmQ6IGV4cGFuZEljb25MaW5lT2Zmc2V0LFxuICAgICAgICAgIGluc2V0SW5saW5lU3RhcnQ6IGV4cGFuZEljb25MaW5lT2Zmc2V0LFxuICAgICAgICAgIGhlaWdodDogbGluZVdpZHRoXG4gICAgICAgIH0sXG4gICAgICAgICcmOjphZnRlcic6IHtcbiAgICAgICAgICB0b3A6IGV4cGFuZEljb25MaW5lT2Zmc2V0LFxuICAgICAgICAgIGJvdHRvbTogZXhwYW5kSWNvbkxpbmVPZmZzZXQsXG4gICAgICAgICAgaW5zZXRJbmxpbmVTdGFydDogZXhwYW5kSWNvbkhhbGZJbm5lcixcbiAgICAgICAgICB3aWR0aDogbGluZVdpZHRoLFxuICAgICAgICAgIHRyYW5zZm9ybTogJ3JvdGF0ZSg5MGRlZyknXG4gICAgICAgIH0sXG4gICAgICAgIC8vIE1vdGlvbiBlZmZlY3RcbiAgICAgICAgJyYtY29sbGFwc2VkOjpiZWZvcmUnOiB7XG4gICAgICAgICAgdHJhbnNmb3JtOiAncm90YXRlKC0xODBkZWcpJ1xuICAgICAgICB9LFxuICAgICAgICAnJi1jb2xsYXBzZWQ6OmFmdGVyJzoge1xuICAgICAgICAgIHRyYW5zZm9ybTogJ3JvdGF0ZSgwZGVnKSdcbiAgICAgICAgfSxcbiAgICAgICAgJyYtc3BhY2VkJzoge1xuICAgICAgICAgICcmOjpiZWZvcmUsICY6OmFmdGVyJzoge1xuICAgICAgICAgICAgZGlzcGxheTogJ25vbmUnLFxuICAgICAgICAgICAgY29udGVudDogJ25vbmUnXG4gICAgICAgICAgfSxcbiAgICAgICAgICBiYWNrZ3JvdW5kOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICAgIGJvcmRlcjogMCxcbiAgICAgICAgICB2aXNpYmlsaXR5OiAnaGlkZGVuJ1xuICAgICAgICB9XG4gICAgICB9KSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXJvdy1pbmRlbnQgKyAke2NvbXBvbmVudENsc30tcm93LWV4cGFuZC1pY29uYF06IHtcbiAgICAgICAgbWFyZ2luVG9wOiBleHBhbmRJY29uTWFyZ2luVG9wLFxuICAgICAgICBtYXJnaW5JbmxpbmVFbmQ6IHBhZGRpbmdYU1xuICAgICAgfSxcbiAgICAgIFtgdHIke2NvbXBvbmVudENsc30tZXhwYW5kZWQtcm93YF06IHtcbiAgICAgICAgJyYsICY6aG92ZXInOiB7XG4gICAgICAgICAgJz4gdGgsID4gdGQnOiB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0YWJsZUV4cGFuZGVkUm93QmdcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbnQtZGVzaWduL2FudC1kZXNpZ24vaXNzdWVzLzI1NTczXG4gICAgICAgIFtgJHthbnRDbHN9LWRlc2NyaXB0aW9ucy12aWV3YF06IHtcbiAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXG4gICAgICAgICAgdGFibGU6IHtcbiAgICAgICAgICAgIGZsZXg6ICdhdXRvJyxcbiAgICAgICAgICAgIHdpZHRoOiAnMTAwJSdcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAvLyBXaXRoIGZpeGVkXG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1leHBhbmRlZC1yb3ctZml4ZWRgXToge1xuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcb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Zm9udFNpemVTTSxcbiAgICAgICAgICAgIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gICAgICAgICAgICBjb250ZW50OiAnXCJOb3QgRm91bmRcIidcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIFtgJHt0YWJsZUZpbHRlckRyb3Bkb3duUHJlZml4Q2xzfS10cmVlYF06IHtcbiAgICAgICAgICBwYWRkaW5nQmxvY2s6IGAkeygwLCBfY3NzaW5qcy51bml0KShwYWRkaW5nWFMpfSAwYCxcbiAgICAgICAgICBwYWRkaW5nSW5saW5lOiBwYWRkaW5nWFMsXG4gICAgICAgICAgW3RyZWVQcmVmaXhDbHNdOiB7XG4gICAgICAgICAgICBwYWRkaW5nOiAwXG4gICAgICAgICAgfSxcbiAgICAgICAgICBbYCR7dHJlZVByZWZpeENsc30tdHJlZW5vZGUgJHt0cmVlUHJlZml4Q2xzfS1ub2RlLWNvbnRlbnQtd3JhcHBlcjpob3ZlcmBdOiB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IGNvbnRyb2xJdGVtQmdIb3ZlclxuICAgICAgICAgIH0sXG4gICAgICAgICAgW2Ake3RyZWVQcmVmaXhDbHN9LXRyZWVub2RlLWNoZWNrYm94LWNoZWNrZWQgJHt0cmVlUHJlZml4Q2xzfS1ub2RlLWNvbnRlbnQtd3JhcHBlcmBdOiB7XG4gICAgICAgICAgICAnJiwgJjpob3Zlcic6IHtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiBjb250cm9sSXRlbUJnQWN0aXZlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBbYCR7dGFibGVGaWx0ZXJEcm9wZG93blByZWZpeENsc30tc2VhcmNoYF06IHtcbiAgICAgICAgICBwYWRkaW5nOiBwYWRkaW5nWFMsXG4gICAgICAgICAgYm9yZGVyQm90dG9tOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICAnJi1pbnB1dCc6IHtcbiAgICAgICAgICAgIGlucHV0OiB7XG4gICAgICAgICAgICAgIG1pbldpZHRoOiB0YWJsZUZpbHRlckRyb3Bkb3duU2VhcmNoV2lkdGhcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbaWNvbkNsc106IHtcbiAgICAgICAgICAgICAgY29sb3I6IGNvbG9yVGV4dERpc2FibGVkXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBbYCR7dGFibGVGaWx0ZXJEcm9wZG93blByZWZpeENsc30tY2hlY2thbGxgXToge1xuICAgICAgICAgIHdpZHRoOiAnMTAwJScsXG4gICAgICAgICAgbWFyZ2luQm90dG9tOiBwYWRkaW5nWFhTLFxuICAgICAgICAgIG1hcmdpbklubGluZVN0YXJ0OiBwYWRkaW5nWFhTXG4gICAgICAgIH0sXG4gICAgICAgIC8vIE9wZXJhdGlvblxuICAgICAgICBbYCR7dGFibGVGaWx0ZXJEcm9wZG93blByZWZpeENsc30tYnRuc2BdOiB7XG4gICAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnc3BhY2UtYmV0d2VlbicsXG4gICAgICAgICAgcGFkZGluZzogYCR7KDAsIF9jc3NpbmpzLnVuaXQpKGNhbGMocGFkZGluZ1hTKS5zdWIobGluZVdpZHRoKS5lcXVhbCgpKX0gJHsoMCwgX2Nzc2luanMudW5pdCkocGFkZGluZ1hTKX1gLFxuICAgICAgICAgIG92ZXJmbG93OiAnaGlkZGVuJyxcbiAgICAgICAgICBib3JkZXJUb3A6IHRhYmxlQm9yZGVyXG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgfVxuICB9LFxuICAvLyBEcm9wZG93biBNZW51ICYgU3ViTWVudVxuICB7XG4gICAgLy8gc3VibWVudSBvZiB0YWJsZSBmaWx0ZXIgZHJvcGRvd25cbiAgICBbYCR7YW50Q2xzfS1kcm9wZG93biAke3RhYmxlRmlsdGVyRHJvc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IHdpbGxDaGFuZ2U6ICd0cmFuc2Zvcm0nXG4gICAgICB9LFxuICAgICAgW2Ake2NvbXBvbmVudENsc30tY2VsbC1maXgtbGVmdC1hbGw6OmFmdGVyYF06IHtcbiAgICAgICAgZGlzcGxheTogJ25vbmUnXG4gICAgICB9LFxuICAgICAgW2BcbiAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LXJpZ2h0LWZpcnN0OjphZnRlcixcbiAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LXJpZ2h0LWxhc3Q6OmFmdGVyXG4gICAgICBgXToge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgdG9wOiAwLFxuICAgICAgICBib3R0b206IGNhbGMobGluZVdpZHRoKS5tdWwoLTEpLmVxdWFsKCksXG4gICAgICAgIGxlZnQ6IHtcbiAgICAgICAgICBfc2tpcF9jaGVja186IHRydWUsXG4gICAgICAgICAgdmFsdWU6IDBcbiAgICAgICAgfSxcbiAgICAgICAgd2lkdGg6IDMwLFxuICAgICAgICB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC0xMDAlKScsXG4gICAgICAgIHRyYW5zaXRpb246IGBib3gtc2hhZG93ICR7bW90aW9uRHVyYXRpb25TbG93fWAsXG4gICAgICAgIGNvbnRlbnQ6ICdcIlwiJyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnXG4gICAgICB9LFxuICAgICAgW2Ake2NvbXBvbmVudENsc30tY29udGFpbmVyYF06IHtcbiAgICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAgICcmOjpiZWZvcmUsICY6OmFmdGVyJzoge1xuICAgICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICAgIHRvcDogMCxcbiAgICAgICAgICBib3R0b206IDAsXG4gICAgICAgICAgekluZGV4OiBjYWxjKHpJbmRleFRhYmxlU3RpY2t5KS5hZGQoMSkuZXF1YWwoe1xuICAgICAgICAgICAgdW5pdDogZmFsc2VcbiAgICAgICAgICB9KSxcbiAgICAgICAgICB3aWR0aDogMzAsXG4gICAgICAgICAgdHJhbnNpdGlvbjogYGJveC1zaGFkb3cgJHttb3Rpb25EdXJhdGlvblNsb3d9YCxcbiAgICAgICAgICBjb250ZW50OiAnXCJcIicsXG4gICAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnXG4gICAgICAgIH0sXG4gICAgICAgICcmOjpiZWZvcmUnOiB7XG4gICAgICAgICAgaW5zZXRJbmxpbmVTdGFydDogMFxuICAgICAgICB9LFxuICAgICAgICAnJjo6YWZ0ZXInOiB7XG4gICAgICAgICAgaW5zZXRJbmxpbmVFbmQ6IDBcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXBpbmctbGVmdGBdOiB7XG4gICAgICAgIFtgJjpub3QoJHtjb21wb25lbnRDbHN9LWhhcy1maXgtbGVmdCkgJHtjb21wb25lbnRDbHN9LWNvbnRhaW5lcjo6YmVmb3JlYF06IHtcbiAgICAgICAgICBib3hTaGFkb3c6IGBpbnNldCAxMHB4IDAgOHB4IC04cHggJHtzaGFkb3dDb2xvcn1gXG4gICAgICAgIH0sXG4gICAgICAgIFtgXG4gICAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LWxlZnQtZmlyc3Q6OmFmdGVyLFxuICAgICAgICAgICR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1sZWZ0LWxhc3Q6OmFmdGVyXG4gICAgICAgIGBdOiB7XG4gICAgICAgICAgYm94U2hhZG93OiBgaW5zZXQgMTBweCAwIDhweCAtOHB4ICR7c2hhZG93Q29sb3J9YFxuICAgICAgICB9LFxuICAgICAgICBbYCR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1sZWZ0LWxhc3Q6OmJlZm9yZWBdOiB7XG4gICAgICAgICAgYmFja2dyb3VuZENvbG9yOiAndHJhbnNwYXJlbnQgIWltcG9ydGFudCdcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXBpbmctcmlnaHRgXToge1xuICAgICAgICBbYCY6bm90KCR7Y29tcG9uZW50Q2xzfS1oYXMtZml4LXJpZ2h0KSAke2NvbXBvbmVudENsc30tY29udGFpbmVyOjphZnRlcmBdOiB7XG4gICAgICAgICAgYm94U2hhZG93OiBgaW5zZXQgLTEwcHggMCA4cHggLThweCAke3NoYWRvd0NvbG9yfWBcbiAgICAgICAgfSxcbiAgICAgICAgW2BcbiAgICAgICAgICAke2NvbXBvbmVudENsc30tY2VsbC1maXgtcmlnaHQtZmlyc3Q6OmFmdGVyLFxuICAgICAgICAgICR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1yaWdodC1sYXN0OjphZnRlclxuICAgICAgICBgXToge1xuICAgICAgICAgIGJveFNoYWRvdzogYGluc2V0IC0xMHB4IDAgOHB4IC04cHggJHtzaGFkb3dDb2xvcn1gXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAvLyBHYXBwZWQgZml4ZWQgQ29sdW1ucyBkbyBub3Qgc2hvdyB0aGUgc2hhZG93XG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1maXhlZC1jb2x1bW4tZ2FwcGVkYF06IHtcbiAgICAgICAgW2BcbiAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LWxlZnQtZmlyc3Q6OmFmdGVyLFxuICAgICAgICAke2NvbXBvbmVudENsc30tY2VsbC1maXgtbGVmdC1sYXN0OjphZnRlcixcbiAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LXJpZ2h0LWZpcnN0OjphZnRlcixcbiAgICAgICAgJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LXJpZ2h0LWxhc3Q6OmFmdGVyXG4gICAgICBgXToge1xuICAgICAgICAgIGJveFNoYWRvdzogJ25vbmUnXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH07XG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clJhZGl1czogYCR7KDAsIF9jc3NpbmpzLnVuaXQpKHRhYmxlUmFkaXVzKX0gJHsoMCwgX2Nzc2luanMudW5pdCkodGFibGVSYWRpdXMpfSAwIDBgLFxuICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW50LWRlc2lnbi9hbnQtZGVzaWduL2lzc3Vlcy80NzQ4NlxuICAgICAgICBzY3JvbGxiYXJDb2xvcjogYCR7dG9rZW4udGFibGVTY3JvbGxUaHVtYkJnfSAke3Rva2VuLnRhYmxlU2Nyb2xsQmd9YFxuICAgICAgfSksXG4gICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW50LWRlc2lnbi9hbnQtZGVzaWduL2lzc3Vlcy8xNzYxMVxuICAgICAgdGFibGU6IHtcbiAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgdGV4dEFsaWduOiAnc3RhcnQnLFxuICAgICAgICBib3JkZXJSYWRpdXM6IGAkeygwLCBfY3NzaW5qcy51bml0KSh0YWJsZVJhZGl1cyl9ICR7KDAsIF9jc3NpbmpzLnVuaXQpKHRhYmxlUmFkaXVzKX0gMCAwYCxcbiAgICAgICAgYm9yZGVyQ29sbGFwc2U6ICdzZXBhcmF0ZScsXG4gICAgICAgIGJvcmRlclNwYWNpbmc6IDBcbiAgICAgIH0sXG4gICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBDZWxsID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgICAgW2BcbiAgICAgICAgICAke2NvbXBvbmVudENsc30tY2VsbCxcbiAgICAgICAgICAke2NvbXBvbmVudENsc30tdGhlYWQgPiB0ciA+IHRoLFxuICAgICAgICAgICR7Y29tcG9uZW50Q2xzfS10Ym9keSA+IHRyID4gdGgsXG4gICAgICAgICAgJHtjb21wb25lbnRDbHN9LXRib2R5ID4gdHIgPiB0ZCxcbiAgICAgICAgICB0Zm9vdCA+IHRyID4gdGgsXG4gICAgICAgICAgdGZvb3QgPiB0ciA+IHRkXG4gICAgICAgIGBdOiB7XG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICBwYWRkaW5nOiBgJHsoMCwgX2Nzc2luanMudW5pdCkodGFibGVQYWRkaW5nVmVydGljYWwpfSAkeygwLCBfY3NzaW5qcy51bml0KSh0YWJsZVBhZGRpbmdIb3Jpem9udGFsKX1gLFxuICAgICAgICBvdmVyZmxvd1dyYXA6ICdicmVhay13b3JkJ1xuICAgICAgfSxcbiAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gVGl0bGUgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRpdGxlYF06IHtcbiAgICAgICAgcGFkZGluZzogYCR7KDAsIF9jc3NpbmpzLnVuaXQpKHRhYmxlUGFkZGluZ1ZlcnRpY2FsKX0gJHsoMCwgX2Nzc2luanMudW5pdCkodGFibGVQYWRkaW5nSG9yaXpvbnRhbCl9YFxuICAgICAgfSxcbiAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gSGVhZGVyID09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRoZWFkYF06IHtcbiAgICAgICAgW2BcbiAgICAgICAgICA+IHRyID4gdGgsXG4gICAgICAgICAgPiB0ciA+IHRkXG4gICAgICAgIGBdOiB7XG4gICAgICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAgICAgY29sb3I6IHRhYmxlSGVhZGVyVGV4dENvbG9yLFxuICAgICAgICAgIGZvbnRXZWlnaHQ6IGZvbnRXZWlnaHRTdHJvbmcsXG4gICAgICAgICAgdGV4dEFsaWduOiAnc3RhcnQnLFxuICAgICAgICAgIGJhY2tncm91bmQ6IHRhYmxlSGVhZGVyQmcsXG4gICAgICAgICAgYm9yZGVyQm90dG9tOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICB0cmFuc2l0aW9uOiBgYmFja2dyb3VuZCAke21vdGlvbkR1cmF0aW9uTWlkfSBlYXNlYCxcbiAgICAgICAgICBcIiZbY29sc3Bhbl06bm90KFtjb2xzcGFuPScxJ10pXCI6IHtcbiAgICAgICAgICAgIHRleHRBbGlnbjogJ2NlbnRlcidcbiAgICAgICAgICB9LFxuICAgICAgICAgIFtgJjpub3QoOmxhc3QtY2hpbGQpOm5vdCgke2NvbXBvbmVudENsc30tc2VsZWN0aW9uLWNvbHVtbik6bm90KCR7Y29tcG9uZW50Q2xzfS1yb3ctZXhwYW5kLWljb24tY2VsbCk6bm90KFtjb2xzcGFuXSk6OmJlZm9yZWBdOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgICAgIHRvcDogJzUwJScsXG4gICAgICAgICAgICBpbnNldElubGluZUVuZDogMCxcbiAgICAgICAgICAgIHdpZHRoOiAxLFxuICAgICAgICAgICAgaGVpZ2h0OiAnMS42ZW0nLFxuICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0YWJsZUhlYWRlckNlbGxTcGxpdENvbG9yLFxuICAgICAgICAgICAgdHJhbnNmb3JtOiAndHJhbnNsYXRlWSgtNTAlKScsXG4gICAgICAgICAgICB0cmFuc2l0aW9uOiBgYmFja2dyb3VuZC1jb2xvciAke21vdGlvbkR1cmF0aW9uTWlkfWAsXG4gICAgICAgICAgICBjb250ZW50OiAnXCJcIidcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICc+IHRyOm5vdCg6bGFzdC1jaGlsZCkgPiB0aFtjb2xzcGFuXSc6IHtcbiAgICAgICAgICBib3JkZXJCb3R0b206IDBcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT0gQm9keSA9PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS10Ym9keWBdOiB7XG4gICAgICAgICc+IHRyJzoge1xuICAgICAgICAgICc+IHRoLCA+IHRkJzoge1xuICAgICAgICAgICAgdHJhbnNpdGlvbjogYGJhY2tncm91bmQgJHttb3Rpb25EdXJhdGlvbk1pZH0sIGJvcmRlci1jb2xvciAke21vdGlvbkR1cmF0aW9uTWlkfWAsXG4gICAgICAgICAgICBib3JkZXJCb3R0b206IHRhYmxlQm9yZGVyLFxuICAgICAgICAgICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PSBOZXN0IFRhYmxlID09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICAgICAgICAgICAgW2BcbiAgICAgICAgICAgICAgPiAke2NvbXBvbmVudENsc30td3JhcHBlcjpvbmx5LWNoaWxkLFxuICAgICAgICAgICAgICA+ICR7Y29tcG9uZW50Q2xzfS1leHBhbmRlZC1yb3ctZml4ZWQgPiAke2NvbXBvbmVudENsc30td3JhcHBlcjpvbmx5LWNoaWxkXG4gICAgICAgICAgICBgXToge1xuICAgICAgICAgICAgICBbY29tcG9uZW50Q2xzXToge1xuICAgICAgICAgICAgICAgIG1hcmdpbkJsb2NrOiAoMCwgX2Nzc2luanMudW5pdCkoY2FsYyh0YWJsZVBhZGRpbmdWZXJ0aWNhbCkubXVsKC0xKS5lcXVhbCgpKSxcbiAgICAgICAgICAgICAgICBtYXJnaW5JbmxpbmU6IGAkeygwLCBfY3NzaW5qcy51bml0KShjYWxjKHRhYmxlRXhwYW5kQ29sdW1uV2lkdGgpLnN1Yih0YWJsZVBhZGRpbmdIb3Jpem9udGFsKS5lcXVhbCgpKX1cbiAgICAgICAgICAgICAgICAkeygwLCBfY3NzaW5qcy51bml0KShjYWxjKHRhYmxlUGFkZGluZ0hvcml6b250YWwpLm11bCgtMSkuZXF1YWwoKSl9YCxcbiAgICAgICAgICAgICAgICBbYCR7Y29tcG9uZW50Q2xzfS10Ym9keSA+IHRyOmxhc3QtY2hpbGQgPiB0ZGBdOiB7XG4gICAgICAgICAgICAgICAgICBib3JkZXJCb3R0b21XaWR0aDogMCxcbiAgICAgICAgICAgICAgICAgICcmOmZpcnN0LWNoaWxkLCAmOmxhc3QtY2hpbGQnOiB7XG4gICAgICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1czogMFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sXG4gICAgICAgICAgJz4gdGgnOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgICAgIGNvbG9yOiB0YWJsZUhlYWRlclRleHRDb2xvcixcbiAgICAgICAgICAgIGZvbnRXZWlnaHQ6IGZvbnRXZWlnaHRTdHJvbmcsXG4gICAgICAgICAgICB0ZXh0QWxpZ246ICdzdGFydCcsXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0YWJsZUhlYWRlckJnLFxuICAgICAgICAgICAgYm9yZGVyQm90dG9tOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGBiYWNrZ3JvdW5kICR7bW90aW9uRHVyYXRpb25NaWR9IGVhc2VgXG4gICAgICAgICAgfSxcbiAgICAgICAgICAvLyBtZWFzdXJlIGNlbGwgc3R5bGVzXG4gICAgICAgICAgW2AmID4gJHtjb21wb25lbnRDbHN9LW1lYXN1cmUtY2VsbGBdOiB7XG4gICAgICAgICAgICBwYWRkaW5nQmxvY2s6IGAwICFpbXBvcnRhbnRgLFxuICAgICAgICAgICAgYm9yZGVyQmxvY2s6IGAwICFpbXBvcnRhbnRgLFxuICAgICAgICAgICAgW2Ake2NvbXBvbmVudENsc30tbWVhc3VyZS1jZWxsLWNvbnRlbnRgXToge1xuICAgICAgICAgICAgICBoZWlnaHQ6IDAsXG4gICAgICAgICAgICAgIG92ZXJmbG93OiAnaGlkZGVuJyxcbiAgICAgICAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgf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ICAgICAgdG9wOiAwLFxuICAgICAgICB6SW5kZXg6IDEsXG4gICAgICAgIGN1cnNvcjogJ3BvaW50ZXInLFxuICAgICAgICB0cmFuc2l0aW9uOiBgYWxsICR7dG9rZW4ubW90aW9uRHVyYXRpb25TbG93fWAsXG4gICAgICAgIG1hcmdpbklubGluZVN0YXJ0OiAnMTAwJScsXG4gICAgICAgIHBhZGRpbmdJbmxpbmVTdGFydDogKDAsIF9jc3NpbmpzLnVuaXQpKGNhbGModGFibGVQYWRkaW5nSG9yaXpvbnRhbCkuZGl2KDQpLmVxdWFsKCkpLFxuICAgICAgICBbaWNvbkNsc106IHtcbiAgICAgICAgICBjb2xvcjogaGVhZGVySWNvbkNvbG9yLFxuICAgICAgICAgIGZvbnRTaXplOiBmb250U2l6ZUljb24sXG4gICAgICAgICAgdmVydGljYWxBbGlnbjogJ2Jhc2VsaW5lJyxcbiAgICAgICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgICAgIGNvbG9yOiBoZWFkZXJJY29uSG92ZXJDb2xvclxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIC8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09IFJvd3MgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRib2R5YF06IHtcbiAgICAgICAgW2Ake2NvbXBvbmVudENsc30tcm93YF06IHtcbiAgICAgICAgICBbYCYke2NvbXBvbmVudENsc30tcm93LXNlbGVjdGVkYF06IHtcbiAgICAgICAgICAgIFtgPiAke2NvbXBvbmVudENsc30tY2VsbGBdOiB7XG4gICAgICAgICAgICAgIGJhY2tncm91bmQ6IHRhYmxlU2VsZWN0ZWRSb3dCZyxcbiAgICAgICAgICAgICAgJyYtcm93LWhvdmVyJzoge1xuICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6IHRhYmxlU2VsZWN0ZWRSb3dIb3ZlckJnXG4gICAgICAgICAgICAgIH1cbiAg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XNpYmxlJzoge1xuICAgICAgICAgIGNvbG9yOiB0b2tlbi5jb2xvclByaW1hcnlcbiAgICAgICAgfSxcbiAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL2FudC1kZXNpZ24vYW50LWRlc2lnbi9pc3N1ZXMvMzA5NjlcbiAgICAgICAgW2BcbiAgICAgICAgICAmJHtjb21wb25lbnRDbHN9LWNlbGwtZml4LWxlZnQ6aG92ZXIsXG4gICAgICAgICAgJiR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1yaWdodDpob3ZlclxuICAgICAgICBgXToge1xuICAgICAgICAgIGJhY2tncm91bmQ6IHRva2VuLnRhYmxlRml4ZWRIZWFkZXJTb3J0QWN0aXZlQmdcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRoZWFkIHRoJHtjb21wb25lbnRDbHN9LWNvbHVtbi1zb3J0YF06IHtcbiAgICAgICAgYmFja2dyb3VuZDogdG9rZW4udGFibGVIZWFkZXJTb3J0QmcsXG4gICAgICAgICcmOjpiZWZvcmUnOiB7XG4gICAgICAgICAgYmFja2dyb3VuZENvbG9yOiAndHJhbnNwYXJlbnQgIWltcG9ydGFudCdcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgdGQke2NvbXBvbmVudENsc30tY29sdW1uLXNvcnRgXToge1xuICAgICAgICBiYWNrZ3JvdW5kOiB0b2tlbi50YWJsZUJvZHlTb3J0QmdcbiAgICAgIH0sXG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1jb2x1bW4tdGl0bGVgXToge1xuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgekluZGV4OiAxLFxuICAgICAgICBmbGV4OiAxLFxuICAgICAgICBtaW5XaWR0aDogMFxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LWNvbHVtbi1zb3J0ZXJzYF06IHtcbiAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICBmbGV4OiAnYXV0bycsXG4gICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICAgICAgICBqdXN0aWZ5Q29udGVudDogJ3NwYWNlLWJldHdlZW4nLFxuICAgICAgICAnJjo6YWZ0ZXInOiB7XG4gICAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgICAgaW5zZXQ6IDAsXG4gICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICBoZWlnaHQ6ICcxMDAlJyxcbiAgICAgICAgICBjb250ZW50OiAnXCJcIidcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LWNvbHVtbi1zb3J0ZXJzLXRvb2x0aXAtdGFyZ2V0LXNvcnRlcmBdOiB7XG4gICAgICAgICcmOjphZnRlcic6IHtcbiAgICAgICAgICBjb250ZW50OiAnbm9uZSdcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LWNvbHVtbi1zb3J0ZXJgXToge1xuICAgICAgICBtYXJnaW5JbmxpbmVTdGFydDogbWFyZ2luWFhTLFxuICAgICAgICBjb2xvcjogaGVhZGVySWNvbkNvbG9yLFxuICAgICAgICBmb250U2l6ZTogMCxcbiAgICAgICAgdHJhbnNpdGlvbjogYGNvbG9yICR7dG9rZW4ubW90aW9uRHVyYXRpb25TbG93fWAsXG4gICAgICAgICcmLWlubmVyJzoge1xuICAgICAgICAgIGRpc3BsYXk6ICdpbmxpbmUtZmxleCcsXG4gICAgICAgICAgZmxleERpcmVjdGlvbjogJ2NvbHVtbicsXG4gICAgICAgICAgYWxpZ25JdGVtczogJ2NlbnRlcidcbiAgICAgICAgfSxcbiAgICAgICAgJyYtdXAsICYtZG93bic6IHtcbiAgICAgICAgICBmb250U2l6ZTogZm9udFNpemVJY29uLFxuICAgICAgICAgICcmLmFjdGl2ZSc6IHtcbiAgICAgICAgICAgIGNvbG9yOiB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ZSxcbiAgICB0YWJsZUJvcmRlckNvbG9yXG4gIH0gPSB0b2tlbjtcbiAgY29uc3QgdGFibGVCb3JkZXIgPSBgJHsoMCwgX2Nzc2luanMudW5pdCkobGluZVdpZHRoKX0gJHtsaW5lVHlwZX0gJHt0YWJsZUJvcmRlckNvbG9yfWA7XG4gIHJldHVybiB7XG4gICAgW2Ake2NvbXBvbmVudENsc30td3JhcHBlcmBdOiB7XG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1zdGlja3lgXToge1xuICAgICAgICAnJi1ob2xkZXInOiB7XG4gICAgICAgICAgcG9zaXRpb246ICdzdGlja3knLFxuICAgICAgICAgIHpJbmRleDogekluZGV4VGFibGVTdGlja3ksXG4gICAgICAgICAgYmFja2dyb3VuZDogdG9rZW4uY29sb3JCZ0NvbnRhaW5lclxuICAgICAgICB9LFxuICAgICAgICAnJi1zY3JvbGwnOiB7XG4gICAgICAgICAgcG9zaXRpb246ICdzdGlja3knLFxuICAgICAgICAgIGJvdHRvbTogMCxcbiAgICAgICAgICBoZWlnaHQ6IGAkeygwLCBfY3NzaW5qcy51bml0KSh0YWJsZVNjcm9sbFRodW1iU2l6ZSl9ICFpbXBvcnRhbnRgLFxuICAgICAgICAgIHpJbmRleDogekluZGV4VGFibGVTdGlja3ksXG4gICAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICAgICAgICAgIGJhY2tncm91bmQ6IHRhYmxlU2Nyb2xsQmcsXG4gICAgICAgICAgYm9yZGVyVG9wOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICBvcGFjaXR5OiBvcGFjaXR5TG9hZGluZyxcbiAgICAgICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgICAgIHRyYW5zZm9ybU9yaWdpbjogJ2NlbnRlciBib3R0b20nXG4gICAgICAgICAgfSxcbiAgICAgICAgICAvLyBmYWtlIHNjcm9sbGJhciBzdHlsZSBvZiBzdGlja3l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bHMsXG4gICAgbW90aW9uRHVyYXRpb25NaWQsXG4gICAgbGluZVdpZHRoLFxuICAgIGxpbmVUeXBlLFxuICAgIHRhYmxlQm9yZGVyQ29sb3IsXG4gICAgY2FsY1xuICB9ID0gdG9rZW47XG4gIGNvbnN0IHRhYmxlQm9yZGVyID0gYCR7KDAsIF9jc3NpbmpzLnVuaXQpKGxpbmVXaWR0aCl9ICR7bGluZVR5cGV9ICR7dGFibGVCb3JkZXJDb2xvcn1gO1xuICBjb25zdCByb3dDZWxsQ2xzID0gYCR7Y29tcG9uZW50Q2xzfS1leHBhbmRlZC1yb3ctY2VsbGA7XG4gIHJldHVybiB7XG4gICAgW2Ake2NvbXBvbmVudENsc30td3JhcHBlcmBdOiB7XG4gICAgICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PSBSb3cgPT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRib2R5LXZpcnR1YWxgXToge1xuICAgICAgICBbYCR7Y29tcG9uZW50Q2xzfS10Ym9keS12aXJ0dWFsLWhvbGRlci1pbm5lcmBdOiB7XG4gICAgICAgICAgW2BcbiAgICAgICAgICAgICYgPiAke2NvbXBvbmVudENsc30tcm93LCBcbiAgICAgICAgICAgICYgPiBkaXY6bm90KCR7Y29tcG9uZW50Q2xzfS1yb3cpID4gJHtjb21wb25lbnRDbHN9LXJvd1xuICAgICAgICAgIGBdOiB7XG4gICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXG4gICAgICAgICAgICBib3hTaXppbmc6ICdib3JkZXItYm94JyxcbiAgICAgICAgICAgIHdpZHRoOiAnMTAwJSdcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIFtgJHtjb21wb25lbnRDbHN9LWNlbGxgXToge1xuICAgICAgICAgIGJvcmRlckJvdHRvbTogdGFibGVCb3JkZXIsXG4gICAgICAgICAgdHJhbnNpdGlvbjogYGJhY2tncm91bmQgJHttb3Rpb25EdXJhdGlvbk1pZH1gXG4gICAgICAgIH0sXG4gICAgICAgIFtgJHtjb21wb25lbnRDbHN9LWV4cGFuZGVkLXJvd2BdOiB7XG4gICAgICAgICAgW2Ake3Jvd0NlbGxDbHN9JHtyb3dDZWxsQ2xzfS1maXhlZGBdOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjogJ3N0aWNreScsXG4gICAgICAgICAgICBpbnNldElubGluZVN0YXJ0OiAwLFxuICAgICAgICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgICAgICAgd2lkdGg6IGBjYWxjKHZhcigtLXZpcnR1YWwtd2lkdGgpIC0gJHsoMCwgX2Nzc2luanMudW5pdCkobGluZVdpZHRoKX0pYCxcbiAgICAgICAgICAgIGJvcmRlcklubGluZUVuZDogJ25vbmUnXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09IEJvcmRlciA9PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICBbYCR7Y29tcG9uZW50Q2xzfS1ib3JkZXJlZGBdOiB7XG4gICAgICAgIFtgJHtjb21wb25lbnRDbHN9LXRib2R5LXZpcnR1YWxgXToge1xuICAgICAgICAgICcmOmFmdGVyJzoge1xuICAgICAgICAgICAgY29udGVudDogJ1wiXCInLFxuICAgICAgICAgICAgaW5zZXRJbmxpbmU6IDAsXG4gICAgICAgICAgICBib3R0b206IDAsXG4gICAgICAgICAgICBib3JkZXJCb3R0b206IHRhYmxlQm9yZGVyLFxuICAgICAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZSdcbiAgICAgICAgICB9LFxuICAgICAgICAgIFtgJHtjb21wb25lbnRDbHN9LWNlbGxgXToge1xuICAgICAgICAgICAgYm9yZGVySW5saW5lRW5kOiB0YWJsZUJvcmRlcixcbiAgICAgICAgICAgIFtgJiR7Y29tcG9uZW50Q2xzfS1jZWxsLWZpeC1yaWdodC1maXJzdDpiZWZvcmVgXToge1xuIC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