You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/78045.async.js

1051 lines
36 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[78045],{
/***/ 78045:
/*!*********************************************************!*\
!*** ./node_modules/antd/es/radio/index.js + 5 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"ZP": function() { return /* binding */ es_radio; }
});
// UNUSED EXPORTS: Button, Group
// 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/hooks/useMergedState.js
var useMergedState = __webpack_require__(5663);
// 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/config-provider/context.js
var context = __webpack_require__(53124);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
var useSize = __webpack_require__(98675);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/context.js
const RadioGroupContext = /*#__PURE__*/react.createContext(null);
const RadioGroupContextProvider = RadioGroupContext.Provider;
/* harmony default export */ var radio_context = (RadioGroupContext);
const RadioOptionTypeContext = /*#__PURE__*/react.createContext(null);
const RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js + 5 modules
var es = __webpack_require__(95860);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__(17799);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(98866);
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
var form_context = __webpack_require__(65223);
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/cssinjs/es/index.js + 29 modules
var cssinjs_es = __webpack_require__(73559);
// 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/radio/style/index.js
// ============================== Styles ==============================
const antRadioEffect = new cssinjs_es.Keyframes('antRadioEffect', {
'0%': {
transform: 'scale(1)',
opacity: 0.5
},
'100%': {
transform: 'scale(1.6)',
opacity: 0
}
});
// styles from RadioGroup only
const getGroupRadioStyle = token => {
const {
componentCls,
antCls
} = token;
const groupPrefixCls = `${componentCls}-group`;
return {
[groupPrefixCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
display: 'inline-block',
fontSize: 0,
// RTL
[`&${groupPrefixCls}-rtl`]: {
direction: 'rtl'
},
[`${antCls}-badge ${antCls}-badge-count`]: {
zIndex: 1
},
[`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {
borderInlineStart: 'none'
}
})
};
};
// Styles from radio-wrapper
const getRadioBasicStyle = token => {
const {
componentCls,
wrapperMarginInlineEnd,
colorPrimary,
radioSize,
motionDurationSlow,
motionDurationMid,
motionEaseInOut,
motionEaseInOutCirc,
colorBgContainer,
colorBorder,
lineWidth,
dotSize,
colorBgContainerDisabled,
colorTextDisabled,
paddingXS,
dotColorDisabled,
lineType,
radioDotDisabledSize,
wireframe,
colorWhite
} = token;
const radioInnerPrefixCls = `${componentCls}-inner`;
return {
[`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'relative',
display: 'inline-flex',
alignItems: 'baseline',
marginInlineStart: 0,
marginInlineEnd: wrapperMarginInlineEnd,
cursor: 'pointer',
// RTL
[`&${componentCls}-wrapper-rtl`]: {
direction: 'rtl'
},
'&-disabled': {
cursor: 'not-allowed',
color: token.colorTextDisabled
},
'&::after': {
display: 'inline-block',
width: 0,
overflow: 'hidden',
content: '"\\a0"'
},
// hashId 在 wrapper 上,只能铺平
[`${componentCls}-checked::after`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
width: '100%',
height: '100%',
border: `${lineWidth}px ${lineType} ${colorPrimary}`,
borderRadius: '50%',
visibility: 'hidden',
animationName: antRadioEffect,
animationDuration: motionDurationSlow,
animationTimingFunction: motionEaseInOut,
animationFillMode: 'both',
content: '""'
},
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'relative',
display: 'inline-block',
outline: 'none',
cursor: 'pointer',
alignSelf: 'center'
}),
[`${componentCls}-wrapper:hover &,
&:hover ${radioInnerPrefixCls}`]: {
borderColor: colorPrimary
},
[`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: Object.assign({}, (0,style/* genFocusOutline */.oN)(token)),
[`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {
visibility: 'visible'
},
[`${componentCls}-inner`]: {
'&::after': {
boxSizing: 'border-box',
position: 'absolute',
insetBlockStart: '50%',
insetInlineStart: '50%',
display: 'block',
width: radioSize,
height: radioSize,
marginBlockStart: radioSize / -2,
marginInlineStart: radioSize / -2,
backgroundColor: wireframe ? colorPrimary : colorWhite,
borderBlockStart: 0,
borderInlineStart: 0,
borderRadius: radioSize,
transform: 'scale(0)',
opacity: 0,
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,
content: '""'
},
boxSizing: 'border-box',
position: 'relative',
insetBlockStart: 0,
insetInlineStart: 0,
display: 'block',
width: radioSize,
height: radioSize,
backgroundColor: colorBgContainer,
borderColor: colorBorder,
borderStyle: 'solid',
borderWidth: lineWidth,
borderRadius: '50%',
transition: `all ${motionDurationMid}`
},
[`${componentCls}-input`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineEnd: 0,
insetBlockEnd: 0,
insetInlineStart: 0,
zIndex: 1,
cursor: 'pointer',
opacity: 0
},
// 选中状态
[`${componentCls}-checked`]: {
[radioInnerPrefixCls]: {
borderColor: colorPrimary,
backgroundColor: wireframe ? colorBgContainer : colorPrimary,
'&::after': {
transform: `scale(${dotSize / radioSize})`,
opacity: 1,
transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`
}
}
},
[`${componentCls}-disabled`]: {
cursor: 'not-allowed',
[radioInnerPrefixCls]: {
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder,
cursor: 'not-allowed',
'&::after': {
backgroundColor: dotColorDisabled
}
},
[`${componentCls}-input`]: {
cursor: 'not-allowed'
},
[`${componentCls}-disabled + span`]: {
color: colorTextDisabled,
cursor: 'not-allowed'
},
[`&${componentCls}-checked`]: {
[radioInnerPrefixCls]: {
'&::after': {
transform: `scale(${radioDotDisabledSize / radioSize})`
}
}
}
},
[`span${componentCls} + *`]: {
paddingInlineStart: paddingXS,
paddingInlineEnd: paddingXS
}
})
};
};
// Styles from radio-button
const getRadioButtonStyle = token => {
const {
buttonColor,
controlHeight,
componentCls,
lineWidth,
lineType,
colorBorder,
motionDurationSlow,
motionDurationMid,
buttonPaddingInline,
fontSize,
buttonBg,
fontSizeLG,
controlHeightLG,
controlHeightSM,
paddingXS,
borderRadius,
borderRadiusSM,
borderRadiusLG,
buttonCheckedBg,
buttonSolidCheckedColor,
colorTextDisabled,
colorBgContainerDisabled,
buttonCheckedBgDisabled,
buttonCheckedColorDisabled,
colorPrimary,
colorPrimaryHover,
colorPrimaryActive
} = token;
return {
[`${componentCls}-button-wrapper`]: {
position: 'relative',
display: 'inline-block',
height: controlHeight,
margin: 0,
paddingInline: buttonPaddingInline,
paddingBlock: 0,
color: buttonColor,
fontSize,
lineHeight: `${controlHeight - lineWidth * 2}px`,
background: buttonBg,
border: `${lineWidth}px ${lineType} ${colorBorder}`,
// strange align fix for chrome but works
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
borderBlockStartWidth: lineWidth + 0.02,
borderInlineStartWidth: 0,
borderInlineEndWidth: lineWidth,
cursor: 'pointer',
transition: [`color ${motionDurationMid}`, `background ${motionDurationMid}`, `border-color ${motionDurationMid}`, `box-shadow ${motionDurationMid}`].join(','),
a: {
color: buttonColor
},
[`> ${componentCls}-button`]: {
position: 'absolute',
insetBlockStart: 0,
insetInlineStart: 0,
zIndex: -1,
width: '100%',
height: '100%'
},
'&:not(:first-child)': {
'&::before': {
position: 'absolute',
insetBlockStart: -lineWidth,
insetInlineStart: -lineWidth,
display: 'block',
boxSizing: 'content-box',
width: 1,
height: '100%',
paddingBlock: lineWidth,
paddingInline: 0,
backgroundColor: colorBorder,
transition: `background-color ${motionDurationSlow}`,
content: '""'
}
},
'&:first-child': {
borderInlineStart: `${lineWidth}px ${lineType} ${colorBorder}`,
borderStartStartRadius: borderRadius,
borderEndStartRadius: borderRadius
},
'&:last-child': {
borderStartEndRadius: borderRadius,
borderEndEndRadius: borderRadius
},
'&:first-child:last-child': {
borderRadius
},
[`${componentCls}-group-large &`]: {
height: controlHeightLG,
fontSize: fontSizeLG,
lineHeight: `${controlHeightLG - lineWidth * 2}px`,
'&:first-child': {
borderStartStartRadius: borderRadiusLG,
borderEndStartRadius: borderRadiusLG
},
'&:last-child': {
borderStartEndRadius: borderRadiusLG,
borderEndEndRadius: borderRadiusLG
}
},
[`${componentCls}-group-small &`]: {
height: controlHeightSM,
paddingInline: paddingXS - lineWidth,
paddingBlock: 0,
lineHeight: `${controlHeightSM - lineWidth * 2}px`,
'&:first-child': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM
},
'&:last-child': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM
}
},
'&:hover': {
position: 'relative',
color: colorPrimary
},
'&:has(:focus-visible)': Object.assign({}, (0,style/* genFocusOutline */.oN)(token)),
[`${componentCls}-inner, input[type='checkbox'], input[type='radio']`]: {
width: 0,
height: 0,
opacity: 0,
pointerEvents: 'none'
},
[`&-checked:not(${componentCls}-button-wrapper-disabled)`]: {
zIndex: 1,
color: colorPrimary,
background: buttonCheckedBg,
borderColor: colorPrimary,
'&::before': {
backgroundColor: colorPrimary
},
'&:first-child': {
borderColor: colorPrimary
},
'&:hover': {
color: colorPrimaryHover,
borderColor: colorPrimaryHover,
'&::before': {
backgroundColor: colorPrimaryHover
}
},
'&:active': {
color: colorPrimaryActive,
borderColor: colorPrimaryActive,
'&::before': {
backgroundColor: colorPrimaryActive
}
}
},
[`${componentCls}-group-solid &-checked:not(${componentCls}-button-wrapper-disabled)`]: {
color: buttonSolidCheckedColor,
background: colorPrimary,
borderColor: colorPrimary,
'&:hover': {
color: buttonSolidCheckedColor,
background: colorPrimaryHover,
borderColor: colorPrimaryHover
},
'&:active': {
color: buttonSolidCheckedColor,
background: colorPrimaryActive,
borderColor: colorPrimaryActive
}
},
'&-disabled': {
color: colorTextDisabled,
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder,
cursor: 'not-allowed',
'&:first-child, &:hover': {
color: colorTextDisabled,
backgroundColor: colorBgContainerDisabled,
borderColor: colorBorder
}
},
[`&-disabled${componentCls}-button-wrapper-checked`]: {
color: buttonCheckedColorDisabled,
backgroundColor: buttonCheckedBgDisabled,
borderColor: colorBorder,
boxShadow: 'none'
}
}
};
};
const getDotSize = radioSize => {
const dotPadding = 4; // Fixed Value
return radioSize - dotPadding * 2;
};
// ============================== Export ==============================
/* harmony default export */ var radio_style = ((0,genComponentStyleHook/* default */.Z)('Radio', token => {
const {
controlOutline,
controlOutlineWidth,
radioSize
} = token;
const radioFocusShadow = `0 0 0 ${controlOutlineWidth}px ${controlOutline}`;
const radioButtonFocusShadow = radioFocusShadow;
const radioDotDisabledSize = getDotSize(radioSize);
const radioToken = (0,statistic/* merge */.TS)(token, {
radioDotDisabledSize,
radioFocusShadow,
radioButtonFocusShadow
});
return [getGroupRadioStyle(radioToken), getRadioBasicStyle(radioToken), getRadioButtonStyle(radioToken)];
}, token => {
const {
wireframe,
padding,
marginXS,
lineWidth,
fontSizeLG,
colorText,
colorBgContainer,
colorTextDisabled,
controlItemBgActiveDisabled,
colorTextLightSolid
} = token;
const dotPadding = 4; // Fixed value
const radioSize = fontSizeLG;
const radioDotSize = wireframe ? getDotSize(radioSize) : radioSize - (dotPadding + lineWidth) * 2;
return {
// Radio
radioSize,
dotSize: radioDotSize,
dotColorDisabled: colorTextDisabled,
// Radio buttons
buttonSolidCheckedColor: colorTextLightSolid,
buttonBg: colorBgContainer,
buttonCheckedBg: colorBgContainer,
buttonColor: colorText,
buttonCheckedBgDisabled: controlItemBgActiveDisabled,
buttonCheckedColorDisabled: colorTextDisabled,
buttonPaddingInline: padding - lineWidth,
wrapperMarginInlineEnd: marginXS
};
}));
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radio.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;
};
const InternalRadio = (props, ref) => {
var _a, _b;
const groupContext = react.useContext(radio_context);
const radioOptionTypeContext = react.useContext(RadioOptionTypeContext);
const {
getPrefixCls,
direction,
radio
} = react.useContext(context/* ConfigContext */.E_);
const innerRef = react.useRef(null);
const mergedRef = (0,es_ref/* composeRef */.sQ)(ref, innerRef);
const {
isFormItemInput
} = react.useContext(form_context/* FormItemInputContext */.aM);
false ? 0 : void 0;
const onChange = e => {
var _a, _b;
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);
};
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
children,
style
} = props,
restProps = __rest(props, ["prefixCls", "className", "rootClassName", "children", "style"]);
const radioPrefixCls = getPrefixCls('radio', customizePrefixCls);
const prefixCls = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button' ? `${radioPrefixCls}-button` : radioPrefixCls;
// Style
const [wrapSSR, hashId] = radio_style(radioPrefixCls);
const radioProps = Object.assign({}, restProps);
// ===================== Disabled =====================
const disabled = react.useContext(DisabledContext/* default */.Z);
if (groupContext) {
radioProps.name = groupContext.name;
radioProps.onChange = onChange;
radioProps.checked = props.value === groupContext.value;
radioProps.disabled = (_a = radioProps.disabled) !== null && _a !== void 0 ? _a : groupContext.disabled;
}
radioProps.disabled = (_b = radioProps.disabled) !== null && _b !== void 0 ? _b : disabled;
const wrapperClassString = classnames_default()(`${prefixCls}-wrapper`, {
[`${prefixCls}-wrapper-checked`]: radioProps.checked,
[`${prefixCls}-wrapper-disabled`]: radioProps.disabled,
[`${prefixCls}-wrapper-rtl`]: direction === 'rtl',
[`${prefixCls}-wrapper-in-form-item`]: isFormItemInput
}, radio === null || radio === void 0 ? void 0 : radio.className, className, rootClassName, hashId);
return wrapSSR(
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/label-has-associated-control
react.createElement("label", {
className: wrapperClassString,
style: Object.assign(Object.assign({}, radio === null || radio === void 0 ? void 0 : radio.style), style),
onMouseEnter: props.onMouseEnter,
onMouseLeave: props.onMouseLeave
}, /*#__PURE__*/react.createElement(es/* default */.Z, Object.assign({}, radioProps, {
type: "radio",
prefixCls: prefixCls,
ref: mergedRef
})), children !== undefined ? /*#__PURE__*/react.createElement("span", null, children) : null));
};
const Radio = /*#__PURE__*/react.forwardRef(InternalRadio);
if (false) {}
/* harmony default export */ var radio_radio = (Radio);
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/group.js
const RadioGroup = /*#__PURE__*/react.forwardRef((props, ref) => {
const {
getPrefixCls,
direction
} = react.useContext(context/* ConfigContext */.E_);
const [value, setValue] = (0,useMergedState/* default */.Z)(props.defaultValue, {
value: props.value
});
const onRadioChange = ev => {
const lastValue = value;
const val = ev.target.value;
if (!('value' in props)) {
setValue(val);
}
const {
onChange
} = props;
if (onChange && val !== lastValue) {
onChange(ev);
}
};
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
options,
buttonStyle = 'outline',
disabled,
children,
size: customizeSize,
style,
id,
onMouseEnter,
onMouseLeave,
onFocus,
onBlur
} = props;
const prefixCls = getPrefixCls('radio', customizePrefixCls);
const groupPrefixCls = `${prefixCls}-group`;
// Style
const [wrapSSR, hashId] = radio_style(prefixCls);
let childrenToRender = children;
// 如果存在 options, 优先使用
if (options && options.length > 0) {
childrenToRender = options.map(option => {
if (typeof option === 'string' || typeof option === 'number') {
// 此处类型自动推导为 string
return /*#__PURE__*/react.createElement(radio_radio, {
key: option.toString(),
prefixCls: prefixCls,
disabled: disabled,
value: option,
checked: value === option
}, option);
}
// 此处类型自动推导为 { label: string value: string }
return /*#__PURE__*/react.createElement(radio_radio, {
key: `radio-group-value-options-${option.value}`,
prefixCls: prefixCls,
disabled: option.disabled || disabled,
value: option.value,
checked: value === option.value,
title: option.title,
style: option.style
}, option.label);
});
}
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
const classString = classnames_default()(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
[`${groupPrefixCls}-${mergedSize}`]: mergedSize,
[`${groupPrefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
return wrapSSR( /*#__PURE__*/react.createElement("div", Object.assign({}, (0,pickAttrs/* default */.Z)(props, {
aria: true,
data: true
}), {
className: classString,
style: style,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onFocus: onFocus,
onBlur: onBlur,
id: id,
ref: ref
}), /*#__PURE__*/react.createElement(RadioGroupContextProvider, {
value: {
onChange: onRadioChange,
value,
disabled: props.disabled,
name: props.name,
optionType: props.optionType
}
}, childrenToRender)));
});
/* harmony default export */ var group = (/*#__PURE__*/react.memo(RadioGroup));
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/radioButton.js
var radioButton_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 RadioButton = (props, ref) => {
const {
getPrefixCls
} = react.useContext(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls
} = props,
radioProps = radioButton_rest(props, ["prefixCls"]);
const prefixCls = getPrefixCls('radio', customizePrefixCls);
return /*#__PURE__*/react.createElement(RadioOptionTypeContextProvider, {
value: 'button'
}, /*#__PURE__*/react.createElement(radio_radio, Object.assign({
prefixCls: prefixCls
}, radioProps, {
type: 'radio',
ref: ref
})));
};
/* harmony default export */ var radioButton = (/*#__PURE__*/react.forwardRef(RadioButton));
;// CONCATENATED MODULE: ./node_modules/antd/es/radio/index.js
'use client';
const radio_Radio = radio_radio;
radio_Radio.Button = radioButton;
radio_Radio.Group = group;
radio_Radio.__ANT_RADIO = true;
/* harmony default export */ var es_radio = (radio_Radio);
/***/ }),
/***/ 1337:
/*!****************************************************************!*\
!*** ./node_modules/antd/node_modules/rc-util/es/pickAttrs.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ pickAttrs; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/);
/* eslint-enable max-len */
var ariaPrefix = 'aria-';
var dataPrefix = 'data-';
function match(key, prefix) {
return key.indexOf(prefix) === 0;
}
/**
* Picker props from exist props with filter
* @param props Passed props
* @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
*/
function pickAttrs(props) {
var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var mergedConfig;
if (ariaOnly === false) {
mergedConfig = {
aria: true,
data: true,
attr: true
};
} else if (ariaOnly === true) {
mergedConfig = {
aria: true
};
} else {
mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, ariaOnly);
}
var attrs = {};
Object.keys(props).forEach(function (key) {
if (
// Aria
mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||
// Data
mergedConfig.data && match(key, dataPrefix) ||
// Attr
mergedConfig.attr && propList.includes(key)) {
attrs[key] = props[key];
}
});
return attrs;
}
/***/ }),
/***/ 95860:
/*!**********************************************************!*\
!*** ./node_modules/rc-checkbox/es/index.js + 5 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ es; }
});
// UNUSED EXPORTS: Checkbox
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(87462);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__(1413);
// 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/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);
;// CONCATENATED MODULE: ./node_modules/rc-checkbox/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-checkbox/node_modules/rc-util/es/Dom/canUseDom.js
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}
;// CONCATENATED MODULE: ./node_modules/rc-checkbox/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-checkbox/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 = (0,slicedToArray/* default */.Z)(_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-checkbox/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 = (0,slicedToArray/* default */.Z)(_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 = (0,slicedToArray/* default */.Z)(_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-checkbox/es/index.js
var _excluded = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"];
var Checkbox = /*#__PURE__*/(0,react.forwardRef)(function (props, ref) {
var _classNames;
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-checkbox' : _props$prefixCls,
className = props.className,
style = props.style,
checked = props.checked,
disabled = props.disabled,
_props$defaultChecked = props.defaultChecked,
defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked,
_props$type = props.type,
type = _props$type === void 0 ? 'checkbox' : _props$type,
title = props.title,
onChange = props.onChange,
inputProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
var inputRef = (0,react.useRef)(null);
var _useMergedState = useMergedState(defaultChecked, {
value: checked
}),
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
rawValue = _useMergedState2[0],
setRawValue = _useMergedState2[1];
(0,react.useImperativeHandle)(ref, function () {
return {
focus: function focus() {
var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
},
blur: function blur() {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
},
input: inputRef.current
};
});
var classString = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), rawValue), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
var handleChange = function handleChange(e) {
if (disabled) {
return;
}
if (!('checked' in props)) {
setRawValue(e.target.checked);
}
onChange === null || onChange === void 0 ? void 0 : onChange({
target: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
type: type,
checked: e.target.checked
}),
stopPropagation: function stopPropagation() {
e.stopPropagation();
},
preventDefault: function preventDefault() {
e.preventDefault();
},
nativeEvent: e.nativeEvent
});
};
return /*#__PURE__*/react.createElement("span", {
className: classString,
title: title,
style: style
}, /*#__PURE__*/react.createElement("input", (0,esm_extends/* default */.Z)({}, inputProps, {
className: "".concat(prefixCls, "-input"),
ref: inputRef,
onChange: handleChange,
disabled: disabled,
checked: !!rawValue,
type: type
})), /*#__PURE__*/react.createElement("span", {
className: "".concat(prefixCls, "-inner")
}));
});
/* harmony default export */ var es = (Checkbox);
/***/ })
}]);