UNPKG

neo-builder

Version:

the fastest tiny script packager written in javascript and supporting iife dynamic chaining w/o extra runtime

1,236 lines (1,204 loc) 366 kB
"use strict"; (() => { var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // tests/_npm/node_modules/@transloadit/prettier-bytes/prettierBytes.js var require_prettierBytes = __commonJS({ "tests/_npm/node_modules/@transloadit/prettier-bytes/prettierBytes.js"(exports, module) { module.exports = function prettierBytes3(num) { if (typeof num !== "number" || isNaN(num)) { throw new TypeError(`Expected a number, got ${typeof num}`); } const neg = num < 0; const units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; if (neg) { num = -num; } if (num < 1) { return `${(neg ? "-" : "") + num} B`; } const exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1); num = Number(num / Math.pow(1024, exponent)); const unit = units[exponent]; if (num >= 10 || num % 1 === 0) { return `${(neg ? "-" : "") + num.toFixed(0)} ${unit}`; } return `${(neg ? "-" : "") + num.toFixed(1)} ${unit}`; }; } }); // tests/_npm/node_modules/classnames/index.js var require_classnames = __commonJS({ "tests/_npm/node_modules/classnames/index.js"(exports, module) { (function() { "use strict"; var hasOwn = {}.hasOwnProperty; var nativeCodeString = "[native code]"; function classNames13() { var classes = []; for (var i4 = 0; i4 < arguments.length; i4++) { var arg = arguments[i4]; if (!arg) continue; var argType = typeof arg; if (argType === "string" || argType === "number") { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames13.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === "object") { if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) { classes.push(arg.toString()); continue; } for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(" "); } if (typeof module !== "undefined" && module.exports) { classNames13.default = classNames13; module.exports = classNames13; } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) { define("classnames", [], function() { return classNames13; }); } else { window.classNames = classNames13; } })(); } }); // tests/_npm/node_modules/eventemitter3/index.js var require_eventemitter3 = __commonJS({ "tests/_npm/node_modules/eventemitter3/index.js"(exports, module) { "use strict"; var has2 = Object.prototype.hasOwnProperty; var prefix = "~"; function Events() { } if (Object.create) { Events.prototype = /* @__PURE__ */ Object.create(null); if (!new Events().__proto__) prefix = false; } function EE(fn, context, once) { this.fn = fn; this.context = context; this.once = once || false; } function addListener(emitter, event, fn, context, once) { if (typeof fn !== "function") { throw new TypeError("The listener must be a function"); } var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event; if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); else emitter._events[evt] = [emitter._events[evt], listener]; return emitter; } function clearEvent(emitter, evt) { if (--emitter._eventsCount === 0) emitter._events = new Events(); else delete emitter._events[evt]; } function EventEmitter2() { this._events = new Events(); this._eventsCount = 0; } EventEmitter2.prototype.eventNames = function eventNames() { var names = [], events, name; if (this._eventsCount === 0) return names; for (name in events = this._events) { if (has2.call(events, name)) names.push(prefix ? name.slice(1) : name); } if (Object.getOwnPropertySymbols) { return names.concat(Object.getOwnPropertySymbols(events)); } return names; }; EventEmitter2.prototype.listeners = function listeners(event) { var evt = prefix ? prefix + event : event, handlers = this._events[evt]; if (!handlers) return []; if (handlers.fn) return [handlers.fn]; for (var i4 = 0, l4 = handlers.length, ee2 = new Array(l4); i4 < l4; i4++) { ee2[i4] = handlers[i4].fn; } return ee2; }; EventEmitter2.prototype.listenerCount = function listenerCount(event) { var evt = prefix ? prefix + event : event, listeners = this._events[evt]; if (!listeners) return 0; if (listeners.fn) return 1; return listeners.length; }; EventEmitter2.prototype.emit = function emit(event, a1, a22, a32, a4, a5) { var evt = prefix ? prefix + event : event; if (!this._events[evt]) return false; var listeners = this._events[evt], len = arguments.length, args, i4; if (listeners.fn) { if (listeners.once) this.removeListener(event, listeners.fn, void 0, true); switch (len) { case 1: return listeners.fn.call(listeners.context), true; case 2: return listeners.fn.call(listeners.context, a1), true; case 3: return listeners.fn.call(listeners.context, a1, a22), true; case 4: return listeners.fn.call(listeners.context, a1, a22, a32), true; case 5: return listeners.fn.call(listeners.context, a1, a22, a32, a4), true; case 6: return listeners.fn.call(listeners.context, a1, a22, a32, a4, a5), true; } for (i4 = 1, args = new Array(len - 1); i4 < len; i4++) { args[i4 - 1] = arguments[i4]; } listeners.fn.apply(listeners.context, args); } else { var length = listeners.length, j4; for (i4 = 0; i4 < length; i4++) { if (listeners[i4].once) this.removeListener(event, listeners[i4].fn, void 0, true); switch (len) { case 1: listeners[i4].fn.call(listeners[i4].context); break; case 2: listeners[i4].fn.call(listeners[i4].context, a1); break; case 3: listeners[i4].fn.call(listeners[i4].context, a1, a22); break; case 4: listeners[i4].fn.call(listeners[i4].context, a1, a22, a32); break; default: if (!args) for (j4 = 1, args = new Array(len - 1); j4 < len; j4++) { args[j4 - 1] = arguments[j4]; } listeners[i4].fn.apply(listeners[i4].context, args); } } } return true; }; EventEmitter2.prototype.on = function on(event, fn, context) { return addListener(this, event, fn, context, false); }; EventEmitter2.prototype.once = function once(event, fn, context) { return addListener(this, event, fn, context, true); }; EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) { var evt = prefix ? prefix + event : event; if (!this._events[evt]) return this; if (!fn) { clearEvent(this, evt); return this; } var listeners = this._events[evt]; if (listeners.fn) { if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) { clearEvent(this, evt); } } else { for (var i4 = 0, events = [], length = listeners.length; i4 < length; i4++) { if (listeners[i4].fn !== fn || once && !listeners[i4].once || context && listeners[i4].context !== context) { events.push(listeners[i4]); } } if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; else clearEvent(this, evt); } return this; }; EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) { var evt; if (event) { evt = prefix ? prefix + event : event; if (this._events[evt]) clearEvent(this, evt); } else { this._events = new Events(); this._eventsCount = 0; } return this; }; EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener; EventEmitter2.prototype.addListener = EventEmitter2.prototype.on; EventEmitter2.prefixed = prefix; EventEmitter2.EventEmitter = EventEmitter2; if ("undefined" !== typeof module) { module.exports = EventEmitter2; } } }); // tests/_npm/node_modules/lodash/isObject.js var require_isObject = __commonJS({ "tests/_npm/node_modules/lodash/isObject.js"(exports, module) { function isObject(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } module.exports = isObject; } }); // tests/_npm/node_modules/lodash/_freeGlobal.js var require_freeGlobal = __commonJS({ "tests/_npm/node_modules/lodash/_freeGlobal.js"(exports, module) { var freeGlobal = typeof global == "object" && global && global.Object === Object && global; module.exports = freeGlobal; } }); // tests/_npm/node_modules/lodash/_root.js var require_root = __commonJS({ "tests/_npm/node_modules/lodash/_root.js"(exports, module) { var freeGlobal = require_freeGlobal(); var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root = freeGlobal || freeSelf || Function("return this")(); module.exports = root; } }); // tests/_npm/node_modules/lodash/now.js var require_now = __commonJS({ "tests/_npm/node_modules/lodash/now.js"(exports, module) { var root = require_root(); var now = function() { return root.Date.now(); }; module.exports = now; } }); // tests/_npm/node_modules/lodash/_trimmedEndIndex.js var require_trimmedEndIndex = __commonJS({ "tests/_npm/node_modules/lodash/_trimmedEndIndex.js"(exports, module) { var reWhitespace = /\s/; function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) { } return index; } module.exports = trimmedEndIndex; } }); // tests/_npm/node_modules/lodash/_baseTrim.js var require_baseTrim = __commonJS({ "tests/_npm/node_modules/lodash/_baseTrim.js"(exports, module) { var trimmedEndIndex = require_trimmedEndIndex(); var reTrimStart = /^\s+/; function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } module.exports = baseTrim; } }); // tests/_npm/node_modules/lodash/_Symbol.js var require_Symbol = __commonJS({ "tests/_npm/node_modules/lodash/_Symbol.js"(exports, module) { var root = require_root(); var Symbol2 = root.Symbol; module.exports = Symbol2; } }); // tests/_npm/node_modules/lodash/_getRawTag.js var require_getRawTag = __commonJS({ "tests/_npm/node_modules/lodash/_getRawTag.js"(exports, module) { var Symbol2 = require_Symbol(); var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; var nativeObjectToString = objectProto.toString; var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = void 0; var unmasked = true; } catch (e4) { } var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; } }); // tests/_npm/node_modules/lodash/_objectToString.js var require_objectToString = __commonJS({ "tests/_npm/node_modules/lodash/_objectToString.js"(exports, module) { var objectProto = Object.prototype; var nativeObjectToString = objectProto.toString; function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; } }); // tests/_npm/node_modules/lodash/_baseGetTag.js var require_baseGetTag = __commonJS({ "tests/_npm/node_modules/lodash/_baseGetTag.js"(exports, module) { var Symbol2 = require_Symbol(); var getRawTag = require_getRawTag(); var objectToString = require_objectToString(); var nullTag = "[object Null]"; var undefinedTag = "[object Undefined]"; var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; function baseGetTag(value) { if (value == null) { return value === void 0 ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; } }); // tests/_npm/node_modules/lodash/isObjectLike.js var require_isObjectLike = __commonJS({ "tests/_npm/node_modules/lodash/isObjectLike.js"(exports, module) { function isObjectLike(value) { return value != null && typeof value == "object"; } module.exports = isObjectLike; } }); // tests/_npm/node_modules/lodash/isSymbol.js var require_isSymbol = __commonJS({ "tests/_npm/node_modules/lodash/isSymbol.js"(exports, module) { var baseGetTag = require_baseGetTag(); var isObjectLike = require_isObjectLike(); var symbolTag = "[object Symbol]"; function isSymbol(value) { return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; } module.exports = isSymbol; } }); // tests/_npm/node_modules/lodash/toNumber.js var require_toNumber = __commonJS({ "tests/_npm/node_modules/lodash/toNumber.js"(exports, module) { var baseTrim = require_baseTrim(); var isObject = require_isObject(); var isSymbol = require_isSymbol(); var NAN = 0 / 0; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsOctal = /^0o[0-7]+$/i; var freeParseInt = parseInt; function toNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } module.exports = toNumber; } }); // tests/_npm/node_modules/lodash/debounce.js var require_debounce = __commonJS({ "tests/_npm/node_modules/lodash/debounce.js"(exports, module) { var isObject = require_isObject(); var now = require_now(); var toNumber = require_toNumber(); var FUNC_ERROR_TEXT = "Expected a function"; var nativeMax = Math.max; var nativeMin = Math.min; function debounce3(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = "maxWait" in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = void 0; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { lastInvokeTime = time; timerId = setTimeout(timerExpired, wait); return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = void 0; if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = void 0; return result; } function cancel() { if (timerId !== void 0) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = void 0; } function flush() { return timerId === void 0 ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === void 0) { return leadingEdge(lastCallTime); } if (maxing) { clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === void 0) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce3; } }); // tests/_npm/node_modules/is-shallow-equal/index.js var require_is_shallow_equal = __commonJS({ "tests/_npm/node_modules/is-shallow-equal/index.js"(exports, module) { module.exports = function isShallowEqual(a4, b4) { if (a4 === b4) return true; for (var i4 in a4) if (!(i4 in b4)) return false; for (var i4 in b4) if (a4[i4] !== b4[i4]) return false; return true; }; } }); // tests/_npm/node_modules/@uppy/dashboard/node_modules/@transloadit/prettier-bytes/prettierBytes.js var require_prettierBytes2 = __commonJS({ "tests/_npm/node_modules/@uppy/dashboard/node_modules/@transloadit/prettier-bytes/prettierBytes.js"(exports, module) { module.exports = function prettierBytes3(num) { if (typeof num !== "number" || isNaN(num)) { throw new TypeError("Expected a number, got " + typeof num); } var neg = num < 0; var units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; if (neg) { num = -num; } if (num < 1) { return (neg ? "-" : "") + num + " B"; } var exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1); num = Number(num / Math.pow(1024, exponent)); var unit = units[exponent]; if (num >= 10 || num % 1 === 0) { return (neg ? "-" : "") + num.toFixed(0) + " " + unit; } else { return (neg ? "-" : "") + num.toFixed(1) + " " + unit; } }; } }); // tests/_npm/node_modules/@uppy/utils/lib/hasProperty.js function has(object, key) { return Object.prototype.hasOwnProperty.call(object, key); } // tests/_npm/node_modules/@uppy/utils/lib/Translator.js function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } var id = 0; function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } function insertReplacement(source, rx, replacement) { const newParts = []; source.forEach((chunk) => { if (typeof chunk !== "string") { return newParts.push(chunk); } return rx[Symbol.split](chunk).forEach((raw, i4, list) => { if (raw !== "") { newParts.push(raw); } if (i4 < list.length - 1) { newParts.push(replacement); } }); }); return newParts; } function interpolate(phrase, options) { const dollarRegex = /\$/g; const dollarBillsYall = "$$$$"; let interpolated = [phrase]; if (options == null) return interpolated; for (const arg of Object.keys(options)) { if (arg !== "_") { let replacement = options[arg]; if (typeof replacement === "string") { replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall); } interpolated = insertReplacement(interpolated, new RegExp(`%\\{${arg}\\}`, "g"), replacement); } } return interpolated; } var _apply = /* @__PURE__ */ _classPrivateFieldLooseKey("apply"); var Translator = class { constructor(locales) { Object.defineProperty(this, _apply, { value: _apply2 }); this.locale = { strings: {}, pluralize(n3) { if (n3 === 1) { return 0; } return 1; } }; if (Array.isArray(locales)) { locales.forEach(_classPrivateFieldLooseBase(this, _apply)[_apply], this); } else { _classPrivateFieldLooseBase(this, _apply)[_apply](locales); } } /** * Public translate method * * @param key * @param options with values that will be used later to replace placeholders in string * @returns string translated (and interpolated) */ translate(key, options) { return this.translateArray(key, options).join(""); } /** * Get a translation and return the translated and interpolated parts as an array. * * @returns The translated and interpolated parts, in order. */ translateArray(key, options) { if (!has(this.locale.strings, key)) { throw new Error(`missing string: ${key}`); } const string = this.locale.strings[key]; const hasPluralForms = typeof string === "object"; if (hasPluralForms) { if (options && typeof options.smart_count !== "undefined") { const plural = this.locale.pluralize(options.smart_count); return interpolate(string[plural], options); } throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}"); } return interpolate(string, options); } }; function _apply2(locale) { if (!(locale != null && locale.strings)) { return; } const prevLocale = this.locale; this.locale = { ...prevLocale, strings: { ...prevLocale.strings, ...locale.strings } }; this.locale.pluralize = locale.pluralize || prevLocale.pluralize; } // tests/_npm/node_modules/nanoid/non-secure/index.js var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; var nanoid = (size = 21) => { let id7 = ""; let i4 = size; while (i4--) { id7 += urlAlphabet[Math.random() * 64 | 0]; } return id7; }; // tests/_npm/node_modules/@uppy/utils/lib/getFileNameAndExtension.js function getFileNameAndExtension(fullFileName) { const lastDot = fullFileName.lastIndexOf("."); if (lastDot === -1 || lastDot === fullFileName.length - 1) { return { name: fullFileName, extension: void 0 }; } return { name: fullFileName.slice(0, lastDot), extension: fullFileName.slice(lastDot + 1) }; } // tests/_npm/node_modules/@uppy/utils/lib/mimeTypes.js var mimeTypes_default = { __proto__: null, md: "text/markdown", markdown: "text/markdown", mp4: "video/mp4", mp3: "audio/mp3", svg: "image/svg+xml", jpg: "image/jpeg", png: "image/png", webp: "image/webp", gif: "image/gif", heic: "image/heic", heif: "image/heif", yaml: "text/yaml", yml: "text/yaml", csv: "text/csv", tsv: "text/tab-separated-values", tab: "text/tab-separated-values", avi: "video/x-msvideo", mks: "video/x-matroska", mkv: "video/x-matroska", mov: "video/quicktime", dicom: "application/dicom", doc: "application/msword", docm: "application/vnd.ms-word.document.macroenabled.12", docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", dot: "application/msword", dotm: "application/vnd.ms-word.template.macroenabled.12", dotx: "application/vnd.openxmlformats-officedocument.wordprocessingml.template", xla: "application/vnd.ms-excel", xlam: "application/vnd.ms-excel.addin.macroenabled.12", xlc: "application/vnd.ms-excel", xlf: "application/x-xliff+xml", xlm: "application/vnd.ms-excel", xls: "application/vnd.ms-excel", xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12", xlsm: "application/vnd.ms-excel.sheet.macroenabled.12", xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", xlt: "application/vnd.ms-excel", xltm: "application/vnd.ms-excel.template.macroenabled.12", xltx: "application/vnd.openxmlformats-officedocument.spreadsheetml.template", xlw: "application/vnd.ms-excel", txt: "text/plain", text: "text/plain", conf: "text/plain", log: "text/plain", pdf: "application/pdf", zip: "application/zip", "7z": "application/x-7z-compressed", rar: "application/x-rar-compressed", tar: "application/x-tar", gz: "application/gzip", dmg: "application/x-apple-diskimage" }; // tests/_npm/node_modules/@uppy/utils/lib/getFileType.js function getFileType(file) { var _getFileNameAndExtens; if (file.type) return file.type; const fileExtension = file.name ? (_getFileNameAndExtens = getFileNameAndExtension(file.name).extension) == null ? void 0 : _getFileNameAndExtens.toLowerCase() : null; if (fileExtension && fileExtension in mimeTypes_default) { return mimeTypes_default[fileExtension]; } return "application/octet-stream"; } // tests/_npm/node_modules/@uppy/utils/lib/generateFileID.js function encodeCharacter(character) { return character.charCodeAt(0).toString(32); } function encodeFilename(name) { let suffix = ""; return name.replace(/[^A-Z0-9]/gi, (character) => { suffix += `-${encodeCharacter(character)}`; return "/"; }) + suffix; } function generateFileID(file) { let id7 = "uppy"; if (typeof file.name === "string") { id7 += `-${encodeFilename(file.name.toLowerCase())}`; } if (file.type !== void 0) { id7 += `-${file.type}`; } if (file.meta && typeof file.meta.relativePath === "string") { id7 += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`; } if (file.data.size !== void 0) { id7 += `-${file.data.size}`; } if (file.data.lastModified !== void 0) { id7 += `-${file.data.lastModified}`; } return id7; } function hasFileStableId(file) { if (!file.isRemote || !file.remote) return false; const stableIdProviders = /* @__PURE__ */ new Set(["box", "dropbox", "drive", "facebook", "unsplash"]); return stableIdProviders.has(file.remote.provider); } function getSafeFileId(file) { if (hasFileStableId(file)) return file.id; const fileType = getFileType(file); return generateFileID({ ...file, type: fileType }); } // tests/_npm/node_modules/preact/dist/preact.module.js var n; var l; var u; var t; var i; var o; var r; var f; var e; var c = {}; var s = []; var a = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; var h = Array.isArray; function v(n3, l4) { for (var u4 in l4) n3[u4] = l4[u4]; return n3; } function p(n3) { var l4 = n3.parentNode; l4 && l4.removeChild(n3); } function y(l4, u4, t4) { var i4, o4, r4, f4 = {}; for (r4 in u4) "key" == r4 ? i4 = u4[r4] : "ref" == r4 ? o4 = u4[r4] : f4[r4] = u4[r4]; if (arguments.length > 2 && (f4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps) for (r4 in l4.defaultProps) void 0 === f4[r4] && (f4[r4] = l4.defaultProps[r4]); return d(l4, f4, i4, o4, null); } function d(n3, t4, i4, o4, r4) { var f4 = { type: n3, props: t4, key: i4, ref: o4, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 }; return null == r4 && null != l.vnode && l.vnode(f4), f4; } function _() { return { current: null }; } function g(n3) { return n3.children; } function b(n3, l4) { this.props = n3, this.context = l4; } function m(n3, l4) { if (null == l4) return n3.__ ? m(n3.__, n3.__i + 1) : null; for (var u4; l4 < n3.__k.length; l4++) if (null != (u4 = n3.__k[l4]) && null != u4.__e) return u4.__e; return "function" == typeof n3.type ? m(n3) : null; } function k(n3) { var l4, u4; if (null != (n3 = n3.__) && null != n3.__c) { for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++) if (null != (u4 = n3.__k[l4]) && null != u4.__e) { n3.__e = n3.__c.base = u4.__e; break; } return k(n3); } } function w(n3) { (!n3.__d && (n3.__d = true) && i.push(n3) && !x.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(x); } function x() { var n3, u4, t4, o4, r4, e4, c4, s4, a4; for (i.sort(f); n3 = i.shift(); ) n3.__d && (u4 = i.length, o4 = void 0, e4 = (r4 = (t4 = n3).__v).__e, s4 = [], a4 = [], (c4 = t4.__P) && ((o4 = v({}, r4)).__v = r4.__v + 1, l.vnode && l.vnode(o4), L(c4, o4, r4, t4.__n, void 0 !== c4.ownerSVGElement, 32 & r4.__u ? [e4] : null, s4, null == e4 ? m(r4) : e4, !!(32 & r4.__u), a4), o4.__.__k[o4.__i] = o4, M(s4, o4, a4), o4.__e != e4 && k(o4)), i.length > u4 && i.sort(f)); x.__r = 0; } function C(n3, l4, u4, t4, i4, o4, r4, f4, e4, a4, h4) { var v4, p4, y3, d4, _3, g4 = t4 && t4.__k || s, b4 = l4.length; for (u4.__d = e4, P(u4, l4, g4), e4 = u4.__d, v4 = 0; v4 < b4; v4++) null != (y3 = u4.__k[v4]) && "boolean" != typeof y3 && "function" != typeof y3 && (p4 = -1 === y3.__i ? c : g4[y3.__i] || c, y3.__i = v4, L(n3, y3, p4, i4, o4, r4, f4, e4, a4, h4), d4 = y3.__e, y3.ref && p4.ref != y3.ref && (p4.ref && z(p4.ref, null, y3), h4.push(y3.ref, y3.__c || d4, y3)), null == _3 && null != d4 && (_3 = d4), 65536 & y3.__u || p4.__k === y3.__k ? e4 = S(y3, e4, n3) : "function" == typeof y3.type && void 0 !== y3.__d ? e4 = y3.__d : d4 && (e4 = d4.nextSibling), y3.__d = void 0, y3.__u &= -196609); u4.__d = e4, u4.__e = _3; } function P(n3, l4, u4) { var t4, i4, o4, r4, f4, e4 = l4.length, c4 = u4.length, s4 = c4, a4 = 0; for (n3.__k = [], t4 = 0; t4 < e4; t4++) null != (i4 = n3.__k[t4] = null == (i4 = l4[t4]) || "boolean" == typeof i4 || "function" == typeof i4 ? null : "string" == typeof i4 || "number" == typeof i4 || "bigint" == typeof i4 || i4.constructor == String ? d(null, i4, null, null, i4) : h(i4) ? d(g, { children: i4 }, null, null, null) : void 0 === i4.constructor && i4.__b > 0 ? d(i4.type, i4.props, i4.key, i4.ref ? i4.ref : null, i4.__v) : i4) ? (i4.__ = n3, i4.__b = n3.__b + 1, f4 = H(i4, u4, r4 = t4 + a4, s4), i4.__i = f4, o4 = null, -1 !== f4 && (s4--, (o4 = u4[f4]) && (o4.__u |= 131072)), null == o4 || null === o4.__v ? (-1 == f4 && a4--, "function" != typeof i4.type && (i4.__u |= 65536)) : f4 !== r4 && (f4 === r4 + 1 ? a4++ : f4 > r4 ? s4 > e4 - r4 ? a4 += f4 - r4 : a4-- : a4 = f4 < r4 && f4 == r4 - 1 ? f4 - r4 : 0, f4 !== t4 + a4 && (i4.__u |= 65536))) : (o4 = u4[t4]) && null == o4.key && o4.__e && (o4.__e == n3.__d && (n3.__d = m(o4)), N(o4, o4, false), u4[t4] = null, s4--); if (s4) for (t4 = 0; t4 < c4; t4++) null != (o4 = u4[t4]) && 0 == (131072 & o4.__u) && (o4.__e == n3.__d && (n3.__d = m(o4)), N(o4, o4)); } function S(n3, l4, u4) { var t4, i4; if ("function" == typeof n3.type) { for (t4 = n3.__k, i4 = 0; t4 && i4 < t4.length; i4++) t4[i4] && (t4[i4].__ = n3, l4 = S(t4[i4], l4, u4)); return l4; } return n3.__e != l4 && (u4.insertBefore(n3.__e, l4 || null), l4 = n3.__e), l4 && l4.nextSibling; } function $(n3, l4) { return l4 = l4 || [], null == n3 || "boolean" == typeof n3 || (h(n3) ? n3.some(function(n4) { $(n4, l4); }) : l4.push(n3)), l4; } function H(n3, l4, u4, t4) { var i4 = n3.key, o4 = n3.type, r4 = u4 - 1, f4 = u4 + 1, e4 = l4[u4]; if (null === e4 || e4 && i4 == e4.key && o4 === e4.type) return u4; if (t4 > (null != e4 && 0 == (131072 & e4.__u) ? 1 : 0)) for (; r4 >= 0 || f4 < l4.length; ) { if (r4 >= 0) { if ((e4 = l4[r4]) && 0 == (131072 & e4.__u) && i4 == e4.key && o4 === e4.type) return r4; r4--; } if (f4 < l4.length) { if ((e4 = l4[f4]) && 0 == (131072 & e4.__u) && i4 == e4.key && o4 === e4.type) return f4; f4++; } } return -1; } function I(n3, l4, u4) { "-" === l4[0] ? n3.setProperty(l4, null == u4 ? "" : u4) : n3[l4] = null == u4 ? "" : "number" != typeof u4 || a.test(l4) ? u4 : u4 + "px"; } function T(n3, l4, u4, t4, i4) { var o4; n: if ("style" === l4) if ("string" == typeof u4) n3.style.cssText = u4; else { if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4) for (l4 in t4) u4 && l4 in u4 || I(n3.style, l4, ""); if (u4) for (l4 in u4) t4 && u4[l4] === t4[l4] || I(n3.style, l4, u4[l4]); } else if ("o" === l4[0] && "n" === l4[1]) o4 = l4 !== (l4 = l4.replace(/(PointerCapture)$|Capture$/, "$1")), l4 = l4.toLowerCase() in n3 ? l4.toLowerCase().slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u4, u4 ? t4 ? u4.u = t4.u : (u4.u = Date.now(), n3.addEventListener(l4, o4 ? D : A, o4)) : n3.removeEventListener(l4, o4 ? D : A, o4); else { if (i4) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if ("width" !== l4 && "height" !== l4 && "href" !== l4 && "list" !== l4 && "form" !== l4 && "tabIndex" !== l4 && "download" !== l4 && "rowSpan" !== l4 && "colSpan" !== l4 && "role" !== l4 && l4 in n3) try { n3[l4] = null == u4 ? "" : u4; break n; } catch (n4) { } "function" == typeof u4 || (null == u4 || false === u4 && "-" !== l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, u4)); } } function A(n3) { var u4 = this.l[n3.type + false]; if (n3.t) { if (n3.t <= u4.u) return; } else n3.t = Date.now(); return u4(l.event ? l.event(n3) : n3); } function D(n3) { return this.l[n3.type + true](l.event ? l.event(n3) : n3); } function L(n3, u4, t4, i4, o4, r4, f4, e4, c4, s4) { var a4, p4, y3, d4, _3, m4, k4, w4, x3, P3, S3, $3, H3, I3, T4, A3 = u4.type; if (void 0 !== u4.constructor) return null; 128 & t4.__u && (c4 = !!(32 & t4.__u), r4 = [e4 = u4.__e = t4.__e]), (a4 = l.__b) && a4(u4); n: if ("function" == typeof A3) try { if (w4 = u4.props, x3 = (a4 = A3.contextType) && i4[a4.__c], P3 = a4 ? x3 ? x3.props.value : a4.__ : i4, t4.__c ? k4 = (p4 = u4.__c = t4.__c).__ = p4.__E : ("prototype" in A3 && A3.prototype.render ? u4.__c = p4 = new A3(w4, P3) : (u4.__c = p4 = new b(w4, P3), p4.constructor = A3, p4.render = O), x3 && x3.sub(p4), p4.props = w4, p4.state || (p4.state = {}), p4.context = P3, p4.__n = i4, y3 = p4.__d = true, p4.__h = [], p4._sb = []), null == p4.__s && (p4.__s = p4.state), null != A3.getDerivedStateFromProps && (p4.__s == p4.state && (p4.__s = v({}, p4.__s)), v(p4.__s, A3.getDerivedStateFromProps(w4, p4.__s))), d4 = p4.props, _3 = p4.state, p4.__v = u4, y3) null == A3.getDerivedStateFromProps && null != p4.componentWillMount && p4.componentWillMount(), null != p4.componentDidMount && p4.__h.push(p4.componentDidMount); else { if (null == A3.getDerivedStateFromProps && w4 !== d4 && null != p4.componentWillReceiveProps && p4.componentWillReceiveProps(w4, P3), !p4.__e && (null != p4.shouldComponentUpdate && false === p4.shouldComponentUpdate(w4, p4.__s, P3) || u4.__v === t4.__v)) { for (u4.__v !== t4.__v && (p4.props = w4, p4.state = p4.__s, p4.__d = false), u4.__e = t4.__e, u4.__k = t4.__k, u4.__k.forEach(function(n4) { n4 && (n4.__ = u4); }), S3 = 0; S3 < p4._sb.length; S3++) p4.__h.push(p4._sb[S3]); p4._sb = [], p4.__h.length && f4.push(p4); break n; } null != p4.componentWillUpdate && p4.componentWillUpdate(w4, p4.__s, P3), null != p4.componentDidUpdate && p4.__h.push(function() { p4.componentDidUpdate(d4, _3, m4); }); } if (p4.context = P3, p4.props = w4, p4.__P = n3, p4.__e = false, $3 = l.__r, H3 = 0, "prototype" in A3 && A3.prototype.render) { for (p4.state = p4.__s, p4.__d = false, $3 && $3(u4), a4 = p4.render(p4.props, p4.state, p4.context), I3 = 0; I3 < p4._sb.length; I3++) p4.__h.push(p4._sb[I3]); p4._sb = []; } else do { p4.__d = false, $3 && $3(u4), a4 = p4.render(p4.props, p4.state, p4.context), p4.state = p4.__s; } while (p4.__d && ++H3 < 25); p4.state = p4.__s, null != p4.getChildContext && (i4 = v(v({}, i4), p4.getChildContext())), y3 || null == p4.getSnapshotBeforeUpdate || (m4 = p4.getSnapshotBeforeUpdate(d4, _3)), C(n3, h(T4 = null != a4 && a4.type === g && null == a4.key ? a4.props.children : a4) ? T4 : [T4], u4, t4, i4, o4, r4, f4, e4, c4, s4), p4.base = u4.__e, u4.__u &= -161, p4.__h.length && f4.push(p4), k4 && (p4.__E = p4.__ = null); } catch (n4) { u4.__v = null, c4 || null != r4 ? (u4.__e = e4, u4.__u |= c4 ? 160 : 32, r4[r4.indexOf(e4)] = null) : (u4.__e = t4.__e, u4.__k = t4.__k), l.__e(n4, u4, t4); } else null == r4 && u4.__v === t4.__v ? (u4.__k = t4.__k, u4.__e = t4.__e) : u4.__e = j(t4.__e, u4, t4, i4, o4, r4, f4, c4, s4); (a4 = l.diffed) && a4(u4); } function M(n3, u4, t4) { u4.__d = void 0; for (var i4 = 0; i4 < t4.length; i4++) z(t4[i4], t4[++i4], t4[++i4]); l.__c && l.__c(u4, n3), n3.some(function(u5) { try { n3 = u5.__h, u5.__h = [], n3.some(function(n4) { n4.call(u5); }); } catch (n4) { l.__e(n4, u5.__v); } }); } function j(l4, u4, t4, i4, o4, r4, f4, e4, s4) { var a4, v4, y3, d4, _3, g4, b4, k4 = t4.props, w4 = u4.props, x3 = u4.type; if ("svg" === x3 && (o4 = true), null != r4) { for (a4 = 0; a4 < r4.length; a4++) if ((_3 = r4[a4]) && "setAttribute" in _3 == !!x3 && (x3 ? _3.localName === x3 : 3 === _3.nodeType)) { l4 = _3, r4[a4] = null; break; } } if (null == l4) { if (null === x3) return document.createTextNode(w4); l4 = o4 ? document.createElementNS("http://www.w3.org/2000/svg", x3) : document.createElement(x3, w4.is && w4), r4 = null, e4 = false; } if (null === x3) k4 === w4 || e4 && l4.data === w4 || (l4.data = w4); else { if (r4 = r4 && n.call(l4.childNodes), k4 = t4.props || c, !e4 && null != r4) for (k4 = {}, a4 = 0; a4 < l4.attributes.length; a4++) k4[(_3 = l4.attributes[a4]).name] = _3.value; for (a4 in k4) _3 = k4[a4], "children" == a4 || ("dangerouslySetInnerHTML" == a4 ? y3 = _3 : "key" === a4 || a4 in w4 || T(l4, a4, null, _3, o4)); for (a4 in w4) _3 = w4[a4], "children" == a4 ? d4 = _3 : "dangerouslySetInnerHTML" == a4 ? v4 = _3 : "value" == a4 ? g4 = _3 : "checked" == a4 ? b4 = _3 : "key" === a4 || e4 && "function" != typeof _3 || k4[a4] === _3 || T(l4, a4, _3, k4[a4], o4); if (v4) e4 || y3 && (v4.__html === y3.__html || v4.__html === l4.innerHTML) || (l4.innerHTML = v4.__html), u4.__k = []; else if (y3 && (l4.innerHTML = ""), C(l4, h(d4) ? d4 : [d4], u4, t4, i4, o4 && "foreignObject" !== x3, r4, f4, r4 ? r4[0] : t4.__k && m(t4, 0), e4, s4), null != r4) for (a4 = r4.length; a4--; ) null != r4[a4] && p(r4[a4]); e4 || (a4 = "value", void 0 !== g4 && (g4 !== l4[a4] || "progress" === x3 && !g4 || "option" === x3 && g4 !== k4[a4]) && T(l4, a4, g4, k4[a4], false), a4 = "checked", void 0 !== b4 && b4 !== l4[a4] && T(l4, a4, b4, k4[a4], false)); } return l4; } function z(n3, u4, t4) { try { "function" == typeof n3 ? n3(u4) : n3.current = u4; } catch (n4) { l.__e(n4, t4); } } function N(n3, u4, t4) { var i4, o4; if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current !== n3.__e || z(i4, null, u4)), null != (i4 = n3.__c)) { if (i4.componentWillUnmount) try { i4.componentWillUnmount(); } catch (n4) { l.__e(n4, u4); } i4.base = i4.__P = null, n3.__c = void 0; } if (i4 = n3.__k) for (o4 = 0; o4 < i4.length; o4++) i4[o4] && N(i4[o4], u4, t4 || "function" != typeof n3.type); t4 || null == n3.__e || p(n3.__e), n3.__ = n3.__e = n3.__d = void 0; } function O(n3, l4, u4) { return this.constructor(n3, u4); } function q(u4, t4, i4) { var o4, r4, f4, e4; l.__ && l.__(u4, t4), r4 = (o4 = "function" == typeof i4) ? null : i4 && i4.__k || t4.__k, f4 = [], e4 = [], L(t4, u4 = (!o4 && i4 || t4).__k = y(g, null, [u4]), r4 || c, c, void 0 !== t4.ownerSVGElement, !o4 && i4 ? [i4] : r4 ? null : t4.firstChild ? n.call(t4.childNodes) : null, f4, !o4 && i4 ? i4 : r4 ? r4.__e : t4.firstChild, o4, e4), M(f4, u4, e4); } function E(l4, u4, t4) { var i4, o4, r4, f4, e4 = v({}, l4.props); for (r4 in l4.type && l4.type.defaultProps && (f4 = l4.type.defaultProps), u4) "key" == r4 ? i4 = u4[r4] : "ref" == r4 ? o4 = u4[r4] : e4[r4] = void 0 === u4[r4] && void 0 !== f4 ? f4[r4] : u4[r4]; return arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), d(l4.type, e4, i4 || l4.key, o4 || l4.ref, null); } n = s.slice, l = { __e: function(n3, l4, u4, t4) { for (var i4, o4, r4; l4 = l4.__; ) if ((i4 = l4.__c) && !i4.__) try { if ((o4 = i4.constructor) && null != o4.getDerivedStateFromError && (i4.setState(o4.getDerivedStateFromError(n3)), r4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, t4 || {}), r4 = i4.__d), r4) return i4.__E = i4; } catch (l5) { n3 = l5; } throw n3; } }, u = 0, t = function(n3) { return null != n3 && null == n3.constructor; }, b.prototype.setState = function(n3, l4) { var u4; u4 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v({}, this.state), "function" == typeof n3 && (n3 = n3(v({}, u4), this.props)), n3 && v(u4, n3), null != n3 && this.__v && (l4 && this._sb.push(l4), w(this)); }, b.prototype.forceUpdate = function(n3) { this.__v && (this.__e = true, n3 && this.__h.push(n3), w(this)); }, b.prototype.render = g, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n3, l4) { return n3.__v.__b - l4.__v.__b; }, x.__r = 0, e = 0; // tests/_npm/node_modules/@uppy/utils/lib/isDOMElement.js function isDOMElement(obj) { if (typeof obj !== "object" || obj === null) return false; if (!("nodeType" in obj)) return false; return obj.nodeType === Node.ELEMENT_NODE; } // tests/_npm/node_modules/@uppy/utils/lib/findDOMElement.js function findDOMElement(element, context) { if (context === void 0) { context = document; } if (typeof element === "string") { return context.querySelector(element); } if (isDOMElement(element)) { return element; } return null; } // tests/_npm/node_modules/@uppy/utils/lib/getTextDirection.js function getTextDirection(element) { var _element; while (element && !element.dir) { element = element.parentNode; } return (_element = element) == null ? void 0 : _element.dir; } var getTextDirection_default = getTextDirection; // tests/_npm/node_modules/@uppy/core/lib/BasePlugin.js var BasePlugin = class { constructor(uppy, opts) { if (opts === void 0) { opts = {}; } this.uppy = uppy; this.opts = opts; } getPluginState() { const { plugins } = this.uppy.getState(); return plugins[this.id] || {}; } setPluginState(update) { const { plugins } = this.uppy.getState(); this.uppy.setState({ plugins: { ...plugins, [this.id]: {