{"version":3,"sources":["webpack:///./node_modules/react-dropzone/dist/es/index.js"],"names":["_excluded","_excluded2","_excluded3","_excluded4","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","_unsupportedIterableToArray","TypeError","_nonIterableSpread","_slicedToArray","i","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","call","next","done","push","value","length","err","_iterableToArrayLimit","_nonIterableRest","o","minLen","n","Object","prototype","toString","slice","constructor","name","test","len","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","configurable","writable","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","Dropzone","_ref","ref","children","_useDropzone","useDropzone","open","props","createElement","displayName","defaultProps","disabled","getFilesFromEvent","maxSize","Infinity","minSize","multiple","maxFiles","preventDropOnDocument","noClick","noKeyboard","noDrag","noDragEventsBubbling","validator","useFsAccessApi","propTypes","func","accept","oneOfType","string","arrayOf","bool","number","onFileDialogCancel","onFileDialogOpen","onDragEnter","onDragLeave","onDragOver","onDrop","onDropAccepted","onDropRejected","initialState","isFocused","isFileDialogActive","isDragActive","isDragAccept","isDragReject","draggedFiles","acceptedFiles","fileRejections","options","undefined","_defaultProps$options","onFileDialogOpenCb","noop","onFileDialogCancelCb","rootRef","inputRef","_useReducer","reducer","_useReducer2","state","dispatch","fsAccessApiWorksRef","window","isSecureContext","onWindowFocus","current","setTimeout","files","type","addEventListener","removeEventListener","dragTargetsRef","onDocumentDrop","event","contains","preventDefault","document","onDragEnterCb","persist","stopPropagation","concat","Promise","resolve","then","onDragOverCb","hasFiles","dataTransfer","dropEffect","_unused","onDragLeaveCb","targets","targetIdx","splice","setFiles","file","_fileAccepted2","accepted","acceptError","_fileMatchSize2","sizeMatch","sizeError","customErrors","errors","e","onDropCb","openFileDialog","opts","types","showOpenFilePicker","handles","catch","click","onKeyDownCb","isEqualNode","keyCode","onFocusCb","onBlurCb","onClickCb","composeHandler","fn","composeKeyboardHandler","composeDragHandler","getRootProps","_ref2","_ref2$refKey","refKey","role","onKeyDown","onFocus","onBlur","onClick","rest","tabIndex","onInputElementClick","getInputProps","_ref3","_ref3$refKey","onChange","inputProps","style","display","fileCount","action"],"mappings":";4FAAA,4FAAIA,EAAY,CAAC,YACbC,EAAa,CAAC,QACdC,EAAa,CAAC,SAAU,OAAQ,YAAa,UAAW,SAAU,UAAW,cAAe,aAAc,cAAe,UACzHC,EAAa,CAAC,SAAU,WAAY,WAExC,SAASC,EAAmBC,GAAO,OAMnC,SAA4BA,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOG,EAAkBH,EAAM,CANhDI,CAAmBJ,IAI7D,SAA0BK,GAAQ,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOJ,MAAMO,KAAKH,EAAO,CAJxFI,CAAiBT,IAAQU,EAA4BV,IAE1H,WAAgC,MAAM,IAAIW,UAAU,uIAAyI,CAF3DC,EAAsB,CAQxJ,SAASC,EAAeb,EAAKc,GAAK,OAUlC,SAAyBd,GAAO,GAAIC,MAAMC,QAAQF,GAAM,OAAOA,CAAK,CAV3Be,CAAgBf,IAQzD,SAA+BA,EAAKc,GAAK,IAAIE,EAAY,MAAPhB,EAAc,KAAyB,oBAAXM,QAA0BN,EAAIM,OAAOC,WAAaP,EAAI,cAAe,GAAU,MAANgB,EAAY,OAAQ,IAAkDC,EAAIC,EAAlDC,EAAO,GAAQC,GAAK,EAAUC,GAAK,EAAmB,IAAM,IAAKL,EAAKA,EAAGM,KAAKtB,KAAQoB,GAAMH,EAAKD,EAAGO,QAAQC,QAAoBL,EAAKM,KAAKR,EAAGS,QAAYZ,GAAKK,EAAKQ,SAAWb,GAA3DM,GAAK,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_excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"role\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { fromEvent } from \"file-selector\";\nimport { allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, filePickerOptionsTypes, canUseFileSystemAccessAPI, isAbort, isEvtWithFiles, isIeOrEdge, isPropagationStopped, isSecurityError, onDocumentDragOver, TOO_MANY_FILES_REJECTION } from \"./utils/index\";\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *
Drag 'n' drop some files here, or click to select files
\n *
\n * )}\n * \n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = \"Dropzone\"; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null,\n useFsAccessApi: true\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.draggedFiles Files in active drag\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when opening the file dialog\n */\n onFileDialogOpen: PropTypes.func,\n\n /**\n * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n */\n useFsAccessApi: PropTypes.bool,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Custom validation function\n * @param {File} file\n * @returns {FileError|FileError[]}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state and some helper functions.\n *\n * @typedef {object} DropzoneState\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} draggedFiles Files in active drag\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n draggedFiles: [],\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *
Drag and drop some files here, or click to select files
\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {string|string[]} [props.accept] Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n *\n * @returns {DropzoneState}\n */\n\nexport function useDropzone() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$options = _objectSpread(_objectSpread({}, defaultProps), options),\n accept = _defaultProps$options.accept,\n disabled = _defaultProps$options.disabled,\n getFilesFromEvent = _defaultProps$options.getFilesFromEvent,\n maxSize = _defaultProps$options.maxSize,\n minSize = _defaultProps$options.minSize,\n multiple = _defaultProps$options.multiple,\n maxFiles = _defaultProps$options.maxFiles,\n onDragEnter = _defaultProps$options.onDragEnter,\n onDragLeave = _defaultProps$options.onDragLeave,\n onDragOver = _defaultProps$options.onDragOver,\n onDrop = _defaultProps$options.onDrop,\n onDropAccepted = _defaultProps$options.onDropAccepted,\n onDropRejected = _defaultProps$options.onDropRejected,\n onFileDialogCancel = _defaultProps$options.onFileDialogCancel,\n onFileDialogOpen = _defaultProps$options.onFileDialogOpen,\n useFsAccessApi = _defaultProps$options.useFsAccessApi,\n preventDropOnDocument = _defaultProps$options.preventDropOnDocument,\n noClick = _defaultProps$options.noClick,\n noKeyboard = _defaultProps$options.noKeyboard,\n noDrag = _defaultProps$options.noDrag,\n noDragEventsBubbling = _defaultProps$options.noDragEventsBubbling,\n validator = _defaultProps$options.validator;\n\n var onFileDialogOpenCb = useMemo(function () {\n return typeof onFileDialogOpen === \"function\" ? onFileDialogOpen : noop;\n }, [onFileDialogOpen]);\n var onFileDialogCancelCb = useMemo(function () {\n return typeof onFileDialogCancel === \"function\" ? onFileDialogCancel : noop;\n }, [onFileDialogCancel]);\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive,\n draggedFiles = state.draggedFiles;\n var fsAccessApiWorksRef = useRef(typeof window !== \"undefined\" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI()); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (!fsAccessApiWorksRef.current && isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: \"closeDialog\"\n });\n onFileDialogCancelCb();\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener(\"focus\", onWindowFocus, false);\n return function () {\n window.removeEventListener(\"focus\", onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener(\"dragover\", onDocumentDragOver, false);\n document.addEventListener(\"drop\", onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener(\"dragover\", onDocumentDragOver);\n document.removeEventListener(\"drop\", onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n dispatch({\n draggedFiles: draggedFiles,\n isDragActive: true,\n type: \"setDraggedFiles\"\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n });\n }\n }, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = \"copy\";\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n isDragActive: false,\n type: \"setDraggedFiles\",\n draggedFiles: []\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var setFiles = useCallback(function (files, event) {\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: \"setFiles\"\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n }, [dispatch, multiple, accept, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n setFiles(files, event);\n });\n }\n\n dispatch({\n type: \"reset\"\n });\n }, [getFilesFromEvent, setFiles, noDragEventsBubbling]); // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n // No point to use FS access APIs if context is not secure\n // https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection\n if (fsAccessApiWorksRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb(); // https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n\n var opts = {\n multiple: multiple,\n types: filePickerOptionsTypes(accept)\n };\n window.showOpenFilePicker(opts).then(function (handles) {\n return getFilesFromEvent(handles);\n }).then(function (files) {\n setFiles(files, null);\n dispatch({\n type: \"closeDialog\"\n });\n }).catch(function (e) {\n // AbortError means the user canceled\n if (isAbort(e)) {\n onFileDialogCancelCb(e);\n dispatch({\n type: \"closeDialog\"\n });\n } else if (isSecurityError(e)) {\n fsAccessApiWorksRef.current = false; // CORS, so cannot use this API\n // Try using the input\n\n if (inputRef.current) {\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }\n });\n return;\n }\n\n if (inputRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb();\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, accept, multiple]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.key === \" \" || event.key === \"Enter\" || event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, openFileDialog]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: \"focus\"\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: \"blur\"\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [noClick, openFileDialog]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? \"ref\" : _ref2$refKey,\n role = _ref2.role,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb)),\n role: typeof role === \"string\" && role !== \"\" ? role : \"button\"\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? \"ref\" : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: accept,\n multiple: multiple,\n type: \"file\",\n style: {\n display: \"none\"\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n var fileCount = draggedFiles.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: draggedFiles,\n accept: accept,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case \"focus\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case \"blur\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case \"openDialog\":\n return _objectSpread(_objectSpread({}, initialState), {}, {\n isFileDialogActive: true\n });\n\n case \"closeDialog\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case \"setDraggedFiles\":\n /* eslint no-case-declarations: 0 */\n var isDragActive = action.isDragActive,\n draggedFiles = action.draggedFiles;\n return _objectSpread(_objectSpread({}, state), {}, {\n draggedFiles: draggedFiles,\n isDragActive: isDragActive\n });\n\n case \"setFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case \"reset\":\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nfunction noop() {}\n\nexport { ErrorCode } from \"./utils\";"],"sourceRoot":""}