{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar _excluded = [\"id\", \"mode\", \"prefixCls\", \"backfill\", \"fieldNames\", \"inputValue\", \"searchValue\", \"onSearch\", \"autoClearSearchValue\", \"onSelect\", \"onDeselect\", \"dropdownMatchSelectWidth\", \"filterOption\", \"filterSort\", \"optionFilterProp\", \"optionLabelProp\", \"options\", \"optionRender\", \"children\", \"defaultActiveFirstOption\", \"menuItemSelectedIcon\", \"virtual\", \"direction\", \"listHeight\", \"listItemHeight\", \"labelRender\", \"value\", \"defaultValue\", \"labelInValue\", \"onChange\", \"maxCount\"];\n/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\n\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport BaseSelect, { isMultiple } from \"./BaseSelect\";\nimport OptGroup from \"./OptGroup\";\nimport Option from \"./Option\";\nimport OptionList from \"./OptionList\";\nimport SelectContext from \"./SelectContext\";\nimport useCache from \"./hooks/useCache\";\nimport useFilterOptions from \"./hooks/useFilterOptions\";\nimport useId from \"./hooks/useId\";\nimport useOptions from \"./hooks/useOptions\";\nimport useRefFunc from \"./hooks/useRefFunc\";\nimport { hasValue, isComboNoValue, toArray } from \"./utils/commonUtil\";\nimport { fillFieldNames, flattenOptions, injectPropsWithOption } from \"./utils/valueUtil\";\nimport warningProps, { warningNullOptions } from \"./utils/warningPropsUtil\";\nvar OMIT_DOM_PROPS = ['inputValue'];\nfunction isRawValue(value) {\n return !value || _typeof(value) !== 'object';\n}\nvar Select = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n mode = props.mode,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,\n backfill = props.backfill,\n fieldNames = props.fieldNames,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n onSearch = props.onSearch,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,\n filterOption = props.filterOption,\n filterSort = props.filterSort,\n optionFilterProp = props.optionFilterProp,\n optionLabelProp = props.optionLabelProp,\n options = props.options,\n optionRender = props.optionRender,\n children = props.children,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n virtual = props.virtual,\n direction = props.direction,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n labelRender = props.labelRender,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n onChange = props.onChange,\n maxCount = props.maxCount,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var multiple = isMultiple(mode);\n var childrenAsData = !!(!options && children);\n var mergedFilterOption = React.useMemo(function () {\n if (filterOption === undefined && mode === 'combobox') {\n return false;\n }\n return filterOption;\n }, [filterOption, mode]);\n\n // ========================= FieldNames =========================\n var mergedFieldNames = React.useMemo(function () {\n return fillFieldNames(fieldNames, childrenAsData);\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [\n // We stringify fieldNames to avoid unnecessary re-renders.\n JSON.stringify(fieldNames), childrenAsData]\n /* eslint-enable react-hooks/exhaustive-deps */);\n\n // =========================== Search ===========================\n var _useMergedState = useMergedState('', {\n value: searchValue !== undefined ? searchValue : inputValue,\n postState: function postState(search) {\n return search || '';\n }\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n mergedSearchValue = _useMergedState2[0],\n setSearchValue = _useMergedState2[1];\n\n // =========================== Option ===========================\n var parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);\n var valueOptions = parsedOptions.valueOptions,\n labelOptions = parsedOptions.labelOptions,\n mergedOptions = parsedOptions.options;\n\n // ========================= Wrap Value =========================\n var convert2LabelValues = React.useCallback(function (draftValues) {\n // Convert to array\n var valueList = toArray(draftValues);\n\n // Convert to labelInValue type\n return valueList.map(function (val) {\n var rawValue;\n var rawLabel;\n var rawKey;\n var rawDisabled;\n var rawTitle;\n\n // Fill label & value\n if (isRawValue(val)) {\n rawValue = val;\n } else {\n var _val$value;\n rawKey = val.key;\n rawLabel = val.label;\n rawValue = (_val$value = val.value) !== null && _val$value !== void 0 ? _val$value : rawKey;\n }\n var option = valueOptions.get(rawValue);\n if (option) {\n var _option$key;\n // Fill missing props\n if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];\n if (rawKey === undefined) rawKey = (_option$key = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key !== void 0 ? _option$key : rawValue;\n rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;\n rawTitle = option === null || option === void 0 ? void 0 : option.title;\n\n // Warning if label not same as provided\n if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {\n var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];\n if (optionLabel !== undefined && ! /*#__PURE__*/React.isValidElement(optionLabel) && ! /*#__PURE__*/React.isValidElement(rawLabel) && optionLabel !== rawLabel) {\n warning(false, '`label` of `value` is not same as `label` in Select options.');\n }\n }\n }\n return {\n label: rawLabel,\n value: rawValue,\n key: rawKey,\n disabled: rawDisabled,\n title: rawTitle\n };\n });\n }, [mergedFieldNames, optionLabelProp, valueOptions]);\n\n // =========================== Values ===========================\n var _useMergedState3 = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n internalValue = _useMergedState4[0],\n setInternalValue = _useMergedState4[1];\n\n // Merged value with LabelValueType\n var rawLabeledValues = React.useMemo(function () {\n var _values$;\n var newInternalValue = multiple && internalValue === null ? [] : internalValue;\n var values = convert2LabelValues(newInternalValue);\n\n // combobox no need save value when it's no value (exclude value equal 0)\n if (mode === 'combobox' && isComboNoValue((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.value)) {\n return [];\n }\n return values;\n }, [internalValue, convert2LabelValues, mode, multiple]);\n\n // Fill label with cache to avoid option remove\n var _useCache = useCache(rawLabeledValues, valueOptions),\n _useCache2 = _slicedToArray(_useCache, 2),\n mergedValues = _useCache2[0],\n getMixedOption = _useCache2[1];\n var displayValues = React.useMemo(function () {\n // `null` need show as placeholder instead\n // https://github.com/ant-design/ant-design/issues/25057\n if (!mode && mergedValues.length === 1) {\n var firstValue = mergedValues[0];\n if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {\n return [];\n }\n }\n return mergedValues.map(function (item) {\n var _ref;\n return _objectSpread(_objectSpread({}, item), {}, {\n label: (_ref = typeof labelRender === 'function' ? labelRender(item) : item.label) !== null && _ref !== void 0 ? _ref : item.value\n });\n });\n }, [mode, mergedValues, labelRender]);\n\n /** Convert `displayValues` to raw value type set */\n var rawValues = React.useMemo(function () {\n return new Set(mergedValues.map(function (val) {\n return val.value;\n }));\n }, [mergedValues]);\n React.useEffect(function () {\n if (mode === 'combobox') {\n var _mergedValues$;\n var strValue = (_mergedValues$ = mergedValues[0]) === null || _mergedValues$ === void 0 ? void 0 : _mergedValues$.value;\n setSearchValue(hasValue(strValue) ? String(strValue) : '');\n }\n }, [mergedValues]);\n\n // ======================= Display Option =======================\n // Create a placeholder item if not exist in `options`\n var createTagOption = useRefFunc(function (val, label) {\n var mergedLabel = label !== null && label !== void 0 ? label : val;\n return _defineProperty(_defineProperty({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);\n });\n\n // Fill tag as option if mode is `tags`\n var filledTagOptions = React.useMemo(function () {\n if (mode !== 'tags') {\n return mergedOptions;\n }\n\n // >>> Tag mode\n var cloneOptions = _toConsumableArray(mergedOptions);\n\n // Check if value exist in options (include new patch item)\n var existOptions = function existOptions(val) {\n return valueOptions.has(val);\n };\n\n // Fill current value as option\n _toConsumableArray(mergedValues).sort(function (a, b) {\n return a.value < b.value ? -1 : 1;\n }).forEach(function (item) {\n var val = item.value;\n if (!existOptions(val)) {\n cloneOptions.push(createTagOption(val, item.label));\n }\n });\n return cloneOptions;\n }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);\n var filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);\n\n // Fill options with search value if needed\n var filledSearchOptions = React.useMemo(function () {\n if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {\n return item[optionFilterProp || 'value'] === mergedSearchValue;\n })) {\n return filteredOptions;\n }\n // ignore when search value equal select input value\n if (filteredOptions.some(function (item) {\n return item[mergedFieldNames.value] === mergedSearchValue;\n })) {\n return filteredOptions;\n }\n // Fill search value as option\n return [createTagOption(mergedSearchValue)].concat(_toConsumableArray(filteredOptions));\n }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);\n var orderedFilteredOptions = React.useMemo(function () {\n if (!filterSort) {\n return filledSearchOptions;\n }\n return _toConsumableArray(filledSearchOptions).sort(function (a, b) {\n return filterSort(a, b, {\n searchValue: mergedSearchValue\n });\n });\n }, [filledSearchOptions, filterSort, mergedSearchValue]);\n var displayOptions = React.useMemo(function () {\n return flattenOptions(orderedFilteredOptions, {\n fieldNames: mergedFieldNames,\n childrenAsData: childrenAsData\n });\n }, [orderedFilteredOptions, mergedFieldNames, childrenAsData]);\n\n // =========================== Change ===========================\n var triggerChange = function triggerChange(values) {\n var labeledValues = convert2LabelValues(values);\n setInternalValue(labeledValues);\n if (onChange && (\n // Trigger event only when value changed\n labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {\n var _mergedValues$index;\n return ((_mergedValues$index = mergedValues[index]) === null || _mergedValues$index === void 0 ? void 0 : _mergedValues$index.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);\n }))) {\n var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {\n return v.value;\n });\n var returnOptions = labeledValues.map(function (v) {\n return injectPropsWithOption(getMixedOption(v.value));\n });\n onChange(\n // Value\n multiple ? returnValues : returnValues[0],\n // Option\n multiple ? returnOptions : returnOptions[0]);\n }\n };\n\n // ======================= Accessibility ========================\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n activeValue = _React$useState2[0],\n setActiveValue = _React$useState2[1];\n var _React$useState3 = React.useState(0),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n accessibilityIndex = _React$useState4[0],\n setAccessibilityIndex = _React$useState4[1];\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n var onActiveValue = React.useCallback(function (active, index) {\n var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref3$source = _ref3.source,\n source = _ref3$source === void 0 ? 'keyboard' : _ref3$source;\n setAccessibilityIndex(index);\n if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {\n setActiveValue(String(active));\n }\n }, [backfill, mode]);\n\n // ========================= OptionList =========================\n var triggerSelect = function triggerSelect(val, selected, type) {\n var getSelectEnt = function getSelectEnt() {\n var _option$key2;\n var option = getMixedOption(val);\n return [labelInValue ? {\n label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],\n value: val,\n key: (_option$key2 = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key2 !== void 0 ? _option$key2 : val\n } : val, injectPropsWithOption(option)];\n };\n if (selected && onSelect) {\n var _getSelectEnt = getSelectEnt(),\n _getSelectEnt2 = _slicedToArray(_getSelectEnt, 2),\n wrappedValue = _getSelectEnt2[0],\n _option = _getSelectEnt2[1];\n onSelect(wrappedValue, _option);\n } else if (!selected && onDeselect && type !== 'clear') {\n var _getSelectEnt3 = getSelectEnt(),\n _getSelectEnt4 = _slicedToArray(_getSelectEnt3, 2),\n _wrappedValue = _getSelectEnt4[0],\n _option2 = _getSelectEnt4[1];\n onDeselect(_wrappedValue, _option2);\n }\n };\n\n // Used for OptionList selection\n var onInternalSelect = useRefFunc(function (val, info) {\n var cloneValues;\n\n // Single mode always trigger select only with option list\n var mergedSelect = multiple ? info.selected : true;\n if (mergedSelect) {\n cloneValues = multiple ? [].concat(_toConsumableArray(mergedValues), [val]) : [val];\n } else {\n cloneValues = mergedValues.filter(function (v) {\n return v.value !== val;\n });\n }\n triggerChange(cloneValues);\n triggerSelect(val, mergedSelect);\n\n // Clean search value if single or configured\n if (mode === 'combobox') {\n // setSearchValue(String(val));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setSearchValue('');\n setActiveValue('');\n }\n });\n\n // ======================= Display Change =======================\n // BaseSelect display values change\n var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {\n triggerChange(nextValues);\n var type = info.type,\n values = info.values;\n if (type === 'remove' || type === 'clear') {\n values.forEach(function (item) {\n triggerSelect(item.value, false, type);\n });\n }\n };\n\n // =========================== Search ===========================\n var onInternalSearch = function onInternalSearch(searchText, info) {\n setSearchValue(searchText);\n setActiveValue(null);\n\n // [Submit] Tag mode should flush input\n if (info.source === 'submit') {\n var formatted = (searchText || '').trim();\n // prevent empty tags from appearing when you click the Enter button\n if (formatted) {\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), [formatted])));\n triggerChange(newRawValues);\n triggerSelect(formatted, true);\n setSearchValue('');\n }\n return;\n }\n if (info.source !== 'blur') {\n if (mode === 'combobox') {\n triggerChange(searchText);\n }\n onSearch === null || onSearch === void 0 || onSearch(searchText);\n }\n };\n var onInternalSearchSplit = function onInternalSearchSplit(words) {\n var patchValues = words;\n if (mode !== 'tags') {\n patchValues = words.map(function (word) {\n var opt = labelOptions.get(word);\n return opt === null || opt === void 0 ? void 0 : opt.value;\n }).filter(function (val) {\n return val !== undefined;\n });\n }\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), _toConsumableArray(patchValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true);\n });\n };\n\n // ========================== Context ===========================\n var selectContext = React.useMemo(function () {\n var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;\n return _objectSpread(_objectSpread({}, parsedOptions), {}, {\n flattenOptions: displayOptions,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n onSelect: onInternalSelect,\n menuItemSelectedIcon: menuItemSelectedIcon,\n rawValues: rawValues,\n fieldNames: mergedFieldNames,\n virtual: realVirtual,\n direction: direction,\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n childrenAsData: childrenAsData,\n maxCount: maxCount,\n optionRender: optionRender\n });\n }, [maxCount, parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, direction, listHeight, listItemHeight, childrenAsData, optionRender]);\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n warningNullOptions(mergedOptions, mergedFieldNames);\n }\n\n // ==============================================================\n // == Render ==\n // ==============================================================\n return /*#__PURE__*/React.createElement(SelectContext.Provider, {\n value: selectContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({}, restProps, {\n // >>> MISC\n id: mergedId,\n prefixCls: prefixCls,\n ref: ref,\n omitDomProps: OMIT_DOM_PROPS,\n mode: mode\n // >>> Values\n ,\n\n displayValues: displayValues,\n onDisplayValuesChange: onDisplayValuesChange\n // >>> Trigger\n ,\n\n direction: direction\n // >>> Search\n ,\n\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch,\n autoClearSearchValue: autoClearSearchValue,\n onSearchSplit: onInternalSearchSplit,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n // >>> OptionList\n ,\n\n OptionList: OptionList,\n emptyOptions: !displayOptions.length\n // >>> Accessibility\n ,\n\n activeValue: activeValue,\n activeDescendantId: \"\".concat(mergedId, \"_list_\").concat(accessibilityIndex)\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Select.displayName = 'Select';\n}\nvar TypedSelect = Select;\nTypedSelect.Option = Option;\nTypedSelect.OptGroup = OptGroup;\nexport default TypedSelect;","map":{"version":3,"names":["_extends","_toConsumableArray","_defineProperty","_objectSpread","_slicedToArray","_objectWithoutProperties","_typeof","_excluded","useMergedState","warning","React","BaseSelect","isMultiple","OptGroup","Option","OptionList","SelectContext","useCache","useFilterOptions","useId","useOptions","useRefFunc","hasValue","isComboNoValue","toArray","fillFieldNames","flattenOptions","injectPropsWithOption","warningProps","warningNullOptions","OMIT_DOM_PROPS","isRawValue","value","Select","forwardRef","props","ref","id","mode","_props$prefixCls","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","_props$autoClearSearc","autoClearSearchValue","onSelect","onDeselect","_props$dropdownMatchS","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","_props$listHeight","listHeight","_props$listItemHeight","listItemHeight","labelRender","defaultValue","labelInValue","onChange","maxCount","restProps","mergedId","multiple","childrenAsData","mergedFilterOption","useMemo","undefined","mergedFieldNames","JSON","stringify","_useMergedState","postState","search","_useMergedState2","mergedSearchValue","setSearchValue","parsedOptions","valueOptions","labelOptions","mergedOptions","convert2LabelValues","useCallback","draftValues","valueList","map","val","rawValue","rawLabel","rawKey","rawDisabled","rawTitle","_val$value","key","label","option","get","_option$key","disabled","title","process","env","NODE_ENV","optionLabel","isValidElement","_useMergedState3","_useMergedState4","internalValue","setInternalValue","rawLabeledValues","_values$","newInternalValue","values","_useCache","_useCache2","mergedValues","getMixedOption","displayValues","length","firstValue","item","_ref","rawValues","Set","useEffect","_mergedValues$","strValue","String","createTagOption","mergedLabel","filledTagOptions","cloneOptions","existOptions","has","sort","a","b","forEach","push","filteredOptions","filledSearchOptions","some","concat","orderedFilteredOptions","displayOptions","triggerChange","labeledValues","newVal","index","_mergedValues$index","returnValues","v","returnOptions","_React$useState","useState","_React$useState2","activeValue","setActiveValue","_React$useState3","_React$useState4","accessibilityIndex","setAccessibilityIndex","mergedDefaultActiveFirstOption","onActiveValue","active","_ref3","arguments","_ref3$source","source","triggerSelect","selected","type","getSelectEnt","_option$key2","_getSelectEnt","_getSelectEnt2","wrappedValue","_option","_getSelectEnt3","_getSelectEnt4","_wrappedValue","_option2","onInternalSelect","info","cloneValues","mergedSelect","filter","onDisplayValuesChange","nextValues","onInternalSearch","searchText","formatted","trim","newRawValues","Array","from","onInternalSearchSplit","words","patchValues","word","opt","newRawValue","selectContext","realVirtual","createElement","Provider","omitDomProps","onSearchSplit","emptyOptions","activeDescendantId","displayName","TypedSelect"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-select/es/Select.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar _excluded = [\"id\", \"mode\", \"prefixCls\", \"backfill\", \"fieldNames\", \"inputValue\", \"searchValue\", \"onSearch\", \"autoClearSearchValue\", \"onSelect\", \"onDeselect\", \"dropdownMatchSelectWidth\", \"filterOption\", \"filterSort\", \"optionFilterProp\", \"optionLabelProp\", \"options\", \"optionRender\", \"children\", \"defaultActiveFirstOption\", \"menuItemSelectedIcon\", \"virtual\", \"direction\", \"listHeight\", \"listItemHeight\", \"labelRender\", \"value\", \"defaultValue\", \"labelInValue\", \"onChange\", \"maxCount\"];\n/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\n\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport BaseSelect, { isMultiple } from \"./BaseSelect\";\nimport OptGroup from \"./OptGroup\";\nimport Option from \"./Option\";\nimport OptionList from \"./OptionList\";\nimport SelectContext from \"./SelectContext\";\nimport useCache from \"./hooks/useCache\";\nimport useFilterOptions from \"./hooks/useFilterOptions\";\nimport useId from \"./hooks/useId\";\nimport useOptions from \"./hooks/useOptions\";\nimport useRefFunc from \"./hooks/useRefFunc\";\nimport { hasValue, isComboNoValue, toArray } from \"./utils/commonUtil\";\nimport { fillFieldNames, flattenOptions, injectPropsWithOption } from \"./utils/valueUtil\";\nimport warningProps, { warningNullOptions } from \"./utils/warningPropsUtil\";\nvar OMIT_DOM_PROPS = ['inputValue'];\nfunction isRawValue(value) {\n return !value || _typeof(value) !== 'object';\n}\nvar Select = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var id = props.id,\n mode = props.mode,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,\n backfill = props.backfill,\n fieldNames = props.fieldNames,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n onSearch = props.onSearch,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$dropdownMatchS = props.dropdownMatchSelectWidth,\n dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,\n filterOption = props.filterOption,\n filterSort = props.filterSort,\n optionFilterProp = props.optionFilterProp,\n optionLabelProp = props.optionLabelProp,\n options = props.options,\n optionRender = props.optionRender,\n children = props.children,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n virtual = props.virtual,\n direction = props.direction,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n labelRender = props.labelRender,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n onChange = props.onChange,\n maxCount = props.maxCount,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedId = useId(id);\n var multiple = isMultiple(mode);\n var childrenAsData = !!(!options && children);\n var mergedFilterOption = React.useMemo(function () {\n if (filterOption === undefined && mode === 'combobox') {\n return false;\n }\n return filterOption;\n }, [filterOption, mode]);\n\n // ========================= FieldNames =========================\n var mergedFieldNames = React.useMemo(function () {\n return fillFieldNames(fieldNames, childrenAsData);\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [\n // We stringify fieldNames to avoid unnecessary re-renders.\n JSON.stringify(fieldNames), childrenAsData]\n /* eslint-enable react-hooks/exhaustive-deps */);\n\n // =========================== Search ===========================\n var _useMergedState = useMergedState('', {\n value: searchValue !== undefined ? searchValue : inputValue,\n postState: function postState(search) {\n return search || '';\n }\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n mergedSearchValue = _useMergedState2[0],\n setSearchValue = _useMergedState2[1];\n\n // =========================== Option ===========================\n var parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);\n var valueOptions = parsedOptions.valueOptions,\n labelOptions = parsedOptions.labelOptions,\n mergedOptions = parsedOptions.options;\n\n // ========================= Wrap Value =========================\n var convert2LabelValues = React.useCallback(function (draftValues) {\n // Convert to array\n var valueList = toArray(draftValues);\n\n // Convert to labelInValue type\n return valueList.map(function (val) {\n var rawValue;\n var rawLabel;\n var rawKey;\n var rawDisabled;\n var rawTitle;\n\n // Fill label & value\n if (isRawValue(val)) {\n rawValue = val;\n } else {\n var _val$value;\n rawKey = val.key;\n rawLabel = val.label;\n rawValue = (_val$value = val.value) !== null && _val$value !== void 0 ? _val$value : rawKey;\n }\n var option = valueOptions.get(rawValue);\n if (option) {\n var _option$key;\n // Fill missing props\n if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];\n if (rawKey === undefined) rawKey = (_option$key = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key !== void 0 ? _option$key : rawValue;\n rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;\n rawTitle = option === null || option === void 0 ? void 0 : option.title;\n\n // Warning if label not same as provided\n if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {\n var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];\n if (optionLabel !== undefined && ! /*#__PURE__*/React.isValidElement(optionLabel) && ! /*#__PURE__*/React.isValidElement(rawLabel) && optionLabel !== rawLabel) {\n warning(false, '`label` of `value` is not same as `label` in Select options.');\n }\n }\n }\n return {\n label: rawLabel,\n value: rawValue,\n key: rawKey,\n disabled: rawDisabled,\n title: rawTitle\n };\n });\n }, [mergedFieldNames, optionLabelProp, valueOptions]);\n\n // =========================== Values ===========================\n var _useMergedState3 = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n internalValue = _useMergedState4[0],\n setInternalValue = _useMergedState4[1];\n\n // Merged value with LabelValueType\n var rawLabeledValues = React.useMemo(function () {\n var _values$;\n var newInternalValue = multiple && internalValue === null ? [] : internalValue;\n var values = convert2LabelValues(newInternalValue);\n\n // combobox no need save value when it's no value (exclude value equal 0)\n if (mode === 'combobox' && isComboNoValue((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.value)) {\n return [];\n }\n return values;\n }, [internalValue, convert2LabelValues, mode, multiple]);\n\n // Fill label with cache to avoid option remove\n var _useCache = useCache(rawLabeledValues, valueOptions),\n _useCache2 = _slicedToArray(_useCache, 2),\n mergedValues = _useCache2[0],\n getMixedOption = _useCache2[1];\n var displayValues = React.useMemo(function () {\n // `null` need show as placeholder instead\n // https://github.com/ant-design/ant-design/issues/25057\n if (!mode && mergedValues.length === 1) {\n var firstValue = mergedValues[0];\n if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {\n return [];\n }\n }\n return mergedValues.map(function (item) {\n var _ref;\n return _objectSpread(_objectSpread({}, item), {}, {\n label: (_ref = typeof labelRender === 'function' ? labelRender(item) : item.label) !== null && _ref !== void 0 ? _ref : item.value\n });\n });\n }, [mode, mergedValues, labelRender]);\n\n /** Convert `displayValues` to raw value type set */\n var rawValues = React.useMemo(function () {\n return new Set(mergedValues.map(function (val) {\n return val.value;\n }));\n }, [mergedValues]);\n React.useEffect(function () {\n if (mode === 'combobox') {\n var _mergedValues$;\n var strValue = (_mergedValues$ = mergedValues[0]) === null || _mergedValues$ === void 0 ? void 0 : _mergedValues$.value;\n setSearchValue(hasValue(strValue) ? String(strValue) : '');\n }\n }, [mergedValues]);\n\n // ======================= Display Option =======================\n // Create a placeholder item if not exist in `options`\n var createTagOption = useRefFunc(function (val, label) {\n var mergedLabel = label !== null && label !== void 0 ? label : val;\n return _defineProperty(_defineProperty({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);\n });\n\n // Fill tag as option if mode is `tags`\n var filledTagOptions = React.useMemo(function () {\n if (mode !== 'tags') {\n return mergedOptions;\n }\n\n // >>> Tag mode\n var cloneOptions = _toConsumableArray(mergedOptions);\n\n // Check if value exist in options (include new patch item)\n var existOptions = function existOptions(val) {\n return valueOptions.has(val);\n };\n\n // Fill current value as option\n _toConsumableArray(mergedValues).sort(function (a, b) {\n return a.value < b.value ? -1 : 1;\n }).forEach(function (item) {\n var val = item.value;\n if (!existOptions(val)) {\n cloneOptions.push(createTagOption(val, item.label));\n }\n });\n return cloneOptions;\n }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);\n var filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);\n\n // Fill options with search value if needed\n var filledSearchOptions = React.useMemo(function () {\n if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {\n return item[optionFilterProp || 'value'] === mergedSearchValue;\n })) {\n return filteredOptions;\n }\n // ignore when search value equal select input value\n if (filteredOptions.some(function (item) {\n return item[mergedFieldNames.value] === mergedSearchValue;\n })) {\n return filteredOptions;\n }\n // Fill search value as option\n return [createTagOption(mergedSearchValue)].concat(_toConsumableArray(filteredOptions));\n }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);\n var orderedFilteredOptions = React.useMemo(function () {\n if (!filterSort) {\n return filledSearchOptions;\n }\n return _toConsumableArray(filledSearchOptions).sort(function (a, b) {\n return filterSort(a, b, {\n searchValue: mergedSearchValue\n });\n });\n }, [filledSearchOptions, filterSort, mergedSearchValue]);\n var displayOptions = React.useMemo(function () {\n return flattenOptions(orderedFilteredOptions, {\n fieldNames: mergedFieldNames,\n childrenAsData: childrenAsData\n });\n }, [orderedFilteredOptions, mergedFieldNames, childrenAsData]);\n\n // =========================== Change ===========================\n var triggerChange = function triggerChange(values) {\n var labeledValues = convert2LabelValues(values);\n setInternalValue(labeledValues);\n if (onChange && (\n // Trigger event only when value changed\n labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {\n var _mergedValues$index;\n return ((_mergedValues$index = mergedValues[index]) === null || _mergedValues$index === void 0 ? void 0 : _mergedValues$index.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);\n }))) {\n var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {\n return v.value;\n });\n var returnOptions = labeledValues.map(function (v) {\n return injectPropsWithOption(getMixedOption(v.value));\n });\n onChange(\n // Value\n multiple ? returnValues : returnValues[0],\n // Option\n multiple ? returnOptions : returnOptions[0]);\n }\n };\n\n // ======================= Accessibility ========================\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n activeValue = _React$useState2[0],\n setActiveValue = _React$useState2[1];\n var _React$useState3 = React.useState(0),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n accessibilityIndex = _React$useState4[0],\n setAccessibilityIndex = _React$useState4[1];\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n var onActiveValue = React.useCallback(function (active, index) {\n var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref3$source = _ref3.source,\n source = _ref3$source === void 0 ? 'keyboard' : _ref3$source;\n setAccessibilityIndex(index);\n if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {\n setActiveValue(String(active));\n }\n }, [backfill, mode]);\n\n // ========================= OptionList =========================\n var triggerSelect = function triggerSelect(val, selected, type) {\n var getSelectEnt = function getSelectEnt() {\n var _option$key2;\n var option = getMixedOption(val);\n return [labelInValue ? {\n label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],\n value: val,\n key: (_option$key2 = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key2 !== void 0 ? _option$key2 : val\n } : val, injectPropsWithOption(option)];\n };\n if (selected && onSelect) {\n var _getSelectEnt = getSelectEnt(),\n _getSelectEnt2 = _slicedToArray(_getSelectEnt, 2),\n wrappedValue = _getSelectEnt2[0],\n _option = _getSelectEnt2[1];\n onSelect(wrappedValue, _option);\n } else if (!selected && onDeselect && type !== 'clear') {\n var _getSelectEnt3 = getSelectEnt(),\n _getSelectEnt4 = _slicedToArray(_getSelectEnt3, 2),\n _wrappedValue = _getSelectEnt4[0],\n _option2 = _getSelectEnt4[1];\n onDeselect(_wrappedValue, _option2);\n }\n };\n\n // Used for OptionList selection\n var onInternalSelect = useRefFunc(function (val, info) {\n var cloneValues;\n\n // Single mode always trigger select only with option list\n var mergedSelect = multiple ? info.selected : true;\n if (mergedSelect) {\n cloneValues = multiple ? [].concat(_toConsumableArray(mergedValues), [val]) : [val];\n } else {\n cloneValues = mergedValues.filter(function (v) {\n return v.value !== val;\n });\n }\n triggerChange(cloneValues);\n triggerSelect(val, mergedSelect);\n\n // Clean search value if single or configured\n if (mode === 'combobox') {\n // setSearchValue(String(val));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setSearchValue('');\n setActiveValue('');\n }\n });\n\n // ======================= Display Change =======================\n // BaseSelect display values change\n var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {\n triggerChange(nextValues);\n var type = info.type,\n values = info.values;\n if (type === 'remove' || type === 'clear') {\n values.forEach(function (item) {\n triggerSelect(item.value, false, type);\n });\n }\n };\n\n // =========================== Search ===========================\n var onInternalSearch = function onInternalSearch(searchText, info) {\n setSearchValue(searchText);\n setActiveValue(null);\n\n // [Submit] Tag mode should flush input\n if (info.source === 'submit') {\n var formatted = (searchText || '').trim();\n // prevent empty tags from appearing when you click the Enter button\n if (formatted) {\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), [formatted])));\n triggerChange(newRawValues);\n triggerSelect(formatted, true);\n setSearchValue('');\n }\n return;\n }\n if (info.source !== 'blur') {\n if (mode === 'combobox') {\n triggerChange(searchText);\n }\n onSearch === null || onSearch === void 0 || onSearch(searchText);\n }\n };\n var onInternalSearchSplit = function onInternalSearchSplit(words) {\n var patchValues = words;\n if (mode !== 'tags') {\n patchValues = words.map(function (word) {\n var opt = labelOptions.get(word);\n return opt === null || opt === void 0 ? void 0 : opt.value;\n }).filter(function (val) {\n return val !== undefined;\n });\n }\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), _toConsumableArray(patchValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true);\n });\n };\n\n // ========================== Context ===========================\n var selectContext = React.useMemo(function () {\n var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;\n return _objectSpread(_objectSpread({}, parsedOptions), {}, {\n flattenOptions: displayOptions,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n onSelect: onInternalSelect,\n menuItemSelectedIcon: menuItemSelectedIcon,\n rawValues: rawValues,\n fieldNames: mergedFieldNames,\n virtual: realVirtual,\n direction: direction,\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n childrenAsData: childrenAsData,\n maxCount: maxCount,\n optionRender: optionRender\n });\n }, [maxCount, parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, direction, listHeight, listItemHeight, childrenAsData, optionRender]);\n\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n warningProps(props);\n warningNullOptions(mergedOptions, mergedFieldNames);\n }\n\n // ==============================================================\n // == Render ==\n // ==============================================================\n return /*#__PURE__*/React.createElement(SelectContext.Provider, {\n value: selectContext\n }, /*#__PURE__*/React.createElement(BaseSelect, _extends({}, restProps, {\n // >>> MISC\n id: mergedId,\n prefixCls: prefixCls,\n ref: ref,\n omitDomProps: OMIT_DOM_PROPS,\n mode: mode\n // >>> Values\n ,\n displayValues: displayValues,\n onDisplayValuesChange: onDisplayValuesChange\n // >>> Trigger\n ,\n direction: direction\n // >>> Search\n ,\n searchValue: mergedSearchValue,\n onSearch: onInternalSearch,\n autoClearSearchValue: autoClearSearchValue,\n onSearchSplit: onInternalSearchSplit,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n // >>> OptionList\n ,\n OptionList: OptionList,\n emptyOptions: !displayOptions.length\n // >>> Accessibility\n ,\n activeValue: activeValue,\n activeDescendantId: \"\".concat(mergedId, \"_list_\").concat(accessibilityIndex)\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Select.displayName = 'Select';\n}\nvar TypedSelect = Select;\nTypedSelect.Option = Option;\nTypedSelect.OptGroup = OptGroup;\nexport default TypedSelect;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OA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