PromoCursed/node_modules/.cache/babel-loader/8f45fa6721d85c9224d6939008c9136b86d24605e5b50d7216bfdd9b5de985ad.json
2024-08-20 23:25:37 +04:00

1 line
65 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent, useMergedState } from 'rc-util';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport omit from \"rc-util/es/omit\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport PickerTrigger from \"../PickerTrigger\";\nimport { pickTriggerProps } from \"../PickerTrigger/util\";\nimport { fillIndex, getFromDate, toArray } from \"../utils/miscUtil\";\nimport PickerContext from \"./context\";\nimport useCellRender from \"./hooks/useCellRender\";\nimport useFieldsInvalidate from \"./hooks/useFieldsInvalidate\";\nimport useFilledProps from \"./hooks/useFilledProps\";\nimport useOpen from \"./hooks/useOpen\";\nimport usePickerRef from \"./hooks/usePickerRef\";\nimport usePresets from \"./hooks/usePresets\";\nimport useRangeActive from \"./hooks/useRangeActive\";\nimport useRangeDisabledDate from \"./hooks/useRangeDisabledDate\";\nimport useRangePickerValue from \"./hooks/useRangePickerValue\";\nimport useRangeValue, { useInnerValue } from \"./hooks/useRangeValue\";\nimport useShowNow from \"./hooks/useShowNow\";\nimport Popup from \"./Popup\";\nimport RangeSelector from \"./Selector/RangeSelector\";\nfunction separateConfig(config, defaultConfig) {\n var singleConfig = config !== null && config !== void 0 ? config : defaultConfig;\n if (Array.isArray(singleConfig)) {\n return singleConfig;\n }\n return [singleConfig, singleConfig];\n}\n\n/** Used for change event, it should always be not undefined */\n\nfunction getActiveRange(activeIndex) {\n return activeIndex === 1 ? 'end' : 'start';\n}\nfunction RangePicker(props, ref) {\n // ========================= Prop =========================\n var _useFilledProps = useFilledProps(props, function () {\n var disabled = props.disabled,\n allowEmpty = props.allowEmpty;\n var mergedDisabled = separateConfig(disabled, false);\n var mergedAllowEmpty = separateConfig(allowEmpty, false);\n return {\n disabled: mergedDisabled,\n allowEmpty: mergedAllowEmpty\n };\n }),\n _useFilledProps2 = _slicedToArray(_useFilledProps, 6),\n filledProps = _useFilledProps2[0],\n internalPicker = _useFilledProps2[1],\n complexPicker = _useFilledProps2[2],\n formatList = _useFilledProps2[3],\n maskFormat = _useFilledProps2[4],\n isInvalidateDate = _useFilledProps2[5];\n var prefixCls = filledProps.prefixCls,\n styles = filledProps.styles,\n classNames = filledProps.classNames,\n placement = filledProps.placement,\n defaultValue = filledProps.defaultValue,\n value = filledProps.value,\n needConfirm = filledProps.needConfirm,\n onKeyDown = filledProps.onKeyDown,\n disabled = filledProps.disabled,\n allowEmpty = filledProps.allowEmpty,\n disabledDate = filledProps.disabledDate,\n minDate = filledProps.minDate,\n maxDate = filledProps.maxDate,\n defaultOpen = filledProps.defaultOpen,\n open = filledProps.open,\n onOpenChange = filledProps.onOpenChange,\n locale = filledProps.locale,\n generateConfig = filledProps.generateConfig,\n picker = filledProps.picker,\n showNow = filledProps.showNow,\n showToday = filledProps.showToday,\n showTime = filledProps.showTime,\n mode = filledProps.mode,\n onPanelChange = filledProps.onPanelChange,\n onCalendarChange = filledProps.onCalendarChange,\n onOk = filledProps.onOk,\n defaultPickerValue = filledProps.defaultPickerValue,\n pickerValue = filledProps.pickerValue,\n onPickerValueChange = filledProps.onPickerValueChange,\n inputReadOnly = filledProps.inputReadOnly,\n suffixIcon = filledProps.suffixIcon,\n onFocus = filledProps.onFocus,\n onBlur = filledProps.onBlur,\n presets = filledProps.presets,\n ranges = filledProps.ranges,\n components = filledProps.components,\n cellRender = filledProps.cellRender,\n dateRender = filledProps.dateRender,\n monthCellRender = filledProps.monthCellRender,\n onClick = filledProps.onClick;\n\n // ========================= Refs =========================\n var selectorRef = usePickerRef(ref);\n\n // ========================= Open =========================\n var _useOpen = useOpen(open, defaultOpen, disabled, onOpenChange),\n _useOpen2 = _slicedToArray(_useOpen, 2),\n mergedOpen = _useOpen2[0],\n setMergeOpen = _useOpen2[1];\n var triggerOpen = function triggerOpen(nextOpen, config) {\n // No need to open if all disabled\n if (disabled.some(function (fieldDisabled) {\n return !fieldDisabled;\n }) || !nextOpen) {\n setMergeOpen(nextOpen, config);\n }\n };\n\n // ======================== Values ========================\n var _useInnerValue = useInnerValue(generateConfig, locale, formatList, true, false, defaultValue, value, onCalendarChange, onOk),\n _useInnerValue2 = _slicedToArray(_useInnerValue, 5),\n mergedValue = _useInnerValue2[0],\n setInnerValue = _useInnerValue2[1],\n getCalendarValue = _useInnerValue2[2],\n triggerCalendarChange = _useInnerValue2[3],\n triggerOk = _useInnerValue2[4];\n var calendarValue = getCalendarValue();\n\n // ======================== Active ========================\n var _useRangeActive = useRangeActive(disabled, allowEmpty, mergedOpen),\n _useRangeActive2 = _slicedToArray(_useRangeActive, 7),\n focused = _useRangeActive2[0],\n triggerFocus = _useRangeActive2[1],\n lastOperation = _useRangeActive2[2],\n activeIndex = _useRangeActive2[3],\n setActiveIndex = _useRangeActive2[4],\n nextActiveIndex = _useRangeActive2[5],\n activeIndexList = _useRangeActive2[6];\n var onSharedFocus = function onSharedFocus(event, index) {\n triggerFocus(true);\n onFocus === null || onFocus === void 0 || onFocus(event, {\n range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)\n });\n };\n var onSharedBlur = function onSharedBlur(event, index) {\n triggerFocus(false);\n onBlur === null || onBlur === void 0 || onBlur(event, {\n range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)\n });\n };\n\n // ======================= ShowTime =======================\n /** Used for Popup panel */\n var mergedShowTime = React.useMemo(function () {\n if (!showTime) {\n return null;\n }\n var disabledTime = showTime.disabledTime;\n var proxyDisabledTime = disabledTime ? function (date) {\n var range = getActiveRange(activeIndex);\n var fromDate = getFromDate(calendarValue, activeIndexList, activeIndex);\n return disabledTime(date, range, {\n from: fromDate\n });\n } : undefined;\n return _objectSpread(_objectSpread({}, showTime), {}, {\n disabledTime: proxyDisabledTime\n });\n }, [showTime, activeIndex, calendarValue, activeIndexList]);\n\n // ========================= Mode =========================\n var _useMergedState = useMergedState([picker, picker], {\n value: mode\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n modes = _useMergedState2[0],\n setModes = _useMergedState2[1];\n var mergedMode = modes[activeIndex] || picker;\n\n /** Extends from `mergedMode` to patch `datetime` mode */\n var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;\n\n // ====================== PanelCount ======================\n var multiplePanel = internalMode === picker && internalMode !== 'time';\n\n // ======================= Show Now =======================\n var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);\n\n // ======================== Value =========================\n var _useRangeValue = useRangeValue(filledProps, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, mergedOpen, isInvalidateDate),\n _useRangeValue2 = _slicedToArray(_useRangeValue, 2),\n /** Trigger `onChange` by check `disabledDate` */\n flushSubmit = _useRangeValue2[0],\n /** Trigger `onChange` directly without check `disabledDate` */\n triggerSubmitChange = _useRangeValue2[1];\n\n // ===================== DisabledDate =====================\n var mergedDisabledDate = useRangeDisabledDate(calendarValue, disabled, activeIndexList, generateConfig, locale, disabledDate);\n\n // ======================= Validate =======================\n var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate, allowEmpty),\n _useFieldsInvalidate2 = _slicedToArray(_useFieldsInvalidate, 2),\n submitInvalidates = _useFieldsInvalidate2[0],\n onSelectorInvalid = _useFieldsInvalidate2[1];\n\n // ===================== Picker Value =====================\n var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, modes, mergedOpen, activeIndex, internalPicker, multiplePanel, defaultPickerValue, pickerValue, mergedShowTime === null || mergedShowTime === void 0 ? void 0 : mergedShowTime.defaultOpenValue, onPickerValueChange, minDate, maxDate),\n _useRangePickerValue2 = _slicedToArray(_useRangePickerValue, 2),\n currentPickerValue = _useRangePickerValue2[0],\n setCurrentPickerValue = _useRangePickerValue2[1];\n\n // >>> Mode need wait for `pickerValue`\n var triggerModeChange = useEvent(function (nextPickerValue, nextMode, triggerEvent) {\n var clone = fillIndex(modes, activeIndex, nextMode);\n if (clone[0] !== modes[0] || clone[1] !== modes[1]) {\n setModes(clone);\n }\n\n // Compatible with `onPanelChange`\n if (onPanelChange && triggerEvent !== false) {\n var clonePickerValue = _toConsumableArray(calendarValue);\n if (nextPickerValue) {\n clonePickerValue[activeIndex] = nextPickerValue;\n }\n onPanelChange(clonePickerValue, clone);\n }\n });\n\n // ======================== Change ========================\n var fillCalendarValue = function fillCalendarValue(date, index) {\n return (\n // Trigger change only when date changed\n fillIndex(calendarValue, index, date)\n );\n };\n\n // ======================== Submit ========================\n /**\n * Trigger by confirm operation.\n * This function has already handle the `needConfirm` check logic.\n * - Selector: enter key\n * - Panel: OK button\n */\n var triggerPartConfirm = function triggerPartConfirm(date, skipFocus) {\n var nextValue = calendarValue;\n if (date) {\n nextValue = fillCalendarValue(date, activeIndex);\n }\n\n // Get next focus index\n var nextIndex = nextActiveIndex(nextValue);\n\n // Change calendar value and tell flush it\n triggerCalendarChange(nextValue);\n flushSubmit(activeIndex, nextIndex === null);\n if (nextIndex === null) {\n triggerOpen(false, {\n force: true\n });\n } else if (!skipFocus) {\n selectorRef.current.focus({\n index: nextIndex\n });\n }\n };\n\n // ======================== Click =========================\n var onSelectorClick = function onSelectorClick(event) {\n var _activeElement;\n var rootNode = event.target.getRootNode();\n if (!selectorRef.current.nativeElement.contains((_activeElement = rootNode.activeElement) !== null && _activeElement !== void 0 ? _activeElement : document.activeElement)) {\n // Click to focus the enabled input\n var enabledIndex = disabled.findIndex(function (d) {\n return !d;\n });\n if (enabledIndex >= 0) {\n selectorRef.current.focus({\n index: enabledIndex\n });\n }\n }\n triggerOpen(true);\n onClick === null || onClick === void 0 || onClick(event);\n };\n var onSelectorClear = function onSelectorClear() {\n triggerSubmitChange(null);\n triggerOpen(false, {\n force: true\n });\n };\n\n // ======================== Hover =========================\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n hoverSource = _React$useState2[0],\n setHoverSource = _React$useState2[1];\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n internalHoverValues = _React$useState4[0],\n setInternalHoverValues = _React$useState4[1];\n var hoverValues = React.useMemo(function () {\n return internalHoverValues || calendarValue;\n }, [calendarValue, internalHoverValues]);\n\n // Clean up `internalHoverValues` when closed\n React.useEffect(function () {\n if (!mergedOpen) {\n setInternalHoverValues(null);\n }\n }, [mergedOpen]);\n\n // ========================================================\n // == Panels ==\n // ========================================================\n // Save the offset with active bar position\n var _React$useState5 = React.useState(0),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n activeOffset = _React$useState6[0],\n setActiveOffset = _React$useState6[1];\n\n // ======================= Presets ========================\n var presetList = usePresets(presets, ranges);\n var onPresetHover = function onPresetHover(nextValues) {\n setInternalHoverValues(nextValues);\n setHoverSource('preset');\n };\n var onPresetSubmit = function onPresetSubmit(nextValues) {\n var passed = triggerSubmitChange(nextValues);\n if (passed) {\n triggerOpen(false, {\n force: true\n });\n }\n };\n var onNow = function onNow(now) {\n triggerPartConfirm(now);\n };\n\n // ======================== Panel =========================\n var onPanelHover = function onPanelHover(date) {\n setInternalHoverValues(date ? fillCalendarValue(date, activeIndex) : null);\n setHoverSource('cell');\n };\n\n // >>> Focus\n var onPanelFocus = function onPanelFocus(event) {\n triggerOpen(true);\n onSharedFocus(event);\n };\n\n // >>> MouseDown\n var onPanelMouseDown = function onPanelMouseDown() {\n lastOperation('panel');\n };\n\n // >>> Calendar\n var onPanelSelect = function onPanelSelect(date) {\n var clone = fillIndex(calendarValue, activeIndex, date);\n\n // Only trigger calendar event but not update internal `calendarValue` state\n triggerCalendarChange(clone);\n\n // >>> Trigger next active if !needConfirm\n // Fully logic check `useRangeValue` hook\n if (!needConfirm && !complexPicker && internalPicker === internalMode) {\n triggerPartConfirm(date);\n }\n };\n\n // >>> Close\n var onPopupClose = function onPopupClose() {\n // Close popup\n triggerOpen(false);\n };\n\n // >>> cellRender\n var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender, getActiveRange(activeIndex));\n\n // >>> Value\n var panelValue = calendarValue[activeIndex] || null;\n\n // >>> invalid\n var isPopupInvalidateDate = useEvent(function (date) {\n return isInvalidateDate(date, {\n activeIndex: activeIndex\n });\n });\n var panelProps = React.useMemo(function () {\n var domProps = pickAttrs(filledProps, false);\n var restProps = omit(filledProps, [].concat(_toConsumableArray(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange', 'disabledTime']));\n return restProps;\n }, [filledProps]);\n\n // >>> Render\n var panel = /*#__PURE__*/React.createElement(Popup, _extends({}, panelProps, {\n showNow: mergedShowNow,\n showTime: mergedShowTime\n // Range\n ,\n\n range: true,\n multiplePanel: multiplePanel,\n activeOffset: activeOffset,\n placement: placement\n // Disabled\n ,\n\n disabledDate: mergedDisabledDate\n // Focus\n ,\n\n onFocus: onPanelFocus,\n onBlur: onSharedBlur,\n onPanelMouseDown: onPanelMouseDown\n // Mode\n ,\n\n picker: picker,\n mode: mergedMode,\n internalMode: internalMode,\n onPanelChange: triggerModeChange\n // Value\n ,\n\n format: maskFormat,\n value: panelValue,\n isInvalid: isPopupInvalidateDate,\n onChange: null,\n onSelect: onPanelSelect\n // PickerValue\n ,\n\n pickerValue: currentPickerValue,\n defaultOpenValue: toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue)[activeIndex],\n onPickerValueChange: setCurrentPickerValue\n // Hover\n ,\n\n hoverValue: hoverValues,\n onHover: onPanelHover\n // Submit\n ,\n\n needConfirm: needConfirm,\n onSubmit: triggerPartConfirm,\n onOk: triggerOk\n // Preset\n ,\n\n presets: presetList,\n onPresetHover: onPresetHover,\n onPresetSubmit: onPresetSubmit\n // Now\n ,\n\n onNow: onNow\n // Render\n ,\n\n cellRender: onInternalCellRender\n }));\n\n // ========================================================\n // == Selector ==\n // ========================================================\n\n // ======================== Change ========================\n var onSelectorChange = function onSelectorChange(date, index) {\n var clone = fillCalendarValue(date, index);\n triggerCalendarChange(clone);\n };\n var onSelectorInputChange = function onSelectorInputChange() {\n lastOperation('input');\n };\n\n // ======================= Selector =======================\n var onSelectorFocus = function onSelectorFocus(event, index) {\n lastOperation('input');\n triggerOpen(true, {\n inherit: true\n });\n\n // When click input to switch the field, it will not trigger close.\n // Which means it will lose the part confirm and we need fill back.\n // ref: https://github.com/ant-design/ant-design/issues/49512\n if (activeIndex !== index && mergedOpen && !needConfirm && complexPicker) {\n triggerPartConfirm(null, true);\n }\n setActiveIndex(index);\n onSharedFocus(event, index);\n };\n var onSelectorBlur = function onSelectorBlur(event, index) {\n triggerOpen(false);\n if (!needConfirm && lastOperation() === 'input') {\n var nextIndex = nextActiveIndex(calendarValue);\n flushSubmit(activeIndex, nextIndex === null);\n }\n onSharedBlur(event, index);\n };\n var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {\n if (event.key === 'Tab') {\n triggerPartConfirm(null, true);\n }\n onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);\n };\n\n // ======================= Context ========================\n var context = React.useMemo(function () {\n return {\n prefixCls: prefixCls,\n locale: locale,\n generateConfig: generateConfig,\n button: components.button,\n input: components.input\n };\n }, [prefixCls, locale, generateConfig, components.button, components.input]);\n\n // ======================== Effect ========================\n // >>> Mode\n // Reset for every active\n useLayoutEffect(function () {\n if (mergedOpen && activeIndex !== undefined) {\n // Legacy compatible. This effect update should not trigger `onPanelChange`\n triggerModeChange(null, picker, false);\n }\n }, [mergedOpen, activeIndex, picker]);\n\n // >>> For complex picker, we need check if need to focus next one\n useLayoutEffect(function () {\n var lastOp = lastOperation();\n\n // Trade as confirm on field leave\n if (!mergedOpen && lastOp === 'input') {\n triggerOpen(false);\n triggerPartConfirm(null, true);\n }\n\n // Submit with complex picker\n if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {\n triggerOpen(true);\n triggerPartConfirm();\n }\n }, [mergedOpen]);\n\n // ====================== DevWarning ======================\n if (process.env.NODE_ENV !== 'production') {\n var isIndexEmpty = function isIndexEmpty(index) {\n return (\n // Value is empty\n !(value !== null && value !== void 0 && value[index]) &&\n // DefaultValue is empty\n !(defaultValue !== null && defaultValue !== void 0 && defaultValue[index])\n );\n };\n if (disabled.some(function (fieldDisabled, index) {\n return fieldDisabled && isIndexEmpty(index) && !allowEmpty[index];\n })) {\n warning(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');\n }\n }\n\n // ======================== Render ========================\n return /*#__PURE__*/React.createElement(PickerContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(PickerTrigger, _extends({}, pickTriggerProps(filledProps), {\n popupElement: panel,\n popupStyle: styles.popup,\n popupClassName: classNames.popup\n // Visible\n ,\n\n visible: mergedOpen,\n onClose: onPopupClose\n // Range\n ,\n\n range: true\n }), /*#__PURE__*/React.createElement(RangeSelector\n // Shared\n , _extends({}, filledProps, {\n // Ref\n ref: selectorRef\n // Icon\n ,\n\n suffixIcon: suffixIcon\n // Active\n ,\n\n activeIndex: focused || mergedOpen ? activeIndex : null,\n activeHelp: !!internalHoverValues,\n allHelp: !!internalHoverValues && hoverSource === 'preset',\n focused: focused,\n onFocus: onSelectorFocus,\n onBlur: onSelectorBlur,\n onKeyDown: onSelectorKeyDown,\n onSubmit: triggerPartConfirm\n // Change\n ,\n\n value: hoverValues,\n maskFormat: maskFormat,\n onChange: onSelectorChange,\n onInputChange: onSelectorInputChange\n // Format\n ,\n\n format: formatList,\n inputReadOnly: inputReadOnly\n // Disabled\n ,\n\n disabled: disabled\n // Open\n ,\n\n open: mergedOpen,\n onOpenChange: triggerOpen\n // Click\n ,\n\n onClick: onSelectorClick,\n onClear: onSelectorClear\n // Invalid\n ,\n\n invalid: submitInvalidates,\n onInvalid: onSelectorInvalid\n // Offset\n ,\n\n onActiveOffset: setActiveOffset\n }))));\n}\nvar RefRangePicker = /*#__PURE__*/React.forwardRef(RangePicker);\nif (process.env.NODE_ENV !== 'production') {\n RefRangePicker.displayName = 'RefRangePicker';\n}\nexport default RefRangePicker;","map":{"version":3,"names":["_extends","_toConsumableArray","_objectSpread","_slicedToArray","useEvent","useMergedState","useLayoutEffect","omit","pickAttrs","warning","React","PickerTrigger","pickTriggerProps","fillIndex","getFromDate","toArray","PickerContext","useCellRender","useFieldsInvalidate","useFilledProps","useOpen","usePickerRef","usePresets","useRangeActive","useRangeDisabledDate","useRangePickerValue","useRangeValue","useInnerValue","useShowNow","Popup","RangeSelector","separateConfig","config","defaultConfig","singleConfig","Array","isArray","getActiveRange","activeIndex","RangePicker","props","ref","_useFilledProps","disabled","allowEmpty","mergedDisabled","mergedAllowEmpty","_useFilledProps2","filledProps","internalPicker","complexPicker","formatList","maskFormat","isInvalidateDate","prefixCls","styles","classNames","placement","defaultValue","value","needConfirm","onKeyDown","disabledDate","minDate","maxDate","defaultOpen","open","onOpenChange","locale","generateConfig","picker","showNow","showToday","showTime","mode","onPanelChange","onCalendarChange","onOk","defaultPickerValue","pickerValue","onPickerValueChange","inputReadOnly","suffixIcon","onFocus","onBlur","presets","ranges","components","cellRender","dateRender","monthCellRender","onClick","selectorRef","_useOpen","_useOpen2","mergedOpen","setMergeOpen","triggerOpen","nextOpen","some","fieldDisabled","_useInnerValue","_useInnerValue2","mergedValue","setInnerValue","getCalendarValue","triggerCalendarChange","triggerOk","calendarValue","_useRangeActive","_useRangeActive2","focused","triggerFocus","lastOperation","setActiveIndex","nextActiveIndex","activeIndexList","onSharedFocus","event","index","range","onSharedBlur","mergedShowTime","useMemo","disabledTime","proxyDisabledTime","date","fromDate","from","undefined","_useMergedState","_useMergedState2","modes","setModes","mergedMode","internalMode","multiplePanel","mergedShowNow","_useRangeValue","_useRangeValue2","flushSubmit","triggerSubmitChange","mergedDisabledDate","_useFieldsInvalidate","_useFieldsInvalidate2","submitInvalidates","onSelectorInvalid","_useRangePickerValue","defaultOpenValue","_useRangePickerValue2","currentPickerValue","setCurrentPickerValue","triggerModeChange","nextPickerValue","nextMode","triggerEvent","clone","clonePickerValue","fillCalendarValue","triggerPartConfirm","skipFocus","nextValue","nextIndex","force","current","focus","onSelectorClick","_activeElement","rootNode","target","getRootNode","nativeElement","contains","activeElement","document","enabledIndex","findIndex","d","onSelectorClear","_React$useState","useState","_React$useState2","hoverSource","setHoverSource","_React$useState3","_React$useState4","internalHoverValues","setInternalHoverValues","hoverValues","useEffect","_React$useState5","_React$useState6","activeOffset","setActiveOffset","presetList","onPresetHover","nextValues","onPresetSubmit","passed","onNow","now","onPanelHover","onPanelFocus","onPanelMouseDown","onPanelSelect","onPopupClose","onInternalCellRender","panelValue","isPopupInvalidateDate","panelProps","domProps","restProps","concat","Object","keys","panel","createElement","format","isInvalid","onChange","onSelect","hoverValue","onHover","onSubmit","onSelectorChange","onSelectorInputChange","onSelectorFocus","inherit","onSelectorBlur","onSelectorKeyDown","preventDefault","key","context","button","input","lastOp","process","env","NODE_ENV","isIndexEmpty","Provider","popupElement","popupStyle","popup","popupClassName","visible","onClose","activeHelp","allHelp","onInputChange","onClear","invalid","onInvalid","onActiveOffset","RefRangePicker","forwardRef","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-picker/es/PickerInput/RangePicker.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent, useMergedState } from 'rc-util';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport omit from \"rc-util/es/omit\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport PickerTrigger from \"../PickerTrigger\";\nimport { pickTriggerProps } from \"../PickerTrigger/util\";\nimport { fillIndex, getFromDate, toArray } from \"../utils/miscUtil\";\nimport PickerContext from \"./context\";\nimport useCellRender from \"./hooks/useCellRender\";\nimport useFieldsInvalidate from \"./hooks/useFieldsInvalidate\";\nimport useFilledProps from \"./hooks/useFilledProps\";\nimport useOpen from \"./hooks/useOpen\";\nimport usePickerRef from \"./hooks/usePickerRef\";\nimport usePresets from \"./hooks/usePresets\";\nimport useRangeActive from \"./hooks/useRangeActive\";\nimport useRangeDisabledDate from \"./hooks/useRangeDisabledDate\";\nimport useRangePickerValue from \"./hooks/useRangePickerValue\";\nimport useRangeValue, { useInnerValue } from \"./hooks/useRangeValue\";\nimport useShowNow from \"./hooks/useShowNow\";\nimport Popup from \"./Popup\";\nimport RangeSelector from \"./Selector/RangeSelector\";\nfunction separateConfig(config, defaultConfig) {\n var singleConfig = config !== null && config !== void 0 ? config : defaultConfig;\n if (Array.isArray(singleConfig)) {\n return singleConfig;\n }\n return [singleConfig, singleConfig];\n}\n\n/** Used for change event, it should always be not undefined */\n\nfunction getActiveRange(activeIndex) {\n return activeIndex === 1 ? 'end' : 'start';\n}\nfunction RangePicker(props, ref) {\n // ========================= Prop =========================\n var _useFilledProps = useFilledProps(props, function () {\n var disabled = props.disabled,\n allowEmpty = props.allowEmpty;\n var mergedDisabled = separateConfig(disabled, false);\n var mergedAllowEmpty = separateConfig(allowEmpty, false);\n return {\n disabled: mergedDisabled,\n allowEmpty: mergedAllowEmpty\n };\n }),\n _useFilledProps2 = _slicedToArray(_useFilledProps, 6),\n filledProps = _useFilledProps2[0],\n internalPicker = _useFilledProps2[1],\n complexPicker = _useFilledProps2[2],\n formatList = _useFilledProps2[3],\n maskFormat = _useFilledProps2[4],\n isInvalidateDate = _useFilledProps2[5];\n var prefixCls = filledProps.prefixCls,\n styles = filledProps.styles,\n classNames = filledProps.classNames,\n placement = filledProps.placement,\n defaultValue = filledProps.defaultValue,\n value = filledProps.value,\n needConfirm = filledProps.needConfirm,\n onKeyDown = filledProps.onKeyDown,\n disabled = filledProps.disabled,\n allowEmpty = filledProps.allowEmpty,\n disabledDate = filledProps.disabledDate,\n minDate = filledProps.minDate,\n maxDate = filledProps.maxDate,\n defaultOpen = filledProps.defaultOpen,\n open = filledProps.open,\n onOpenChange = filledProps.onOpenChange,\n locale = filledProps.locale,\n generateConfig = filledProps.generateConfig,\n picker = filledProps.picker,\n showNow = filledProps.showNow,\n showToday = filledProps.showToday,\n showTime = filledProps.showTime,\n mode = filledProps.mode,\n onPanelChange = filledProps.onPanelChange,\n onCalendarChange = filledProps.onCalendarChange,\n onOk = filledProps.onOk,\n defaultPickerValue = filledProps.defaultPickerValue,\n pickerValue = filledProps.pickerValue,\n onPickerValueChange = filledProps.onPickerValueChange,\n inputReadOnly = filledProps.inputReadOnly,\n suffixIcon = filledProps.suffixIcon,\n onFocus = filledProps.onFocus,\n onBlur = filledProps.onBlur,\n presets = filledProps.presets,\n ranges = filledProps.ranges,\n components = filledProps.components,\n cellRender = filledProps.cellRender,\n dateRender = filledProps.dateRender,\n monthCellRender = filledProps.monthCellRender,\n onClick = filledProps.onClick;\n\n // ========================= Refs =========================\n var selectorRef = usePickerRef(ref);\n\n // ========================= Open =========================\n var _useOpen = useOpen(open, defaultOpen, disabled, onOpenChange),\n _useOpen2 = _slicedToArray(_useOpen, 2),\n mergedOpen = _useOpen2[0],\n setMergeOpen = _useOpen2[1];\n var triggerOpen = function triggerOpen(nextOpen, config) {\n // No need to open if all disabled\n if (disabled.some(function (fieldDisabled) {\n return !fieldDisabled;\n }) || !nextOpen) {\n setMergeOpen(nextOpen, config);\n }\n };\n\n // ======================== Values ========================\n var _useInnerValue = useInnerValue(generateConfig, locale, formatList, true, false, defaultValue, value, onCalendarChange, onOk),\n _useInnerValue2 = _slicedToArray(_useInnerValue, 5),\n mergedValue = _useInnerValue2[0],\n setInnerValue = _useInnerValue2[1],\n getCalendarValue = _useInnerValue2[2],\n triggerCalendarChange = _useInnerValue2[3],\n triggerOk = _useInnerValue2[4];\n var calendarValue = getCalendarValue();\n\n // ======================== Active ========================\n var _useRangeActive = useRangeActive(disabled, allowEmpty, mergedOpen),\n _useRangeActive2 = _slicedToArray(_useRangeActive, 7),\n focused = _useRangeActive2[0],\n triggerFocus = _useRangeActive2[1],\n lastOperation = _useRangeActive2[2],\n activeIndex = _useRangeActive2[3],\n setActiveIndex = _useRangeActive2[4],\n nextActiveIndex = _useRangeActive2[5],\n activeIndexList = _useRangeActive2[6];\n var onSharedFocus = function onSharedFocus(event, index) {\n triggerFocus(true);\n onFocus === null || onFocus === void 0 || onFocus(event, {\n range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)\n });\n };\n var onSharedBlur = function onSharedBlur(event, index) {\n triggerFocus(false);\n onBlur === null || onBlur === void 0 || onBlur(event, {\n range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)\n });\n };\n\n // ======================= ShowTime =======================\n /** Used for Popup panel */\n var mergedShowTime = React.useMemo(function () {\n if (!showTime) {\n return null;\n }\n var disabledTime = showTime.disabledTime;\n var proxyDisabledTime = disabledTime ? function (date) {\n var range = getActiveRange(activeIndex);\n var fromDate = getFromDate(calendarValue, activeIndexList, activeIndex);\n return disabledTime(date, range, {\n from: fromDate\n });\n } : undefined;\n return _objectSpread(_objectSpread({}, showTime), {}, {\n disabledTime: proxyDisabledTime\n });\n }, [showTime, activeIndex, calendarValue, activeIndexList]);\n\n // ========================= Mode =========================\n var _useMergedState = useMergedState([picker, picker], {\n value: mode\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n modes = _useMergedState2[0],\n setModes = _useMergedState2[1];\n var mergedMode = modes[activeIndex] || picker;\n\n /** Extends from `mergedMode` to patch `datetime` mode */\n var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;\n\n // ====================== PanelCount ======================\n var multiplePanel = internalMode === picker && internalMode !== 'time';\n\n // ======================= Show Now =======================\n var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);\n\n // ======================== Value =========================\n var _useRangeValue = useRangeValue(filledProps, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, mergedOpen, isInvalidateDate),\n _useRangeValue2 = _slicedToArray(_useRangeValue, 2),\n /** Trigger `onChange` by check `disabledDate` */\n flushSubmit = _useRangeValue2[0],\n /** Trigger `onChange` directly without check `disabledDate` */\n triggerSubmitChange = _useRangeValue2[1];\n\n // ===================== DisabledDate =====================\n var mergedDisabledDate = useRangeDisabledDate(calendarValue, disabled, activeIndexList, generateConfig, locale, disabledDate);\n\n // ======================= Validate =======================\n var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate, allowEmpty),\n _useFieldsInvalidate2 = _slicedToArray(_useFieldsInvalidate, 2),\n submitInvalidates = _useFieldsInvalidate2[0],\n onSelectorInvalid = _useFieldsInvalidate2[1];\n\n // ===================== Picker Value =====================\n var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, modes, mergedOpen, activeIndex, internalPicker, multiplePanel, defaultPickerValue, pickerValue, mergedShowTime === null || mergedShowTime === void 0 ? void 0 : mergedShowTime.defaultOpenValue, onPickerValueChange, minDate, maxDate),\n _useRangePickerValue2 = _slicedToArray(_useRangePickerValue, 2),\n currentPickerValue = _useRangePickerValue2[0],\n setCurrentPickerValue = _useRangePickerValue2[1];\n\n // >>> Mode need wait for `pickerValue`\n var triggerModeChange = useEvent(function (nextPickerValue, nextMode, triggerEvent) {\n var clone = fillIndex(modes, activeIndex, nextMode);\n if (clone[0] !== modes[0] || clone[1] !== modes[1]) {\n setModes(clone);\n }\n\n // Compatible with `onPanelChange`\n if (onPanelChange && triggerEvent !== false) {\n var clonePickerValue = _toConsumableArray(calendarValue);\n if (nextPickerValue) {\n clonePickerValue[activeIndex] = nextPickerValue;\n }\n onPanelChange(clonePickerValue, clone);\n }\n });\n\n // ======================== Change ========================\n var fillCalendarValue = function fillCalendarValue(date, index) {\n return (\n // Trigger change only when date changed\n fillIndex(calendarValue, index, date)\n );\n };\n\n // ======================== Submit ========================\n /**\n * Trigger by confirm operation.\n * This function has already handle the `needConfirm` check logic.\n * - Selector: enter key\n * - Panel: OK button\n */\n var triggerPartConfirm = function triggerPartConfirm(date, skipFocus) {\n var nextValue = calendarValue;\n if (date) {\n nextValue = fillCalendarValue(date, activeIndex);\n }\n\n // Get next focus index\n var nextIndex = nextActiveIndex(nextValue);\n\n // Change calendar value and tell flush it\n triggerCalendarChange(nextValue);\n flushSubmit(activeIndex, nextIndex === null);\n if (nextIndex === null) {\n triggerOpen(false, {\n force: true\n });\n } else if (!skipFocus) {\n selectorRef.current.focus({\n index: nextIndex\n });\n }\n };\n\n // ======================== Click =========================\n var onSelectorClick = function onSelectorClick(event) {\n var _activeElement;\n var rootNode = event.target.getRootNode();\n if (!selectorRef.current.nativeElement.contains((_activeElement = rootNode.activeElement) !== null && _activeElement !== void 0 ? _activeElement : document.activeElement)) {\n // Click to focus the enabled input\n var enabledIndex = disabled.findIndex(function (d) {\n return !d;\n });\n if (enabledIndex >= 0) {\n selectorRef.current.focus({\n index: enabledIndex\n });\n }\n }\n triggerOpen(true);\n onClick === null || onClick === void 0 || onClick(event);\n };\n var onSelectorClear = function onSelectorClear() {\n triggerSubmitChange(null);\n triggerOpen(false, {\n force: true\n });\n };\n\n // ======================== Hover =========================\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n hoverSource = _React$useState2[0],\n setHoverSource = _React$useState2[1];\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n internalHoverValues = _React$useState4[0],\n setInternalHoverValues = _React$useState4[1];\n var hoverValues = React.useMemo(function () {\n return internalHoverValues || calendarValue;\n }, [calendarValue, internalHoverValues]);\n\n // Clean up `internalHoverValues` when closed\n React.useEffect(function () {\n if (!mergedOpen) {\n setInternalHoverValues(null);\n }\n }, [mergedOpen]);\n\n // ========================================================\n // == Panels ==\n // ========================================================\n // Save the offset with active bar position\n var _React$useState5 = React.useState(0),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n activeOffset = _React$useState6[0],\n setActiveOffset = _React$useState6[1];\n\n // ======================= Presets ========================\n var presetList = usePresets(presets, ranges);\n var onPresetHover = function onPresetHover(nextValues) {\n setInternalHoverValues(nextValues);\n setHoverSource('preset');\n };\n var onPresetSubmit = function onPresetSubmit(nextValues) {\n var passed = triggerSubmitChange(nextValues);\n if (passed) {\n triggerOpen(false, {\n force: true\n });\n }\n };\n var onNow = function onNow(now) {\n triggerPartConfirm(now);\n };\n\n // ======================== Panel =========================\n var onPanelHover = function onPanelHover(date) {\n setInternalHoverValues(date ? fillCalendarValue(date, activeIndex) : null);\n setHoverSource('cell');\n };\n\n // >>> Focus\n var onPanelFocus = function onPanelFocus(event) {\n triggerOpen(true);\n onSharedFocus(event);\n };\n\n // >>> MouseDown\n var onPanelMouseDown = function onPanelMouseDown() {\n lastOperation('panel');\n };\n\n // >>> Calendar\n var onPanelSelect = function onPanelSelect(date) {\n var clone = fillIndex(calendarValue, activeIndex, date);\n\n // Only trigger calendar event but not update internal `calendarValue` state\n triggerCalendarChange(clone);\n\n // >>> Trigger next active if !needConfirm\n // Fully logic check `useRangeValue` hook\n if (!needConfirm && !complexPicker && internalPicker === internalMode) {\n triggerPartConfirm(date);\n }\n };\n\n // >>> Close\n var onPopupClose = function onPopupClose() {\n // Close popup\n triggerOpen(false);\n };\n\n // >>> cellRender\n var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender, getActiveRange(activeIndex));\n\n // >>> Value\n var panelValue = calendarValue[activeIndex] || null;\n\n // >>> invalid\n var isPopupInvalidateDate = useEvent(function (date) {\n return isInvalidateDate(date, {\n activeIndex: activeIndex\n });\n });\n var panelProps = React.useMemo(function () {\n var domProps = pickAttrs(filledProps, false);\n var restProps = omit(filledProps, [].concat(_toConsumableArray(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange', 'disabledTime']));\n return restProps;\n }, [filledProps]);\n\n // >>> Render\n var panel = /*#__PURE__*/React.createElement(Popup, _extends({}, panelProps, {\n showNow: mergedShowNow,\n showTime: mergedShowTime\n // Range\n ,\n range: true,\n multiplePanel: multiplePanel,\n activeOffset: activeOffset,\n placement: placement\n // Disabled\n ,\n disabledDate: mergedDisabledDate\n // Focus\n ,\n onFocus: onPanelFocus,\n onBlur: onSharedBlur,\n onPanelMouseDown: onPanelMouseDown\n // Mode\n ,\n picker: picker,\n mode: mergedMode,\n internalMode: internalMode,\n onPanelChange: triggerModeChange\n // Value\n ,\n format: maskFormat,\n value: panelValue,\n isInvalid: isPopupInvalidateDate,\n onChange: null,\n onSelect: onPanelSelect\n // PickerValue\n ,\n pickerValue: currentPickerValue,\n defaultOpenValue: toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue)[activeIndex],\n onPickerValueChange: setCurrentPickerValue\n // Hover\n ,\n hoverValue: hoverValues,\n onHover: onPanelHover\n // Submit\n ,\n needConfirm: needConfirm,\n onSubmit: triggerPartConfirm,\n onOk: triggerOk\n // Preset\n ,\n presets: presetList,\n onPresetHover: onPresetHover,\n onPresetSubmit: onPresetSubmit\n // Now\n ,\n onNow: onNow\n // Render\n ,\n cellRender: onInternalCellRender\n }));\n\n // ========================================================\n // == Selector ==\n // ========================================================\n\n // ======================== Change ========================\n var onSelectorChange = function onSelectorChange(date, index) {\n var clone = fillCalendarValue(date, index);\n triggerCalendarChange(clone);\n };\n var onSelectorInputChange = function onSelectorInputChange() {\n lastOperation('input');\n };\n\n // ======================= Selector =======================\n var onSelectorFocus = function onSelectorFocus(event, index) {\n lastOperation('input');\n triggerOpen(true, {\n inherit: true\n });\n\n // When click input to switch the field, it will not trigger close.\n // Which means it will lose the part confirm and we need fill back.\n // ref: https://github.com/ant-design/ant-design/issues/49512\n if (activeIndex !== index && mergedOpen && !needConfirm && complexPicker) {\n triggerPartConfirm(null, true);\n }\n setActiveIndex(index);\n onSharedFocus(event, index);\n };\n var onSelectorBlur = function onSelectorBlur(event, index) {\n triggerOpen(false);\n if (!needConfirm && lastOperation() === 'input') {\n var nextIndex = nextActiveIndex(calendarValue);\n flushSubmit(activeIndex, nextIndex === null);\n }\n onSharedBlur(event, index);\n };\n var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {\n if (event.key === 'Tab') {\n triggerPartConfirm(null, true);\n }\n onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);\n };\n\n // ======================= Context ========================\n var context = React.useMemo(function () {\n return {\n prefixCls: prefixCls,\n locale: locale,\n generateConfig: generateConfig,\n button: components.button,\n input: components.input\n };\n }, [prefixCls, locale, generateConfig, components.button, components.input]);\n\n // ======================== Effect ========================\n // >>> Mode\n // Reset for every active\n useLayoutEffect(function () {\n if (mergedOpen && activeIndex !== undefined) {\n // Legacy compatible. This effect update should not trigger `onPanelChange`\n triggerModeChange(null, picker, false);\n }\n }, [mergedOpen, activeIndex, picker]);\n\n // >>> For complex picker, we need check if need to focus next one\n useLayoutEffect(function () {\n var lastOp = lastOperation();\n\n // Trade as confirm on field leave\n if (!mergedOpen && lastOp === 'input') {\n triggerOpen(false);\n triggerPartConfirm(null, true);\n }\n\n // Submit with complex picker\n if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {\n triggerOpen(true);\n triggerPartConfirm();\n }\n }, [mergedOpen]);\n\n // ====================== DevWarning ======================\n if (process.env.NODE_ENV !== 'production') {\n var isIndexEmpty = function isIndexEmpty(index) {\n return (\n // Value is empty\n !(value !== null && value !== void 0 && value[index]) &&\n // DefaultValue is empty\n !(defaultValue !== null && defaultValue !== void 0 && defaultValue[index])\n );\n };\n if (disabled.some(function (fieldDisabled, index) {\n return fieldDisabled && isIndexEmpty(index) && !allowEmpty[index];\n })) {\n warning(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');\n }\n }\n\n // ======================== Render ========================\n return /*#__PURE__*/React.createElement(PickerContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(PickerTrigger, _extends({}, pickTriggerProps(filledProps), {\n popupElement: panel,\n popupStyle: styles.popup,\n popupClassName: classNames.popup\n // Visible\n ,\n visible: mergedOpen,\n onClose: onPopupClose\n // Range\n ,\n range: true\n }), /*#__PURE__*/React.createElement(RangeSelector\n // Shared\n , _extends({}, filledProps, {\n // Ref\n ref: selectorRef\n // Icon\n ,\n suffixIcon: suffixIcon\n // Active\n ,\n activeIndex: focused || mergedOpen ? activeIndex : null,\n activeHelp: !!internalHoverValues,\n allHelp: !!internalHoverValues && hoverSource === 'preset',\n focused: focused,\n onFocus: onSelectorFocus,\n onBlur: onSelectorBlur,\n onKeyDown: onSelectorKeyDown,\n onSubmit: triggerPartConfirm\n // Change\n ,\n value: hoverValues,\n maskFormat: maskFormat,\n onChange: onSelectorChange,\n onInputChange: onSelectorInputChange\n // Format\n ,\n format: formatList,\n inputReadOnly: inputReadOnly\n // Disabled\n ,\n disabled: disabled\n // Open\n ,\n open: mergedOpen,\n onOpenChange: triggerOpen\n // Click\n ,\n onClick: onSelectorClick,\n onClear: onSelectorClear\n // Invalid\n ,\n invalid: submitInvalidates,\n onInvalid: onSelectorInvalid\n // Offset\n ,\n onActiveOffset: setActiveOffset\n }))));\n}\nvar RefRangePicker = /*#__PURE__*/React.forwardRef(RangePicker);\nif (process.env.NODE_ENV !== 'production') {\n RefRangePicker.displayName = 'RefRangePicker';\n}\nexport default RefRangePicker;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,SAASC,QAAQ,EAAEC,cAAc,QAAQ,SAAS;AAClD,OAAOC,eAAe,MAAM,kCAAkC;AAC9D,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,SAAS,MAAM,sBAAsB;AAC5C,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAA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