|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[91622,81976,35479,47897,48358,88511],{
|
|
|
|
|
|
/***/ 95604:
|
|
|
/*!*******************************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules ***!
|
|
|
\*******************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_DeliveredProcedureOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DeliveredProcedureOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var DeliveredProcedureOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z" } }] }, "name": "delivered-procedure", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_DeliveredProcedureOutlined = (DeliveredProcedureOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DeliveredProcedureOutlined_DeliveredProcedureOutlined = function DeliveredProcedureOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_DeliveredProcedureOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_DeliveredProcedureOutlined = (/*#__PURE__*/react.forwardRef(DeliveredProcedureOutlined_DeliveredProcedureOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 42952:
|
|
|
/*!********************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/SettingOutlined.js + 1 modules ***!
|
|
|
\********************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_SettingOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/SettingOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var SettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, "name": "setting", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_SettingOutlined = (SettingOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/SettingOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SettingOutlined_SettingOutlined = function SettingOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_SettingOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_SettingOutlined = (/*#__PURE__*/react.forwardRef(SettingOutlined_SettingOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 48783:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/_util/throttleByAnimationFrame.js ***!
|
|
|
\****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 74902);
|
|
|
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 96523);
|
|
|
|
|
|
|
|
|
function throttleByAnimationFrame(fn) {
|
|
|
let requestId;
|
|
|
const later = args => () => {
|
|
|
requestId = null;
|
|
|
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
|
|
|
};
|
|
|
const throttled = function () {
|
|
|
if (requestId == null) {
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
args[_key] = arguments[_key];
|
|
|
}
|
|
|
requestId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(later(args));
|
|
|
}
|
|
|
};
|
|
|
throttled.cancel = () => {
|
|
|
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"].cancel */ .Z.cancel(requestId);
|
|
|
requestId = null;
|
|
|
};
|
|
|
return throttled;
|
|
|
}
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (throttleByAnimationFrame);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 30291:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/affix/index.js + 2 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ affix; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
var classCallCheck = __webpack_require__(15671);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
|
var createClass = __webpack_require__(43144);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
var inherits = __webpack_require__(60136);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
var createSuper = __webpack_require__(51630);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js + 4 modules
|
|
|
var es = __webpack_require__(48555);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(10366);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/throttleByAnimationFrame.js
|
|
|
var throttleByAnimationFrame = __webpack_require__(48783);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/style/index.js
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
|
const genSharedAffixStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
position: 'fixed',
|
|
|
zIndex: token.zIndexPopup
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var style = ((0,genComponentStyleHook/* default */.Z)('Affix', token => {
|
|
|
const affixToken = (0,statistic/* merge */.TS)(token, {
|
|
|
zIndexPopup: token.zIndexBase + 10
|
|
|
});
|
|
|
return [genSharedAffixStyle(affixToken)];
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/utils.js
|
|
|
function getTargetRect(target) {
|
|
|
return target !== window ? target.getBoundingClientRect() : {
|
|
|
top: 0,
|
|
|
bottom: window.innerHeight
|
|
|
};
|
|
|
}
|
|
|
function getFixedTop(placeholderRect, targetRect, offsetTop) {
|
|
|
if (offsetTop !== undefined && targetRect.top > placeholderRect.top - offsetTop) {
|
|
|
return offsetTop + targetRect.top;
|
|
|
}
|
|
|
return undefined;
|
|
|
}
|
|
|
function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
|
|
|
if (offsetBottom !== undefined && targetRect.bottom < placeholderRect.bottom + offsetBottom) {
|
|
|
const targetBottomOffset = window.innerHeight - targetRect.bottom;
|
|
|
return offsetBottom + targetBottomOffset;
|
|
|
}
|
|
|
return undefined;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/index.js
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
|
|
|
function getDefaultTarget() {
|
|
|
return typeof window !== 'undefined' ? window : null;
|
|
|
}
|
|
|
var AffixStatus;
|
|
|
(function (AffixStatus) {
|
|
|
AffixStatus[AffixStatus["None"] = 0] = "None";
|
|
|
AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare";
|
|
|
})(AffixStatus || (AffixStatus = {}));
|
|
|
let InternalAffix = /*#__PURE__*/function (_React$Component) {
|
|
|
(0,inherits/* default */.Z)(InternalAffix, _React$Component);
|
|
|
var _super = (0,createSuper/* default */.Z)(InternalAffix);
|
|
|
function InternalAffix() {
|
|
|
var _this;
|
|
|
(0,classCallCheck/* default */.Z)(this, InternalAffix);
|
|
|
_this = _super.apply(this, arguments);
|
|
|
_this.state = {
|
|
|
status: AffixStatus.None,
|
|
|
lastAffix: false,
|
|
|
prevTarget: null
|
|
|
};
|
|
|
_this.placeholderNodeRef = /*#__PURE__*/(0,react.createRef)();
|
|
|
_this.fixedNodeRef = /*#__PURE__*/(0,react.createRef)();
|
|
|
_this.addListeners = () => {
|
|
|
const targetFunc = _this.getTargetFunc();
|
|
|
const target = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
|
|
const {
|
|
|
prevTarget
|
|
|
} = _this.state;
|
|
|
if (prevTarget !== target) {
|
|
|
TRIGGER_EVENTS.forEach(eventName => {
|
|
|
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
|
|
target === null || target === void 0 ? void 0 : target.addEventListener(eventName, _this.lazyUpdatePosition);
|
|
|
});
|
|
|
_this.updatePosition();
|
|
|
_this.setState({
|
|
|
prevTarget: target
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
_this.removeListeners = () => {
|
|
|
if (_this.timer) {
|
|
|
clearTimeout(_this.timer);
|
|
|
_this.timer = null;
|
|
|
}
|
|
|
const {
|
|
|
prevTarget
|
|
|
} = _this.state;
|
|
|
const targetFunc = _this.getTargetFunc();
|
|
|
const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
|
|
TRIGGER_EVENTS.forEach(eventName => {
|
|
|
newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
|
|
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
|
|
});
|
|
|
_this.updatePosition.cancel();
|
|
|
// https://github.com/ant-design/ant-design/issues/22683
|
|
|
_this.lazyUpdatePosition.cancel();
|
|
|
};
|
|
|
_this.getOffsetTop = () => {
|
|
|
const {
|
|
|
offsetBottom,
|
|
|
offsetTop
|
|
|
} = _this.props;
|
|
|
return offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
|
|
|
};
|
|
|
_this.getOffsetBottom = () => _this.props.offsetBottom;
|
|
|
// =================== Measure ===================
|
|
|
_this.measure = () => {
|
|
|
const {
|
|
|
status,
|
|
|
lastAffix
|
|
|
} = _this.state;
|
|
|
const {
|
|
|
onChange
|
|
|
} = _this.props;
|
|
|
const targetFunc = _this.getTargetFunc();
|
|
|
if (status !== AffixStatus.Prepare || !_this.fixedNodeRef.current || !_this.placeholderNodeRef.current || !targetFunc) {
|
|
|
return;
|
|
|
}
|
|
|
const offsetTop = _this.getOffsetTop();
|
|
|
const offsetBottom = _this.getOffsetBottom();
|
|
|
const targetNode = targetFunc();
|
|
|
if (targetNode) {
|
|
|
const newState = {
|
|
|
status: AffixStatus.None
|
|
|
};
|
|
|
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
|
|
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
|
|
|
return;
|
|
|
}
|
|
|
const targetRect = getTargetRect(targetNode);
|
|
|
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
|
|
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
|
|
if (fixedTop !== undefined) {
|
|
|
newState.affixStyle = {
|
|
|
position: 'fixed',
|
|
|
top: fixedTop,
|
|
|
width: placeholderRect.width,
|
|
|
height: placeholderRect.height
|
|
|
};
|
|
|
newState.placeholderStyle = {
|
|
|
width: placeholderRect.width,
|
|
|
height: placeholderRect.height
|
|
|
};
|
|
|
} else if (fixedBottom !== undefined) {
|
|
|
newState.affixStyle = {
|
|
|
position: 'fixed',
|
|
|
bottom: fixedBottom,
|
|
|
width: placeholderRect.width,
|
|
|
height: placeholderRect.height
|
|
|
};
|
|
|
newState.placeholderStyle = {
|
|
|
width: placeholderRect.width,
|
|
|
height: placeholderRect.height
|
|
|
};
|
|
|
}
|
|
|
newState.lastAffix = !!newState.affixStyle;
|
|
|
if (onChange && lastAffix !== newState.lastAffix) {
|
|
|
onChange(newState.lastAffix);
|
|
|
}
|
|
|
_this.setState(newState);
|
|
|
}
|
|
|
};
|
|
|
_this.prepareMeasure = () => {
|
|
|
// event param is used before. Keep compatible ts define here.
|
|
|
_this.setState({
|
|
|
status: AffixStatus.Prepare,
|
|
|
affixStyle: undefined,
|
|
|
placeholderStyle: undefined
|
|
|
});
|
|
|
// Test if `updatePosition` called
|
|
|
if (false) {}
|
|
|
};
|
|
|
_this.updatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
|
|
_this.prepareMeasure();
|
|
|
});
|
|
|
_this.lazyUpdatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
|
|
const targetFunc = _this.getTargetFunc();
|
|
|
const {
|
|
|
affixStyle
|
|
|
} = _this.state;
|
|
|
// Check position change before measure to make Safari smooth
|
|
|
if (targetFunc && affixStyle) {
|
|
|
const offsetTop = _this.getOffsetTop();
|
|
|
const offsetBottom = _this.getOffsetBottom();
|
|
|
const targetNode = targetFunc();
|
|
|
if (targetNode && _this.placeholderNodeRef.current) {
|
|
|
const targetRect = getTargetRect(targetNode);
|
|
|
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
|
|
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
|
|
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
|
|
if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// Directly call prepare measure since it's already throttled.
|
|
|
_this.prepareMeasure();
|
|
|
});
|
|
|
return _this;
|
|
|
}
|
|
|
(0,createClass/* default */.Z)(InternalAffix, [{
|
|
|
key: "getTargetFunc",
|
|
|
value: function getTargetFunc() {
|
|
|
const {
|
|
|
getTargetContainer
|
|
|
} = this.context;
|
|
|
const {
|
|
|
target
|
|
|
} = this.props;
|
|
|
if (target !== undefined) {
|
|
|
return target;
|
|
|
}
|
|
|
return getTargetContainer !== null && getTargetContainer !== void 0 ? getTargetContainer : getDefaultTarget;
|
|
|
}
|
|
|
// Event handler
|
|
|
}, {
|
|
|
key: "componentDidMount",
|
|
|
value: function componentDidMount() {
|
|
|
// [Legacy] Wait for parent component ref has its value.
|
|
|
// We should use target as directly element instead of function which makes element check hard.
|
|
|
this.timer = setTimeout(this.addListeners);
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentDidUpdate",
|
|
|
value: function componentDidUpdate(prevProps) {
|
|
|
this.addListeners();
|
|
|
if (prevProps.offsetTop !== this.props.offsetTop || prevProps.offsetBottom !== this.props.offsetBottom) {
|
|
|
this.updatePosition();
|
|
|
}
|
|
|
this.measure();
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
this.removeListeners();
|
|
|
}
|
|
|
// =================== Render ===================
|
|
|
}, {
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
const {
|
|
|
affixStyle,
|
|
|
placeholderStyle
|
|
|
} = this.state;
|
|
|
const {
|
|
|
affixPrefixCls,
|
|
|
rootClassName,
|
|
|
children
|
|
|
} = this.props;
|
|
|
const className = classnames_default()(affixStyle && rootClassName, {
|
|
|
[affixPrefixCls]: !!affixStyle
|
|
|
});
|
|
|
let props = (0,omit/* default */.Z)(this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'affixPrefixCls', 'rootClassName']);
|
|
|
// Omit this since `onTestUpdatePosition` only works on test.
|
|
|
if (false) {}
|
|
|
return /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
|
onResize: this.updatePosition
|
|
|
}, /*#__PURE__*/react.createElement("div", Object.assign({}, props, {
|
|
|
ref: this.placeholderNodeRef
|
|
|
}), affixStyle && /*#__PURE__*/react.createElement("div", {
|
|
|
style: placeholderStyle,
|
|
|
"aria-hidden": "true"
|
|
|
}), /*#__PURE__*/react.createElement("div", {
|
|
|
className: className,
|
|
|
ref: this.fixedNodeRef,
|
|
|
style: affixStyle
|
|
|
}, /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
|
onResize: this.updatePosition
|
|
|
}, children))));
|
|
|
}
|
|
|
}]);
|
|
|
return InternalAffix;
|
|
|
}(react.Component);
|
|
|
InternalAffix.contextType = context/* ConfigContext */.E_;
|
|
|
const Affix = /*#__PURE__*/(0,react.forwardRef)((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
rootClassName
|
|
|
} = props;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = (0,react.useContext)(context/* ConfigContext */.E_);
|
|
|
const affixPrefixCls = getPrefixCls('affix', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = style(affixPrefixCls);
|
|
|
const AffixProps = Object.assign(Object.assign({}, props), {
|
|
|
affixPrefixCls,
|
|
|
rootClassName: classnames_default()(rootClassName, hashId)
|
|
|
});
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement(InternalAffix, Object.assign({}, AffixProps, {
|
|
|
ref: ref
|
|
|
})));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var affix = (Affix);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 85673:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/breadcrumb/index.js + 6 modules ***!
|
|
|
\**************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ breadcrumb; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__(37419);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__(1337);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
|
var DownOutlined = __webpack_require__(80882);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 9 modules
|
|
|
var dropdown = __webpack_require__(35874);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
|
|
|
|
|
|
|
const BreadcrumbSeparator = _ref => {
|
|
|
let {
|
|
|
children
|
|
|
} = _ref;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
|
return /*#__PURE__*/react.createElement("li", {
|
|
|
className: `${prefixCls}-separator`,
|
|
|
"aria-hidden": "true"
|
|
|
}, children === '' ? children : children || '/');
|
|
|
};
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/useItemRender.js
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
|
if (route.title === undefined || route.title === null) {
|
|
|
return null;
|
|
|
}
|
|
|
const paramsKeys = Object.keys(params).join('|');
|
|
|
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
|
|
|
}
|
|
|
function renderItem(prefixCls, item, children, href) {
|
|
|
if (children === null || children === undefined) {
|
|
|
return null;
|
|
|
}
|
|
|
const {
|
|
|
className,
|
|
|
onClick
|
|
|
} = item,
|
|
|
restItem = __rest(item, ["className", "onClick"]);
|
|
|
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
|
|
|
data: true,
|
|
|
aria: true
|
|
|
})), {
|
|
|
onClick
|
|
|
});
|
|
|
if (href !== undefined) {
|
|
|
return /*#__PURE__*/react.createElement("a", Object.assign({}, passedProps, {
|
|
|
className: classnames_default()(`${prefixCls}-link`, className),
|
|
|
href: href
|
|
|
}), children);
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("span", Object.assign({}, passedProps, {
|
|
|
className: classnames_default()(`${prefixCls}-link`, className)
|
|
|
}), children);
|
|
|
}
|
|
|
function useItemRender(prefixCls, itemRender) {
|
|
|
const mergedItemRender = (item, params, routes, path, href) => {
|
|
|
if (itemRender) {
|
|
|
return itemRender(item, params, routes, path);
|
|
|
}
|
|
|
const name = getBreadcrumbName(item, params);
|
|
|
return renderItem(prefixCls, item, name, href);
|
|
|
};
|
|
|
return mergedItemRender;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbItem.js
|
|
|
var BreadcrumbItem_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InternalBreadcrumbItem = props => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
separator = '/',
|
|
|
children,
|
|
|
menu,
|
|
|
overlay,
|
|
|
dropdownProps,
|
|
|
href
|
|
|
} = props;
|
|
|
// Warning for deprecated usage
|
|
|
if (false) {}
|
|
|
/** If overlay is have Wrap a Dropdown */
|
|
|
const renderBreadcrumbNode = breadcrumbItem => {
|
|
|
if (menu || overlay) {
|
|
|
const mergeDropDownProps = Object.assign({}, dropdownProps);
|
|
|
if (menu) {
|
|
|
const _a = menu || {},
|
|
|
{
|
|
|
items
|
|
|
} = _a,
|
|
|
menuProps = BreadcrumbItem_rest(_a, ["items"]);
|
|
|
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
|
|
|
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
|
|
|
var {
|
|
|
key,
|
|
|
title,
|
|
|
label,
|
|
|
path
|
|
|
} = _a,
|
|
|
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
|
|
|
let mergedLabel = label !== null && label !== void 0 ? label : title;
|
|
|
if (path) {
|
|
|
mergedLabel = /*#__PURE__*/react.createElement("a", {
|
|
|
href: `${href}${path}`
|
|
|
}, mergedLabel);
|
|
|
}
|
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
|
key: key !== null && key !== void 0 ? key : index,
|
|
|
label: mergedLabel
|
|
|
});
|
|
|
})
|
|
|
});
|
|
|
} else if (overlay) {
|
|
|
mergeDropDownProps.overlay = overlay;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(dropdown/* default */.Z, Object.assign({
|
|
|
placement: "bottom"
|
|
|
}, mergeDropDownProps), /*#__PURE__*/react.createElement("span", {
|
|
|
className: `${prefixCls}-overlay-link`
|
|
|
}, breadcrumbItem, /*#__PURE__*/react.createElement(DownOutlined/* default */.Z, null)));
|
|
|
}
|
|
|
return breadcrumbItem;
|
|
|
};
|
|
|
// wrap to dropDown
|
|
|
const link = renderBreadcrumbNode(children);
|
|
|
if (link !== undefined && link !== null) {
|
|
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("li", null, link), separator && /*#__PURE__*/react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
const BreadcrumbItem = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
children,
|
|
|
href
|
|
|
} = props,
|
|
|
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
return /*#__PURE__*/react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls
|
|
|
}), renderItem(prefixCls, restProps, children, href));
|
|
|
};
|
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
var style = __webpack_require__(14747);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/style/index.js
|
|
|
|
|
|
|
|
|
const genBreadcrumbStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
iconCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
color: token.itemColor,
|
|
|
fontSize: token.fontSize,
|
|
|
[iconCls]: {
|
|
|
fontSize: token.iconFontSize
|
|
|
},
|
|
|
ol: {
|
|
|
display: 'flex',
|
|
|
flexWrap: 'wrap',
|
|
|
margin: 0,
|
|
|
padding: 0,
|
|
|
listStyle: 'none'
|
|
|
},
|
|
|
a: Object.assign({
|
|
|
color: token.linkColor,
|
|
|
transition: `color ${token.motionDurationMid}`,
|
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
|
borderRadius: token.borderRadiusSM,
|
|
|
height: token.lineHeight * token.fontSize,
|
|
|
display: 'inline-block',
|
|
|
marginInline: -token.marginXXS,
|
|
|
'&:hover': {
|
|
|
color: token.linkHoverColor,
|
|
|
backgroundColor: token.colorBgTextHover
|
|
|
}
|
|
|
}, (0,style/* genFocusStyle */.Qy)(token)),
|
|
|
[`li:last-child`]: {
|
|
|
color: token.lastItemColor
|
|
|
},
|
|
|
[`${componentCls}-separator`]: {
|
|
|
marginInline: token.separatorMargin,
|
|
|
color: token.separatorColor
|
|
|
},
|
|
|
[`${componentCls}-link`]: {
|
|
|
[`
|
|
|
> ${iconCls} + span,
|
|
|
> ${iconCls} + a
|
|
|
`]: {
|
|
|
marginInlineStart: token.marginXXS
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-overlay-link`]: {
|
|
|
borderRadius: token.borderRadiusSM,
|
|
|
height: token.lineHeight * token.fontSize,
|
|
|
display: 'inline-block',
|
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
|
marginInline: -token.marginXXS,
|
|
|
[`> ${iconCls}`]: {
|
|
|
marginInlineStart: token.marginXXS,
|
|
|
fontSize: token.fontSizeIcon
|
|
|
},
|
|
|
'&:hover': {
|
|
|
color: token.linkHoverColor,
|
|
|
backgroundColor: token.colorBgTextHover,
|
|
|
a: {
|
|
|
color: token.linkHoverColor
|
|
|
}
|
|
|
},
|
|
|
a: {
|
|
|
'&:hover': {
|
|
|
backgroundColor: 'transparent'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
// rtl style
|
|
|
[`&${token.componentCls}-rtl`]: {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
|
|
|
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
|
|
|
return [genBreadcrumbStyle(BreadcrumbToken)];
|
|
|
}, token => ({
|
|
|
itemColor: token.colorTextDescription,
|
|
|
lastItemColor: token.colorText,
|
|
|
iconFontSize: token.fontSize,
|
|
|
linkColor: token.colorTextDescription,
|
|
|
linkHoverColor: token.colorText,
|
|
|
separatorColor: token.colorTextDescription,
|
|
|
separatorMargin: token.marginXS
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/useItems.js
|
|
|
var useItems_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
function route2item(route) {
|
|
|
const {
|
|
|
breadcrumbName,
|
|
|
children
|
|
|
} = route,
|
|
|
rest = useItems_rest(route, ["breadcrumbName", "children"]);
|
|
|
const clone = Object.assign({
|
|
|
title: breadcrumbName
|
|
|
}, rest);
|
|
|
if (children) {
|
|
|
clone.menu = {
|
|
|
items: children.map(_a => {
|
|
|
var {
|
|
|
breadcrumbName: itemBreadcrumbName
|
|
|
} = _a,
|
|
|
itemProps = useItems_rest(_a, ["breadcrumbName"]);
|
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
|
title: itemBreadcrumbName
|
|
|
});
|
|
|
})
|
|
|
};
|
|
|
}
|
|
|
return clone;
|
|
|
}
|
|
|
function useItems(items, routes) {
|
|
|
return (0,react.useMemo)(() => {
|
|
|
if (items) {
|
|
|
return items;
|
|
|
}
|
|
|
if (routes) {
|
|
|
return routes.map(route2item);
|
|
|
}
|
|
|
return null;
|
|
|
}, [items, routes]);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/Breadcrumb.js
|
|
|
var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getPath = (params, path) => {
|
|
|
if (path === undefined) {
|
|
|
return path;
|
|
|
}
|
|
|
let mergedPath = (path || '').replace(/^\//, '');
|
|
|
Object.keys(params).forEach(key => {
|
|
|
mergedPath = mergedPath.replace(`:${key}`, params[key]);
|
|
|
});
|
|
|
return mergedPath;
|
|
|
};
|
|
|
const Breadcrumb = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
separator = '/',
|
|
|
style,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
routes: legacyRoutes,
|
|
|
items,
|
|
|
children,
|
|
|
itemRender,
|
|
|
params = {}
|
|
|
} = props,
|
|
|
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
breadcrumb
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
let crumbs;
|
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
|
|
|
const mergedItems = useItems(items, legacyRoutes);
|
|
|
if (false) {}
|
|
|
const mergedItemRender = useItemRender(prefixCls, itemRender);
|
|
|
if (mergedItems && mergedItems.length > 0) {
|
|
|
// generated by route
|
|
|
const paths = [];
|
|
|
const itemRenderRoutes = items || legacyRoutes;
|
|
|
crumbs = mergedItems.map((item, index) => {
|
|
|
const {
|
|
|
path,
|
|
|
key,
|
|
|
type,
|
|
|
menu,
|
|
|
overlay,
|
|
|
onClick,
|
|
|
className: itemClassName,
|
|
|
separator: itemSeparator,
|
|
|
dropdownProps
|
|
|
} = item;
|
|
|
const mergedPath = getPath(params, path);
|
|
|
if (mergedPath !== undefined) {
|
|
|
paths.push(mergedPath);
|
|
|
}
|
|
|
const mergedKey = key !== null && key !== void 0 ? key : index;
|
|
|
if (type === 'separator') {
|
|
|
return /*#__PURE__*/react.createElement(breadcrumb_BreadcrumbSeparator, {
|
|
|
key: mergedKey
|
|
|
}, itemSeparator);
|
|
|
}
|
|
|
const itemProps = {};
|
|
|
const isLastItem = index === mergedItems.length - 1;
|
|
|
if (menu) {
|
|
|
itemProps.menu = menu;
|
|
|
} else if (overlay) {
|
|
|
itemProps.overlay = overlay;
|
|
|
}
|
|
|
let {
|
|
|
href
|
|
|
} = item;
|
|
|
if (paths.length && mergedPath !== undefined) {
|
|
|
href = `#/${paths.join('/')}`;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(InternalBreadcrumbItem, Object.assign({
|
|
|
key: mergedKey
|
|
|
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
|
|
|
data: true,
|
|
|
aria: true
|
|
|
}), {
|
|
|
className: itemClassName,
|
|
|
dropdownProps: dropdownProps,
|
|
|
href: href,
|
|
|
separator: isLastItem ? '' : separator,
|
|
|
onClick: onClick,
|
|
|
prefixCls: prefixCls
|
|
|
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
|
|
|
});
|
|
|
} else if (children) {
|
|
|
const childrenLength = (0,toArray/* default */.Z)(children).length;
|
|
|
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
|
|
|
if (!element) {
|
|
|
return element;
|
|
|
}
|
|
|
// =================== Warning =====================
|
|
|
if (false) {}
|
|
|
false ? 0 : void 0;
|
|
|
const isLastItem = index === childrenLength - 1;
|
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
|
separator: isLastItem ? '' : separator,
|
|
|
key: index
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
const breadcrumbClassName = classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, className, rootClassName, hashId);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement("nav", Object.assign({
|
|
|
className: breadcrumbClassName,
|
|
|
style: mergedStyle
|
|
|
}, restProps), /*#__PURE__*/react.createElement("ol", null, crumbs)));
|
|
|
};
|
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/index.js
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 96074:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/divider/index.js + 1 modules ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ divider; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
var style = __webpack_require__(14747);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js
|
|
|
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
|
const genSharedDividerStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
sizePaddingEdgeHorizontal,
|
|
|
colorSplit,
|
|
|
lineWidth
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
|
// vertical
|
|
|
'&-vertical': {
|
|
|
position: 'relative',
|
|
|
top: '-0.06em',
|
|
|
display: 'inline-block',
|
|
|
height: '0.9em',
|
|
|
margin: `0 ${token.dividerVerticalGutterMargin}px`,
|
|
|
verticalAlign: 'middle',
|
|
|
borderTop: 0,
|
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
|
},
|
|
|
'&-horizontal': {
|
|
|
display: 'flex',
|
|
|
clear: 'both',
|
|
|
width: '100%',
|
|
|
minWidth: '100%',
|
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
|
color: token.colorTextHeading,
|
|
|
fontWeight: 500,
|
|
|
fontSize: token.fontSizeLG,
|
|
|
whiteSpace: 'nowrap',
|
|
|
textAlign: 'center',
|
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
|
'&::before, &::after': {
|
|
|
position: 'relative',
|
|
|
width: '50%',
|
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
|
// Chrome not accept `inherit` in `border-top`
|
|
|
borderBlockStartColor: 'inherit',
|
|
|
borderBlockEnd: 0,
|
|
|
transform: 'translateY(50%)',
|
|
|
content: "''"
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
|
'&::before': {
|
|
|
width: '5%'
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: '95%'
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
|
'&::before': {
|
|
|
width: '95%'
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: '5%'
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
display: 'inline-block',
|
|
|
padding: '0 1em'
|
|
|
},
|
|
|
'&-dashed': {
|
|
|
background: 'none',
|
|
|
borderColor: colorSplit,
|
|
|
borderStyle: 'dashed',
|
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
|
'&::before, &::after': {
|
|
|
borderStyle: 'dashed none none'
|
|
|
}
|
|
|
},
|
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
|
borderInlineStartWidth: lineWidth,
|
|
|
borderInlineEnd: 0,
|
|
|
borderBlockStart: 0,
|
|
|
borderBlockEnd: 0
|
|
|
},
|
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
|
color: token.colorText,
|
|
|
fontWeight: 'normal',
|
|
|
fontSize: token.fontSize
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
|
'&::before': {
|
|
|
width: 0
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
|
'&::before': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: 0
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
|
dividerVerticalGutterMargin: token.marginXS,
|
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
|
dividerHorizontalGutterMargin: token.marginLG
|
|
|
});
|
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
|
}, {
|
|
|
sizePaddingEdgeHorizontal: 0
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/divider/index.js
|
|
|
'use client';
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Divider = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
divider
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
type = 'horizontal',
|
|
|
orientation = 'center',
|
|
|
orientationMargin,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
children,
|
|
|
dashed,
|
|
|
plain,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
|
const hasChildren = !!children;
|
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
|
const classString = classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
|
}, className, rootClassName);
|
|
|
const memoizedOrientationMargin = react.useMemo(() => {
|
|
|
if (typeof orientationMargin === 'number') {
|
|
|
return orientationMargin;
|
|
|
}
|
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
|
return Number(orientationMargin);
|
|
|
}
|
|
|
return orientationMargin;
|
|
|
}, [orientationMargin]);
|
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
|
marginLeft: memoizedOrientationMargin
|
|
|
}), hasCustomMarginRight && {
|
|
|
marginRight: memoizedOrientationMargin
|
|
|
});
|
|
|
// Warning children not work in vertical mode
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement("div", Object.assign({
|
|
|
className: classString,
|
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
|
}, restProps, {
|
|
|
role: "separator"
|
|
|
}), children && type !== 'vertical' && /*#__PURE__*/react.createElement("span", {
|
|
|
className: `${prefixCls}-inner-text`,
|
|
|
style: innerStyle
|
|
|
}, children)));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 35479:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/drawer/index.js + 16 modules ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ drawer; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
|
|
|
var react_dom = __webpack_require__(73935);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
|
|
|
var Dom_canUseDom = __webpack_require__(98924);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
|
|
|
var es_warning = __webpack_require__(80334);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
|
|
|
var es_ref = __webpack_require__(42550);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Context.js
|
|
|
|
|
|
var OrderContext = /*#__PURE__*/react.createContext(null);
|
|
|
/* harmony default export */ var Context = (OrderContext);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
|
var toConsumableArray = __webpack_require__(74902);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
|
|
|
var useLayoutEffect = __webpack_require__(8410);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useDom.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EMPTY_LIST = [];
|
|
|
|
|
|
/**
|
|
|
* Will add `div` to document. Nest call will keep order
|
|
|
* @param render Render DOM in document
|
|
|
*/
|
|
|
function useDom(render, debug) {
|
|
|
var _React$useState = react.useState(function () {
|
|
|
if (!(0,Dom_canUseDom/* default */.Z)()) {
|
|
|
return null;
|
|
|
}
|
|
|
var defaultEle = document.createElement('div');
|
|
|
if (false) {}
|
|
|
return defaultEle;
|
|
|
}),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1),
|
|
|
ele = _React$useState2[0];
|
|
|
|
|
|
// ========================== Order ==========================
|
|
|
var appendedRef = react.useRef(false);
|
|
|
var queueCreate = react.useContext(Context);
|
|
|
var _React$useState3 = react.useState(EMPTY_LIST),
|
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
|
queue = _React$useState4[0],
|
|
|
setQueue = _React$useState4[1];
|
|
|
var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) {
|
|
|
setQueue(function (origin) {
|
|
|
var newQueue = [appendFn].concat((0,toConsumableArray/* default */.Z)(origin));
|
|
|
return newQueue;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// =========================== DOM ===========================
|
|
|
function append() {
|
|
|
if (!ele.parentElement) {
|
|
|
document.body.appendChild(ele);
|
|
|
}
|
|
|
appendedRef.current = true;
|
|
|
}
|
|
|
function cleanup() {
|
|
|
var _ele$parentElement;
|
|
|
(_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele);
|
|
|
appendedRef.current = false;
|
|
|
}
|
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
|
if (render) {
|
|
|
if (queueCreate) {
|
|
|
queueCreate(append);
|
|
|
} else {
|
|
|
append();
|
|
|
}
|
|
|
} else {
|
|
|
cleanup();
|
|
|
}
|
|
|
return cleanup;
|
|
|
}, [render]);
|
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
|
if (queue.length) {
|
|
|
queue.forEach(function (appendFn) {
|
|
|
return appendFn();
|
|
|
});
|
|
|
setQueue(EMPTY_LIST);
|
|
|
}
|
|
|
}, [queue]);
|
|
|
return [ele, mergedQueueCreate];
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js + 1 modules
|
|
|
var dynamicCSS = __webpack_require__(48981);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js
|
|
|
var getScrollBarSize = __webpack_require__(74204);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/util.js
|
|
|
/**
|
|
|
* Test usage export. Do not use in your production
|
|
|
*/
|
|
|
function isBodyOverflowing() {
|
|
|
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/useScrollLocker.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UNIQUE_ID = "rc-util-locker-".concat(Date.now());
|
|
|
var uuid = 0;
|
|
|
function useScrollLocker(lock) {
|
|
|
var mergedLock = !!lock;
|
|
|
var _React$useState = react.useState(function () {
|
|
|
uuid += 1;
|
|
|
return "".concat(UNIQUE_ID, "_").concat(uuid);
|
|
|
}),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 1),
|
|
|
id = _React$useState2[0];
|
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
|
if (mergedLock) {
|
|
|
var scrollbarSize = (0,getScrollBarSize/* getTargetScrollBarSize */.o)(document.body).width;
|
|
|
var isOverflow = isBodyOverflowing();
|
|
|
(0,dynamicCSS/* updateCSS */.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(isOverflow ? "width: calc(100% - ".concat(scrollbarSize, "px);") : '', "\n}"), id);
|
|
|
} else {
|
|
|
(0,dynamicCSS/* removeCSS */.jL)(id);
|
|
|
}
|
|
|
return function () {
|
|
|
(0,dynamicCSS/* removeCSS */.jL)(id);
|
|
|
};
|
|
|
}, [mergedLock, id]);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/mock.js
|
|
|
var inline = false;
|
|
|
function inlineMock(nextInline) {
|
|
|
if (typeof nextInline === 'boolean') {
|
|
|
inline = nextInline;
|
|
|
}
|
|
|
return inline;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/Portal.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var getPortalContainer = function getPortalContainer(getContainer) {
|
|
|
if (getContainer === false) {
|
|
|
return false;
|
|
|
}
|
|
|
if (!(0,Dom_canUseDom/* default */.Z)() || !getContainer) {
|
|
|
return null;
|
|
|
}
|
|
|
if (typeof getContainer === 'string') {
|
|
|
return document.querySelector(getContainer);
|
|
|
}
|
|
|
if (typeof getContainer === 'function') {
|
|
|
return getContainer();
|
|
|
}
|
|
|
return getContainer;
|
|
|
};
|
|
|
var Portal = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
var open = props.open,
|
|
|
autoLock = props.autoLock,
|
|
|
getContainer = props.getContainer,
|
|
|
debug = props.debug,
|
|
|
_props$autoDestroy = props.autoDestroy,
|
|
|
autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy,
|
|
|
children = props.children;
|
|
|
var _React$useState = react.useState(open),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
|
shouldRender = _React$useState2[0],
|
|
|
setShouldRender = _React$useState2[1];
|
|
|
var mergedRender = shouldRender || open;
|
|
|
|
|
|
// ========================= Warning =========================
|
|
|
if (false) {}
|
|
|
|
|
|
// ====================== Should Render ======================
|
|
|
react.useEffect(function () {
|
|
|
if (autoDestroy || open) {
|
|
|
setShouldRender(open);
|
|
|
}
|
|
|
}, [open, autoDestroy]);
|
|
|
|
|
|
// ======================== Container ========================
|
|
|
var _React$useState3 = react.useState(function () {
|
|
|
return getPortalContainer(getContainer);
|
|
|
}),
|
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
|
innerContainer = _React$useState4[0],
|
|
|
setInnerContainer = _React$useState4[1];
|
|
|
react.useEffect(function () {
|
|
|
var customizeContainer = getPortalContainer(getContainer);
|
|
|
|
|
|
// Tell component that we check this in effect which is safe to be `null`
|
|
|
setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null);
|
|
|
});
|
|
|
var _useDom = useDom(mergedRender && !innerContainer, debug),
|
|
|
_useDom2 = (0,slicedToArray/* default */.Z)(_useDom, 2),
|
|
|
defaultContainer = _useDom2[0],
|
|
|
queueCreate = _useDom2[1];
|
|
|
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer;
|
|
|
|
|
|
// ========================= Locker ==========================
|
|
|
useScrollLocker(autoLock && open && (0,Dom_canUseDom/* default */.Z)() && (mergedContainer === defaultContainer || mergedContainer === document.body));
|
|
|
|
|
|
// =========================== Ref ===========================
|
|
|
var childRef = null;
|
|
|
if (children && (0,es_ref/* supportRef */.Yr)(children) && ref) {
|
|
|
var _ref = children;
|
|
|
childRef = _ref.ref;
|
|
|
}
|
|
|
var mergedRef = (0,es_ref/* useComposeRef */.x1)(childRef, ref);
|
|
|
|
|
|
// ========================= Render ==========================
|
|
|
// Do not render when nothing need render
|
|
|
// When innerContainer is `undefined`, it may not ready since user use ref in the same render
|
|
|
if (!mergedRender || !(0,Dom_canUseDom/* default */.Z)() || innerContainer === undefined) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
// Render inline
|
|
|
var renderInline = mergedContainer === false || inlineMock();
|
|
|
var reffedChildren = children;
|
|
|
if (ref) {
|
|
|
reffedChildren = /*#__PURE__*/react.cloneElement(children, {
|
|
|
ref: mergedRef
|
|
|
});
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(Context.Provider, {
|
|
|
value: queueCreate
|
|
|
}, renderInline ? reffedChildren : /*#__PURE__*/(0,react_dom.createPortal)(reffedChildren, mergedContainer));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_Portal = (Portal);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/node_modules/@rc-component/portal/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var es = (es_Portal);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 11 modules
|
|
|
var rc_motion_es = __webpack_require__(62874);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__(15105);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__(64217);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/context.js
|
|
|
|
|
|
var DrawerContext = /*#__PURE__*/react.createContext(null);
|
|
|
/* harmony default export */ var context = (DrawerContext);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPanel.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DrawerPanel = function DrawerPanel(props) {
|
|
|
var prefixCls = props.prefixCls,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
children = props.children,
|
|
|
containerRef = props.containerRef,
|
|
|
onMouseEnter = props.onMouseEnter,
|
|
|
onMouseOver = props.onMouseOver,
|
|
|
onMouseLeave = props.onMouseLeave,
|
|
|
onClick = props.onClick,
|
|
|
onKeyDown = props.onKeyDown,
|
|
|
onKeyUp = props.onKeyUp;
|
|
|
var eventHandlers = {
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseOver: onMouseOver,
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
onClick: onClick,
|
|
|
onKeyDown: onKeyDown,
|
|
|
onKeyUp: onKeyUp
|
|
|
};
|
|
|
// =============================== Render ===============================
|
|
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
|
|
className: classnames_default()("".concat(prefixCls, "-content"), className),
|
|
|
style: (0,objectSpread2/* default */.Z)({}, style),
|
|
|
"aria-modal": "true",
|
|
|
role: "dialog",
|
|
|
ref: containerRef
|
|
|
}, eventHandlers), children));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_DrawerPanel = (DrawerPanel);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/util.js
|
|
|
|
|
|
|
|
|
function parseWidthHeight(value) {
|
|
|
if (typeof value === 'string' && String(Number(value)) === value) {
|
|
|
(0,es_warning/* default */.ZP)(false, 'Invalid value type of `width` or `height` which should be number type instead.');
|
|
|
return Number(value);
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
function warnCheck(props) {
|
|
|
warning(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead.");
|
|
|
warning(canUseDom() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.");
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/DrawerPopup.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sentinelStyle = {
|
|
|
width: 0,
|
|
|
height: 0,
|
|
|
overflow: 'hidden',
|
|
|
outline: 'none',
|
|
|
position: 'absolute'
|
|
|
};
|
|
|
function DrawerPopup(props, ref) {
|
|
|
var _ref, _pushConfig$distance, _pushConfig, _classNames;
|
|
|
var prefixCls = props.prefixCls,
|
|
|
open = props.open,
|
|
|
placement = props.placement,
|
|
|
inline = props.inline,
|
|
|
push = props.push,
|
|
|
forceRender = props.forceRender,
|
|
|
autoFocus = props.autoFocus,
|
|
|
keyboard = props.keyboard,
|
|
|
rootClassName = props.rootClassName,
|
|
|
rootStyle = props.rootStyle,
|
|
|
zIndex = props.zIndex,
|
|
|
className = props.className,
|
|
|
style = props.style,
|
|
|
motion = props.motion,
|
|
|
width = props.width,
|
|
|
height = props.height,
|
|
|
children = props.children,
|
|
|
contentWrapperStyle = props.contentWrapperStyle,
|
|
|
mask = props.mask,
|
|
|
maskClosable = props.maskClosable,
|
|
|
maskMotion = props.maskMotion,
|
|
|
maskClassName = props.maskClassName,
|
|
|
maskStyle = props.maskStyle,
|
|
|
afterOpenChange = props.afterOpenChange,
|
|
|
onClose = props.onClose,
|
|
|
onMouseEnter = props.onMouseEnter,
|
|
|
onMouseOver = props.onMouseOver,
|
|
|
onMouseLeave = props.onMouseLeave,
|
|
|
onClick = props.onClick,
|
|
|
onKeyDown = props.onKeyDown,
|
|
|
onKeyUp = props.onKeyUp;
|
|
|
// ================================ Refs ================================
|
|
|
var panelRef = react.useRef();
|
|
|
var sentinelStartRef = react.useRef();
|
|
|
var sentinelEndRef = react.useRef();
|
|
|
react.useImperativeHandle(ref, function () {
|
|
|
return panelRef.current;
|
|
|
});
|
|
|
var onPanelKeyDown = function onPanelKeyDown(event) {
|
|
|
var keyCode = event.keyCode,
|
|
|
shiftKey = event.shiftKey;
|
|
|
switch (keyCode) {
|
|
|
// Tab active
|
|
|
case KeyCode/* default.TAB */.Z.TAB:
|
|
|
{
|
|
|
if (keyCode === KeyCode/* default.TAB */.Z.TAB) {
|
|
|
if (!shiftKey && document.activeElement === sentinelEndRef.current) {
|
|
|
var _sentinelStartRef$cur;
|
|
|
(_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 ? void 0 : _sentinelStartRef$cur.focus({
|
|
|
preventScroll: true
|
|
|
});
|
|
|
} else if (shiftKey && document.activeElement === sentinelStartRef.current) {
|
|
|
var _sentinelEndRef$curre;
|
|
|
(_sentinelEndRef$curre = sentinelEndRef.current) === null || _sentinelEndRef$curre === void 0 ? void 0 : _sentinelEndRef$curre.focus({
|
|
|
preventScroll: true
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
// Close
|
|
|
case KeyCode/* default.ESC */.Z.ESC:
|
|
|
{
|
|
|
if (onClose && keyboard) {
|
|
|
event.stopPropagation();
|
|
|
onClose(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
// ========================== Control ===========================
|
|
|
// Auto Focus
|
|
|
react.useEffect(function () {
|
|
|
if (open && autoFocus) {
|
|
|
var _panelRef$current;
|
|
|
(_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.focus({
|
|
|
preventScroll: true
|
|
|
});
|
|
|
}
|
|
|
}, [open]);
|
|
|
// ============================ Push ============================
|
|
|
var _React$useState = react.useState(false),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
|
pushed = _React$useState2[0],
|
|
|
setPushed = _React$useState2[1];
|
|
|
var parentContext = react.useContext(context);
|
|
|
// Merge push distance
|
|
|
var pushConfig;
|
|
|
if (push === false) {
|
|
|
pushConfig = {
|
|
|
distance: 0
|
|
|
};
|
|
|
} else if (push === true) {
|
|
|
pushConfig = {};
|
|
|
} else {
|
|
|
pushConfig = push || {};
|
|
|
}
|
|
|
var pushDistance = (_ref = (_pushConfig$distance = (_pushConfig = pushConfig) === null || _pushConfig === void 0 ? void 0 : _pushConfig.distance) !== null && _pushConfig$distance !== void 0 ? _pushConfig$distance : parentContext === null || parentContext === void 0 ? void 0 : parentContext.pushDistance) !== null && _ref !== void 0 ? _ref : 180;
|
|
|
var mergedContext = react.useMemo(function () {
|
|
|
return {
|
|
|
pushDistance: pushDistance,
|
|
|
push: function push() {
|
|
|
setPushed(true);
|
|
|
},
|
|
|
pull: function pull() {
|
|
|
setPushed(false);
|
|
|
}
|
|
|
};
|
|
|
}, [pushDistance]);
|
|
|
// ========================= ScrollLock =========================
|
|
|
// Tell parent to push
|
|
|
react.useEffect(function () {
|
|
|
if (open) {
|
|
|
var _parentContext$push;
|
|
|
parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$push = parentContext.push) === null || _parentContext$push === void 0 ? void 0 : _parentContext$push.call(parentContext);
|
|
|
} else {
|
|
|
var _parentContext$pull;
|
|
|
parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull = parentContext.pull) === null || _parentContext$pull === void 0 ? void 0 : _parentContext$pull.call(parentContext);
|
|
|
}
|
|
|
}, [open]);
|
|
|
// Clean up
|
|
|
react.useEffect(function () {
|
|
|
return function () {
|
|
|
var _parentContext$pull2;
|
|
|
parentContext === null || parentContext === void 0 ? void 0 : (_parentContext$pull2 = parentContext.pull) === null || _parentContext$pull2 === void 0 ? void 0 : _parentContext$pull2.call(parentContext);
|
|
|
};
|
|
|
}, []);
|
|
|
// ============================ Mask ============================
|
|
|
var maskNode = mask && /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
|
key: "mask"
|
|
|
}, maskMotion, {
|
|
|
visible: open
|
|
|
}), function (_ref2, maskRef) {
|
|
|
var motionMaskClassName = _ref2.className,
|
|
|
motionMaskStyle = _ref2.style;
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: classnames_default()("".concat(prefixCls, "-mask"), motionMaskClassName, maskClassName),
|
|
|
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, motionMaskStyle), maskStyle),
|
|
|
onClick: maskClosable && open ? onClose : undefined,
|
|
|
ref: maskRef
|
|
|
});
|
|
|
});
|
|
|
// =========================== Panel ============================
|
|
|
var motionProps = typeof motion === 'function' ? motion(placement) : motion;
|
|
|
var wrapperStyle = {};
|
|
|
if (pushed && pushDistance) {
|
|
|
switch (placement) {
|
|
|
case 'top':
|
|
|
wrapperStyle.transform = "translateY(".concat(pushDistance, "px)");
|
|
|
break;
|
|
|
case 'bottom':
|
|
|
wrapperStyle.transform = "translateY(".concat(-pushDistance, "px)");
|
|
|
break;
|
|
|
case 'left':
|
|
|
wrapperStyle.transform = "translateX(".concat(pushDistance, "px)");
|
|
|
break;
|
|
|
default:
|
|
|
wrapperStyle.transform = "translateX(".concat(-pushDistance, "px)");
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if (placement === 'left' || placement === 'right') {
|
|
|
wrapperStyle.width = parseWidthHeight(width);
|
|
|
} else {
|
|
|
wrapperStyle.height = parseWidthHeight(height);
|
|
|
}
|
|
|
var eventHandlers = {
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseOver: onMouseOver,
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
onClick: onClick,
|
|
|
onKeyDown: onKeyDown,
|
|
|
onKeyUp: onKeyUp
|
|
|
};
|
|
|
var panelNode = /*#__PURE__*/react.createElement(rc_motion_es/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
|
key: "panel"
|
|
|
}, motionProps, {
|
|
|
visible: open,
|
|
|
forceRender: forceRender,
|
|
|
onVisibleChanged: function onVisibleChanged(nextVisible) {
|
|
|
afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible);
|
|
|
},
|
|
|
removeOnLeave: false,
|
|
|
leavedClassName: "".concat(prefixCls, "-content-wrapper-hidden")
|
|
|
}), function (_ref3, motionRef) {
|
|
|
var motionClassName = _ref3.className,
|
|
|
motionStyle = _ref3.style;
|
|
|
return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
|
|
className: classnames_default()("".concat(prefixCls, "-content-wrapper"), motionClassName),
|
|
|
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, wrapperStyle), motionStyle), contentWrapperStyle)
|
|
|
}, (0,pickAttrs/* default */.Z)(props, {
|
|
|
data: true
|
|
|
})), /*#__PURE__*/react.createElement(es_DrawerPanel, (0,esm_extends/* default */.Z)({
|
|
|
containerRef: motionRef,
|
|
|
prefixCls: prefixCls,
|
|
|
className: className,
|
|
|
style: style
|
|
|
}, eventHandlers), children));
|
|
|
});
|
|
|
// =========================== Render ===========================
|
|
|
var containerStyle = (0,objectSpread2/* default */.Z)({}, rootStyle);
|
|
|
if (zIndex) {
|
|
|
containerStyle.zIndex = zIndex;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(context.Provider, {
|
|
|
value: mergedContext
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), rootClassName, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-open"), open), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-inline"), inline), _classNames)),
|
|
|
style: containerStyle,
|
|
|
tabIndex: -1,
|
|
|
ref: panelRef,
|
|
|
onKeyDown: onPanelKeyDown
|
|
|
}, maskNode, /*#__PURE__*/react.createElement("div", {
|
|
|
tabIndex: 0,
|
|
|
ref: sentinelStartRef,
|
|
|
style: sentinelStyle,
|
|
|
"aria-hidden": "true",
|
|
|
"data-sentinel": "start"
|
|
|
}), panelNode, /*#__PURE__*/react.createElement("div", {
|
|
|
tabIndex: 0,
|
|
|
ref: sentinelEndRef,
|
|
|
style: sentinelStyle,
|
|
|
"aria-hidden": "true",
|
|
|
"data-sentinel": "end"
|
|
|
})));
|
|
|
}
|
|
|
var RefDrawerPopup = /*#__PURE__*/react.forwardRef(DrawerPopup);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_DrawerPopup = (RefDrawerPopup);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/Drawer.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Drawer = function Drawer(props) {
|
|
|
var _props$open = props.open,
|
|
|
open = _props$open === void 0 ? false : _props$open,
|
|
|
_props$prefixCls = props.prefixCls,
|
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls,
|
|
|
_props$placement = props.placement,
|
|
|
placement = _props$placement === void 0 ? 'right' : _props$placement,
|
|
|
_props$autoFocus = props.autoFocus,
|
|
|
autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,
|
|
|
_props$keyboard = props.keyboard,
|
|
|
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
|
|
|
_props$width = props.width,
|
|
|
width = _props$width === void 0 ? 378 : _props$width,
|
|
|
_props$mask = props.mask,
|
|
|
mask = _props$mask === void 0 ? true : _props$mask,
|
|
|
_props$maskClosable = props.maskClosable,
|
|
|
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
|
|
|
getContainer = props.getContainer,
|
|
|
forceRender = props.forceRender,
|
|
|
afterOpenChange = props.afterOpenChange,
|
|
|
destroyOnClose = props.destroyOnClose,
|
|
|
onMouseEnter = props.onMouseEnter,
|
|
|
onMouseOver = props.onMouseOver,
|
|
|
onMouseLeave = props.onMouseLeave,
|
|
|
onClick = props.onClick,
|
|
|
onKeyDown = props.onKeyDown,
|
|
|
onKeyUp = props.onKeyUp;
|
|
|
var _React$useState = react.useState(false),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
|
animatedVisible = _React$useState2[0],
|
|
|
setAnimatedVisible = _React$useState2[1];
|
|
|
// ============================= Warn =============================
|
|
|
if (false) {}
|
|
|
// ============================= Open =============================
|
|
|
var _React$useState3 = react.useState(false),
|
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
|
mounted = _React$useState4[0],
|
|
|
setMounted = _React$useState4[1];
|
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
|
setMounted(true);
|
|
|
}, []);
|
|
|
var mergedOpen = mounted ? open : false;
|
|
|
// ============================ Focus =============================
|
|
|
var panelRef = react.useRef();
|
|
|
var lastActiveRef = react.useRef();
|
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
|
if (mergedOpen) {
|
|
|
lastActiveRef.current = document.activeElement;
|
|
|
}
|
|
|
}, [mergedOpen]);
|
|
|
// ============================= Open =============================
|
|
|
var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) {
|
|
|
var _panelRef$current;
|
|
|
setAnimatedVisible(nextVisible);
|
|
|
afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible);
|
|
|
if (!nextVisible && lastActiveRef.current && !((_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.contains(lastActiveRef.current))) {
|
|
|
var _lastActiveRef$curren;
|
|
|
(_lastActiveRef$curren = lastActiveRef.current) === null || _lastActiveRef$curren === void 0 ? void 0 : _lastActiveRef$curren.focus({
|
|
|
preventScroll: true
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
// ============================ Render ============================
|
|
|
if (!forceRender && !animatedVisible && !mergedOpen && destroyOnClose) {
|
|
|
return null;
|
|
|
}
|
|
|
var eventHandlers = {
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseOver: onMouseOver,
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
onClick: onClick,
|
|
|
onKeyDown: onKeyDown,
|
|
|
onKeyUp: onKeyUp
|
|
|
};
|
|
|
var drawerPopupProps = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
|
open: mergedOpen,
|
|
|
prefixCls: prefixCls,
|
|
|
placement: placement,
|
|
|
autoFocus: autoFocus,
|
|
|
keyboard: keyboard,
|
|
|
width: width,
|
|
|
mask: mask,
|
|
|
maskClosable: maskClosable,
|
|
|
inline: getContainer === false,
|
|
|
afterOpenChange: internalAfterOpenChange,
|
|
|
ref: panelRef
|
|
|
}, eventHandlers);
|
|
|
return /*#__PURE__*/react.createElement(es, {
|
|
|
open: mergedOpen || forceRender || animatedVisible,
|
|
|
autoDestroy: false,
|
|
|
getContainer: getContainer,
|
|
|
autoLock: mask && (mergedOpen || animatedVisible)
|
|
|
}, /*#__PURE__*/react.createElement(es_DrawerPopup, drawerPopupProps));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_Drawer = (Drawer);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-drawer/es/index.js
|
|
|
// export this package's api
|
|
|
|
|
|
/* harmony default export */ var rc_drawer_es = (es_Drawer);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/motion.js
|
|
|
var motion = __webpack_require__(33603);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var config_provider_context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
|
|
|
var form_context = __webpack_require__(65223);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useClosable.js
|
|
|
var useClosable = __webpack_require__(69760);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/DrawerPanel.js
|
|
|
|
|
|
|
|
|
|
|
|
const DrawerPanel_DrawerPanel = props => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
title,
|
|
|
footer,
|
|
|
extra,
|
|
|
closeIcon,
|
|
|
closable,
|
|
|
onClose,
|
|
|
headerStyle,
|
|
|
drawerStyle,
|
|
|
bodyStyle,
|
|
|
footerStyle,
|
|
|
children
|
|
|
} = props;
|
|
|
const customCloseIconRender = react.useCallback(icon => /*#__PURE__*/react.createElement("button", {
|
|
|
type: "button",
|
|
|
onClick: onClose,
|
|
|
"aria-label": "Close",
|
|
|
className: `${prefixCls}-close`
|
|
|
}, icon), [onClose]);
|
|
|
const [mergedClosable, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, customCloseIconRender, undefined, true);
|
|
|
const headerNode = react.useMemo(() => {
|
|
|
if (!title && !mergedClosable) {
|
|
|
return null;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
style: headerStyle,
|
|
|
className: classnames_default()(`${prefixCls}-header`, {
|
|
|
[`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra
|
|
|
})
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-header-title`
|
|
|
}, mergedCloseIcon, title && /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, title)), extra && /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-extra`
|
|
|
}, extra));
|
|
|
}, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);
|
|
|
const footerNode = react.useMemo(() => {
|
|
|
if (!footer) {
|
|
|
return null;
|
|
|
}
|
|
|
const footerClassName = `${prefixCls}-footer`;
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: footerClassName,
|
|
|
style: footerStyle
|
|
|
}, footer);
|
|
|
}, [footer, footerStyle, prefixCls]);
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-wrapper-body`,
|
|
|
style: drawerStyle
|
|
|
}, headerNode, /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-body`,
|
|
|
style: bodyStyle
|
|
|
}, children), footerNode);
|
|
|
};
|
|
|
/* harmony default export */ var drawer_DrawerPanel = (DrawerPanel_DrawerPanel);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
|
|
|
var Compact = __webpack_require__(4173);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/motion.js
|
|
|
const genMotionStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
motionDurationSlow
|
|
|
} = token;
|
|
|
const sharedPanelMotion = {
|
|
|
'&-enter, &-appear, &-leave': {
|
|
|
'&-start': {
|
|
|
transition: 'none'
|
|
|
},
|
|
|
'&-active': {
|
|
|
transition: `all ${motionDurationSlow}`
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
// ======================== Mask ========================
|
|
|
[`${componentCls}-mask-motion`]: {
|
|
|
'&-enter, &-appear, &-leave': {
|
|
|
'&-active': {
|
|
|
transition: `all ${motionDurationSlow}`
|
|
|
}
|
|
|
},
|
|
|
'&-enter, &-appear': {
|
|
|
opacity: 0,
|
|
|
'&-active': {
|
|
|
opacity: 1
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
opacity: 1,
|
|
|
'&-active': {
|
|
|
opacity: 0
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
// ======================= Panel ========================
|
|
|
[`${componentCls}-panel-motion`]: {
|
|
|
// Left
|
|
|
'&-left': [sharedPanelMotion, {
|
|
|
'&-enter, &-appear': {
|
|
|
'&-start': {
|
|
|
transform: 'translateX(-100%) !important'
|
|
|
},
|
|
|
'&-active': {
|
|
|
transform: 'translateX(0)'
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
transform: 'translateX(0)',
|
|
|
'&-active': {
|
|
|
transform: 'translateX(-100%)'
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
// Right
|
|
|
'&-right': [sharedPanelMotion, {
|
|
|
'&-enter, &-appear': {
|
|
|
'&-start': {
|
|
|
transform: 'translateX(100%) !important'
|
|
|
},
|
|
|
'&-active': {
|
|
|
transform: 'translateX(0)'
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
transform: 'translateX(0)',
|
|
|
'&-active': {
|
|
|
transform: 'translateX(100%)'
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
// Top
|
|
|
'&-top': [sharedPanelMotion, {
|
|
|
'&-enter, &-appear': {
|
|
|
'&-start': {
|
|
|
transform: 'translateY(-100%) !important'
|
|
|
},
|
|
|
'&-active': {
|
|
|
transform: 'translateY(0)'
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
transform: 'translateY(0)',
|
|
|
'&-active': {
|
|
|
transform: 'translateY(-100%)'
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
// Bottom
|
|
|
'&-bottom': [sharedPanelMotion, {
|
|
|
'&-enter, &-appear': {
|
|
|
'&-start': {
|
|
|
transform: 'translateY(100%) !important'
|
|
|
},
|
|
|
'&-active': {
|
|
|
transform: 'translateY(0)'
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
transform: 'translateY(0)',
|
|
|
'&-active': {
|
|
|
transform: 'translateY(100%)'
|
|
|
}
|
|
|
}
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
/* harmony default export */ var style_motion = (genMotionStyle);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/style/index.js
|
|
|
|
|
|
|
|
|
// =============================== Base ===============================
|
|
|
const genDrawerStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
zIndexPopup,
|
|
|
colorBgMask,
|
|
|
colorBgElevated,
|
|
|
motionDurationSlow,
|
|
|
motionDurationMid,
|
|
|
padding,
|
|
|
paddingLG,
|
|
|
fontSizeLG,
|
|
|
lineHeightLG,
|
|
|
lineWidth,
|
|
|
lineType,
|
|
|
colorSplit,
|
|
|
marginSM,
|
|
|
colorIcon,
|
|
|
colorIconHover,
|
|
|
colorText,
|
|
|
fontWeightStrong,
|
|
|
footerPaddingBlock,
|
|
|
footerPaddingInline
|
|
|
} = token;
|
|
|
const wrapperCls = `${componentCls}-content-wrapper`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
position: 'fixed',
|
|
|
inset: 0,
|
|
|
zIndex: zIndexPopup,
|
|
|
pointerEvents: 'none',
|
|
|
'&-pure': {
|
|
|
position: 'relative',
|
|
|
background: colorBgElevated,
|
|
|
[`&${componentCls}-left`]: {
|
|
|
boxShadow: token.boxShadowDrawerLeft
|
|
|
},
|
|
|
[`&${componentCls}-right`]: {
|
|
|
boxShadow: token.boxShadowDrawerRight
|
|
|
},
|
|
|
[`&${componentCls}-top`]: {
|
|
|
boxShadow: token.boxShadowDrawerUp
|
|
|
},
|
|
|
[`&${componentCls}-bottom`]: {
|
|
|
boxShadow: token.boxShadowDrawerDown
|
|
|
}
|
|
|
},
|
|
|
'&-inline': {
|
|
|
position: 'absolute'
|
|
|
},
|
|
|
// ====================== Mask ======================
|
|
|
[`${componentCls}-mask`]: {
|
|
|
position: 'absolute',
|
|
|
inset: 0,
|
|
|
zIndex: zIndexPopup,
|
|
|
background: colorBgMask,
|
|
|
pointerEvents: 'auto'
|
|
|
},
|
|
|
// ==================== Content =====================
|
|
|
[wrapperCls]: {
|
|
|
position: 'absolute',
|
|
|
zIndex: zIndexPopup,
|
|
|
maxWidth: '100vw',
|
|
|
transition: `all ${motionDurationSlow}`,
|
|
|
'&-hidden': {
|
|
|
display: 'none'
|
|
|
}
|
|
|
},
|
|
|
// Placement
|
|
|
[`&-left > ${wrapperCls}`]: {
|
|
|
top: 0,
|
|
|
bottom: 0,
|
|
|
left: {
|
|
|
_skip_check_: true,
|
|
|
value: 0
|
|
|
},
|
|
|
boxShadow: token.boxShadowDrawerLeft
|
|
|
},
|
|
|
[`&-right > ${wrapperCls}`]: {
|
|
|
top: 0,
|
|
|
right: {
|
|
|
_skip_check_: true,
|
|
|
value: 0
|
|
|
},
|
|
|
bottom: 0,
|
|
|
boxShadow: token.boxShadowDrawerRight
|
|
|
},
|
|
|
[`&-top > ${wrapperCls}`]: {
|
|
|
top: 0,
|
|
|
insetInline: 0,
|
|
|
boxShadow: token.boxShadowDrawerUp
|
|
|
},
|
|
|
[`&-bottom > ${wrapperCls}`]: {
|
|
|
bottom: 0,
|
|
|
insetInline: 0,
|
|
|
boxShadow: token.boxShadowDrawerDown
|
|
|
},
|
|
|
[`${componentCls}-content`]: {
|
|
|
width: '100%',
|
|
|
height: '100%',
|
|
|
overflow: 'auto',
|
|
|
background: colorBgElevated,
|
|
|
pointerEvents: 'auto'
|
|
|
},
|
|
|
// ===================== Panel ======================
|
|
|
[`${componentCls}-wrapper-body`]: {
|
|
|
display: 'flex',
|
|
|
flexDirection: 'column',
|
|
|
width: '100%',
|
|
|
height: '100%'
|
|
|
},
|
|
|
// Header
|
|
|
[`${componentCls}-header`]: {
|
|
|
display: 'flex',
|
|
|
flex: 0,
|
|
|
alignItems: 'center',
|
|
|
padding: `${padding}px ${paddingLG}px`,
|
|
|
fontSize: fontSizeLG,
|
|
|
lineHeight: lineHeightLG,
|
|
|
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`,
|
|
|
'&-title': {
|
|
|
display: 'flex',
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
minWidth: 0,
|
|
|
minHeight: 0
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-extra`]: {
|
|
|
flex: 'none'
|
|
|
},
|
|
|
[`${componentCls}-close`]: {
|
|
|
display: 'inline-block',
|
|
|
marginInlineEnd: marginSM,
|
|
|
color: colorIcon,
|
|
|
fontWeight: fontWeightStrong,
|
|
|
fontSize: fontSizeLG,
|
|
|
fontStyle: 'normal',
|
|
|
lineHeight: 1,
|
|
|
textAlign: 'center',
|
|
|
textTransform: 'none',
|
|
|
textDecoration: 'none',
|
|
|
background: 'transparent',
|
|
|
border: 0,
|
|
|
outline: 0,
|
|
|
cursor: 'pointer',
|
|
|
transition: `color ${motionDurationMid}`,
|
|
|
textRendering: 'auto',
|
|
|
'&:focus, &:hover': {
|
|
|
color: colorIconHover,
|
|
|
textDecoration: 'none'
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
flex: 1,
|
|
|
margin: 0,
|
|
|
color: colorText,
|
|
|
fontWeight: token.fontWeightStrong,
|
|
|
fontSize: fontSizeLG,
|
|
|
lineHeight: lineHeightLG
|
|
|
},
|
|
|
// Body
|
|
|
[`${componentCls}-body`]: {
|
|
|
flex: 1,
|
|
|
minWidth: 0,
|
|
|
minHeight: 0,
|
|
|
padding: paddingLG,
|
|
|
overflow: 'auto'
|
|
|
},
|
|
|
// Footer
|
|
|
[`${componentCls}-footer`]: {
|
|
|
flexShrink: 0,
|
|
|
padding: `${footerPaddingBlock}px ${footerPaddingInline}px`,
|
|
|
borderTop: `${lineWidth}px ${lineType} ${colorSplit}`
|
|
|
},
|
|
|
// ====================== RTL =======================
|
|
|
'&-rtl': {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var drawer_style = ((0,genComponentStyleHook/* default */.Z)('Drawer', token => {
|
|
|
const drawerToken = (0,statistic/* merge */.TS)(token, {});
|
|
|
return [genDrawerStyle(drawerToken), style_motion(drawerToken)];
|
|
|
}, token => ({
|
|
|
zIndexPopup: token.zIndexPopupBase,
|
|
|
footerPaddingBlock: token.paddingXS,
|
|
|
footerPaddingInline: token.padding
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/drawer/index.js
|
|
|
'use client';
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSSINJS
|
|
|
|
|
|
|
|
|
const SizeTypes = (/* unused pure expression or super */ null && (['default', 'large']));
|
|
|
const defaultPushState = {
|
|
|
distance: 180
|
|
|
};
|
|
|
function drawer_Drawer(props) {
|
|
|
var _a;
|
|
|
const {
|
|
|
rootClassName,
|
|
|
width,
|
|
|
height,
|
|
|
size = 'default',
|
|
|
mask = true,
|
|
|
push = defaultPushState,
|
|
|
open,
|
|
|
afterOpenChange,
|
|
|
onClose,
|
|
|
prefixCls: customizePrefixCls,
|
|
|
getContainer: customizeGetContainer,
|
|
|
style,
|
|
|
className,
|
|
|
// Deprecated
|
|
|
visible,
|
|
|
afterVisibleChange
|
|
|
} = props,
|
|
|
rest = __rest(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "style", "className", "visible", "afterVisibleChange"]);
|
|
|
const {
|
|
|
getPopupContainer,
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
drawer
|
|
|
} = react.useContext(config_provider_context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('drawer', customizePrefixCls);
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = drawer_style(prefixCls);
|
|
|
const getContainer =
|
|
|
// 有可能为 false,所以不能直接判断
|
|
|
customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer;
|
|
|
const drawerClassName = classnames_default()({
|
|
|
'no-mask': !mask,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, rootClassName, hashId);
|
|
|
// ========================== Warning ===========================
|
|
|
if (false) {}
|
|
|
// ============================ Size ============================
|
|
|
const mergedWidth = react.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]);
|
|
|
const mergedHeight = react.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]);
|
|
|
// =========================== Motion ===========================
|
|
|
const maskMotion = {
|
|
|
motionName: (0,motion/* getTransitionName */.mL)(prefixCls, 'mask-motion'),
|
|
|
motionAppear: true,
|
|
|
motionEnter: true,
|
|
|
motionLeave: true,
|
|
|
motionDeadline: 500
|
|
|
};
|
|
|
const panelMotion = motionPlacement => ({
|
|
|
motionName: (0,motion/* getTransitionName */.mL)(prefixCls, `panel-motion-${motionPlacement}`),
|
|
|
motionAppear: true,
|
|
|
motionEnter: true,
|
|
|
motionLeave: true,
|
|
|
motionDeadline: 500
|
|
|
});
|
|
|
// =========================== Render ===========================
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/react.createElement(form_context/* NoFormStyle */.Ux, {
|
|
|
status: true,
|
|
|
override: true
|
|
|
}, /*#__PURE__*/react.createElement(rc_drawer_es, Object.assign({
|
|
|
prefixCls: prefixCls,
|
|
|
onClose: onClose,
|
|
|
maskMotion: maskMotion,
|
|
|
motion: panelMotion
|
|
|
}, rest, {
|
|
|
open: open !== null && open !== void 0 ? open : visible,
|
|
|
mask: mask,
|
|
|
push: push,
|
|
|
width: mergedWidth,
|
|
|
height: mergedHeight,
|
|
|
style: Object.assign(Object.assign({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style),
|
|
|
className: classnames_default()(drawer === null || drawer === void 0 ? void 0 : drawer.className, className),
|
|
|
rootClassName: drawerClassName,
|
|
|
getContainer: getContainer,
|
|
|
afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange
|
|
|
}), /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({
|
|
|
prefixCls: prefixCls
|
|
|
}, rest, {
|
|
|
onClose: onClose
|
|
|
}))))));
|
|
|
}
|
|
|
if (false) {}
|
|
|
function PurePanel(_a) {
|
|
|
var {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
style,
|
|
|
className,
|
|
|
placement = 'right'
|
|
|
} = _a,
|
|
|
restProps = __rest(_a, ["prefixCls", "style", "className", "placement"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react.useContext(config_provider_context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('drawer', customizePrefixCls);
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = drawer_style(prefixCls);
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement("div", {
|
|
|
className: classnames_default()(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, className),
|
|
|
style: style
|
|
|
}, /*#__PURE__*/react.createElement(drawer_DrawerPanel, Object.assign({
|
|
|
prefixCls: prefixCls
|
|
|
}, restProps))));
|
|
|
}
|
|
|
drawer_Drawer._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
|
|
/* harmony default export */ var drawer = (drawer_Drawer);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 59606:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/rate/index.js + 8 modules ***!
|
|
|
\********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ rate; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js
|
|
|
// This icon file is generated automatically.
|
|
|
var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" };
|
|
|
/* harmony default export */ var asn_StarFilled = (StarFilled);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
|
var AntdIcon = __webpack_require__(74643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/StarFilled.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var StarFilled_StarFilled = function StarFilled(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_StarFilled
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_StarFilled = (/*#__PURE__*/react.forwardRef(StarFilled_StarFilled));
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(45987);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(21770);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__(15105);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__(64217);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Star.js
|
|
|
|
|
|
|
|
|
|
|
|
function Star(props, ref) {
|
|
|
var disabled = props.disabled,
|
|
|
prefixCls = props.prefixCls,
|
|
|
character = props.character,
|
|
|
characterRender = props.characterRender,
|
|
|
index = props.index,
|
|
|
count = props.count,
|
|
|
value = props.value,
|
|
|
allowHalf = props.allowHalf,
|
|
|
focused = props.focused,
|
|
|
onHover = props.onHover,
|
|
|
onClick = props.onClick;
|
|
|
// =========================== Events ===========================
|
|
|
var onInternalHover = function onInternalHover(e) {
|
|
|
onHover(e, index);
|
|
|
};
|
|
|
var onInternalClick = function onInternalClick(e) {
|
|
|
onClick(e, index);
|
|
|
};
|
|
|
var onInternalKeyDown = function onInternalKeyDown(e) {
|
|
|
if (e.keyCode === KeyCode/* default.ENTER */.Z.ENTER) {
|
|
|
onClick(e, index);
|
|
|
}
|
|
|
};
|
|
|
// =========================== Render ===========================
|
|
|
// >>>>> ClassName
|
|
|
var starValue = index + 1;
|
|
|
var classNameList = new Set([prefixCls]);
|
|
|
// TODO: Current we just refactor from CC to FC. This logic seems can be optimized.
|
|
|
if (value === 0 && index === 0 && focused) {
|
|
|
classNameList.add("".concat(prefixCls, "-focused"));
|
|
|
} else if (allowHalf && value + 0.5 >= starValue && value < starValue) {
|
|
|
classNameList.add("".concat(prefixCls, "-half"));
|
|
|
classNameList.add("".concat(prefixCls, "-active"));
|
|
|
if (focused) {
|
|
|
classNameList.add("".concat(prefixCls, "-focused"));
|
|
|
}
|
|
|
} else {
|
|
|
if (starValue <= value) {
|
|
|
classNameList.add("".concat(prefixCls, "-full"));
|
|
|
} else {
|
|
|
classNameList.add("".concat(prefixCls, "-zero"));
|
|
|
}
|
|
|
if (starValue === value && focused) {
|
|
|
classNameList.add("".concat(prefixCls, "-focused"));
|
|
|
}
|
|
|
}
|
|
|
// >>>>> Node
|
|
|
var characterNode = typeof character === 'function' ? character(props) : character;
|
|
|
var start = /*#__PURE__*/react.createElement("li", {
|
|
|
className: classnames_default()(Array.from(classNameList)),
|
|
|
ref: ref
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
onClick: disabled ? null : onInternalClick,
|
|
|
onKeyDown: disabled ? null : onInternalKeyDown,
|
|
|
onMouseMove: disabled ? null : onInternalHover,
|
|
|
role: "radio",
|
|
|
"aria-checked": value > index ? 'true' : 'false',
|
|
|
"aria-posinset": index + 1,
|
|
|
"aria-setsize": count,
|
|
|
tabIndex: disabled ? -1 : 0
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-first")
|
|
|
}, characterNode), /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-second")
|
|
|
}, characterNode)));
|
|
|
if (characterRender) {
|
|
|
start = characterRender(start, props);
|
|
|
}
|
|
|
return start;
|
|
|
}
|
|
|
/* harmony default export */ var es_Star = (/*#__PURE__*/react.forwardRef(Star));
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-rate/es/useRefs.js
|
|
|
|
|
|
function useRefs() {
|
|
|
var nodeRef = react.useRef({});
|
|
|
function getRef(index) {
|
|
|
return nodeRef.current[index];
|
|
|
}
|
|
|
function setRef(index) {
|
|
|
return function (node) {
|
|
|
nodeRef.current[index] = node;
|
|
|
};
|
|
|
}
|
|
|
return [getRef, setRef];
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-rate/es/util.js
|
|
|
function getScroll(w) {
|
|
|
var ret = w.pageXOffset;
|
|
|
var method = 'scrollLeft';
|
|
|
if (typeof ret !== 'number') {
|
|
|
var d = w.document;
|
|
|
// ie6,7,8 standard mode
|
|
|
ret = d.documentElement[method];
|
|
|
if (typeof ret !== 'number') {
|
|
|
// quirks mode
|
|
|
ret = d.body[method];
|
|
|
}
|
|
|
}
|
|
|
return ret;
|
|
|
}
|
|
|
function getClientPosition(elem) {
|
|
|
var x;
|
|
|
var y;
|
|
|
var doc = elem.ownerDocument;
|
|
|
var body = doc.body;
|
|
|
var docElem = doc && doc.documentElement;
|
|
|
var box = elem.getBoundingClientRect();
|
|
|
x = box.left;
|
|
|
y = box.top;
|
|
|
x -= docElem.clientLeft || body.clientLeft || 0;
|
|
|
y -= docElem.clientTop || body.clientTop || 0;
|
|
|
return {
|
|
|
left: x,
|
|
|
top: y
|
|
|
};
|
|
|
}
|
|
|
function getOffsetLeft(el) {
|
|
|
var pos = getClientPosition(el);
|
|
|
var doc = el.ownerDocument;
|
|
|
// Only IE use `parentWindow`
|
|
|
var w = doc.defaultView || doc.parentWindow;
|
|
|
pos.left += getScroll(w);
|
|
|
return pos.left;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-rate/es/Rate.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Rate(props, ref) {
|
|
|
var _classNames;
|
|
|
var _props$prefixCls = props.prefixCls,
|
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls,
|
|
|
className = props.className,
|
|
|
defaultValue = props.defaultValue,
|
|
|
propValue = props.value,
|
|
|
_props$count = props.count,
|
|
|
count = _props$count === void 0 ? 5 : _props$count,
|
|
|
_props$allowHalf = props.allowHalf,
|
|
|
allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf,
|
|
|
_props$allowClear = props.allowClear,
|
|
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
|
_props$character = props.character,
|
|
|
character = _props$character === void 0 ? '★' : _props$character,
|
|
|
characterRender = props.characterRender,
|
|
|
disabled = props.disabled,
|
|
|
_props$direction = props.direction,
|
|
|
direction = _props$direction === void 0 ? 'ltr' : _props$direction,
|
|
|
_props$tabIndex = props.tabIndex,
|
|
|
tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
|
|
|
autoFocus = props.autoFocus,
|
|
|
onHoverChange = props.onHoverChange,
|
|
|
onChange = props.onChange,
|
|
|
onFocus = props.onFocus,
|
|
|
onBlur = props.onBlur,
|
|
|
onKeyDown = props.onKeyDown,
|
|
|
onMouseLeave = props.onMouseLeave,
|
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
|
var _useRefs = useRefs(),
|
|
|
_useRefs2 = (0,slicedToArray/* default */.Z)(_useRefs, 2),
|
|
|
getStarRef = _useRefs2[0],
|
|
|
setStarRef = _useRefs2[1];
|
|
|
var rateRef = react.useRef(null);
|
|
|
// ============================ Ref =============================
|
|
|
var triggerFocus = function triggerFocus() {
|
|
|
if (!disabled) {
|
|
|
var _rateRef$current;
|
|
|
(_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 ? void 0 : _rateRef$current.focus();
|
|
|
}
|
|
|
};
|
|
|
react.useImperativeHandle(ref, function () {
|
|
|
return {
|
|
|
focus: triggerFocus,
|
|
|
blur: function blur() {
|
|
|
if (!disabled) {
|
|
|
var _rateRef$current2;
|
|
|
(_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 ? void 0 : _rateRef$current2.blur();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
});
|
|
|
// =========================== Value ============================
|
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(defaultValue || 0, {
|
|
|
value: propValue
|
|
|
}),
|
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
|
value = _useMergedState2[0],
|
|
|
setValue = _useMergedState2[1];
|
|
|
var _useMergedState3 = (0,useMergedState/* default */.Z)(null),
|
|
|
_useMergedState4 = (0,slicedToArray/* default */.Z)(_useMergedState3, 2),
|
|
|
cleanedValue = _useMergedState4[0],
|
|
|
setCleanedValue = _useMergedState4[1];
|
|
|
var getStarValue = function getStarValue(index, x) {
|
|
|
var reverse = direction === 'rtl';
|
|
|
var starValue = index + 1;
|
|
|
if (allowHalf) {
|
|
|
var starEle = getStarRef(index);
|
|
|
var leftDis = getOffsetLeft(starEle);
|
|
|
var width = starEle.clientWidth;
|
|
|
if (reverse && x - leftDis > width / 2) {
|
|
|
starValue -= 0.5;
|
|
|
} else if (!reverse && x - leftDis < width / 2) {
|
|
|
starValue -= 0.5;
|
|
|
}
|
|
|
}
|
|
|
return starValue;
|
|
|
};
|
|
|
// >>>>> Change
|
|
|
var changeValue = function changeValue(nextValue) {
|
|
|
setValue(nextValue);
|
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
|
};
|
|
|
// =========================== Focus ============================
|
|
|
var _React$useState = react.useState(false),
|
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
|
focused = _React$useState2[0],
|
|
|
setFocused = _React$useState2[1];
|
|
|
var onInternalFocus = function onInternalFocus() {
|
|
|
setFocused(true);
|
|
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
|
};
|
|
|
var onInternalBlur = function onInternalBlur() {
|
|
|
setFocused(false);
|
|
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur();
|
|
|
};
|
|
|
// =========================== Hover ============================
|
|
|
var _React$useState3 = react.useState(null),
|
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
|
hoverValue = _React$useState4[0],
|
|
|
setHoverValue = _React$useState4[1];
|
|
|
var onHover = function onHover(event, index) {
|
|
|
var nextHoverValue = getStarValue(index, event.pageX);
|
|
|
if (nextHoverValue !== cleanedValue) {
|
|
|
setHoverValue(nextHoverValue);
|
|
|
setCleanedValue(null);
|
|
|
}
|
|
|
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(nextHoverValue);
|
|
|
};
|
|
|
var onMouseLeaveCallback = function onMouseLeaveCallback(event) {
|
|
|
if (!disabled) {
|
|
|
setHoverValue(null);
|
|
|
setCleanedValue(null);
|
|
|
onHoverChange === null || onHoverChange === void 0 ? void 0 : onHoverChange(undefined);
|
|
|
}
|
|
|
if (event) {
|
|
|
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(event);
|
|
|
}
|
|
|
};
|
|
|
// =========================== Click ============================
|
|
|
var onClick = function onClick(event, index) {
|
|
|
var newValue = getStarValue(index, event.pageX);
|
|
|
var isReset = false;
|
|
|
if (allowClear) {
|
|
|
isReset = newValue === value;
|
|
|
}
|
|
|
onMouseLeaveCallback();
|
|
|
changeValue(isReset ? 0 : newValue);
|
|
|
setCleanedValue(isReset ? newValue : null);
|
|
|
};
|
|
|
var onInternalKeyDown = function onInternalKeyDown(event) {
|
|
|
var keyCode = event.keyCode;
|
|
|
var reverse = direction === 'rtl';
|
|
|
var nextValue = value;
|
|
|
if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue < count && !reverse) {
|
|
|
if (allowHalf) {
|
|
|
nextValue += 0.5;
|
|
|
} else {
|
|
|
nextValue += 1;
|
|
|
}
|
|
|
changeValue(nextValue);
|
|
|
event.preventDefault();
|
|
|
} else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue > 0 && !reverse) {
|
|
|
if (allowHalf) {
|
|
|
nextValue -= 0.5;
|
|
|
} else {
|
|
|
nextValue -= 1;
|
|
|
}
|
|
|
changeValue(nextValue);
|
|
|
event.preventDefault();
|
|
|
} else if (keyCode === KeyCode/* default.RIGHT */.Z.RIGHT && nextValue > 0 && reverse) {
|
|
|
if (allowHalf) {
|
|
|
nextValue -= 0.5;
|
|
|
} else {
|
|
|
nextValue -= 1;
|
|
|
}
|
|
|
changeValue(nextValue);
|
|
|
event.preventDefault();
|
|
|
} else if (keyCode === KeyCode/* default.LEFT */.Z.LEFT && nextValue < count && reverse) {
|
|
|
if (allowHalf) {
|
|
|
nextValue += 0.5;
|
|
|
} else {
|
|
|
nextValue += 1;
|
|
|
}
|
|
|
changeValue(nextValue);
|
|
|
event.preventDefault();
|
|
|
}
|
|
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
|
};
|
|
|
// =========================== Effect ===========================
|
|
|
react.useEffect(function () {
|
|
|
if (autoFocus && !disabled) {
|
|
|
triggerFocus();
|
|
|
}
|
|
|
}, []);
|
|
|
// =========================== Render ===========================
|
|
|
// >>> Star
|
|
|
var starNodes = new Array(count).fill(0).map(function (item, index) {
|
|
|
return /*#__PURE__*/react.createElement(es_Star, {
|
|
|
ref: setStarRef(index),
|
|
|
index: index,
|
|
|
count: count,
|
|
|
disabled: disabled,
|
|
|
prefixCls: "".concat(prefixCls, "-star"),
|
|
|
allowHalf: allowHalf,
|
|
|
value: hoverValue === null ? value : hoverValue,
|
|
|
onClick: onClick,
|
|
|
onHover: onHover,
|
|
|
key: item || index,
|
|
|
character: character,
|
|
|
characterRender: characterRender,
|
|
|
focused: focused
|
|
|
});
|
|
|
});
|
|
|
var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
|
|
|
// >>> Node
|
|
|
return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({
|
|
|
className: classString,
|
|
|
onMouseLeave: onMouseLeaveCallback,
|
|
|
tabIndex: disabled ? -1 : tabIndex,
|
|
|
onFocus: disabled ? null : onInternalFocus,
|
|
|
onBlur: disabled ? null : onInternalBlur,
|
|
|
onKeyDown: disabled ? null : onInternalKeyDown,
|
|
|
ref: rateRef,
|
|
|
role: "radiogroup"
|
|
|
}, (0,pickAttrs/* default */.Z)(restProps, {
|
|
|
aria: true,
|
|
|
data: true,
|
|
|
attr: true
|
|
|
})), starNodes);
|
|
|
}
|
|
|
/* harmony default export */ var es_Rate = (/*#__PURE__*/react.forwardRef(Rate));
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-rate/es/index.js
|
|
|
|
|
|
/* harmony default export */ var es = (es_Rate);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(83062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
var style = __webpack_require__(14747);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/rate/style/index.js
|
|
|
|
|
|
|
|
|
const genRateStarStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${componentCls}-star`]: {
|
|
|
position: 'relative',
|
|
|
display: 'inline-block',
|
|
|
color: 'inherit',
|
|
|
cursor: 'pointer',
|
|
|
'&:not(:last-child)': {
|
|
|
marginInlineEnd: token.marginXS
|
|
|
},
|
|
|
'> div': {
|
|
|
transition: `all ${token.motionDurationMid}, outline 0s`,
|
|
|
'&:hover': {
|
|
|
transform: token.starHoverScale
|
|
|
},
|
|
|
'&:focus': {
|
|
|
outline: 0
|
|
|
},
|
|
|
'&:focus-visible': {
|
|
|
outline: `${token.lineWidth}px dashed ${token.starColor}`,
|
|
|
transform: token.starHoverScale
|
|
|
}
|
|
|
},
|
|
|
'&-first, &-second': {
|
|
|
color: token.starBg,
|
|
|
transition: `all ${token.motionDurationMid}`,
|
|
|
userSelect: 'none',
|
|
|
[token.iconCls]: {
|
|
|
verticalAlign: 'middle'
|
|
|
}
|
|
|
},
|
|
|
'&-first': {
|
|
|
position: 'absolute',
|
|
|
top: 0,
|
|
|
insetInlineStart: 0,
|
|
|
width: '50%',
|
|
|
height: '100%',
|
|
|
overflow: 'hidden',
|
|
|
opacity: 0
|
|
|
},
|
|
|
[`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {
|
|
|
opacity: 1
|
|
|
},
|
|
|
[`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {
|
|
|
color: 'inherit'
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genRateRtlStyle = token => ({
|
|
|
[`&-rtl${token.componentCls}`]: {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
});
|
|
|
const genRateStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
display: 'inline-block',
|
|
|
margin: 0,
|
|
|
padding: 0,
|
|
|
color: token.starColor,
|
|
|
fontSize: token.starSize,
|
|
|
lineHeight: 'unset',
|
|
|
listStyle: 'none',
|
|
|
outline: 'none',
|
|
|
// disable styles
|
|
|
[`&-disabled${componentCls} ${componentCls}-star`]: {
|
|
|
cursor: 'default',
|
|
|
'> div:hover': {
|
|
|
transform: 'scale(1)'
|
|
|
}
|
|
|
}
|
|
|
}), genRateStarStyle(token)), {
|
|
|
// text styles
|
|
|
[`+ ${componentCls}-text`]: {
|
|
|
display: 'inline-block',
|
|
|
marginInlineStart: token.marginXS,
|
|
|
fontSize: token.fontSize
|
|
|
}
|
|
|
}), genRateRtlStyle(token))
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var rate_style = ((0,genComponentStyleHook/* default */.Z)('Rate', token => {
|
|
|
const rateToken = (0,statistic/* merge */.TS)(token, {});
|
|
|
return [genRateStyle(rateToken)];
|
|
|
}, token => ({
|
|
|
starColor: token.yellow6,
|
|
|
starSize: token.controlHeightLG * 0.5,
|
|
|
starHoverScale: 'scale(1.1)',
|
|
|
starBg: token.colorFillContent
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/rate/index.js
|
|
|
'use client';
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rate_Rate = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
style,
|
|
|
tooltips,
|
|
|
character = /*#__PURE__*/react.createElement(icons_StarFilled, null)
|
|
|
} = props,
|
|
|
rest = __rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character"]);
|
|
|
const characterRender = (node, _ref) => {
|
|
|
let {
|
|
|
index
|
|
|
} = _ref;
|
|
|
if (!tooltips) {
|
|
|
return node;
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(tooltip/* default */.Z, {
|
|
|
title: tooltips[index]
|
|
|
}, node);
|
|
|
};
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
rate
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const ratePrefixCls = getPrefixCls('rate', prefixCls);
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = rate_style(ratePrefixCls);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement(es, Object.assign({
|
|
|
ref: ref,
|
|
|
character: character,
|
|
|
characterRender: characterRender
|
|
|
}, rest, {
|
|
|
className: classnames_default()(className, rootClassName, hashId, rate === null || rate === void 0 ? void 0 : rate.className),
|
|
|
style: mergedStyle,
|
|
|
prefixCls: ratePrefixCls,
|
|
|
direction: direction
|
|
|
})));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var rate = (rate_Rate);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 55054:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/statistic/index.js + 5 modules ***!
|
|
|
\*************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ es_statistic; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/hooks/useForceUpdate.js
|
|
|
var useForceUpdate = __webpack_require__(57838);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 12 modules
|
|
|
var skeleton = __webpack_require__(21687);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/Number.js
|
|
|
|
|
|
const StatisticNumber = props => {
|
|
|
const {
|
|
|
value,
|
|
|
formatter,
|
|
|
precision,
|
|
|
decimalSeparator,
|
|
|
groupSeparator = '',
|
|
|
prefixCls
|
|
|
} = props;
|
|
|
let valueNode;
|
|
|
if (typeof formatter === 'function') {
|
|
|
// Customize formatter
|
|
|
valueNode = formatter(value);
|
|
|
} else {
|
|
|
// Internal formatter
|
|
|
const val = String(value);
|
|
|
const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
|
|
|
// Process if illegal number
|
|
|
if (!cells || val === '-') {
|
|
|
valueNode = val;
|
|
|
} else {
|
|
|
const negative = cells[1];
|
|
|
let int = cells[2] || '0';
|
|
|
let decimal = cells[4] || '';
|
|
|
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
|
|
if (typeof precision === 'number') {
|
|
|
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
|
|
|
}
|
|
|
if (decimal) {
|
|
|
decimal = `${decimalSeparator}${decimal}`;
|
|
|
}
|
|
|
valueNode = [/*#__PURE__*/react.createElement("span", {
|
|
|
key: "int",
|
|
|
className: `${prefixCls}-content-value-int`
|
|
|
}, negative, int), decimal && /*#__PURE__*/react.createElement("span", {
|
|
|
key: "decimal",
|
|
|
className: `${prefixCls}-content-value-decimal`
|
|
|
}, decimal)];
|
|
|
}
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
|
className: `${prefixCls}-content-value`
|
|
|
}, valueNode);
|
|
|
};
|
|
|
/* harmony default export */ var statistic_Number = (StatisticNumber);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
var style = __webpack_require__(14747);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/style/index.js
|
|
|
|
|
|
|
|
|
const genStatisticStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
marginXXS,
|
|
|
padding,
|
|
|
colorTextDescription,
|
|
|
titleFontSize,
|
|
|
colorTextHeading,
|
|
|
contentFontSize,
|
|
|
fontFamily
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
[`${componentCls}-title`]: {
|
|
|
marginBottom: marginXXS,
|
|
|
color: colorTextDescription,
|
|
|
fontSize: titleFontSize
|
|
|
},
|
|
|
[`${componentCls}-skeleton`]: {
|
|
|
paddingTop: padding
|
|
|
},
|
|
|
[`${componentCls}-content`]: {
|
|
|
color: colorTextHeading,
|
|
|
fontSize: contentFontSize,
|
|
|
fontFamily,
|
|
|
[`${componentCls}-content-value`]: {
|
|
|
display: 'inline-block',
|
|
|
direction: 'ltr'
|
|
|
},
|
|
|
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
|
|
|
display: 'inline-block'
|
|
|
},
|
|
|
[`${componentCls}-content-prefix`]: {
|
|
|
marginInlineEnd: marginXXS
|
|
|
},
|
|
|
[`${componentCls}-content-suffix`]: {
|
|
|
marginInlineStart: marginXXS
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var statistic_style = ((0,genComponentStyleHook/* default */.Z)('Statistic', token => {
|
|
|
const statisticToken = (0,statistic/* merge */.TS)(token, {});
|
|
|
return [genStatisticStyle(statisticToken)];
|
|
|
}, token => {
|
|
|
const {
|
|
|
fontSizeHeading3,
|
|
|
fontSize
|
|
|
} = token;
|
|
|
return {
|
|
|
titleFontSize: fontSize,
|
|
|
contentFontSize: fontSizeHeading3
|
|
|
};
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/Statistic.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Statistic = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
style,
|
|
|
valueStyle,
|
|
|
value = 0,
|
|
|
title,
|
|
|
valueRender,
|
|
|
prefix,
|
|
|
suffix,
|
|
|
loading = false,
|
|
|
onMouseEnter,
|
|
|
onMouseLeave,
|
|
|
decimalSeparator = '.',
|
|
|
groupSeparator = ','
|
|
|
} = props;
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
statistic
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = statistic_style(prefixCls);
|
|
|
const valueNode = /*#__PURE__*/react.createElement(statistic_Number, Object.assign({
|
|
|
decimalSeparator: decimalSeparator,
|
|
|
groupSeparator: groupSeparator,
|
|
|
prefixCls: prefixCls
|
|
|
}, props, {
|
|
|
value: value
|
|
|
}));
|
|
|
const cls = classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId);
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement("div", {
|
|
|
className: cls,
|
|
|
style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style),
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseLeave: onMouseLeave
|
|
|
}, title && /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, title), /*#__PURE__*/react.createElement(skeleton/* default */.Z, {
|
|
|
paragraph: false,
|
|
|
loading: loading,
|
|
|
className: `${prefixCls}-skeleton`
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
style: valueStyle,
|
|
|
className: `${prefixCls}-content`
|
|
|
}, prefix && /*#__PURE__*/react.createElement("span", {
|
|
|
className: `${prefixCls}-content-prefix`
|
|
|
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/react.createElement("span", {
|
|
|
className: `${prefixCls}-content-suffix`
|
|
|
}, suffix)))));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var statistic_Statistic = (Statistic);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/utils.js
|
|
|
// Countdown
|
|
|
const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds
|
|
|
];
|
|
|
|
|
|
function formatTimeStr(duration, format) {
|
|
|
let leftDuration = duration;
|
|
|
const escapeRegex = /\[[^\]]*]/g;
|
|
|
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
|
|
|
const templateText = format.replace(escapeRegex, '[]');
|
|
|
const replacedText = timeUnits.reduce((current, _ref) => {
|
|
|
let [name, unit] = _ref;
|
|
|
if (current.includes(name)) {
|
|
|
const value = Math.floor(leftDuration / unit);
|
|
|
leftDuration -= value * unit;
|
|
|
return current.replace(new RegExp(`${name}+`, 'g'), match => {
|
|
|
const len = match.length;
|
|
|
return value.toString().padStart(len, '0');
|
|
|
});
|
|
|
}
|
|
|
return current;
|
|
|
}, templateText);
|
|
|
let index = 0;
|
|
|
return replacedText.replace(escapeRegex, () => {
|
|
|
const match = keepList[index];
|
|
|
index += 1;
|
|
|
return match;
|
|
|
});
|
|
|
}
|
|
|
function formatCountdown(value, config) {
|
|
|
const {
|
|
|
format = ''
|
|
|
} = config;
|
|
|
const target = new Date(value).getTime();
|
|
|
const current = Date.now();
|
|
|
const diff = Math.max(target - current, 0);
|
|
|
return formatTimeStr(diff, format);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/Countdown.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const REFRESH_INTERVAL = 1000 / 30;
|
|
|
function getTime(value) {
|
|
|
return new Date(value).getTime();
|
|
|
}
|
|
|
const Countdown = props => {
|
|
|
const {
|
|
|
value,
|
|
|
format = 'HH:mm:ss',
|
|
|
onChange,
|
|
|
onFinish
|
|
|
} = props;
|
|
|
const forceUpdate = (0,useForceUpdate/* default */.Z)();
|
|
|
const countdown = react.useRef(null);
|
|
|
const stopTimer = () => {
|
|
|
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
|
|
|
if (countdown.current) {
|
|
|
clearInterval(countdown.current);
|
|
|
countdown.current = null;
|
|
|
}
|
|
|
};
|
|
|
const syncTimer = () => {
|
|
|
const timestamp = getTime(value);
|
|
|
if (timestamp >= Date.now()) {
|
|
|
countdown.current = setInterval(() => {
|
|
|
forceUpdate();
|
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now());
|
|
|
if (timestamp < Date.now()) {
|
|
|
stopTimer();
|
|
|
}
|
|
|
}, REFRESH_INTERVAL);
|
|
|
}
|
|
|
};
|
|
|
react.useEffect(() => {
|
|
|
syncTimer();
|
|
|
return () => {
|
|
|
if (countdown.current) {
|
|
|
clearInterval(countdown.current);
|
|
|
countdown.current = null;
|
|
|
}
|
|
|
};
|
|
|
}, [value]);
|
|
|
const formatter = (formatValue, config) => formatCountdown(formatValue, Object.assign(Object.assign({}, config), {
|
|
|
format
|
|
|
}));
|
|
|
const valueRender = node => (0,reactNode/* cloneElement */.Tm)(node, {
|
|
|
title: undefined
|
|
|
});
|
|
|
return /*#__PURE__*/react.createElement(statistic_Statistic, Object.assign({}, props, {
|
|
|
valueRender: valueRender,
|
|
|
formatter: formatter
|
|
|
}));
|
|
|
};
|
|
|
/* harmony default export */ var statistic_Countdown = (/*#__PURE__*/react.memo(Countdown));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/statistic/index.js
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
statistic_Statistic.Countdown = statistic_Countdown;
|
|
|
/* harmony default export */ var es_statistic = (statistic_Statistic);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 47897:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/switch/index.js + 27 modules ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ es_switch; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
|
var LoadingOutlined = __webpack_require__(50888);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
function _extends() {
|
|
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
|
var source = arguments[i];
|
|
|
for (var key in source) {
|
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
|
target[key] = source[key];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return target;
|
|
|
};
|
|
|
return _extends.apply(this, arguments);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
function _typeof(obj) {
|
|
|
"@babel/helpers - typeof";
|
|
|
|
|
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
|
return typeof obj;
|
|
|
} : function (obj) {
|
|
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
|
}, _typeof(obj);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
|
|
|
|
function _toPrimitive(input, hint) {
|
|
|
if (_typeof(input) !== "object" || input === null) return input;
|
|
|
var prim = input[Symbol.toPrimitive];
|
|
|
if (prim !== undefined) {
|
|
|
var res = prim.call(input, hint || "default");
|
|
|
if (_typeof(res) !== "object") return res;
|
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
|
}
|
|
|
return (hint === "string" ? String : Number)(input);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
|
|
|
|
|
|
|
function _toPropertyKey(arg) {
|
|
|
var key = _toPrimitive(arg, "string");
|
|
|
return _typeof(key) === "symbol" ? key : String(key);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
|
key = _toPropertyKey(key);
|
|
|
if (key in obj) {
|
|
|
Object.defineProperty(obj, key, {
|
|
|
value: value,
|
|
|
enumerable: true,
|
|
|
configurable: true,
|
|
|
writable: true
|
|
|
});
|
|
|
} else {
|
|
|
obj[key] = value;
|
|
|
}
|
|
|
return obj;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
|
function _arrayWithHoles(arr) {
|
|
|
if (Array.isArray(arr)) return arr;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
|
function _iterableToArrayLimit(arr, i) {
|
|
|
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
|
if (null != _i) {
|
|
|
var _s,
|
|
|
_e,
|
|
|
_x,
|
|
|
_r,
|
|
|
_arr = [],
|
|
|
_n = !0,
|
|
|
_d = !1;
|
|
|
try {
|
|
|
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
|
if (Object(_i) !== _i) return;
|
|
|
_n = !1;
|
|
|
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
|
} catch (err) {
|
|
|
_d = !0, _e = err;
|
|
|
} finally {
|
|
|
try {
|
|
|
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
|
} finally {
|
|
|
if (_d) throw _e;
|
|
|
}
|
|
|
}
|
|
|
return _arr;
|
|
|
}
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
|
function _arrayLikeToArray(arr, len) {
|
|
|
if (len == null || len > arr.length) len = arr.length;
|
|
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
|
return arr2;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
|
|
|
|
function _unsupportedIterableToArray(o, minLen) {
|
|
|
if (!o) return;
|
|
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
|
function _nonIterableRest() {
|
|
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _slicedToArray(arr, i) {
|
|
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
if (source == null) return {};
|
|
|
var target = {};
|
|
|
var sourceKeys = Object.keys(source);
|
|
|
var key, i;
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
|
key = sourceKeys[i];
|
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
|
target[key] = source[key];
|
|
|
}
|
|
|
return target;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
|
|
|
function _objectWithoutProperties(source, excluded) {
|
|
|
if (source == null) return {};
|
|
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
|
var key, i;
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
|
key = sourceSymbolKeys[i];
|
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
|
target[key] = source[key];
|
|
|
}
|
|
|
}
|
|
|
return target;
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
|
function arrayWithHoles_arrayWithHoles(arr) {
|
|
|
if (Array.isArray(arr)) return arr;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
|
function iterableToArrayLimit_iterableToArrayLimit(arr, i) {
|
|
|
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
|
if (null != _i) {
|
|
|
var _s,
|
|
|
_e,
|
|
|
_x,
|
|
|
_r,
|
|
|
_arr = [],
|
|
|
_n = !0,
|
|
|
_d = !1;
|
|
|
try {
|
|
|
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
|
if (Object(_i) !== _i) return;
|
|
|
_n = !1;
|
|
|
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
|
} catch (err) {
|
|
|
_d = !0, _e = err;
|
|
|
} finally {
|
|
|
try {
|
|
|
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
|
} finally {
|
|
|
if (_d) throw _e;
|
|
|
}
|
|
|
}
|
|
|
return _arr;
|
|
|
}
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
|
function arrayLikeToArray_arrayLikeToArray(arr, len) {
|
|
|
if (len == null || len > arr.length) len = arr.length;
|
|
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
|
return arr2;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
|
|
|
|
function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
|
|
|
if (!o) return;
|
|
|
if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
|
|
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
|
function nonIterableRest_nonIterableRest() {
|
|
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function slicedToArray_slicedToArray(arr, i) {
|
|
|
return arrayWithHoles_arrayWithHoles(arr) || iterableToArrayLimit_iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || nonIterableRest_nonIterableRest();
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/hooks/useEvent.js
|
|
|
|
|
|
function useEvent(callback) {
|
|
|
var fnRef = react.useRef();
|
|
|
fnRef.current = callback;
|
|
|
var memoFn = react.useCallback(function () {
|
|
|
var _fnRef$current;
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
args[_key] = arguments[_key];
|
|
|
}
|
|
|
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
|
|
|
}, []);
|
|
|
return memoFn;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/Dom/canUseDom.js
|
|
|
function canUseDom() {
|
|
|
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/hooks/useLayoutEffect.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
|
*/
|
|
|
var useInternalLayoutEffect = true && canUseDom() ? react.useLayoutEffect : react.useEffect;
|
|
|
var useLayoutEffect = function useLayoutEffect(callback, deps) {
|
|
|
var firstMountRef = react.useRef(true);
|
|
|
useInternalLayoutEffect(function () {
|
|
|
return callback(firstMountRef.current);
|
|
|
}, deps);
|
|
|
|
|
|
// We tell react that first mount has passed
|
|
|
useInternalLayoutEffect(function () {
|
|
|
firstMountRef.current = false;
|
|
|
return function () {
|
|
|
firstMountRef.current = true;
|
|
|
};
|
|
|
}, []);
|
|
|
};
|
|
|
var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
|
|
|
useLayoutEffect(function (firstMount) {
|
|
|
if (!firstMount) {
|
|
|
return callback();
|
|
|
}
|
|
|
}, deps);
|
|
|
};
|
|
|
/* harmony default export */ var hooks_useLayoutEffect = ((/* unused pure expression or super */ null && (useLayoutEffect)));
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/hooks/useState.js
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.
|
|
|
* We do not make this auto is to avoid real memory leak.
|
|
|
* Developer should confirm it's safe to ignore themselves.
|
|
|
*/
|
|
|
function useSafeState(defaultValue) {
|
|
|
var destroyRef = react.useRef(false);
|
|
|
var _React$useState = react.useState(defaultValue),
|
|
|
_React$useState2 = slicedToArray_slicedToArray(_React$useState, 2),
|
|
|
value = _React$useState2[0],
|
|
|
setValue = _React$useState2[1];
|
|
|
react.useEffect(function () {
|
|
|
destroyRef.current = false;
|
|
|
return function () {
|
|
|
destroyRef.current = true;
|
|
|
};
|
|
|
}, []);
|
|
|
function safeSetState(updater, ignoreDestroy) {
|
|
|
if (ignoreDestroy && destroyRef.current) {
|
|
|
return;
|
|
|
}
|
|
|
setValue(updater);
|
|
|
}
|
|
|
return [value, safeSetState];
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/hooks/useMergedState.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** We only think `undefined` is empty */
|
|
|
function hasValue(value) {
|
|
|
return value !== undefined;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Similar to `useState` but will use props value if provided.
|
|
|
* Note that internal use rc-util `useState` hook.
|
|
|
*/
|
|
|
function useMergedState(defaultStateValue, option) {
|
|
|
var _ref = option || {},
|
|
|
defaultValue = _ref.defaultValue,
|
|
|
value = _ref.value,
|
|
|
onChange = _ref.onChange,
|
|
|
postState = _ref.postState;
|
|
|
|
|
|
// ======================= Init =======================
|
|
|
var _useState = useSafeState(function () {
|
|
|
if (hasValue(value)) {
|
|
|
return value;
|
|
|
} else if (hasValue(defaultValue)) {
|
|
|
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
|
|
|
} else {
|
|
|
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
|
|
|
}
|
|
|
}),
|
|
|
_useState2 = slicedToArray_slicedToArray(_useState, 2),
|
|
|
innerValue = _useState2[0],
|
|
|
setInnerValue = _useState2[1];
|
|
|
var mergedValue = value !== undefined ? value : innerValue;
|
|
|
var postMergedValue = postState ? postState(mergedValue) : mergedValue;
|
|
|
|
|
|
// ====================== Change ======================
|
|
|
var onChangeFn = useEvent(onChange);
|
|
|
var _useState3 = useSafeState([mergedValue]),
|
|
|
_useState4 = slicedToArray_slicedToArray(_useState3, 2),
|
|
|
prevValue = _useState4[0],
|
|
|
setPrevValue = _useState4[1];
|
|
|
useLayoutUpdateEffect(function () {
|
|
|
var prev = prevValue[0];
|
|
|
if (innerValue !== prev) {
|
|
|
onChangeFn(innerValue, prev);
|
|
|
}
|
|
|
}, [prevValue]);
|
|
|
|
|
|
// Sync value back to `undefined` when it from control to un-control
|
|
|
useLayoutUpdateEffect(function () {
|
|
|
if (!hasValue(value)) {
|
|
|
setInnerValue(value);
|
|
|
}
|
|
|
}, [value]);
|
|
|
|
|
|
// ====================== Update ======================
|
|
|
var triggerChange = useEvent(function (updater, ignoreDestroy) {
|
|
|
setInnerValue(updater, ignoreDestroy);
|
|
|
setPrevValue([mergedValue], ignoreDestroy);
|
|
|
});
|
|
|
return [postMergedValue, triggerChange];
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/node_modules/rc-util/es/KeyCode.js
|
|
|
/**
|
|
|
* @ignore
|
|
|
* some key-codes definition and utils from closure-library
|
|
|
* @author yiminghe@gmail.com
|
|
|
*/
|
|
|
|
|
|
var KeyCode = {
|
|
|
/**
|
|
|
* MAC_ENTER
|
|
|
*/
|
|
|
MAC_ENTER: 3,
|
|
|
/**
|
|
|
* BACKSPACE
|
|
|
*/
|
|
|
BACKSPACE: 8,
|
|
|
/**
|
|
|
* TAB
|
|
|
*/
|
|
|
TAB: 9,
|
|
|
/**
|
|
|
* NUMLOCK on FF/Safari Mac
|
|
|
*/
|
|
|
NUM_CENTER: 12,
|
|
|
// NUMLOCK on FF/Safari Mac
|
|
|
/**
|
|
|
* ENTER
|
|
|
*/
|
|
|
ENTER: 13,
|
|
|
/**
|
|
|
* SHIFT
|
|
|
*/
|
|
|
SHIFT: 16,
|
|
|
/**
|
|
|
* CTRL
|
|
|
*/
|
|
|
CTRL: 17,
|
|
|
/**
|
|
|
* ALT
|
|
|
*/
|
|
|
ALT: 18,
|
|
|
/**
|
|
|
* PAUSE
|
|
|
*/
|
|
|
PAUSE: 19,
|
|
|
/**
|
|
|
* CAPS_LOCK
|
|
|
*/
|
|
|
CAPS_LOCK: 20,
|
|
|
/**
|
|
|
* ESC
|
|
|
*/
|
|
|
ESC: 27,
|
|
|
/**
|
|
|
* SPACE
|
|
|
*/
|
|
|
SPACE: 32,
|
|
|
/**
|
|
|
* PAGE_UP
|
|
|
*/
|
|
|
PAGE_UP: 33,
|
|
|
// also NUM_NORTH_EAST
|
|
|
/**
|
|
|
* PAGE_DOWN
|
|
|
*/
|
|
|
PAGE_DOWN: 34,
|
|
|
// also NUM_SOUTH_EAST
|
|
|
/**
|
|
|
* END
|
|
|
*/
|
|
|
END: 35,
|
|
|
// also NUM_SOUTH_WEST
|
|
|
/**
|
|
|
* HOME
|
|
|
*/
|
|
|
HOME: 36,
|
|
|
// also NUM_NORTH_WEST
|
|
|
/**
|
|
|
* LEFT
|
|
|
*/
|
|
|
LEFT: 37,
|
|
|
// also NUM_WEST
|
|
|
/**
|
|
|
* UP
|
|
|
*/
|
|
|
UP: 38,
|
|
|
// also NUM_NORTH
|
|
|
/**
|
|
|
* RIGHT
|
|
|
*/
|
|
|
RIGHT: 39,
|
|
|
// also NUM_EAST
|
|
|
/**
|
|
|
* DOWN
|
|
|
*/
|
|
|
DOWN: 40,
|
|
|
// also NUM_SOUTH
|
|
|
/**
|
|
|
* PRINT_SCREEN
|
|
|
*/
|
|
|
PRINT_SCREEN: 44,
|
|
|
/**
|
|
|
* INSERT
|
|
|
*/
|
|
|
INSERT: 45,
|
|
|
// also NUM_INSERT
|
|
|
/**
|
|
|
* DELETE
|
|
|
*/
|
|
|
DELETE: 46,
|
|
|
// also NUM_DELETE
|
|
|
/**
|
|
|
* ZERO
|
|
|
*/
|
|
|
ZERO: 48,
|
|
|
/**
|
|
|
* ONE
|
|
|
*/
|
|
|
ONE: 49,
|
|
|
/**
|
|
|
* TWO
|
|
|
*/
|
|
|
TWO: 50,
|
|
|
/**
|
|
|
* THREE
|
|
|
*/
|
|
|
THREE: 51,
|
|
|
/**
|
|
|
* FOUR
|
|
|
*/
|
|
|
FOUR: 52,
|
|
|
/**
|
|
|
* FIVE
|
|
|
*/
|
|
|
FIVE: 53,
|
|
|
/**
|
|
|
* SIX
|
|
|
*/
|
|
|
SIX: 54,
|
|
|
/**
|
|
|
* SEVEN
|
|
|
*/
|
|
|
SEVEN: 55,
|
|
|
/**
|
|
|
* EIGHT
|
|
|
*/
|
|
|
EIGHT: 56,
|
|
|
/**
|
|
|
* NINE
|
|
|
*/
|
|
|
NINE: 57,
|
|
|
/**
|
|
|
* QUESTION_MARK
|
|
|
*/
|
|
|
QUESTION_MARK: 63,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* A
|
|
|
*/
|
|
|
A: 65,
|
|
|
/**
|
|
|
* B
|
|
|
*/
|
|
|
B: 66,
|
|
|
/**
|
|
|
* C
|
|
|
*/
|
|
|
C: 67,
|
|
|
/**
|
|
|
* D
|
|
|
*/
|
|
|
D: 68,
|
|
|
/**
|
|
|
* E
|
|
|
*/
|
|
|
E: 69,
|
|
|
/**
|
|
|
* F
|
|
|
*/
|
|
|
F: 70,
|
|
|
/**
|
|
|
* G
|
|
|
*/
|
|
|
G: 71,
|
|
|
/**
|
|
|
* H
|
|
|
*/
|
|
|
H: 72,
|
|
|
/**
|
|
|
* I
|
|
|
*/
|
|
|
I: 73,
|
|
|
/**
|
|
|
* J
|
|
|
*/
|
|
|
J: 74,
|
|
|
/**
|
|
|
* K
|
|
|
*/
|
|
|
K: 75,
|
|
|
/**
|
|
|
* L
|
|
|
*/
|
|
|
L: 76,
|
|
|
/**
|
|
|
* M
|
|
|
*/
|
|
|
M: 77,
|
|
|
/**
|
|
|
* N
|
|
|
*/
|
|
|
N: 78,
|
|
|
/**
|
|
|
* O
|
|
|
*/
|
|
|
O: 79,
|
|
|
/**
|
|
|
* P
|
|
|
*/
|
|
|
P: 80,
|
|
|
/**
|
|
|
* Q
|
|
|
*/
|
|
|
Q: 81,
|
|
|
/**
|
|
|
* R
|
|
|
*/
|
|
|
R: 82,
|
|
|
/**
|
|
|
* S
|
|
|
*/
|
|
|
S: 83,
|
|
|
/**
|
|
|
* T
|
|
|
*/
|
|
|
T: 84,
|
|
|
/**
|
|
|
* U
|
|
|
*/
|
|
|
U: 85,
|
|
|
/**
|
|
|
* V
|
|
|
*/
|
|
|
V: 86,
|
|
|
/**
|
|
|
* W
|
|
|
*/
|
|
|
W: 87,
|
|
|
/**
|
|
|
* X
|
|
|
*/
|
|
|
X: 88,
|
|
|
/**
|
|
|
* Y
|
|
|
*/
|
|
|
Y: 89,
|
|
|
/**
|
|
|
* Z
|
|
|
*/
|
|
|
Z: 90,
|
|
|
/**
|
|
|
* META
|
|
|
*/
|
|
|
META: 91,
|
|
|
// WIN_KEY_LEFT
|
|
|
/**
|
|
|
* WIN_KEY_RIGHT
|
|
|
*/
|
|
|
WIN_KEY_RIGHT: 92,
|
|
|
/**
|
|
|
* CONTEXT_MENU
|
|
|
*/
|
|
|
CONTEXT_MENU: 93,
|
|
|
/**
|
|
|
* NUM_ZERO
|
|
|
*/
|
|
|
NUM_ZERO: 96,
|
|
|
/**
|
|
|
* NUM_ONE
|
|
|
*/
|
|
|
NUM_ONE: 97,
|
|
|
/**
|
|
|
* NUM_TWO
|
|
|
*/
|
|
|
NUM_TWO: 98,
|
|
|
/**
|
|
|
* NUM_THREE
|
|
|
*/
|
|
|
NUM_THREE: 99,
|
|
|
/**
|
|
|
* NUM_FOUR
|
|
|
*/
|
|
|
NUM_FOUR: 100,
|
|
|
/**
|
|
|
* NUM_FIVE
|
|
|
*/
|
|
|
NUM_FIVE: 101,
|
|
|
/**
|
|
|
* NUM_SIX
|
|
|
*/
|
|
|
NUM_SIX: 102,
|
|
|
/**
|
|
|
* NUM_SEVEN
|
|
|
*/
|
|
|
NUM_SEVEN: 103,
|
|
|
/**
|
|
|
* NUM_EIGHT
|
|
|
*/
|
|
|
NUM_EIGHT: 104,
|
|
|
/**
|
|
|
* NUM_NINE
|
|
|
*/
|
|
|
NUM_NINE: 105,
|
|
|
/**
|
|
|
* NUM_MULTIPLY
|
|
|
*/
|
|
|
NUM_MULTIPLY: 106,
|
|
|
/**
|
|
|
* NUM_PLUS
|
|
|
*/
|
|
|
NUM_PLUS: 107,
|
|
|
/**
|
|
|
* NUM_MINUS
|
|
|
*/
|
|
|
NUM_MINUS: 109,
|
|
|
/**
|
|
|
* NUM_PERIOD
|
|
|
*/
|
|
|
NUM_PERIOD: 110,
|
|
|
/**
|
|
|
* NUM_DIVISION
|
|
|
*/
|
|
|
NUM_DIVISION: 111,
|
|
|
/**
|
|
|
* F1
|
|
|
*/
|
|
|
F1: 112,
|
|
|
/**
|
|
|
* F2
|
|
|
*/
|
|
|
F2: 113,
|
|
|
/**
|
|
|
* F3
|
|
|
*/
|
|
|
F3: 114,
|
|
|
/**
|
|
|
* F4
|
|
|
*/
|
|
|
F4: 115,
|
|
|
/**
|
|
|
* F5
|
|
|
*/
|
|
|
F5: 116,
|
|
|
/**
|
|
|
* F6
|
|
|
*/
|
|
|
F6: 117,
|
|
|
/**
|
|
|
* F7
|
|
|
*/
|
|
|
F7: 118,
|
|
|
/**
|
|
|
* F8
|
|
|
*/
|
|
|
F8: 119,
|
|
|
/**
|
|
|
* F9
|
|
|
*/
|
|
|
F9: 120,
|
|
|
/**
|
|
|
* F10
|
|
|
*/
|
|
|
F10: 121,
|
|
|
/**
|
|
|
* F11
|
|
|
*/
|
|
|
F11: 122,
|
|
|
/**
|
|
|
* F12
|
|
|
*/
|
|
|
F12: 123,
|
|
|
/**
|
|
|
* NUMLOCK
|
|
|
*/
|
|
|
NUMLOCK: 144,
|
|
|
/**
|
|
|
* SEMICOLON
|
|
|
*/
|
|
|
SEMICOLON: 186,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* DASH
|
|
|
*/
|
|
|
DASH: 189,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* EQUALS
|
|
|
*/
|
|
|
EQUALS: 187,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* COMMA
|
|
|
*/
|
|
|
COMMA: 188,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* PERIOD
|
|
|
*/
|
|
|
PERIOD: 190,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* SLASH
|
|
|
*/
|
|
|
SLASH: 191,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* APOSTROPHE
|
|
|
*/
|
|
|
APOSTROPHE: 192,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* SINGLE_QUOTE
|
|
|
*/
|
|
|
SINGLE_QUOTE: 222,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* OPEN_SQUARE_BRACKET
|
|
|
*/
|
|
|
OPEN_SQUARE_BRACKET: 219,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* BACKSLASH
|
|
|
*/
|
|
|
BACKSLASH: 220,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* CLOSE_SQUARE_BRACKET
|
|
|
*/
|
|
|
CLOSE_SQUARE_BRACKET: 221,
|
|
|
// needs localization
|
|
|
/**
|
|
|
* WIN_KEY
|
|
|
*/
|
|
|
WIN_KEY: 224,
|
|
|
/**
|
|
|
* MAC_FF_META
|
|
|
*/
|
|
|
MAC_FF_META: 224,
|
|
|
// Firefox (Gecko) fires this for the meta key instead of 91
|
|
|
/**
|
|
|
* WIN_IME
|
|
|
*/
|
|
|
WIN_IME: 229,
|
|
|
// ======================== Function ========================
|
|
|
/**
|
|
|
* whether text and modified key is entered at the same time.
|
|
|
*/
|
|
|
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
|
|
|
var keyCode = e.keyCode;
|
|
|
if (e.altKey && !e.ctrlKey || e.metaKey ||
|
|
|
// Function keys don't generate text
|
|
|
keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// The following keys are quite harmless, even in combination with
|
|
|
// CTRL, ALT or SHIFT.
|
|
|
switch (keyCode) {
|
|
|
case KeyCode.ALT:
|
|
|
case KeyCode.CAPS_LOCK:
|
|
|
case KeyCode.CONTEXT_MENU:
|
|
|
case KeyCode.CTRL:
|
|
|
case KeyCode.DOWN:
|
|
|
case KeyCode.END:
|
|
|
case KeyCode.ESC:
|
|
|
case KeyCode.HOME:
|
|
|
case KeyCode.INSERT:
|
|
|
case KeyCode.LEFT:
|
|
|
case KeyCode.MAC_FF_META:
|
|
|
case KeyCode.META:
|
|
|
case KeyCode.NUMLOCK:
|
|
|
case KeyCode.NUM_CENTER:
|
|
|
case KeyCode.PAGE_DOWN:
|
|
|
case KeyCode.PAGE_UP:
|
|
|
case KeyCode.PAUSE:
|
|
|
case KeyCode.PRINT_SCREEN:
|
|
|
case KeyCode.RIGHT:
|
|
|
case KeyCode.SHIFT:
|
|
|
case KeyCode.UP:
|
|
|
case KeyCode.WIN_KEY:
|
|
|
case KeyCode.WIN_KEY_RIGHT:
|
|
|
return false;
|
|
|
default:
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
* whether character is entered.
|
|
|
*/
|
|
|
isCharacterKey: function isCharacterKey(keyCode) {
|
|
|
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
|
|
|
return true;
|
|
|
}
|
|
|
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
|
|
|
return true;
|
|
|
}
|
|
|
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
// Safari sends zero key code for non-latin characters.
|
|
|
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
|
|
|
return true;
|
|
|
}
|
|
|
switch (keyCode) {
|
|
|
case KeyCode.SPACE:
|
|
|
case KeyCode.QUESTION_MARK:
|
|
|
case KeyCode.NUM_PLUS:
|
|
|
case KeyCode.NUM_MINUS:
|
|
|
case KeyCode.NUM_PERIOD:
|
|
|
case KeyCode.NUM_DIVISION:
|
|
|
case KeyCode.SEMICOLON:
|
|
|
case KeyCode.DASH:
|
|
|
case KeyCode.EQUALS:
|
|
|
case KeyCode.COMMA:
|
|
|
case KeyCode.PERIOD:
|
|
|
case KeyCode.SLASH:
|
|
|
case KeyCode.APOSTROPHE:
|
|
|
case KeyCode.SINGLE_QUOTE:
|
|
|
case KeyCode.OPEN_SQUARE_BRACKET:
|
|
|
case KeyCode.BACKSLASH:
|
|
|
case KeyCode.CLOSE_SQUARE_BRACKET:
|
|
|
return true;
|
|
|
default:
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
/* harmony default export */ var es_KeyCode = (KeyCode);
|
|
|
;// CONCATENATED MODULE: ./node_modules/rc-switch/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Switch = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
var _classNames;
|
|
|
var _ref$prefixCls = _ref.prefixCls,
|
|
|
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
|
|
|
className = _ref.className,
|
|
|
checked = _ref.checked,
|
|
|
defaultChecked = _ref.defaultChecked,
|
|
|
disabled = _ref.disabled,
|
|
|
loadingIcon = _ref.loadingIcon,
|
|
|
checkedChildren = _ref.checkedChildren,
|
|
|
unCheckedChildren = _ref.unCheckedChildren,
|
|
|
onClick = _ref.onClick,
|
|
|
onChange = _ref.onChange,
|
|
|
onKeyDown = _ref.onKeyDown,
|
|
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
|
var _useMergedState = useMergedState(false, {
|
|
|
value: checked,
|
|
|
defaultValue: defaultChecked
|
|
|
}),
|
|
|
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
|
innerChecked = _useMergedState2[0],
|
|
|
setInnerChecked = _useMergedState2[1];
|
|
|
function triggerChange(newChecked, event) {
|
|
|
var mergedChecked = innerChecked;
|
|
|
if (!disabled) {
|
|
|
mergedChecked = newChecked;
|
|
|
setInnerChecked(mergedChecked);
|
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
|
|
|
}
|
|
|
return mergedChecked;
|
|
|
}
|
|
|
function onInternalKeyDown(e) {
|
|
|
if (e.which === es_KeyCode.LEFT) {
|
|
|
triggerChange(false, e);
|
|
|
} else if (e.which === es_KeyCode.RIGHT) {
|
|
|
triggerChange(true, e);
|
|
|
}
|
|
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
|
}
|
|
|
function onInternalClick(e) {
|
|
|
var ret = triggerChange(!innerChecked, e);
|
|
|
// [Legacy] trigger onClick with value
|
|
|
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
|
|
|
}
|
|
|
var switchClassName = classnames_default()(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-checked"), innerChecked), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
|
return /*#__PURE__*/react.createElement("button", _extends({}, restProps, {
|
|
|
type: "button",
|
|
|
role: "switch",
|
|
|
"aria-checked": innerChecked,
|
|
|
disabled: disabled,
|
|
|
className: switchClassName,
|
|
|
ref: ref,
|
|
|
onKeyDown: onInternalKeyDown,
|
|
|
onClick: onInternalClick
|
|
|
}), loadingIcon, /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner")
|
|
|
}, /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner-checked")
|
|
|
}, checkedChildren), /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner-unchecked")
|
|
|
}, unCheckedChildren)));
|
|
|
});
|
|
|
Switch.displayName = 'Switch';
|
|
|
/* harmony default export */ var es = (Switch);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/wave/index.js + 4 modules
|
|
|
var wave = __webpack_require__(45353);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
|
|
|
var DisabledContext = __webpack_require__(98866);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(98675);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/index.js
|
|
|
var dist_module = __webpack_require__(10274);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
|
var style = __webpack_require__(14747);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(45503);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/switch/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
const genSwitchSmallStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`&${componentCls}-small`]: {
|
|
|
minWidth: token.switchMinWidthSM,
|
|
|
height: token.switchHeightSM,
|
|
|
lineHeight: `${token.switchHeightSM}px`,
|
|
|
[`${componentCls}-inner`]: {
|
|
|
paddingInlineStart: token.switchInnerMarginMaxSM,
|
|
|
paddingInlineEnd: token.switchInnerMarginMinSM,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: `calc(-100% + ${token.switchPinSizeSM + token.switchPadding * 2}px - ${token.switchInnerMarginMaxSM * 2}px)`,
|
|
|
marginInlineEnd: `calc(100% - ${token.switchPinSizeSM + token.switchPadding * 2}px + ${token.switchInnerMarginMaxSM * 2}px)`
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginTop: -token.switchHeightSM,
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-handle`]: {
|
|
|
width: token.switchPinSizeSM,
|
|
|
height: token.switchPinSizeSM
|
|
|
},
|
|
|
[`${componentCls}-loading-icon`]: {
|
|
|
top: (token.switchPinSizeSM - token.switchLoadingIconSize) / 2,
|
|
|
fontSize: token.switchLoadingIconSize
|
|
|
},
|
|
|
[`&${componentCls}-checked`]: {
|
|
|
[`${componentCls}-inner`]: {
|
|
|
paddingInlineStart: token.switchInnerMarginMinSM,
|
|
|
paddingInlineEnd: token.switchInnerMarginMaxSM,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: `calc(100% - ${token.switchPinSizeSM + token.switchPadding * 2}px + ${token.switchInnerMarginMaxSM * 2}px)`,
|
|
|
marginInlineEnd: `calc(-100% + ${token.switchPinSizeSM + token.switchPadding * 2}px - ${token.switchInnerMarginMaxSM * 2}px)`
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-handle`]: {
|
|
|
insetInlineStart: `calc(100% - ${token.switchPinSizeSM + token.switchPadding}px)`
|
|
|
}
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: token.marginXXS / 2,
|
|
|
marginInlineEnd: -token.marginXXS / 2
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: -token.marginXXS / 2,
|
|
|
marginInlineEnd: token.marginXXS / 2
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchLoadingStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`${componentCls}-loading-icon${token.iconCls}`]: {
|
|
|
position: 'relative',
|
|
|
top: (token.switchPinSize - token.fontSize) / 2,
|
|
|
color: token.switchLoadingIconColor,
|
|
|
verticalAlign: 'top'
|
|
|
},
|
|
|
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
|
|
|
color: token.switchColor
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchHandleStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
motion
|
|
|
} = token;
|
|
|
const switchHandleCls = `${componentCls}-handle`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[switchHandleCls]: {
|
|
|
position: 'absolute',
|
|
|
top: token.switchPadding,
|
|
|
insetInlineStart: token.switchPadding,
|
|
|
width: token.switchPinSize,
|
|
|
height: token.switchPinSize,
|
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
|
'&::before': {
|
|
|
position: 'absolute',
|
|
|
top: 0,
|
|
|
insetInlineEnd: 0,
|
|
|
bottom: 0,
|
|
|
insetInlineStart: 0,
|
|
|
backgroundColor: token.colorWhite,
|
|
|
borderRadius: token.switchPinSize / 2,
|
|
|
boxShadow: token.switchHandleShadow,
|
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
|
content: '""'
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchHandleCls}`]: {
|
|
|
insetInlineStart: `calc(100% - ${token.switchPinSize + token.switchPadding}px)`
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: motion ? {
|
|
|
[`${switchHandleCls}::before`]: {
|
|
|
insetInlineEnd: token.switchHandleActiveInset,
|
|
|
insetInlineStart: 0
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
|
|
|
insetInlineEnd: 0,
|
|
|
insetInlineStart: token.switchHandleActiveInset
|
|
|
}
|
|
|
} : /* istanbul ignore next */
|
|
|
{}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchInnerStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[switchInnerCls]: {
|
|
|
display: 'block',
|
|
|
overflow: 'hidden',
|
|
|
borderRadius: 100,
|
|
|
height: '100%',
|
|
|
paddingInlineStart: token.switchInnerMarginMax,
|
|
|
paddingInlineEnd: token.switchInnerMarginMin,
|
|
|
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
|
|
|
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
|
|
|
display: 'block',
|
|
|
color: token.colorTextLightSolid,
|
|
|
fontSize: token.fontSizeSM,
|
|
|
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
|
|
|
pointerEvents: 'none'
|
|
|
},
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: `calc(-100% + ${token.switchPinSize + token.switchPadding * 2}px - ${token.switchInnerMarginMax * 2}px)`,
|
|
|
marginInlineEnd: `calc(100% - ${token.switchPinSize + token.switchPadding * 2}px + ${token.switchInnerMarginMax * 2}px)`
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginTop: -token.switchHeight,
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
paddingInlineStart: token.switchInnerMarginMin,
|
|
|
paddingInlineEnd: token.switchInnerMarginMax,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: `calc(100% - ${token.switchPinSize + token.switchPadding * 2}px + ${token.switchInnerMarginMax * 2}px)`,
|
|
|
marginInlineEnd: `calc(-100% + ${token.switchPinSize + token.switchPadding * 2}px - ${token.switchInnerMarginMax * 2}px)`
|
|
|
}
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: token.switchPadding * 2,
|
|
|
marginInlineEnd: -token.switchPadding * 2
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: -token.switchPadding * 2,
|
|
|
marginInlineEnd: token.switchPadding * 2
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
position: 'relative',
|
|
|
display: 'inline-block',
|
|
|
boxSizing: 'border-box',
|
|
|
minWidth: token.switchMinWidth,
|
|
|
height: token.switchHeight,
|
|
|
lineHeight: `${token.switchHeight}px`,
|
|
|
verticalAlign: 'middle',
|
|
|
background: token.colorTextQuaternary,
|
|
|
border: '0',
|
|
|
borderRadius: 100,
|
|
|
cursor: 'pointer',
|
|
|
transition: `all ${token.motionDurationMid}`,
|
|
|
userSelect: 'none',
|
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
|
background: token.colorTextTertiary
|
|
|
}
|
|
|
}), (0,style/* genFocusStyle */.Qy)(token)), {
|
|
|
[`&${componentCls}-checked`]: {
|
|
|
background: token.switchColor,
|
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
|
background: token.colorPrimaryHover
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
|
|
|
cursor: 'not-allowed',
|
|
|
opacity: token.switchDisabledOpacity,
|
|
|
'*': {
|
|
|
boxShadow: 'none',
|
|
|
cursor: 'not-allowed'
|
|
|
}
|
|
|
},
|
|
|
// rtl style
|
|
|
[`&${componentCls}-rtl`]: {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var switch_style = ((0,genComponentStyleHook/* default */.Z)('Switch', token => {
|
|
|
const switchHeight = token.fontSize * token.lineHeight;
|
|
|
const switchHeightSM = token.controlHeight / 2;
|
|
|
const switchPadding = 2; // This is magic
|
|
|
const switchPinSize = switchHeight - switchPadding * 2;
|
|
|
const switchPinSizeSM = switchHeightSM - switchPadding * 2;
|
|
|
const switchToken = (0,statistic/* merge */.TS)(token, {
|
|
|
switchMinWidth: switchPinSize * 2 + switchPadding * 4,
|
|
|
switchHeight,
|
|
|
switchDuration: token.motionDurationMid,
|
|
|
switchColor: token.colorPrimary,
|
|
|
switchDisabledOpacity: token.opacityLoading,
|
|
|
switchInnerMarginMin: switchPinSize / 2,
|
|
|
switchInnerMarginMax: switchPinSize + switchPadding + switchPadding * 2,
|
|
|
switchPadding,
|
|
|
switchPinSize,
|
|
|
switchBg: token.colorBgContainer,
|
|
|
switchMinWidthSM: switchPinSizeSM * 2 + switchPadding * 2,
|
|
|
switchHeightSM,
|
|
|
switchInnerMarginMinSM: switchPinSizeSM / 2,
|
|
|
switchInnerMarginMaxSM: switchPinSizeSM + switchPadding + switchPadding * 2,
|
|
|
switchPinSizeSM,
|
|
|
switchHandleShadow: `0 2px 4px 0 ${new dist_module/* TinyColor */.C('#00230b').setAlpha(0.2).toRgbString()}`,
|
|
|
switchLoadingIconSize: token.fontSizeIcon * 0.75,
|
|
|
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
|
|
|
switchHandleActiveInset: '-30%'
|
|
|
});
|
|
|
return [genSwitchStyle(switchToken),
|
|
|
// inner style
|
|
|
genSwitchInnerStyle(switchToken),
|
|
|
// handle style
|
|
|
genSwitchHandleStyle(switchToken),
|
|
|
// loading style
|
|
|
genSwitchLoadingStyle(switchToken),
|
|
|
// small style
|
|
|
genSwitchSmallStyle(switchToken)];
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/switch/index.js
|
|
|
'use client';
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const switch_Switch = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
size: customizeSize,
|
|
|
disabled: customDisabled,
|
|
|
loading,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style"]);
|
|
|
false ? 0 : void 0;
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
switch: SWITCH
|
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
|
// ===================== Disabled =====================
|
|
|
const disabled = react.useContext(DisabledContext/* default */.Z);
|
|
|
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
|
|
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
|
const loadingIcon = /*#__PURE__*/react.createElement("div", {
|
|
|
className: `${prefixCls}-handle`
|
|
|
}, loading && /*#__PURE__*/react.createElement(LoadingOutlined/* default */.Z, {
|
|
|
className: `${prefixCls}-loading-icon`
|
|
|
}));
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = switch_style(prefixCls);
|
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
|
const classes = classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
|
|
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
|
[`${prefixCls}-loading`]: loading,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, className, rootClassName, hashId);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/react.createElement(wave/* default */.Z, null, /*#__PURE__*/react.createElement(es, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
className: classes,
|
|
|
style: mergedStyle,
|
|
|
disabled: mergedDisabled,
|
|
|
ref: ref,
|
|
|
loadingIcon: loadingIcon
|
|
|
}))));
|
|
|
});
|
|
|
switch_Switch.__ANT_SWITCH = true;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_switch = (switch_Switch);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 19575:
|
|
|
/*!******************************************!*\
|
|
|
!*** ./node_modules/js-base64/base64.js ***!
|
|
|
\******************************************/
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
|
* base64.js
|
|
|
*
|
|
|
* Licensed under the BSD 3-Clause License.
|
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
|
*
|
|
|
* References:
|
|
|
* http://en.wikipedia.org/wiki/Base64
|
|
|
*/
|
|
|
;(function (global, factory) {
|
|
|
true
|
|
|
? module.exports = factory(global)
|
|
|
: 0
|
|
|
}((
|
|
|
typeof self !== 'undefined' ? self
|
|
|
: typeof window !== 'undefined' ? window
|
|
|
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
|
|
: this
|
|
|
), function(global) {
|
|
|
'use strict';
|
|
|
// existing version for noConflict()
|
|
|
global = global || {};
|
|
|
var _Base64 = global.Base64;
|
|
|
var version = "2.6.4";
|
|
|
// constants
|
|
|
var b64chars
|
|
|
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
var b64tab = function(bin) {
|
|
|
var t = {};
|
|
|
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
|
|
return t;
|
|
|
}(b64chars);
|
|
|
var fromCharCode = String.fromCharCode;
|
|
|
// encoder stuff
|
|
|
var cb_utob = function(c) {
|
|
|
if (c.length < 2) {
|
|
|
var cc = c.charCodeAt(0);
|
|
|
return cc < 0x80 ? c
|
|
|
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
|
|
+ fromCharCode(0x80 | (cc & 0x3f)))
|
|
|
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
} else {
|
|
|
var cc = 0x10000
|
|
|
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
|
+ (c.charCodeAt(1) - 0xDC00);
|
|
|
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
}
|
|
|
};
|
|
|
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
var utob = function(u) {
|
|
|
return u.replace(re_utob, cb_utob);
|
|
|
};
|
|
|
var cb_encode = function(ccc) {
|
|
|
var padlen = [0, 2, 1][ccc.length % 3],
|
|
|
ord = ccc.charCodeAt(0) << 16
|
|
|
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
|
|
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
|
|
chars = [
|
|
|
b64chars.charAt( ord >>> 18),
|
|
|
b64chars.charAt((ord >>> 12) & 63),
|
|
|
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
|
|
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
|
|
];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var btoa = global.btoa && typeof global.btoa == 'function'
|
|
|
? function(b){ return global.btoa(b) } : function(b) {
|
|
|
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
|
|
'The string contains invalid characters.'
|
|
|
);
|
|
|
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
|
|
};
|
|
|
var _encode = function(u) {
|
|
|
return btoa(utob(String(u)));
|
|
|
};
|
|
|
var mkUriSafe = function (b64) {
|
|
|
return b64.replace(/[+\/]/g, function(m0) {
|
|
|
return m0 == '+' ? '-' : '_';
|
|
|
}).replace(/=/g, '');
|
|
|
};
|
|
|
var encode = function(u, urisafe) {
|
|
|
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
|
|
};
|
|
|
var encodeURI = function(u) { return encode(u, true) };
|
|
|
var fromUint8Array;
|
|
|
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
|
|
// return btoa(fromCharCode.apply(null, a));
|
|
|
var b64 = '';
|
|
|
for (var i = 0, l = a.length; i < l; i += 3) {
|
|
|
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
|
|
var ord = a0 << 16 | a1 << 8 | a2;
|
|
|
b64 += b64chars.charAt( ord >>> 18)
|
|
|
+ b64chars.charAt((ord >>> 12) & 63)
|
|
|
+ ( typeof a1 != 'undefined'
|
|
|
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
|
|
+ ( typeof a2 != 'undefined'
|
|
|
? b64chars.charAt( ord & 63) : '=');
|
|
|
}
|
|
|
return urisafe ? mkUriSafe(b64) : b64;
|
|
|
};
|
|
|
// decoder stuff
|
|
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
|
var cb_btou = function(cccc) {
|
|
|
switch(cccc.length) {
|
|
|
case 4:
|
|
|
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(3)),
|
|
|
offset = cp - 0x10000;
|
|
|
return (fromCharCode((offset >>> 10) + 0xD800)
|
|
|
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
|
|
case 3:
|
|
|
return fromCharCode(
|
|
|
((0x0f & cccc.charCodeAt(0)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(2))
|
|
|
);
|
|
|
default:
|
|
|
return fromCharCode(
|
|
|
((0x1f & cccc.charCodeAt(0)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(1))
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
var btou = function(b) {
|
|
|
return b.replace(re_btou, cb_btou);
|
|
|
};
|
|
|
var cb_decode = function(cccc) {
|
|
|
var len = cccc.length,
|
|
|
padlen = len % 4,
|
|
|
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
|
|
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
|
|
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
|
|
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
|
|
chars = [
|
|
|
fromCharCode( n >>> 16),
|
|
|
fromCharCode((n >>> 8) & 0xff),
|
|
|
fromCharCode( n & 0xff)
|
|
|
];
|
|
|
chars.length -= [0, 0, 2, 1][padlen];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var _atob = global.atob && typeof global.atob == 'function'
|
|
|
? function(a){ return global.atob(a) } : function(a){
|
|
|
return a.replace(/\S{1,4}/g, cb_decode);
|
|
|
};
|
|
|
var atob = function(a) {
|
|
|
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
|
|
};
|
|
|
var _decode = function(a) { return btou(_atob(a)) };
|
|
|
var _fromURI = function(a) {
|
|
|
return String(a).replace(/[-_]/g, function(m0) {
|
|
|
return m0 == '-' ? '+' : '/'
|
|
|
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
|
};
|
|
|
var decode = function(a){
|
|
|
return _decode(_fromURI(a));
|
|
|
};
|
|
|
var toUint8Array;
|
|
|
if (global.Uint8Array) toUint8Array = function(a) {
|
|
|
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
|
|
return c.charCodeAt(0);
|
|
|
});
|
|
|
};
|
|
|
var noConflict = function() {
|
|
|
var Base64 = global.Base64;
|
|
|
global.Base64 = _Base64;
|
|
|
return Base64;
|
|
|
};
|
|
|
// export Base64
|
|
|
global.Base64 = {
|
|
|
VERSION: version,
|
|
|
atob: atob,
|
|
|
btoa: btoa,
|
|
|
fromBase64: decode,
|
|
|
toBase64: encode,
|
|
|
utob: utob,
|
|
|
encode: encode,
|
|
|
encodeURI: encodeURI,
|
|
|
btou: btou,
|
|
|
decode: decode,
|
|
|
noConflict: noConflict,
|
|
|
fromUint8Array: fromUint8Array,
|
|
|
toUint8Array: toUint8Array
|
|
|
};
|
|
|
// if ES5 is available, make Base64.extendString() available
|
|
|
if (typeof Object.defineProperty === 'function') {
|
|
|
var noEnum = function(v){
|
|
|
return {value:v,enumerable:false,writable:true,configurable:true};
|
|
|
};
|
|
|
global.Base64.extendString = function () {
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'fromBase64', noEnum(function () {
|
|
|
return decode(this)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
|
|
return encode(this, urisafe)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64URI', noEnum(function () {
|
|
|
return encode(this, true)
|
|
|
}));
|
|
|
};
|
|
|
}
|
|
|
//
|
|
|
// export Base64 to the namespace
|
|
|
//
|
|
|
if (global['Meteor']) { // Meteor.js
|
|
|
Base64 = global.Base64;
|
|
|
}
|
|
|
// module.exports and AMD are mutually exclusive.
|
|
|
// module.exports has precedence.
|
|
|
if ( true && module.exports) {
|
|
|
module.exports.Base64 = global.Base64;
|
|
|
}
|
|
|
else if (true) {
|
|
|
// AMD. Register as an anonymous module.
|
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
|
}
|
|
|
// that's it!
|
|
|
return {Base64: global.Base64}
|
|
|
}));
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |