{
  "version": 3,
  "sources": ["../../../node_modules/@uppy/utils/lib/hasProperty.js", "../../../node_modules/@uppy/utils/lib/Translator.js", "../../../node_modules/namespace-emitter/index.js", "../../../node_modules/nanoid/non-secure/index.cjs", "../../../node_modules/lodash.throttle/index.js", "../../../node_modules/@uppy/store-default/lib/index.js", "../../../node_modules/@uppy/utils/lib/getFileNameAndExtension.js", "../../../node_modules/@uppy/utils/lib/mimeTypes.js", "../../../node_modules/@uppy/utils/lib/getFileType.js", "../../../node_modules/@uppy/utils/lib/generateFileID.js", "../../../node_modules/@uppy/core/lib/supportsUploadProgress.js", "../../../node_modules/@uppy/core/lib/getFileName.js", "../../../node_modules/@uppy/utils/lib/getTimeStamp.js", "../../../node_modules/@uppy/core/lib/loggers.js", "../../../node_modules/@transloadit/prettier-bytes/prettierBytes.js", "../../../node_modules/wildcard/index.js", "../../../node_modules/mime-match/index.js", "../../../node_modules/@uppy/core/lib/Restricter.js", "../../../node_modules/@uppy/core/lib/locale.js", "../../../node_modules/@uppy/core/lib/Uppy.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/src/util.js", "../../../node_modules/preact/src/options.js", "../../../node_modules/preact/src/create-element.js", "../../../node_modules/preact/src/component.js", "../../../node_modules/preact/src/create-context.js", "../../../node_modules/preact/src/diff/children.js", "../../../node_modules/preact/src/diff/props.js", "../../../node_modules/preact/src/diff/index.js", "../../../node_modules/preact/src/render.js", "../../../node_modules/preact/src/clone-element.js", "../../../node_modules/preact/src/diff/catch-error.js", "../../../node_modules/@uppy/utils/lib/isDOMElement.js", "../../../node_modules/@uppy/utils/lib/findDOMElement.js", "../../../node_modules/@uppy/core/lib/BasePlugin.js", "../../../node_modules/@uppy/core/lib/UIPlugin.js", "../../../node_modules/@uppy/core/lib/index.js", "../../../node_modules/@uppy/utils/lib/NetworkError.js", "../../../node_modules/@uppy/utils/lib/fetchWithNetworkError.js", "../../../node_modules/@uppy/companion-client/lib/AuthError.js", "../../../node_modules/@uppy/companion-client/lib/RequestClient.js", "../../../node_modules/@uppy/companion-client/lib/tokenStorage.js", "../../../node_modules/@uppy/companion-client/lib/Provider.js", "../../../node_modules/@uppy/companion-client/lib/SearchProvider.js", "../../../node_modules/@uppy/companion-client/lib/Socket.js", "../../../node_modules/@uppy/companion-client/lib/index.js", "../../../node_modules/@uppy/utils/lib/EventTracker.js", "../../../node_modules/@uppy/utils/lib/emitSocketProgress.js", "../../../node_modules/@uppy/utils/lib/getSocketHost.js", "../../../node_modules/@uppy/utils/lib/RateLimitedQueue.js", "../../../node_modules/@uppy/utils/lib/AbortController.js", "../../../node_modules/@uppy/utils/lib/delay.js", "../../../node_modules/@uppy/aws-s3-multipart/lib/MultipartUploader.js", "../../../node_modules/@uppy/aws-s3-multipart/lib/index.js", "../../../node_modules/@uppy/utils/lib/toArray.js", "../../../node_modules/@uppy/file-input/lib/locale.js", "../../../node_modules/@uppy/file-input/lib/index.js", "../../../node_modules/@uppy/informer/lib/FadeIn.js", "../../../node_modules/@uppy/informer/lib/TransitionGroup.js", "../../../node_modules/@uppy/informer/lib/index.js", "../../../node_modules/@uppy/utils/lib/getSpeed.js", "../../../node_modules/@uppy/utils/lib/getBytesRemaining.js", "../../../node_modules/@uppy/utils/lib/getTextDirection.js", "../../../node_modules/@uppy/status-bar/lib/StatusBarStates.js", "../../../node_modules/classnames/index.js", "../../../node_modules/@uppy/status-bar/lib/calculateProcessingProgress.js", "../../../node_modules/@uppy/utils/lib/secondsToTime.js", "../../../node_modules/@uppy/utils/lib/prettyETA.js", "../../../node_modules/@uppy/status-bar/lib/Components.js", "../../../node_modules/@uppy/status-bar/lib/StatusBar.js", "../../../node_modules/@uppy/status-bar/lib/locale.js", "../../../node_modules/@uppy/status-bar/lib/index.js", "../../../node_modules/@uppy/utils/lib/dataURItoBlob.js", "../../../node_modules/@uppy/utils/lib/isObjectURL.js", "../../../node_modules/@uppy/utils/lib/isPreviewSupported.js", "../../../node_modules/exifr/dist/mini.umd.js", "../../../node_modules/@uppy/thumbnail-generator/lib/locale.js", "../../../node_modules/@uppy/thumbnail-generator/lib/index.js", "../../../node_modules/@uppy/utils/lib/findAllDOMElements.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getRelativePath.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/fallbackApi.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/index.js", "../../../node_modules/@uppy/utils/lib/FOCUSABLE_ELEMENTS.js", "../../../node_modules/@uppy/dashboard/lib/utils/getActiveOverlayEl.js", "../../../node_modules/@uppy/dashboard/lib/utils/trapFocus.js", "../../../node_modules/lodash.debounce/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/createSuperFocus.js", "../../../node_modules/memoize-one/dist/memoize-one.cjs.js", "../../../node_modules/@uppy/utils/lib/isDragDropSupported.js", "../../../node_modules/is-shallow-equal/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/getFileTypeIcon.js", "../../../node_modules/@uppy/dashboard/lib/components/FilePreview.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/MetaErrorMessage.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FilePreviewAndLink/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileProgress/index.js", "../../../node_modules/@uppy/utils/lib/truncateString.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileInfo/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/copyToClipboard.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/Buttons/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/index.js", "../../../node_modules/@uppy/dashboard/lib/components/VirtualList.js", "../../../node_modules/@uppy/dashboard/lib/components/FileList.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFiles.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFilesPanel.js", "../../../node_modules/@uppy/dashboard/lib/utils/ignoreEvent.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelContent.js", "../../../node_modules/@uppy/dashboard/lib/components/EditorPanel.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelTopBar.js", "../../../node_modules/@uppy/dashboard/lib/components/FileCard/index.js", "../../../node_modules/@uppy/dashboard/lib/components/Slide.js", "../../../node_modules/@uppy/dashboard/lib/components/Dashboard.js", "../../../node_modules/@uppy/dashboard/lib/locale.js", "../../../node_modules/@uppy/dashboard/lib/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../javascript/controllers/upload_controller.js", "../../javascript/uppy.js"],
  "sourcesContent": ["\"use strict\";\n\nmodule.exports = function has(object, key) {\n  return Object.prototype.hasOwnProperty.call(object, key);\n};", "\"use strict\";\n\nvar _apply;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst has = require('./hasProperty');\n\nfunction insertReplacement(source, rx, replacement) {\n  const newParts = [];\n  source.forEach(chunk => {\n    // When the source contains multiple placeholders for interpolation,\n    // we should ignore chunks that are not strings, because those\n    // can be JSX objects and will be otherwise incorrectly turned into strings.\n    // Without this condition we\u2019d get this: [object Object] hello [object Object] my <button>\n    if (typeof chunk !== 'string') {\n      return newParts.push(chunk);\n    }\n\n    return rx[Symbol.split](chunk).forEach((raw, i, list) => {\n      if (raw !== '') {\n        newParts.push(raw);\n      } // Interlace with the `replacement` value\n\n\n      if (i < list.length - 1) {\n        newParts.push(replacement);\n      }\n    });\n  });\n  return newParts;\n}\n/**\n * Takes a string with placeholder variables like `%{smart_count} file selected`\n * and replaces it with values from options `{smart_count: 5}`\n *\n * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE\n * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299\n *\n * @param {string} phrase that needs interpolation, with placeholders\n * @param {object} options with values that will be used to replace placeholders\n * @returns {any[]} interpolated\n */\n\n\nfunction interpolate(phrase, options) {\n  const dollarRegex = /\\$/g;\n  const dollarBillsYall = '$$$$';\n  let interpolated = [phrase];\n  if (options == null) return interpolated;\n\n  for (const arg of Object.keys(options)) {\n    if (arg !== '_') {\n      // Ensure replacement value is escaped to prevent special $-prefixed\n      // regex replace tokens. the \"$$$$\" is needed because each \"$\" needs to\n      // be escaped with \"$\" itself, and we need two in the resulting output.\n      let replacement = options[arg];\n\n      if (typeof replacement === 'string') {\n        replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall);\n      } // We create a new `RegExp` each time instead of using a more-efficient\n      // string replace so that the same argument can be replaced multiple times\n      // in the same phrase.\n\n\n      interpolated = insertReplacement(interpolated, new RegExp(`%\\\\{${arg}\\\\}`, 'g'), replacement);\n    }\n  }\n\n  return interpolated;\n}\n/**\n * Translates strings with interpolation & pluralization support.\n * Extensible with custom dictionaries and pluralization functions.\n *\n * Borrows heavily from and inspired by Polyglot https://github.com/airbnb/polyglot.js,\n * basically a stripped-down version of it. Differences: pluralization functions are not hardcoded\n * and can be easily added among with dictionaries, nested objects are used for pluralization\n * as opposed to `||||` delimeter\n *\n * Usage example: `translator.translate('files_chosen', {smart_count: 3})`\n */\n\n\nmodule.exports = (_apply = /*#__PURE__*/_classPrivateFieldLooseKey(\"apply\"), class Translator {\n  /**\n   * @param {object|Array<object>} locales - locale or list of locales.\n   */\n  constructor(locales) {\n    Object.defineProperty(this, _apply, {\n      value: _apply2\n    });\n    this.locale = {\n      strings: {},\n\n      pluralize(n) {\n        if (n === 1) {\n          return 0;\n        }\n\n        return 1;\n      }\n\n    };\n\n    if (Array.isArray(locales)) {\n      locales.forEach(_classPrivateFieldLooseBase(this, _apply)[_apply], this);\n    } else {\n      _classPrivateFieldLooseBase(this, _apply)[_apply](locales);\n    }\n  }\n\n  /**\n   * Public translate method\n   *\n   * @param {string} key\n   * @param {object} options with values that will be used later to replace placeholders in string\n   * @returns {string} translated (and interpolated)\n   */\n  translate(key, options) {\n    return this.translateArray(key, options).join('');\n  }\n  /**\n   * Get a translation and return the translated and interpolated parts as an array.\n   *\n   * @param {string} key\n   * @param {object} options with values that will be used to replace placeholders\n   * @returns {Array} The translated and interpolated parts, in order.\n   */\n\n\n  translateArray(key, options) {\n    if (!has(this.locale.strings, key)) {\n      throw new Error(`missing string: ${key}`);\n    }\n\n    const string = this.locale.strings[key];\n    const hasPluralForms = typeof string === 'object';\n\n    if (hasPluralForms) {\n      if (options && typeof options.smart_count !== 'undefined') {\n        const plural = this.locale.pluralize(options.smart_count);\n        return interpolate(string[plural], options);\n      }\n\n      throw new Error('Attempted to use a string with plural forms, but no value was given for %{smart_count}');\n    }\n\n    return interpolate(string, options);\n  }\n\n});\n\nfunction _apply2(locale) {\n  if (!(locale != null && locale.strings)) {\n    return;\n  }\n\n  const prevLocale = this.locale;\n  this.locale = { ...prevLocale,\n    strings: { ...prevLocale.strings,\n      ...locale.strings\n    }\n  };\n  this.locale.pluralize = locale.pluralize || prevLocale.pluralize;\n}", "/**\n* Create an event emitter with namespaces\n* @name createNamespaceEmitter\n* @example\n* var emitter = require('./index')()\n*\n* emitter.on('*', function () {\n*   console.log('all events emitted', this.event)\n* })\n*\n* emitter.on('example', function () {\n*   console.log('example event emitted')\n* })\n*/\nmodule.exports = function createNamespaceEmitter () {\n  var emitter = {}\n  var _fns = emitter._fns = {}\n\n  /**\n  * Emit an event. Optionally namespace the event. Handlers are fired in the order in which they were added with exact matches taking precedence. Separate the namespace and event with a `:`\n  * @name emit\n  * @param {String} event \u2013 the name of the event, with optional namespace\n  * @param {...*} data \u2013 up to 6 arguments that are passed to the event listener\n  * @example\n  * emitter.emit('example')\n  * emitter.emit('demo:test')\n  * emitter.emit('data', { example: true}, 'a string', 1)\n  */\n  emitter.emit = function emit (event, arg1, arg2, arg3, arg4, arg5, arg6) {\n    var toEmit = getListeners(event)\n\n    if (toEmit.length) {\n      emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6])\n    }\n  }\n\n  /**\n  * Create en event listener.\n  * @name on\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.on('example', function () {})\n  * emitter.on('demo', function () {})\n  */\n  emitter.on = function on (event, fn) {\n    if (!_fns[event]) {\n      _fns[event] = []\n    }\n\n    _fns[event].push(fn)\n  }\n\n  /**\n  * Create en event listener that fires once.\n  * @name once\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.once('example', function () {})\n  * emitter.once('demo', function () {})\n  */\n  emitter.once = function once (event, fn) {\n    function one () {\n      fn.apply(this, arguments)\n      emitter.off(event, one)\n    }\n    this.on(event, one)\n  }\n\n  /**\n  * Stop listening to an event. Stop all listeners on an event by only passing the event name. Stop a single listener by passing that event handler as a callback.\n  * You must be explicit about what will be unsubscribed: `emitter.off('demo')` will unsubscribe an `emitter.on('demo')` listener,\n  * `emitter.off('demo:example')` will unsubscribe an `emitter.on('demo:example')` listener\n  * @name off\n  * @param {String} event\n  * @param {Function} [fn] \u2013 the specific handler\n  * @example\n  * emitter.off('example')\n  * emitter.off('demo', function () {})\n  */\n  emitter.off = function off (event, fn) {\n    var keep = []\n\n    if (event && fn) {\n      var fns = this._fns[event]\n      var i = 0\n      var l = fns ? fns.length : 0\n\n      for (i; i < l; i++) {\n        if (fns[i] !== fn) {\n          keep.push(fns[i])\n        }\n      }\n    }\n\n    keep.length ? this._fns[event] = keep : delete this._fns[event]\n  }\n\n  function getListeners (e) {\n    var out = _fns[e] ? _fns[e] : []\n    var idx = e.indexOf(':')\n    var args = (idx === -1) ? [e] : [e.substring(0, idx), e.substring(idx + 1)]\n\n    var keys = Object.keys(_fns)\n    var i = 0\n    var l = keys.length\n\n    for (i; i < l; i++) {\n      var key = keys[i]\n      if (key === '*') {\n        out = out.concat(_fns[key])\n      }\n\n      if (args.length === 2 && args[0] === key) {\n        out = out.concat(_fns[key])\n        break\n      }\n    }\n\n    return out\n  }\n\n  function emitAll (e, fns, args) {\n    var i = 0\n    var l = fns.length\n\n    for (i; i < l; i++) {\n      if (!fns[i]) break\n      fns[i].event = e\n      fns[i].apply(fns[i], args)\n    }\n  }\n\n  return emitter\n}\n", "let urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n  return (size = defaultSize) => {\n    let id = ''\n    let i = size\n    while (i--) {\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\nlet nanoid = (size = 21) => {\n  let id = ''\n  let i = size\n  while (i--) {\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\nmodule.exports = { nanoid, customAlphabet }\n", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n", "\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nvar _publish = /*#__PURE__*/_classPrivateFieldLooseKey(\"publish\");\n\n/**\n * Default store that keeps state in a simple object.\n */\nclass DefaultStore {\n  constructor() {\n    Object.defineProperty(this, _publish, {\n      value: _publish2\n    });\n    this.state = {};\n    this.callbacks = [];\n  }\n\n  getState() {\n    return this.state;\n  }\n\n  setState(patch) {\n    const prevState = { ...this.state\n    };\n    const nextState = { ...this.state,\n      ...patch\n    };\n    this.state = nextState;\n\n    _classPrivateFieldLooseBase(this, _publish)[_publish](prevState, nextState, patch);\n  }\n\n  subscribe(listener) {\n    this.callbacks.push(listener);\n    return () => {\n      // Remove the listener.\n      this.callbacks.splice(this.callbacks.indexOf(listener), 1);\n    };\n  }\n\n}\n\nfunction _publish2() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  this.callbacks.forEach(listener => {\n    listener(...args);\n  });\n}\n\nDefaultStore.VERSION = \"2.0.3\";\n\nmodule.exports = function defaultStore() {\n  return new DefaultStore();\n};", "\"use strict\";\n\n/**\n * Takes a full filename string and returns an object {name, extension}\n *\n * @param {string} fullFileName\n * @returns {object} {name, extension}\n */\nmodule.exports = function getFileNameAndExtension(fullFileName) {\n  const lastDot = fullFileName.lastIndexOf('.'); // these count as no extension: \"no-dot\", \"trailing-dot.\"\n\n  if (lastDot === -1 || lastDot === fullFileName.length - 1) {\n    return {\n      name: fullFileName,\n      extension: undefined\n    };\n  }\n\n  return {\n    name: fullFileName.slice(0, lastDot),\n    extension: fullFileName.slice(lastDot + 1)\n  };\n};", "\"use strict\";\n\n// ___Why not add the mime-types package?\n//    It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).\n// ___Where to take new extensions from?\n//    https://github.com/jshttp/mime-db/blob/master/db.json\nmodule.exports = {\n  md: 'text/markdown',\n  markdown: 'text/markdown',\n  mp4: 'video/mp4',\n  mp3: 'audio/mp3',\n  svg: 'image/svg+xml',\n  jpg: 'image/jpeg',\n  png: 'image/png',\n  gif: 'image/gif',\n  heic: 'image/heic',\n  heif: 'image/heif',\n  yaml: 'text/yaml',\n  yml: 'text/yaml',\n  csv: 'text/csv',\n  tsv: 'text/tab-separated-values',\n  tab: 'text/tab-separated-values',\n  avi: 'video/x-msvideo',\n  mks: 'video/x-matroska',\n  mkv: 'video/x-matroska',\n  mov: 'video/quicktime',\n  doc: 'application/msword',\n  docm: 'application/vnd.ms-word.document.macroenabled.12',\n  docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n  dot: 'application/msword',\n  dotm: 'application/vnd.ms-word.template.macroenabled.12',\n  dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n  xla: 'application/vnd.ms-excel',\n  xlam: 'application/vnd.ms-excel.addin.macroenabled.12',\n  xlc: 'application/vnd.ms-excel',\n  xlf: 'application/x-xliff+xml',\n  xlm: 'application/vnd.ms-excel',\n  xls: 'application/vnd.ms-excel',\n  xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',\n  xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',\n  xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  xlt: 'application/vnd.ms-excel',\n  xltm: 'application/vnd.ms-excel.template.macroenabled.12',\n  xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n  xlw: 'application/vnd.ms-excel',\n  txt: 'text/plain',\n  text: 'text/plain',\n  conf: 'text/plain',\n  log: 'text/plain',\n  pdf: 'application/pdf',\n  zip: 'application/zip',\n  '7z': 'application/x-7z-compressed',\n  rar: 'application/x-rar-compressed',\n  tar: 'application/x-tar',\n  gz: 'application/gzip',\n  dmg: 'application/x-apple-diskimage'\n};", "\"use strict\";\n\nconst getFileNameAndExtension = require('./getFileNameAndExtension');\n\nconst mimeTypes = require('./mimeTypes');\n\nmodule.exports = function getFileType(file) {\n  var _getFileNameAndExtens;\n\n  if (file.type) return file.type;\n  const fileExtension = file.name ? (_getFileNameAndExtens = getFileNameAndExtension(file.name).extension) == null ? void 0 : _getFileNameAndExtens.toLowerCase() : null;\n\n  if (fileExtension && fileExtension in mimeTypes) {\n    // else, see if we can map extension to a mime type\n    return mimeTypes[fileExtension];\n  } // if all fails, fall back to a generic byte stream type\n\n\n  return 'application/octet-stream';\n};", "\"use strict\";\n\nfunction encodeCharacter(character) {\n  return character.charCodeAt(0).toString(32);\n}\n\nfunction encodeFilename(name) {\n  let suffix = '';\n  return name.replace(/[^A-Z0-9]/ig, character => {\n    suffix += `-${encodeCharacter(character)}`;\n    return '/';\n  }) + suffix;\n}\n/**\n * Takes a file object and turns it into fileID, by converting file.name to lowercase,\n * removing extra characters and adding type, size and lastModified\n *\n * @param {object} file\n * @returns {string} the fileID\n */\n\n\nmodule.exports = function generateFileID(file) {\n  // It's tempting to do `[items].filter(Boolean).join('-')` here, but that\n  // is slower! simple string concatenation is fast\n  let id = 'uppy';\n\n  if (typeof file.name === 'string') {\n    id += `-${encodeFilename(file.name.toLowerCase())}`;\n  }\n\n  if (file.type !== undefined) {\n    id += `-${file.type}`;\n  }\n\n  if (file.meta && typeof file.meta.relativePath === 'string') {\n    id += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`;\n  }\n\n  if (file.data.size !== undefined) {\n    id += `-${file.data.size}`;\n  }\n\n  if (file.data.lastModified !== undefined) {\n    id += `-${file.data.lastModified}`;\n  }\n\n  return id;\n};", "// Edge 15.x does not fire 'progress' events on uploads.\n// See https://github.com/transloadit/uppy/issues/945\n// And https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12224510/\nmodule.exports = function supportsUploadProgress(userAgent) {\n  // Allow passing in userAgent for tests\n  if (userAgent == null) {\n    userAgent = typeof navigator !== 'undefined' ? navigator.userAgent : null;\n  } // Assume it works because basically everything supports progress events.\n\n\n  if (!userAgent) return true;\n  const m = /Edge\\/(\\d+\\.\\d+)/.exec(userAgent);\n  if (!m) return true;\n  const edgeVersion = m[1];\n  let [major, minor] = edgeVersion.split('.');\n  major = parseInt(major, 10);\n  minor = parseInt(minor, 10); // Worked before:\n  // Edge 40.15063.0.0\n  // Microsoft EdgeHTML 15.15063\n\n  if (major < 15 || major === 15 && minor < 15063) {\n    return true;\n  } // Fixed in:\n  // Microsoft EdgeHTML 18.18218\n\n\n  if (major > 18 || major === 18 && minor >= 18218) {\n    return true;\n  } // other versions don't work.\n\n\n  return false;\n};", "module.exports = function getFileName(fileType, fileDescriptor) {\n  if (fileDescriptor.name) {\n    return fileDescriptor.name;\n  }\n\n  if (fileType.split('/')[0] === 'image') {\n    return `${fileType.split('/')[0]}.${fileType.split('/')[1]}`;\n  }\n\n  return 'noname';\n};", "\"use strict\";\n\n/**\n * Adds zero to strings shorter than two characters.\n *\n * @param {number} number\n * @returns {string}\n */\nfunction pad(number) {\n  return number < 10 ? `0${number}` : number.toString();\n}\n/**\n * Returns a timestamp in the format of `hours:minutes:seconds`\n */\n\n\nmodule.exports = function getTimeStamp() {\n  const date = new Date();\n  const hours = pad(date.getHours());\n  const minutes = pad(date.getMinutes());\n  const seconds = pad(date.getSeconds());\n  return `${hours}:${minutes}:${seconds}`;\n};", "/* eslint-disable no-console */\nconst getTimeStamp = require('@uppy/utils/lib/getTimeStamp'); // Swallow all logs, except errors.\n// default if logger is not set or debug: false\n\n\nconst justErrorsLogger = {\n  debug: () => {},\n  warn: () => {},\n  error: function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n}; // Print logs to console with namespace + timestamp,\n// set by logger: Uppy.debugLogger or debug: true\n\nconst debugLogger = {\n  debug: function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return console.debug(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  warn: function () {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    return console.warn(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  error: function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n};\nmodule.exports = {\n  justErrorsLogger,\n  debugLogger\n};", "// Adapted from https://github.com/Flet/prettier-bytes/\n// Changing 1000 bytes to 1024, so we can keep uppercase KB vs kB\n// ISC License (c) Dan Flettre https://github.com/Flet/prettier-bytes/blob/master/LICENSE\nmodule.exports = function prettierBytes (num) {\n  if (typeof num !== 'number' || isNaN(num)) {\n    throw new TypeError('Expected a number, got ' + typeof num)\n  }\n\n  var neg = num < 0\n  var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n\n  if (neg) {\n    num = -num\n  }\n\n  if (num < 1) {\n    return (neg ? '-' : '') + num + ' B'\n  }\n\n  var exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n  num = Number(num / Math.pow(1024, exponent))\n  var unit = units[exponent]\n\n  if (num >= 10 || num % 1 === 0) {\n    // Do not show decimals when the number is two-digit, or if the number has no\n    // decimal component.\n    return (neg ? '-' : '') + num.toFixed(0) + ' ' + unit\n  } else {\n    return (neg ? '-' : '') + num.toFixed(1) + ' ' + unit\n  }\n}\n", "/* jshint node: true */\n'use strict';\n\n/**\n  # wildcard\n\n  Very simple wildcard matching, which is designed to provide the same\n  functionality that is found in the\n  [eve](https://github.com/adobe-webplatform/eve) eventing library.\n\n  ## Usage\n\n  It works with strings:\n\n  <<< examples/strings.js\n\n  Arrays:\n\n  <<< examples/arrays.js\n\n  Objects (matching against keys):\n\n  <<< examples/objects.js\n\n  While the library works in Node, if you are are looking for file-based\n  wildcard matching then you should have a look at:\n\n  <https://github.com/isaacs/node-glob>\n**/\n\nfunction WildcardMatcher(text, separator) {\n  this.text = text = text || '';\n  this.hasWild = ~text.indexOf('*');\n  this.separator = separator;\n  this.parts = text.split(separator);\n}\n\nWildcardMatcher.prototype.match = function(input) {\n  var matches = true;\n  var parts = this.parts;\n  var ii;\n  var partsCount = parts.length;\n  var testParts;\n\n  if (typeof input == 'string' || input instanceof String) {\n    if (!this.hasWild && this.text != input) {\n      matches = false;\n    } else {\n      testParts = (input || '').split(this.separator);\n      for (ii = 0; matches && ii < partsCount; ii++) {\n        if (parts[ii] === '*')  {\n          continue;\n        } else if (ii < testParts.length) {\n          matches = parts[ii] === testParts[ii];\n        } else {\n          matches = false;\n        }\n      }\n\n      // If matches, then return the component parts\n      matches = matches && testParts;\n    }\n  }\n  else if (typeof input.splice == 'function') {\n    matches = [];\n\n    for (ii = input.length; ii--; ) {\n      if (this.match(input[ii])) {\n        matches[matches.length] = input[ii];\n      }\n    }\n  }\n  else if (typeof input == 'object') {\n    matches = {};\n\n    for (var key in input) {\n      if (this.match(key)) {\n        matches[key] = input[key];\n      }\n    }\n  }\n\n  return matches;\n};\n\nmodule.exports = function(text, test, separator) {\n  var matcher = new WildcardMatcher(text, separator || /[\\/\\.]/);\n  if (typeof test != 'undefined') {\n    return matcher.match(test);\n  }\n\n  return matcher;\n};\n", "var wildcard = require('wildcard');\nvar reMimePartSplit = /[\\/\\+\\.]/;\n\n/**\n  # mime-match\n\n  A simple function to checker whether a target mime type matches a mime-type\n  pattern (e.g. image/jpeg matches image/jpeg OR image/*).\n\n  ## Example Usage\n\n  <<< example.js\n\n**/\nmodule.exports = function(target, pattern) {\n  function test(pattern) {\n    var result = wildcard(pattern, target, reMimePartSplit);\n\n    // ensure that we have a valid mime type (should have two parts)\n    return result && result.length >= 2;\n  }\n\n  return pattern ? test(pattern.split(';')[0]) : test;\n};\n", "/* eslint-disable max-classes-per-file, class-methods-use-this */\n\n/* global AggregateError */\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst match = require('mime-match');\n\nconst defaultOptions = {\n  maxFileSize: null,\n  minFileSize: null,\n  maxTotalFileSize: null,\n  maxNumberOfFiles: null,\n  minNumberOfFiles: null,\n  allowedFileTypes: null,\n  requiredMetaFields: []\n};\n\nclass RestrictionError extends Error {\n  constructor() {\n    super(...arguments);\n    this.isRestriction = true;\n  }\n\n}\n\nif (typeof AggregateError === 'undefined') {\n  // eslint-disable-next-line no-global-assign\n  // TODO: remove this \"polyfill\" in the next major.\n  globalThis.AggregateError = class AggregateError extends Error {\n    constructor(errors, message) {\n      super(message);\n      this.errors = errors;\n    }\n\n  };\n}\n\nclass Restricter {\n  constructor(getOpts, i18n) {\n    this.i18n = i18n;\n\n    this.getOpts = () => {\n      const opts = getOpts();\n\n      if (opts.restrictions.allowedFileTypes != null && !Array.isArray(opts.restrictions.allowedFileTypes)) {\n        throw new TypeError('`restrictions.allowedFileTypes` must be an array');\n      }\n\n      return opts;\n    };\n  }\n\n  validate(file, files) {\n    const {\n      maxFileSize,\n      minFileSize,\n      maxTotalFileSize,\n      maxNumberOfFiles,\n      allowedFileTypes\n    } = this.getOpts().restrictions;\n\n    if (maxNumberOfFiles && files.length + 1 > maxNumberOfFiles) {\n      throw new RestrictionError(`${this.i18n('youCanOnlyUploadX', {\n        smart_count: maxNumberOfFiles\n      })}`);\n    }\n\n    if (allowedFileTypes) {\n      const isCorrectFileType = allowedFileTypes.some(type => {\n        // check if this is a mime-type\n        if (type.includes('/')) {\n          if (!file.type) return false;\n          return match(file.type.replace(/;.*?$/, ''), type);\n        } // otherwise this is likely an extension\n\n\n        if (type[0] === '.' && file.extension) {\n          return file.extension.toLowerCase() === type.substr(1).toLowerCase();\n        }\n\n        return false;\n      });\n\n      if (!isCorrectFileType) {\n        const allowedFileTypesString = allowedFileTypes.join(', ');\n        throw new RestrictionError(this.i18n('youCanOnlyUploadFileTypes', {\n          types: allowedFileTypesString\n        }));\n      }\n    } // We can't check maxTotalFileSize if the size is unknown.\n\n\n    if (maxTotalFileSize && file.size != null) {\n      const totalFilesSize = files.reduce((total, f) => total + f.size, file.size);\n\n      if (totalFilesSize > maxTotalFileSize) {\n        throw new RestrictionError(this.i18n('exceedsSize', {\n          size: prettierBytes(maxTotalFileSize),\n          file: file.name\n        }));\n      }\n    } // We can't check maxFileSize if the size is unknown.\n\n\n    if (maxFileSize && file.size != null && file.size > maxFileSize) {\n      throw new RestrictionError(this.i18n('exceedsSize', {\n        size: prettierBytes(maxFileSize),\n        file: file.name\n      }));\n    } // We can't check minFileSize if the size is unknown.\n\n\n    if (minFileSize && file.size != null && file.size < minFileSize) {\n      throw new RestrictionError(this.i18n('inferiorSize', {\n        size: prettierBytes(minFileSize)\n      }));\n    }\n  }\n\n  validateMinNumberOfFiles(files) {\n    const {\n      minNumberOfFiles\n    } = this.getOpts().restrictions;\n\n    if (Object.keys(files).length < minNumberOfFiles) {\n      throw new RestrictionError(this.i18n('youHaveToAtLeastSelectX', {\n        smart_count: minNumberOfFiles\n      }));\n    }\n  }\n\n  getMissingRequiredMetaFields(file) {\n    const error = new RestrictionError(this.i18n('missingRequiredMetaFieldOnFile', {\n      fileName: file.name\n    }));\n    const {\n      requiredMetaFields\n    } = this.getOpts().restrictions; // TODO: migrate to Object.hasOwn in the next major.\n\n    const own = Object.prototype.hasOwnProperty;\n    const missingFields = [];\n\n    for (const field of requiredMetaFields) {\n      if (!own.call(file.meta, field) || file.meta[field] === '') {\n        missingFields.push(field);\n      }\n    }\n\n    return {\n      missingFields,\n      error\n    };\n  }\n\n}\n\nmodule.exports = {\n  Restricter,\n  defaultOptions,\n  RestrictionError\n};", "module.exports = {\n  strings: {\n    addBulkFilesFailed: {\n      0: 'Failed to add %{smart_count} file due to an internal error',\n      1: 'Failed to add %{smart_count} files due to internal errors'\n    },\n    youCanOnlyUploadX: {\n      0: 'You can only upload %{smart_count} file',\n      1: 'You can only upload %{smart_count} files'\n    },\n    youHaveToAtLeastSelectX: {\n      0: 'You have to select at least %{smart_count} file',\n      1: 'You have to select at least %{smart_count} files'\n    },\n    exceedsSize: '%{file} exceeds maximum allowed size of %{size}',\n    missingRequiredMetaField: 'Missing required meta fields',\n    missingRequiredMetaFieldOnFile: 'Missing required meta fields in %{fileName}',\n    inferiorSize: 'This file is smaller than the allowed size of %{size}',\n    youCanOnlyUploadFileTypes: 'You can only upload: %{types}',\n    noMoreFilesAllowed: 'Cannot add more files',\n    noDuplicates: \"Cannot add the duplicate file '%{fileName}', it already exists\",\n    companionError: 'Connection with Companion failed',\n    authAborted: 'Authentication aborted',\n    companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}',\n    failedToUpload: 'Failed to upload %{file}',\n    noInternetConnection: 'No Internet connection',\n    connectedToInternet: 'Connected to the Internet',\n    // Strings for remote providers\n    noFilesFound: 'You have no files or folders here',\n    selectX: {\n      0: 'Select %{smart_count}',\n      1: 'Select %{smart_count}'\n    },\n    allFilesFromFolderNamed: 'All files from folder %{name}',\n    openFolderNamed: 'Open folder %{name}',\n    cancel: 'Cancel',\n    logOut: 'Log out',\n    filter: 'Filter',\n    resetFilter: 'Reset filter',\n    loading: 'Loading...',\n    authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',\n    authenticateWith: 'Connect to %{pluginName}',\n    signInWithGoogle: 'Sign in with Google',\n    searchImages: 'Search for images',\n    enterTextToSearch: 'Enter text to search for images',\n    search: 'Search',\n    emptyFolderAdded: 'No files were added from empty folder',\n    folderAlreadyAdded: 'The folder \"%{folder}\" was already added',\n    folderAdded: {\n      0: 'Added %{smart_count} file from %{folder}',\n      1: 'Added %{smart_count} files from %{folder}'\n    }\n  }\n};", "/* eslint-disable max-classes-per-file */\n\n/* global AggregateError */\n'use strict';\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst Translator = require('@uppy/utils/lib/Translator');\n\nconst ee = require('namespace-emitter');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst throttle = require('lodash.throttle');\n\nconst DefaultStore = require('@uppy/store-default');\n\nconst getFileType = require('@uppy/utils/lib/getFileType');\n\nconst getFileNameAndExtension = require('@uppy/utils/lib/getFileNameAndExtension');\n\nconst generateFileID = require('@uppy/utils/lib/generateFileID');\n\nconst supportsUploadProgress = require('./supportsUploadProgress');\n\nconst getFileName = require('./getFileName');\n\nconst {\n  justErrorsLogger,\n  debugLogger\n} = require('./loggers');\n\nconst {\n  Restricter,\n  defaultOptions: defaultRestrictionOptions,\n  RestrictionError\n} = require('./Restricter');\n\nconst locale = require('./locale'); // Exported from here.\n\n/**\n * Uppy Core module.\n * Manages plugins, state updates, acts as an event bus,\n * adds/removes files and metadata.\n */\n\n\nvar _plugins = /*#__PURE__*/_classPrivateFieldLooseKey(\"plugins\");\n\nvar _restricter = /*#__PURE__*/_classPrivateFieldLooseKey(\"restricter\");\n\nvar _storeUnsubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"storeUnsubscribe\");\n\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\n\nvar _preProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"preProcessors\");\n\nvar _uploaders = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploaders\");\n\nvar _postProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"postProcessors\");\n\nvar _informAndEmit = /*#__PURE__*/_classPrivateFieldLooseKey(\"informAndEmit\");\n\nvar _checkRequiredMetaFieldsOnFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFieldsOnFile\");\n\nvar _checkRequiredMetaFields = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFields\");\n\nvar _assertNewUploadAllowed = /*#__PURE__*/_classPrivateFieldLooseKey(\"assertNewUploadAllowed\");\n\nvar _checkAndCreateFileStateObject = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkAndCreateFileStateObject\");\n\nvar _startIfAutoProceed = /*#__PURE__*/_classPrivateFieldLooseKey(\"startIfAutoProceed\");\n\nvar _addListeners = /*#__PURE__*/_classPrivateFieldLooseKey(\"addListeners\");\n\nvar _updateOnlineStatus = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateOnlineStatus\");\n\nvar _createUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"createUpload\");\n\nvar _getUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUpload\");\n\nvar _removeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"removeUpload\");\n\nvar _runUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"runUpload\");\n\n_Symbol$for = Symbol.for('uppy test: getPlugins');\n_Symbol$for2 = Symbol.for('uppy test: createUpload');\n\nclass Uppy {\n  // eslint-disable-next-line global-require\n\n  /** @type {Record<string, BasePlugin[]>} */\n\n  /**\n   * Instantiate Uppy\n   *\n   * @param {object} opts \u2014 Uppy options\n   */\n  constructor(_opts) {\n    Object.defineProperty(this, _runUpload, {\n      value: _runUpload2\n    });\n    Object.defineProperty(this, _removeUpload, {\n      value: _removeUpload2\n    });\n    Object.defineProperty(this, _getUpload, {\n      value: _getUpload2\n    });\n    Object.defineProperty(this, _createUpload, {\n      value: _createUpload2\n    });\n    Object.defineProperty(this, _addListeners, {\n      value: _addListeners2\n    });\n    Object.defineProperty(this, _startIfAutoProceed, {\n      value: _startIfAutoProceed2\n    });\n    Object.defineProperty(this, _checkAndCreateFileStateObject, {\n      value: _checkAndCreateFileStateObject2\n    });\n    Object.defineProperty(this, _assertNewUploadAllowed, {\n      value: _assertNewUploadAllowed2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFields, {\n      value: _checkRequiredMetaFields2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFieldsOnFile, {\n      value: _checkRequiredMetaFieldsOnFile2\n    });\n    Object.defineProperty(this, _informAndEmit, {\n      value: _informAndEmit2\n    });\n    Object.defineProperty(this, _plugins, {\n      writable: true,\n      value: Object.create(null)\n    });\n    Object.defineProperty(this, _restricter, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _storeUnsubscribe, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: ee()\n    });\n    Object.defineProperty(this, _preProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _uploaders, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _postProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _updateOnlineStatus, {\n      writable: true,\n      value: this.updateOnlineStatus.bind(this)\n    });\n    this.defaultLocale = locale;\n    const defaultOptions = {\n      id: 'uppy',\n      autoProceed: false,\n\n      /**\n       * @deprecated The method should not be used\n       */\n      allowMultipleUploads: true,\n      allowMultipleUploadBatches: true,\n      debug: false,\n      restrictions: defaultRestrictionOptions,\n      meta: {},\n      onBeforeFileAdded: currentFile => currentFile,\n      onBeforeUpload: files => files,\n      store: DefaultStore(),\n      logger: justErrorsLogger,\n      infoTimeout: 5000\n    }; // Merge default options with the ones set by user,\n    // making sure to merge restrictions too\n\n    this.opts = { ...defaultOptions,\n      ..._opts,\n      restrictions: { ...defaultOptions.restrictions,\n        ...(_opts && _opts.restrictions)\n      }\n    }; // Support debug: true for backwards-compatability, unless logger is set in opts\n    // opts instead of this.opts to avoid comparing objects \u2014 we set logger: justErrorsLogger in defaultOptions\n\n    if (_opts && _opts.logger && _opts.debug) {\n      this.log('You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.', 'warning');\n    } else if (_opts && _opts.debug) {\n      this.opts.logger = debugLogger;\n    }\n\n    this.log(`Using Core v${this.constructor.VERSION}`);\n    this.i18nInit(); // ___Why throttle at 500ms?\n    //    - We must throttle at >250ms for superfocus in Dashboard to work well\n    //    (because animation takes 0.25s, and we want to wait for all animations to be over before refocusing).\n    //    [Practical Check]: if thottle is at 100ms, then if you are uploading a file,\n    //    and click 'ADD MORE FILES', - focus won't activate in Firefox.\n    //    - We must throttle at around >500ms to avoid performance lags.\n    //    [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.\n\n    this.calculateProgress = throttle(this.calculateProgress.bind(this), 500, {\n      leading: true,\n      trailing: true\n    });\n    this.store = this.opts.store;\n    this.setState({\n      plugins: {},\n      files: {},\n      currentUploads: {},\n      allowNewUpload: true,\n      capabilities: {\n        uploadProgress: supportsUploadProgress(),\n        individualCancellation: true,\n        resumableUploads: false\n      },\n      totalProgress: 0,\n      meta: { ...this.opts.meta\n      },\n      info: [],\n      recoveredState: null\n    });\n    _classPrivateFieldLooseBase(this, _restricter)[_restricter] = new Restricter(() => this.opts, this.i18n);\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe] = this.store.subscribe((prevState, nextState, patch) => {\n      this.emit('state-update', prevState, nextState, patch);\n      this.updateAll(nextState);\n    }); // Exposing uppy object on window for debugging and testing\n\n    if (this.opts.debug && typeof window !== 'undefined') {\n      window[this.opts.id] = this;\n    }\n\n    _classPrivateFieldLooseBase(this, _addListeners)[_addListeners]();\n  }\n\n  emit(event) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(event, ...args);\n  }\n\n  on(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, callback);\n\n    return this;\n  }\n\n  once(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(event, callback);\n\n    return this;\n  }\n\n  off(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, callback);\n\n    return this;\n  }\n  /**\n   * Iterate on all plugins and run `update` on them.\n   * Called each time state changes.\n   *\n   */\n\n\n  updateAll(state) {\n    this.iteratePlugins(plugin => {\n      plugin.update(state);\n    });\n  }\n  /**\n   * Updates state with a patch\n   *\n   * @param {object} patch {foo: 'bar'}\n   */\n\n\n  setState(patch) {\n    this.store.setState(patch);\n  }\n  /**\n   * Returns current state.\n   *\n   * @returns {object}\n   */\n\n\n  getState() {\n    return this.store.getState();\n  }\n  /**\n   * Back compat for when uppy.state is used instead of uppy.getState().\n   *\n   * @deprecated\n   */\n\n\n  get state() {\n    // Here, state is a non-enumerable property.\n    return this.getState();\n  }\n  /**\n   * Shorthand to set state for a specific file.\n   */\n\n\n  setFileState(fileID, state) {\n    if (!this.getState().files[fileID]) {\n      throw new Error(`Can\u2019t set state for ${fileID} (the file could have been removed)`);\n    }\n\n    this.setState({\n      files: { ...this.getState().files,\n        [fileID]: { ...this.getState().files[fileID],\n          ...state\n        }\n      }\n    });\n  }\n\n  i18nInit() {\n    const translator = new Translator([this.defaultLocale, this.opts.locale]);\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.locale = translator.locale;\n  }\n\n  setOptions(newOpts) {\n    this.opts = { ...this.opts,\n      ...newOpts,\n      restrictions: { ...this.opts.restrictions,\n        ...(newOpts && newOpts.restrictions)\n      }\n    };\n\n    if (newOpts.meta) {\n      this.setMeta(newOpts.meta);\n    }\n\n    this.i18nInit();\n\n    if (newOpts.locale) {\n      this.iteratePlugins(plugin => {\n        plugin.setOptions();\n      });\n    } // Note: this is not the preact `setState`, it's an internal function that has the same name.\n\n\n    this.setState(); // so that UI re-renders with new options\n  }\n\n  resetProgress() {\n    const defaultProgress = {\n      percentage: 0,\n      bytesUploaded: 0,\n      uploadComplete: false,\n      uploadStarted: null\n    };\n    const files = { ...this.getState().files\n    };\n    const updatedFiles = {};\n    Object.keys(files).forEach(fileID => {\n      const updatedFile = { ...files[fileID]\n      };\n      updatedFile.progress = { ...updatedFile.progress,\n        ...defaultProgress\n      };\n      updatedFiles[fileID] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles,\n      totalProgress: 0\n    });\n    this.emit('reset-progress');\n  }\n\n  addPreProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].add(fn);\n  }\n\n  removePreProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].delete(fn);\n  }\n\n  addPostProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].add(fn);\n  }\n\n  removePostProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].delete(fn);\n  }\n\n  addUploader(fn) {\n    _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].add(fn);\n  }\n\n  removeUploader(fn) {\n    return _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].delete(fn);\n  }\n\n  setMeta(data) {\n    const updatedMeta = { ...this.getState().meta,\n      ...data\n    };\n    const updatedFiles = { ...this.getState().files\n    };\n    Object.keys(updatedFiles).forEach(fileID => {\n      updatedFiles[fileID] = { ...updatedFiles[fileID],\n        meta: { ...updatedFiles[fileID].meta,\n          ...data\n        }\n      };\n    });\n    this.log('Adding metadata:');\n    this.log(data);\n    this.setState({\n      meta: updatedMeta,\n      files: updatedFiles\n    });\n  }\n\n  setFileMeta(fileID, data) {\n    const updatedFiles = { ...this.getState().files\n    };\n\n    if (!updatedFiles[fileID]) {\n      this.log('Was trying to set metadata for a file that has been removed: ', fileID);\n      return;\n    }\n\n    const newMeta = { ...updatedFiles[fileID].meta,\n      ...data\n    };\n    updatedFiles[fileID] = { ...updatedFiles[fileID],\n      meta: newMeta\n    };\n    this.setState({\n      files: updatedFiles\n    });\n  }\n  /**\n   * Get a file object.\n   *\n   * @param {string} fileID The ID of the file object to return.\n   */\n\n\n  getFile(fileID) {\n    return this.getState().files[fileID];\n  }\n  /**\n   * Get all files in an array.\n   */\n\n\n  getFiles() {\n    const {\n      files\n    } = this.getState();\n    return Object.values(files);\n  }\n\n  getObjectOfFilesPerState() {\n    const {\n      files: filesObject,\n      totalProgress,\n      error\n    } = this.getState();\n    const files = Object.values(filesObject);\n    const inProgressFiles = files.filter(_ref => {\n      let {\n        progress\n      } = _ref;\n      return !progress.uploadComplete && progress.uploadStarted;\n    });\n    const newFiles = files.filter(file => !file.progress.uploadStarted);\n    const startedFiles = files.filter(file => file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess);\n    const uploadStartedFiles = files.filter(file => file.progress.uploadStarted);\n    const pausedFiles = files.filter(file => file.isPaused);\n    const completeFiles = files.filter(file => file.progress.uploadComplete);\n    const erroredFiles = files.filter(file => file.error);\n    const inProgressNotPausedFiles = inProgressFiles.filter(file => !file.isPaused);\n    const processingFiles = files.filter(file => file.progress.preprocess || file.progress.postprocess);\n    return {\n      newFiles,\n      startedFiles,\n      uploadStartedFiles,\n      pausedFiles,\n      completeFiles,\n      erroredFiles,\n      inProgressFiles,\n      inProgressNotPausedFiles,\n      processingFiles,\n      isUploadStarted: uploadStartedFiles.length > 0,\n      isAllComplete: totalProgress === 100 && completeFiles.length === files.length && processingFiles.length === 0,\n      isAllErrored: !!error && erroredFiles.length === files.length,\n      isAllPaused: inProgressFiles.length !== 0 && pausedFiles.length === inProgressFiles.length,\n      isUploadInProgress: inProgressFiles.length > 0,\n      isSomeGhost: files.some(file => file.isGhost)\n    };\n  }\n  /*\n  * @constructs\n  * @param { Error } error\n  * @param { undefined } file\n  */\n\n  /*\n  * @constructs\n  * @param { RestrictionError } error\n  * @param { UppyFile | undefined } file\n  */\n\n\n  validateRestrictions(file, files) {\n    if (files === void 0) {\n      files = this.getFiles();\n    }\n\n    // TODO: directly return the Restriction error in next major version.\n    // we create RestrictionError's just to discard immediately, which doesn't make sense.\n    try {\n      _classPrivateFieldLooseBase(this, _restricter)[_restricter].validate(file, files);\n\n      return {\n        result: true\n      };\n    } catch (err) {\n      return {\n        result: false,\n        reason: err.message\n      };\n    }\n  }\n\n  checkIfFileAlreadyExists(fileID) {\n    const {\n      files\n    } = this.getState();\n\n    if (files[fileID] && !files[fileID].isGhost) {\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * Create a file state object based on user-provided `addFile()` options.\n   *\n   * Note this is extremely side-effectful and should only be done when a file state object\n   * will be added to state immediately afterward!\n   *\n   * The `files` value is passed in because it may be updated by the caller without updating the store.\n   */\n\n\n  /**\n   * Add a new file to `state.files`. This will run `onBeforeFileAdded`,\n   * try to guess file type in a clever way, check file against restrictions,\n   * and start an upload if `autoProceed === true`.\n   *\n   * @param {object} file object to add\n   * @returns {string} id for the added file\n   */\n  addFile(file) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](file);\n\n    const {\n      files\n    } = this.getState();\n\n    let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, file); // Users are asked to re-select recovered files without data,\n    // and to keep the progress, meta and everthing else, we only replace said data\n\n\n    if (files[newFile.id] && files[newFile.id].isGhost) {\n      newFile = { ...files[newFile.id],\n        data: file.data,\n        isGhost: false\n      };\n      this.log(`Replaced the blob in the restored ghost file: ${newFile.name}, ${newFile.id}`);\n    }\n\n    this.setState({\n      files: { ...files,\n        [newFile.id]: newFile\n      }\n    });\n    this.emit('file-added', newFile);\n    this.emit('files-added', [newFile]);\n    this.log(`Added file: ${newFile.name}, ${newFile.id}, mime type: ${newFile.type}`);\n\n    _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n\n    return newFile.id;\n  }\n  /**\n   * Add multiple files to `state.files`. See the `addFile()` documentation.\n   *\n   * If an error occurs while adding a file, it is logged and the user is notified.\n   * This is good for UI plugins, but not for programmatic use.\n   * Programmatic users should usually still use `addFile()` on individual files.\n   */\n\n\n  addFiles(fileDescriptors) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](); // create a copy of the files object only once\n\n\n    const files = { ...this.getState().files\n    };\n    const newFiles = [];\n    const errors = [];\n\n    for (let i = 0; i < fileDescriptors.length; i++) {\n      try {\n        let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, fileDescriptors[i]); // Users are asked to re-select recovered files without data,\n        // and to keep the progress, meta and everthing else, we only replace said data\n\n\n        if (files[newFile.id] && files[newFile.id].isGhost) {\n          newFile = { ...files[newFile.id],\n            data: fileDescriptors[i].data,\n            isGhost: false\n          };\n          this.log(`Replaced blob in a ghost file: ${newFile.name}, ${newFile.id}`);\n        }\n\n        files[newFile.id] = newFile;\n        newFiles.push(newFile);\n      } catch (err) {\n        if (!err.isRestriction) {\n          errors.push(err);\n        }\n      }\n    }\n\n    this.setState({\n      files\n    });\n    newFiles.forEach(newFile => {\n      this.emit('file-added', newFile);\n    });\n    this.emit('files-added', newFiles);\n\n    if (newFiles.length > 5) {\n      this.log(`Added batch of ${newFiles.length} files`);\n    } else {\n      Object.keys(newFiles).forEach(fileID => {\n        this.log(`Added file: ${newFiles[fileID].name}\\n id: ${newFiles[fileID].id}\\n type: ${newFiles[fileID].type}`);\n      });\n    }\n\n    if (newFiles.length > 0) {\n      _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n    }\n\n    if (errors.length > 0) {\n      let message = 'Multiple errors occurred while adding files:\\n';\n      errors.forEach(subError => {\n        message += `\\n * ${subError.message}`;\n      });\n      this.info({\n        message: this.i18n('addBulkFilesFailed', {\n          smart_count: errors.length\n        }),\n        details: message\n      }, 'error', this.opts.infoTimeout);\n\n      if (typeof AggregateError === 'function') {\n        throw new AggregateError(errors, message);\n      } else {\n        const err = new Error(message);\n        err.errors = errors;\n        throw err;\n      }\n    }\n  }\n\n  removeFiles(fileIDs, reason) {\n    const {\n      files,\n      currentUploads\n    } = this.getState();\n    const updatedFiles = { ...files\n    };\n    const updatedUploads = { ...currentUploads\n    };\n    const removedFiles = Object.create(null);\n    fileIDs.forEach(fileID => {\n      if (files[fileID]) {\n        removedFiles[fileID] = files[fileID];\n        delete updatedFiles[fileID];\n      }\n    }); // Remove files from the `fileIDs` list in each upload.\n\n    function fileIsNotRemoved(uploadFileID) {\n      return removedFiles[uploadFileID] === undefined;\n    }\n\n    Object.keys(updatedUploads).forEach(uploadID => {\n      const newFileIDs = currentUploads[uploadID].fileIDs.filter(fileIsNotRemoved); // Remove the upload if no files are associated with it anymore.\n\n      if (newFileIDs.length === 0) {\n        delete updatedUploads[uploadID];\n        return;\n      }\n\n      updatedUploads[uploadID] = { ...currentUploads[uploadID],\n        fileIDs: newFileIDs\n      };\n    });\n    const stateUpdate = {\n      currentUploads: updatedUploads,\n      files: updatedFiles\n    }; // If all files were removed - allow new uploads,\n    // and clear recoveredState\n\n    if (Object.keys(updatedFiles).length === 0) {\n      stateUpdate.allowNewUpload = true;\n      stateUpdate.error = null;\n      stateUpdate.recoveredState = null;\n    }\n\n    this.setState(stateUpdate);\n    this.calculateTotalProgress();\n    const removedFileIDs = Object.keys(removedFiles);\n    removedFileIDs.forEach(fileID => {\n      this.emit('file-removed', removedFiles[fileID], reason);\n    });\n\n    if (removedFileIDs.length > 5) {\n      this.log(`Removed ${removedFileIDs.length} files`);\n    } else {\n      this.log(`Removed files: ${removedFileIDs.join(', ')}`);\n    }\n  }\n\n  removeFile(fileID, reason) {\n    if (reason === void 0) {\n      reason = null;\n    }\n\n    this.removeFiles([fileID], reason);\n  }\n\n  pauseResume(fileID) {\n    if (!this.getState().capabilities.resumableUploads || this.getFile(fileID).uploadComplete) {\n      return undefined;\n    }\n\n    const wasPaused = this.getFile(fileID).isPaused || false;\n    const isPaused = !wasPaused;\n    this.setFileState(fileID, {\n      isPaused\n    });\n    this.emit('upload-pause', fileID, isPaused);\n    return isPaused;\n  }\n\n  pauseAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: true\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('pause-all');\n  }\n\n  resumeAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('resume-all');\n  }\n\n  retryAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const filesToRetry = Object.keys(updatedFiles).filter(file => {\n      return updatedFiles[file].error;\n    });\n    filesToRetry.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles,\n      error: null\n    });\n    this.emit('retry-all', filesToRetry);\n\n    if (filesToRetry.length === 0) {\n      return Promise.resolve({\n        successful: [],\n        failed: []\n      });\n    }\n\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](filesToRetry, {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n    });\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n\n  cancelAll() {\n    this.emit('cancel-all');\n    const {\n      files\n    } = this.getState();\n    const fileIDs = Object.keys(files);\n\n    if (fileIDs.length) {\n      this.removeFiles(fileIDs, 'cancel-all');\n    }\n\n    this.setState({\n      totalProgress: 0,\n      error: null,\n      recoveredState: null\n    });\n  }\n\n  retryUpload(fileID) {\n    this.setFileState(fileID, {\n      error: null,\n      isPaused: false\n    });\n    this.emit('upload-retry', fileID);\n\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload]([fileID], {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n    });\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n\n  reset() {\n    this.cancelAll();\n  }\n\n  logout() {\n    this.iteratePlugins(plugin => {\n      if (plugin.provider && plugin.provider.logout) {\n        plugin.provider.logout();\n      }\n    });\n  }\n\n  calculateProgress(file, data) {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    } // bytesTotal may be null or zero; in that case we can't divide by it\n\n\n    const canHavePercentage = Number.isFinite(data.bytesTotal) && data.bytesTotal > 0;\n    this.setFileState(file.id, {\n      progress: { ...this.getFile(file.id).progress,\n        bytesUploaded: data.bytesUploaded,\n        bytesTotal: data.bytesTotal,\n        percentage: canHavePercentage ? Math.round(data.bytesUploaded / data.bytesTotal * 100) : 0\n      }\n    });\n    this.calculateTotalProgress();\n  }\n\n  calculateTotalProgress() {\n    // calculate total progress, using the number of files currently uploading,\n    // multiplied by 100 and the summ of individual progress of each file\n    const files = this.getFiles();\n    const inProgress = files.filter(file => {\n      return file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess;\n    });\n\n    if (inProgress.length === 0) {\n      this.emit('progress', 0);\n      this.setState({\n        totalProgress: 0\n      });\n      return;\n    }\n\n    const sizedFiles = inProgress.filter(file => file.progress.bytesTotal != null);\n    const unsizedFiles = inProgress.filter(file => file.progress.bytesTotal == null);\n\n    if (sizedFiles.length === 0) {\n      const progressMax = inProgress.length * 100;\n      const currentProgress = unsizedFiles.reduce((acc, file) => {\n        return acc + file.progress.percentage;\n      }, 0);\n      const totalProgress = Math.round(currentProgress / progressMax * 100);\n      this.setState({\n        totalProgress\n      });\n      return;\n    }\n\n    let totalSize = sizedFiles.reduce((acc, file) => {\n      return acc + file.progress.bytesTotal;\n    }, 0);\n    const averageSize = totalSize / sizedFiles.length;\n    totalSize += averageSize * unsizedFiles.length;\n    let uploadedSize = 0;\n    sizedFiles.forEach(file => {\n      uploadedSize += file.progress.bytesUploaded;\n    });\n    unsizedFiles.forEach(file => {\n      uploadedSize += averageSize * (file.progress.percentage || 0) / 100;\n    });\n    let totalProgress = totalSize === 0 ? 0 : Math.round(uploadedSize / totalSize * 100); // hot fix, because:\n    // uploadedSize ended up larger than totalSize, resulting in 1325% total\n\n    if (totalProgress > 100) {\n      totalProgress = 100;\n    }\n\n    this.setState({\n      totalProgress\n    });\n    this.emit('progress', totalProgress);\n  }\n  /**\n   * Registers listeners for all global actions, like:\n   * `error`, `file-removed`, `upload-progress`\n   */\n\n\n  updateOnlineStatus() {\n    const online = typeof window.navigator.onLine !== 'undefined' ? window.navigator.onLine : true;\n\n    if (!online) {\n      this.emit('is-offline');\n      this.info(this.i18n('noInternetConnection'), 'error', 0);\n      this.wasOffline = true;\n    } else {\n      this.emit('is-online');\n\n      if (this.wasOffline) {\n        this.emit('back-online');\n        this.info(this.i18n('connectedToInternet'), 'success', 3000);\n        this.wasOffline = false;\n      }\n    }\n  }\n\n  getID() {\n    return this.opts.id;\n  }\n  /**\n   * Registers a plugin with Core.\n   *\n   * @param {object} Plugin object\n   * @param {object} [opts] object with options to be passed to Plugin\n   * @returns {object} self for chaining\n   */\n  // eslint-disable-next-line no-shadow\n\n\n  use(Plugin, opts) {\n    if (typeof Plugin !== 'function') {\n      const msg = `Expected a plugin class, but got ${Plugin === null ? 'null' : typeof Plugin}.` + ' Please verify that the plugin was imported and spelled correctly.';\n      throw new TypeError(msg);\n    } // Instantiate\n\n\n    const plugin = new Plugin(this, opts);\n    const pluginId = plugin.id;\n\n    if (!pluginId) {\n      throw new Error('Your plugin must have an id');\n    }\n\n    if (!plugin.type) {\n      throw new Error('Your plugin must have a type');\n    }\n\n    const existsPluginAlready = this.getPlugin(pluginId);\n\n    if (existsPluginAlready) {\n      const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\\n` + 'Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.';\n      throw new Error(msg);\n    }\n\n    if (Plugin.VERSION) {\n      this.log(`Using ${pluginId} v${Plugin.VERSION}`);\n    }\n\n    if (plugin.type in _classPrivateFieldLooseBase(this, _plugins)[_plugins]) {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type].push(plugin);\n    } else {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type] = [plugin];\n    }\n\n    plugin.install();\n    return this;\n  }\n  /**\n   * Find one Plugin by name.\n   *\n   * @param {string} id plugin id\n   * @returns {BasePlugin|undefined}\n   */\n\n\n  getPlugin(id) {\n    for (const plugins of Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins])) {\n      const foundPlugin = plugins.find(plugin => plugin.id === id);\n      if (foundPlugin != null) return foundPlugin;\n    }\n\n    return undefined;\n  }\n\n  [_Symbol$for](type) {\n    return _classPrivateFieldLooseBase(this, _plugins)[_plugins][type];\n  }\n  /**\n   * Iterate through all `use`d plugins.\n   *\n   * @param {Function} method that will be run on each plugin\n   */\n\n\n  iteratePlugins(method) {\n    Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins]).flat(1).forEach(method);\n  }\n  /**\n   * Uninstall and remove a plugin.\n   *\n   * @param {object} instance The plugin instance to remove.\n   */\n\n\n  removePlugin(instance) {\n    this.log(`Removing plugin ${instance.id}`);\n    this.emit('plugin-remove', instance);\n\n    if (instance.uninstall) {\n      instance.uninstall();\n    }\n\n    const list = _classPrivateFieldLooseBase(this, _plugins)[_plugins][instance.type]; // list.indexOf failed here, because Vue3 converted the plugin instance\n    // to a Proxy object, which failed the strict comparison test:\n    // obj !== objProxy\n\n\n    const index = list.findIndex(item => item.id === instance.id);\n\n    if (index !== -1) {\n      list.splice(index, 1);\n    }\n\n    const state = this.getState();\n    const updatedState = {\n      plugins: { ...state.plugins,\n        [instance.id]: undefined\n      }\n    };\n    this.setState(updatedState);\n  }\n  /**\n   * Uninstall all plugins and close down this Uppy instance.\n   */\n\n\n  close() {\n    this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n    this.reset();\n\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n\n    this.iteratePlugins(plugin => {\n      this.removePlugin(plugin);\n    });\n\n    if (typeof window !== 'undefined' && window.removeEventListener) {\n      window.removeEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n      window.removeEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    }\n  }\n\n  hideInfo() {\n    const {\n      info\n    } = this.getState();\n    this.setState({\n      info: info.slice(1)\n    });\n    this.emit('info-hidden');\n  }\n  /**\n   * Set info message in `state.info`, so that UI plugins like `Informer`\n   * can display the message.\n   *\n   * @param {string | object} message Message to be displayed by the informer\n   * @param {string} [type]\n   * @param {number} [duration]\n   */\n\n\n  info(message, type, duration) {\n    if (type === void 0) {\n      type = 'info';\n    }\n\n    if (duration === void 0) {\n      duration = 3000;\n    }\n\n    const isComplexMessage = typeof message === 'object';\n    this.setState({\n      info: [...this.getState().info, {\n        type,\n        message: isComplexMessage ? message.message : message,\n        details: isComplexMessage ? message.details : null\n      }]\n    });\n    setTimeout(() => this.hideInfo(), duration);\n    this.emit('info-visible');\n  }\n  /**\n   * Passes messages to a function, provided in `opts.logger`.\n   * If `opts.logger: Uppy.debugLogger` or `opts.debug: true`, logs to the browser console.\n   *\n   * @param {string|object} message to log\n   * @param {string} [type] optional `error` or `warning`\n   */\n\n\n  log(message, type) {\n    const {\n      logger\n    } = this.opts;\n\n    switch (type) {\n      case 'error':\n        logger.error(message);\n        break;\n\n      case 'warning':\n        logger.warn(message);\n        break;\n\n      default:\n        logger.debug(message);\n        break;\n    }\n  }\n  /**\n   * Restore an upload by its ID.\n   */\n\n\n  restore(uploadID) {\n    this.log(`Core: attempting to restore upload \"${uploadID}\"`);\n\n    if (!this.getState().currentUploads[uploadID]) {\n      _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n      return Promise.reject(new Error('Nonexistent upload'));\n    }\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n  /**\n   * Create an upload for a bunch of files.\n   *\n   * @param {Array<string>} fileIDs File IDs to include in this upload.\n   * @returns {string} ID of this upload.\n   */\n\n\n  [_Symbol$for2]() {\n    return _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](...arguments);\n  }\n\n  /**\n   * Add data to an upload's result object.\n   *\n   * @param {string} uploadID The ID of the upload.\n   * @param {object} data Data properties to add to the result object.\n   */\n  addResultData(uploadID, data) {\n    if (!_classPrivateFieldLooseBase(this, _getUpload)[_getUpload](uploadID)) {\n      this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n      return;\n    }\n\n    const {\n      currentUploads\n    } = this.getState();\n    const currentUpload = { ...currentUploads[uploadID],\n      result: { ...currentUploads[uploadID].result,\n        ...data\n      }\n    };\n    this.setState({\n      currentUploads: { ...currentUploads,\n        [uploadID]: currentUpload\n      }\n    });\n  }\n  /**\n   * Remove an upload, eg. if it has been canceled or completed.\n   *\n   * @param {string} uploadID The ID of the upload.\n   */\n\n\n  /**\n   * Start an upload for all the files that are not currently being uploaded.\n   *\n   * @returns {Promise}\n   */\n  upload() {\n    var _classPrivateFieldLoo;\n\n    if (!((_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _plugins)[_plugins].uploader) != null && _classPrivateFieldLoo.length)) {\n      this.log('No uploader type plugins are used', 'warning');\n    }\n\n    let {\n      files\n    } = this.getState();\n    const onBeforeUploadResult = this.opts.onBeforeUpload(files);\n\n    if (onBeforeUploadResult === false) {\n      return Promise.reject(new Error('Not starting the upload because onBeforeUpload returned false'));\n    }\n\n    if (onBeforeUploadResult && typeof onBeforeUploadResult === 'object') {\n      files = onBeforeUploadResult; // Updating files in state, because uploader plugins receive file IDs,\n      // and then fetch the actual file object from state\n\n      this.setState({\n        files\n      });\n    }\n\n    return Promise.resolve().then(() => _classPrivateFieldLooseBase(this, _restricter)[_restricter].validateMinNumberOfFiles(files)).catch(err => {\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](err);\n\n      throw err;\n    }).then(() => {\n      if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFields)[_checkRequiredMetaFields](files)) {\n        throw new RestrictionError(this.i18n('missingRequiredMetaField'));\n      }\n    }).catch(err => {\n      // Doing this in a separate catch because we already emited and logged\n      // all the errors in `checkRequiredMetaFields` so we only throw a generic\n      // missing fields error here.\n      throw err;\n    }).then(() => {\n      const {\n        currentUploads\n      } = this.getState(); // get a list of files that are currently assigned to uploads\n\n      const currentlyUploadingFiles = Object.values(currentUploads).flatMap(curr => curr.fileIDs);\n      const waitingFileIDs = [];\n      Object.keys(files).forEach(fileID => {\n        const file = this.getFile(fileID); // if the file hasn't started uploading and hasn't already been assigned to an upload..\n\n        if (!file.progress.uploadStarted && currentlyUploadingFiles.indexOf(fileID) === -1) {\n          waitingFileIDs.push(file.id);\n        }\n      });\n\n      const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](waitingFileIDs);\n\n      return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n    }).catch(err => {\n      this.emit('error', err);\n      this.log(err, 'error');\n      throw err;\n    });\n  }\n\n}\n\nfunction _informAndEmit2(error, file) {\n  const {\n    message,\n    details = ''\n  } = error;\n\n  if (error.isRestriction) {\n    this.emit('restriction-failed', file, error);\n  } else {\n    this.emit('error', error);\n  }\n\n  this.info({\n    message,\n    details\n  }, 'error', this.opts.infoTimeout);\n  this.log(`${message} ${details}`.trim(), 'error');\n}\n\nfunction _checkRequiredMetaFieldsOnFile2(file) {\n  const {\n    missingFields,\n    error\n  } = _classPrivateFieldLooseBase(this, _restricter)[_restricter].getMissingRequiredMetaFields(file);\n\n  if (missingFields.length > 0) {\n    this.setFileState(file.id, {\n      missingRequiredMetaFields: missingFields\n    });\n    this.log(error.message);\n    this.emit('restriction-failed', file, error);\n    return false;\n  }\n\n  return true;\n}\n\nfunction _checkRequiredMetaFields2(files) {\n  let success = true;\n\n  for (const file of Object.values(files)) {\n    if (!_classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file)) {\n      success = false;\n    }\n  }\n\n  return success;\n}\n\nfunction _assertNewUploadAllowed2(file) {\n  const {\n    allowNewUpload\n  } = this.getState();\n\n  if (allowNewUpload === false) {\n    const error = new RestrictionError(this.i18n('noMoreFilesAllowed'));\n\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error, file);\n\n    throw error;\n  }\n}\n\nfunction _checkAndCreateFileStateObject2(files, fileDescriptor) {\n  const fileType = getFileType(fileDescriptor);\n  const fileName = getFileName(fileType, fileDescriptor);\n  const fileExtension = getFileNameAndExtension(fileName).extension;\n  const isRemote = Boolean(fileDescriptor.isRemote);\n  const fileID = generateFileID({ ...fileDescriptor,\n    type: fileType\n  });\n\n  if (this.checkIfFileAlreadyExists(fileID)) {\n    const error = new RestrictionError(this.i18n('noDuplicates', {\n      fileName\n    }));\n\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error, fileDescriptor);\n\n    throw error;\n  }\n\n  const meta = fileDescriptor.meta || {};\n  meta.name = fileName;\n  meta.type = fileType; // `null` means the size is unknown.\n\n  const size = Number.isFinite(fileDescriptor.data.size) ? fileDescriptor.data.size : null;\n  let newFile = {\n    source: fileDescriptor.source || '',\n    id: fileID,\n    name: fileName,\n    extension: fileExtension || '',\n    meta: { ...this.getState().meta,\n      ...meta\n    },\n    type: fileType,\n    data: fileDescriptor.data,\n    progress: {\n      percentage: 0,\n      bytesUploaded: 0,\n      bytesTotal: size,\n      uploadComplete: false,\n      uploadStarted: null\n    },\n    size,\n    isRemote,\n    remote: fileDescriptor.remote || '',\n    preview: fileDescriptor.preview\n  };\n  const onBeforeFileAddedResult = this.opts.onBeforeFileAdded(newFile, files);\n\n  if (onBeforeFileAddedResult === false) {\n    // Don\u2019t show UI info for this error, as it should be done by the developer\n    const error = new RestrictionError('Cannot add the file because onBeforeFileAdded returned false.');\n    this.emit('restriction-failed', fileDescriptor, error);\n    throw error;\n  } else if (typeof onBeforeFileAddedResult === 'object' && onBeforeFileAddedResult !== null) {\n    newFile = onBeforeFileAddedResult;\n  }\n\n  try {\n    const filesArray = Object.keys(files).map(i => files[i]);\n\n    _classPrivateFieldLooseBase(this, _restricter)[_restricter].validate(newFile, filesArray);\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](err, newFile);\n\n    throw err;\n  }\n\n  return newFile;\n}\n\nfunction _startIfAutoProceed2() {\n  if (this.opts.autoProceed && !this.scheduledAutoProceed) {\n    this.scheduledAutoProceed = setTimeout(() => {\n      this.scheduledAutoProceed = null;\n      this.upload().catch(err => {\n        if (!err.isRestriction) {\n          this.log(err.stack || err.message || err);\n        }\n      });\n    }, 4);\n  }\n}\n\nfunction _addListeners2() {\n  /**\n   * @param {Error} error\n   * @param {object} [file]\n   * @param {object} [response]\n   */\n  const errorHandler = (error, file, response) => {\n    let errorMsg = error.message || 'Unknown error';\n\n    if (error.details) {\n      errorMsg += ` ${error.details}`;\n    }\n\n    this.setState({\n      error: errorMsg\n    });\n\n    if (file != null && file.id in this.getState().files) {\n      this.setFileState(file.id, {\n        error: errorMsg,\n        response\n      });\n    }\n  };\n\n  this.on('error', errorHandler);\n  this.on('upload-error', (file, error, response) => {\n    errorHandler(error, file, response);\n\n    if (typeof error === 'object' && error.message) {\n      const newError = new Error(error.message);\n      newError.details = error.message;\n\n      if (error.details) {\n        newError.details += ` ${error.details}`;\n      }\n\n      newError.message = this.i18n('failedToUpload', {\n        file: file.name\n      });\n\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](newError);\n    } else {\n      _classPrivateFieldLooseBase(this, _informAndEmit)[_informAndEmit](error);\n    }\n  });\n  this.on('upload', () => {\n    this.setState({\n      error: null\n    });\n  });\n  this.on('upload-started', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: {\n        uploadStarted: Date.now(),\n        uploadComplete: false,\n        percentage: 0,\n        bytesUploaded: 0,\n        bytesTotal: file.size\n      }\n    });\n  });\n  this.on('upload-progress', this.calculateProgress);\n  this.on('upload-success', (file, uploadResp) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const currentProgress = this.getFile(file.id).progress;\n    this.setFileState(file.id, {\n      progress: { ...currentProgress,\n        postprocess: _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].size > 0 ? {\n          mode: 'indeterminate'\n        } : null,\n        uploadComplete: true,\n        percentage: 100,\n        bytesUploaded: currentProgress.bytesTotal\n      },\n      response: uploadResp,\n      uploadURL: uploadResp.uploadURL,\n      isPaused: false\n    }); // Remote providers sometimes don't tell us the file size,\n    // but we can know how many bytes we uploaded once the upload is complete.\n\n    if (file.size == null) {\n      this.setFileState(file.id, {\n        size: uploadResp.bytesUploaded || currentProgress.bytesTotal\n      });\n    }\n\n    this.calculateTotalProgress();\n  });\n  this.on('preprocess-progress', (file, progress) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: { ...this.getFile(file.id).progress,\n        preprocess: progress\n      }\n    });\n  });\n  this.on('preprocess-complete', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const files = { ...this.getState().files\n    };\n    files[file.id] = { ...files[file.id],\n      progress: { ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.preprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('postprocess-progress', (file, progress) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: { ...this.getState().files[file.id].progress,\n        postprocess: progress\n      }\n    });\n  });\n  this.on('postprocess-complete', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const files = { ...this.getState().files\n    };\n    files[file.id] = { ...files[file.id],\n      progress: { ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.postprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('restored', () => {\n    // Files may have changed--ensure progress is still accurate.\n    this.calculateTotalProgress();\n  });\n  this.on('dashboard:file-edit-complete', file => {\n    if (file) {\n      _classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file);\n    }\n  }); // show informer if offline\n\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    window.addEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    setTimeout(_classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus], 3000);\n  }\n}\n\nfunction _createUpload2(fileIDs, opts) {\n  if (opts === void 0) {\n    opts = {};\n  }\n\n  // uppy.retryAll sets this to true \u2014 when retrying we want to ignore `allowNewUpload: false`\n  const {\n    forceAllowNewUpload = false\n  } = opts;\n  const {\n    allowNewUpload,\n    currentUploads\n  } = this.getState();\n\n  if (!allowNewUpload && !forceAllowNewUpload) {\n    throw new Error('Cannot create a new upload: already uploading.');\n  }\n\n  const uploadID = nanoid();\n  this.emit('upload', {\n    id: uploadID,\n    fileIDs\n  });\n  this.setState({\n    allowNewUpload: this.opts.allowMultipleUploadBatches !== false && this.opts.allowMultipleUploads !== false,\n    currentUploads: { ...currentUploads,\n      [uploadID]: {\n        fileIDs,\n        step: 0,\n        result: {}\n      }\n    }\n  });\n  return uploadID;\n}\n\nfunction _getUpload2(uploadID) {\n  const {\n    currentUploads\n  } = this.getState();\n  return currentUploads[uploadID];\n}\n\nfunction _removeUpload2(uploadID) {\n  const currentUploads = { ...this.getState().currentUploads\n  };\n  delete currentUploads[uploadID];\n  this.setState({\n    currentUploads\n  });\n}\n\nasync function _runUpload2(uploadID) {\n  let {\n    currentUploads\n  } = this.getState();\n  let currentUpload = currentUploads[uploadID];\n  const restoreStep = currentUpload.step || 0;\n  const steps = [..._classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors], ..._classPrivateFieldLooseBase(this, _uploaders)[_uploaders], ..._classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors]];\n\n  try {\n    for (let step = restoreStep; step < steps.length; step++) {\n      if (!currentUpload) {\n        break;\n      }\n\n      const fn = steps[step];\n      const updatedUpload = { ...currentUpload,\n        step\n      };\n      this.setState({\n        currentUploads: { ...currentUploads,\n          [uploadID]: updatedUpload\n        }\n      }); // TODO give this the `updatedUpload` object as its only parameter maybe?\n      // Otherwise when more metadata may be added to the upload this would keep getting more parameters\n\n      await fn(updatedUpload.fileIDs, uploadID); // Update currentUpload value in case it was modified asynchronously.\n\n      currentUploads = this.getState().currentUploads;\n      currentUpload = currentUploads[uploadID];\n    }\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n    throw err;\n  } // Set result data.\n\n\n  if (currentUpload) {\n    // Mark postprocessing step as complete if necessary; this addresses a case where we might get\n    // stuck in the postprocessing UI while the upload is fully complete.\n    // If the postprocessing steps do not do any work, they may not emit postprocessing events at\n    // all, and never mark the postprocessing as complete. This is fine on its own but we\n    // introduced code in the @uppy/core upload-success handler to prepare postprocessing progress\n    // state if any postprocessors are registered. That is to avoid a \"flash of completed state\"\n    // before the postprocessing plugins can emit events.\n    //\n    // So, just in case an upload with postprocessing plugins *has* completed *without* emitting\n    // postprocessing completion, we do it instead.\n    currentUpload.fileIDs.forEach(fileID => {\n      const file = this.getFile(fileID);\n\n      if (file && file.progress.postprocess) {\n        this.emit('postprocess-complete', file);\n      }\n    });\n    const files = currentUpload.fileIDs.map(fileID => this.getFile(fileID));\n    const successful = files.filter(file => !file.error);\n    const failed = files.filter(file => file.error);\n    await this.addResultData(uploadID, {\n      successful,\n      failed,\n      uploadID\n    }); // Update currentUpload value in case it was modified asynchronously.\n\n    currentUploads = this.getState().currentUploads;\n    currentUpload = currentUploads[uploadID];\n  } // Emit completion events.\n  // This is in a separate function so that the `currentUploads` variable\n  // always refers to the latest state. In the handler right above it refers\n  // to an outdated object without the `.result` property.\n\n\n  let result;\n\n  if (currentUpload) {\n    result = currentUpload.result;\n    this.emit('complete', result);\n\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n  }\n\n  if (result == null) {\n    this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n  }\n\n  return result;\n}\n\nUppy.VERSION = \"2.1.6\";\nmodule.exports = Uppy;", "export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/**\n * Asynchronously schedule a callback\n * @type {(cb: () => void) => void}\n */\n/* istanbul ignore next */\n// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet queue;\n\twhile ((process._rerenderCount = rerenderQueue.length)) {\n\t\tqueue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\trerenderQueue = [];\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\tqueue.some(c => {\n\t\t\tif (c._dirty) renderComponent(c);\n\t\t});\n\t}\n}\nprocess._rerenderCount = 0;\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(enqueueRender);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t//   const reuse = <div />\n\t\t\t//   <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tnull,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldParentVNode, i + 1);\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tvnode,\n\t\t\t\t\tvnode,\n\t\t\t\t\tc,\n\t\t\t\t\tvnode._dom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j<oldChildrenLength; j+=2` is an alternative to `j++<oldChildrenLength/2`\n\t\t\tfor (\n\t\t\t\tlet sibDom = oldDom, j = 0;\n\t\t\t\t(sibDom = sibDom.nextSibling) && j < oldChildren.length;\n\t\t\t\tj += 2\n\t\t\t) {\n\t\t\t\tif (sibDom == newDom) {\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tparentDom.insertBefore(newDom, oldDom);\n\t\t\tnextDom = oldDom;\n\t\t}\n\t}\n\n\t// If we have pre-calculated the nextDOM node, use it. Else calculate it now\n\t// Strictly check for `undefined` here cuz `null` is a valid value of `nextDom`.\n\t// See more detail in create-element.js:createVNode\n\tif (nextDom !== undefined) {\n\t\toldDom = nextDom;\n\t} else {\n\t\toldDom = newDom.nextSibling;\n\t}\n\n\treturn oldDom;\n}\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink[H:h]/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (\n\t\t\tvalue != null &&\n\t\t\t(value !== false || (name[0] === 'a' && name[1] === 'r'))\n\t\t) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tthis._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\tthis._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n", "import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\tc.props = newProps;\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) c._dirty = false;\n\t\t\t\t\tc._vnode = newVNode;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc.state = c._nextState;\n\n\t\t\tif ((tmp = options._render)) tmp(newVNode);\n\n\t\t\tc._dirty = false;\n\t\t\tc._vnode = newVNode;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) applyRef(r, null, parentVNode);\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(r[i], parentVNode, typeof vnode.type != 'function');\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) removeNode(vnode._dom);\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n", "import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = (\n\t\t(!isHydrating && replaceNode) ||\n\t\tparentDom\n\t)._children = createElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n", "import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n", "/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n */\nexport function _catchError(error, vnode) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error);\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n", "\"use strict\";\n\n/**\n * Check if an object is a DOM element. Duck-typing based on `nodeType`.\n *\n * @param {*} obj\n */\nmodule.exports = function isDOMElement(obj) {\n  return (obj == null ? void 0 : obj.nodeType) === Node.ELEMENT_NODE;\n};", "\"use strict\";\n\nconst isDOMElement = require('./isDOMElement');\n/**\n * Find a DOM element.\n *\n * @param {Node|string} element\n * @returns {Node|null}\n */\n\n\nmodule.exports = function findDOMElement(element, context) {\n  if (context === void 0) {\n    context = document;\n  }\n\n  if (typeof element === 'string') {\n    return context.querySelector(element);\n  }\n\n  if (isDOMElement(element)) {\n    return element;\n  }\n\n  return null;\n};", "/**\n * Core plugin logic that all plugins share.\n *\n * BasePlugin does not contain DOM rendering so it can be used for plugins\n * without a user interface.\n *\n * See `Plugin` for the extended version with Preact rendering for interfaces.\n */\nconst Translator = require('@uppy/utils/lib/Translator');\n\nmodule.exports = class BasePlugin {\n  constructor(uppy, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    this.uppy = uppy;\n    this.opts = opts;\n  }\n\n  getPluginState() {\n    const {\n      plugins\n    } = this.uppy.getState();\n    return plugins[this.id] || {};\n  }\n\n  setPluginState(update) {\n    const {\n      plugins\n    } = this.uppy.getState();\n    this.uppy.setState({\n      plugins: { ...plugins,\n        [this.id]: { ...plugins[this.id],\n          ...update\n        }\n      }\n    });\n  }\n\n  setOptions(newOpts) {\n    this.opts = { ...this.opts,\n      ...newOpts\n    };\n    this.setPluginState(); // so that UI re-renders with new options\n\n    this.i18nInit();\n  }\n\n  i18nInit() {\n    const translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale]);\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.setPluginState(); // so that UI re-renders and we see the updated locale\n  }\n  /**\n   * Extendable methods\n   * ==================\n   * These methods are here to serve as an overview of the extendable methods as well as\n   * making them not conditional in use, such as `if (this.afterUpdate)`.\n   */\n  // eslint-disable-next-line class-methods-use-this\n\n\n  addTarget() {\n    throw new Error('Extend the addTarget method to add your plugin to another plugin\\'s target');\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  install() {} // eslint-disable-next-line class-methods-use-this\n\n\n  uninstall() {}\n  /**\n   * Called when plugin is mounted, whether in DOM or into another plugin.\n   * Needed because sometimes plugins are mounted separately/after `install`,\n   * so this.el and this.parent might not be available in `install`.\n   * This is the case with @uppy/react plugins, for example.\n   */\n\n\n  render() {\n    throw new Error('Extend the render method to add your plugin to a DOM element');\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  update() {} // Called after every state update, after everything's mounted. Debounced.\n  // eslint-disable-next-line class-methods-use-this\n\n\n  afterUpdate() {}\n\n};", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst {\n  render\n} = require('preact');\n\nconst findDOMElement = require('@uppy/utils/lib/findDOMElement');\n\nconst BasePlugin = require('./BasePlugin');\n/**\n * Defer a frequent call to the microtask queue.\n *\n * @param {() => T} fn\n * @returns {Promise<T>}\n */\n\n\nfunction debounce(fn) {\n  let calling = null;\n  let latestArgs = null;\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    latestArgs = args;\n\n    if (!calling) {\n      calling = Promise.resolve().then(() => {\n        calling = null; // At this point `args` may be different from the most\n        // recent state, if multiple calls happened since this task\n        // was queued. So we use the `latestArgs`, which definitely\n        // is the most recent call.\n\n        return fn(...latestArgs);\n      });\n    }\n\n    return calling;\n  };\n}\n/**\n * UIPlugin is the extended version of BasePlugin to incorporate rendering with Preact.\n * Use this for plugins that need a user interface.\n *\n * For plugins without an user interface, see BasePlugin.\n */\n\n\nvar _updateUI = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateUI\");\n\nclass UIPlugin extends BasePlugin {\n  constructor() {\n    super(...arguments);\n    Object.defineProperty(this, _updateUI, {\n      writable: true,\n      value: void 0\n    });\n  }\n\n  /**\n   * Check if supplied `target` is a DOM element or an `object`.\n   * If it\u2019s an object \u2014 target is a plugin, and we search `plugins`\n   * for a plugin with same name and return its target.\n   */\n  mount(target, plugin) {\n    const callerPluginName = plugin.id;\n    const targetElement = findDOMElement(target);\n\n    if (targetElement) {\n      this.isTargetDOMEl = true; // When target is <body> with a single <div> element,\n      // Preact thinks it\u2019s the Uppy root element in there when doing a diff,\n      // and destroys it. So we are creating a fragment (could be empty div)\n\n      const uppyRootElement = document.createDocumentFragment(); // API for plugins that require a synchronous rerender.\n\n      _classPrivateFieldLooseBase(this, _updateUI)[_updateUI] = debounce(state => {\n        // plugin could be removed, but this.rerender is debounced below,\n        // so it could still be called even after uppy.removePlugin or uppy.close\n        // hence the check\n        if (!this.uppy.getPlugin(this.id)) return;\n        render(this.render(state), uppyRootElement);\n        this.afterUpdate();\n      });\n      this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);\n\n      if (this.opts.replaceTargetContent) {\n        // Doing render(h(null), targetElement), which should have been\n        // a better way, since because the component might need to do additional cleanup when it is removed,\n        // stopped working \u2014 Preact just adds null into target, not replacing\n        targetElement.innerHTML = '';\n      }\n\n      render(this.render(this.uppy.getState()), uppyRootElement);\n      this.el = uppyRootElement.firstElementChild;\n      targetElement.appendChild(uppyRootElement);\n      this.onMount();\n      return this.el;\n    }\n\n    let targetPlugin;\n\n    if (typeof target === 'object' && target instanceof UIPlugin) {\n      // Targeting a plugin *instance*\n      targetPlugin = target;\n    } else if (typeof target === 'function') {\n      // Targeting a plugin type\n      const Target = target; // Find the target plugin instance.\n\n      this.uppy.iteratePlugins(p => {\n        if (p instanceof Target) {\n          targetPlugin = p;\n          return false;\n        }\n      });\n    }\n\n    if (targetPlugin) {\n      this.uppy.log(`Installing ${callerPluginName} to ${targetPlugin.id}`);\n      this.parent = targetPlugin;\n      this.el = targetPlugin.addTarget(plugin);\n      this.onMount();\n      return this.el;\n    }\n\n    this.uppy.log(`Not installing ${callerPluginName}`);\n    let message = `Invalid target option given to ${callerPluginName}.`;\n\n    if (typeof target === 'function') {\n      message += ' The given target is not a Plugin class. ' + 'Please check that you\\'re not specifying a React Component instead of a plugin. ' + 'If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: ' + 'run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.';\n    } else {\n      message += 'If you meant to target an HTML element, please make sure that the element exists. ' + 'Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. ' + '(see https://github.com/transloadit/uppy/issues/1042)\\n\\n' + 'If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.';\n    }\n\n    throw new Error(message);\n  }\n\n  update(state) {\n    if (this.el != null) {\n      var _classPrivateFieldLoo, _classPrivateFieldLoo2;\n\n      (_classPrivateFieldLoo = (_classPrivateFieldLoo2 = _classPrivateFieldLooseBase(this, _updateUI))[_updateUI]) == null ? void 0 : _classPrivateFieldLoo.call(_classPrivateFieldLoo2, state);\n    }\n  }\n\n  unmount() {\n    if (this.isTargetDOMEl) {\n      var _this$el;\n\n      (_this$el = this.el) == null ? void 0 : _this$el.remove();\n    }\n\n    this.onUnmount();\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  onMount() {} // eslint-disable-next-line class-methods-use-this\n\n\n  onUnmount() {}\n\n}\n\nmodule.exports = UIPlugin;", "'use strict';\n\nconst Uppy = require('./Uppy');\n\nconst UIPlugin = require('./UIPlugin');\n\nconst BasePlugin = require('./BasePlugin');\n\nconst {\n  debugLogger\n} = require('./loggers');\n\nmodule.exports = Uppy;\nmodule.exports.Uppy = Uppy;\nmodule.exports.UIPlugin = UIPlugin;\nmodule.exports.BasePlugin = BasePlugin;\nmodule.exports.debugLogger = debugLogger;", "\"use strict\";\n\nclass NetworkError extends Error {\n  constructor(error, xhr) {\n    if (xhr === void 0) {\n      xhr = null;\n    }\n\n    super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);\n    this.cause = error;\n    this.isNetworkError = true;\n    this.request = xhr;\n  }\n\n}\n\nmodule.exports = NetworkError;", "\"use strict\";\n\nconst NetworkError = require('./NetworkError');\n/**\n * Wrapper around window.fetch that throws a NetworkError when appropriate\n */\n\n\nmodule.exports = function fetchWithNetworkError() {\n  return fetch(...arguments).catch(err => {\n    if (err.name === 'AbortError') {\n      throw err;\n    } else {\n      throw new NetworkError(err);\n    }\n  });\n};", "'use strict';\n\nclass AuthError extends Error {\n  constructor() {\n    super('Authorization required');\n    this.name = 'AuthError';\n    this.isAuthError = true;\n  }\n\n}\n\nmodule.exports = AuthError;", "'use strict';\n\nvar _class, _getPostResponseFunc, _getUrl, _errorHandler, _temp;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst fetchWithNetworkError = require('@uppy/utils/lib/fetchWithNetworkError');\n\nconst AuthError = require('./AuthError'); // Remove the trailing slash so we can always safely append /xyz.\n\n\nfunction stripSlash(url) {\n  return url.replace(/\\/$/, '');\n}\n\nasync function handleJSONResponse(res) {\n  if (res.status === 401) {\n    throw new AuthError();\n  }\n\n  const jsonPromise = res.json();\n\n  if (res.status < 200 || res.status > 300) {\n    let errMsg = `Failed request with status: ${res.status}. ${res.statusText}`;\n\n    try {\n      const errData = await jsonPromise;\n      errMsg = errData.message ? `${errMsg} message: ${errData.message}` : errMsg;\n      errMsg = errData.requestId ? `${errMsg} request-Id: ${errData.requestId}` : errMsg;\n    } finally {\n      // eslint-disable-next-line no-unsafe-finally\n      throw new Error(errMsg);\n    }\n  }\n\n  return jsonPromise;\n}\n\nmodule.exports = (_temp = (_getPostResponseFunc = /*#__PURE__*/_classPrivateFieldLooseKey(\"getPostResponseFunc\"), _getUrl = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUrl\"), _errorHandler = /*#__PURE__*/_classPrivateFieldLooseKey(\"errorHandler\"), _class = class RequestClient {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    Object.defineProperty(this, _errorHandler, {\n      value: _errorHandler2\n    });\n    Object.defineProperty(this, _getUrl, {\n      value: _getUrl2\n    });\n    Object.defineProperty(this, _getPostResponseFunc, {\n      writable: true,\n      value: skip => response => skip ? response : this.onReceiveResponse(response)\n    });\n    this.uppy = uppy;\n    this.opts = opts;\n    this.onReceiveResponse = this.onReceiveResponse.bind(this);\n    this.allowedHeaders = ['accept', 'content-type', 'uppy-auth-token'];\n    this.preflightDone = false;\n  }\n\n  get hostname() {\n    const {\n      companion\n    } = this.uppy.getState();\n    const host = this.opts.companionUrl;\n    return stripSlash(companion && companion[host] ? companion[host] : host);\n  }\n\n  headers() {\n    const userHeaders = this.opts.companionHeaders || {};\n    return Promise.resolve({ ...RequestClient.defaultHeaders,\n      ...userHeaders\n    });\n  }\n\n  onReceiveResponse(response) {\n    const state = this.uppy.getState();\n    const companion = state.companion || {};\n    const host = this.opts.companionUrl;\n    const {\n      headers\n    } = response; // Store the self-identified domain name for the Companion instance we just hit.\n\n    if (headers.has('i-am') && headers.get('i-am') !== companion[host]) {\n      this.uppy.setState({\n        companion: { ...companion,\n          [host]: headers.get('i-am')\n        }\n      });\n    }\n\n    return response;\n  }\n\n  preflight(path) {\n    if (this.preflightDone) {\n      return Promise.resolve(this.allowedHeaders.slice());\n    }\n\n    return fetch(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method: 'OPTIONS'\n    }).then(response => {\n      if (response.headers.has('access-control-allow-headers')) {\n        this.allowedHeaders = response.headers.get('access-control-allow-headers').split(',').map(headerName => headerName.trim().toLowerCase());\n      }\n\n      this.preflightDone = true;\n      return this.allowedHeaders.slice();\n    }).catch(err => {\n      this.uppy.log(`[CompanionClient] unable to make preflight request ${err}`, 'warning');\n      this.preflightDone = true;\n      return this.allowedHeaders.slice();\n    });\n  }\n\n  preflightAndHeaders(path) {\n    return Promise.all([this.preflight(path), this.headers()]).then(_ref => {\n      let [allowedHeaders, headers] = _ref;\n      // filter to keep only allowed Headers\n      Object.keys(headers).forEach(header => {\n        if (!allowedHeaders.includes(header.toLowerCase())) {\n          this.uppy.log(`[CompanionClient] excluding disallowed header ${header}`);\n          delete headers[header]; // eslint-disable-line no-param-reassign\n        }\n      });\n      return headers;\n    });\n  }\n\n  get(path, skipPostResponse) {\n    const method = 'get';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin'\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n  post(path, data, skipPostResponse) {\n    const method = 'post';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin',\n      body: JSON.stringify(data)\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n  delete(path, data, skipPostResponse) {\n    const method = 'delete';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(`${this.hostname}/${path}`, {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin',\n      body: data ? JSON.stringify(data) : null\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n}), _class.VERSION = \"2.0.5\", _class.defaultHeaders = {\n  Accept: 'application/json',\n  'Content-Type': 'application/json',\n  'Uppy-Versions': `@uppy/companion-client=${_class.VERSION}`\n}, _temp);\n\nfunction _getUrl2(url) {\n  if (/^(https?:|)\\/\\//.test(url)) {\n    return url;\n  }\n\n  return `${this.hostname}/${url}`;\n}\n\nfunction _errorHandler2(method, path) {\n  return err => {\n    var _err;\n\n    if (!((_err = err) != null && _err.isAuthError)) {\n      const error = new Error(`Could not ${method} ${_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path)}`);\n      error.cause = err;\n      err = error; // eslint-disable-line no-param-reassign\n    }\n\n    return Promise.reject(err);\n  };\n}", "'use strict';\n/**\n * This module serves as an Async wrapper for LocalStorage\n */\n\nmodule.exports.setItem = (key, value) => {\n  return new Promise(resolve => {\n    localStorage.setItem(key, value);\n    resolve();\n  });\n};\n\nmodule.exports.getItem = key => {\n  return Promise.resolve(localStorage.getItem(key));\n};\n\nmodule.exports.removeItem = key => {\n  return new Promise(resolve => {\n    localStorage.removeItem(key);\n    resolve();\n  });\n};", "'use strict';\n\nconst RequestClient = require('./RequestClient');\n\nconst tokenStorage = require('./tokenStorage');\n\nconst getName = id => {\n  return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nmodule.exports = class Provider extends RequestClient {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.provider = opts.provider;\n    this.id = this.provider;\n    this.name = this.opts.name || getName(this.id);\n    this.pluginId = this.opts.pluginId;\n    this.tokenKey = `companion-${this.pluginId}-auth-token`;\n    this.companionKeysParams = this.opts.companionKeysParams;\n    this.preAuthToken = null;\n  }\n\n  headers() {\n    return Promise.all([super.headers(), this.getAuthToken()]).then(_ref => {\n      let [headers, token] = _ref;\n      const authHeaders = {};\n\n      if (token) {\n        authHeaders['uppy-auth-token'] = token;\n      }\n\n      if (this.companionKeysParams) {\n        authHeaders['uppy-credentials-params'] = btoa(JSON.stringify({\n          params: this.companionKeysParams\n        }));\n      }\n\n      return { ...headers,\n        ...authHeaders\n      };\n    });\n  }\n\n  onReceiveResponse(response) {\n    response = super.onReceiveResponse(response);\n    const plugin = this.uppy.getPlugin(this.pluginId);\n    const oldAuthenticated = plugin.getPluginState().authenticated;\n    const authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400;\n    plugin.setPluginState({\n      authenticated\n    });\n    return response;\n  }\n\n  setAuthToken(token) {\n    return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey, token);\n  }\n\n  getAuthToken() {\n    return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey);\n  }\n  /**\n   * Ensure we have a preauth token if necessary. Attempts to fetch one if we don't,\n   * or rejects if loading one fails.\n   */\n\n\n  async ensurePreAuth() {\n    if (this.companionKeysParams && !this.preAuthToken) {\n      await this.fetchPreAuthToken();\n\n      if (!this.preAuthToken) {\n        throw new Error('Could not load authentication data required for third-party login. Please try again later.');\n      }\n    }\n  }\n\n  authUrl(queries) {\n    if (queries === void 0) {\n      queries = {};\n    }\n\n    const params = new URLSearchParams(queries);\n\n    if (this.preAuthToken) {\n      params.set('uppyPreAuthToken', this.preAuthToken);\n    }\n\n    return `${this.hostname}/${this.id}/connect?${params}`;\n  }\n\n  fileUrl(id) {\n    return `${this.hostname}/${this.id}/get/${id}`;\n  }\n\n  async fetchPreAuthToken() {\n    if (!this.companionKeysParams) {\n      return;\n    }\n\n    try {\n      const res = await this.post(`${this.id}/preauth/`, {\n        params: this.companionKeysParams\n      });\n      this.preAuthToken = res.token;\n    } catch (err) {\n      this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${err}`, 'warning');\n    }\n  }\n\n  list(directory) {\n    return this.get(`${this.id}/list/${directory || ''}`);\n  }\n\n  logout() {\n    return this.get(`${this.id}/logout`).then(response => Promise.all([response, this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(_ref2 => {\n      let [response] = _ref2;\n      return response;\n    });\n  }\n\n  static initPlugin(plugin, opts, defaultOpts) {\n    plugin.type = 'acquirer';\n    plugin.files = [];\n\n    if (defaultOpts) {\n      plugin.opts = { ...defaultOpts,\n        ...opts\n      };\n    }\n\n    if (opts.serverUrl || opts.serverPattern) {\n      throw new Error('`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`');\n    }\n\n    if (opts.companionAllowedHosts) {\n      const pattern = opts.companionAllowedHosts; // validate companionAllowedHosts param\n\n      if (typeof pattern !== 'string' && !Array.isArray(pattern) && !(pattern instanceof RegExp)) {\n        throw new TypeError(`${plugin.id}: the option \"companionAllowedHosts\" must be one of string, Array, RegExp`);\n      }\n\n      plugin.opts.companionAllowedHosts = pattern;\n    } else if (/^(?!https?:\\/\\/).*$/i.test(opts.companionUrl)) {\n      // does not start with https://\n      plugin.opts.companionAllowedHosts = `https://${opts.companionUrl.replace(/^\\/\\//, '')}`;\n    } else {\n      plugin.opts.companionAllowedHosts = new URL(opts.companionUrl).origin;\n    }\n\n    plugin.storage = plugin.opts.storage || tokenStorage;\n  }\n\n};", "'use strict';\n\nconst RequestClient = require('./RequestClient');\n\nconst getName = id => {\n  return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nmodule.exports = class SearchProvider extends RequestClient {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.provider = opts.provider;\n    this.id = this.provider;\n    this.name = this.opts.name || getName(this.id);\n    this.pluginId = this.opts.pluginId;\n  }\n\n  fileUrl(id) {\n    return `${this.hostname}/search/${this.id}/get/${id}`;\n  }\n\n  search(text, queries) {\n    queries = queries ? `&${queries}` : '';\n    return this.get(`search/${this.id}/list?q=${encodeURIComponent(text)}${queries}`);\n  }\n\n};", "var _queued, _emitter, _isOpen, _socket, _handleMessage;\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst ee = require('namespace-emitter');\n\nmodule.exports = (_queued = /*#__PURE__*/_classPrivateFieldLooseKey(\"queued\"), _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\"), _isOpen = /*#__PURE__*/_classPrivateFieldLooseKey(\"isOpen\"), _socket = /*#__PURE__*/_classPrivateFieldLooseKey(\"socket\"), _handleMessage = /*#__PURE__*/_classPrivateFieldLooseKey(\"handleMessage\"), _Symbol$for = Symbol.for('uppy test: getSocket'), _Symbol$for2 = Symbol.for('uppy test: getQueued'), class UppySocket {\n  constructor(opts) {\n    Object.defineProperty(this, _queued, {\n      writable: true,\n      value: []\n    });\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: ee()\n    });\n    Object.defineProperty(this, _isOpen, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _socket, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _handleMessage, {\n      writable: true,\n      value: e => {\n        try {\n          const message = JSON.parse(e.data);\n          this.emit(message.action, message.payload);\n        } catch (err) {\n          // TODO: use a more robust error handler.\n          console.log(err); // eslint-disable-line no-console\n        }\n      }\n    });\n    this.opts = opts;\n\n    if (!opts || opts.autoOpen !== false) {\n      this.open();\n    }\n  }\n\n  get isOpen() {\n    return _classPrivateFieldLooseBase(this, _isOpen)[_isOpen];\n  }\n\n  [_Symbol$for]() {\n    return _classPrivateFieldLooseBase(this, _socket)[_socket];\n  }\n\n  [_Symbol$for2]() {\n    return _classPrivateFieldLooseBase(this, _queued)[_queued];\n  }\n\n  open() {\n    _classPrivateFieldLooseBase(this, _socket)[_socket] = new WebSocket(this.opts.target);\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onopen = () => {\n      _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = true;\n\n      while (_classPrivateFieldLooseBase(this, _queued)[_queued].length > 0 && _classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n        const first = _classPrivateFieldLooseBase(this, _queued)[_queued].shift();\n\n        this.send(first.action, first.payload);\n      }\n    };\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onclose = () => {\n      _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = false;\n    };\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onmessage = _classPrivateFieldLooseBase(this, _handleMessage)[_handleMessage];\n  }\n\n  close() {\n    var _classPrivateFieldLoo;\n\n    (_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _socket)[_socket]) == null ? void 0 : _classPrivateFieldLoo.close();\n  }\n\n  send(action, payload) {\n    // attach uuid\n    if (!_classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n      _classPrivateFieldLooseBase(this, _queued)[_queued].push({\n        action,\n        payload\n      });\n\n      return;\n    }\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].send(JSON.stringify({\n      action,\n      payload\n    }));\n  }\n\n  on(action, handler) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(action, handler);\n  }\n\n  emit(action, payload) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(action, payload);\n  }\n\n  once(action, handler) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(action, handler);\n  }\n\n});", "'use strict';\n/**\n * Manages communications with Companion\n */\n\nconst RequestClient = require('./RequestClient');\n\nconst Provider = require('./Provider');\n\nconst SearchProvider = require('./SearchProvider');\n\nconst Socket = require('./Socket');\n\nmodule.exports = {\n  RequestClient,\n  Provider,\n  SearchProvider,\n  Socket\n};", "\"use strict\";\n\nvar _emitter, _events;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\n/**\n * Create a wrapper around an event emitter with a `remove` method to remove\n * all events that were added using the wrapped emitter.\n */\nmodule.exports = (_emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\"), _events = /*#__PURE__*/_classPrivateFieldLooseKey(\"events\"), class EventTracker {\n  constructor(emitter) {\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _events, {\n      writable: true,\n      value: []\n    });\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter] = emitter;\n  }\n\n  on(event, fn) {\n    _classPrivateFieldLooseBase(this, _events)[_events].push([event, fn]);\n\n    return _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, fn);\n  }\n\n  remove() {\n    for (const [event, fn] of _classPrivateFieldLooseBase(this, _events)[_events].splice(0)) {\n      _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, fn);\n    }\n  }\n\n});", "\"use strict\";\n\nconst throttle = require('lodash.throttle');\n\nfunction emitSocketProgress(uploader, progressData, file) {\n  const {\n    progress,\n    bytesUploaded,\n    bytesTotal\n  } = progressData;\n\n  if (progress) {\n    uploader.uppy.log(`Upload progress: ${progress}`);\n    uploader.uppy.emit('upload-progress', file, {\n      uploader,\n      bytesUploaded,\n      bytesTotal\n    });\n  }\n}\n\nmodule.exports = throttle(emitSocketProgress, 300, {\n  leading: true,\n  trailing: true\n});", "\"use strict\";\n\nmodule.exports = function getSocketHost(url) {\n  // get the host domain\n  const regex = /^(?:https?:\\/\\/|\\/\\/)?(?:[^@\\n]+@)?(?:www\\.)?([^\\n]+)/i;\n  const host = regex.exec(url)[1];\n  const socketProtocol = /^http:\\/\\//i.test(url) ? 'ws' : 'wss';\n  return `${socketProtocol}://${host}`;\n};", "\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nfunction createCancelError() {\n  return new Error('Cancelled');\n}\n\nvar _activeRequests = /*#__PURE__*/_classPrivateFieldLooseKey(\"activeRequests\");\n\nvar _queuedHandlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"queuedHandlers\");\n\nvar _paused = /*#__PURE__*/_classPrivateFieldLooseKey(\"paused\");\n\nvar _pauseTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"pauseTimer\");\n\nvar _downLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"downLimit\");\n\nvar _upperLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"upperLimit\");\n\nvar _rateLimitingTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"rateLimitingTimer\");\n\nvar _call = /*#__PURE__*/_classPrivateFieldLooseKey(\"call\");\n\nvar _queueNext = /*#__PURE__*/_classPrivateFieldLooseKey(\"queueNext\");\n\nvar _next = /*#__PURE__*/_classPrivateFieldLooseKey(\"next\");\n\nvar _queue = /*#__PURE__*/_classPrivateFieldLooseKey(\"queue\");\n\nvar _dequeue = /*#__PURE__*/_classPrivateFieldLooseKey(\"dequeue\");\n\nvar _resume = /*#__PURE__*/_classPrivateFieldLooseKey(\"resume\");\n\nvar _increaseLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"increaseLimit\");\n\nclass RateLimitedQueue {\n  constructor(limit) {\n    Object.defineProperty(this, _dequeue, {\n      value: _dequeue2\n    });\n    Object.defineProperty(this, _queue, {\n      value: _queue2\n    });\n    Object.defineProperty(this, _next, {\n      value: _next2\n    });\n    Object.defineProperty(this, _queueNext, {\n      value: _queueNext2\n    });\n    Object.defineProperty(this, _call, {\n      value: _call2\n    });\n    Object.defineProperty(this, _activeRequests, {\n      writable: true,\n      value: 0\n    });\n    Object.defineProperty(this, _queuedHandlers, {\n      writable: true,\n      value: []\n    });\n    Object.defineProperty(this, _paused, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _pauseTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _downLimit, {\n      writable: true,\n      value: 1\n    });\n    Object.defineProperty(this, _upperLimit, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _rateLimitingTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _resume, {\n      writable: true,\n      value: () => this.resume()\n    });\n    Object.defineProperty(this, _increaseLimit, {\n      writable: true,\n      value: () => {\n        if (_classPrivateFieldLooseBase(this, _paused)[_paused]) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 0);\n          return;\n        }\n\n        _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = this.limit;\n        this.limit = Math.ceil((_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] + _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]) / 2);\n\n        for (let i = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]; i <= this.limit; i++) {\n          _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n        }\n\n        if (_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] - _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] > 3) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 2000);\n        } else {\n          _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = Math.floor(_classPrivateFieldLooseBase(this, _downLimit)[_downLimit] / 2);\n        }\n      }\n    });\n\n    if (typeof limit !== 'number' || limit === 0) {\n      this.limit = Infinity;\n    } else {\n      this.limit = limit;\n    }\n  }\n\n  run(fn, queueOptions) {\n    if (!_classPrivateFieldLooseBase(this, _paused)[_paused] && _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] < this.limit) {\n      return _classPrivateFieldLooseBase(this, _call)[_call](fn);\n    }\n\n    return _classPrivateFieldLooseBase(this, _queue)[_queue](fn, queueOptions);\n  }\n\n  wrapPromiseFunction(fn, queueOptions) {\n    var _this = this;\n\n    return function () {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      let queuedRequest;\n      const outerPromise = new Promise((resolve, reject) => {\n        queuedRequest = _this.run(() => {\n          let cancelError;\n          let innerPromise;\n\n          try {\n            innerPromise = Promise.resolve(fn(...args));\n          } catch (err) {\n            innerPromise = Promise.reject(err);\n          }\n\n          innerPromise.then(result => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              resolve(result);\n            }\n          }, err => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              reject(err);\n            }\n          });\n          return () => {\n            cancelError = createCancelError();\n          };\n        }, queueOptions);\n      });\n\n      outerPromise.abort = () => {\n        queuedRequest.abort();\n      };\n\n      return outerPromise;\n    };\n  }\n\n  resume() {\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = false;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n    for (let i = 0; i < this.limit; i++) {\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  }\n\n  /**\n   * Freezes the queue for a while or indefinitely.\n   *\n   * @param {number | null } [duration] Duration for the pause to happen, in milliseconds.\n   *                                    If omitted, the queue won't resume automatically.\n   */\n  pause(duration) {\n    if (duration === void 0) {\n      duration = null;\n    }\n\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = true;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n    if (duration != null) {\n      _classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer] = setTimeout(_classPrivateFieldLooseBase(this, _resume)[_resume], duration);\n    }\n  }\n  /**\n   * Pauses the queue for a duration, and lower the limit of concurrent requests\n   * when the queue resumes. When the queue resumes, it tries to progressively\n   * increase the limit in `this.#increaseLimit` until another call is made to\n   * `this.rateLimit`.\n   * Call this function when using the RateLimitedQueue for network requests and\n   * the remote server responds with 429 HTTP code.\n   *\n   * @param {number} duration in milliseconds.\n   */\n\n\n  rateLimit(duration) {\n    clearTimeout(_classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer]);\n    this.pause(duration);\n\n    if (this.limit > 1 && Number.isFinite(this.limit)) {\n      _classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] = this.limit - 1;\n      this.limit = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit];\n      _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], duration);\n    }\n  }\n\n  get isPaused() {\n    return _classPrivateFieldLooseBase(this, _paused)[_paused];\n  }\n\n}\n\nfunction _call2(fn) {\n  _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] += 1;\n  let done = false;\n  let cancelActive;\n\n  try {\n    cancelActive = fn();\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n    throw err;\n  }\n\n  return {\n    abort: () => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n      cancelActive();\n\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    },\n    done: () => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  };\n}\n\nfunction _queueNext2() {\n  // Do it soon but not immediately, this allows clearing out the entire queue synchronously\n  // one by one without continuously _advancing_ it (and starting new tasks before immediately\n  // aborting them)\n  queueMicrotask(() => _classPrivateFieldLooseBase(this, _next)[_next]());\n}\n\nfunction _next2() {\n  if (_classPrivateFieldLooseBase(this, _paused)[_paused] || _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] >= this.limit) {\n    return;\n  }\n\n  if (_classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].length === 0) {\n    return;\n  } // Dispatch the next request, and update the abort/done handlers\n  // so that cancelling it does the Right Thing (and doesn't just try\n  // to dequeue an already-running request).\n\n\n  const next = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].shift();\n\n  const handler = _classPrivateFieldLooseBase(this, _call)[_call](next.fn);\n\n  next.abort = handler.abort;\n  next.done = handler.done;\n}\n\nfunction _queue2(fn, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  const handler = {\n    fn,\n    priority: options.priority || 0,\n    abort: () => {\n      _classPrivateFieldLooseBase(this, _dequeue)[_dequeue](handler);\n    },\n    done: () => {\n      throw new Error('Cannot mark a queued request as done: this indicates a bug');\n    }\n  };\n\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].findIndex(other => {\n    return handler.priority > other.priority;\n  });\n\n  if (index === -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].push(handler);\n  } else {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 0, handler);\n  }\n\n  return handler;\n}\n\nfunction _dequeue2(handler) {\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].indexOf(handler);\n\n  if (index !== -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 1);\n  }\n}\n\nmodule.exports = {\n  RateLimitedQueue,\n  internalRateLimitedQueue: Symbol('__queue')\n};", "\"use strict\";\n\n/**\n * Little AbortController proxy module so we can swap out the implementation easily later.\n */\nexports.AbortController = globalThis.AbortController;\nexports.AbortSignal = globalThis.AbortSignal;\n\nexports.createAbortError = function (message) {\n  if (message === void 0) {\n    message = 'Aborted';\n  }\n\n  return new DOMException(message, 'AbortError');\n};", "\"use strict\";\n\nconst {\n  createAbortError\n} = require('./AbortController');\n/**\n * Return a Promise that resolves after `ms` milliseconds.\n *\n * @param {number} ms - Number of milliseconds to wait.\n * @param {{ signal?: AbortSignal }} [opts] - An abort signal that can be used to cancel the delay early.\n * @returns {Promise<void>} A Promise that resolves after the given amount of `ms`.\n */\n\n\nmodule.exports = function delay(ms, opts) {\n  return new Promise((resolve, reject) => {\n    var _opts$signal, _opts$signal2;\n\n    if (opts != null && (_opts$signal = opts.signal) != null && _opts$signal.aborted) {\n      return reject(createAbortError());\n    }\n\n    const timeout = setTimeout(() => {\n      cleanup(); // eslint-disable-line no-use-before-define\n\n      resolve();\n    }, ms);\n\n    function onabort() {\n      clearTimeout(timeout);\n      cleanup(); // eslint-disable-line no-use-before-define\n\n      reject(createAbortError());\n    }\n\n    opts == null ? void 0 : (_opts$signal2 = opts.signal) == null ? void 0 : _opts$signal2.addEventListener('abort', onabort);\n\n    function cleanup() {\n      var _opts$signal3;\n\n      opts == null ? void 0 : (_opts$signal3 = opts.signal) == null ? void 0 : _opts$signal3.removeEventListener('abort', onabort);\n    }\n\n    return undefined;\n  });\n};", "function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst {\n  AbortController,\n  createAbortError\n} = require('@uppy/utils/lib/AbortController');\n\nconst delay = require('@uppy/utils/lib/delay');\n\nconst MB = 1024 * 1024;\nconst defaultOptions = {\n  limit: 1,\n  retryDelays: [0, 1000, 3000, 5000],\n\n  getChunkSize(file) {\n    return Math.ceil(file.size / 10000);\n  },\n\n  onStart() {},\n\n  onProgress() {},\n\n  onPartComplete() {},\n\n  onSuccess() {},\n\n  onError(err) {\n    throw err;\n  }\n\n};\n\nfunction ensureInt(value) {\n  if (typeof value === 'string') {\n    return parseInt(value, 10);\n  }\n\n  if (typeof value === 'number') {\n    return value;\n  }\n\n  throw new TypeError('Expected a number');\n}\n\nvar _aborted = /*#__PURE__*/_classPrivateFieldLooseKey(\"aborted\");\n\nvar _initChunks = /*#__PURE__*/_classPrivateFieldLooseKey(\"initChunks\");\n\nvar _createUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"createUpload\");\n\nvar _resumeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"resumeUpload\");\n\nvar _uploadParts = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadParts\");\n\nvar _retryable = /*#__PURE__*/_classPrivateFieldLooseKey(\"retryable\");\n\nvar _prepareUploadParts = /*#__PURE__*/_classPrivateFieldLooseKey(\"prepareUploadParts\");\n\nvar _uploadPartRetryable = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadPartRetryable\");\n\nvar _uploadPart = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadPart\");\n\nvar _onPartProgress = /*#__PURE__*/_classPrivateFieldLooseKey(\"onPartProgress\");\n\nvar _onPartComplete = /*#__PURE__*/_classPrivateFieldLooseKey(\"onPartComplete\");\n\nvar _uploadPartBytes = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploadPartBytes\");\n\nvar _completeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"completeUpload\");\n\nvar _abortUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"abortUpload\");\n\nvar _onError = /*#__PURE__*/_classPrivateFieldLooseKey(\"onError\");\n\nclass MultipartUploader {\n  constructor(file, options) {\n    Object.defineProperty(this, _onError, {\n      value: _onError2\n    });\n    Object.defineProperty(this, _abortUpload, {\n      value: _abortUpload2\n    });\n    Object.defineProperty(this, _completeUpload, {\n      value: _completeUpload2\n    });\n    Object.defineProperty(this, _uploadPartBytes, {\n      value: _uploadPartBytes2\n    });\n    Object.defineProperty(this, _onPartComplete, {\n      value: _onPartComplete2\n    });\n    Object.defineProperty(this, _onPartProgress, {\n      value: _onPartProgress2\n    });\n    Object.defineProperty(this, _uploadPart, {\n      value: _uploadPart2\n    });\n    Object.defineProperty(this, _uploadPartRetryable, {\n      value: _uploadPartRetryable2\n    });\n    Object.defineProperty(this, _prepareUploadParts, {\n      value: _prepareUploadParts2\n    });\n    Object.defineProperty(this, _retryable, {\n      value: _retryable2\n    });\n    Object.defineProperty(this, _uploadParts, {\n      value: _uploadParts2\n    });\n    Object.defineProperty(this, _resumeUpload, {\n      value: _resumeUpload2\n    });\n    Object.defineProperty(this, _createUpload, {\n      value: _createUpload2\n    });\n    Object.defineProperty(this, _initChunks, {\n      value: _initChunks2\n    });\n    Object.defineProperty(this, _aborted, {\n      value: _aborted2\n    });\n    this.options = { ...defaultOptions,\n      ...options\n    }; // Use default `getChunkSize` if it was null or something\n\n    if (!this.options.getChunkSize) {\n      this.options.getChunkSize = defaultOptions.getChunkSize;\n    }\n\n    this.file = file;\n    this.abortController = new AbortController();\n    this.key = this.options.key || null;\n    this.uploadId = this.options.uploadId || null;\n    this.parts = []; // Do `this.createdPromise.then(OP)` to execute an operation `OP` _only_ if the\n    // upload was created already. That also ensures that the sequencing is right\n    // (so the `OP` definitely happens if the upload is created).\n    //\n    // This mostly exists to make `#abortUpload` work well: only sending the abort request if\n    // the upload was already created, and if the createMultipartUpload request is still in flight,\n    // aborting it immediately after it finishes.\n\n    this.createdPromise = Promise.reject(); // eslint-disable-line prefer-promise-reject-errors\n\n    this.isPaused = false;\n    this.partsInProgress = 0;\n    this.chunks = null;\n    this.chunkState = null;\n\n    _classPrivateFieldLooseBase(this, _initChunks)[_initChunks]();\n\n    this.createdPromise.catch(() => {}); // silence uncaught rejection warning\n  }\n  /**\n   * Was this upload aborted?\n   *\n   * If yes, we may need to throw an AbortError.\n   *\n   * @returns {boolean}\n   */\n\n\n  start() {\n    this.isPaused = false;\n\n    if (this.uploadId) {\n      _classPrivateFieldLooseBase(this, _resumeUpload)[_resumeUpload]();\n    } else {\n      _classPrivateFieldLooseBase(this, _createUpload)[_createUpload]();\n    }\n  }\n\n  pause() {\n    this.abortController.abort(); // Swap it out for a new controller, because this instance may be resumed later.\n\n    this.abortController = new AbortController();\n    this.isPaused = true;\n  }\n\n  abort(opts) {\n    var _opts;\n\n    if (opts === void 0) {\n      opts = undefined;\n    }\n\n    if ((_opts = opts) != null && _opts.really) _classPrivateFieldLooseBase(this, _abortUpload)[_abortUpload]();else this.pause();\n  }\n\n}\n\nfunction _aborted2() {\n  return this.abortController.signal.aborted;\n}\n\nfunction _initChunks2() {\n  const chunks = [];\n  const desiredChunkSize = this.options.getChunkSize(this.file); // at least 5MB per request, at most 10k requests\n\n  const minChunkSize = Math.max(5 * MB, Math.ceil(this.file.size / 10000));\n  const chunkSize = Math.max(desiredChunkSize, minChunkSize); // Upload zero-sized files in one zero-sized chunk\n\n  if (this.file.size === 0) {\n    chunks.push(this.file);\n  } else {\n    for (let i = 0; i < this.file.size; i += chunkSize) {\n      const end = Math.min(this.file.size, i + chunkSize);\n      chunks.push(this.file.slice(i, end));\n    }\n  }\n\n  this.chunks = chunks;\n  this.chunkState = chunks.map(() => ({\n    uploaded: 0,\n    busy: false,\n    done: false\n  }));\n}\n\nfunction _createUpload2() {\n  this.createdPromise = Promise.resolve().then(() => this.options.createMultipartUpload());\n  return this.createdPromise.then(result => {\n    if (_classPrivateFieldLooseBase(this, _aborted)[_aborted]()) throw createAbortError();\n    const valid = typeof result === 'object' && result && typeof result.uploadId === 'string' && typeof result.key === 'string';\n\n    if (!valid) {\n      throw new TypeError('AwsS3/Multipart: Got incorrect result from `createMultipartUpload()`, expected an object `{ uploadId, key }`.');\n    }\n\n    this.key = result.key;\n    this.uploadId = result.uploadId;\n    this.options.onStart(result);\n\n    _classPrivateFieldLooseBase(this, _uploadParts)[_uploadParts]();\n  }).catch(err => {\n    _classPrivateFieldLooseBase(this, _onError)[_onError](err);\n  });\n}\n\nasync function _resumeUpload2() {\n  try {\n    const parts = await this.options.listParts({\n      uploadId: this.uploadId,\n      key: this.key\n    });\n    if (_classPrivateFieldLooseBase(this, _aborted)[_aborted]()) throw createAbortError();\n    parts.forEach(part => {\n      const i = part.PartNumber - 1;\n      this.chunkState[i] = {\n        uploaded: ensureInt(part.Size),\n        etag: part.ETag,\n        done: true\n      }; // Only add if we did not yet know about this part.\n\n      if (!this.parts.some(p => p.PartNumber === part.PartNumber)) {\n        this.parts.push({\n          PartNumber: part.PartNumber,\n          ETag: part.ETag\n        });\n      }\n    });\n\n    _classPrivateFieldLooseBase(this, _uploadParts)[_uploadParts]();\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _onError)[_onError](err);\n  }\n}\n\nfunction _uploadParts2() {\n  if (this.isPaused) return; // All parts are uploaded.\n\n  if (this.chunkState.every(state => state.done)) {\n    _classPrivateFieldLooseBase(this, _completeUpload)[_completeUpload]();\n\n    return;\n  } // For a 100MB file, with the default min chunk size of 5MB and a limit of 10:\n  //\n  // Total 20 parts\n  // ---------\n  // Need 1 is 10\n  // Need 2 is 5\n  // Need 3 is 5\n\n\n  const need = this.options.limit - this.partsInProgress;\n  const completeChunks = this.chunkState.filter(state => state.done).length;\n  const remainingChunks = this.chunks.length - completeChunks;\n  let minNeeded = Math.ceil(this.options.limit / 2);\n\n  if (minNeeded > remainingChunks) {\n    minNeeded = remainingChunks;\n  }\n\n  if (need < minNeeded) return;\n  const candidates = [];\n\n  for (let i = 0; i < this.chunkState.length; i++) {\n    const state = this.chunkState[i]; // eslint-disable-next-line no-continue\n\n    if (state.done || state.busy) continue;\n    candidates.push(i);\n\n    if (candidates.length >= need) {\n      break;\n    }\n  }\n\n  if (candidates.length === 0) return;\n\n  _classPrivateFieldLooseBase(this, _prepareUploadParts)[_prepareUploadParts](candidates).then(result => {\n    candidates.forEach(index => {\n      const partNumber = index + 1;\n      const prePreparedPart = {\n        url: result.presignedUrls[partNumber],\n        headers: result.headers\n      };\n\n      _classPrivateFieldLooseBase(this, _uploadPartRetryable)[_uploadPartRetryable](index, prePreparedPart).then(() => {\n        _classPrivateFieldLooseBase(this, _uploadParts)[_uploadParts]();\n      }, err => {\n        _classPrivateFieldLooseBase(this, _onError)[_onError](err);\n      });\n    });\n  });\n}\n\nfunction _retryable2(_ref) {\n  let {\n    before,\n    attempt,\n    after\n  } = _ref;\n  const {\n    retryDelays\n  } = this.options;\n  const {\n    signal\n  } = this.abortController;\n  if (before) before();\n\n  function shouldRetry(err) {\n    if (err.source && typeof err.source.status === 'number') {\n      const {\n        status\n      } = err.source; // 0 probably indicates network failure\n\n      return status === 0 || status === 409 || status === 423 || status >= 500 && status < 600;\n    }\n\n    return false;\n  }\n\n  const doAttempt = retryAttempt => attempt().catch(err => {\n    if (_classPrivateFieldLooseBase(this, _aborted)[_aborted]()) throw createAbortError();\n\n    if (shouldRetry(err) && retryAttempt < retryDelays.length) {\n      return delay(retryDelays[retryAttempt], {\n        signal\n      }).then(() => doAttempt(retryAttempt + 1));\n    }\n\n    throw err;\n  });\n\n  return doAttempt(0).then(result => {\n    if (after) after();\n    return result;\n  }, err => {\n    if (after) after();\n    throw err;\n  });\n}\n\nasync function _prepareUploadParts2(candidates) {\n  candidates.forEach(i => {\n    this.chunkState[i].busy = true;\n  });\n  const result = await _classPrivateFieldLooseBase(this, _retryable)[_retryable]({\n    attempt: () => this.options.prepareUploadParts({\n      key: this.key,\n      uploadId: this.uploadId,\n      partNumbers: candidates.map(index => index + 1),\n      chunks: candidates.reduce((chunks, candidate) => ({ ...chunks,\n        // Use the part number as the index\n        [candidate + 1]: this.chunks[candidate]\n      }), {})\n    })\n  });\n\n  if (typeof (result == null ? void 0 : result.presignedUrls) !== 'object') {\n    throw new TypeError('AwsS3/Multipart: Got incorrect result from `prepareUploadParts()`, expected an object `{ presignedUrls }`.');\n  }\n\n  return result;\n}\n\nfunction _uploadPartRetryable2(index, prePreparedPart) {\n  return _classPrivateFieldLooseBase(this, _retryable)[_retryable]({\n    before: () => {\n      this.partsInProgress += 1;\n    },\n    attempt: () => _classPrivateFieldLooseBase(this, _uploadPart)[_uploadPart](index, prePreparedPart),\n    after: () => {\n      this.partsInProgress -= 1;\n    }\n  });\n}\n\nfunction _uploadPart2(index, prePreparedPart) {\n  this.chunkState[index].busy = true;\n  const valid = typeof (prePreparedPart == null ? void 0 : prePreparedPart.url) === 'string';\n\n  if (!valid) {\n    throw new TypeError('AwsS3/Multipart: Got incorrect result for `prePreparedPart`, expected an object `{ url }`.');\n  }\n\n  const {\n    url,\n    headers\n  } = prePreparedPart;\n\n  if (_classPrivateFieldLooseBase(this, _aborted)[_aborted]()) {\n    this.chunkState[index].busy = false;\n    throw createAbortError();\n  }\n\n  return _classPrivateFieldLooseBase(this, _uploadPartBytes)[_uploadPartBytes](index, url, headers);\n}\n\nfunction _onPartProgress2(index, sent) {\n  this.chunkState[index].uploaded = ensureInt(sent);\n  const totalUploaded = this.chunkState.reduce((n, c) => n + c.uploaded, 0);\n  this.options.onProgress(totalUploaded, this.file.size);\n}\n\nfunction _onPartComplete2(index, etag) {\n  this.chunkState[index].etag = etag;\n  this.chunkState[index].done = true;\n  const part = {\n    PartNumber: index + 1,\n    ETag: etag\n  };\n  this.parts.push(part);\n  this.options.onPartComplete(part);\n}\n\nfunction _uploadPartBytes2(index, url, headers) {\n  const body = this.chunks[index];\n  const {\n    signal\n  } = this.abortController;\n  let defer;\n  const promise = new Promise((resolve, reject) => {\n    defer = {\n      resolve,\n      reject\n    };\n  });\n  const xhr = new XMLHttpRequest();\n  xhr.open('PUT', url, true);\n\n  if (headers) {\n    Object.keys(headers).forEach(key => {\n      xhr.setRequestHeader(key, headers[key]);\n    });\n  }\n\n  xhr.responseType = 'text';\n\n  function cleanup() {\n    // eslint-disable-next-line no-use-before-define\n    signal.removeEventListener('abort', onabort);\n  }\n\n  function onabort() {\n    xhr.abort();\n  }\n\n  signal.addEventListener('abort', onabort);\n  xhr.upload.addEventListener('progress', ev => {\n    if (!ev.lengthComputable) return;\n\n    _classPrivateFieldLooseBase(this, _onPartProgress)[_onPartProgress](index, ev.loaded, ev.total);\n  });\n  xhr.addEventListener('abort', () => {\n    cleanup();\n    this.chunkState[index].busy = false;\n    defer.reject(createAbortError());\n  });\n  xhr.addEventListener('load', ev => {\n    cleanup();\n    this.chunkState[index].busy = false;\n\n    if (ev.target.status < 200 || ev.target.status >= 300) {\n      const error = new Error('Non 2xx');\n      error.source = ev.target;\n      defer.reject(error);\n      return;\n    } // This avoids the net::ERR_OUT_OF_MEMORY in Chromium Browsers.\n\n\n    this.chunks[index] = null;\n\n    _classPrivateFieldLooseBase(this, _onPartProgress)[_onPartProgress](index, body.size, body.size); // NOTE This must be allowed by CORS.\n\n\n    const etag = ev.target.getResponseHeader('ETag');\n\n    if (etag === null) {\n      defer.reject(new Error('AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.'));\n      return;\n    }\n\n    _classPrivateFieldLooseBase(this, _onPartComplete)[_onPartComplete](index, etag);\n\n    defer.resolve();\n  });\n  xhr.addEventListener('error', ev => {\n    cleanup();\n    this.chunkState[index].busy = false;\n    const error = new Error('Unknown error');\n    error.source = ev.target;\n    defer.reject(error);\n  });\n  xhr.send(body);\n  return promise;\n}\n\nasync function _completeUpload2() {\n  // Parts may not have completed uploading in sorted order, if limit > 1.\n  this.parts.sort((a, b) => a.PartNumber - b.PartNumber);\n\n  try {\n    const result = await this.options.completeMultipartUpload({\n      key: this.key,\n      uploadId: this.uploadId,\n      parts: this.parts\n    });\n    this.options.onSuccess(result);\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _onError)[_onError](err);\n  }\n}\n\nfunction _abortUpload2() {\n  this.abortController.abort();\n  this.createdPromise.then(() => {\n    this.options.abortMultipartUpload({\n      key: this.key,\n      uploadId: this.uploadId\n    });\n  }, () => {// if the creation failed we do not need to abort\n  });\n}\n\nfunction _onError2(err) {\n  if (err && err.name === 'AbortError') {\n    return;\n  }\n\n  this.options.onError(err);\n}\n\nmodule.exports = MultipartUploader;", "var _class, _temp;\n\nconst BasePlugin = require('@uppy/core/lib/BasePlugin');\n\nconst {\n  Socket,\n  Provider,\n  RequestClient\n} = require('@uppy/companion-client');\n\nconst EventTracker = require('@uppy/utils/lib/EventTracker');\n\nconst emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress');\n\nconst getSocketHost = require('@uppy/utils/lib/getSocketHost');\n\nconst {\n  RateLimitedQueue\n} = require('@uppy/utils/lib/RateLimitedQueue');\n\nconst MultipartUploader = require('./MultipartUploader');\n\nfunction assertServerError(res) {\n  if (res && res.error) {\n    const error = new Error(res.message);\n    Object.assign(error, res.error);\n    throw error;\n  }\n\n  return res;\n}\n\nmodule.exports = (_temp = _class = class AwsS3Multipart extends BasePlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.type = 'uploader';\n    this.id = this.opts.id || 'AwsS3Multipart';\n    this.title = 'AWS S3 Multipart';\n    this.client = new RequestClient(uppy, opts);\n    const defaultOptions = {\n      timeout: 30 * 1000,\n      limit: 0,\n      retryDelays: [0, 1000, 3000, 5000],\n      createMultipartUpload: this.createMultipartUpload.bind(this),\n      listParts: this.listParts.bind(this),\n      prepareUploadParts: this.prepareUploadParts.bind(this),\n      abortMultipartUpload: this.abortMultipartUpload.bind(this),\n      completeMultipartUpload: this.completeMultipartUpload.bind(this)\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.upload = this.upload.bind(this);\n    this.requests = new RateLimitedQueue(this.opts.limit);\n    this.uploaders = Object.create(null);\n    this.uploaderEvents = Object.create(null);\n    this.uploaderSockets = Object.create(null);\n  }\n  /**\n   * Clean up all references for a file's upload: the MultipartUploader instance,\n   * any events related to the file, and the Companion WebSocket connection.\n   *\n   * Set `opts.abort` to tell S3 that the multipart upload is cancelled and must be removed.\n   * This should be done when the user cancels the upload, not when the upload is completed or errored.\n   */\n\n\n  resetUploaderReferences(fileID, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (this.uploaders[fileID]) {\n      this.uploaders[fileID].abort({\n        really: opts.abort || false\n      });\n      this.uploaders[fileID] = null;\n    }\n\n    if (this.uploaderEvents[fileID]) {\n      this.uploaderEvents[fileID].remove();\n      this.uploaderEvents[fileID] = null;\n    }\n\n    if (this.uploaderSockets[fileID]) {\n      this.uploaderSockets[fileID].close();\n      this.uploaderSockets[fileID] = null;\n    }\n  }\n\n  assertHost(method) {\n    if (!this.opts.companionUrl) {\n      throw new Error(`Expected a \\`companionUrl\\` option containing a Companion address, or if you are not using Companion, a custom \\`${method}\\` implementation.`);\n    }\n  }\n\n  createMultipartUpload(file) {\n    this.assertHost('createMultipartUpload');\n    const metadata = {};\n    Object.keys(file.meta).forEach(key => {\n      if (file.meta[key] != null) {\n        metadata[key] = file.meta[key].toString();\n      }\n    });\n    return this.client.post('s3/multipart', {\n      filename: file.name,\n      type: file.type,\n      metadata\n    }).then(assertServerError);\n  }\n\n  listParts(file, _ref) {\n    let {\n      key,\n      uploadId\n    } = _ref;\n    this.assertHost('listParts');\n    const filename = encodeURIComponent(key);\n    return this.client.get(`s3/multipart/${uploadId}?key=${filename}`).then(assertServerError);\n  }\n\n  prepareUploadParts(file, _ref2) {\n    let {\n      key,\n      uploadId,\n      partNumbers\n    } = _ref2;\n    this.assertHost('prepareUploadParts');\n    const filename = encodeURIComponent(key);\n    return this.client.get(`s3/multipart/${uploadId}/batch?key=${filename}&partNumbers=${partNumbers.join(',')}`).then(assertServerError);\n  }\n\n  completeMultipartUpload(file, _ref3) {\n    let {\n      key,\n      uploadId,\n      parts\n    } = _ref3;\n    this.assertHost('completeMultipartUpload');\n    const filename = encodeURIComponent(key);\n    const uploadIdEnc = encodeURIComponent(uploadId);\n    return this.client.post(`s3/multipart/${uploadIdEnc}/complete?key=${filename}`, {\n      parts\n    }).then(assertServerError);\n  }\n\n  abortMultipartUpload(file, _ref4) {\n    let {\n      key,\n      uploadId\n    } = _ref4;\n    this.assertHost('abortMultipartUpload');\n    const filename = encodeURIComponent(key);\n    const uploadIdEnc = encodeURIComponent(uploadId);\n    return this.client.delete(`s3/multipart/${uploadIdEnc}?key=${filename}`).then(assertServerError);\n  }\n\n  uploadFile(file) {\n    return new Promise((resolve, reject) => {\n      const onStart = data => {\n        const cFile = this.uppy.getFile(file.id);\n        this.uppy.setFileState(file.id, {\n          s3Multipart: { ...cFile.s3Multipart,\n            key: data.key,\n            uploadId: data.uploadId\n          }\n        });\n      };\n\n      const onProgress = (bytesUploaded, bytesTotal) => {\n        this.uppy.emit('upload-progress', file, {\n          uploader: this,\n          bytesUploaded,\n          bytesTotal\n        });\n      };\n\n      const onError = err => {\n        this.uppy.log(err);\n        this.uppy.emit('upload-error', file, err);\n        queuedRequest.done();\n        this.resetUploaderReferences(file.id);\n        reject(err);\n      };\n\n      const onSuccess = result => {\n        const uploadResp = {\n          body: { ...result\n          },\n          uploadURL: result.location\n        };\n        queuedRequest.done();\n        this.resetUploaderReferences(file.id);\n        const cFile = this.uppy.getFile(file.id);\n        this.uppy.emit('upload-success', cFile || file, uploadResp);\n\n        if (result.location) {\n          this.uppy.log(`Download ${upload.file.name} from ${result.location}`);\n        }\n\n        resolve(upload);\n      };\n\n      const onPartComplete = part => {\n        const cFile = this.uppy.getFile(file.id);\n\n        if (!cFile) {\n          return;\n        }\n\n        this.uppy.emit('s3-multipart:part-uploaded', cFile, part);\n      };\n\n      const upload = new MultipartUploader(file.data, {\n        // .bind to pass the file object to each handler.\n        createMultipartUpload: this.opts.createMultipartUpload.bind(this, file),\n        listParts: this.opts.listParts.bind(this, file),\n        prepareUploadParts: this.opts.prepareUploadParts.bind(this, file),\n        completeMultipartUpload: this.opts.completeMultipartUpload.bind(this, file),\n        abortMultipartUpload: this.opts.abortMultipartUpload.bind(this, file),\n        getChunkSize: this.opts.getChunkSize ? this.opts.getChunkSize.bind(this) : null,\n        onStart,\n        onProgress,\n        onError,\n        onSuccess,\n        onPartComplete,\n        limit: this.opts.limit || 5,\n        retryDelays: this.opts.retryDelays || [],\n        ...file.s3Multipart\n      });\n      this.uploaders[file.id] = upload;\n      this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n      let queuedRequest = this.requests.run(() => {\n        if (!file.isPaused) {\n          upload.start();\n        } // Don't do anything here, the caller will take care of cancelling the upload itself\n        // using resetUploaderReferences(). This is because resetUploaderReferences() has to be\n        // called when this request is still in the queue, and has not been started yet, too. At\n        // that point this cancellation function is not going to be called.\n\n\n        return () => {};\n      });\n      this.onFileRemove(file.id, removed => {\n        queuedRequest.abort();\n        this.resetUploaderReferences(file.id, {\n          abort: true\n        });\n        resolve(`upload ${removed.id} was removed`);\n      });\n      this.onCancelAll(file.id, () => {\n        queuedRequest.abort();\n        this.resetUploaderReferences(file.id, {\n          abort: true\n        });\n        resolve(`upload ${file.id} was canceled`);\n      });\n      this.onFilePause(file.id, isPaused => {\n        if (isPaused) {\n          // Remove this file from the queue so another file can start in its place.\n          queuedRequest.abort();\n          upload.pause();\n        } else {\n          // Resuming an upload should be queued, else you could pause and then\n          // resume a queued upload to make it skip the queue.\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(() => {\n            upload.start();\n            return () => {};\n          });\n        }\n      });\n      this.onPauseAll(file.id, () => {\n        queuedRequest.abort();\n        upload.pause();\n      });\n      this.onResumeAll(file.id, () => {\n        queuedRequest.abort();\n\n        if (file.error) {\n          upload.abort();\n        }\n\n        queuedRequest = this.requests.run(() => {\n          upload.start();\n          return () => {};\n        });\n      }); // Don't double-emit upload-started for Golden Retriever-restored files that were already started\n\n      if (!file.progress.uploadStarted || !file.isRestored) {\n        this.uppy.emit('upload-started', file);\n      }\n    });\n  }\n\n  uploadRemote(file) {\n    this.resetUploaderReferences(file.id); // Don't double-emit upload-started for Golden Retriever-restored files that were already started\n\n    if (!file.progress.uploadStarted || !file.isRestored) {\n      this.uppy.emit('upload-started', file);\n    }\n\n    if (file.serverToken) {\n      return this.connectToServerSocket(file);\n    }\n\n    return new Promise((resolve, reject) => {\n      const Client = file.remote.providerOptions.provider ? Provider : RequestClient;\n      const client = new Client(this.uppy, file.remote.providerOptions);\n      client.post(file.remote.url, { ...file.remote.body,\n        protocol: 's3-multipart',\n        size: file.data.size,\n        metadata: file.meta\n      }).then(res => {\n        this.uppy.setFileState(file.id, {\n          serverToken: res.token\n        });\n        file = this.uppy.getFile(file.id);\n        return file;\n      }).then(file => {\n        return this.connectToServerSocket(file);\n      }).then(() => {\n        resolve();\n      }).catch(err => {\n        this.uppy.emit('upload-error', file, err);\n        reject(err);\n      });\n    });\n  }\n\n  connectToServerSocket(file) {\n    return new Promise((resolve, reject) => {\n      const token = file.serverToken;\n      const host = getSocketHost(file.remote.companionUrl);\n      const socket = new Socket({\n        target: `${host}/api/${token}`,\n        autoOpen: false\n      });\n      this.uploaderSockets[file.id] = socket;\n      this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n      this.onFileRemove(file.id, () => {\n        queuedRequest.abort();\n        socket.send('cancel', {});\n        this.resetUploaderReferences(file.id, {\n          abort: true\n        });\n        resolve(`upload ${file.id} was removed`);\n      });\n      this.onFilePause(file.id, isPaused => {\n        if (isPaused) {\n          // Remove this file from the queue so another file can start in its place.\n          queuedRequest.abort();\n          socket.send('pause', {});\n        } else {\n          // Resuming an upload should be queued, else you could pause and then\n          // resume a queued upload to make it skip the queue.\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(() => {\n            socket.send('resume', {});\n            return () => {};\n          });\n        }\n      });\n      this.onPauseAll(file.id, () => {\n        queuedRequest.abort();\n        socket.send('pause', {});\n      });\n      this.onCancelAll(file.id, () => {\n        queuedRequest.abort();\n        socket.send('cancel', {});\n        this.resetUploaderReferences(file.id);\n        resolve(`upload ${file.id} was canceled`);\n      });\n      this.onResumeAll(file.id, () => {\n        queuedRequest.abort();\n\n        if (file.error) {\n          socket.send('pause', {});\n        }\n\n        queuedRequest = this.requests.run(() => {\n          socket.send('resume', {});\n        });\n      });\n      this.onRetry(file.id, () => {\n        // Only do the retry if the upload is actually in progress;\n        // else we could try to send these messages when the upload is still queued.\n        // We may need a better check for this since the socket may also be closed\n        // for other reasons, like network failures.\n        if (socket.isOpen) {\n          socket.send('pause', {});\n          socket.send('resume', {});\n        }\n      });\n      this.onRetryAll(file.id, () => {\n        if (socket.isOpen) {\n          socket.send('pause', {});\n          socket.send('resume', {});\n        }\n      });\n      socket.on('progress', progressData => emitSocketProgress(this, progressData, file));\n      socket.on('error', errData => {\n        this.uppy.emit('upload-error', file, new Error(errData.error));\n        this.resetUploaderReferences(file.id);\n        queuedRequest.done();\n        reject(new Error(errData.error));\n      });\n      socket.on('success', data => {\n        const uploadResp = {\n          uploadURL: data.url\n        };\n        this.uppy.emit('upload-success', file, uploadResp);\n        this.resetUploaderReferences(file.id);\n        queuedRequest.done();\n        resolve();\n      });\n      let queuedRequest = this.requests.run(() => {\n        socket.open();\n\n        if (file.isPaused) {\n          socket.send('pause', {});\n        }\n\n        return () => {};\n      });\n    });\n  }\n\n  upload(fileIDs) {\n    if (fileIDs.length === 0) return Promise.resolve();\n    const promises = fileIDs.map(id => {\n      const file = this.uppy.getFile(id);\n\n      if (file.isRemote) {\n        return this.uploadRemote(file);\n      }\n\n      return this.uploadFile(file);\n    });\n    return Promise.all(promises);\n  }\n\n  onFileRemove(fileID, cb) {\n    this.uploaderEvents[fileID].on('file-removed', file => {\n      if (fileID === file.id) cb(file.id);\n    });\n  }\n\n  onFilePause(fileID, cb) {\n    this.uploaderEvents[fileID].on('upload-pause', (targetFileID, isPaused) => {\n      if (fileID === targetFileID) {\n        // const isPaused = this.uppy.pauseResume(fileID)\n        cb(isPaused);\n      }\n    });\n  }\n\n  onRetry(fileID, cb) {\n    this.uploaderEvents[fileID].on('upload-retry', targetFileID => {\n      if (fileID === targetFileID) {\n        cb();\n      }\n    });\n  }\n\n  onRetryAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('retry-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n\n  onPauseAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('pause-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n\n  onCancelAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('cancel-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n\n  onResumeAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('resume-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n\n  install() {\n    const {\n      capabilities\n    } = this.uppy.getState();\n    this.uppy.setState({\n      capabilities: { ...capabilities,\n        resumableUploads: true\n      }\n    });\n    this.uppy.addUploader(this.upload);\n  }\n\n  uninstall() {\n    const {\n      capabilities\n    } = this.uppy.getState();\n    this.uppy.setState({\n      capabilities: { ...capabilities,\n        resumableUploads: false\n      }\n    });\n    this.uppy.removeUploader(this.upload);\n  }\n\n}, _class.VERSION = \"2.2.1\", _temp);", "\"use strict\";\n\n/**\n * Converts list into array\n */\nmodule.exports = Array.from;", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    // The same key is used for the same purpose by @uppy/robodog's `form()` API, but our\n    // locale pack scripts can't access it in Robodog. If it is updated here, it should\n    // also be updated there!\n    chooseFiles: 'Choose files'\n  }\n};", "\"use strict\";\n\nvar _class, _temp;\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst toArray = require('@uppy/utils/lib/toArray');\n\nconst {\n  h\n} = require('preact');\n\nconst locale = require('./locale');\n\nmodule.exports = (_temp = _class = class FileInput extends UIPlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.id = this.opts.id || 'FileInput';\n    this.title = 'File Input';\n    this.type = 'acquirer';\n    this.defaultLocale = locale; // Default options\n\n    const defaultOptions = {\n      target: null,\n      pretty: true,\n      inputName: 'files[]'\n    }; // Merge default options with the ones set by user\n\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.i18nInit();\n    this.render = this.render.bind(this);\n    this.handleInputChange = this.handleInputChange.bind(this);\n    this.handleClick = this.handleClick.bind(this);\n  }\n\n  addFiles(files) {\n    const descriptors = files.map(file => ({\n      source: this.id,\n      name: file.name,\n      type: file.type,\n      data: file\n    }));\n\n    try {\n      this.uppy.addFiles(descriptors);\n    } catch (err) {\n      this.uppy.log(err);\n    }\n  }\n\n  handleInputChange(event) {\n    this.uppy.log('[FileInput] Something selected through input...');\n    const files = toArray(event.target.files);\n    this.addFiles(files); // We clear the input after a file is selected, because otherwise\n    // change event is not fired in Chrome and Safari when a file\n    // with the same name is selected.\n    // ___Why not use value=\"\" on <input/> instead?\n    //    Because if we use that method of clearing the input,\n    //    Chrome will not trigger change if we drop the same file twice (Issue #768).\n\n    event.target.value = null;\n  }\n\n  handleClick() {\n    this.input.click();\n  }\n\n  render() {\n    /* http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/ */\n    const hiddenInputStyle = {\n      width: '0.1px',\n      height: '0.1px',\n      opacity: 0,\n      overflow: 'hidden',\n      position: 'absolute',\n      zIndex: -1\n    };\n    const {\n      restrictions\n    } = this.uppy.opts;\n    const accept = restrictions.allowedFileTypes ? restrictions.allowedFileTypes.join(',') : null;\n    return h(\"div\", {\n      className: \"uppy-Root uppy-FileInput-container\"\n    }, h(\"input\", {\n      className: \"uppy-FileInput-input\",\n      style: this.opts.pretty && hiddenInputStyle,\n      type: \"file\",\n      name: this.opts.inputName,\n      onChange: this.handleInputChange,\n      multiple: restrictions.maxNumberOfFiles !== 1,\n      accept: accept,\n      ref: input => {\n        this.input = input;\n      }\n    }), this.opts.pretty && h(\"button\", {\n      className: \"uppy-FileInput-btn\",\n      type: \"button\",\n      onClick: this.handleClick\n    }, this.i18n('chooseFiles')));\n  }\n\n  install() {\n    const {\n      target\n    } = this.opts;\n\n    if (target) {\n      this.mount(target, this);\n    }\n  }\n\n  uninstall() {\n    this.unmount();\n  }\n\n}, _class.VERSION = \"2.0.5\", _temp);", "\"use strict\";\n\nconst {\n  h,\n  Component,\n  createRef\n} = require('preact');\n\nconst TRANSITION_MS = 300;\nmodule.exports = class FadeIn extends Component {\n  constructor() {\n    super(...arguments);\n    this.ref = createRef();\n  }\n\n  componentWillEnter(callback) {\n    this.ref.current.style.opacity = '1';\n    this.ref.current.style.transform = 'none';\n    setTimeout(callback, TRANSITION_MS);\n  }\n\n  componentWillLeave(callback) {\n    this.ref.current.style.opacity = '0';\n    this.ref.current.style.transform = 'translateY(350%)';\n    setTimeout(callback, TRANSITION_MS);\n  }\n\n  render() {\n    const {\n      children\n    } = this.props;\n    return h(\"div\", {\n      className: \"uppy-Informer-animated\",\n      ref: this.ref\n    }, children);\n  }\n\n};", "/* eslint-disable */\n\n/**\n * @source https://github.com/developit/preact-transition-group\n */\n'use strict';\n\nconst {\n  Component,\n  cloneElement,\n  h,\n  toChildArray\n} = require('preact');\n\nfunction assign(obj, props) {\n  return Object.assign(obj, props);\n}\n\nfunction getKey(vnode, fallback) {\n  var _vnode$key;\n\n  return (_vnode$key = vnode == null ? void 0 : vnode.key) != null ? _vnode$key : fallback;\n}\n\nfunction linkRef(component, name) {\n  const cache = component._ptgLinkedRefs || (component._ptgLinkedRefs = {});\n  return cache[name] || (cache[name] = c => {\n    component.refs[name] = c;\n  });\n}\n\nfunction getChildMapping(children) {\n  const out = {};\n\n  for (let i = 0; i < children.length; i++) {\n    if (children[i] != null) {\n      const key = getKey(children[i], i.toString(36));\n      out[key] = children[i];\n    }\n  }\n\n  return out;\n}\n\nfunction mergeChildMappings(prev, next) {\n  prev = prev || {};\n  next = next || {};\n\n  const getValueForKey = key => next.hasOwnProperty(key) ? next[key] : prev[key]; // For each key of `next`, the list of keys to insert before that key in\n  // the combined list\n\n\n  const nextKeysPending = {};\n  let pendingKeys = [];\n\n  for (const prevKey in prev) {\n    if (next.hasOwnProperty(prevKey)) {\n      if (pendingKeys.length) {\n        nextKeysPending[prevKey] = pendingKeys;\n        pendingKeys = [];\n      }\n    } else {\n      pendingKeys.push(prevKey);\n    }\n  }\n\n  const childMapping = {};\n\n  for (const nextKey in next) {\n    if (nextKeysPending.hasOwnProperty(nextKey)) {\n      for (let i = 0; i < nextKeysPending[nextKey].length; i++) {\n        const pendingNextKey = nextKeysPending[nextKey][i];\n        childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n      }\n    }\n\n    childMapping[nextKey] = getValueForKey(nextKey);\n  } // Finally, add the keys which didn't appear before any key in `next`\n\n\n  for (let i = 0; i < pendingKeys.length; i++) {\n    childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n  }\n\n  return childMapping;\n}\n\nconst identity = i => i;\n\nclass TransitionGroup extends Component {\n  constructor(props, context) {\n    super(props, context);\n    this.refs = {};\n    this.state = {\n      children: getChildMapping(toChildArray(toChildArray(this.props.children)) || [])\n    };\n    this.performAppear = this.performAppear.bind(this);\n    this.performEnter = this.performEnter.bind(this);\n    this.performLeave = this.performLeave.bind(this);\n  }\n\n  componentWillMount() {\n    this.currentlyTransitioningKeys = {};\n    this.keysToAbortLeave = [];\n    this.keysToEnter = [];\n    this.keysToLeave = [];\n  }\n\n  componentDidMount() {\n    const initialChildMapping = this.state.children;\n\n    for (const key in initialChildMapping) {\n      if (initialChildMapping[key]) {\n        // this.performAppear(getKey(initialChildMapping[key], key));\n        this.performAppear(key);\n      }\n    }\n  }\n\n  componentWillReceiveProps(nextProps) {\n    const nextChildMapping = getChildMapping(toChildArray(nextProps.children) || []);\n    const prevChildMapping = this.state.children;\n    this.setState(prevState => ({\n      children: mergeChildMappings(prevState.children, nextChildMapping)\n    }));\n    let key;\n\n    for (key in nextChildMapping) {\n      if (nextChildMapping.hasOwnProperty(key)) {\n        const hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); // We should re-enter the component and abort its leave function\n\n        if (nextChildMapping[key] && hasPrev && this.currentlyTransitioningKeys[key]) {\n          this.keysToEnter.push(key);\n          this.keysToAbortLeave.push(key);\n        } else if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) {\n          this.keysToEnter.push(key);\n        }\n      }\n    }\n\n    for (key in prevChildMapping) {\n      if (prevChildMapping.hasOwnProperty(key)) {\n        const hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);\n\n        if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) {\n          this.keysToLeave.push(key);\n        }\n      }\n    }\n  }\n\n  componentDidUpdate() {\n    const {\n      keysToEnter\n    } = this;\n    this.keysToEnter = [];\n    keysToEnter.forEach(this.performEnter);\n    const {\n      keysToLeave\n    } = this;\n    this.keysToLeave = [];\n    keysToLeave.forEach(this.performLeave);\n  }\n\n  _finishAbort(key) {\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      this.keysToAbortLeave.splice(idx, 1);\n    }\n  }\n\n  performAppear(key) {\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillAppear) {\n      component.componentWillAppear(this._handleDoneAppearing.bind(this, key));\n    } else {\n      this._handleDoneAppearing(key);\n    }\n  }\n\n  _handleDoneAppearing(key) {\n    const component = this.refs[key];\n\n    if (component.componentDidAppear) {\n      component.componentDidAppear();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n\n    this._finishAbort(key);\n\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {\n      // This was removed before it had fully appeared. Remove it.\n      this.performLeave(key);\n    }\n  }\n\n  performEnter(key) {\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillEnter) {\n      component.componentWillEnter(this._handleDoneEntering.bind(this, key));\n    } else {\n      this._handleDoneEntering(key);\n    }\n  }\n\n  _handleDoneEntering(key) {\n    const component = this.refs[key];\n\n    if (component.componentDidEnter) {\n      component.componentDidEnter();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n\n    this._finishAbort(key);\n\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {\n      // This was removed before it had fully entered. Remove it.\n      this.performLeave(key);\n    }\n  }\n\n  performLeave(key) {\n    // If we should immediately abort this leave function,\n    // don't run the leave transition at all.\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      return;\n    }\n\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillLeave) {\n      component.componentWillLeave(this._handleDoneLeaving.bind(this, key));\n    } else {\n      // Note that this is somewhat dangerous b/c it calls setState()\n      // again, effectively mutating the component before all the work\n      // is done.\n      this._handleDoneLeaving(key);\n    }\n  }\n\n  _handleDoneLeaving(key) {\n    // If we should immediately abort the leave,\n    // then skip this altogether\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      return;\n    }\n\n    const component = this.refs[key];\n\n    if (component.componentDidLeave) {\n      component.componentDidLeave();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {\n      // This entered again before it fully left. Add it again.\n      this.performEnter(key);\n    } else {\n      const children = assign({}, this.state.children);\n      delete children[key];\n      this.setState({\n        children\n      });\n    }\n  }\n\n  render(_ref, _ref2) {\n    let {\n      childFactory,\n      transitionLeave,\n      transitionName,\n      transitionAppear,\n      transitionEnter,\n      transitionLeaveTimeout,\n      transitionEnterTimeout,\n      transitionAppearTimeout,\n      component,\n      ...props\n    } = _ref;\n    let {\n      children\n    } = _ref2;\n    // TODO: we could get rid of the need for the wrapper node\n    // by cloning a single child\n    const childrenToRender = [];\n\n    for (const key in children) {\n      if (children.hasOwnProperty(key)) {\n        const child = children[key];\n\n        if (child) {\n          const ref = linkRef(this, key),\n                el = cloneElement(childFactory(child), {\n            ref,\n            key\n          });\n          childrenToRender.push(el);\n        }\n      }\n    }\n\n    return h(component, props, childrenToRender);\n  }\n\n}\n\nTransitionGroup.defaultProps = {\n  component: 'span',\n  childFactory: identity\n};\nmodule.exports = TransitionGroup;", "\"use strict\";\n\nvar _class, _temp;\n\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions  */\n\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nconst {\n  h\n} = require('preact');\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst FadeIn = require('./FadeIn');\n\nconst TransitionGroup = require('./TransitionGroup');\n/**\n * Informer\n * Shows rad message bubbles\n * used like this: `uppy.info('hello world', 'info', 5000)`\n * or for errors: `uppy.info('Error uploading img.jpg', 'error', 5000)`\n *\n */\n\n\nmodule.exports = (_temp = _class = class Informer extends UIPlugin {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.render = state => {\n      return h(\"div\", {\n        className: \"uppy uppy-Informer\"\n      }, h(TransitionGroup, null, state.info.map(info => h(FadeIn, {\n        key: info.message\n      }, h(\"p\", {\n        role: \"alert\"\n      }, info.message, ' ', info.details && h(\"span\", {\n        \"aria-label\": info.details,\n        \"data-microtip-position\": \"top-left\",\n        \"data-microtip-size\": \"medium\",\n        role: \"tooltip\" // eslint-disable-next-line no-alert\n        ,\n        onClick: () => alert(`${info.message} \\n\\n ${info.details}`)\n      }, \"?\"))))));\n    };\n\n    this.type = 'progressindicator';\n    this.id = this.opts.id || 'Informer';\n    this.title = 'Informer'; // set default options\n\n    const defaultOptions = {}; // merge default options with the ones set by user\n\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n  }\n\n  install() {\n    const {\n      target\n    } = this.opts;\n\n    if (target) {\n      this.mount(target, this);\n    }\n  }\n\n}, _class.VERSION = \"2.0.5\", _temp);", "\"use strict\";\n\nmodule.exports = function getSpeed(fileProgress) {\n  if (!fileProgress.bytesUploaded) return 0;\n  const timeElapsed = Date.now() - fileProgress.uploadStarted;\n  const uploadSpeed = fileProgress.bytesUploaded / (timeElapsed / 1000);\n  return uploadSpeed;\n};", "\"use strict\";\n\nmodule.exports = function getBytesRemaining(fileProgress) {\n  return fileProgress.bytesTotal - fileProgress.bytesUploaded;\n};", "\"use strict\";\n\n/**\n * Get the declared text direction for an element.\n *\n * @param {Node} element\n * @returns {string|undefined}\n */\nfunction getTextDirection(element) {\n  var _element;\n\n  // There is another way to determine text direction using getComputedStyle(), as done here:\n  // https://github.com/pencil-js/text-direction/blob/2a235ce95089b3185acec3b51313cbba921b3811/text-direction.js\n  //\n  // We do not use that approach because we are interested specifically in the _declared_ text direction.\n  // If no text direction is declared, we have to provide our own explicit text direction so our\n  // bidirectional CSS style sheets work.\n  while (element && !element.dir) {\n    // eslint-disable-next-line no-param-reassign\n    element = element.parentNode;\n  }\n\n  return (_element = element) == null ? void 0 : _element.dir;\n}\n\nmodule.exports = getTextDirection;", "\"use strict\";\n\nmodule.exports = {\n  STATE_ERROR: 'error',\n  STATE_WAITING: 'waiting',\n  STATE_PREPROCESSING: 'preprocessing',\n  STATE_UPLOADING: 'uploading',\n  STATE_POSTPROCESSING: 'postprocessing',\n  STATE_COMPLETE: 'complete'\n};", "/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "\"use strict\";\n\nmodule.exports = function calculateProcessingProgress(files) {\n  const values = [];\n  let mode;\n  let message;\n\n  for (const {\n    progress\n  } of Object.values(files)) {\n    const {\n      preprocess,\n      postprocess\n    } = progress; // In the future we should probably do this differently. For now we'll take the\n    // mode and message from the first file\u2026\n\n    if (message == null && (preprocess || postprocess)) {\n      ({\n        mode,\n        message\n      } = preprocess || postprocess);\n    }\n\n    if ((preprocess == null ? void 0 : preprocess.mode) === 'determinate') values.push(preprocess.value);\n    if ((postprocess == null ? void 0 : postprocess.mode) === 'determinate') values.push(postprocess.value);\n  }\n\n  const value = values.reduce((total, progressValue) => {\n    return total + progressValue / values.length;\n  }, 0);\n  return {\n    mode,\n    message,\n    value\n  };\n};", "\"use strict\";\n\nmodule.exports = function secondsToTime(rawSeconds) {\n  const hours = Math.floor(rawSeconds / 3600) % 24;\n  const minutes = Math.floor(rawSeconds / 60) % 60;\n  const seconds = Math.floor(rawSeconds % 60);\n  return {\n    hours,\n    minutes,\n    seconds\n  };\n};", "\"use strict\";\n\nconst secondsToTime = require('./secondsToTime');\n\nmodule.exports = function prettyETA(seconds) {\n  const time = secondsToTime(seconds); // Only display hours and minutes if they are greater than 0 but always\n  // display minutes if hours is being displayed\n  // Display a leading zero if the there is a preceding unit: 1m 05s, but 5s\n\n  const hoursStr = time.hours === 0 ? '' : `${time.hours}h`;\n  const minutesStr = time.minutes === 0 ? '' : `${time.hours === 0 ? time.minutes : ` ${time.minutes.toString(10).padStart(2, '0')}`}m`;\n  const secondsStr = time.hours !== 0 ? '' : `${time.minutes === 0 ? time.seconds : ` ${time.seconds.toString(10).padStart(2, '0')}`}s`;\n  return `${hoursStr}${minutesStr}${secondsStr}`;\n};", "\"use strict\";\n\nconst classNames = require('classnames');\n\nconst throttle = require('lodash.throttle');\n\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst prettyETA = require('@uppy/utils/lib/prettyETA');\n\nconst {\n  h\n} = require('preact');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst DOT = `\\u00B7`;\n\nconst renderDot = () => ` ${DOT} `;\n\nfunction UploadBtn(props) {\n  const {\n    newFiles,\n    isUploadStarted,\n    recoveredState,\n    i18n,\n    uploadState,\n    isSomeGhost,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--upload', {\n    'uppy-c-btn-primary': uploadState === statusBarStates.STATE_WAITING\n  }, {\n    'uppy-StatusBar-actionBtn--disabled': isSomeGhost\n  });\n  const uploadBtnText = newFiles && isUploadStarted && !recoveredState ? i18n('uploadXNewFiles', {\n    smart_count: newFiles\n  }) : i18n('uploadXFiles', {\n    smart_count: newFiles\n  });\n  return h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload,\n    disabled: isSomeGhost,\n    \"data-uppy-super-focusable\": true\n  }, uploadBtnText);\n}\n\nfunction RetryBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry\",\n    \"aria-label\": i18n('retryUpload'),\n    onClick: () => uppy.retryAll(),\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"8\",\n    height: \"10\",\n    viewBox: \"0 0 8 10\"\n  }, h(\"path\", {\n    d: \"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z\"\n  })), i18n('retry'));\n}\n\nfunction CancelBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    title: i18n('cancel'),\n    \"aria-label\": i18n('cancel'),\n    onClick: () => uppy.cancelAll(),\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: \"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z\"\n  }))));\n}\n\nfunction PauseResumeButton(props) {\n  const {\n    isAllPaused,\n    i18n,\n    isAllComplete,\n    resumableUploads,\n    uppy\n  } = props;\n  const title = isAllPaused ? i18n('resume') : i18n('pause');\n\n  function togglePauseResume() {\n    if (isAllComplete) return null;\n\n    if (!resumableUploads) {\n      return uppy.cancelAll();\n    }\n\n    if (isAllPaused) {\n      return uppy.resumeAll();\n    }\n\n    return uppy.pauseAll();\n  }\n\n  return h(\"button\", {\n    title: title,\n    \"aria-label\": title,\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    type: \"button\",\n    onClick: togglePauseResume,\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: isAllPaused ? 'M6 4.25L11.5 8 6 11.75z' : 'M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z'\n  }))));\n}\n\nfunction DoneBtn(props) {\n  const {\n    i18n,\n    doneButtonHandler\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done\",\n    onClick: doneButtonHandler,\n    \"data-uppy-super-focusable\": true\n  }, i18n('done'));\n}\n\nfunction LoadingSpinner() {\n  return h(\"svg\", {\n    className: \"uppy-StatusBar-spinner\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"14\",\n    height: \"14\"\n  }, h(\"path\", {\n    d: \"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0\",\n    fillRule: \"evenodd\"\n  }));\n}\n\nfunction ProgressBarProcessing(props) {\n  const {\n    progress\n  } = props;\n  const {\n    value,\n    mode,\n    message\n  } = progress;\n  const roundedValue = Math.round(value * 100);\n  const dot = `\\u00B7`;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\"\n  }, h(LoadingSpinner, null), mode === 'determinate' ? `${roundedValue}% ${dot} ` : '', message);\n}\n\nfunction ProgressDetails(props) {\n  const {\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    i18n\n  } = props;\n  const ifShowFilesUploadedOfTotal = numUploads > 1;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, ifShowFilesUploadedOfTotal && i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }), h(\"span\", {\n    className: \"uppy-StatusBar-additionalInfo\"\n  }, ifShowFilesUploadedOfTotal && renderDot(), i18n('dataUploadedOfTotal', {\n    complete: prettierBytes(totalUploadedSize),\n    total: prettierBytes(totalSize)\n  }), renderDot(), i18n('xTimeLeft', {\n    time: prettyETA(totalETA)\n  })));\n}\n\nfunction FileUploadCount(props) {\n  const {\n    i18n,\n    complete,\n    numUploads\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }));\n}\n\nfunction UploadNewlyAddedFiles(props) {\n  const {\n    i18n,\n    newFiles,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--uploadNewlyAdded');\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondaryHint\"\n  }, i18n('xMoreFilesAdded', {\n    smart_count: newFiles\n  })), h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload\n  }, i18n('upload')));\n}\n\nconst ThrottledProgressDetails = throttle(ProgressDetails, 500, {\n  leading: true,\n  trailing: true\n});\n\nfunction ProgressBarUploading(props) {\n  const {\n    i18n,\n    supportsUploadProgress,\n    totalProgress,\n    showProgressDetails,\n    isUploadStarted,\n    isAllComplete,\n    isAllPaused,\n    newFiles,\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    startUpload\n  } = props;\n  const showUploadNewlyAddedFiles = newFiles && isUploadStarted;\n\n  if (!isUploadStarted || isAllComplete) {\n    return null;\n  }\n\n  const title = isAllPaused ? i18n('paused') : i18n('uploading');\n\n  function renderProgressDetails() {\n    if (!isAllPaused && !showUploadNewlyAddedFiles && showProgressDetails) {\n      if (supportsUploadProgress) {\n        return h(ThrottledProgressDetails, {\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          i18n: i18n\n        });\n      }\n\n      return h(FileUploadCount, {\n        i18n: i18n,\n        complete: complete,\n        numUploads: numUploads\n      });\n    }\n\n    return null;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    \"aria-label\": title,\n    title: title\n  }, !isAllPaused ? h(LoadingSpinner, null) : null, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, supportsUploadProgress ? `${title}: ${totalProgress}%` : title), renderProgressDetails(), showUploadNewlyAddedFiles ? h(UploadNewlyAddedFiles, {\n    i18n: i18n,\n    newFiles: newFiles,\n    startUpload: startUpload\n  }) : null));\n}\n\nfunction ProgressBarComplete(props) {\n  const {\n    i18n\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    role: \"status\",\n    title: i18n('complete')\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"15\",\n    height: \"11\",\n    viewBox: \"0 0 15 11\"\n  }, h(\"path\", {\n    d: \"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z\"\n  })), i18n('complete'))));\n}\n\nfunction ProgressBarError(props) {\n  const {\n    error,\n    i18n,\n    complete,\n    numUploads\n  } = props;\n\n  function displayErrorAlert() {\n    const errorMessage = `${i18n('uploadFailed')} \\n\\n ${error}`; // eslint-disable-next-line no-alert\n\n    alert(errorMessage); // TODO: move to custom alert implementation\n  }\n\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    title: i18n('uploadFailed')\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"11\",\n    height: \"11\",\n    viewBox: \"0 0 11 11\"\n  }, h(\"path\", {\n    d: \"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z\"\n  })), h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, i18n('uploadFailed'), h(\"button\", {\n    className: \"uppy-u-reset uppy-StatusBar-details\",\n    \"aria-label\": i18n('showErrorDetails'),\n    \"data-microtip-position\": \"top-right\",\n    \"data-microtip-size\": \"medium\",\n    onClick: displayErrorAlert,\n    type: \"button\"\n  }, \"?\")), h(FileUploadCount, {\n    i18n: i18n,\n    complete: complete,\n    numUploads: numUploads\n  })));\n}\n\nmodule.exports = {\n  UploadBtn,\n  RetryBtn,\n  CancelBtn,\n  PauseResumeButton,\n  DoneBtn,\n  LoadingSpinner,\n  ProgressDetails,\n  ProgressBarProcessing,\n  ProgressBarError,\n  ProgressBarUploading,\n  ProgressBarComplete\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst calculateProcessingProgress = require('./calculateProcessingProgress');\n\nconst {\n  UploadBtn,\n  RetryBtn,\n  CancelBtn,\n  PauseResumeButton,\n  DoneBtn,\n  ProgressBarProcessing,\n  ProgressBarError,\n  ProgressBarUploading,\n  ProgressBarComplete\n} = require('./Components');\n\nconst {\n  STATE_ERROR,\n  STATE_WAITING,\n  STATE_PREPROCESSING,\n  STATE_UPLOADING,\n  STATE_POSTPROCESSING,\n  STATE_COMPLETE\n} = statusBarStates;\nmodule.exports = StatusBar;\n\nfunction StatusBar(props) {\n  const {\n    newFiles,\n    allowNewUpload,\n    isUploadInProgress,\n    isAllPaused,\n    resumableUploads,\n    error,\n    hideUploadButton,\n    hidePauseResumeButton,\n    hideCancelButton,\n    hideRetryButton,\n    recoveredState,\n    uploadState,\n    totalProgress,\n    files,\n    supportsUploadProgress,\n    hideAfterFinish,\n    isSomeGhost,\n    isTargetDOMEl,\n    doneButtonHandler,\n    isUploadStarted,\n    i18n,\n    startUpload,\n    uppy,\n    isAllComplete,\n    showProgressDetails,\n    numUploads,\n    complete,\n    totalSize,\n    totalETA,\n    totalUploadedSize\n  } = props;\n\n  function getProgressValue() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const progress = calculateProcessingProgress(files);\n\n          if (progress.mode === 'determinate') {\n            return progress.value * 100;\n          }\n\n          return totalProgress;\n        }\n\n      case STATE_ERROR:\n        {\n          return null;\n        }\n\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return null;\n          }\n\n          return totalProgress;\n        }\n\n      default:\n        return totalProgress;\n    }\n  }\n\n  function getIsIndeterminate() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const {\n            mode\n          } = calculateProcessingProgress(files);\n          return mode === 'indeterminate';\n        }\n\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return true;\n          }\n\n          return false;\n        }\n\n      default:\n        return false;\n    }\n  }\n\n  function getIsHidden() {\n    if (recoveredState) {\n      return false;\n    }\n\n    switch (uploadState) {\n      case STATE_WAITING:\n        return hideUploadButton || newFiles === 0;\n\n      case STATE_COMPLETE:\n        return hideAfterFinish;\n\n      default:\n        return false;\n    }\n  }\n\n  const progressValue = getProgressValue();\n  const isHidden = getIsHidden();\n  const width = progressValue != null ? progressValue : 100;\n  const showUploadBtn = !error && newFiles && !isUploadInProgress && !isAllPaused && allowNewUpload && !hideUploadButton;\n  const showCancelBtn = !hideCancelButton && uploadState !== STATE_WAITING && uploadState !== STATE_COMPLETE;\n  const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton && uploadState === STATE_UPLOADING;\n  const showRetryBtn = error && !isAllComplete && !hideRetryButton;\n  const showDoneBtn = doneButtonHandler && uploadState === STATE_COMPLETE;\n  const progressClassNames = classNames('uppy-StatusBar-progress', {\n    'is-indeterminate': getIsIndeterminate()\n  });\n  const statusBarClassNames = classNames({\n    'uppy-Root': isTargetDOMEl\n  }, 'uppy-StatusBar', `is-${uploadState}`, {\n    'has-ghosts': isSomeGhost\n  });\n  return h(\"div\", {\n    className: statusBarClassNames,\n    \"aria-hidden\": isHidden\n  }, h(\"div\", {\n    className: progressClassNames,\n    style: {\n      width: `${width}%`\n    },\n    role: \"progressbar\",\n    \"aria-label\": `${width}%`,\n    \"aria-valuetext\": `${width}%`,\n    \"aria-valuemin\": \"0\",\n    \"aria-valuemax\": \"100\",\n    \"aria-valuenow\": progressValue\n  }), (() => {\n    switch (uploadState) {\n      case STATE_PREPROCESSING:\n      case STATE_POSTPROCESSING:\n        return h(ProgressBarProcessing, {\n          progress: calculateProcessingProgress(files)\n        });\n\n      case STATE_COMPLETE:\n        return h(ProgressBarComplete, {\n          i18n: i18n\n        });\n\n      case STATE_ERROR:\n        return h(ProgressBarError, {\n          error: error,\n          i18n: i18n,\n          numUploads: numUploads,\n          complete: complete\n        });\n\n      case STATE_UPLOADING:\n        return h(ProgressBarUploading, {\n          i18n: i18n,\n          supportsUploadProgress: supportsUploadProgress,\n          totalProgress: totalProgress,\n          showProgressDetails: showProgressDetails,\n          isUploadStarted: isUploadStarted,\n          isAllComplete: isAllComplete,\n          isAllPaused: isAllPaused,\n          newFiles: newFiles,\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          startUpload: startUpload\n        });\n\n      default:\n        return null;\n    }\n  })(), h(\"div\", {\n    className: \"uppy-StatusBar-actions\"\n  }, recoveredState || showUploadBtn ? h(UploadBtn, {\n    newFiles: newFiles,\n    isUploadStarted: isUploadStarted,\n    recoveredState: recoveredState,\n    i18n: i18n,\n    isSomeGhost: isSomeGhost,\n    startUpload: startUpload,\n    uploadState: uploadState\n  }) : null, showRetryBtn ? h(RetryBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showPauseResumeBtn ? h(PauseResumeButton, {\n    isAllPaused: isAllPaused,\n    i18n: i18n,\n    isAllComplete: isAllComplete,\n    resumableUploads: resumableUploads,\n    uppy: uppy\n  }) : null, showCancelBtn ? h(CancelBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showDoneBtn ? h(DoneBtn, {\n    i18n: i18n,\n    doneButtonHandler: doneButtonHandler\n  }) : null));\n}", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    // Shown in the status bar while files are being uploaded.\n    uploading: 'Uploading',\n    // Shown in the status bar once all files have been uploaded.\n    complete: 'Complete',\n    // Shown in the status bar if an upload failed.\n    uploadFailed: 'Upload failed',\n    // Shown in the status bar while the upload is paused.\n    paused: 'Paused',\n    // Used as the label for the button that retries an upload.\n    retry: 'Retry',\n    // Used as the label for the button that cancels an upload.\n    cancel: 'Cancel',\n    // Used as the label for the button that pauses an upload.\n    pause: 'Pause',\n    // Used as the label for the button that resumes an upload.\n    resume: 'Resume',\n    // Used as the label for the button that resets the upload state after an upload\n    done: 'Done',\n    // When `showProgressDetails` is set, shows the number of files that have been fully uploaded so far.\n    filesUploadedOfTotal: {\n      0: '%{complete} of %{smart_count} file uploaded',\n      1: '%{complete} of %{smart_count} files uploaded'\n    },\n    // When `showProgressDetails` is set, shows the amount of bytes that have been uploaded so far.\n    dataUploadedOfTotal: '%{complete} of %{total}',\n    // When `showProgressDetails` is set, shows an estimation of how long the upload will take to complete.\n    xTimeLeft: '%{time} left',\n    // Used as the label for the button that starts an upload.\n    uploadXFiles: {\n      0: 'Upload %{smart_count} file',\n      1: 'Upload %{smart_count} files'\n    },\n    // Used as the label for the button that starts an upload, if another upload has been started in the past\n    // and new files were added later.\n    uploadXNewFiles: {\n      0: 'Upload +%{smart_count} file',\n      1: 'Upload +%{smart_count} files'\n    },\n    upload: 'Upload',\n    retryUpload: 'Retry upload',\n    xMoreFilesAdded: {\n      0: '%{smart_count} more file added',\n      1: '%{smart_count} more files added'\n    },\n    showErrorDetails: 'Show error details'\n  }\n};", "\"use strict\";\n\nvar _class, _temp;\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst getSpeed = require('@uppy/utils/lib/getSpeed');\n\nconst getBytesRemaining = require('@uppy/utils/lib/getBytesRemaining');\n\nconst getTextDirection = require('@uppy/utils/lib/getTextDirection');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst StatusBarUI = require('./StatusBar');\n\nconst locale = require('./locale.js');\n/**\n * StatusBar: renders a status bar with upload/pause/resume/cancel/retry buttons,\n * progress percentage and time remaining.\n */\n\n\nmodule.exports = (_temp = _class = class StatusBar extends UIPlugin {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.startUpload = () => {\n      const {\n        recoveredState\n      } = this.uppy.getState();\n\n      if (recoveredState) {\n        this.uppy.emit('restore-confirmed');\n        return undefined;\n      }\n\n      return this.uppy.upload().catch(() => {// Error logged in Core\n      });\n    };\n\n    this.id = this.opts.id || 'StatusBar';\n    this.title = 'StatusBar';\n    this.type = 'progressindicator';\n    this.defaultLocale = locale; // set default options\n\n    const defaultOptions = {\n      target: 'body',\n      hideUploadButton: false,\n      hideRetryButton: false,\n      hidePauseResumeButton: false,\n      hideCancelButton: false,\n      showProgressDetails: false,\n      hideAfterFinish: true,\n      doneButtonHandler: null\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.i18nInit();\n    this.render = this.render.bind(this);\n    this.install = this.install.bind(this);\n  }\n\n  render(state) {\n    const {\n      capabilities,\n      files,\n      allowNewUpload,\n      totalProgress,\n      error,\n      recoveredState\n    } = state;\n    const {\n      newFiles,\n      startedFiles,\n      completeFiles,\n      inProgressNotPausedFiles,\n      isUploadStarted,\n      isAllComplete,\n      isAllErrored,\n      isAllPaused,\n      isUploadInProgress,\n      isSomeGhost\n    } = this.uppy.getObjectOfFilesPerState(); // If some state was recovered, we want to show Upload button/counter\n    // for all the files, because in this case it\u2019s not an Upload button,\n    // but \u201CConfirm Restore Button\u201D\n\n    const newFilesOrRecovered = recoveredState ? Object.values(files) : newFiles;\n    const totalETA = getTotalETA(inProgressNotPausedFiles);\n    const resumableUploads = !!capabilities.resumableUploads;\n    const supportsUploadProgress = capabilities.uploadProgress !== false;\n    let totalSize = 0;\n    let totalUploadedSize = 0;\n    startedFiles.forEach(file => {\n      totalSize += file.progress.bytesTotal || 0;\n      totalUploadedSize += file.progress.bytesUploaded || 0;\n    });\n    return StatusBarUI({\n      error,\n      uploadState: getUploadingState(error, isAllComplete, recoveredState, state.files || {}),\n      allowNewUpload,\n      totalProgress,\n      totalSize,\n      totalUploadedSize,\n      isAllComplete: false,\n      isAllPaused,\n      isAllErrored,\n      isUploadStarted,\n      isUploadInProgress,\n      isSomeGhost,\n      recoveredState,\n      complete: completeFiles.length,\n      newFiles: newFilesOrRecovered.length,\n      numUploads: startedFiles.length,\n      totalETA,\n      files,\n      i18n: this.i18n,\n      uppy: this.uppy,\n      startUpload: this.startUpload,\n      doneButtonHandler: this.opts.doneButtonHandler,\n      resumableUploads,\n      supportsUploadProgress,\n      showProgressDetails: this.opts.showProgressDetails,\n      hideUploadButton: this.opts.hideUploadButton,\n      hideRetryButton: this.opts.hideRetryButton,\n      hidePauseResumeButton: this.opts.hidePauseResumeButton,\n      hideCancelButton: this.opts.hideCancelButton,\n      hideAfterFinish: this.opts.hideAfterFinish,\n      isTargetDOMEl: this.isTargetDOMEl\n    });\n  }\n\n  onMount() {\n    // Set the text direction if the page has not defined one.\n    const element = this.el;\n    const direction = getTextDirection(element);\n\n    if (!direction) {\n      element.dir = 'ltr';\n    }\n  }\n\n  install() {\n    const {\n      target\n    } = this.opts;\n\n    if (target) {\n      this.mount(target, this);\n    }\n  }\n\n  uninstall() {\n    this.unmount();\n  }\n\n}, _class.VERSION = \"2.1.2\", _temp);\n\nfunction getTotalSpeed(files) {\n  let totalSpeed = 0;\n  files.forEach(file => {\n    totalSpeed += getSpeed(file.progress);\n  });\n  return totalSpeed;\n}\n\nfunction getTotalETA(files) {\n  const totalSpeed = getTotalSpeed(files);\n\n  if (totalSpeed === 0) {\n    return 0;\n  }\n\n  const totalBytesRemaining = files.reduce((total, file) => {\n    return total + getBytesRemaining(file.progress);\n  }, 0);\n  return Math.round(totalBytesRemaining / totalSpeed * 10) / 10;\n}\n\nfunction getUploadingState(error, isAllComplete, recoveredState, files) {\n  if (error && !isAllComplete) {\n    return statusBarStates.STATE_ERROR;\n  }\n\n  if (isAllComplete) {\n    return statusBarStates.STATE_COMPLETE;\n  }\n\n  if (recoveredState) {\n    return statusBarStates.STATE_WAITING;\n  }\n\n  let state = statusBarStates.STATE_WAITING;\n  const fileIDs = Object.keys(files);\n\n  for (let i = 0; i < fileIDs.length; i++) {\n    const {\n      progress\n    } = files[fileIDs[i]]; // If ANY files are being uploaded right now, show the uploading state.\n\n    if (progress.uploadStarted && !progress.uploadComplete) {\n      return statusBarStates.STATE_UPLOADING;\n    } // If files are being preprocessed AND postprocessed at this time, we show the\n    // preprocess state. If any files are being uploaded we show uploading.\n\n\n    if (progress.preprocess && state !== statusBarStates.STATE_UPLOADING) {\n      state = statusBarStates.STATE_PREPROCESSING;\n    } // If NO files are being preprocessed or uploaded right now, but some files are\n    // being postprocessed, show the postprocess state.\n\n\n    if (progress.postprocess && state !== statusBarStates.STATE_UPLOADING && state !== statusBarStates.STATE_PREPROCESSING) {\n      state = statusBarStates.STATE_POSTPROCESSING;\n    }\n  }\n\n  return state;\n}", "\"use strict\";\n\nconst DATA_URL_PATTERN = /^data:([^/]+\\/[^,;]+(?:[^,]*?))(;base64)?,([\\s\\S]*)$/;\n\nmodule.exports = function dataURItoBlob(dataURI, opts, toFile) {\n  var _ref, _opts$mimeType;\n\n  // get the base64 data\n  const dataURIData = DATA_URL_PATTERN.exec(dataURI); // user may provide mime type, if not get it from data URI\n\n  const mimeType = (_ref = (_opts$mimeType = opts.mimeType) != null ? _opts$mimeType : dataURIData == null ? void 0 : dataURIData[1]) != null ? _ref : 'plain/text';\n  let data;\n\n  if (dataURIData[2] != null) {\n    const binary = atob(decodeURIComponent(dataURIData[3]));\n    const bytes = new Uint8Array(binary.length);\n\n    for (let i = 0; i < binary.length; i++) {\n      bytes[i] = binary.charCodeAt(i);\n    }\n\n    data = [bytes];\n  } else {\n    data = [decodeURIComponent(dataURIData[3])];\n  } // Convert to a File?\n\n\n  if (toFile) {\n    return new File(data, opts.name || '', {\n      type: mimeType\n    });\n  }\n\n  return new Blob(data, {\n    type: mimeType\n  });\n};", "\"use strict\";\n\n/**\n * Check if a URL string is an object URL from `URL.createObjectURL`.\n *\n * @param {string} url\n * @returns {boolean}\n */\nmodule.exports = function isObjectURL(url) {\n  return url.startsWith('blob:');\n};", "\"use strict\";\n\nmodule.exports = function isPreviewSupported(fileType) {\n  if (!fileType) return false; // list of images that browsers can preview\n\n  return /^[^/]+\\/(jpe?g|gif|png|svg|svg\\+xml|bmp|webp|avif)$/.test(fileType);\n};", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define(\"exifr\",[\"exports\"],t):t((e=\"undefined\"!=typeof globalThis?globalThis:e||self).exifr={})}(this,(function(e){\"use strict\";function t(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}var s=\"undefined\"!=typeof self?self:global;const i=\"undefined\"!=typeof navigator,n=i&&\"undefined\"==typeof HTMLImageElement,r=!(\"undefined\"==typeof global||\"undefined\"==typeof process||!process.versions||!process.versions.node),a=s.Buffer,h=!!a,f=e=>void 0!==e;function l(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(f).length)}function o(e){let t=new Error(e);throw delete t.stack,t}function u(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const d=e=>String.fromCharCode.apply(null,e),c=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf-8\"):void 0;class p{static from(e,t){return e instanceof this&&e.le===t?e:new p(e,void 0,void 0,t)}constructor(e,t=0,s,i){if(\"boolean\"==typeof i&&(this.le=i),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===s&&(s=e.byteLength-t);let i=new DataView(e,t,s);this._swapDataView(i)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof p){void 0===s&&(s=e.byteLength-t),(t+=e.byteOffset)+s>e.byteOffset+e.byteLength&&o(\"Creating view outside of available memory in ArrayBuffer\");let i=new DataView(e.buffer,t,s);this._swapDataView(i)}else if(\"number\"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else o(\"Invalid input argument for BufferView: \"+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,s=p){return e instanceof DataView||e instanceof p?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||o(\"BufferView.set(): Invalid data argument.\"),this.toUint8().set(e,t),new s(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new p(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){let s=this.getUint8Array(e,t);return i=s,c?c.decode(i):h?Buffer.from(i).toString(\"utf8\"):decodeURIComponent(escape(d(i)));var i}getLatin1String(e=0,t=this.byteLength){let s=this.getUint8Array(e,t);return d(s)}getUnicodeString(e=0,t=this.byteLength){const s=[];for(let i=0;i<t&&e+i<this.byteLength;i+=2)s.push(this.getUint16(e+i));return d(s)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,s){switch(t){case 1:return this.getUint8(e,s);case 2:return this.getUint16(e,s);case 4:return this.getUint32(e,s);case 8:return this.getUint64&&this.getUint64(e,s)}}getUint(e,t,s){switch(t){case 8:return this.getUint8(e,s);case 16:return this.getUint16(e,s);case 32:return this.getUint32(e,s);case 64:return this.getUint64&&this.getUint64(e,s)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function g(e,t){o(`${e} '${t}' was not loaded, try using full build of exifr.`)}class m extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||g(this.kind,e),t&&(e in t||function(e,t){o(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||g(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var y=new m(\"file parser\"),b=new m(\"segment parser\"),w=new m(\"file reader\");let k=s.fetch;const O=\"Invalid input argument\";function v(e,t){return(s=e).startsWith(\"data:\")||s.length>1e4?A(e,t,\"base64\"):r&&e.includes(\"://\")?S(e,t,\"url\",U):r?A(e,t,\"fs\"):i?S(e,t,\"url\",U):void o(O);var s}async function S(e,t,s,i){return w.has(s)?A(e,t,s):i?async function(e,t){let s=await t(e);return new p(s)}(e,i):void o(`Parser ${s} is not loaded`)}async function A(e,t,s){let i=new(w.get(s))(e,t);return await i.read(),i}const U=e=>k(e).then((e=>e.arrayBuffer())),x=e=>new Promise(((t,s)=>{let i=new FileReader;i.onloadend=()=>t(i.result||new ArrayBuffer),i.onerror=s,i.readAsArrayBuffer(e)}));class C extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function B(e,t,s){let i=new C;for(let[e,t]of s)i.set(e,t);if(Array.isArray(t))for(let s of t)e.set(s,i);else e.set(t,i);return i}function V(e,t,s){let i,n=e.get(t);for(i of s)n.set(i[0],i[1])}const I=new Map,L=new Map,T=new Map,P=37500,z=37510,F=33723,j=34675,E=34665,_=34853,D=40965,M=[\"chunked\",\"firstChunkSize\",\"firstChunkSizeNode\",\"firstChunkSizeBrowser\",\"chunkSize\",\"chunkLimit\"],N=[\"jfif\",\"xmp\",\"icc\",\"iptc\",\"ihdr\"],R=[\"tiff\",...N],$=[\"ifd0\",\"ifd1\",\"exif\",\"gps\",\"interop\"],K=[...R,...$],W=[\"makerNote\",\"userComment\"],X=[\"translateKeys\",\"translateValues\",\"reviveValues\",\"multiSegment\"],H=[...X,\"sanitize\",\"mergeOutput\",\"silentErrors\"];class Y{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class G extends Y{get needed(){return this.enabled||this.deps.size>0}constructor(e,s,i,n){if(super(),t(this,\"enabled\",!1),t(this,\"skip\",new Set),t(this,\"pick\",new Set),t(this,\"deps\",new Set),t(this,\"translateKeys\",!1),t(this,\"translateValues\",!1),t(this,\"reviveValues\",!1),this.key=e,this.enabled=s,this.parse=this.enabled,this.applyInheritables(n),this.canBeFiltered=$.includes(e),this.canBeFiltered&&(this.dict=I.get(e)),void 0!==i)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if(\"object\"==typeof i){if(this.enabled=!0,this.parse=!1!==i.parse,this.canBeFiltered){let{pick:e,skip:t}=i;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(i)}else!0===i||!1===i?this.parse=this.enabled=i:o(`Invalid options argument: ${i}`)}applyInheritables(e){let t,s;for(t of X)s=e[t],void 0!==s&&(this[t]=s)}translateTagSet(e,t){if(this.dict){let s,i,{tagKeys:n,tagValues:r}=this.dict;for(s of e)\"string\"==typeof s?(i=r.indexOf(s),-1===i&&(i=n.indexOf(Number(s))),-1!==i&&t.add(Number(n[i]))):t.add(s)}else for(let s of e)t.add(s)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,te(this.pick,this.deps)):this.enabled&&this.pick.size>0&&te(this.pick,this.deps)}}var J={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},q=new Map;class Q extends Y{static useCached(e){let t=q.get(e);return void 0!==t||(t=new this(e),q.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):\"object\"==typeof e?this.setupFromObject(e):o(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=i?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of M)this[e]=J[e];for(e of H)this[e]=J[e];for(e of W)this[e]=J[e];for(e of K)this[e]=new G(e,J[e],void 0,this)}setupFromTrue(){let e;for(e of M)this[e]=J[e];for(e of H)this[e]=J[e];for(e of W)this[e]=!0;for(e of K)this[e]=new G(e,!0,void 0,this)}setupFromArray(e){let t;for(t of M)this[t]=J[t];for(t of H)this[t]=J[t];for(t of W)this[t]=J[t];for(t of K)this[t]=new G(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,$)}setupFromObject(e){let t;for(t of($.ifd0=$.ifd0||$.image,$.ifd1=$.ifd1||$.thumbnail,Object.assign(this,e),M))this[t]=ee(e[t],J[t]);for(t of H)this[t]=ee(e[t],J[t]);for(t of W)this[t]=ee(e[t],J[t]);for(t of R)this[t]=new G(t,J[t],e[t],this);for(t of $)this[t]=new G(t,J[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,$,K),!0===e.tiff?this.batchEnableWithBool($,!0):!1===e.tiff?this.batchEnableWithUserValue($,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,$):\"object\"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,$)}batchEnableWithBool(e,t){for(let s of e)this[s].enabled=t}batchEnableWithUserValue(e,t){for(let s of e){let e=t[s];this[s].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,s,i=s){if(e&&e.length){for(let e of i)this[e].enabled=!1;let t=Z(e,s);for(let[e,s]of t)te(this[e].pick,s),this[e].enabled=!0}else if(t&&t.length){let e=Z(t,s);for(let[t,s]of e)te(this[t].skip,s)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:s,iptc:i,icc:n}=this;this.makerNote?t.deps.add(P):t.skip.add(P),this.userComment?t.deps.add(z):t.skip.add(z),s.enabled||e.skip.add(700),i.enabled||e.skip.add(F),n.enabled||e.skip.add(j)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:s,interop:i}=this;i.needed&&(t.deps.add(D),e.deps.add(D)),t.needed&&e.deps.add(E),s.needed&&e.deps.add(_),this.tiff.enabled=$.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of $)this[e].finalizeFilters()}get onlyTiff(){return!N.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of R)this[e].enabled&&!b.has(e)&&g(\"segment parser\",e)}}function Z(e,t){let s,i,n,r,a=[];for(n of t){for(r of(s=I.get(n),i=[],s))(e.includes(r[0])||e.includes(r[1]))&&i.push(r[0]);i.length&&a.push([n,i])}return a}function ee(e,t){return void 0!==e?e:void 0!==t?t:void 0}function te(e,t){for(let s of t)e.add(s)}t(Q,\"default\",J);class se{constructor(e){t(this,\"parsers\",{}),t(this,\"output\",{}),t(this,\"errors\",[]),t(this,\"pushToErrors\",(e=>this.errors.push(e))),this.options=Q.useCached(e)}async read(e){this.file=await function(e,t){return\"string\"==typeof e?v(e,t):i&&!n&&e instanceof HTMLImageElement?v(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new p(e):i&&e instanceof Blob?S(e,t,\"blob\",x):void o(O)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[s,i]of y)if(i.canHandle(e,t))return this.fileParser=new i(this.options,this.file,this.parsers),e[s]=!0;this.file.close&&this.file.close(),o(\"Unknown file format\")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),l(s=e)?void 0:s;var s}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let s=await t.parse();t.assignToOutput(e,s)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,s=b.get(\"tiff\",e);var i;if(t.tiff?i={start:0,type:\"tiff\"}:t.jpeg&&(i=await this.fileParser.getOrFindSegment(\"tiff\")),void 0===i)return;let n=await this.fileParser.ensureSegmentChunk(i),r=this.parsers.tiff=new s(n,e,t),a=await r.extractThumbnail();return t.close&&t.close(),a}}async function ie(e,t){let s=new se(t);return await s.read(e),s.parse()}var ne=Object.freeze({__proto__:null,parse:ie,Exifr:se,fileParsers:y,segmentParsers:b,fileReaders:w,tagKeys:I,tagValues:L,tagRevivers:T,createDictionary:B,extendDictionary:V,fetchUrlAsArrayBuffer:U,readBlobAsArrayBuffer:x,chunkedProps:M,otherSegments:N,segments:R,tiffBlocks:$,segmentsAndBlocks:K,tiffExtractables:W,inheritables:X,allFormatters:H,Options:Q});class re{static findPosition(e,t){let s=e.getUint16(t+2)+2,i=\"function\"==typeof this.headerLength?this.headerLength(e,t,s):this.headerLength,n=t+i,r=s-i;return{offset:t,length:s,headerLength:i,start:n,size:r,end:n+r}}static parse(e,t={}){return new this(e,new Q({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof p?e:new p(e)}constructor(e,s={},i){t(this,\"errors\",[]),t(this,\"raw\",new Map),t(this,\"handleError\",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=i,this.type=this.constructor.type,this.globalOptions=this.options=s,this.localOptions=s[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let s=T.get(t),i=L.get(t),n=I.get(t),r=this.options[t],a=r.reviveValues&&!!s,h=r.translateValues&&!!i,f=r.translateKeys&&!!n,l={};for(let[t,r]of e)a&&s.has(t)?r=s.get(t)(r):h&&i.has(t)&&(r=this.translateValue(r,i.get(t))),f&&n.has(t)&&(t=n.get(t)||t),l[t]=r;return l}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,s){if(this.globalOptions.mergeOutput)return Object.assign(e,s);e[t]?Object.assign(e[t],s):e[t]=s}}t(re,\"headerLength\",4),t(re,\"type\",void 0),t(re,\"multiSegment\",!1),t(re,\"canHandle\",(()=>!1));function ae(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function he(e){return e>=224&&e<=239}function fe(e,t,s){for(let[i,n]of b)if(n.canHandle(e,t,s))return i}class le extends class{constructor(e,s,i){t(this,\"errors\",[]),t(this,\"ensureSegmentChunk\",(async e=>{let t=e.start,s=e.size||65536;if(this.file.chunked)if(this.file.available(t,s))e.chunk=this.file.subarray(t,s);else try{e.chunk=await this.file.readChunk(t,s)}catch(t){o(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+s?e.chunk=this.file.subarray(t,s):void 0===e.size?e.chunk=this.file.subarray(t):o(\"Segment unreachable: \"+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=s,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let s=new(b.get(e))(t,this.options,this.file);return this.parsers[e]=s}createParsers(e){for(let t of e){let{type:e,chunk:s}=t,i=this.options[e];if(i&&i.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,s)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),t(this,\"appSegments\",[]),t(this,\"jpegSegments\",[]),t(this,\"unknownSegments\",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(b.keyList())):(e=void 0===e?b.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&b.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:s,findAll:i,wanted:n,remaining:r}=this;if(!i&&this.file.chunked&&(i=Array.from(n).some((e=>{let t=b.get(e),s=this.options[e];return t.multiSegment&&s.multiSegment})),i&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,s.byteLength),!this.options.onlyTiff&&s.chunked){let t=!1;for(;r.size>0&&!t&&(s.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:i}=s,n=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>i&&!n?!await s.readNextChunk(e):!await s.readNextChunk(i),void 0===(e=this.findAppSegmentsInRange(e,s.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let s,i,n,r,a,h,{file:f,findAll:l,wanted:o,remaining:u,options:d}=this;for(;e<t;e++)if(255===f.getUint8(e))if(s=f.getUint8(e+1),he(s)){if(i=f.getUint16(e+2),n=fe(f,e,i),n&&o.has(n)&&(r=b.get(n),a=r.findPosition(f,e),h=d[n],a.type=n,this.appSegments.push(a),!l&&(r.multiSegment&&h.multiSegment?(this.unfinishedMultiSegment=a.chunkNumber<a.chunkCount,this.unfinishedMultiSegment||u.delete(n)):u.delete(n),0===u.size)))break;d.recordUnknownSegments&&(a=re.findPosition(f,e),a.marker=s,this.unknownSegments.push(a)),e+=i+1}else if(ae(s)){if(i=f.getUint16(e+2),218===s&&!1!==d.stopAfterSos)return;d.recordJpegSegments&&this.jpegSegments.push({offset:e,length:i,marker:s}),e+=i+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let s,i,n,r=new Map;for(let a=0;a<e.length;a++)s=e[a],i=s[t],r.has(i)?n=r.get(i):r.set(i,n=[]),n.push(s);return Array.from(r)}(this.appSegments,\"type\");this.mergedAppSegments=e.map((([e,t])=>{let s=b.get(e,this.options);if(s.handleMultiSegments){return{type:e,chunk:s.handleMultiSegments(t)}}return t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}t(le,\"type\",\"jpeg\"),y.set(\"jpeg\",le);const oe=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class ue extends re{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,s=new Map){let{pick:i,skip:n}=this.options[t];i=new Set(i);let r=i.size>0,a=0===n.size,h=this.chunk.getUint16(e);e+=2;for(let f=0;f<h;f++){let h=this.chunk.getUint16(e);if(r){if(i.has(h)&&(s.set(h,this.parseTag(e,h,t)),i.delete(h),0===i.size))break}else!a&&n.has(h)||s.set(h,this.parseTag(e,h,t));e+=12}return s}parseTag(e,t,s){let{chunk:i}=this,n=i.getUint16(e+2),r=i.getUint32(e+4),a=oe[n];if(a*r<=4?e+=8:e=i.getUint32(e+8),(n<1||n>13)&&o(`Invalid TIFF value type. block: ${s.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>i.byteLength&&o(`Invalid TIFF value offset. block: ${s.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${i.byteLength}`),1===n)return i.getUint8Array(e,r);if(2===n)return\"\"===(h=function(e){for(;e.endsWith(\"\\0\");)e=e.slice(0,-1);return e}(h=i.getString(e,r)).trim())?void 0:h;var h;if(7===n)return i.getUint8Array(e,r);if(1===r)return this.parseTagValue(n,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(n))(r),s=a;for(let i=0;i<r;i++)t[i]=this.parseTagValue(n,e),e+=s;return t}}parseTagValue(e,t){let{chunk:s}=this;switch(e){case 1:return s.getUint8(t);case 3:return s.getUint16(t);case 4:return s.getUint32(t);case 5:return s.getUint32(t)/s.getUint32(t+4);case 6:return s.getInt8(t);case 8:return s.getInt16(t);case 9:return s.getInt32(t);case 10:return s.getInt32(t)/s.getInt32(t+4);case 11:return s.getFloat(t);case 12:return s.getDouble(t);case 13:return s.getUint32(t);default:o(`Invalid tiff type ${e}`)}}}class de extends ue{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse(\"parseExifBlock\"),e.gps.enabled&&await this.safeParse(\"parseGpsBlock\"),e.interop.enabled&&await this.safeParse(\"parseInteropBlock\"),e.ifd1.enabled&&await this.safeParse(\"parseThumbnailBlock\"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let s=new Map;return this[t]=s,this.parseTags(e,t,s),s}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&o(\"Malformed EXIF data\"),!e.chunked&&this.ifd0Offset>e.byteLength&&o(`IFD0 offset points to outside of file.\\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,u(this.options));let t=this.parseBlock(this.ifd0Offset,\"ifd0\");return 0!==t.size?(this.exifOffset=t.get(E),this.interopOffset=t.get(D),this.gpsOffset=t.get(_),this.xmp=t.get(700),this.iptc=t.get(F),this.icc=t.get(j),this.options.sanitize&&(t.delete(E),t.delete(D),t.delete(_),t.delete(700),t.delete(F),t.delete(j)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,u(this.options));let e=this.parseBlock(this.exifOffset,\"exif\");return this.interopOffset||(this.interopOffset=e.get(D)),this.makerNote=e.get(P),this.userComment=e.get(z),this.options.sanitize&&(e.delete(D),e.delete(P),e.delete(z)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let s=e.get(t);s&&1===s.length&&e.set(t,s[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,\"gps\");return e&&e.has(2)&&e.has(4)&&(e.set(\"latitude\",ce(...e.get(2),e.get(1))),e.set(\"longitude\",ce(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,\"interop\")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,\"ifd1\"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,s,i={};for(t of $)if(e=this[t],!l(e))if(s=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(\"ifd1\"===t)continue;Object.assign(i,s)}else i[t]=s;return this.makerNote&&(i.makerNote=this.makerNote),this.userComment&&(i.userComment=this.userComment),i}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[s,i]of Object.entries(t))this.assignObjectToOutput(e,s,i)}}function ce(e,t,s,i){var n=e+t/60+s/3600;return\"S\"!==i&&\"W\"!==i||(n*=-1),n}t(de,\"type\",\"tiff\"),t(de,\"headerLength\",10),b.set(\"tiff\",de);var pe=Object.freeze({__proto__:null,default:ne,Exifr:se,fileParsers:y,segmentParsers:b,fileReaders:w,tagKeys:I,tagValues:L,tagRevivers:T,createDictionary:B,extendDictionary:V,fetchUrlAsArrayBuffer:U,readBlobAsArrayBuffer:x,chunkedProps:M,otherSegments:N,segments:R,tiffBlocks:$,segmentsAndBlocks:K,tiffExtractables:W,inheritables:X,allFormatters:H,Options:Q,parse:ie});const ge={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},me=Object.assign({},ge,{firstChunkSize:4e4,gps:[1,2,3,4]});const ye=Object.assign({},ge,{tiff:!1,ifd1:!0,mergeOutput:!1});const be=Object.assign({},ge,{firstChunkSize:4e4,ifd0:[274]});async function we(e){let t=new se(be);await t.read(e);let s=await t.parse();if(s&&s.ifd0)return s.ifd0[274]}const ke=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,\"object\"==typeof navigator){let t=navigator.userAgent;if(t.includes(\"iPad\")||t.includes(\"iPhone\")){let s=t.match(/OS (\\d+)_(\\d+)/);if(s){let[,t,i]=s,n=Number(t)+.1*Number(i);e.rotateCanvas=n<13.4,e.rotateCss=!1}}else if(t.includes(\"OS X 10\")){let[,s]=t.match(/OS X 10[_.](\\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<15}if(t.includes(\"Chrome/\")){let[,s]=t.match(/Chrome\\/(\\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<81}else if(t.includes(\"Firefox/\")){let[,s]=t.match(/Firefox\\/(\\d+)/);e.rotateCanvas=e.rotateCss=Number(s)<77}}class Oe extends p{constructor(...e){super(...e),t(this,\"ranges\",new ve),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,s){if(0===e&&0===this.byteLength&&s){let e=new DataView(s.buffer||s,s.byteOffset,s.byteLength);this._swapDataView(e)}else{let s=e+t;if(s>this.byteLength){let{dataView:e}=this._extend(s);this._swapDataView(e)}}}_extend(e){let t;t=h?a.allocUnsafe(e):new Uint8Array(e);let s=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:s}}subarray(e,t,s=!1){return t=t||this._lengthToEnd(e),s&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,s=!1){s&&this._tryExtend(t,e.byteLength,e);let i=super.set(e,t);return this.ranges.add(t,i.byteLength),i}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class ve{constructor(){t(this,\"list\",[])}get length(){return this.list.length}add(e,t,s=0){let i=e+t,n=this.list.filter((t=>Se(e,t.offset,i)||Se(e,t.end,i)));if(n.length>0){e=Math.min(e,...n.map((e=>e.offset))),i=Math.max(i,...n.map((e=>e.end))),t=i-e;let s=n.shift();s.offset=e,s.length=t,s.end=i,this.list=this.list.filter((e=>!n.includes(e)))}else this.list.push({offset:e,length:t,end:i})}available(e,t){let s=e+t;return this.list.some((t=>t.offset<=e&&s<=t.end))}}function Se(e,t,s){return e<=t&&t<=s}class Ae extends Oe{constructor(e,s){super(0),t(this,\"chunksRead\",0),this.input=e,this.options=s}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,s=await this.readChunk(e,t);return!!s&&s.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}w.set(\"blob\",class extends Ae{async readWhole(){this.chunked=!1;let e=await x(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let s=t?e+t:void 0,i=this.input.slice(e,s),n=await x(i);return this.set(n,e,!0)}}),e.Exifr=se,e.Options=Q,e.allFormatters=H,e.chunkedProps=M,e.createDictionary=B,e.default=pe,e.extendDictionary=V,e.fetchUrlAsArrayBuffer=U,e.fileParsers=y,e.fileReaders=w,e.gps=async function(e){let t=new se(me);await t.read(e);let s=await t.parse();if(s&&s.gps){let{latitude:e,longitude:t}=s.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=me,e.inheritables=X,e.orientation=we,e.orientationOnlyOptions=be,e.otherSegments=N,e.parse=ie,e.readBlobAsArrayBuffer=x,e.rotation=async function(t){let s=await we(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},ke[s])},e.rotations=ke,e.segmentParsers=b,e.segments=R,e.segmentsAndBlocks=K,e.tagKeys=I,e.tagRevivers=T,e.tagValues=L,e.thumbnail=async function(e){let t=new se(ye);await t.read(e);let s=await t.extractThumbnail();return s&&h?a.from(s):s},e.thumbnailOnlyOptions=ye,e.thumbnailUrl=async function(e){let t=await this.thumbnail(e);if(void 0!==t){let e=new Blob([t]);return URL.createObjectURL(e)}},e.tiffBlocks=$,e.tiffExtractables=W,Object.defineProperty(e,\"__esModule\",{value:!0})}));\n", "module.exports = {\n  strings: {\n    generatingThumbnails: 'Generating thumbnails...'\n  }\n};", "var _class, _temp;\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst dataURItoBlob = require('@uppy/utils/lib/dataURItoBlob');\n\nconst isObjectURL = require('@uppy/utils/lib/isObjectURL');\n\nconst isPreviewSupported = require('@uppy/utils/lib/isPreviewSupported');\n\nconst {\n  rotation\n} = require('exifr/dist/mini.umd.js');\n\nconst locale = require('./locale');\n/**\n * The Thumbnail Generator plugin\n */\n\n\nmodule.exports = (_temp = _class = class ThumbnailGenerator extends UIPlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.onFileAdded = file => {\n      if (!file.preview && file.data && isPreviewSupported(file.type) && !file.isRemote) {\n        this.addToQueue(file.id);\n      }\n    };\n\n    this.onCancelRequest = file => {\n      const index = this.queue.indexOf(file.id);\n\n      if (index !== -1) {\n        this.queue.splice(index, 1);\n      }\n    };\n\n    this.onFileRemoved = file => {\n      const index = this.queue.indexOf(file.id);\n\n      if (index !== -1) {\n        this.queue.splice(index, 1);\n      } // Clean up object URLs.\n\n\n      if (file.preview && isObjectURL(file.preview)) {\n        URL.revokeObjectURL(file.preview);\n      }\n    };\n\n    this.onRestored = () => {\n      const restoredFiles = this.uppy.getFiles().filter(file => file.isRestored);\n      restoredFiles.forEach(file => {\n        // Only add blob URLs; they are likely invalid after being restored.\n        if (!file.preview || isObjectURL(file.preview)) {\n          this.addToQueue(file.id);\n        }\n      });\n    };\n\n    this.onAllFilesRemoved = () => {\n      this.queue = [];\n    };\n\n    this.waitUntilAllProcessed = fileIDs => {\n      fileIDs.forEach(fileID => {\n        const file = this.uppy.getFile(fileID);\n        this.uppy.emit('preprocess-progress', file, {\n          mode: 'indeterminate',\n          message: this.i18n('generatingThumbnails')\n        });\n      });\n\n      const emitPreprocessCompleteForAll = () => {\n        fileIDs.forEach(fileID => {\n          const file = this.uppy.getFile(fileID);\n          this.uppy.emit('preprocess-complete', file);\n        });\n      };\n\n      return new Promise(resolve => {\n        if (this.queueProcessing) {\n          this.uppy.once('thumbnail:all-generated', () => {\n            emitPreprocessCompleteForAll();\n            resolve();\n          });\n        } else {\n          emitPreprocessCompleteForAll();\n          resolve();\n        }\n      });\n    };\n\n    this.type = 'modifier';\n    this.id = this.opts.id || 'ThumbnailGenerator';\n    this.title = 'Thumbnail Generator';\n    this.queue = [];\n    this.queueProcessing = false;\n    this.defaultThumbnailDimension = 200;\n    this.thumbnailType = this.opts.thumbnailType || 'image/jpeg';\n    this.defaultLocale = locale;\n    const defaultOptions = {\n      thumbnailWidth: null,\n      thumbnailHeight: null,\n      waitForThumbnailsBeforeUpload: false,\n      lazy: false\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.i18nInit();\n\n    if (this.opts.lazy && this.opts.waitForThumbnailsBeforeUpload) {\n      throw new Error('ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.');\n    }\n  }\n  /**\n   * Create a thumbnail for the given Uppy file object.\n   *\n   * @param {{data: Blob}} file\n   * @param {number} targetWidth\n   * @param {number} targetHeight\n   * @returns {Promise}\n   */\n\n\n  createThumbnail(file, targetWidth, targetHeight) {\n    const originalUrl = URL.createObjectURL(file.data);\n    const onload = new Promise((resolve, reject) => {\n      const image = new Image();\n      image.src = originalUrl;\n      image.addEventListener('load', () => {\n        URL.revokeObjectURL(originalUrl);\n        resolve(image);\n      });\n      image.addEventListener('error', event => {\n        URL.revokeObjectURL(originalUrl);\n        reject(event.error || new Error('Could not create thumbnail'));\n      });\n    });\n    const orientationPromise = rotation(file.data).catch(() => 1);\n    return Promise.all([onload, orientationPromise]).then(_ref => {\n      let [image, orientation] = _ref;\n      const dimensions = this.getProportionalDimensions(image, targetWidth, targetHeight, orientation.deg);\n      const rotatedImage = this.rotateImage(image, orientation);\n      const resizedImage = this.resizeImage(rotatedImage, dimensions.width, dimensions.height);\n      return this.canvasToBlob(resizedImage, this.thumbnailType, 80);\n    }).then(blob => {\n      return URL.createObjectURL(blob);\n    });\n  }\n  /**\n   * Get the new calculated dimensions for the given image and a target width\n   * or height. If both width and height are given, only width is taken into\n   * account. If neither width nor height are given, the default dimension\n   * is used.\n   */\n\n\n  getProportionalDimensions(img, width, height, rotation) {\n    let aspect = img.width / img.height;\n\n    if (rotation === 90 || rotation === 270) {\n      aspect = img.height / img.width;\n    }\n\n    if (width != null) {\n      return {\n        width,\n        height: Math.round(width / aspect)\n      };\n    }\n\n    if (height != null) {\n      return {\n        width: Math.round(height * aspect),\n        height\n      };\n    }\n\n    return {\n      width: this.defaultThumbnailDimension,\n      height: Math.round(this.defaultThumbnailDimension / aspect)\n    };\n  }\n  /**\n   * Make sure the image doesn\u2019t exceed browser/device canvas limits.\n   * For ios with 256 RAM and ie\n   */\n\n\n  protect(image) {\n    // https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element\n    const ratio = image.width / image.height;\n    const maxSquare = 5000000; // ios max canvas square\n\n    const maxSize = 4096; // ie max canvas dimensions\n\n    let maxW = Math.floor(Math.sqrt(maxSquare * ratio));\n    let maxH = Math.floor(maxSquare / Math.sqrt(maxSquare * ratio));\n\n    if (maxW > maxSize) {\n      maxW = maxSize;\n      maxH = Math.round(maxW / ratio);\n    }\n\n    if (maxH > maxSize) {\n      maxH = maxSize;\n      maxW = Math.round(ratio * maxH);\n    }\n\n    if (image.width > maxW) {\n      const canvas = document.createElement('canvas');\n      canvas.width = maxW;\n      canvas.height = maxH;\n      canvas.getContext('2d').drawImage(image, 0, 0, maxW, maxH);\n      image = canvas;\n    }\n\n    return image;\n  }\n  /**\n   * Resize an image to the target `width` and `height`.\n   *\n   * Returns a Canvas with the resized image on it.\n   */\n\n\n  resizeImage(image, targetWidth, targetHeight) {\n    // Resizing in steps refactored to use a solution from\n    // https://blog.uploadcare.com/image-resize-in-browsers-is-broken-e38eed08df01\n    image = this.protect(image);\n    let steps = Math.ceil(Math.log2(image.width / targetWidth));\n\n    if (steps < 1) {\n      steps = 1;\n    }\n\n    let sW = targetWidth * 2 ** (steps - 1);\n    let sH = targetHeight * 2 ** (steps - 1);\n    const x = 2;\n\n    while (steps--) {\n      const canvas = document.createElement('canvas');\n      canvas.width = sW;\n      canvas.height = sH;\n      canvas.getContext('2d').drawImage(image, 0, 0, sW, sH);\n      image = canvas;\n      sW = Math.round(sW / x);\n      sH = Math.round(sH / x);\n    }\n\n    return image;\n  }\n\n  rotateImage(image, translate) {\n    let w = image.width;\n    let h = image.height;\n\n    if (translate.deg === 90 || translate.deg === 270) {\n      w = image.height;\n      h = image.width;\n    }\n\n    const canvas = document.createElement('canvas');\n    canvas.width = w;\n    canvas.height = h;\n    const context = canvas.getContext('2d');\n    context.translate(w / 2, h / 2);\n\n    if (translate.canvas) {\n      context.rotate(translate.rad);\n      context.scale(translate.scaleX, translate.scaleY);\n    }\n\n    context.drawImage(image, -image.width / 2, -image.height / 2, image.width, image.height);\n    return canvas;\n  }\n  /**\n   * Save a <canvas> element's content to a Blob object.\n   *\n   * @param {HTMLCanvasElement} canvas\n   * @returns {Promise}\n   */\n\n\n  canvasToBlob(canvas, type, quality) {\n    try {\n      canvas.getContext('2d').getImageData(0, 0, 1, 1);\n    } catch (err) {\n      if (err.code === 18) {\n        return Promise.reject(new Error('cannot read image, probably an svg with external resources'));\n      }\n    }\n\n    if (canvas.toBlob) {\n      return new Promise(resolve => {\n        canvas.toBlob(resolve, type, quality);\n      }).then(blob => {\n        if (blob === null) {\n          throw new Error('cannot read image, probably an svg with external resources');\n        }\n\n        return blob;\n      });\n    }\n\n    return Promise.resolve().then(() => {\n      return dataURItoBlob(canvas.toDataURL(type, quality), {});\n    }).then(blob => {\n      if (blob === null) {\n        throw new Error('could not extract blob, probably an old browser');\n      }\n\n      return blob;\n    });\n  }\n  /**\n   * Set the preview URL for a file.\n   */\n\n\n  setPreviewURL(fileID, preview) {\n    this.uppy.setFileState(fileID, {\n      preview\n    });\n  }\n\n  addToQueue(item) {\n    this.queue.push(item);\n\n    if (this.queueProcessing === false) {\n      this.processQueue();\n    }\n  }\n\n  processQueue() {\n    this.queueProcessing = true;\n\n    if (this.queue.length > 0) {\n      const current = this.uppy.getFile(this.queue.shift());\n\n      if (!current) {\n        this.uppy.log('[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug', 'error');\n        return;\n      }\n\n      return this.requestThumbnail(current).catch(() => {}) // eslint-disable-line node/handle-callback-err\n      .then(() => this.processQueue());\n    }\n\n    this.queueProcessing = false;\n    this.uppy.log('[ThumbnailGenerator] Emptied thumbnail queue');\n    this.uppy.emit('thumbnail:all-generated');\n  }\n\n  requestThumbnail(file) {\n    if (isPreviewSupported(file.type) && !file.isRemote) {\n      return this.createThumbnail(file, this.opts.thumbnailWidth, this.opts.thumbnailHeight).then(preview => {\n        this.setPreviewURL(file.id, preview);\n        this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${file.id}`);\n        this.uppy.emit('thumbnail:generated', this.uppy.getFile(file.id), preview);\n      }).catch(err => {\n        this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${file.id}:`, 'warning');\n        this.uppy.log(err, 'warning');\n        this.uppy.emit('thumbnail:error', this.uppy.getFile(file.id), err);\n      });\n    }\n\n    return Promise.resolve();\n  }\n\n  install() {\n    this.uppy.on('file-removed', this.onFileRemoved);\n    this.uppy.on('cancel-all', this.onAllFilesRemoved);\n\n    if (this.opts.lazy) {\n      this.uppy.on('thumbnail:request', this.onFileAdded);\n      this.uppy.on('thumbnail:cancel', this.onCancelRequest);\n    } else {\n      this.uppy.on('file-added', this.onFileAdded);\n      this.uppy.on('restored', this.onRestored);\n    }\n\n    if (this.opts.waitForThumbnailsBeforeUpload) {\n      this.uppy.addPreProcessor(this.waitUntilAllProcessed);\n    }\n  }\n\n  uninstall() {\n    this.uppy.off('file-removed', this.onFileRemoved);\n    this.uppy.off('cancel-all', this.onAllFilesRemoved);\n\n    if (this.opts.lazy) {\n      this.uppy.off('thumbnail:request', this.onFileAdded);\n      this.uppy.off('thumbnail:cancel', this.onCancelRequest);\n    } else {\n      this.uppy.off('file-added', this.onFileAdded);\n      this.uppy.off('restored', this.onRestored);\n    }\n\n    if (this.opts.waitForThumbnailsBeforeUpload) {\n      this.uppy.removePreProcessor(this.waitUntilAllProcessed);\n    }\n  }\n\n}, _class.VERSION = \"2.1.1\", _temp);", "\"use strict\";\n\nconst isDOMElement = require('./isDOMElement');\n/**\n * Find one or more DOM elements.\n *\n * @param {string|Node} element\n * @returns {Node[]|null}\n */\n\n\nmodule.exports = function findAllDOMElements(element) {\n  if (typeof element === 'string') {\n    const elements = document.querySelectorAll(element);\n    return elements.length === 0 ? null : Array.from(elements);\n  }\n\n  if (typeof element === 'object' && isDOMElement(element)) {\n    return [element];\n  }\n\n  return null;\n};", "\"use strict\";\n\n/**\n * Get the relative path from the FileEntry#fullPath, because File#webkitRelativePath is always '', at least onDrop.\n *\n * @param {FileEntry} fileEntry\n *\n * @returns {string|null} - if file is not in a folder - return null (this is to\n * be consistent with .relativePath-s of files selected from My Device). If file\n * is in a folder - return its fullPath, e.g. '/simpsons/hi.jpeg'.\n */\nmodule.exports = function getRelativePath(fileEntry) {\n  // fileEntry.fullPath - \"/simpsons/hi.jpeg\" or undefined (for browsers that don't support it)\n  // fileEntry.name - \"hi.jpeg\"\n  if (!fileEntry.fullPath || fileEntry.fullPath === `/${fileEntry.name}`) {\n    return null;\n  }\n\n  return fileEntry.fullPath;\n};", "\"use strict\";\n\n/**\n * Recursive function, calls the original callback() when the directory is entirely parsed.\n *\n * @param {FileSystemDirectoryReader} directoryReader\n * @param {Array} oldEntries\n * @param {Function} logDropError\n * @param {Function} callback - called with ([ all files and directories in that directoryReader ])\n */\nmodule.exports = function getFilesAndDirectoriesFromDirectory(directoryReader, oldEntries, logDropError, _ref) {\n  let {\n    onSuccess\n  } = _ref;\n  directoryReader.readEntries(entries => {\n    const newEntries = [...oldEntries, ...entries]; // According to the FileSystem API spec, getFilesAndDirectoriesFromDirectory()\n    // must be called until it calls the onSuccess with an empty array.\n\n    if (entries.length) {\n      setTimeout(() => {\n        getFilesAndDirectoriesFromDirectory(directoryReader, newEntries, logDropError, {\n          onSuccess\n        });\n      }, 0); // Done iterating this particular directory\n    } else {\n      onSuccess(newEntries);\n    }\n  }, // Make sure we resolve on error anyway, it's fine if only one directory couldn't be parsed!\n  error => {\n    logDropError(error);\n    onSuccess(oldEntries);\n  });\n};", "\"use strict\";\n\nconst toArray = require('../../../toArray');\n\nconst getRelativePath = require('./getRelativePath');\n\nconst getFilesAndDirectoriesFromDirectory = require('./getFilesAndDirectoriesFromDirectory');\n\nmodule.exports = function webkitGetAsEntryApi(dataTransfer, logDropError) {\n  const files = [];\n  const rootPromises = [];\n  /**\n   * Returns a resolved promise, when :files array is enhanced\n   *\n   * @param {(FileSystemFileEntry|FileSystemDirectoryEntry)} entry\n   * @returns {Promise} - empty promise that resolves when :files is enhanced with a file\n   */\n\n  const createPromiseToAddFileOrParseDirectory = entry => new Promise(resolve => {\n    // This is a base call\n    if (entry.isFile) {\n      // Creates a new File object which can be used to read the file.\n      entry.file(file => {\n        // eslint-disable-next-line no-param-reassign\n        file.relativePath = getRelativePath(entry);\n        files.push(file);\n        resolve();\n      }, // Make sure we resolve on error anyway, it's fine if only one file couldn't be read!\n      error => {\n        logDropError(error);\n        resolve();\n      }); // This is a recursive call\n    } else if (entry.isDirectory) {\n      const directoryReader = entry.createReader();\n      getFilesAndDirectoriesFromDirectory(directoryReader, [], logDropError, {\n        onSuccess: entries => resolve(Promise.all(entries.map(createPromiseToAddFileOrParseDirectory)))\n      });\n    }\n  }); // For each dropped item, - make sure it's a file/directory, and start deepening in!\n\n\n  toArray(dataTransfer.items).forEach(item => {\n    const entry = item.webkitGetAsEntry(); // :entry can be null when we drop the url e.g.\n\n    if (entry) {\n      rootPromises.push(createPromiseToAddFileOrParseDirectory(entry));\n    }\n  });\n  return Promise.all(rootPromises).then(() => files);\n};", "\"use strict\";\n\nconst toArray = require('../../toArray'); // .files fallback, should be implemented in any browser\n\n\nmodule.exports = function fallbackApi(dataTransfer) {\n  const files = toArray(dataTransfer.files);\n  return Promise.resolve(files);\n};", "\"use strict\";\n\nconst webkitGetAsEntryApi = require('./utils/webkitGetAsEntryApi/index');\n\nconst fallbackApi = require('./utils/fallbackApi');\n/**\n * Returns a promise that resolves to the array of dropped files (if a folder is\n * dropped, and browser supports folder parsing - promise resolves to the flat\n * array of all files in all directories).\n * Each file has .relativePath prop appended to it (e.g. \"/docs/Prague/ticket_from_prague_to_ufa.pdf\")\n * if browser supports it. Otherwise it's undefined.\n *\n * @param {DataTransfer} dataTransfer\n * @param {Function} logDropError - a function that's called every time some\n * folder or some file error out (e.g. because of the folder name being too long\n * on Windows). Notice that resulting promise will always be resolved anyway.\n *\n * @returns {Promise} - Array<File>\n */\n\n\nmodule.exports = function getDroppedFiles(dataTransfer, _temp) {\n  var _dataTransfer$items;\n\n  let {\n    logDropError = () => {}\n  } = _temp === void 0 ? {} : _temp;\n\n  // Get all files from all subdirs. Works (at least) in Chrome, Mozilla, and Safari\n  if ((_dataTransfer$items = dataTransfer.items) != null && _dataTransfer$items[0] && 'webkitGetAsEntry' in dataTransfer.items[0]) {\n    return webkitGetAsEntryApi(dataTransfer, logDropError); // Otherwise just return all first-order files\n  }\n\n  return fallbackApi(dataTransfer);\n};", "\"use strict\";\n\nmodule.exports = ['a[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'area[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'input:not([disabled]):not([inert]):not([aria-hidden])', 'select:not([disabled]):not([inert]):not([aria-hidden])', 'textarea:not([disabled]):not([inert]):not([aria-hidden])', 'button:not([disabled]):not([inert]):not([aria-hidden])', 'iframe:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'object:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'embed:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', '[contenteditable]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', '[tabindex]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])'];", "/**\n * @returns {HTMLElement} - either dashboard element, or the overlay that's most on top\n */\nmodule.exports = function getActiveOverlayEl(dashboardEl, activeOverlayType) {\n  if (activeOverlayType) {\n    const overlayEl = dashboardEl.querySelector(`[data-uppy-paneltype=\"${activeOverlayType}\"]`); // if an overlay is already mounted\n\n    if (overlayEl) return overlayEl;\n  }\n\n  return dashboardEl;\n};", "const toArray = require('@uppy/utils/lib/toArray');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst getActiveOverlayEl = require('./getActiveOverlayEl');\n\nfunction focusOnFirstNode(event, nodes) {\n  const node = nodes[0];\n\n  if (node) {\n    node.focus();\n    event.preventDefault();\n  }\n}\n\nfunction focusOnLastNode(event, nodes) {\n  const node = nodes[nodes.length - 1];\n\n  if (node) {\n    node.focus();\n    event.preventDefault();\n  }\n} // ___Why not just use (focusedItemIndex === -1)?\n//    Firefox thinks <ul> is focusable, but we don't have <ul>s in our FOCUSABLE_ELEMENTS. Which means that if we tab into\n//    the <ul>, code will think that we are not in the active overlay, and we should focusOnFirstNode() of the currently\n//    active overlay!\n//    [Practical check] if we use (focusedItemIndex === -1), instagram provider in firefox will never get focus on its pics\n//    in the <ul>.\n\n\nfunction isFocusInOverlay(activeOverlayEl) {\n  return activeOverlayEl.contains(document.activeElement);\n}\n\nfunction trapFocus(event, activeOverlayType, dashboardEl) {\n  const activeOverlayEl = getActiveOverlayEl(dashboardEl, activeOverlayType);\n  const focusableNodes = toArray(activeOverlayEl.querySelectorAll(FOCUSABLE_ELEMENTS));\n  const focusedItemIndex = focusableNodes.indexOf(document.activeElement); // If we pressed tab, and focus is not yet within the current overlay - focus on\n  // the first element within the current overlay.\n  // This is a safety measure (for when user returns from another tab e.g.), most\n  // plugins will try to focus on some important element as it loads.\n\n  if (!isFocusInOverlay(activeOverlayEl)) {\n    focusOnFirstNode(event, focusableNodes); // If we pressed shift + tab, and we're on the first element of a modal\n  } else if (event.shiftKey && focusedItemIndex === 0) {\n    focusOnLastNode(event, focusableNodes); // If we pressed tab, and we're on the last element of the modal\n  } else if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n    focusOnFirstNode(event, focusableNodes);\n  }\n}\n\nmodule.exports = {\n  // Traps focus inside of the currently open overlay (e.g. Dashboard, or e.g. Instagram),\n  // never lets focus disappear from the modal.\n  forModal: (event, activeOverlayType, dashboardEl) => {\n    trapFocus(event, activeOverlayType, dashboardEl);\n  },\n  // Traps focus inside of the currently open overlay, unless overlay is null - then let the user tab away.\n  forInline: (event, activeOverlayType, dashboardEl) => {\n    // ___When we're in the bare 'Drop files here, paste, browse or import from' screen\n    if (activeOverlayType === null) {// Do nothing and let the browser handle it, user can tab away from Uppy to other elements on the page\n      // ___When there is some overlay with 'Done' button\n    } else {\n      // Trap the focus inside this overlay!\n      // User can close the overlay (click 'Done') if they want to travel away from Uppy.\n      trapFocus(event, activeOverlayType, dashboardEl);\n    }\n  }\n};", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n", "const debounce = require('lodash.debounce');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst getActiveOverlayEl = require('./getActiveOverlayEl');\n/*\n  Focuses on some element in the currently topmost overlay.\n\n  1. If there are some [data-uppy-super-focusable] elements rendered already - focuses\n     on the first superfocusable element, and leaves focus up to the control of\n     a user (until currently focused element disappears from the screen [which\n     can happen when overlay changes, or, e.g., when we click on a folder in googledrive]).\n  2. If there are no [data-uppy-super-focusable] elements yet (or ever) - focuses\n     on the first focusable element, but switches focus if superfocusable elements appear on next render.\n*/\n\n\nmodule.exports = function createSuperFocus() {\n  let lastFocusWasOnSuperFocusableEl = false;\n\n  const superFocus = (dashboardEl, activeOverlayType) => {\n    const overlayEl = getActiveOverlayEl(dashboardEl, activeOverlayType);\n    const isFocusInOverlay = overlayEl.contains(document.activeElement); // If focus is already in the topmost overlay, AND on last update we focused on the superfocusable\n    // element - then leave focus up to the user.\n    // [Practical check] without this line, typing in the search input in googledrive overlay won't work.\n\n    if (isFocusInOverlay && lastFocusWasOnSuperFocusableEl) return;\n    const superFocusableEl = overlayEl.querySelector('[data-uppy-super-focusable]'); // If we are already in the topmost overlay, AND there are no super focusable elements yet, - leave focus up to the user.\n    // [Practical check] without this line, if you are in an empty folder in google drive, and something's uploading in the\n    // bg, - focus will be jumping to Done all the time.\n\n    if (isFocusInOverlay && !superFocusableEl) return;\n\n    if (superFocusableEl) {\n      superFocusableEl.focus({\n        preventScroll: true\n      });\n      lastFocusWasOnSuperFocusableEl = true;\n    } else {\n      const firstEl = overlayEl.querySelector(FOCUSABLE_ELEMENTS);\n      firstEl == null ? void 0 : firstEl.focus({\n        preventScroll: true\n      });\n      lastFocusWasOnSuperFocusableEl = false;\n    }\n  }; // ___Why do we need to debounce?\n  //    1. To deal with animations: overlay changes via animations, which results in the DOM updating AFTER plugin.update()\n  //       already executed.\n  //    [Practical check] without debounce, if we open the Url overlay, and click 'Done', Dashboard won't get focused again.\n  //    [Practical check] if we delay 250ms instead of 260ms - IE11 won't get focused in same situation.\n  //    2. Performance: there can be many state update()s in a second, and this function is called every time.\n\n\n  return debounce(superFocus, 260);\n};", "'use strict';\n\nvar safeIsNaN = Number.isNaN ||\n    function ponyfill(value) {\n        return typeof value === 'number' && value !== value;\n    };\nfunction isEqual(first, second) {\n    if (first === second) {\n        return true;\n    }\n    if (safeIsNaN(first) && safeIsNaN(second)) {\n        return true;\n    }\n    return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n    if (newInputs.length !== lastInputs.length) {\n        return false;\n    }\n    for (var i = 0; i < newInputs.length; i++) {\n        if (!isEqual(newInputs[i], lastInputs[i])) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n    if (isEqual === void 0) { isEqual = areInputsEqual; }\n    var lastThis;\n    var lastArgs = [];\n    var lastResult;\n    var calledOnce = false;\n    function memoized() {\n        var newArgs = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            newArgs[_i] = arguments[_i];\n        }\n        if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n            return lastResult;\n        }\n        lastResult = resultFn.apply(this, newArgs);\n        calledOnce = true;\n        lastThis = this;\n        lastArgs = newArgs;\n        return lastResult;\n    }\n    return memoized;\n}\n\nmodule.exports = memoizeOne;\n", "\"use strict\";\n\n/**\n * Checks if the browser supports Drag & Drop (not supported on mobile devices, for example).\n *\n * @returns {boolean}\n */\nmodule.exports = function isDragDropSupported() {\n  const div = document.body;\n\n  if (!('draggable' in div) || !('ondragstart' in div && 'ondrop' in div)) {\n    return false;\n  }\n\n  if (!('FormData' in window)) {\n    return false;\n  }\n\n  if (!('FileReader' in window)) {\n    return false;\n  }\n\n  return true;\n};", "module.exports = function isShallowEqual (a, b) {\n  if (a === b) return true\n  for (var i in a) if (!(i in b)) return false\n  for (var i in b) if (a[i] !== b[i]) return false\n  return true\n}\n", "const {\n  h\n} = require('preact');\n\nfunction iconImage() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"g\", {\n    fill: \"#686DE0\",\n    fillRule: \"evenodd\"\n  }, h(\"path\", {\n    d: \"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z\",\n    fillRule: \"nonzero\"\n  }), h(\"path\", {\n    d: \"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z\",\n    fillRule: \"nonzero\"\n  }), h(\"circle\", {\n    cx: \"7.5\",\n    cy: \"9.5\",\n    r: \"1.5\"\n  })));\n}\n\nfunction iconAudio() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z\",\n    fill: \"#049BCF\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconVideo() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z\",\n    fill: \"#19AF67\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconPDF() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z\",\n    fill: \"#E2514A\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconArchive() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z\",\n    fill: \"#00C469\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconFile() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"g\", {\n    fill: \"#A7AFB7\",\n    fillRule: \"nonzero\"\n  }, h(\"path\", {\n    d: \"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z\"\n  }), h(\"path\", {\n    d: \"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z\"\n  })));\n}\n\nfunction iconText() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z\",\n    fill: \"#5A5E69\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nmodule.exports = function getIconByMime(fileType) {\n  const defaultChoice = {\n    color: '#838999',\n    icon: iconFile()\n  };\n  if (!fileType) return defaultChoice;\n  const fileTypeGeneral = fileType.split('/')[0];\n  const fileTypeSpecific = fileType.split('/')[1]; // Text\n\n  if (fileTypeGeneral === 'text') {\n    return {\n      color: '#5a5e69',\n      icon: iconText()\n    };\n  } // Image\n\n\n  if (fileTypeGeneral === 'image') {\n    return {\n      color: '#686de0',\n      icon: iconImage()\n    };\n  } // Audio\n\n\n  if (fileTypeGeneral === 'audio') {\n    return {\n      color: '#068dbb',\n      icon: iconAudio()\n    };\n  } // Video\n\n\n  if (fileTypeGeneral === 'video') {\n    return {\n      color: '#19af67',\n      icon: iconVideo()\n    };\n  } // PDF\n\n\n  if (fileTypeGeneral === 'application' && fileTypeSpecific === 'pdf') {\n    return {\n      color: '#e25149',\n      icon: iconPDF()\n    };\n  } // Archive\n\n\n  const archiveTypes = ['zip', 'x-7z-compressed', 'x-rar-compressed', 'x-tar', 'x-gzip', 'x-apple-diskimage'];\n\n  if (fileTypeGeneral === 'application' && archiveTypes.indexOf(fileTypeSpecific) !== -1) {\n    return {\n      color: '#00C469',\n      icon: iconArchive()\n    };\n  }\n\n  return defaultChoice;\n};", "const {\n  h\n} = require('preact');\n\nconst getFileTypeIcon = require('../utils/getFileTypeIcon');\n\nmodule.exports = function FilePreview(props) {\n  const {\n    file\n  } = props;\n\n  if (file.preview) {\n    return h(\"img\", {\n      className: \"uppy-Dashboard-Item-previewImg\",\n      alt: file.name,\n      src: file.preview\n    });\n  }\n\n  const {\n    color,\n    icon\n  } = getFileTypeIcon(file.type);\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-previewIconWrap\"\n  }, h(\"span\", {\n    className: \"uppy-Dashboard-Item-previewIcon\",\n    style: {\n      color\n    }\n  }, icon), h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-Dashboard-Item-previewIconBg\",\n    width: \"58\",\n    height: \"76\",\n    viewBox: \"0 0 58 76\"\n  }, h(\"rect\", {\n    fill: \"#FFF\",\n    width: \"58\",\n    height: \"76\",\n    rx: \"3\",\n    fillRule: \"evenodd\"\n  })));\n};", "const {\n  h\n} = require('preact');\n\nconst metaFieldIdToName = (metaFieldId, metaFields) => {\n  const field = metaFields.filter(f => f.id === metaFieldId);\n  return field[0].name;\n};\n\nmodule.exports = function renderMissingMetaFieldsError(props) {\n  const {\n    file,\n    toggleFileCard,\n    i18n,\n    metaFields\n  } = props;\n  const {\n    missingRequiredMetaFields\n  } = file;\n\n  if (!(missingRequiredMetaFields != null && missingRequiredMetaFields.length)) {\n    return null;\n  }\n\n  const metaFieldsString = missingRequiredMetaFields.map(missingMetaField => metaFieldIdToName(missingMetaField, metaFields)).join(', ');\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-errorMessage\"\n  }, i18n('missingRequiredMetaFields', {\n    smart_count: missingRequiredMetaFields.length,\n    fields: metaFieldsString\n  }), ' ', h(\"button\", {\n    type: \"button\",\n    class: \"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn\",\n    onClick: () => toggleFileCard(true, file.id)\n  }, i18n('editFile')));\n};", "const {\n  h\n} = require('preact');\n\nconst FilePreview = require('../../FilePreview');\n\nconst MetaErrorMessage = require('../MetaErrorMessage');\n\nconst getFileTypeIcon = require('../../../utils/getFileTypeIcon');\n\nmodule.exports = function FilePreviewAndLink(props) {\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-previewInnerWrap\",\n    style: {\n      backgroundColor: getFileTypeIcon(props.file.type).color\n    }\n  }, props.showLinkToFileUploadResult && props.file.uploadURL && h(\"a\", {\n    className: \"uppy-Dashboard-Item-previewLink\",\n    href: props.file.uploadURL,\n    rel: \"noreferrer noopener\",\n    target: \"_blank\",\n    \"aria-label\": props.file.meta.name\n  }, h(\"span\", {\n    hidden: true\n  }, props.file.meta.name)), h(FilePreview, {\n    file: props.file\n  }), h(MetaErrorMessage, {\n    file: props.file,\n    i18n: props.i18n,\n    toggleFileCard: props.toggleFileCard,\n    metaFields: props.metaFields\n  }));\n};", "const {\n  h\n} = require('preact');\n\nfunction onPauseResumeCancelRetry(props) {\n  if (props.isUploaded) return;\n\n  if (props.error && !props.hideRetryButton) {\n    props.uppy.retryUpload(props.file.id);\n    return;\n  }\n\n  if (props.resumableUploads && !props.hidePauseResumeButton) {\n    props.uppy.pauseResume(props.file.id);\n  } else if (props.individualCancellation && !props.hideCancelButton) {\n    props.uppy.removeFile(props.file.id);\n  }\n}\n\nfunction progressIndicatorTitle(props) {\n  if (props.isUploaded) {\n    return props.i18n('uploadComplete');\n  }\n\n  if (props.error) {\n    return props.i18n('retryUpload');\n  }\n\n  if (props.resumableUploads) {\n    if (props.file.isPaused) {\n      return props.i18n('resumeUpload');\n    }\n\n    return props.i18n('pauseUpload');\n  }\n\n  if (props.individualCancellation) {\n    return props.i18n('cancelUpload');\n  }\n\n  return '';\n}\n\nfunction ProgressIndicatorButton(props) {\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-progress\"\n  }, h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-progressIndicator\",\n    type: \"button\",\n    \"aria-label\": progressIndicatorTitle(props),\n    title: progressIndicatorTitle(props),\n    onClick: () => onPauseResumeCancelRetry(props)\n  }, props.children));\n}\n\nfunction ProgressCircleContainer(_ref) {\n  let {\n    children\n  } = _ref;\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"70\",\n    height: \"70\",\n    viewBox: \"0 0 36 36\",\n    className: \"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle\"\n  }, children);\n}\n\nfunction ProgressCircle(_ref2) {\n  let {\n    progress\n  } = _ref2;\n  // circle length equals 2 * PI * R\n  const circleLength = 2 * Math.PI * 15;\n  return h(\"g\", null, h(\"circle\", {\n    className: \"uppy-Dashboard-Item-progressIcon--bg\",\n    r: \"15\",\n    cx: \"18\",\n    cy: \"18\",\n    \"stroke-width\": \"2\",\n    fill: \"none\"\n  }), h(\"circle\", {\n    className: \"uppy-Dashboard-Item-progressIcon--progress\",\n    r: \"15\",\n    cx: \"18\",\n    cy: \"18\",\n    transform: \"rotate(-90, 18, 18)\",\n    fill: \"none\",\n    \"stroke-width\": \"2\",\n    \"stroke-dasharray\": circleLength,\n    \"stroke-dashoffset\": circleLength - circleLength / 100 * progress\n  }));\n}\n\nmodule.exports = function FileProgress(props) {\n  // Nothing if upload has not started\n  if (!props.file.progress.uploadStarted) {\n    return null;\n  } // Green checkmark when complete\n\n\n  if (props.isUploaded) {\n    return h(\"div\", {\n      className: \"uppy-Dashboard-Item-progress\"\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-Item-progressIndicator\"\n    }, h(ProgressCircleContainer, null, h(\"circle\", {\n      r: \"15\",\n      cx: \"18\",\n      cy: \"18\",\n      fill: \"#1bb240\"\n    }), h(\"polygon\", {\n      className: \"uppy-Dashboard-Item-progressIcon--check\",\n      transform: \"translate(2, 3)\",\n      points: \"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634\"\n    }))));\n  }\n\n  if (props.recoveredState) {\n    return;\n  } // Retry button for error\n\n\n  if (props.error && !props.hideRetryButton) {\n    return h(ProgressIndicatorButton, props, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry\",\n      width: \"28\",\n      height: \"31\",\n      viewBox: \"0 0 16 19\"\n    }, h(\"path\", {\n      d: \"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z\"\n    }), h(\"path\", {\n      d: \"M7.9 3H10v2H7.9z\"\n    }), h(\"path\", {\n      d: \"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z\"\n    }), h(\"path\", {\n      d: \"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z\"\n    })));\n  } // Pause/resume button for resumable uploads\n\n\n  if (props.resumableUploads && !props.hidePauseResumeButton) {\n    return h(ProgressIndicatorButton, props, h(ProgressCircleContainer, null, h(ProgressCircle, {\n      progress: props.file.progress.percentage\n    }), props.file.isPaused ? h(\"polygon\", {\n      className: \"uppy-Dashboard-Item-progressIcon--play\",\n      transform: \"translate(3, 3)\",\n      points: \"12 20 12 10 20 15\"\n    }) : h(\"g\", {\n      className: \"uppy-Dashboard-Item-progressIcon--pause\",\n      transform: \"translate(14.5, 13)\"\n    }, h(\"rect\", {\n      x: \"0\",\n      y: \"0\",\n      width: \"2\",\n      height: \"10\",\n      rx: \"0\"\n    }), h(\"rect\", {\n      x: \"5\",\n      y: \"0\",\n      width: \"2\",\n      height: \"10\",\n      rx: \"0\"\n    }))));\n  } // Cancel button for non-resumable uploads if individualCancellation is supported (not bundled)\n\n\n  if (!props.resumableUploads && props.individualCancellation && !props.hideCancelButton) {\n    return h(ProgressIndicatorButton, props, h(ProgressCircleContainer, null, h(ProgressCircle, {\n      progress: props.file.progress.percentage\n    }), h(\"polygon\", {\n      className: \"cancel\",\n      transform: \"translate(2, 2)\",\n      points: \"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12\"\n    })));\n  } // Just progress when buttons are disabled\n\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-progress\"\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-Item-progressIndicator\"\n  }, h(ProgressCircleContainer, null, h(ProgressCircle, {\n    progress: props.file.progress.percentage\n  }))));\n};", "\"use strict\";\n\n/**\n * Truncates a string to the given number of chars (maxLength) by inserting '...' in the middle of that string.\n * Partially taken from https://stackoverflow.com/a/5723274/3192470.\n *\n * @param {string} string - string to be truncated\n * @param {number} maxLength - maximum size of the resulting string\n * @returns {string}\n */\nconst separator = '...';\n\nmodule.exports = function truncateString(string, maxLength) {\n  // Return the empty string if maxLength is zero\n  if (maxLength === 0) return ''; // Return original string if it's already shorter than maxLength\n\n  if (string.length <= maxLength) return string; // Return truncated substring appended of the ellipsis char if string can't be meaningfully truncated\n\n  if (maxLength <= separator.length + 1) return `${string.slice(0, maxLength - 1)}\u2026`;\n  const charsToShow = maxLength - separator.length;\n  const frontChars = Math.ceil(charsToShow / 2);\n  const backChars = Math.floor(charsToShow / 2);\n  return string.slice(0, frontChars) + separator + string.slice(-backChars);\n};", "const {\n  h,\n  Fragment\n} = require('preact');\n\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst truncateString = require('@uppy/utils/lib/truncateString');\n\nconst MetaErrorMessage = require('../MetaErrorMessage');\n\nconst renderFileName = props => {\n  const {\n    author,\n    name\n  } = props.file.meta;\n\n  function getMaxNameLength() {\n    if (props.containerWidth <= 352) {\n      return 35;\n    }\n\n    if (props.containerWidth <= 576) {\n      return 60;\n    } // When `author` is present, we want to make sure\n    // the file name fits on one line so we can place\n    // the author on the second line.\n\n\n    return author ? 20 : 30;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-name\",\n    title: name\n  }, truncateString(name, getMaxNameLength()));\n};\n\nconst renderAuthor = props => {\n  const {\n    author\n  } = props.file.meta;\n  const {\n    providerName\n  } = props.file.remote;\n  const dot = `\\u00B7`;\n\n  if (!author) {\n    return null;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-author\"\n  }, h(\"a\", {\n    href: `${author.url}?utm_source=Companion&utm_medium=referral`,\n    target: \"_blank\",\n    rel: \"noopener noreferrer\"\n  }, truncateString(author.name, 13)), providerName ? h(Fragment, null, ` ${dot} `, providerName, ` ${dot} `) : null);\n};\n\nconst renderFileSize = props => props.file.size && h(\"div\", {\n  className: \"uppy-Dashboard-Item-statusSize\"\n}, prettierBytes(props.file.size));\n\nconst ReSelectButton = props => props.file.isGhost && h(\"span\", null, ' \\u2022 ', h(\"button\", {\n  className: \"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect\",\n  type: \"button\",\n  onClick: props.toggleAddFilesPanel\n}, props.i18n('reSelect')));\n\nconst ErrorButton = _ref => {\n  let {\n    file,\n    onClick\n  } = _ref;\n\n  if (file.error) {\n    return h(\"button\", {\n      className: \"uppy-u-reset uppy-Dashboard-Item-errorDetails\",\n      \"aria-label\": file.error,\n      \"data-microtip-position\": \"bottom\",\n      \"data-microtip-size\": \"medium\",\n      onClick: onClick,\n      type: \"button\"\n    }, \"?\");\n  }\n\n  return null;\n};\n\nmodule.exports = function FileInfo(props) {\n  const {\n    file\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-fileInfo\",\n    \"data-uppy-file-source\": file.source\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-Item-fileName\"\n  }, renderFileName(props), h(ErrorButton, {\n    file: props.file // eslint-disable-next-line no-alert\n    ,\n    onClick: () => alert(props.file.error) // TODO: move to a custom alert implementation\n\n  })), h(\"div\", {\n    className: \"uppy-Dashboard-Item-status\"\n  }, renderAuthor(props), renderFileSize(props), ReSelectButton(props)), h(MetaErrorMessage, {\n    file: props.file,\n    i18n: props.i18n,\n    toggleFileCard: props.toggleFileCard,\n    metaFields: props.metaFields\n  }));\n};", "/**\n * Copies text to clipboard by creating an almost invisible textarea,\n * adding text there, then running execCommand('copy').\n * Falls back to prompt() when the easy way fails (hello, Safari!)\n * From http://stackoverflow.com/a/30810322\n *\n * @param {string} textToCopy\n * @param {string} fallbackString\n * @returns {Promise}\n */\nmodule.exports = function copyToClipboard(textToCopy, fallbackString) {\n  fallbackString = fallbackString || 'Copy the URL below';\n  return new Promise(resolve => {\n    const textArea = document.createElement('textarea');\n    textArea.setAttribute('style', {\n      position: 'fixed',\n      top: 0,\n      left: 0,\n      width: '2em',\n      height: '2em',\n      padding: 0,\n      border: 'none',\n      outline: 'none',\n      boxShadow: 'none',\n      background: 'transparent'\n    });\n    textArea.value = textToCopy;\n    document.body.appendChild(textArea);\n    textArea.select();\n\n    const magicCopyFailed = () => {\n      document.body.removeChild(textArea); // eslint-disable-next-line no-alert\n\n      window.prompt(fallbackString, textToCopy);\n      resolve();\n    };\n\n    try {\n      const successful = document.execCommand('copy');\n\n      if (!successful) {\n        return magicCopyFailed('copy command unavailable');\n      }\n\n      document.body.removeChild(textArea);\n      return resolve();\n    } catch (err) {\n      document.body.removeChild(textArea);\n      return magicCopyFailed(err);\n    }\n  });\n};", "const {\n  h\n} = require('preact');\n\nconst copyToClipboard = require('../../../utils/copyToClipboard');\n\nfunction EditButton(_ref) {\n  let {\n    file,\n    uploadInProgressOrComplete,\n    metaFields,\n    canEditFile,\n    i18n,\n    onClick\n  } = _ref;\n\n  if (!uploadInProgressOrComplete && metaFields && metaFields.length > 0 || !uploadInProgressOrComplete && canEditFile(file)) {\n    return h(\"button\", {\n      className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit\",\n      type: \"button\",\n      \"aria-label\": i18n('editFileWithFilename', {\n        file: file.meta.name\n      }),\n      title: i18n('editFileWithFilename', {\n        file: file.meta.name\n      }),\n      onClick: () => onClick()\n    }, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon\",\n      width: \"14\",\n      height: \"14\",\n      viewBox: \"0 0 14 14\"\n    }, h(\"g\", {\n      fillRule: \"evenodd\"\n    }, h(\"path\", {\n      d: \"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z\",\n      fillRule: \"nonzero\"\n    }), h(\"rect\", {\n      x: \"1\",\n      y: \"12.293\",\n      width: \"11\",\n      height: \"1\",\n      rx: \".5\"\n    }), h(\"path\", {\n      fillRule: \"nonzero\",\n      d: \"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z\"\n    }))));\n  }\n\n  return null;\n}\n\nfunction RemoveButton(_ref2) {\n  let {\n    i18n,\n    onClick,\n    file\n  } = _ref2;\n  return h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove\",\n    type: \"button\",\n    \"aria-label\": i18n('removeFile', {\n      file: file.meta.name\n    }),\n    title: i18n('removeFile', {\n      file: file.meta.name\n    }),\n    onClick: () => onClick()\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"18\",\n    height: \"18\",\n    viewBox: \"0 0 18 18\"\n  }, h(\"path\", {\n    d: \"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: \"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z\"\n  })));\n}\n\nconst copyLinkToClipboard = (event, props) => {\n  copyToClipboard(props.file.uploadURL, props.i18n('copyLinkToClipboardFallback')).then(() => {\n    props.uppy.log('Link copied to clipboard.');\n    props.uppy.info(props.i18n('copyLinkToClipboardSuccess'), 'info', 3000);\n  }).catch(props.uppy.log) // avoid losing focus\n  .then(() => event.target.focus({\n    preventScroll: true\n  }));\n};\n\nfunction CopyLinkButton(props) {\n  const {\n    i18n\n  } = props;\n  return h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink\",\n    type: \"button\",\n    \"aria-label\": i18n('copyLink'),\n    title: i18n('copyLink'),\n    onClick: event => copyLinkToClipboard(event, props)\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"14\",\n    height: \"14\",\n    viewBox: \"0 0 14 12\"\n  }, h(\"path\", {\n    d: \"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z\"\n  })));\n}\n\nmodule.exports = function Buttons(props) {\n  const {\n    uppy,\n    file,\n    uploadInProgressOrComplete,\n    canEditFile,\n    metaFields,\n    showLinkToFileUploadResult,\n    showRemoveButton,\n    i18n,\n    toggleFileCard,\n    openFileEditor\n  } = props;\n\n  const editAction = () => {\n    if (metaFields && metaFields.length > 0) {\n      toggleFileCard(true, file.id);\n    } else {\n      openFileEditor(file);\n    }\n  };\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-actionWrapper\"\n  }, h(EditButton, {\n    i18n: i18n,\n    file: file,\n    uploadInProgressOrComplete: uploadInProgressOrComplete,\n    canEditFile: canEditFile,\n    metaFields: metaFields,\n    onClick: editAction\n  }), showLinkToFileUploadResult && file.uploadURL ? h(CopyLinkButton, {\n    file: file,\n    uppy: uppy,\n    i18n: i18n\n  }) : null, showRemoveButton ? h(RemoveButton, {\n    i18n: i18n,\n    file: file,\n    uppy: uppy,\n    onClick: () => props.uppy.removeFile(file.id, 'removed-by-user')\n  }) : null);\n};", "const {\n  h,\n  Component\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst shallowEqual = require('is-shallow-equal');\n\nconst FilePreviewAndLink = require('./FilePreviewAndLink');\n\nconst FileProgress = require('./FileProgress');\n\nconst FileInfo = require('./FileInfo');\n\nconst Buttons = require('./Buttons');\n\nmodule.exports = class FileItem extends Component {\n  componentDidMount() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleRequestThumbnail(file);\n    }\n  }\n\n  shouldComponentUpdate(nextProps) {\n    return !shallowEqual(this.props, nextProps);\n  } // VirtualList mounts FileItems again and they emit `thumbnail:request`\n  // Otherwise thumbnails are broken or missing after Golden Retriever restores files\n\n\n  componentDidUpdate() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleRequestThumbnail(file);\n    }\n  }\n\n  componentWillUnmount() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleCancelThumbnail(file);\n    }\n  }\n\n  render() {\n    const {\n      file\n    } = this.props;\n    const isProcessing = file.progress.preprocess || file.progress.postprocess;\n    const isUploaded = file.progress.uploadComplete && !isProcessing && !file.error;\n    const uploadInProgressOrComplete = file.progress.uploadStarted || isProcessing;\n    const uploadInProgress = file.progress.uploadStarted && !file.progress.uploadComplete || isProcessing;\n    const error = file.error || false; // File that Golden Retriever was able to partly restore (only meta, not blob),\n    // users still need to re-add it, so it\u2019s a ghost\n\n    const {\n      isGhost\n    } = file;\n    let showRemoveButton = this.props.individualCancellation ? !isUploaded : !uploadInProgress && !isUploaded;\n\n    if (isUploaded && this.props.showRemoveButtonAfterComplete) {\n      showRemoveButton = true;\n    }\n\n    const dashboardItemClass = classNames({\n      'uppy-Dashboard-Item': true,\n      'is-inprogress': uploadInProgress && !this.props.recoveredState,\n      'is-processing': isProcessing,\n      'is-complete': isUploaded,\n      'is-error': !!error,\n      'is-resumable': this.props.resumableUploads,\n      'is-noIndividualCancellation': !this.props.individualCancellation,\n      'is-ghost': isGhost\n    });\n    return h(\"div\", {\n      className: dashboardItemClass,\n      id: `uppy_${file.id}`,\n      role: this.props.role\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-Item-preview\"\n    }, h(FilePreviewAndLink, {\n      file: file,\n      showLinkToFileUploadResult: this.props.showLinkToFileUploadResult,\n      i18n: this.props.i18n,\n      toggleFileCard: this.props.toggleFileCard,\n      metaFields: this.props.metaFields\n    }), h(FileProgress, {\n      uppy: this.props.uppy,\n      file: file,\n      error: error,\n      isUploaded: isUploaded,\n      hideRetryButton: this.props.hideRetryButton,\n      hideCancelButton: this.props.hideCancelButton,\n      hidePauseResumeButton: this.props.hidePauseResumeButton,\n      recoveredState: this.props.recoveredState,\n      showRemoveButtonAfterComplete: this.props.showRemoveButtonAfterComplete,\n      resumableUploads: this.props.resumableUploads,\n      individualCancellation: this.props.individualCancellation,\n      i18n: this.props.i18n\n    })), h(\"div\", {\n      className: \"uppy-Dashboard-Item-fileInfoAndButtons\"\n    }, h(FileInfo, {\n      file: file,\n      id: this.props.id,\n      acquirers: this.props.acquirers,\n      containerWidth: this.props.containerWidth,\n      i18n: this.props.i18n,\n      toggleAddFilesPanel: this.props.toggleAddFilesPanel,\n      toggleFileCard: this.props.toggleFileCard,\n      metaFields: this.props.metaFields\n    }), h(Buttons, {\n      file: file,\n      metaFields: this.props.metaFields,\n      showLinkToFileUploadResult: this.props.showLinkToFileUploadResult,\n      showRemoveButton: showRemoveButton,\n      canEditFile: this.props.canEditFile,\n      uploadInProgressOrComplete: uploadInProgressOrComplete,\n      toggleFileCard: this.props.toggleFileCard,\n      openFileEditor: this.props.openFileEditor,\n      uppy: this.props.uppy,\n      i18n: this.props.i18n\n    })));\n  }\n\n};", "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Adapted from preact-virtual-list: https://github.com/developit/preact-virtual-list\n *\n * \u00A9 2016 Jason Miller\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Adaptations:\n * - Added role=presentation to helper elements\n * - Tweaked styles for Uppy's Dashboard use case\n */\nconst {\n  h,\n  Component\n} = require('preact');\n\nconst STYLE_INNER = {\n  position: 'relative',\n  // Disabled for our use case: the wrapper elements around FileList already deal with overflow,\n  // and this additional property would hide things that we want to show.\n  //\n  // overflow: 'hidden',\n  width: '100%',\n  minHeight: '100%'\n};\nconst STYLE_CONTENT = {\n  position: 'absolute',\n  top: 0,\n  left: 0,\n  // Because the `top` value gets set to some offset, this `height` being 100% would make the scrollbar\n  // stretch far beyond the content. For our use case, the content div actually can get its height from\n  // the elements inside it, so we don't need to specify a `height` property at all.\n  //\n  // height: '100%',\n  width: '100%',\n  overflow: 'visible'\n};\n\nclass VirtualList extends Component {\n  constructor(props) {\n    super(props); // The currently focused node, used to retain focus when the visible rows change.\n    // To avoid update loops, this should not cause state updates, so it's kept as a plain property.\n\n    this.handleScroll = () => {\n      this.setState({\n        offset: this.base.scrollTop\n      });\n    };\n\n    this.handleResize = () => {\n      this.resize();\n    };\n\n    this.focusElement = null;\n    this.state = {\n      offset: 0,\n      height: 0\n    };\n  }\n\n  componentDidMount() {\n    this.resize();\n    window.addEventListener('resize', this.handleResize);\n  } // TODO: refactor to stable lifecycle method\n  // eslint-disable-next-line\n\n\n  componentWillUpdate() {\n    if (this.base.contains(document.activeElement)) {\n      this.focusElement = document.activeElement;\n    }\n  }\n\n  componentDidUpdate() {\n    // Maintain focus when rows are added and removed.\n    if (this.focusElement && this.focusElement.parentNode && document.activeElement !== this.focusElement) {\n      this.focusElement.focus();\n    }\n\n    this.focusElement = null;\n    this.resize();\n  }\n\n  componentWillUnmount() {\n    window.removeEventListener('resize', this.handleResize);\n  }\n\n  resize() {\n    const {\n      height\n    } = this.state;\n\n    if (height !== this.base.offsetHeight) {\n      this.setState({\n        height: this.base.offsetHeight\n      });\n    }\n  }\n\n  render(_ref) {\n    let {\n      data,\n      rowHeight,\n      renderRow,\n      overscanCount = 10,\n      ...props\n    } = _ref;\n    const {\n      offset,\n      height\n    } = this.state; // first visible row index\n\n    let start = Math.floor(offset / rowHeight); // actual number of visible rows (without overscan)\n\n    let visibleRowCount = Math.floor(height / rowHeight); // Overscan: render blocks of rows modulo an overscan row count\n    // This dramatically reduces DOM writes during scrolling\n\n    if (overscanCount) {\n      start = Math.max(0, start - start % overscanCount);\n      visibleRowCount += overscanCount;\n    } // last visible + overscan row index + padding to allow keyboard focus to travel past the visible area\n\n\n    const end = start + visibleRowCount + 4; // data slice currently in viewport plus overscan items\n\n    const selection = data.slice(start, end);\n    const styleInner = { ...STYLE_INNER,\n      height: data.length * rowHeight\n    };\n    const styleContent = { ...STYLE_CONTENT,\n      top: start * rowHeight\n    }; // The `role=\"presentation\"` attributes ensure that these wrapper elements are not treated as list\n    // items by accessibility and outline tools.\n\n    return h(\"div\", _extends({\n      onScroll: this.handleScroll\n    }, props), h(\"div\", {\n      role: \"presentation\",\n      style: styleInner\n    }, h(\"div\", {\n      role: \"presentation\",\n      style: styleContent\n    }, selection.map(renderRow))));\n  }\n\n}\n\nmodule.exports = VirtualList;", "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst classNames = require('classnames');\n\nconst {\n  h\n} = require('preact');\n\nconst FileItem = require('./FileItem/index.js');\n\nconst VirtualList = require('./VirtualList');\n\nfunction chunks(list, size) {\n  const chunked = [];\n  let currentChunk = [];\n  list.forEach(item => {\n    if (currentChunk.length < size) {\n      currentChunk.push(item);\n    } else {\n      chunked.push(currentChunk);\n      currentChunk = [item];\n    }\n  });\n  if (currentChunk.length) chunked.push(currentChunk);\n  return chunked;\n}\n\nmodule.exports = props => {\n  const noFiles = props.totalFileCount === 0;\n  const dashboardFilesClass = classNames('uppy-Dashboard-files', {\n    'uppy-Dashboard-files--noFiles': noFiles\n  }); // It's not great that this is hardcoded!\n  // It's ESPECIALLY not great that this is checking against `itemsPerRow`!\n\n  const rowHeight = props.itemsPerRow === 1 // Mobile\n  ? 71 // 190px height + 2 * 5px margin\n  : 200;\n  const fileProps = {\n    // FIXME This is confusing, it's actually the Dashboard's plugin ID\n    id: props.id,\n    error: props.error,\n    // TODO move this to context\n    i18n: props.i18n,\n    uppy: props.uppy,\n    // features\n    acquirers: props.acquirers,\n    resumableUploads: props.resumableUploads,\n    individualCancellation: props.individualCancellation,\n    // visual options\n    hideRetryButton: props.hideRetryButton,\n    hidePauseResumeButton: props.hidePauseResumeButton,\n    hideCancelButton: props.hideCancelButton,\n    showLinkToFileUploadResult: props.showLinkToFileUploadResult,\n    showRemoveButtonAfterComplete: props.showRemoveButtonAfterComplete,\n    isWide: props.isWide,\n    metaFields: props.metaFields,\n    recoveredState: props.recoveredState,\n    // callbacks\n    toggleFileCard: props.toggleFileCard,\n    handleRequestThumbnail: props.handleRequestThumbnail,\n    handleCancelThumbnail: props.handleCancelThumbnail\n  };\n\n  const sortByGhostComesFirst = (file1, file2) => {\n    return props.files[file2].isGhost - props.files[file1].isGhost;\n  }; // Sort files by file.isGhost, ghost files first, only if recoveredState is present\n\n\n  const files = Object.keys(props.files);\n  if (props.recoveredState) files.sort(sortByGhostComesFirst);\n  const rows = chunks(files, props.itemsPerRow);\n\n  const renderRow = row => // The `role=\"presentation` attribute ensures that the list items are properly\n  // associated with the `VirtualList` element.\n  // We use the first file ID as the key\u2014this should not change across scroll rerenders\n  h(\"div\", {\n    role: \"presentation\",\n    key: row[0]\n  }, row.map(fileID => h(FileItem, _extends({\n    key: fileID,\n    uppy: props.uppy\n  }, fileProps, {\n    role: \"listitem\",\n    openFileEditor: props.openFileEditor,\n    canEditFile: props.canEditFile,\n    toggleAddFilesPanel: props.toggleAddFilesPanel,\n    file: props.files[fileID]\n  }))));\n\n  return h(VirtualList, {\n    class: dashboardFilesClass,\n    role: \"list\",\n    data: rows,\n    renderRow: renderRow,\n    rowHeight: rowHeight\n  });\n};", "let _Symbol$for;\n\nconst {\n  h,\n  Component\n} = require('preact');\n\n_Symbol$for = Symbol.for('uppy test: disable unused locale key warning');\n\nclass AddFiles extends Component {\n  constructor() {\n    super(...arguments);\n\n    this.triggerFileInputClick = () => {\n      this.fileInput.click();\n    };\n\n    this.triggerFolderInputClick = () => {\n      this.folderInput.click();\n    };\n\n    this.onFileInputChange = event => {\n      this.props.handleInputChange(event); // We clear the input after a file is selected, because otherwise\n      // change event is not fired in Chrome and Safari when a file\n      // with the same name is selected.\n      // ___Why not use value=\"\" on <input/> instead?\n      //    Because if we use that method of clearing the input,\n      //    Chrome will not trigger change if we drop the same file twice (Issue #768).\n\n      event.target.value = null;\n    };\n\n    this.renderHiddenInput = (isFolder, refCallback) => {\n      return h(\"input\", {\n        className: \"uppy-Dashboard-input\",\n        hidden: true,\n        \"aria-hidden\": \"true\",\n        tabIndex: -1,\n        webkitdirectory: isFolder,\n        type: \"file\",\n        name: \"files[]\",\n        multiple: this.props.maxNumberOfFiles !== 1,\n        onChange: this.onFileInputChange,\n        accept: this.props.allowedFileTypes,\n        ref: refCallback\n      });\n    };\n\n    this.renderMyDeviceAcquirer = () => {\n      return h(\"div\", {\n        className: \"uppy-DashboardTab\",\n        role: \"presentation\",\n        \"data-uppy-acquirer-id\": \"MyDevice\"\n      }, h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",\n        role: \"tab\",\n        tabIndex: 0,\n        \"data-uppy-super-focusable\": true,\n        onClick: this.triggerFileInputClick\n      }, h(\"svg\", {\n        \"aria-hidden\": \"true\",\n        focusable: \"false\",\n        width: \"32\",\n        height: \"32\",\n        viewBox: \"0 0 32 32\"\n      }, h(\"g\", {\n        fill: \"none\",\n        fillRule: \"evenodd\"\n      }, h(\"rect\", {\n        className: \"uppy-ProviderIconBg\",\n        width: \"32\",\n        height: \"32\",\n        rx: \"16\",\n        fill: \"#2275D7\"\n      }), h(\"path\", {\n        d: \"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z\",\n        fill: \"#FFF\"\n      }))), h(\"div\", {\n        className: \"uppy-DashboardTab-name\"\n      }, this.props.i18n('myDevice'))));\n    };\n\n    this.renderBrowseButton = (text, onClickFn) => {\n      const numberOfAcquirers = this.props.acquirers.length;\n      return h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-Dashboard-browse\",\n        onClick: onClickFn,\n        \"data-uppy-super-focusable\": numberOfAcquirers === 0\n      }, text);\n    };\n\n    this.renderDropPasteBrowseTagline = () => {\n      const numberOfAcquirers = this.props.acquirers.length;\n      const browseFiles = this.renderBrowseButton(this.props.i18n('browseFiles'), this.triggerFileInputClick);\n      const browseFolders = this.renderBrowseButton(this.props.i18n('browseFolders'), this.triggerFolderInputClick); // in order to keep the i18n CamelCase and options lower (as are defaults) we will want to transform a lower\n      // to Camel\n\n      const lowerFMSelectionType = this.props.fileManagerSelectionType;\n      const camelFMSelectionType = lowerFMSelectionType.charAt(0).toUpperCase() + lowerFMSelectionType.slice(1);\n      return h(\"div\", {\n        class: \"uppy-Dashboard-AddFiles-title\"\n      }, // eslint-disable-next-line no-nested-ternary\n      this.props.disableLocalFiles ? this.props.i18n('importFiles') : numberOfAcquirers > 0 ? this.props.i18nArray(`dropPasteImport${camelFMSelectionType}`, {\n        browseFiles,\n        browseFolders,\n        browse: browseFiles\n      }) : this.props.i18nArray(`dropPaste${camelFMSelectionType}`, {\n        browseFiles,\n        browseFolders,\n        browse: browseFiles\n      }));\n    };\n\n    this.renderAcquirer = acquirer => {\n      return h(\"div\", {\n        className: \"uppy-DashboardTab\",\n        role: \"presentation\",\n        \"data-uppy-acquirer-id\": acquirer.id\n      }, h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",\n        role: \"tab\",\n        tabIndex: 0,\n        \"data-cy\": acquirer.id,\n        \"aria-controls\": `uppy-DashboardContent-panel--${acquirer.id}`,\n        \"aria-selected\": this.props.activePickerPanel.id === acquirer.id,\n        \"data-uppy-super-focusable\": true,\n        onClick: () => this.props.showPanel(acquirer.id)\n      }, acquirer.icon(), h(\"div\", {\n        className: \"uppy-DashboardTab-name\"\n      }, acquirer.name)));\n    };\n\n    this.renderAcquirers = (acquirers, disableLocalFiles) => {\n      // Group last two buttons, so we don\u2019t end up with\n      // just one button on a new line\n      const acquirersWithoutLastTwo = [...acquirers];\n      const lastTwoAcquirers = acquirersWithoutLastTwo.splice(acquirers.length - 2, acquirers.length);\n      return h(\"div\", {\n        className: \"uppy-Dashboard-AddFiles-list\",\n        role: \"tablist\"\n      }, !disableLocalFiles && this.renderMyDeviceAcquirer(), acquirersWithoutLastTwo.map(acquirer => this.renderAcquirer(acquirer)), h(\"span\", {\n        role: \"presentation\",\n        style: {\n          'white-space': 'nowrap'\n        }\n      }, lastTwoAcquirers.map(acquirer => this.renderAcquirer(acquirer))));\n    };\n  }\n\n  [_Symbol$for]() {\n    // Those are actually used in `renderDropPasteBrowseTagline` method.\n    this.props.i18nArray('dropPasteBoth');\n    this.props.i18nArray('dropPasteFiles');\n    this.props.i18nArray('dropPasteFolders');\n    this.props.i18nArray('dropPasteImportBoth');\n    this.props.i18nArray('dropPasteImportFiles');\n    this.props.i18nArray('dropPasteImportFolders');\n  }\n\n  renderPoweredByUppy() {\n    const {\n      i18nArray\n    } = this.props;\n    const uppyBranding = h(\"span\", null, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon uppy-Dashboard-poweredByIcon\",\n      width: \"11\",\n      height: \"11\",\n      viewBox: \"0 0 11 11\"\n    }, h(\"path\", {\n      d: \"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z\",\n      fillRule: \"evenodd\"\n    })), h(\"span\", {\n      className: \"uppy-Dashboard-poweredByUppy\"\n    }, \"Uppy\"));\n    const linkText = i18nArray('poweredBy', {\n      uppy: uppyBranding\n    });\n    return h(\"a\", {\n      tabIndex: \"-1\",\n      href: \"https://uppy.io\",\n      rel: \"noreferrer noopener\",\n      target: \"_blank\",\n      className: \"uppy-Dashboard-poweredBy\"\n    }, linkText);\n  }\n\n  render() {\n    return h(\"div\", {\n      className: \"uppy-Dashboard-AddFiles\"\n    }, this.renderHiddenInput(false, ref => {\n      this.fileInput = ref;\n    }), this.renderHiddenInput(true, ref => {\n      this.folderInput = ref;\n    }), this.renderDropPasteBrowseTagline(), this.props.acquirers.length > 0 && this.renderAcquirers(this.props.acquirers, this.props.disableLocalFiles), h(\"div\", {\n      className: \"uppy-Dashboard-AddFiles-info\"\n    }, this.props.note && h(\"div\", {\n      className: \"uppy-Dashboard-note\"\n    }, this.props.note), this.props.proudlyDisplayPoweredByUppy && this.renderPoweredByUppy(this.props)));\n  }\n\n}\n\nmodule.exports = AddFiles;", "const {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst AddFiles = require('./AddFiles');\n\nconst AddFilesPanel = props => {\n  return h(\"div\", {\n    className: classNames('uppy-Dashboard-AddFilesPanel', props.className),\n    \"data-uppy-panelType\": \"AddFiles\",\n    \"aria-hidden\": props.showAddFilesPanel\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18n('addingMoreFiles')), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: () => props.toggleAddFilesPanel(false)\n  }, props.i18n('back'))), h(AddFiles, props));\n};\n\nmodule.exports = AddFilesPanel;", "// ignore drop/paste events if they are not in input or textarea \u2014\n// otherwise when Url plugin adds drop/paste listeners to this.el,\n// draging UI elements or pasting anything into any field triggers those events \u2014\n// Url treats them as URLs that need to be imported\nfunction ignoreEvent(ev) {\n  const {\n    tagName\n  } = ev.target;\n\n  if (tagName === 'INPUT' || tagName === 'TEXTAREA') {\n    ev.stopPropagation();\n    return;\n  }\n\n  ev.preventDefault();\n  ev.stopPropagation();\n}\n\nmodule.exports = ignoreEvent;", "const {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst ignoreEvent = require('../utils/ignoreEvent.js');\n\nfunction PickerPanelContent(props) {\n  return h(\"div\", {\n    className: classNames('uppy-DashboardContent-panel', props.className),\n    role: \"tabpanel\",\n    \"data-uppy-panelType\": \"PickerPanel\",\n    id: `uppy-DashboardContent-panel--${props.activePickerPanel.id}`,\n    onDragOver: ignoreEvent,\n    onDragLeave: ignoreEvent,\n    onDrop: ignoreEvent,\n    onPaste: ignoreEvent\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18n('importFrom', {\n    name: props.activePickerPanel.name\n  })), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: props.hideAllPanels\n  }, props.i18n('cancel'))), h(\"div\", {\n    className: \"uppy-DashboardContent-panelBody\"\n  }, props.uppy.getPlugin(props.activePickerPanel.id).render(props.state)));\n}\n\nmodule.exports = PickerPanelContent;", "const {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nfunction EditorPanel(props) {\n  const file = props.files[props.fileCardFor];\n  return h(\"div\", {\n    className: classNames('uppy-DashboardContent-panel', props.className),\n    role: \"tabpanel\",\n    \"data-uppy-panelType\": \"FileEditor\",\n    id: \"uppy-DashboardContent-panel--editor\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18nArray('editing', {\n    file: h(\"span\", {\n      className: \"uppy-DashboardContent-titleFile\"\n    }, file.meta ? file.meta.name : file.name)\n  })), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: props.hideAllPanels\n  }, props.i18n('cancel')), h(\"button\", {\n    className: \"uppy-DashboardContent-save\",\n    type: \"button\",\n    onClick: props.saveFileEditor\n  }, props.i18n('save'))), h(\"div\", {\n    className: \"uppy-DashboardContent-panelBody\"\n  }, props.editors.map(target => {\n    return props.uppy.getPlugin(target.id).render(props.state);\n  })));\n}\n\nmodule.exports = EditorPanel;", "const {\n  h\n} = require('preact');\n\nconst uploadStates = {\n  STATE_ERROR: 'error',\n  STATE_WAITING: 'waiting',\n  STATE_PREPROCESSING: 'preprocessing',\n  STATE_UPLOADING: 'uploading',\n  STATE_POSTPROCESSING: 'postprocessing',\n  STATE_COMPLETE: 'complete',\n  STATE_PAUSED: 'paused'\n};\n\nfunction getUploadingState(isAllErrored, isAllComplete, isAllPaused, files) {\n  if (files === void 0) {\n    files = {};\n  }\n\n  if (isAllErrored) {\n    return uploadStates.STATE_ERROR;\n  }\n\n  if (isAllComplete) {\n    return uploadStates.STATE_COMPLETE;\n  }\n\n  if (isAllPaused) {\n    return uploadStates.STATE_PAUSED;\n  }\n\n  let state = uploadStates.STATE_WAITING;\n  const fileIDs = Object.keys(files);\n\n  for (let i = 0; i < fileIDs.length; i++) {\n    const {\n      progress\n    } = files[fileIDs[i]]; // If ANY files are being uploaded right now, show the uploading state.\n\n    if (progress.uploadStarted && !progress.uploadComplete) {\n      return uploadStates.STATE_UPLOADING;\n    } // If files are being preprocessed AND postprocessed at this time, we show the\n    // preprocess state. If any files are being uploaded we show uploading.\n\n\n    if (progress.preprocess && state !== uploadStates.STATE_UPLOADING) {\n      state = uploadStates.STATE_PREPROCESSING;\n    } // If NO files are being preprocessed or uploaded right now, but some files are\n    // being postprocessed, show the postprocess state.\n\n\n    if (progress.postprocess && state !== uploadStates.STATE_UPLOADING && state !== uploadStates.STATE_PREPROCESSING) {\n      state = uploadStates.STATE_POSTPROCESSING;\n    }\n  }\n\n  return state;\n}\n\nfunction UploadStatus(props) {\n  const uploadingState = getUploadingState(props.isAllErrored, props.isAllComplete, props.isAllPaused, props.files);\n\n  switch (uploadingState) {\n    case 'uploading':\n      return props.i18n('uploadingXFiles', {\n        smart_count: props.inProgressNotPausedFiles.length\n      });\n\n    case 'preprocessing':\n    case 'postprocessing':\n      return props.i18n('processingXFiles', {\n        smart_count: props.processingFiles.length\n      });\n\n    case 'paused':\n      return props.i18n('uploadPaused');\n\n    case 'waiting':\n      return props.i18n('xFilesSelected', {\n        smart_count: props.newFiles.length\n      });\n\n    case 'complete':\n      return props.i18n('uploadComplete');\n  }\n}\n\nfunction PanelTopBar(props) {\n  let {\n    allowNewUpload\n  } = props; // TODO maybe this should be done in ../index.js, then just pass that down as `allowNewUpload`\n\n  if (allowNewUpload && props.maxNumberOfFiles) {\n    allowNewUpload = props.totalFileCount < props.maxNumberOfFiles;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, !props.isAllComplete && !props.hideCancelButton ? h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: () => props.uppy.cancelAll()\n  }, props.i18n('cancel')) : h(\"div\", null), h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, h(UploadStatus, props)), allowNewUpload ? h(\"button\", {\n    className: \"uppy-DashboardContent-addMore\",\n    type: \"button\",\n    \"aria-label\": props.i18n('addMoreFiles'),\n    title: props.i18n('addMoreFiles'),\n    onClick: () => props.toggleAddFilesPanel(true)\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"15\",\n    height: \"15\",\n    viewBox: \"0 0 15 15\"\n  }, h(\"path\", {\n    d: \"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z\"\n  })), h(\"span\", {\n    className: \"uppy-DashboardContent-addMoreCaption\"\n  }, props.i18n('addMore'))) : h(\"div\", null));\n}\n\nmodule.exports = PanelTopBar;", "const {\n  h,\n  Component\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst getFileTypeIcon = require('../../utils/getFileTypeIcon');\n\nconst ignoreEvent = require('../../utils/ignoreEvent.js');\n\nconst FilePreview = require('../FilePreview');\n\nclass FileCard extends Component {\n  constructor(props) {\n    super(props);\n    this.form = document.createElement('form');\n\n    this.updateMeta = (newVal, name) => {\n      this.setState(_ref => {\n        let {\n          formState\n        } = _ref;\n        return {\n          formState: { ...formState,\n            [name]: newVal\n          }\n        };\n      });\n    };\n\n    this.handleSave = e => {\n      e.preventDefault();\n      const fileID = this.props.fileCardFor;\n      this.props.saveFileCard(this.state.formState, fileID);\n    };\n\n    this.handleCancel = () => {\n      this.props.toggleFileCard(false);\n    };\n\n    this.saveOnEnter = ev => {\n      if (ev.keyCode === 13) {\n        ev.stopPropagation();\n        ev.preventDefault();\n        const file = this.props.files[this.props.fileCardFor];\n        this.props.saveFileCard(this.state.formState, file.id);\n      }\n    };\n\n    this.renderMetaFields = () => {\n      const metaFields = this.getMetaFields() || [];\n      const fieldCSSClasses = {\n        text: 'uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input'\n      };\n      return metaFields.map(field => {\n        const id = `uppy-Dashboard-FileCard-input-${field.id}`;\n        const required = this.props.requiredMetaFields.includes(field.id);\n        return h(\"fieldset\", {\n          key: field.id,\n          className: \"uppy-Dashboard-FileCard-fieldset\"\n        }, h(\"label\", {\n          className: \"uppy-Dashboard-FileCard-label\",\n          htmlFor: id\n        }, field.name), field.render !== undefined ? field.render({\n          value: this.state.formState[field.id],\n          onChange: newVal => this.updateMeta(newVal, field.id),\n          fieldCSSClasses,\n          required,\n          form: this.form.id\n        }, h) : h(\"input\", {\n          className: fieldCSSClasses.text,\n          id: id,\n          form: this.form.id,\n          type: field.type || 'text',\n          required: required,\n          value: this.state.formState[field.id],\n          placeholder: field.placeholder // If `form` attribute is not supported, we need to capture pressing Enter to avoid bubbling in case Uppy is\n          // embedded inside a <form>.\n          ,\n          onKeyUp: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onKeyDown: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onKeyPress: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onInput: ev => this.updateMeta(ev.target.value, field.id),\n          \"data-uppy-super-focusable\": true\n        }));\n      });\n    };\n\n    const _file = this.props.files[this.props.fileCardFor];\n\n    const _metaFields = this.getMetaFields() || [];\n\n    const storedMetaData = {};\n\n    _metaFields.forEach(field => {\n      storedMetaData[field.id] = _file.meta[field.id] || '';\n    });\n\n    this.state = {\n      formState: storedMetaData\n    };\n    this.form.id = nanoid();\n  } // TODO(aduh95): move this to `UNSAFE_componentWillMount` when updating to Preact X+.\n\n\n  componentWillMount() {\n    // eslint-disable-line react/no-deprecated\n    this.form.addEventListener('submit', this.handleSave);\n    document.body.appendChild(this.form);\n  }\n\n  componentWillUnmount() {\n    this.form.removeEventListener('submit', this.handleSave);\n    document.body.removeChild(this.form);\n  }\n\n  getMetaFields() {\n    return typeof this.props.metaFields === 'function' ? this.props.metaFields(this.props.files[this.props.fileCardFor]) : this.props.metaFields;\n  }\n\n  render() {\n    const file = this.props.files[this.props.fileCardFor];\n    const showEditButton = this.props.canEditFile(file);\n    return h(\"div\", {\n      className: classNames('uppy-Dashboard-FileCard', this.props.className),\n      \"data-uppy-panelType\": \"FileCard\",\n      onDragOver: ignoreEvent,\n      onDragLeave: ignoreEvent,\n      onDrop: ignoreEvent,\n      onPaste: ignoreEvent\n    }, h(\"div\", {\n      className: \"uppy-DashboardContent-bar\"\n    }, h(\"div\", {\n      className: \"uppy-DashboardContent-title\",\n      role: \"heading\",\n      \"aria-level\": \"1\"\n    }, this.props.i18nArray('editing', {\n      file: h(\"span\", {\n        className: \"uppy-DashboardContent-titleFile\"\n      }, file.meta ? file.meta.name : file.name)\n    })), h(\"button\", {\n      className: \"uppy-DashboardContent-back\",\n      type: \"button\",\n      form: this.form.id,\n      title: this.props.i18n('finishEditingFile'),\n      onClick: this.handleCancel\n    }, this.props.i18n('cancel'))), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-inner\"\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-preview\",\n      style: {\n        backgroundColor: getFileTypeIcon(file.type).color\n      }\n    }, h(FilePreview, {\n      file: file\n    }), showEditButton && h(\"button\", {\n      type: \"button\",\n      className: \"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit\",\n      onClick: event => {\n        // When opening the image editor we want to save any meta fields changes.\n        // Otherwise it's confusing for the user to click save in the editor,\n        // but the changes here are discarded. This bypasses validation,\n        // but we are okay with that.\n        this.handleSave(event);\n        this.props.openFileEditor(file);\n      },\n      form: this.form.id\n    }, this.props.i18n('editFile'))), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-info\"\n    }, this.renderMetaFields()), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-actions\"\n    }, h(\"button\", {\n      className: \"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn\" // If `form` attribute is supported, we want a submit button to trigger the form validation.\n      // Otherwise, fallback to a classic button with a onClick event handler.\n      ,\n      type: 'form' in HTMLButtonElement.prototype ? 'submit' : 'button',\n      onClick: 'form' in HTMLButtonElement.prototype ? undefined : this.handleSave,\n      form: this.form.id\n    }, this.props.i18n('saveChanges')), h(\"button\", {\n      className: \"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn\",\n      type: \"button\",\n      onClick: this.handleCancel,\n      form: this.form.id\n    }, this.props.i18n('cancel')))));\n  }\n\n}\n\nmodule.exports = FileCard;", "const {\n  cloneElement,\n  Component,\n  toChildArray\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst transitionName = 'uppy-transition-slideDownUp';\nconst duration = 250;\n/**\n * Vertical slide transition.\n *\n * This can take a _single_ child component, which _must_ accept a `className` prop.\n *\n * Currently this is specific to the `uppy-transition-slideDownUp` transition,\n * but it should be simple to extend this for any type of single-element\n * transition by setting the CSS name and duration as props.\n */\n\nclass Slide extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      cachedChildren: null,\n      className: ''\n    };\n  } // TODO: refactor to stable lifecycle method\n  // eslint-disable-next-line\n\n\n  componentWillUpdate(nextProps) {\n    const {\n      cachedChildren\n    } = this.state;\n    const child = toChildArray(nextProps.children)[0];\n    if (cachedChildren === child) return null;\n    const patch = {\n      cachedChildren: child\n    }; // Enter transition\n\n    if (child && !cachedChildren) {\n      patch.className = `${transitionName}-enter`;\n      cancelAnimationFrame(this.animationFrame);\n      clearTimeout(this.leaveTimeout);\n      this.leaveTimeout = undefined;\n      this.animationFrame = requestAnimationFrame(() => {\n        // Force it to render before we add the active class\n        // this.base.getBoundingClientRect()\n        this.setState({\n          className: `${transitionName}-enter ${transitionName}-enter-active`\n        });\n        this.enterTimeout = setTimeout(() => {\n          this.setState({\n            className: ''\n          });\n        }, duration);\n      });\n    } // Leave transition\n\n\n    if (cachedChildren && !child && this.leaveTimeout === undefined) {\n      patch.cachedChildren = cachedChildren;\n      patch.className = `${transitionName}-leave`;\n      cancelAnimationFrame(this.animationFrame);\n      clearTimeout(this.enterTimeout);\n      this.enterTimeout = undefined;\n      this.animationFrame = requestAnimationFrame(() => {\n        this.setState({\n          className: `${transitionName}-leave ${transitionName}-leave-active`\n        });\n        this.leaveTimeout = setTimeout(() => {\n          this.setState({\n            cachedChildren: null,\n            className: ''\n          });\n        }, duration);\n      });\n    } // eslint-disable-next-line\n\n\n    this.setState(patch);\n  }\n\n  render() {\n    const {\n      cachedChildren,\n      className\n    } = this.state;\n\n    if (!cachedChildren) {\n      return null;\n    }\n\n    return cloneElement(cachedChildren, {\n      className: classNames(className, cachedChildren.props.className)\n    });\n  }\n\n}\n\nmodule.exports = Slide;", "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst isDragDropSupported = require('@uppy/utils/lib/isDragDropSupported');\n\nconst FileList = require('./FileList');\n\nconst AddFiles = require('./AddFiles');\n\nconst AddFilesPanel = require('./AddFilesPanel');\n\nconst PickerPanelContent = require('./PickerPanelContent');\n\nconst EditorPanel = require('./EditorPanel');\n\nconst PanelTopBar = require('./PickerPanelTopBar');\n\nconst FileCard = require('./FileCard');\n\nconst Slide = require('./Slide'); // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog\n// https://github.com/ghosh/micromodal\n\n\nconst WIDTH_XL = 900;\nconst WIDTH_LG = 700;\nconst WIDTH_MD = 576;\nconst HEIGHT_MD = 400;\n\nmodule.exports = function Dashboard(props) {\n  const noFiles = props.totalFileCount === 0;\n  const isSizeMD = props.containerWidth > WIDTH_MD;\n  const wrapperClassName = classNames({\n    'uppy-Root': props.isTargetDOMEl\n  });\n  const dashboardClassName = classNames({\n    'uppy-Dashboard': true,\n    'uppy-Dashboard--isDisabled': props.disabled,\n    'uppy-Dashboard--animateOpenClose': props.animateOpenClose,\n    'uppy-Dashboard--isClosing': props.isClosing,\n    'uppy-Dashboard--isDraggingOver': props.isDraggingOver,\n    'uppy-Dashboard--modal': !props.inline,\n    'uppy-size--md': props.containerWidth > WIDTH_MD,\n    'uppy-size--lg': props.containerWidth > WIDTH_LG,\n    'uppy-size--xl': props.containerWidth > WIDTH_XL,\n    'uppy-size--height-md': props.containerHeight > HEIGHT_MD,\n    'uppy-Dashboard--isAddFilesPanelVisible': props.showAddFilesPanel,\n    'uppy-Dashboard--isInnerWrapVisible': props.areInsidesReadyToBeVisible\n  }); // Important: keep these in sync with the percent width values in `src/components/FileItem/index.scss`.\n\n  let itemsPerRow = 1; // mobile\n\n  if (props.containerWidth > WIDTH_XL) {\n    itemsPerRow = 5;\n  } else if (props.containerWidth > WIDTH_LG) {\n    itemsPerRow = 4;\n  } else if (props.containerWidth > WIDTH_MD) {\n    itemsPerRow = 3;\n  }\n\n  const showFileList = props.showSelectedFiles && !noFiles;\n  const numberOfFilesForRecovery = props.recoveredState ? Object.keys(props.recoveredState.files).length : null;\n  const numberOfGhosts = props.files ? Object.keys(props.files).filter(fileID => props.files[fileID].isGhost).length : null;\n\n  const renderRestoredText = () => {\n    if (numberOfGhosts > 0) {\n      return props.i18n('recoveredXFiles', {\n        smart_count: numberOfGhosts\n      });\n    }\n\n    return props.i18n('recoveredAllFiles');\n  };\n\n  const dashboard = h(\"div\", {\n    className: dashboardClassName,\n    \"data-uppy-theme\": props.theme,\n    \"data-uppy-num-acquirers\": props.acquirers.length,\n    \"data-uppy-drag-drop-supported\": !props.disableLocalFiles && isDragDropSupported(),\n    \"aria-hidden\": props.inline ? 'false' : props.isHidden,\n    \"aria-disabled\": props.disabled,\n    \"aria-label\": !props.inline ? props.i18n('dashboardWindowTitle') : props.i18n('dashboardTitle'),\n    onPaste: props.handlePaste,\n    onDragOver: props.handleDragOver,\n    onDragLeave: props.handleDragLeave,\n    onDrop: props.handleDrop\n  }, h(\"div\", {\n    \"aria-hidden\": \"true\",\n    className: \"uppy-Dashboard-overlay\",\n    tabIndex: -1,\n    onClick: props.handleClickOutside\n  }), h(\"div\", {\n    className: \"uppy-Dashboard-inner\",\n    \"aria-modal\": !props.inline && 'true',\n    role: !props.inline && 'dialog',\n    style: {\n      width: props.inline && props.width ? props.width : '',\n      height: props.inline && props.height ? props.height : ''\n    }\n  }, !props.inline ? h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-close\",\n    type: \"button\",\n    \"aria-label\": props.i18n('closeModal'),\n    title: props.i18n('closeModal'),\n    onClick: props.closeModal\n  }, h(\"span\", {\n    \"aria-hidden\": \"true\"\n  }, \"\\xD7\")) : null, h(\"div\", {\n    className: \"uppy-Dashboard-innerWrap\"\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-dropFilesHereHint\"\n  }, props.i18n('dropHint')), showFileList && h(PanelTopBar, props), numberOfFilesForRecovery && h(\"div\", {\n    className: \"uppy-Dashboard-serviceMsg\"\n  }, h(\"svg\", {\n    className: \"uppy-Dashboard-serviceMsg-icon\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"21\",\n    height: \"16\",\n    viewBox: \"0 0 24 19\"\n  }, h(\"g\", {\n    transform: \"translate(0 -1)\",\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"path\", {\n    d: \"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z\",\n    fill: \"#FFD300\"\n  }), h(\"path\", {\n    fill: \"#000\",\n    d: \"M11 6h2l-.3 8h-1.4z\"\n  }), h(\"circle\", {\n    fill: \"#000\",\n    cx: \"12\",\n    cy: \"17\",\n    r: \"1\"\n  }))), h(\"strong\", {\n    className: \"uppy-Dashboard-serviceMsg-title\"\n  }, props.i18n('sessionRestored')), h(\"div\", {\n    className: \"uppy-Dashboard-serviceMsg-text\"\n  }, renderRestoredText())), showFileList ? h(FileList, _extends({}, props, {\n    itemsPerRow: itemsPerRow\n  })) : h(AddFiles, _extends({}, props, {\n    isSizeMD: isSizeMD\n  })), h(Slide, null, props.showAddFilesPanel ? h(AddFilesPanel, _extends({\n    key: \"AddFiles\"\n  }, props, {\n    isSizeMD: isSizeMD\n  })) : null), h(Slide, null, props.fileCardFor ? h(FileCard, _extends({\n    key: \"FileCard\"\n  }, props)) : null), h(Slide, null, props.activePickerPanel ? h(PickerPanelContent, _extends({\n    key: \"Picker\"\n  }, props)) : null), h(Slide, null, props.showFileEditor ? h(EditorPanel, _extends({\n    key: \"Editor\"\n  }, props)) : null), h(\"div\", {\n    className: \"uppy-Dashboard-progressindicators\"\n  }, props.progressindicators.map(target => {\n    return props.uppy.getPlugin(target.id).render(props.state);\n  })))));\n  return (// Wrap it for RTL language support\n    h(\"div\", {\n      className: wrapperClassName,\n      dir: props.direction\n    }, dashboard)\n  );\n};", "module.exports = {\n  strings: {\n    // When `inline: false`, used as the screen reader label for the button that closes the modal.\n    closeModal: 'Close Modal',\n    // Used as the screen reader label for the plus (+) button that shows the \u201CAdd more files\u201D screen\n    addMoreFiles: 'Add more files',\n    addingMoreFiles: 'Adding more files',\n    // Used as the header for import panels, e.g., \u201CImport from Google Drive\u201D.\n    importFrom: 'Import from %{name}',\n    // When `inline: false`, used as the screen reader label for the dashboard modal.\n    dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',\n    // When `inline: true`, used as the screen reader label for the dashboard area.\n    dashboardTitle: 'Uppy Dashboard',\n    // Shown in the Informer when a link to a file was copied to the clipboard.\n    copyLinkToClipboardSuccess: 'Link copied to clipboard.',\n    // Used when a link cannot be copied automatically \u2014 the user has to select the text from the\n    // input element below this string.\n    copyLinkToClipboardFallback: 'Copy the URL below',\n    // Used as the hover title and screen reader label for buttons that copy a file link.\n    copyLink: 'Copy link',\n    back: 'Back',\n    // Used as the screen reader label for buttons that remove a file.\n    removeFile: 'Remove file',\n    // Used as the screen reader label for buttons that open the metadata editor panel for a file.\n    editFile: 'Edit file',\n    // Shown in the panel header for the metadata editor. Rendered as \u201CEditing image.png\u201D.\n    editing: 'Editing %{file}',\n    // Used as the screen reader label for the button that saves metadata edits and returns to the\n    // file list view.\n    finishEditingFile: 'Finish editing file',\n    saveChanges: 'Save changes',\n    // Used as the label for the tab button that opens the system file selection dialog.\n    myDevice: 'My Device',\n    dropHint: 'Drop your files here',\n    // Used as the hover text and screen reader label for file progress indicators when\n    // they have been fully uploaded.\n    uploadComplete: 'Upload complete',\n    uploadPaused: 'Upload paused',\n    // Used as the hover text and screen reader label for the buttons to resume paused uploads.\n    resumeUpload: 'Resume upload',\n    // Used as the hover text and screen reader label for the buttons to pause uploads.\n    pauseUpload: 'Pause upload',\n    // Used as the hover text and screen reader label for the buttons to retry failed uploads.\n    retryUpload: 'Retry upload',\n    // Used as the hover text and screen reader label for the buttons to cancel uploads.\n    cancelUpload: 'Cancel upload',\n    // Used in a title, how many files are currently selected\n    xFilesSelected: {\n      0: '%{smart_count} file selected',\n      1: '%{smart_count} files selected'\n    },\n    uploadingXFiles: {\n      0: 'Uploading %{smart_count} file',\n      1: 'Uploading %{smart_count} files'\n    },\n    processingXFiles: {\n      0: 'Processing %{smart_count} file',\n      1: 'Processing %{smart_count} files'\n    },\n    // The \"powered by Uppy\" link at the bottom of the Dashboard.\n    poweredBy: 'Powered by %{uppy}',\n    addMore: 'Add more',\n    editFileWithFilename: 'Edit file %{file}',\n    save: 'Save',\n    cancel: 'Cancel',\n    dropPasteFiles: 'Drop files here or %{browseFiles}',\n    dropPasteFolders: 'Drop files here or %{browseFolders}',\n    dropPasteBoth: 'Drop files here, %{browseFiles} or %{browseFolders}',\n    dropPasteImportFiles: 'Drop files here, %{browseFiles} or import from:',\n    dropPasteImportFolders: 'Drop files here, %{browseFolders} or import from:',\n    dropPasteImportBoth: 'Drop files here, %{browseFiles}, %{browseFolders} or import from:',\n    importFiles: 'Import files from:',\n    browseFiles: 'browse files',\n    browseFolders: 'browse folders',\n    recoveredXFiles: {\n      0: 'We could not fully recover 1 file. Please re-select it and resume the upload.',\n      1: 'We could not fully recover %{smart_count} files. Please re-select them and resume the upload.'\n    },\n    recoveredAllFiles: 'We restored all files. You can now resume the upload.',\n    sessionRestored: 'Session restored',\n    reSelect: 'Re-select',\n    missingRequiredMetaFields: {\n      0: 'Missing required meta field: %{fields}.',\n      1: 'Missing required meta fields: %{fields}.'\n    }\n  }\n};", "var _class, _openFileEditorWhenFilesAdded, _attachRenderFunctionToTarget, _isTargetSupported, _getAcquirers, _getProgressIndicators, _getEditors, _temp;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst {\n  h\n} = require('preact');\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst StatusBar = require('@uppy/status-bar');\n\nconst Informer = require('@uppy/informer');\n\nconst ThumbnailGenerator = require('@uppy/thumbnail-generator');\n\nconst findAllDOMElements = require('@uppy/utils/lib/findAllDOMElements');\n\nconst toArray = require('@uppy/utils/lib/toArray');\n\nconst getDroppedFiles = require('@uppy/utils/lib/getDroppedFiles');\n\nconst getTextDirection = require('@uppy/utils/lib/getTextDirection');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst trapFocus = require('./utils/trapFocus');\n\nconst createSuperFocus = require('./utils/createSuperFocus');\n\nconst memoize = require('memoize-one').default || require('memoize-one');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst DashboardUI = require('./components/Dashboard');\n\nconst locale = require('./locale');\n\nconst TAB_KEY = 9;\nconst ESC_KEY = 27;\n\nfunction createPromise() {\n  const o = {};\n  o.promise = new Promise((resolve, reject) => {\n    o.resolve = resolve;\n    o.reject = reject;\n  });\n  return o;\n}\n\nfunction defaultPickerIcon() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"30\",\n    height: \"30\",\n    viewBox: \"0 0 30 30\"\n  }, h(\"path\", {\n    d: \"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z\"\n  }));\n}\n/**\n * Dashboard UI with previews, metadata editing, tabs for various services and more\n */\n\n\nmodule.exports = (_temp = (_openFileEditorWhenFilesAdded = /*#__PURE__*/_classPrivateFieldLooseKey(\"openFileEditorWhenFilesAdded\"), _attachRenderFunctionToTarget = /*#__PURE__*/_classPrivateFieldLooseKey(\"attachRenderFunctionToTarget\"), _isTargetSupported = /*#__PURE__*/_classPrivateFieldLooseKey(\"isTargetSupported\"), _getAcquirers = /*#__PURE__*/_classPrivateFieldLooseKey(\"getAcquirers\"), _getProgressIndicators = /*#__PURE__*/_classPrivateFieldLooseKey(\"getProgressIndicators\"), _getEditors = /*#__PURE__*/_classPrivateFieldLooseKey(\"getEditors\"), _class = class Dashboard extends UIPlugin {\n  constructor(uppy, _opts) {\n    var _this;\n\n    super(uppy, _opts);\n    _this = this;\n\n    this.removeTarget = plugin => {\n      const pluginState = this.getPluginState(); // filter out the one we want to remove\n\n      const newTargets = pluginState.targets.filter(target => target.id !== plugin.id);\n      this.setPluginState({\n        targets: newTargets\n      });\n    };\n\n    this.addTarget = plugin => {\n      const callerPluginId = plugin.id || plugin.constructor.name;\n      const callerPluginName = plugin.title || callerPluginId;\n      const callerPluginType = plugin.type;\n\n      if (callerPluginType !== 'acquirer' && callerPluginType !== 'progressindicator' && callerPluginType !== 'editor') {\n        const msg = 'Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor';\n        this.uppy.log(msg, 'error');\n        return;\n      }\n\n      const target = {\n        id: callerPluginId,\n        name: callerPluginName,\n        type: callerPluginType\n      };\n      const state = this.getPluginState();\n      const newTargets = state.targets.slice();\n      newTargets.push(target);\n      this.setPluginState({\n        targets: newTargets\n      });\n      return this.el;\n    };\n\n    this.hideAllPanels = () => {\n      const state = this.getPluginState();\n      const update = {\n        activePickerPanel: false,\n        showAddFilesPanel: false,\n        activeOverlayType: null,\n        fileCardFor: null,\n        showFileEditor: false\n      };\n\n      if (state.activePickerPanel === update.activePickerPanel && state.showAddFilesPanel === update.showAddFilesPanel && state.showFileEditor === update.showFileEditor && state.activeOverlayType === update.activeOverlayType) {\n        // avoid doing a state update if nothing changed\n        return;\n      }\n\n      this.setPluginState(update);\n    };\n\n    this.showPanel = id => {\n      const {\n        targets\n      } = this.getPluginState();\n      const activePickerPanel = targets.filter(target => {\n        return target.type === 'acquirer' && target.id === id;\n      })[0];\n      this.setPluginState({\n        activePickerPanel,\n        activeOverlayType: 'PickerPanel'\n      });\n    };\n\n    this.canEditFile = file => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      return editors.some(target => this.uppy.getPlugin(target.id).canEditFile(file));\n    };\n\n    this.openFileEditor = file => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      this.setPluginState({\n        showFileEditor: true,\n        fileCardFor: file.id || null,\n        activeOverlayType: 'FileEditor'\n      });\n      editors.forEach(editor => {\n        this.uppy.getPlugin(editor.id).selectFile(file);\n      });\n    };\n\n    this.saveFileEditor = () => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      editors.forEach(editor => {\n        this.uppy.getPlugin(editor.id).save();\n      });\n      this.hideAllPanels();\n    };\n\n    this.openModal = () => {\n      const {\n        promise,\n        resolve\n      } = createPromise(); // save scroll position\n\n      this.savedScrollPosition = window.pageYOffset; // save active element, so we can restore focus when modal is closed\n\n      this.savedActiveElement = document.activeElement;\n\n      if (this.opts.disablePageScrollWhenModalOpen) {\n        document.body.classList.add('uppy-Dashboard-isFixed');\n      }\n\n      if (this.opts.animateOpenClose && this.getPluginState().isClosing) {\n        const handler = () => {\n          this.setPluginState({\n            isHidden: false\n          });\n          this.el.removeEventListener('animationend', handler, false);\n          resolve();\n        };\n\n        this.el.addEventListener('animationend', handler, false);\n      } else {\n        this.setPluginState({\n          isHidden: false\n        });\n        resolve();\n      }\n\n      if (this.opts.browserBackButtonClose) {\n        this.updateBrowserHistory();\n      } // handle ESC and TAB keys in modal dialog\n\n\n      document.addEventListener('keydown', this.handleKeyDownInModal);\n      this.uppy.emit('dashboard:modal-open');\n      return promise;\n    };\n\n    this.closeModal = function (opts) {\n      if (opts === void 0) {\n        opts = {};\n      }\n\n      const {\n        // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button)\n        manualClose = true\n      } = opts;\n\n      const {\n        isHidden,\n        isClosing\n      } = _this.getPluginState();\n\n      if (isHidden || isClosing) {\n        // short-circuit if animation is ongoing\n        return;\n      }\n\n      const {\n        promise,\n        resolve\n      } = createPromise();\n\n      if (_this.opts.disablePageScrollWhenModalOpen) {\n        document.body.classList.remove('uppy-Dashboard-isFixed');\n      }\n\n      if (_this.opts.animateOpenClose) {\n        _this.setPluginState({\n          isClosing: true\n        });\n\n        const handler = () => {\n          _this.setPluginState({\n            isHidden: true,\n            isClosing: false\n          });\n\n          _this.superFocus.cancel();\n\n          _this.savedActiveElement.focus();\n\n          _this.el.removeEventListener('animationend', handler, false);\n\n          resolve();\n        };\n\n        _this.el.addEventListener('animationend', handler, false);\n      } else {\n        _this.setPluginState({\n          isHidden: true\n        });\n\n        _this.superFocus.cancel();\n\n        _this.savedActiveElement.focus();\n\n        resolve();\n      } // handle ESC and TAB keys in modal dialog\n\n\n      document.removeEventListener('keydown', _this.handleKeyDownInModal);\n\n      if (manualClose) {\n        if (_this.opts.browserBackButtonClose) {\n          var _history$state;\n\n          // Make sure that the latest entry in the history state is our modal name\n          // eslint-disable-next-line no-restricted-globals\n          if ((_history$state = history.state) != null && _history$state[_this.modalName]) {\n            // Go back in history to clear out the entry we created (ultimately closing the modal)\n            // eslint-disable-next-line no-restricted-globals\n            history.back();\n          }\n        }\n      }\n\n      _this.uppy.emit('dashboard:modal-closed');\n\n      return promise;\n    };\n\n    this.isModalOpen = () => {\n      return !this.getPluginState().isHidden || false;\n    };\n\n    this.requestCloseModal = () => {\n      if (this.opts.onRequestCloseModal) {\n        return this.opts.onRequestCloseModal();\n      }\n\n      return this.closeModal();\n    };\n\n    this.setDarkModeCapability = isDarkModeOn => {\n      const {\n        capabilities\n      } = this.uppy.getState();\n      this.uppy.setState({\n        capabilities: { ...capabilities,\n          darkMode: isDarkModeOn\n        }\n      });\n    };\n\n    this.handleSystemDarkModeChange = event => {\n      const isDarkModeOnNow = event.matches;\n      this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnNow ? 'on' : 'off'}`);\n      this.setDarkModeCapability(isDarkModeOnNow);\n    };\n\n    this.toggleFileCard = (show, fileID) => {\n      const file = this.uppy.getFile(fileID);\n\n      if (show) {\n        this.uppy.emit('dashboard:file-edit-start', file);\n      } else {\n        this.uppy.emit('dashboard:file-edit-complete', file);\n      }\n\n      this.setPluginState({\n        fileCardFor: show ? fileID : null,\n        activeOverlayType: show ? 'FileCard' : null\n      });\n    };\n\n    this.toggleAddFilesPanel = show => {\n      this.setPluginState({\n        showAddFilesPanel: show,\n        activeOverlayType: show ? 'AddFiles' : null\n      });\n    };\n\n    this.addFiles = files => {\n      const descriptors = files.map(file => ({\n        source: this.id,\n        name: file.name,\n        type: file.type,\n        data: file,\n        meta: {\n          // path of the file relative to the ancestor directory the user selected.\n          // e.g. 'docs/Old Prague/airbnb.pdf'\n          relativePath: file.relativePath || null\n        }\n      }));\n\n      try {\n        this.uppy.addFiles(descriptors);\n      } catch (err) {\n        this.uppy.log(err);\n      }\n    };\n\n    this.startListeningToResize = () => {\n      // Watch for Dashboard container (`.uppy-Dashboard-inner`) resize\n      // and update containerWidth/containerHeight in plugin state accordingly.\n      // Emits first event on initialization.\n      this.resizeObserver = new ResizeObserver(entries => {\n        const uppyDashboardInnerEl = entries[0];\n        const {\n          width,\n          height\n        } = uppyDashboardInnerEl.contentRect;\n        this.uppy.log(`[Dashboard] resized: ${width} / ${height}`, 'debug');\n        this.setPluginState({\n          containerWidth: width,\n          containerHeight: height,\n          areInsidesReadyToBeVisible: true\n        });\n      });\n      this.resizeObserver.observe(this.el.querySelector('.uppy-Dashboard-inner')); // If ResizeObserver fails to emit an event telling us what size to use - default to the mobile view\n\n      this.makeDashboardInsidesVisibleAnywayTimeout = setTimeout(() => {\n        const pluginState = this.getPluginState();\n        const isModalAndClosed = !this.opts.inline && pluginState.isHidden;\n\n        if ( // if ResizeObserver hasn't yet fired,\n        !pluginState.areInsidesReadyToBeVisible // and it's not due to the modal being closed\n        && !isModalAndClosed) {\n          this.uppy.log(\"[Dashboard] resize event didn't fire on time: defaulted to mobile layout\", 'debug');\n          this.setPluginState({\n            areInsidesReadyToBeVisible: true\n          });\n        }\n      }, 1000);\n    };\n\n    this.stopListeningToResize = () => {\n      this.resizeObserver.disconnect();\n      clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout);\n    };\n\n    this.recordIfFocusedOnUppyRecently = event => {\n      if (this.el.contains(event.target)) {\n        this.ifFocusedOnUppyRecently = true;\n      } else {\n        this.ifFocusedOnUppyRecently = false; // ___Why run this.superFocus.cancel here when it already runs in superFocusOnEachUpdate?\n        //    Because superFocus is debounced, when we move from Uppy to some other element on the page,\n        //    previously run superFocus sometimes hits and moves focus back to Uppy.\n\n        this.superFocus.cancel();\n      }\n    };\n\n    this.disableAllFocusableElements = disable => {\n      const focusableNodes = toArray(this.el.querySelectorAll(FOCUSABLE_ELEMENTS));\n\n      if (disable) {\n        focusableNodes.forEach(node => {\n          // save previous tabindex in a data-attribute, to restore when enabling\n          const currentTabIndex = node.getAttribute('tabindex');\n\n          if (currentTabIndex) {\n            node.dataset.inertTabindex = currentTabIndex;\n          }\n\n          node.setAttribute('tabindex', '-1');\n        });\n      } else {\n        focusableNodes.forEach(node => {\n          if ('inertTabindex' in node.dataset) {\n            node.setAttribute('tabindex', node.dataset.inertTabindex);\n          } else {\n            node.removeAttribute('tabindex');\n          }\n        });\n      }\n\n      this.dashboardIsDisabled = disable;\n    };\n\n    this.updateBrowserHistory = () => {\n      var _history$state2;\n\n      // Ensure history state does not already contain our modal name to avoid double-pushing\n      // eslint-disable-next-line no-restricted-globals\n      if (!((_history$state2 = history.state) != null && _history$state2[this.modalName])) {\n        // Push to history so that the page is not lost on browser back button press\n        // eslint-disable-next-line no-restricted-globals\n        history.pushState({ // eslint-disable-next-line no-restricted-globals\n          ...history.state,\n          [this.modalName]: true\n        }, '');\n      } // Listen for back button presses\n\n\n      window.addEventListener('popstate', this.handlePopState, false);\n    };\n\n    this.handlePopState = event => {\n      var _event$state;\n\n      // Close the modal if the history state no longer contains our modal name\n      if (this.isModalOpen() && (!event.state || !event.state[this.modalName])) {\n        this.closeModal({\n          manualClose: false\n        });\n      } // When the browser back button is pressed and uppy is now the latest entry\n      // in the history but the modal is closed, fix the history by removing the\n      // uppy history entry.\n      // This occurs when another entry is added into the history state while the\n      // modal is open, and then the modal gets manually closed.\n      // Solves PR #575 (https://github.com/transloadit/uppy/pull/575)\n\n\n      if (!this.isModalOpen() && (_event$state = event.state) != null && _event$state[this.modalName]) {\n        // eslint-disable-next-line no-restricted-globals\n        history.back();\n      }\n    };\n\n    this.handleKeyDownInModal = event => {\n      // close modal on esc key press\n      if (event.keyCode === ESC_KEY) this.requestCloseModal(event); // trap focus on tab key press\n\n      if (event.keyCode === TAB_KEY) trapFocus.forModal(event, this.getPluginState().activeOverlayType, this.el);\n    };\n\n    this.handleClickOutside = () => {\n      if (this.opts.closeModalOnClickOutside) this.requestCloseModal();\n    };\n\n    this.handlePaste = event => {\n      // Let any acquirer plugin (Url/Webcam/etc.) handle pastes to the root\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin.type === 'acquirer') {\n          // Every Plugin with .type acquirer can define handleRootPaste(event)\n          plugin.handleRootPaste == null ? void 0 : plugin.handleRootPaste(event);\n        }\n      }); // Add all dropped files\n\n      const files = toArray(event.clipboardData.files);\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files pasted');\n        this.addFiles(files);\n      }\n    };\n\n    this.handleInputChange = event => {\n      event.preventDefault();\n      const files = toArray(event.target.files);\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files selected through input');\n        this.addFiles(files);\n      }\n    };\n\n    this.handleDragOver = event => {\n      var _this$opts$onDragOver, _this$opts;\n\n      event.preventDefault();\n      event.stopPropagation(); // Check if some plugin can handle the datatransfer without files \u2014\n      // for instance, the Url plugin can import a url\n\n      const canSomePluginHandleRootDrop = () => {\n        let somePluginCanHandleRootDrop = true;\n        this.uppy.iteratePlugins(plugin => {\n          if (plugin.canHandleRootDrop != null && plugin.canHandleRootDrop(event)) {\n            somePluginCanHandleRootDrop = true;\n          }\n        });\n        return somePluginCanHandleRootDrop;\n      }; // Check if the \"type\" of the datatransfer object includes files\n\n\n      const doesEventHaveFiles = () => {\n        const {\n          types\n        } = event.dataTransfer;\n        return types.some(type => type === 'Files');\n      }; // Deny drop, if no plugins can handle datatransfer, there are no files,\n      // or when opts.disabled is set, or new uploads are not allowed\n\n\n      const somePluginCanHandleRootDrop = canSomePluginHandleRootDrop(event);\n      const hasFiles = doesEventHaveFiles(event);\n\n      if (!somePluginCanHandleRootDrop && !hasFiles || this.opts.disabled // opts.disableLocalFiles should only be taken into account if no plugins\n      // can handle the datatransfer\n      || this.opts.disableLocalFiles && (hasFiles || !somePluginCanHandleRootDrop) || !this.uppy.getState().allowNewUpload) {\n        event.dataTransfer.dropEffect = 'none';\n        clearTimeout(this.removeDragOverClassTimeout);\n        return;\n      } // Add a small (+) icon on drop\n      // (and prevent browsers from interpreting this as files being _moved_ into the\n      // browser, https://github.com/transloadit/uppy/issues/1978).\n\n\n      event.dataTransfer.dropEffect = 'copy';\n      clearTimeout(this.removeDragOverClassTimeout);\n      this.setPluginState({\n        isDraggingOver: true\n      });\n      (_this$opts$onDragOver = (_this$opts = this.opts).onDragOver) == null ? void 0 : _this$opts$onDragOver.call(_this$opts, event);\n    };\n\n    this.handleDragLeave = event => {\n      var _this$opts$onDragLeav, _this$opts2;\n\n      event.preventDefault();\n      event.stopPropagation();\n      clearTimeout(this.removeDragOverClassTimeout); // Timeout against flickering, this solution is taken from drag-drop library.\n      // Solution with 'pointer-events: none' didn't work across browsers.\n\n      this.removeDragOverClassTimeout = setTimeout(() => {\n        this.setPluginState({\n          isDraggingOver: false\n        });\n      }, 50);\n      (_this$opts$onDragLeav = (_this$opts2 = this.opts).onDragLeave) == null ? void 0 : _this$opts$onDragLeav.call(_this$opts2, event);\n    };\n\n    this.handleDrop = async event => {\n      var _this$opts$onDrop, _this$opts3;\n\n      event.preventDefault();\n      event.stopPropagation();\n      clearTimeout(this.removeDragOverClassTimeout);\n      this.setPluginState({\n        isDraggingOver: false\n      }); // Let any acquirer plugin (Url/Webcam/etc.) handle drops to the root\n\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin.type === 'acquirer') {\n          // Every Plugin with .type acquirer can define handleRootDrop(event)\n          plugin.handleRootDrop == null ? void 0 : plugin.handleRootDrop(event);\n        }\n      }); // Add all dropped files\n\n      let executedDropErrorOnce = false;\n\n      const logDropError = error => {\n        this.uppy.log(error, 'error'); // In practice all drop errors are most likely the same,\n        // so let's just show one to avoid overwhelming the user\n\n        if (!executedDropErrorOnce) {\n          this.uppy.info(error.message, 'error');\n          executedDropErrorOnce = true;\n        }\n      }; // Add all dropped files\n\n\n      const files = await getDroppedFiles(event.dataTransfer, {\n        logDropError\n      });\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files dropped');\n        this.addFiles(files);\n      }\n\n      (_this$opts$onDrop = (_this$opts3 = this.opts).onDrop) == null ? void 0 : _this$opts$onDrop.call(_this$opts3, event);\n    };\n\n    this.handleRequestThumbnail = file => {\n      if (!this.opts.waitForThumbnailsBeforeUpload) {\n        this.uppy.emit('thumbnail:request', file);\n      }\n    };\n\n    this.handleCancelThumbnail = file => {\n      if (!this.opts.waitForThumbnailsBeforeUpload) {\n        this.uppy.emit('thumbnail:cancel', file);\n      }\n    };\n\n    this.handleKeyDownInInline = event => {\n      // Trap focus on tab key press.\n      if (event.keyCode === TAB_KEY) trapFocus.forInline(event, this.getPluginState().activeOverlayType, this.el);\n    };\n\n    this.handlePasteOnBody = event => {\n      const isFocusInOverlay = this.el.contains(document.activeElement);\n\n      if (isFocusInOverlay) {\n        this.handlePaste(event);\n      }\n    };\n\n    this.handleComplete = _ref => {\n      let {\n        failed\n      } = _ref;\n\n      if (this.opts.closeAfterFinish && failed.length === 0) {\n        // All uploads are done\n        this.requestCloseModal();\n      }\n    };\n\n    this.handleCancelRestore = () => {\n      this.uppy.emit('restore-canceled');\n    };\n\n    Object.defineProperty(this, _openFileEditorWhenFilesAdded, {\n      writable: true,\n      value: files => {\n        const firstFile = files[0];\n\n        if (this.canEditFile(firstFile)) {\n          this.openFileEditor(firstFile);\n        }\n      }\n    });\n\n    this.initEvents = () => {\n      // Modal open button\n      if (this.opts.trigger && !this.opts.inline) {\n        const showModalTrigger = findAllDOMElements(this.opts.trigger);\n\n        if (showModalTrigger) {\n          showModalTrigger.forEach(trigger => trigger.addEventListener('click', this.openModal));\n        } else {\n          this.uppy.log('Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself', 'warning');\n        }\n      }\n\n      this.startListeningToResize();\n      document.addEventListener('paste', this.handlePasteOnBody);\n      this.uppy.on('plugin-remove', this.removeTarget);\n      this.uppy.on('file-added', this.hideAllPanels);\n      this.uppy.on('dashboard:modal-closed', this.hideAllPanels);\n      this.uppy.on('file-editor:complete', this.hideAllPanels);\n      this.uppy.on('complete', this.handleComplete); // ___Why fire on capture?\n      //    Because this.ifFocusedOnUppyRecently needs to change before onUpdate() fires.\n\n      document.addEventListener('focus', this.recordIfFocusedOnUppyRecently, true);\n      document.addEventListener('click', this.recordIfFocusedOnUppyRecently, true);\n\n      if (this.opts.inline) {\n        this.el.addEventListener('keydown', this.handleKeyDownInInline);\n      }\n\n      if (this.opts.autoOpenFileEditor) {\n        this.uppy.on('files-added', _classPrivateFieldLooseBase(this, _openFileEditorWhenFilesAdded)[_openFileEditorWhenFilesAdded]);\n      }\n    };\n\n    this.removeEvents = () => {\n      const showModalTrigger = findAllDOMElements(this.opts.trigger);\n\n      if (!this.opts.inline && showModalTrigger) {\n        showModalTrigger.forEach(trigger => trigger.removeEventListener('click', this.openModal));\n      }\n\n      this.stopListeningToResize();\n      document.removeEventListener('paste', this.handlePasteOnBody);\n      window.removeEventListener('popstate', this.handlePopState, false);\n      this.uppy.off('plugin-remove', this.removeTarget);\n      this.uppy.off('file-added', this.hideAllPanels);\n      this.uppy.off('dashboard:modal-closed', this.hideAllPanels);\n      this.uppy.off('file-editor:complete', this.hideAllPanels);\n      this.uppy.off('complete', this.handleComplete);\n      document.removeEventListener('focus', this.recordIfFocusedOnUppyRecently);\n      document.removeEventListener('click', this.recordIfFocusedOnUppyRecently);\n\n      if (this.opts.inline) {\n        this.el.removeEventListener('keydown', this.handleKeyDownInInline);\n      }\n\n      if (this.opts.autoOpenFileEditor) {\n        this.uppy.off('files-added', _classPrivateFieldLooseBase(this, _openFileEditorWhenFilesAdded)[_openFileEditorWhenFilesAdded]);\n      }\n    };\n\n    this.superFocusOnEachUpdate = () => {\n      const isFocusInUppy = this.el.contains(document.activeElement); // When focus is lost on the page (== focus is on body for most browsers, or focus is null for IE11)\n\n      const isFocusNowhere = document.activeElement === document.body || document.activeElement === null;\n      const isInformerHidden = this.uppy.getState().info.length === 0;\n      const isModal = !this.opts.inline;\n\n      if ( // If update is connected to showing the Informer - let the screen reader calmly read it.\n      isInformerHidden && ( // If we are in a modal - always superfocus without concern for other elements\n      // on the page (user is unlikely to want to interact with the rest of the page)\n      isModal // If we are already inside of Uppy, or\n      || isFocusInUppy // If we are not focused on anything BUT we have already, at least once, focused on uppy\n      //   1. We focus when isFocusNowhere, because when the element we were focused\n      //      on disappears (e.g. an overlay), - focus gets lost. If user is typing\n      //      something somewhere else on the page, - focus won't be 'nowhere'.\n      //   2. We only focus when focus is nowhere AND this.ifFocusedOnUppyRecently,\n      //      to avoid focus jumps if we do something else on the page.\n      //   [Practical check] Without '&& this.ifFocusedOnUppyRecently', in Safari, in inline mode,\n      //                     when file is uploading, - navigate via tab to the checkbox,\n      //                     try to press space multiple times. Focus will jump to Uppy.\n      || isFocusNowhere && this.ifFocusedOnUppyRecently)) {\n        this.superFocus(this.el, this.getPluginState().activeOverlayType);\n      } else {\n        this.superFocus.cancel();\n      }\n    };\n\n    this.afterUpdate = () => {\n      if (this.opts.disabled && !this.dashboardIsDisabled) {\n        this.disableAllFocusableElements(true);\n        return;\n      }\n\n      if (!this.opts.disabled && this.dashboardIsDisabled) {\n        this.disableAllFocusableElements(false);\n      }\n\n      this.superFocusOnEachUpdate();\n    };\n\n    this.saveFileCard = (meta, fileID) => {\n      this.uppy.setFileMeta(fileID, meta);\n      this.toggleFileCard(false, fileID);\n    };\n\n    Object.defineProperty(this, _attachRenderFunctionToTarget, {\n      writable: true,\n      value: target => {\n        const plugin = this.uppy.getPlugin(target.id);\n        return { ...target,\n          icon: plugin.icon || this.opts.defaultPickerIcon,\n          render: plugin.render\n        };\n      }\n    });\n    Object.defineProperty(this, _isTargetSupported, {\n      writable: true,\n      value: target => {\n        const plugin = this.uppy.getPlugin(target.id); // If the plugin does not provide a `supported` check, assume the plugin works everywhere.\n\n        if (typeof plugin.isSupported !== 'function') {\n          return true;\n        }\n\n        return plugin.isSupported();\n      }\n    });\n    Object.defineProperty(this, _getAcquirers, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'acquirer' && _classPrivateFieldLooseBase(this, _isTargetSupported)[_isTargetSupported](target)).map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n    Object.defineProperty(this, _getProgressIndicators, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'progressindicator').map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n    Object.defineProperty(this, _getEditors, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'editor').map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n\n    this.render = state => {\n      const pluginState = this.getPluginState();\n      const {\n        files,\n        capabilities,\n        allowNewUpload\n      } = state;\n      const {\n        newFiles,\n        uploadStartedFiles,\n        completeFiles,\n        erroredFiles,\n        inProgressFiles,\n        inProgressNotPausedFiles,\n        processingFiles,\n        isUploadStarted,\n        isAllComplete,\n        isAllErrored,\n        isAllPaused\n      } = this.uppy.getObjectOfFilesPerState();\n\n      const acquirers = _classPrivateFieldLooseBase(this, _getAcquirers)[_getAcquirers](pluginState.targets);\n\n      const progressindicators = _classPrivateFieldLooseBase(this, _getProgressIndicators)[_getProgressIndicators](pluginState.targets);\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](pluginState.targets);\n\n      let theme;\n\n      if (this.opts.theme === 'auto') {\n        theme = capabilities.darkMode ? 'dark' : 'light';\n      } else {\n        theme = this.opts.theme;\n      }\n\n      if (['files', 'folders', 'both'].indexOf(this.opts.fileManagerSelectionType) < 0) {\n        this.opts.fileManagerSelectionType = 'files'; // eslint-disable-next-line no-console\n\n        console.warn(`Unsupported option for \"fileManagerSelectionType\". Using default of \"${this.opts.fileManagerSelectionType}\".`);\n      }\n\n      return DashboardUI({\n        state,\n        isHidden: pluginState.isHidden,\n        files,\n        newFiles,\n        uploadStartedFiles,\n        completeFiles,\n        erroredFiles,\n        inProgressFiles,\n        inProgressNotPausedFiles,\n        processingFiles,\n        isUploadStarted,\n        isAllComplete,\n        isAllErrored,\n        isAllPaused,\n        totalFileCount: Object.keys(files).length,\n        totalProgress: state.totalProgress,\n        allowNewUpload,\n        acquirers,\n        theme,\n        disabled: this.opts.disabled,\n        disableLocalFiles: this.opts.disableLocalFiles,\n        direction: this.opts.direction,\n        activePickerPanel: pluginState.activePickerPanel,\n        showFileEditor: pluginState.showFileEditor,\n        saveFileEditor: this.saveFileEditor,\n        disableAllFocusableElements: this.disableAllFocusableElements,\n        animateOpenClose: this.opts.animateOpenClose,\n        isClosing: pluginState.isClosing,\n        progressindicators,\n        editors,\n        autoProceed: this.uppy.opts.autoProceed,\n        id: this.id,\n        closeModal: this.requestCloseModal,\n        handleClickOutside: this.handleClickOutside,\n        handleInputChange: this.handleInputChange,\n        handlePaste: this.handlePaste,\n        inline: this.opts.inline,\n        showPanel: this.showPanel,\n        hideAllPanels: this.hideAllPanels,\n        i18n: this.i18n,\n        i18nArray: this.i18nArray,\n        uppy: this.uppy,\n        note: this.opts.note,\n        recoveredState: state.recoveredState,\n        metaFields: pluginState.metaFields,\n        resumableUploads: capabilities.resumableUploads || false,\n        individualCancellation: capabilities.individualCancellation,\n        isMobileDevice: capabilities.isMobileDevice,\n        fileCardFor: pluginState.fileCardFor,\n        toggleFileCard: this.toggleFileCard,\n        toggleAddFilesPanel: this.toggleAddFilesPanel,\n        showAddFilesPanel: pluginState.showAddFilesPanel,\n        saveFileCard: this.saveFileCard,\n        openFileEditor: this.openFileEditor,\n        canEditFile: this.canEditFile,\n        width: this.opts.width,\n        height: this.opts.height,\n        showLinkToFileUploadResult: this.opts.showLinkToFileUploadResult,\n        fileManagerSelectionType: this.opts.fileManagerSelectionType,\n        proudlyDisplayPoweredByUppy: this.opts.proudlyDisplayPoweredByUppy,\n        hideCancelButton: this.opts.hideCancelButton,\n        hideRetryButton: this.opts.hideRetryButton,\n        hidePauseResumeButton: this.opts.hidePauseResumeButton,\n        showRemoveButtonAfterComplete: this.opts.showRemoveButtonAfterComplete,\n        containerWidth: pluginState.containerWidth,\n        containerHeight: pluginState.containerHeight,\n        areInsidesReadyToBeVisible: pluginState.areInsidesReadyToBeVisible,\n        isTargetDOMEl: this.isTargetDOMEl,\n        parentElement: this.el,\n        allowedFileTypes: this.uppy.opts.restrictions.allowedFileTypes,\n        maxNumberOfFiles: this.uppy.opts.restrictions.maxNumberOfFiles,\n        requiredMetaFields: this.uppy.opts.restrictions.requiredMetaFields,\n        showSelectedFiles: this.opts.showSelectedFiles,\n        handleCancelRestore: this.handleCancelRestore,\n        handleRequestThumbnail: this.handleRequestThumbnail,\n        handleCancelThumbnail: this.handleCancelThumbnail,\n        // drag props\n        isDraggingOver: pluginState.isDraggingOver,\n        handleDragOver: this.handleDragOver,\n        handleDragLeave: this.handleDragLeave,\n        handleDrop: this.handleDrop\n      });\n    };\n\n    this.discoverProviderPlugins = () => {\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin && !plugin.target && plugin.opts && plugin.opts.target === this.constructor) {\n          this.addTarget(plugin);\n        }\n      });\n    };\n\n    this.install = () => {\n      // Set default state for Dashboard\n      this.setPluginState({\n        isHidden: true,\n        fileCardFor: null,\n        activeOverlayType: null,\n        showAddFilesPanel: false,\n        activePickerPanel: false,\n        showFileEditor: false,\n        metaFields: this.opts.metaFields,\n        targets: [],\n        // We'll make them visible once .containerWidth is determined\n        areInsidesReadyToBeVisible: false,\n        isDraggingOver: false\n      });\n      const {\n        inline,\n        closeAfterFinish\n      } = this.opts;\n\n      if (inline && closeAfterFinish) {\n        throw new Error('[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.');\n      }\n\n      const {\n        allowMultipleUploads,\n        allowMultipleUploadBatches\n      } = this.uppy.opts;\n\n      if ((allowMultipleUploads || allowMultipleUploadBatches) && closeAfterFinish) {\n        this.uppy.log('[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true', 'warning');\n      }\n\n      const {\n        target\n      } = this.opts;\n\n      if (target) {\n        this.mount(target, this);\n      }\n\n      const plugins = this.opts.plugins || [];\n      plugins.forEach(pluginID => {\n        const plugin = this.uppy.getPlugin(pluginID);\n\n        if (plugin) {\n          plugin.mount(this, plugin);\n        }\n      });\n\n      if (!this.opts.disableStatusBar) {\n        this.uppy.use(StatusBar, {\n          id: `${this.id}:StatusBar`,\n          target: this,\n          hideUploadButton: this.opts.hideUploadButton,\n          hideRetryButton: this.opts.hideRetryButton,\n          hidePauseResumeButton: this.opts.hidePauseResumeButton,\n          hideCancelButton: this.opts.hideCancelButton,\n          showProgressDetails: this.opts.showProgressDetails,\n          hideAfterFinish: this.opts.hideProgressAfterFinish,\n          locale: this.opts.locale,\n          doneButtonHandler: this.opts.doneButtonHandler\n        });\n      }\n\n      if (!this.opts.disableInformer) {\n        this.uppy.use(Informer, {\n          id: `${this.id}:Informer`,\n          target: this\n        });\n      }\n\n      if (!this.opts.disableThumbnailGenerator) {\n        this.uppy.use(ThumbnailGenerator, {\n          id: `${this.id}:ThumbnailGenerator`,\n          thumbnailWidth: this.opts.thumbnailWidth,\n          thumbnailHeight: this.opts.thumbnailHeight,\n          thumbnailType: this.opts.thumbnailType,\n          waitForThumbnailsBeforeUpload: this.opts.waitForThumbnailsBeforeUpload,\n          // If we don't block on thumbnails, we can lazily generate them\n          lazy: !this.opts.waitForThumbnailsBeforeUpload\n        });\n      } // Dark Mode / theme\n\n\n      this.darkModeMediaQuery = typeof window !== 'undefined' && window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;\n      const isDarkModeOnFromTheStart = this.darkModeMediaQuery ? this.darkModeMediaQuery.matches : false;\n      this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnFromTheStart ? 'on' : 'off'}`);\n      this.setDarkModeCapability(isDarkModeOnFromTheStart);\n\n      if (this.opts.theme === 'auto') {\n        this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange);\n      }\n\n      this.discoverProviderPlugins();\n      this.initEvents();\n    };\n\n    this.uninstall = () => {\n      if (!this.opts.disableInformer) {\n        const informer = this.uppy.getPlugin(`${this.id}:Informer`); // Checking if this plugin exists, in case it was removed by uppy-core\n        // before the Dashboard was.\n\n        if (informer) this.uppy.removePlugin(informer);\n      }\n\n      if (!this.opts.disableStatusBar) {\n        const statusBar = this.uppy.getPlugin(`${this.id}:StatusBar`);\n        if (statusBar) this.uppy.removePlugin(statusBar);\n      }\n\n      if (!this.opts.disableThumbnailGenerator) {\n        const thumbnail = this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);\n        if (thumbnail) this.uppy.removePlugin(thumbnail);\n      }\n\n      const plugins = this.opts.plugins || [];\n      plugins.forEach(pluginID => {\n        const plugin = this.uppy.getPlugin(pluginID);\n        if (plugin) plugin.unmount();\n      });\n\n      if (this.opts.theme === 'auto') {\n        this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange);\n      }\n\n      this.unmount();\n      this.removeEvents();\n    };\n\n    this.id = this.opts.id || 'Dashboard';\n    this.title = 'Dashboard';\n    this.type = 'orchestrator';\n    this.modalName = `uppy-Dashboard-${nanoid()}`;\n    this.defaultLocale = locale; // set default options\n\n    const defaultOptions = {\n      target: 'body',\n      metaFields: [],\n      trigger: null,\n      inline: false,\n      width: 750,\n      height: 550,\n      thumbnailWidth: 280,\n      thumbnailType: 'image/jpeg',\n      waitForThumbnailsBeforeUpload: false,\n      defaultPickerIcon,\n      showLinkToFileUploadResult: false,\n      showProgressDetails: false,\n      hideUploadButton: false,\n      hideCancelButton: false,\n      hideRetryButton: false,\n      hidePauseResumeButton: false,\n      hideProgressAfterFinish: false,\n      doneButtonHandler: () => {\n        this.uppy.reset();\n        this.requestCloseModal();\n      },\n      note: null,\n      closeModalOnClickOutside: false,\n      closeAfterFinish: false,\n      disableStatusBar: false,\n      disableInformer: false,\n      disableThumbnailGenerator: false,\n      disablePageScrollWhenModalOpen: true,\n      animateOpenClose: true,\n      fileManagerSelectionType: 'files',\n      proudlyDisplayPoweredByUppy: true,\n      onRequestCloseModal: () => this.closeModal(),\n      showSelectedFiles: true,\n      showRemoveButtonAfterComplete: false,\n      browserBackButtonClose: false,\n      theme: 'light',\n      autoOpenFileEditor: false,\n      disabled: false,\n      disableLocalFiles: false\n    }; // merge default options with the ones set by user\n\n    this.opts = { ...defaultOptions,\n      ..._opts\n    };\n    this.i18nInit();\n    this.superFocus = createSuperFocus();\n    this.ifFocusedOnUppyRecently = false; // Timeouts\n\n    this.makeDashboardInsidesVisibleAnywayTimeout = null;\n    this.removeDragOverClassTimeout = null;\n  }\n\n  onMount() {\n    // Set the text direction if the page has not defined one.\n    const element = this.el;\n    const direction = getTextDirection(element);\n\n    if (!direction) {\n      element.dir = 'ltr';\n    }\n  }\n\n}), _class.VERSION = \"2.1.4\", _temp);", "/*\nStimulus 3.0.1\nCopyright \u00A9 2021 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            }\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map;\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach(eventListener => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach(eventListener => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values())\n            .reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map;\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions).sort().forEach(key => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    return {\n        eventTarget: parseEventTarget(matches[4]),\n        eventName: matches[2],\n        eventOptions: matches[9] ? parseEventOptions(matches[9]) : {},\n        identifier: matches[5],\n        methodName: matches[7]\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions.split(\":\").reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nclass Action {\n    constructor(element, index, descriptor) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n    }\n    static forToken(token) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content));\n    }\n    toString() {\n        const eventNameSuffix = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventNameSuffix}->${this.identifier}#${this.methodName}`;\n    }\n    get params() {\n        if (this.eventTarget instanceof Element) {\n            return this.getParamsFromEventTargetAttributes(this.eventTarget);\n        }\n        else {\n            return {};\n        }\n    }\n    getParamsFromEventTargetAttributes(eventTarget) {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`);\n        const attributes = Array.from(eventTarget.attributes);\n        attributes.forEach(({ name, value }) => {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                Object.assign(params, { [camelize(key)]: typecast(value) });\n            }\n        });\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n}\nconst defaultEventNames = {\n    \"a\": e => \"click\",\n    \"button\": e => \"click\",\n    \"form\": e => \"submit\",\n    \"details\": e => \"toggle\",\n    \"input\": e => e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\",\n    \"select\": e => \"change\",\n    \"textarea\": e => \"input\"\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        if (this.willBeInvokedByEvent(event)) {\n            this.invokeWithEvent(event);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            const { params } = this.action;\n            const actionEvent = Object.assign(event, { params });\n            this.method.call(this.controller, actionEvent);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set;\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(node, attributeName) {\n        const element = node;\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map;\n        this.mutationObserver = new MutationObserver(mutations => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map(attribute => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some(set => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([key, values]) => values.has(value))\n            .map(([key, values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map;\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap;\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach(token => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach(token => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens)\n            .findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString.trim().split(/\\s+/).filter(content => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap;\n        this.valuesByTokenByElement = new WeakMap;\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map;\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map;\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach(binding => this.delegate.bindingDisconnected(binding));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    start() {\n        this.stringMapObserver.start();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            const value = descriptor.reader(rawValue);\n            let oldValue = rawOldValue;\n            if (rawOldValue) {\n                oldValue = descriptor.reader(rawOldValue);\n            }\n            changedMethod.call(this.receiver, value, oldValue);\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map(key => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach(key => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap;\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach(name => values.add(name));\n        return values;\n    }, new Set));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map(key => [key, definition[key]]) : [];\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [\n            ...Object.getOwnPropertyNames(object),\n            ...Object.getOwnPropertySymbols(object)\n        ];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended }\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () { this.a.call(this); };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b;\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor)\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap;\n        this.connectedContexts = new Set;\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap;\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set;\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target\n            || this.findTarget(targetName)\n            || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName)\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map(element => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n    }\n    findElement(selector) {\n        return this.element.matches(selector)\n            ? this.element\n            : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...this.element.matches(selector) ? [this.element] : [],\n            ...this.queryElements(selector).filter(this.containsElement)\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap;\n        this.scopeReferenceCounts = new WeakMap;\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map;\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap;\n        this.modulesByIdentifier = new Map;\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find(context => context.element == element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach(scope => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach(scope => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: identifier => `data-${identifier}-target`\n};\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n    }\n    static start(element, schema) {\n        const application = new Application(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        if (controllerConstructor.shouldLoad) {\n            this.load({ identifier, controllerConstructor });\n        }\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach(definition => this.router.loadDefinition(definition));\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach(identifier => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map(context => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise(resolve => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            }\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            }\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            }\n        }\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            }\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            }\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            }\n        }\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            }\n        }\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            }\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            }\n        }\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition]) {\n    return valueDescriptorForTokenAndTypeDefinition(token, typeDefinition);\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array: return \"array\";\n        case Boolean: return \"boolean\";\n        case Number: return \"number\";\n        case Object: return \"object\";\n        case String: return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\": return \"boolean\";\n        case \"number\": return \"number\";\n        case \"string\": return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(typeObject) {\n    const typeFromObject = parseValueTypeConstant(typeObject.type);\n    if (typeFromObject) {\n        const defaultValueType = parseValueTypeDefault(typeObject.default);\n        if (typeFromObject !== defaultValueType) {\n            throw new Error(`Type \"${typeFromObject}\" must match the type of the default value. Given default value: \"${typeObject.default}\" as \"${defaultValueType}\"`);\n        }\n        return typeFromObject;\n    }\n}\nfunction parseValueTypeDefinition(typeDefinition) {\n    const typeFromObject = parseValueTypeObject(typeDefinition);\n    const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    throw new Error(`Unknown value type \"${typeDefinition}\"`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const defaultValue = typeDefinition.default;\n    if (defaultValue !== undefined)\n        return defaultValue;\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(token, typeDefinition) {\n    const key = `${dasherize(token)}-value`;\n    const type = parseValueTypeDefinition(typeDefinition);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() { return defaultValueForDefinition(typeDefinition); },\n        get hasCustomDefaultValue() { return parseValueTypeDefault(typeDefinition) !== undefined; },\n        reader: readers[type],\n        writer: writers[type] || writers.default\n    };\n}\nconst defaultValuesByType = {\n    get array() { return []; },\n    boolean: false,\n    number: 0,\n    get object() { return {}; },\n    string: \"\"\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(\"Expected array\");\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || value == \"false\");\n    },\n    number(value) {\n        return Number(value);\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(\"Expected object\");\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    }\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [ClassPropertiesBlessing, TargetPropertiesBlessing, ValuePropertiesBlessing];\nController.targets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Application } from \"@hotwired/stimulus\";\n\nconst application = Application.start();\n\nwindow.Stimulus = application;\n\nexport { application };\n", "import { Controller } from '@hotwired/stimulus';\nimport Core from '@uppy/core';\nimport AwsS3Multipart from '@uppy/aws-s3-multipart';\nimport FileInput from '@uppy/file-input';\nimport Informer from '@uppy/informer';\nimport StatusBar from '@uppy/status-bar';\nimport Dashboard from '@uppy/dashboard';\n\nexport default class extends Controller {\n  static targets = [ 'input', 'multiInput', 'status', 'result', 'preview', 'error' ];\n  static values = { formats: Array, size: Number };\n\n  inputTargetConnected(element) {\n    if (this.uppy) {\n      return;\n    }\n\n    element.classList.add('hidden');\n    const label = element.dataset.label || '\uD83D\uDCCE Attach file';\n    const fileTypes = this.formatsValue.length > 0 ? this.formatsValue : null;\n    const fileSize = this.sizeValue;\n\n    this.uppy = new Core({\n      id: element.id,\n      autoProceed: true,\n      restrictions: {\n        allowedFileTypes: fileTypes,\n        maxFileSize: fileSize,\n      }\n    });\n\n    element.addEventListener('change', (event) => {\n      this.showError('');\n      const files = Array.from(event.target.files);\n\n      files.forEach((file) => {\n        try {\n          this.uppy.addFile({\n            source: 'file input',\n            name: file.name,\n            type: file.type,\n            data: file,\n          });\n        } catch (err) {\n          element.value = null;\n          this.showError(err.message);\n        }\n      });\n    });\n\n    this.uppy.on('file-removed', () => { element.value = null });\n\n    this.uppy.use(AwsS3Multipart, {\n      companionUrl: '/'\n    })\n    .use(StatusBar, {\n      target: this.statusTarget,\n    });\n\n    this.uppy.on('upload-success', (file, response) => {\n\n      this.resultTarget.value = this.fileData(file, response);\n      if (this.hasPreviewTarget) {\n        this.updatePreview(file, response.uploadURL);\n      }\n    })\n  }\n\n  multiInputTargetConnected(element) {\n    this.uppy = new Core({\n      id: element.id,\n      autoProceed: true\n    });\n\n    this.uppy.use(AwsS3Multipart, {\n      companionUrl: '/'\n    })\n    .use(Dashboard, {\n      target: element.firstChild,\n      inline: true,\n      height: 'auto',\n      replaceTargetContent: true,\n      doneButtonHandler: null\n    });\n\n    this.uppy.on('upload-success', (file, response) => {\n      const hiddenField = document.createElement('input');\n\n      hiddenField.type = 'hidden';\n      hiddenField.name = 'studio_content[file][]';\n      hiddenField.value = this.fileData(file, response);\n\n      element.appendChild(hiddenField);\n    })\n  }\n\n  disconnect() {\n    if (this.uppy) {\n      this.uppy.close();\n    }\n  }\n\n  // Some forms have no dedicated error element; fall back to the status area\n  // so a missing target never breaks the upload flow.\n  showError(message) {\n    if (this.hasErrorTarget) {\n      this.errorTarget.innerText = message;\n    } else if (message && this.hasStatusTarget) {\n      this.statusTarget.innerText = message;\n    } else if (message) {\n      alert(message);\n    }\n  }\n\n  fileData(file, response) {\n    const id = response.uploadURL.match(/\\/cache\\/([^\\?]+)/)[1]; // object key without prefix\n\n    return JSON.stringify({\n      id: id,\n      storage: 'cache',\n      metadata: {\n        size:      file.size,\n        filename:  file.name,\n        mime_type: file.type,\n        relative_path: file.meta.relativePath || null, // set by Uppy when a whole folder is dropped\n      }\n    })\n  }\n\n  updatePreview(file, link) {\n    switch (this.previewTarget.tagName) {\n      case \"DIV\":\n        this.previewTarget.innerHTML = file.name;\n        break;\n      case \"IMG\":\n        this.previewTarget.src = link;\n        break;\n      default:\n        return;\n    }\n  }\n}\n", "import { application } from \"./controllers/application\";\nimport UploadController from \"./controllers/upload_controller.js\";\napplication.register(\"upload\", Uplo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