diff --git a/README.md b/README.md index 0eb69f1..ac8545b 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ - [x] [Grommet-Icons](https://github.com/grommet/grommet-icons) - [x] [Heroicons](https://github.com/tailwindlabs/heroicons) - [x] [Iconly Glass](https://piqodesign.gumroad.com/l/iconlyglass) +- [x] [Iconsax | Vuesax](https://iconsax.io/) - [x] [IcoMoon Free](https://github.com/Keyamoon/IcoMoon-Free) - [x] [Ionicons](https://ionic.io/ionicons) - [x] [Material Design icons](http://google.github.io/material-design-icons/) diff --git a/dist/app.js b/dist/app.js index 2aa216c..b191878 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,25626 +1,13 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./electron/main.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./electron/getSystemColorPalette.ts": -/*!*******************************************!*\ - !*** ./electron/getSystemColorPalette.ts ***! - \*******************************************/ -/*! exports provided: getSystemColorPalette */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSystemColorPalette", function() { return getSystemColorPalette; }); -/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ "electron"); -/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! os */ "os"); -/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_1__); - - -var windowsColors = { - desktop: 'desktop', - appWorkspace: 'app-workspace', - windowBackground: 'window', - windowText: 'window-text', - menu: 'menu', - focusIndicator: 'active-caption', - textBackground: 'info-background', - text: 'info-text', - disabledText: 'disabled-text' -}; -var MacOSColors = { - desktop: 'under-page-background', - appWorkspace: 'control-background', - windowBackground: 'window-background', - windowText: 'window-frame-text', - menu: 'control', - focusIndicator: 'keyboard-focus-indicator', - textBackground: 'text-background', - text: 'text', - disabledText: 'tertiary-label' -}; -function getSystemColorPalette() { - var plataform = os__WEBPACK_IMPORTED_MODULE_1___default.a.platform(); - var palette = {}; - - if (plataform === 'win32') { - Object.keys(windowsColors).map(function (item) { - var color = electron__WEBPACK_IMPORTED_MODULE_0__["systemPreferences"].getColor(windowsColors[item]); // palette[item] = color - - setDeepVal(palette, item, color); - }); - } else if (plataform === 'darwin') { - Object.keys(MacOSColors).forEach(function (item) { - var color = electron__WEBPACK_IMPORTED_MODULE_0__["systemPreferences"].getColor(MacOSColors[item]); - setDeepVal(palette, item, color); - }); - } // const color = systemPreferences.getAccentColor() - // const red = `#${color.substr(0, 2)}0000` - // const green = `#00${color.substr(2, 2)}00` - // const blue = `#0000${color.substr(4, 2)}` - - - console.log(palette); - return { - palette: palette, - paletteChanged: function paletteChanged(callback) { - electron__WEBPACK_IMPORTED_MODULE_0__["nativeTheme"].on('updated', callback); - } - }; -} - -function setDeepVal(obj, path, val) { - var props = path.split('.'); - var i, n; - - for (i = 0, n = props.length - 1; i < n; ++i) { - obj = obj[props[i]] = obj[props[i]] || {}; - } - - obj[props[i]] = val; - return obj; -} - -var Windows = ['3d-dark-shadow', '3d-face', '3d-highlight', '3d-light', '3d-shadow', 'active-border', 'active-caption', 'active-caption-gradient', 'app-workspace', 'button-text', 'caption-text', 'desktop', 'disabled-text', 'highlight', 'highlight-text', 'hotlight', 'inactive-border', 'inactive-caption', 'inactive-caption-gradient', 'inactive-caption-text', 'info-background', 'info-text', 'menu', 'menu-highlight', 'menubar', 'menu-text', 'scrollbar', 'window', 'window-frame', 'window-text']; // 29 options - -var MacOS = ['alternate-selected-control-text', 'control-background', 'control', 'control-text', 'disabled-control-text', 'find-highlight', 'grid', 'header-text', 'highlight', 'keyboard-focus-indicator', 'label', 'link', 'placeholder-text', 'quaternary-label', 'scrubber-textured-background', 'secondary-label', 'selected-content-background', 'selected-control', 'selected-control-text', 'selected-menu-item-text', 'selected-text-background', 'selected-text', 'separator', 'shadow', 'tertiary-label', 'text-background', 'text', 'under-page-background', 'unemphasized-selected-content-background', 'unemphasized-selected-text-background', 'unemphasized-selected-text', 'window-background', 'window-frame-tex']; // 32 options - -/***/ }), - -/***/ "./electron/main.ts": -/*!**************************!*\ - !*** ./electron/main.ts ***! - \**************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ "electron"); -/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var electron_updater__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! electron-updater */ "./node_modules/electron-updater/out/main.js"); -/* harmony import */ var electron_updater__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(electron_updater__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var electron_context_menu__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! electron-context-menu */ "./node_modules/electron-context-menu/index.js"); -/* harmony import */ var electron_context_menu__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(electron_context_menu__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var electron_devtools_installer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! electron-devtools-installer */ "./node_modules/electron-devtools-installer/dist/index.js"); -/* harmony import */ var electron_devtools_installer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(electron_devtools_installer__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! path */ "path"); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! url */ "url"); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _src_utils_window__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../src/utils/window */ "./src/utils/window.ts"); -/* harmony import */ var _getSystemColorPalette__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./getSystemColorPalette */ "./electron/getSystemColorPalette.ts"); - - - - - - - - -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('checking-for-update', function () { - sendStatusToWindow('Procurando pr atualizações...'); -}); -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('update-available', function (info) { - sendStatusToWindow('Atualização encontrada.'); -}); -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('update-not-available', function (info) { - sendStatusToWindow('Nenhuma atualização encontrada.'); -}); -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('error', function (err) { - sendStatusToWindow('Erro na hora de fazer a atualização. ' + err); -}); -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('download-progress', function (progressObj) { - var logMessage = 'Velocidade do download: ' + progressObj.bytesPerSecond; - logMessage = logMessage + ' - Downloaded ' + progressObj.percent + '%'; - logMessage = logMessage + ' (' + progressObj.transferred + '/' + progressObj.total + ')'; - sendStatusToWindow(logMessage); -}); -electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].on('update-downloaded', function (info) { - sendStatusToWindow('Atualização baixada'); -}); -var mainWindow; // | null - -var webContents; - -function sendStatusToWindow(text) { - webContents.send('message', text); -} - -Object(_getSystemColorPalette__WEBPACK_IMPORTED_MODULE_7__["getSystemColorPalette"])(); - -function createWindow() { - var partition = 'persist:solrachix'; - var icon = electron__WEBPACK_IMPORTED_MODULE_0__["nativeImage"].createFromPath("".concat(electron__WEBPACK_IMPORTED_MODULE_0__["app"].getAppPath(), "/dist/renderer/icon.png")); - - if (electron__WEBPACK_IMPORTED_MODULE_0__["app"].dock) { - electron__WEBPACK_IMPORTED_MODULE_0__["app"].dock.setIcon(icon); - } - - var splashScreen = new electron__WEBPACK_IMPORTED_MODULE_0__["BrowserWindow"]({ - icon: icon, - width: 400, - height: 400, - backgroundColor: '#1C2028', - transparent: true, - frame: false, - alwaysOnTop: true - }); - splashScreen.loadURL(chooseUrl("".concat(electron__WEBPACK_IMPORTED_MODULE_0__["app"].getAppPath(), "/build/splashScreen.html"), 'splashScreen.html')); - mainWindow = Object(_src_utils_window__WEBPACK_IMPORTED_MODULE_6__["default"])({ - id: 0, - title: 'Icons Manager', - icon: icon, - themeSource: 'dark', - show: false, - minWidth: 760, - minHeight: 500, - partition: partition - }); - mainWindow.loadURL(chooseUrl('http://localhost:4000', 'renderer/index.html')); - mainWindow.once('ready-to-show', function () { - splashScreen.destroy(); - mainWindow.show(); - mainWindow.focus(); - electron_devtools_installer__WEBPACK_IMPORTED_MODULE_3___default()(electron_devtools_installer__WEBPACK_IMPORTED_MODULE_3__["REACT_DEVELOPER_TOOLS"]).then(function (name) { - return console.log("Added Extension: ".concat(name)); - })["catch"](function (err) { - return console.log('An error occurred: ', err); - }); - mainWindow.webContents.on('before-input-event', function (event, input) { - mainWindow.webContents.setIgnoreMenuShortcuts(!input.control && !input.meta); - }); - }); - webContents = mainWindow.webContents; -} - -var chooseUrl = function chooseUrl(development, production) { - if (true) { - return development; - } else {} -}; - -var recreateWindow = function recreateWindow() { - // On macOS it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (electron__WEBPACK_IMPORTED_MODULE_0__["BrowserWindow"].getAllWindows().length === 0) { - createWindow(); - } -}; - -var toggleDevTools = function toggleDevTools() { - return webContents.toggleDevTools(); -}; - -var toggleReload = function toggleReload() { - return webContents.reload(); -}; - -var createShortcuts = function createShortcuts() { - electron__WEBPACK_IMPORTED_MODULE_0__["globalShortcut"].register('CmdOrCtrl+J', toggleDevTools); - electron__WEBPACK_IMPORTED_MODULE_0__["globalShortcut"].register('Cmd+ROrCtrl+R', toggleReload); -}; - -electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('web-contents-created', function (e, contents) { - if (contents.getType() === 'webview') { - // open link with external browser in webview - contents.on('new-window', function (e, url) { - e.preventDefault(); - electron__WEBPACK_IMPORTED_MODULE_0__["shell"].openExternal(url); - }); - } - - electron_context_menu__WEBPACK_IMPORTED_MODULE_2___default()({ - showSaveImage: true, - showCopyImageAddress: true, - showServices: true, - showSearchWithGoogle: false, - shouldShowMenu: function shouldShowMenu(event, params) { - return !params.isEditable; - }, - // Não mostra o menu se o elemento for editável - labels: { - copy: 'Copiar', - paste: 'Colar', - cut: 'Recortar', - saveImage: 'Guardar imagem como…', - saveImageAs: 'Guardar imagem como…', - copyImage: 'Copiar imagem', - copyImageAddress: 'Copiar endereço da imagem', - lookUpSelection: 'Consultar “{selection}”', - copyLink: 'Copiar Link', - inspect: 'Inspecionar' - }, - prepend: function prepend(defaultActions, params, browserWindow) { - return [{ - label: 'Pesquisar no google, por “{selection}”', - // Only show it when right-clicking text - visible: params.selectionText.trim().length > 0, - click: function click() { - electron__WEBPACK_IMPORTED_MODULE_0__["shell"].openExternal("https://google.com/search?q=".concat(encodeURIComponent(params.selectionText))); - } - }]; - }, - // menu: (defaultActions, params, browserWindow, dictionarySuggestions) => { - // }, - window: contents - }); -}); -var timeout = 0; - -if (process.platform === 'linux') { - timeout = 1000; - electron__WEBPACK_IMPORTED_MODULE_0__["app"].commandLine.appendSwitch('enable-transparent-visuals'); - electron__WEBPACK_IMPORTED_MODULE_0__["app"].commandLine.appendSwitch('disable-gpu'); -} - -electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('ready', function () { - electron_updater__WEBPACK_IMPORTED_MODULE_1__["autoUpdater"].checkForUpdatesAndNotify(); - setTimeout(function () { - createWindow(); - createShortcuts(); - }, timeout); -}); -electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('activate', recreateWindow); -electron__WEBPACK_IMPORTED_MODULE_0__["app"].allowRendererProcessReuse = true; -electron__WEBPACK_IMPORTED_MODULE_0__["app"].commandLine.appendSwitch('--enable-experimental-web-platform-features'); - -/***/ }), - -/***/ "./node_modules/ajv/lib/ajv.js": -/*!*************************************!*\ - !*** ./node_modules/ajv/lib/ajv.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var compileSchema = __webpack_require__(/*! ./compile */ "./node_modules/ajv/lib/compile/index.js") - , resolve = __webpack_require__(/*! ./compile/resolve */ "./node_modules/ajv/lib/compile/resolve.js") - , Cache = __webpack_require__(/*! ./cache */ "./node_modules/ajv/lib/cache.js") - , SchemaObject = __webpack_require__(/*! ./compile/schema_obj */ "./node_modules/ajv/lib/compile/schema_obj.js") - , stableStringify = __webpack_require__(/*! fast-json-stable-stringify */ "./node_modules/fast-json-stable-stringify/index.js") - , formats = __webpack_require__(/*! ./compile/formats */ "./node_modules/ajv/lib/compile/formats.js") - , rules = __webpack_require__(/*! ./compile/rules */ "./node_modules/ajv/lib/compile/rules.js") - , $dataMetaSchema = __webpack_require__(/*! ./data */ "./node_modules/ajv/lib/data.js") - , util = __webpack_require__(/*! ./compile/util */ "./node_modules/ajv/lib/compile/util.js"); - -module.exports = Ajv; - -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; - -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; - -Ajv.prototype.compileAsync = __webpack_require__(/*! ./compile/async */ "./node_modules/ajv/lib/compile/async.js"); -var customKeyword = __webpack_require__(/*! ./keyword */ "./node_modules/ajv/lib/keyword.js"); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = __webpack_require__(/*! ./compile/error_classes */ "./node_modules/ajv/lib/compile/error_classes.js"); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; - -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; - -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} - - - -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} - - -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} - - -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/compile/index.js": -/*!***********************************************!*\ - !*** ./node_modules/ajv/lib/compile/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var resolve = __webpack_require__(/*! ./resolve */ "./node_modules/ajv/lib/compile/resolve.js") - , util = __webpack_require__(/*! ./util */ "./node_modules/ajv/lib/compile/util.js") - , errorClasses = __webpack_require__(/*! ./error_classes */ "./node_modules/ajv/lib/compile/error_classes.js") - , stableStringify = __webpack_require__(/*! fast-json-stable-stringify */ "./node_modules/fast-json-stable-stringify/index.js"); - -var validateGenerator = __webpack_require__(/*! ../dotjs/validate */ "./node_modules/ajv/lib/dotjs/validate.js"); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = __webpack_require__(/*! fast-deep-equal */ "./node_modules/fast-deep-equal/index.js"); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; - - -/***/ }), - -/***/ "./node_modules/ajv/lib/compile/util.js": -/*!**********************************************!*\ - !*** ./node_modules/ajv/lib/compile/util.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: __webpack_require__(/*! fast-deep-equal */ "./node_modules/fast-deep-equal/index.js"), - ucs2length: __webpack_require__(/*! ./ucs2length */ "./node_modules/ajv/lib/compile/ucs2length.js"), - varOccurences: varOccurences, - varReplace: varReplace, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/_limitItems.js": -/*!***************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/_limitItems.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/_limitLength.js": -/*!****************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/_limitLength.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/_limitProperties.js": -/*!********************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/_limitProperties.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/allOf.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/allOf.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/anyOf.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/anyOf.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/comment.js": -/*!***********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/comment.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/const.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/const.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/contains.js": -/*!************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/contains.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/custom.js": -/*!**********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/custom.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/enum.js": -/*!********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/enum.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/format.js": -/*!**********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/format.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/if.js": -/*!******************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/if.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/index.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/index.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': __webpack_require__(/*! ./ref */ "./node_modules/ajv/lib/dotjs/ref.js"), - allOf: __webpack_require__(/*! ./allOf */ "./node_modules/ajv/lib/dotjs/allOf.js"), - anyOf: __webpack_require__(/*! ./anyOf */ "./node_modules/ajv/lib/dotjs/anyOf.js"), - '$comment': __webpack_require__(/*! ./comment */ "./node_modules/ajv/lib/dotjs/comment.js"), - const: __webpack_require__(/*! ./const */ "./node_modules/ajv/lib/dotjs/const.js"), - contains: __webpack_require__(/*! ./contains */ "./node_modules/ajv/lib/dotjs/contains.js"), - dependencies: __webpack_require__(/*! ./dependencies */ "./node_modules/ajv/lib/dotjs/dependencies.js"), - 'enum': __webpack_require__(/*! ./enum */ "./node_modules/ajv/lib/dotjs/enum.js"), - format: __webpack_require__(/*! ./format */ "./node_modules/ajv/lib/dotjs/format.js"), - 'if': __webpack_require__(/*! ./if */ "./node_modules/ajv/lib/dotjs/if.js"), - items: __webpack_require__(/*! ./items */ "./node_modules/ajv/lib/dotjs/items.js"), - maximum: __webpack_require__(/*! ./_limit */ "./node_modules/ajv/lib/dotjs/_limit.js"), - minimum: __webpack_require__(/*! ./_limit */ "./node_modules/ajv/lib/dotjs/_limit.js"), - maxItems: __webpack_require__(/*! ./_limitItems */ "./node_modules/ajv/lib/dotjs/_limitItems.js"), - minItems: __webpack_require__(/*! ./_limitItems */ "./node_modules/ajv/lib/dotjs/_limitItems.js"), - maxLength: __webpack_require__(/*! ./_limitLength */ "./node_modules/ajv/lib/dotjs/_limitLength.js"), - minLength: __webpack_require__(/*! ./_limitLength */ "./node_modules/ajv/lib/dotjs/_limitLength.js"), - maxProperties: __webpack_require__(/*! ./_limitProperties */ "./node_modules/ajv/lib/dotjs/_limitProperties.js"), - minProperties: __webpack_require__(/*! ./_limitProperties */ "./node_modules/ajv/lib/dotjs/_limitProperties.js"), - multipleOf: __webpack_require__(/*! ./multipleOf */ "./node_modules/ajv/lib/dotjs/multipleOf.js"), - not: __webpack_require__(/*! ./not */ "./node_modules/ajv/lib/dotjs/not.js"), - oneOf: __webpack_require__(/*! ./oneOf */ "./node_modules/ajv/lib/dotjs/oneOf.js"), - pattern: __webpack_require__(/*! ./pattern */ "./node_modules/ajv/lib/dotjs/pattern.js"), - properties: __webpack_require__(/*! ./properties */ "./node_modules/ajv/lib/dotjs/properties.js"), - propertyNames: __webpack_require__(/*! ./propertyNames */ "./node_modules/ajv/lib/dotjs/propertyNames.js"), - required: __webpack_require__(/*! ./required */ "./node_modules/ajv/lib/dotjs/required.js"), - uniqueItems: __webpack_require__(/*! ./uniqueItems */ "./node_modules/ajv/lib/dotjs/uniqueItems.js"), - validate: __webpack_require__(/*! ./validate */ "./node_modules/ajv/lib/dotjs/validate.js") -}; - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/items.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/items.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/multipleOf.js": -/*!**************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/multipleOf.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/not.js": -/*!*******************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/not.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/oneOf.js": -/*!*********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/oneOf.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/pattern.js": -/*!***********************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/pattern.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/properties.js": -/*!**************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/properties.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties).filter(notProto), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - - function notProto(p) { - return p !== '__proto__'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/propertyNames.js": -/*!*****************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/propertyNames.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/uniqueItems.js": -/*!***************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/uniqueItems.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/dotjs/validate.js": -/*!************************************************!*\ - !*** ./node_modules/ajv/lib/dotjs/validate.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; - } - out += ' if (' + ($coerced) + ' !== undefined) ; '; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == 'string') { - out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' else { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } if (' + ($coerced) + ' !== undefined) { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} - - -/***/ }), - -/***/ "./node_modules/ajv/lib/keyword.js": -/*!*****************************************!*\ - !*** ./node_modules/ajv/lib/keyword.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = __webpack_require__(/*! ./dotjs/custom */ "./node_modules/ajv/lib/dotjs/custom.js"); -var definitionSchema = __webpack_require__(/*! ./definition_schema */ "./node_modules/ajv/lib/definition_schema.js"); - -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; - - -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); - - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); - - if (definition) { - this.validateKeyword(definition, true); - - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; - - -/***/ }), - -/***/ "./node_modules/ansi-styles/index.js": -/*!*******************************************!*\ - !*** ./node_modules/ansi-styles/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./node_modules/astral-regex/index.js": -/*!********************************************!*\ - !*** ./node_modules/astral-regex/index.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; - -const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); - -module.exports = astralRegex; - - -/***/ }), - -/***/ "./node_modules/balanced-match/index.js": -/*!**********************************************!*\ - !*** ./node_modules/balanced-match/index.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} - - -/***/ }), - -/***/ "./node_modules/brace-expansion/index.js": -/*!***********************************************!*\ - !*** ./node_modules/brace-expansion/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var concatMap = __webpack_require__(/*! concat-map */ "./node_modules/concat-map/index.js"); -var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js"); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - - - -/***/ }), - -/***/ "./node_modules/cli-truncate/index.js": -/*!********************************************!*\ - !*** ./node_modules/cli-truncate/index.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const sliceAnsi = __webpack_require__(/*! slice-ansi */ "./node_modules/slice-ansi/index.js"); -const stringWidth = __webpack_require__(/*! string-width */ "./node_modules/string-width/index.js"); - -function getIndexOfNearestSpace(string, index, shouldSearchRight) { - if (string.charAt(index) === ' ') { - return index; - } - - for (let i = 1; i <= 3; i++) { - if (shouldSearchRight) { - if (string.charAt(index + i) === ' ') { - return index + i; - } - } else if (string.charAt(index - i) === ' ') { - return index - i; - } - } - - return index; -} - -module.exports = (text, columns, options) => { - options = { - position: 'end', - preferTruncationOnSpace: false, - ...options - }; - - const {position, space, preferTruncationOnSpace} = options; - let ellipsis = '…'; - let ellipsisWidth = 1; - - if (typeof text !== 'string') { - throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`); - } - - if (typeof columns !== 'number') { - throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`); - } - - if (columns < 1) { - return ''; - } - - if (columns === 1) { - return ellipsis; - } - - const length = stringWidth(text); - - if (length <= columns) { - return text; - } - - if (position === 'start') { - if (preferTruncationOnSpace) { - const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true); - return ellipsis + sliceAnsi(text, nearestSpace, length).trim(); - } - - if (space === true) { - ellipsis += ' '; - ellipsisWidth = 2; - } - - return ellipsis + sliceAnsi(text, length - columns + ellipsisWidth, length); - } - - if (position === 'middle') { - if (space === true) { - ellipsis = ' ' + ellipsis + ' '; - ellipsisWidth = 3; - } - - const half = Math.floor(columns / 2); - - if (preferTruncationOnSpace) { - const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half); - const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true); - return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + ellipsis + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim(); - } - - return ( - sliceAnsi(text, 0, half) + - ellipsis + - sliceAnsi(text, length - (columns - half) + ellipsisWidth, length) - ); - } - - if (position === 'end') { - if (preferTruncationOnSpace) { - const nearestSpace = getIndexOfNearestSpace(text, columns - 1); - return sliceAnsi(text, 0, nearestSpace) + ellipsis; - } - - if (space === true) { - ellipsis = ' ' + ellipsis; - ellipsisWidth = 2; - } - - return sliceAnsi(text, 0, columns - ellipsisWidth) + ellipsis; - } - - throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`); -}; - - -/***/ }), - -/***/ "./node_modules/color-convert/conversions.js": -/*!***************************************************!*\ - !*** ./node_modules/color-convert/conversions.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; - - -/***/ }), - -/***/ "./node_modules/color-convert/index.js": -/*!*********************************************!*\ - !*** ./node_modules/color-convert/index.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); -const route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; - - -/***/ }), - -/***/ "./node_modules/color-convert/route.js": -/*!*********************************************!*\ - !*** ./node_modules/color-convert/route.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - - - -/***/ }), - -/***/ "./node_modules/color-name/index.js": -/*!******************************************!*\ - !*** ./node_modules/color-name/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; - - -/***/ }), - -/***/ "./node_modules/concat-map/index.js": -/*!******************************************!*\ - !*** ./node_modules/concat-map/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - - -/***/ }), - -/***/ "./node_modules/conf/index.js": -/*!************************************!*\ - !*** ./node_modules/conf/index.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* eslint-disable node/no-deprecated-api */ - -const fs = __webpack_require__(/*! fs */ "fs"); -const path = __webpack_require__(/*! path */ "path"); -const crypto = __webpack_require__(/*! crypto */ "crypto"); -const assert = __webpack_require__(/*! assert */ "assert"); -const EventEmitter = __webpack_require__(/*! events */ "events"); -const dotProp = __webpack_require__(/*! dot-prop */ "./node_modules/dot-prop/index.js"); -const makeDir = __webpack_require__(/*! make-dir */ "./node_modules/make-dir/index.js"); -const pkgUp = __webpack_require__(/*! pkg-up */ "./node_modules/pkg-up/index.js"); -const envPaths = __webpack_require__(/*! env-paths */ "./node_modules/env-paths/index.js"); -const writeFileAtomic = __webpack_require__(/*! write-file-atomic */ "./node_modules/write-file-atomic/index.js"); -const Ajv = __webpack_require__(/*! ajv */ "./node_modules/ajv/lib/ajv.js"); -const debounceFn = __webpack_require__(/*! debounce-fn */ "./node_modules/debounce-fn/index.js"); -const semver = __webpack_require__(/*! semver */ "./node_modules/semver/semver.js"); -const onetime = __webpack_require__(/*! onetime */ "./node_modules/onetime/index.js"); - -const plainObject = () => Object.create(null); -const encryptionAlgorithm = 'aes-256-cbc'; - -// Prevent caching of this module so module.parent is always accurate -delete __webpack_require__.c[__filename]; -const parentDir = path.dirname((module.parent && module.parent.filename) || '.'); - -const checkValueType = (key, value) => { - const nonJsonTypes = [ - 'undefined', - 'symbol', - 'function' - ]; - - const type = typeof value; - - if (nonJsonTypes.includes(type)) { - throw new TypeError(`Setting a value of type \`${type}\` for key \`${key}\` is not allowed as it's not supported by JSON`); - } -}; - -const INTERNAL_KEY = '__internal__'; -const MIGRATION_KEY = `${INTERNAL_KEY}.migrations.version`; - -class Conf { - constructor(options) { - options = { - configName: 'config', - fileExtension: 'json', - projectSuffix: 'nodejs', - clearInvalidConfig: true, - serialize: value => JSON.stringify(value, null, '\t'), - deserialize: JSON.parse, - accessPropertiesByDotNotation: true, - ...options - }; - - const getPackageData = onetime(() => { - const packagePath = pkgUp.sync({cwd: parentDir}); - // Can't use `require` because of Webpack being annoying: - // https://github.com/webpack/webpack/issues/196 - const packageData = packagePath && JSON.parse(fs.readFileSync(packagePath, 'utf8')); - - return packageData || {}; - }); - - if (!options.cwd) { - if (!options.projectName) { - options.projectName = getPackageData().name; - } - - if (!options.projectName) { - throw new Error('Project name could not be inferred. Please specify the `projectName` option.'); - } - - options.cwd = envPaths(options.projectName, {suffix: options.projectSuffix}).config; - } - - this._options = options; - this._defaultValues = {}; - - if (options.schema) { - if (typeof options.schema !== 'object') { - throw new TypeError('The `schema` option must be an object.'); - } - - const ajv = new Ajv({ - allErrors: true, - format: 'full', - useDefaults: true, - errorDataPath: 'property' - }); - const schema = { - type: 'object', - properties: options.schema - }; - - this._validator = ajv.compile(schema); - - for (const [key, value] of Object.entries(options.schema)) { - if (value && value.default) { - this._defaultValues[key] = value.default; - } - } - } - - if (options.defaults) { - this._defaultValues = { - ...this._defaultValues, - ...options.defaults - }; - } - - this.events = new EventEmitter(); - this.encryptionKey = options.encryptionKey; - this.serialize = options.serialize; - this.deserialize = options.deserialize; - - const fileExtension = options.fileExtension ? `.${options.fileExtension}` : ''; - this.path = path.resolve(options.cwd, `${options.configName}${fileExtension}`); - - const fileStore = this.store; - const store = Object.assign(plainObject(), options.defaults, fileStore); - this._validate(store); - try { - assert.deepEqual(fileStore, store); - } catch (_) { - this.store = store; - } - - if (options.watch) { - this._watch(); - } - - if (options.migrations) { - if (!options.projectVersion) { - options.projectVersion = getPackageData().version; - } - - if (!options.projectVersion) { - throw new Error('Project version could not be inferred. Please specify the `projectVersion` option.'); - } - - this._migrate(options.migrations, options.projectVersion); - } - } - - _validate(data) { - if (!this._validator) { - return; - } - - const valid = this._validator(data); - if (!valid) { - const errors = this._validator.errors.reduce((error, {dataPath, message}) => - error + ` \`${dataPath.slice(1)}\` ${message};`, ''); - throw new Error('Config schema violation:' + errors.slice(0, -1)); - } - } - - _ensureDirectory() { - // TODO: Use `fs.mkdirSync` `recursive` option when targeting Node.js 12. - // Ensure the directory exists as it could have been deleted in the meantime. - makeDir.sync(path.dirname(this.path)); - } - - _write(value) { - let data = this.serialize(value); - - if (this.encryptionKey) { - const initializationVector = crypto.randomBytes(16); - const password = crypto.pbkdf2Sync(this.encryptionKey, initializationVector.toString(), 10000, 32, 'sha512'); - const cipher = crypto.createCipheriv(encryptionAlgorithm, password, initializationVector); - data = Buffer.concat([initializationVector, Buffer.from(':'), cipher.update(Buffer.from(data)), cipher.final()]); - } - - // Temporary workaround for Conf being packaged in a Ubuntu Snap app. - // See https://github.com/sindresorhus/conf/pull/82 - if (process.env.SNAP) { - fs.writeFileSync(this.path, data); - } else { - try { - writeFileAtomic.sync(this.path, data); - } catch (error) { - // Fix for https://github.com/sindresorhus/electron-store/issues/106 - // Sometimes on Windows, we will get an EXDEV error when atomic writing - // (even though to the same directory), so we fall back to non atomic write - if (error.code === 'EXDEV') { - fs.writeFileSync(this.path, data); - return; - } - - throw error; - } - } - } - - _watch() { - this._ensureDirectory(); - - if (!fs.existsSync(this.path)) { - this._write({}); - } - - fs.watch(this.path, {persistent: false}, debounceFn(() => { - // On Linux and Windows, writing to the config file emits a `rename` event, so we skip checking the event type. - this.events.emit('change'); - }, {wait: 100})); - } - - _migrate(migrations, versionToMigrate) { - let previousMigratedVersion = this._get(MIGRATION_KEY, '0.0.0'); - - const newerVersions = Object.keys(migrations) - .filter(candidateVersion => this._shouldPerformMigration(candidateVersion, previousMigratedVersion, versionToMigrate)); - - let storeBackup = {...this.store}; - - for (const version of newerVersions) { - try { - const migration = migrations[version]; - migration(this); - - this._set(MIGRATION_KEY, version); - - previousMigratedVersion = version; - storeBackup = {...this.store}; - } catch (error) { - this.store = storeBackup; - - throw new Error( - `Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${error}` - ); - } - } - - if (this._isVersionInRangeFormat(previousMigratedVersion) || !semver.eq(previousMigratedVersion, versionToMigrate)) { - this._set(MIGRATION_KEY, versionToMigrate); - } - } - - _containsReservedKey(key) { - if (typeof key === 'object') { - const firstKey = Object.keys(key)[0]; - - if (firstKey === INTERNAL_KEY) { - return true; - } - } - - if (typeof key !== 'string') { - return false; - } - - if (this._options.accessPropertiesByDotNotation) { - if (key.startsWith(`${INTERNAL_KEY}.`)) { - return true; - } - - return false; - } - - return false; - } - - _isVersionInRangeFormat(version) { - return semver.clean(version) === null; - } - - _shouldPerformMigration(candidateVersion, previousMigratedVersion, versionToMigrate) { - if (this._isVersionInRangeFormat(candidateVersion)) { - if (previousMigratedVersion !== '0.0.0' && semver.satisfies(previousMigratedVersion, candidateVersion)) { - return false; - } - - return semver.satisfies(versionToMigrate, candidateVersion); - } - - if (semver.lte(candidateVersion, previousMigratedVersion)) { - return false; - } - - if (semver.gt(candidateVersion, versionToMigrate)) { - return false; - } - - return true; - } - - _get(key, defaultValue) { - return dotProp.get(this.store, key, defaultValue); - } - - _set(key, value) { - const {store} = this; - dotProp.set(store, key, value); - - this.store = store; - } - - get(key, defaultValue) { - if (this._options.accessPropertiesByDotNotation) { - return dotProp.get(this.store, key, defaultValue); - } - - return key in this.store ? this.store[key] : defaultValue; - } - - set(key, value) { - if (typeof key !== 'string' && typeof key !== 'object') { - throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof key}`); - } - - if (typeof key !== 'object' && value === undefined) { - throw new TypeError('Use `delete()` to clear values'); - } - - if (this._containsReservedKey(key)) { - throw new TypeError(`Please don't use the ${INTERNAL_KEY} key, as it's used to manage this module internal operations.`); - } - - const {store} = this; - - const set = (key, value) => { - checkValueType(key, value); - if (this._options.accessPropertiesByDotNotation) { - dotProp.set(store, key, value); - } else { - store[key] = value; - } - }; - - if (typeof key === 'object') { - const object = key; - for (const [key, value] of Object.entries(object)) { - set(key, value); - } - } else { - set(key, value); - } - - this.store = store; - } - - has(key) { - if (this._options.accessPropertiesByDotNotation) { - return dotProp.has(this.store, key); - } - - return key in this.store; - } - - reset(...keys) { - for (const key of keys) { - if (this._defaultValues[key]) { - this.set(key, this._defaultValues[key]); - } - } - } - - delete(key) { - const {store} = this; - if (this._options.accessPropertiesByDotNotation) { - dotProp.delete(store, key); - } else { - delete store[key]; - } - - this.store = store; - } - - clear() { - this.store = plainObject(); - } - - onDidChange(key, callback) { - if (typeof key !== 'string') { - throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof key}`); - } - - if (typeof callback !== 'function') { - throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof callback}`); - } - - const getter = () => this.get(key); - - return this.handleChange(getter, callback); - } - - onDidAnyChange(callback) { - if (typeof callback !== 'function') { - throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof callback}`); - } - - const getter = () => this.store; - - return this.handleChange(getter, callback); - } - - handleChange(getter, callback) { - let currentValue = getter(); - - const onChange = () => { - const oldValue = currentValue; - const newValue = getter(); - - try { - // TODO: Use `util.isDeepStrictEqual` when targeting Node.js 10 - assert.deepEqual(newValue, oldValue); - } catch (_) { - currentValue = newValue; - callback.call(this, newValue, oldValue); - } - }; - - this.events.on('change', onChange); - return () => this.events.removeListener('change', onChange); - } - - get size() { - return Object.keys(this.store).length; - } - - get store() { - try { - let data = fs.readFileSync(this.path, this.encryptionKey ? null : 'utf8'); - - if (this.encryptionKey) { - try { - // Check if an initialization vector has been used to encrypt the data - if (data.slice(16, 17).toString() === ':') { - const initializationVector = data.slice(0, 16); - const password = crypto.pbkdf2Sync(this.encryptionKey, initializationVector.toString(), 10000, 32, 'sha512'); - const decipher = crypto.createDecipheriv(encryptionAlgorithm, password, initializationVector); - data = Buffer.concat([decipher.update(data.slice(17)), decipher.final()]); - } else { - const decipher = crypto.createDecipher(encryptionAlgorithm, this.encryptionKey); - data = Buffer.concat([decipher.update(data), decipher.final()]); - } - } catch (_) {} - } - - data = this.deserialize(data); - this._validate(data); - return Object.assign(plainObject(), data); - } catch (error) { - if (error.code === 'ENOENT') { - this._ensureDirectory(); - return plainObject(); - } - - if (this._options.clearInvalidConfig && error.name === 'SyntaxError') { - return plainObject(); - } - - throw error; - } - } - - set store(value) { - this._ensureDirectory(); - - this._validate(value); - this._write(value); - - this.events.emit('change'); - } - - * [Symbol.iterator]() { - for (const [key, value] of Object.entries(this.store)) { - yield [key, value]; - } - } -} - -module.exports = Conf; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./node_modules/debounce-fn/index.js": -/*!*******************************************!*\ - !*** ./node_modules/debounce-fn/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const mimicFn = __webpack_require__(/*! mimic-fn */ "./node_modules/mimic-fn/index.js"); - -module.exports = (fn, options = {}) => { - if (typeof fn !== 'function') { - throw new TypeError(`Expected the first argument to be a function, got \`${typeof fn}\``); - } - - let timeout; - let result; - - const debounced = function (...args) { - const context = this; - - const later = () => { - timeout = null; - if (!options.immediate) { - result = fn.apply(context, args); - } - }; - - const callNow = options.immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, options.wait || 0); - - if (callNow) { - result = fn.apply(context, args); - } - - return result; - }; - - mimicFn(debounced, fn); - - debounced.cancel = () => { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - }; - - return debounced; -}; - - -/***/ }), - -/***/ "./node_modules/debug/node_modules/ms/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/debug/node_modules/ms/index.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} - - -/***/ }), - -/***/ "./node_modules/debug/src/browser.js": -/*!*******************************************!*\ - !*** ./node_modules/debug/src/browser.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = __webpack_require__(/*! ./common */ "./node_modules/debug/src/common.js")(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - - -/***/ }), - -/***/ "./node_modules/debug/src/common.js": -/*!******************************************!*\ - !*** ./node_modules/debug/src/common.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __webpack_require__(/*! ms */ "./node_modules/debug/node_modules/ms/index.js"); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; - - -/***/ }), - -/***/ "./node_modules/debug/src/index.js": -/*!*****************************************!*\ - !*** ./node_modules/debug/src/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __webpack_require__(/*! ./browser.js */ "./node_modules/debug/src/browser.js"); -} else { - module.exports = __webpack_require__(/*! ./node.js */ "./node_modules/debug/src/node.js"); -} - - -/***/ }), - -/***/ "./node_modules/debug/src/node.js": -/*!****************************************!*\ - !*** ./node_modules/debug/src/node.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Module dependencies. - */ - -const tty = __webpack_require__(/*! tty */ "tty"); -const util = __webpack_require__(/*! util */ "util"); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __webpack_require__(/*! supports-color */ "./node_modules/supports-color/index.js"); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = __webpack_require__(/*! ./common */ "./node_modules/debug/src/common.js")(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - - -/***/ }), - -/***/ "./node_modules/dot-prop/index.js": -/*!****************************************!*\ - !*** ./node_modules/dot-prop/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const isObj = __webpack_require__(/*! is-obj */ "./node_modules/is-obj/index.js"); - -const disallowedKeys = [ - '__proto__', - 'prototype', - 'constructor' -]; - -const isValidPath = pathSegments => !pathSegments.some(segment => disallowedKeys.includes(segment)); - -function getPathSegments(path) { - const pathArray = path.split('.'); - const parts = []; - - for (let i = 0; i < pathArray.length; i++) { - let p = pathArray[i]; - - while (p[p.length - 1] === '\\' && pathArray[i + 1] !== undefined) { - p = p.slice(0, -1) + '.'; - p += pathArray[++i]; - } - - parts.push(p); - } - - if (!isValidPath(parts)) { - return []; - } - - return parts; -} - -module.exports = { - get(object, path, value) { - if (!isObj(object) || typeof path !== 'string') { - return value === undefined ? object : value; - } - - const pathArray = getPathSegments(path); - if (pathArray.length === 0) { - return; - } - - for (let i = 0; i < pathArray.length; i++) { - if (!Object.prototype.propertyIsEnumerable.call(object, pathArray[i])) { - return value; - } - - object = object[pathArray[i]]; - - if (object === undefined || object === null) { - // `object` is either `undefined` or `null` so we want to stop the loop, and - // if this is not the last bit of the path, and - // if it did't return `undefined` - // it would return `null` if `object` is `null` - // but we want `get({foo: null}, 'foo.bar')` to equal `undefined`, or the supplied value, not `null` - if (i !== pathArray.length - 1) { - return value; - } - - break; - } - } - - return object; - }, - - set(object, path, value) { - if (!isObj(object) || typeof path !== 'string') { - return object; - } - - const root = object; - const pathArray = getPathSegments(path); - - for (let i = 0; i < pathArray.length; i++) { - const p = pathArray[i]; - - if (!isObj(object[p])) { - object[p] = {}; - } - - if (i === pathArray.length - 1) { - object[p] = value; - } - - object = object[p]; - } - - return root; - }, - - delete(object, path) { - if (!isObj(object) || typeof path !== 'string') { - return false; - } - - const pathArray = getPathSegments(path); - - for (let i = 0; i < pathArray.length; i++) { - const p = pathArray[i]; - - if (i === pathArray.length - 1) { - delete object[p]; - return true; - } - - object = object[p]; - - if (!isObj(object)) { - return false; - } - } - }, - - has(object, path) { - if (!isObj(object) || typeof path !== 'string') { - return false; - } - - const pathArray = getPathSegments(path); - if (pathArray.length === 0) { - return false; - } - - // eslint-disable-next-line unicorn/no-for-loop - for (let i = 0; i < pathArray.length; i++) { - if (isObj(object)) { - if (!(pathArray[i] in object)) { - return false; - } - - object = object[pathArray[i]]; - } else { - return false; - } - } - - return true; - } -}; - - -/***/ }), - -/***/ "./node_modules/electron-context-menu/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/electron-context-menu/index.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const electron = __webpack_require__(/*! electron */ "electron"); -const cliTruncate = __webpack_require__(/*! cli-truncate */ "./node_modules/cli-truncate/index.js"); -const {download} = __webpack_require__(/*! electron-dl */ "./node_modules/electron-dl/index.js"); -const isDev = __webpack_require__(/*! electron-is-dev */ "./node_modules/electron-is-dev/index.js"); - -const webContents = win => win.webContents || (win.getWebContentsId && electron.remote.webContents.fromId(win.getWebContentsId())); - -const decorateMenuItem = menuItem => { - return (options = {}) => { - if (options.transform && !options.click) { - menuItem.transform = options.transform; - } - - return menuItem; - }; -}; - -const removeUnusedMenuItems = menuTemplate => { - let notDeletedPreviousElement; - - return menuTemplate - .filter(menuItem => menuItem !== undefined && menuItem !== false && menuItem.visible !== false && menuItem.visible !== '') - .filter((menuItem, index, array) => { - const toDelete = menuItem.type === 'separator' && (!notDeletedPreviousElement || index === array.length - 1 || array[index + 1].type === 'separator'); - notDeletedPreviousElement = toDelete ? notDeletedPreviousElement : menuItem; - return !toDelete; - }); -}; - -const create = (win, options) => { - const handleContextMenu = (event, props) => { - if (typeof options.shouldShowMenu === 'function' && options.shouldShowMenu(event, props) === false) { - return; - } - - const {editFlags} = props; - const hasText = props.selectionText.trim().length > 0; - const isLink = Boolean(props.linkURL); - const can = type => editFlags[`can${type}`] && hasText; - - const defaultActions = { - separator: () => ({type: 'separator'}), - learnSpelling: decorateMenuItem({ - id: 'learnSpelling', - label: '&Learn Spelling', - visible: Boolean(props.isEditable && hasText && props.misspelledWord), - click() { - const target = webContents(win); - target.session.addWordToSpellCheckerDictionary(props.misspelledWord); - } - }), - lookUpSelection: decorateMenuItem({ - id: 'lookUpSelection', - label: 'Look Up “{selection}”', - visible: process.platform === 'darwin' && hasText && !isLink, - click() { - if (process.platform === 'darwin') { - webContents(win).showDefinitionForSelection(); - } - } - }), - searchWithGoogle: decorateMenuItem({ - id: 'searchWithGoogle', - label: '&Search with Google', - visible: hasText, - click() { - const url = new URL('https://www.google.com/search'); - url.searchParams.set('q', props.selectionText); - electron.shell.openExternal(url.toString()); - } - }), - cut: decorateMenuItem({ - id: 'cut', - label: 'Cu&t', - enabled: can('Cut'), - visible: props.isEditable, - click(menuItem) { - const target = webContents(win); - - if (!menuItem.transform && target) { - target.cut(); - } else { - props.selectionText = menuItem.transform ? menuItem.transform(props.selectionText) : props.selectionText; - electron.clipboard.writeText(props.selectionText); - } - } - }), - copy: decorateMenuItem({ - id: 'copy', - label: '&Copy', - enabled: can('Copy'), - visible: props.isEditable || hasText, - click(menuItem) { - const target = webContents(win); - - if (!menuItem.transform && target) { - target.copy(); - } else { - props.selectionText = menuItem.transform ? menuItem.transform(props.selectionText) : props.selectionText; - electron.clipboard.writeText(props.selectionText); - } - } - }), - paste: decorateMenuItem({ - id: 'paste', - label: '&Paste', - enabled: editFlags.canPaste, - visible: props.isEditable, - click(menuItem) { - const target = webContents(win); - - if (menuItem.transform) { - let clipboardContent = electron.clipboard.readText(props.selectionText); - clipboardContent = menuItem.transform ? menuItem.transform(clipboardContent) : clipboardContent; - target.insertText(clipboardContent); - } else { - target.paste(); - } - } - }), - saveImage: decorateMenuItem({ - id: 'saveImage', - label: 'Save I&mage', - visible: props.mediaType === 'image', - click(menuItem) { - props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; - download(win, props.srcURL); - } - }), - saveImageAs: decorateMenuItem({ - id: 'saveImageAs', - label: 'Sa&ve Image As…', - visible: props.mediaType === 'image', - click(menuItem) { - props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; - download(win, props.srcURL, {saveAs: true}); - } - }), - copyLink: decorateMenuItem({ - id: 'copyLink', - label: 'Copy Lin&k', - visible: props.linkURL.length > 0 && props.mediaType === 'none', - click(menuItem) { - props.linkURL = menuItem.transform ? menuItem.transform(props.linkURL) : props.linkURL; - - electron.clipboard.write({ - bookmark: props.linkText, - text: props.linkURL - }); - } - }), - saveLinkAs: decorateMenuItem({ - id: 'saveLinkAs', - label: 'Save Link As…', - visible: props.linkURL.length > 0 && props.mediaType === 'none', - click(menuItem) { - props.linkURL = menuItem.transform ? menuItem.transform(props.linkURL) : props.linkURL; - download(win, props.linkURL, {saveAs: true}); - } - }), - copyImage: decorateMenuItem({ - id: 'copyImage', - label: 'Cop&y Image', - visible: props.mediaType === 'image', - click() { - webContents(win).copyImageAt(props.x, props.y); - } - }), - copyImageAddress: decorateMenuItem({ - id: 'copyImageAddress', - label: 'C&opy Image Address', - visible: props.mediaType === 'image', - click(menuItem) { - props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; - - electron.clipboard.write({ - bookmark: props.srcURL, - text: props.srcURL - }); - } - }), - inspect: () => ({ - id: 'inspect', - label: 'I&nspect Element', - click() { - win.inspectElement(props.x, props.y); - - if (webContents(win).isDevToolsOpened()) { - webContents(win).devToolsWebContents.focus(); - } - } - }), - services: () => ({ - id: 'services', - label: 'Services', - role: 'services', - visible: process.platform === 'darwin' && (props.isEditable || hasText) - }) - }; - - const shouldShowInspectElement = typeof options.showInspectElement === 'boolean' ? options.showInspectElement : isDev; - - function word(suggestion) { - return { - id: 'dictionarySuggestions', - label: suggestion, - visible: Boolean(props.isEditable && hasText && props.misspelledWord), - click(menuItem) { - const target = webContents(win); - target.replaceMisspelling(menuItem.label); - } - }; - } - - let dictionarySuggestions = []; - if (hasText && props.misspelledWord && props.dictionarySuggestions.length > 0) { - dictionarySuggestions = props.dictionarySuggestions.map(suggestion => word(suggestion)); - } else { - dictionarySuggestions.push( - { - id: 'dictionarySuggestions', - label: 'No Guesses Found', - visible: Boolean(hasText && props.misspelledWord), - enabled: false - } - ); - } - - let menuTemplate = [ - dictionarySuggestions.length > 0 && defaultActions.separator(), - ...dictionarySuggestions, - defaultActions.separator(), - defaultActions.learnSpelling(), - defaultActions.separator(), - options.showLookUpSelection !== false && defaultActions.lookUpSelection(), - defaultActions.separator(), - options.showSearchWithGoogle !== false && defaultActions.searchWithGoogle(), - defaultActions.separator(), - defaultActions.cut(), - defaultActions.copy(), - defaultActions.paste(), - defaultActions.separator(), - options.showSaveImage && defaultActions.saveImage(), - options.showSaveImageAs && defaultActions.saveImageAs(), - options.showCopyImage !== false && defaultActions.copyImage(), - options.showCopyImageAddress && defaultActions.copyImageAddress(), - defaultActions.separator(), - defaultActions.copyLink(), - options.showSaveLinkAs && defaultActions.saveLinkAs(), - defaultActions.separator(), - shouldShowInspectElement && defaultActions.inspect(), - options.showServices && defaultActions.services(), - defaultActions.separator() - ]; - - if (options.menu) { - menuTemplate = options.menu(defaultActions, props, win, dictionarySuggestions); - } - - if (options.prepend) { - const result = options.prepend(defaultActions, props, win); - - if (Array.isArray(result)) { - menuTemplate.unshift(...result); - } - } - - if (options.append) { - const result = options.append(defaultActions, props, win); - - if (Array.isArray(result)) { - menuTemplate.push(...result); - } - } - - // Filter out leading/trailing separators - // TODO: https://github.com/electron/electron/issues/5869 - menuTemplate = removeUnusedMenuItems(menuTemplate); - - for (const menuItem of menuTemplate) { - // Apply custom labels for default menu items - if (options.labels && options.labels[menuItem.id]) { - menuItem.label = options.labels[menuItem.id]; - } - - // Replace placeholders in menu item labels - if (typeof menuItem.label === 'string' && menuItem.label.includes('{selection}')) { - const selectionString = typeof props.selectionText === 'string' ? props.selectionText.trim() : ''; - menuItem.label = menuItem.label.replace('{selection}', cliTruncate(selectionString, 25).replace(/&/g, '&&')); - } - } - - if (menuTemplate.length > 0) { - const menu = (electron.remote ? electron.remote.Menu : electron.Menu).buildFromTemplate(menuTemplate); - - /* - When `electron.remote` is not available, this runs in the browser process. - - We can safely use `win` in this case as it refers to the window the - context-menu should open in. - - When this is being called from a web view, we can't use `win` as this - would refer to the web view which is not allowed to render a popup menu. - */ - menu.popup(electron.remote ? electron.remote.getCurrentWindow() : win); - } - }; - - webContents(win).on('context-menu', handleContextMenu); - - return () => { - if (win.isDestroyed()) { - return; - } - - webContents(win).removeListener('context-menu', handleContextMenu); - }; -}; - -module.exports = (options = {}) => { - let isDisposed = false; - const disposables = []; - - const init = win => { - if (isDisposed) { - return; - } - - const disposeMenu = create(win, options); - - disposables.push(disposeMenu); - const removeDisposable = () => { - const index = disposables.indexOf(disposeMenu); - if (index !== -1) { - disposables.splice(index, 1); - } - }; - - if (typeof win.once !== 'undefined') { // Support for BrowserView - win.once('closed', removeDisposable); - } - - disposables.push(() => { - win.off('closed', removeDisposable); - }); - }; - - const dispose = () => { - for (const dispose of disposables) { - dispose(); - } - - disposables.length = 0; - isDisposed = true; - }; - - if (options.window) { - const win = options.window; - - // When window is a webview that has not yet finished loading webContents is not available - if (webContents(win) === undefined) { - const onDomReady = () => { - init(win); - }; - - const listenerFunction = win.addEventListener || win.addListener; - listenerFunction('dom-ready', onDomReady, {once: true}); - - disposables.push(() => { - win.removeEventListener('dom-ready', onDomReady, {once: true}); - }); - - return dispose; - } - - init(win); - - return dispose; - } - - for (const win of (electron.BrowserWindow || electron.remote.BrowserWindow).getAllWindows()) { - init(win); - } - - const app = electron.app || electron.remote.app; - - const onWindowCreated = (event, win) => { - init(win); - }; - - app.on('browser-window-created', onWindowCreated); - disposables.push(() => { - app.removeListener('browser-window-created', onWindowCreated); - }); - - return dispose; -}; - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js ***! - \**********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(/*! fs */ "fs"); -const path = __webpack_require__(/*! path */ "path"); -const rimraf = __webpack_require__(/*! rimraf */ "./node_modules/rimraf/rimraf.js"); -const utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/electron-devtools-installer/dist/utils.js"); -const unzip = __webpack_require__(/*! unzip-crx-3 */ "./node_modules/unzip-crx-3/dist/index.js"); -const downloadChromeExtension = (chromeStoreID, forceDownload, attempts = 5) => { - const extensionsStore = utils_1.getPath(); - if (!fs.existsSync(extensionsStore)) { - fs.mkdirSync(extensionsStore, { recursive: true }); - } - const extensionFolder = path.resolve(`${extensionsStore}/${chromeStoreID}`); - return new Promise((resolve, reject) => { - if (!fs.existsSync(extensionFolder) || forceDownload) { - if (fs.existsSync(extensionFolder)) { - rimraf.sync(extensionFolder); - } - const fileURL = `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${chromeStoreID}%26uc&prodversion=32`; // eslint-disable-line - const filePath = path.resolve(`${extensionFolder}.crx`); - utils_1.downloadFile(fileURL, filePath) - .then(() => { - unzip(filePath, extensionFolder) - .then(() => { - utils_1.changePermissions(extensionFolder, 755); - resolve(extensionFolder); - }) - .catch((err) => { - if (!fs.existsSync(path.resolve(extensionFolder, 'manifest.json'))) { - return reject(err); - } - }); - }) - .catch((err) => { - console.log(`Failed to fetch extension, trying ${attempts - 1} more times`); // eslint-disable-line - if (attempts <= 1) { - return reject(err); - } - setTimeout(() => { - downloadChromeExtension(chromeStoreID, forceDownload, attempts - 1) - .then(resolve) - .catch(reject); - }, 200); - }); - } - else { - resolve(extensionFolder); - } - }); -}; -exports.default = downloadChromeExtension; -//# sourceMappingURL=downloadChromeExtension.js.map - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/dist/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/dist/index.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MOBX_DEVTOOLS = exports.APOLLO_DEVELOPER_TOOLS = exports.CYCLEJS_DEVTOOL = exports.REDUX_DEVTOOLS = exports.VUEJS3_DEVTOOLS = exports.VUEJS_DEVTOOLS = exports.ANGULARJS_BATARANG = exports.JQUERY_DEBUGGER = exports.BACKBONE_DEBUGGER = exports.REACT_DEVELOPER_TOOLS = exports.EMBER_INSPECTOR = void 0; -const electron_1 = __webpack_require__(/*! electron */ "electron"); -const fs = __webpack_require__(/*! fs */ "fs"); -const path = __webpack_require__(/*! path */ "path"); -const semver = __webpack_require__(/*! semver */ "./node_modules/electron-devtools-installer/node_modules/semver/index.js"); -const downloadChromeExtension_1 = __webpack_require__(/*! ./downloadChromeExtension */ "./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js"); -const utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/electron-devtools-installer/dist/utils.js"); -let IDMap = {}; -const getIDMapPath = () => path.resolve(utils_1.getPath(), 'IDMap.json'); -if (fs.existsSync(getIDMapPath())) { - try { - IDMap = JSON.parse(fs.readFileSync(getIDMapPath(), 'utf8')); - } - catch (err) { - console.error('electron-devtools-installer: Invalid JSON present in the IDMap file'); - } -} -/** - * @param extensionReference Extension or extensions to install - * @param options Installation options - * @returns A promise resolving with the name or names of the extensions installed - */ -const install = (extensionReference, options = {}) => { - // Support old forceDownload syntax - if (typeof options === 'boolean') { - options = { forceDownload: options }; - } - const { forceDownload, loadExtensionOptions } = options; - if (process.type !== 'browser') { - return Promise.reject(new Error('electron-devtools-installer can only be used from the main process')); - } - if (Array.isArray(extensionReference)) { - return extensionReference.reduce((accum, extension) => accum.then(() => install(extension, options)), Promise.resolve('')); - } - let chromeStoreID; - if (typeof extensionReference === 'object' && extensionReference.id) { - chromeStoreID = extensionReference.id; - const electronVersion = process.versions.electron.split('-')[0]; - if (!semver.satisfies(electronVersion, extensionReference.electron)) { - return Promise.reject(new Error(`Version of Electron: ${electronVersion} does not match required range ${extensionReference.electron} for extension ${chromeStoreID}`)); - } - } - else if (typeof extensionReference === 'string') { - chromeStoreID = extensionReference; - } - else { - return Promise.reject(new Error(`Invalid extensionReference passed in: "${extensionReference}"`)); - } - const extensionName = IDMap[chromeStoreID]; - let extensionInstalled; - // For Electron >=9. - if (electron_1.session.defaultSession.getExtension) { - extensionInstalled = - !!extensionName && - electron_1.session.defaultSession - .getAllExtensions() - .find((e) => e.name === extensionName); - } - else { - extensionInstalled = - !!extensionName && - electron_1.BrowserWindow.getDevToolsExtensions && - electron_1.BrowserWindow.getDevToolsExtensions().hasOwnProperty(extensionName); - } - if (!forceDownload && extensionInstalled) { - return Promise.resolve(IDMap[chromeStoreID]); - } - return downloadChromeExtension_1.default(chromeStoreID, forceDownload || false).then((extensionFolder) => { - // Use forceDownload, but already installed - if (extensionInstalled) { - // For Electron >=9. - if (electron_1.session.defaultSession.removeExtension) { - const extensionId = electron_1.session.defaultSession - .getAllExtensions() - .find((e) => e.name).id; - electron_1.session.defaultSession.removeExtension(extensionId); - } - else { - electron_1.BrowserWindow.removeDevToolsExtension(extensionName); - } - } - // For Electron >=9. - if (electron_1.session.defaultSession.loadExtension) { - return electron_1.session.defaultSession - .loadExtension(extensionFolder, loadExtensionOptions) - .then((ext) => { - return Promise.resolve(ext.name); - }); - } - const name = electron_1.BrowserWindow.addDevToolsExtension(extensionFolder); // eslint-disable-line - fs.writeFileSync(getIDMapPath(), JSON.stringify(Object.assign(IDMap, { - [chromeStoreID]: name, - }))); - return Promise.resolve(name); - }); -}; -exports.default = install; -exports.EMBER_INSPECTOR = { - id: 'bmdblncegkenkacieihfhpjfppoconhi', - electron: '>=1.2.1', -}; -exports.REACT_DEVELOPER_TOOLS = { - id: 'fmkadmapgofadopljbjfkapdkoienihi', - electron: '>=1.2.1', -}; -exports.BACKBONE_DEBUGGER = { - id: 'bhljhndlimiafopmmhjlgfpnnchjjbhd', - electron: '>=1.2.1', -}; -exports.JQUERY_DEBUGGER = { - id: 'dbhhnnnpaeobfddmlalhnehgclcmjimi', - electron: '>=1.2.1', -}; -exports.ANGULARJS_BATARANG = { - id: 'ighdmehidhipcmcojjgiloacoafjmpfk', - electron: '>=1.2.1', -}; -exports.VUEJS_DEVTOOLS = { - id: 'nhdogjmejiglipccpnnnanhbledajbpd', - electron: '>=1.2.1', -}; -exports.VUEJS3_DEVTOOLS = { - id: 'ljjemllljcmogpfapbkkighbhhppjdbg', - electron: '>=1.2.1', -}; -exports.REDUX_DEVTOOLS = { - id: 'lmhkpmbekcpmknklioeibfkpmmfibljd', - electron: '>=1.2.1', -}; -exports.CYCLEJS_DEVTOOL = { - id: 'dfgplfmhhmdekalbpejekgfegkonjpfp', - electron: '>=1.2.1', -}; -exports.APOLLO_DEVELOPER_TOOLS = { - id: 'jdkknkkbebbapilgoeccciglkfbmbnfm', - electron: '>=1.2.1', -}; -exports.MOBX_DEVTOOLS = { - id: 'pfgnfdagidkfgccljigdamigbcnndkod', - electron: '>=1.2.1', -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/dist/utils.js": -/*!****************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/dist/utils.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.changePermissions = exports.downloadFile = exports.getPath = void 0; -const electron_1 = __webpack_require__(/*! electron */ "electron"); -const fs = __webpack_require__(/*! fs */ "fs"); -const path = __webpack_require__(/*! path */ "path"); -const https = __webpack_require__(/*! https */ "https"); -const getPath = () => { - const savePath = electron_1.app.getPath('userData'); - return path.resolve(`${savePath}/extensions`); -}; -exports.getPath = getPath; -// Use https.get fallback for Electron < 1.4.5 -const request = electron_1.net ? electron_1.net.request : https.get; -const downloadFile = (from, to) => { - return new Promise((resolve, reject) => { - const req = request(from); - req.on('response', (res) => { - // Shouldn't handle redirect with `electron.net`, this is for https.get fallback - if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { - return exports.downloadFile(res.headers.location, to).then(resolve).catch(reject); - } - res.pipe(fs.createWriteStream(to)).on('close', resolve); - res.on('error', reject); - }); - req.on('error', reject); - req.end(); - }); -}; -exports.downloadFile = downloadFile; -const changePermissions = (dir, mode) => { - const files = fs.readdirSync(dir); - files.forEach((file) => { - const filePath = path.join(dir, file); - fs.chmodSync(filePath, parseInt(`${mode}`, 8)); - if (fs.statSync(filePath).isDirectory()) { - exports.changePermissions(filePath, mode); - } - }); -}; -exports.changePermissions = changePermissions; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - const sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - const sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - const sameSemVer = this.semver.version === comp.semver.version - const differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - const oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<') - const oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>') - - return ( - sameDirectionIncreasing || - sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || - oppositeDirectionsGreaterThan - ) - } -} - -module.exports = Comparator - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") -const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") -const cmp = __webpack_require__(/*! ../functions/cmp */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js") -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") -const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ./range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range - .split(/\s*\|\|\s*/) - // map the range to a 2d array of comparators - .map(range => this.parseRange(range.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) - this.set = [first] - else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.format() - } - - format () { - this.range = this.set - .map((comps) => { - return comps.join(' ').trim() - }) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - range = range.trim() - - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = Object.keys(this.options).join(',') - const memoKey = `parseRange:${memoOpts}:${range}` - const cached = cache.get(memoKey) - if (cached) - return cached - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - // in loose mode, throw out any that are not valid comparators - .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) - .map(comp => new Comparator(comp, this.options)) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const l = rangeList.length - const rangeMap = new Map() - for (const comp of rangeList) { - if (isNullSet(comp)) - return [comp] - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) - rangeMap.delete('') - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} -module.exports = Range - -const LRU = __webpack_require__(/*! lru-cache */ "./node_modules/lru-cache/index.js") -const cache = new LRU({ max: 1000 }) - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") -const Comparator = __webpack_require__(/*! ./comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") -const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace -} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceTilde(comp, options) - }).join(' ') - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceCaret(comp, options) - }).join(' ') - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((comp) => { - return replaceXRange(comp, options) - }).join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') - pr = '-0' - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp.trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return (`${from} ${to}`).trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") -const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") -const { compareIdentifiers } = __webpack_require__(/*! ../internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js") -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid Version: ${version}`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.format() - this.raw = this.version - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js") -const neq = __webpack_require__(/*! ./neq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js") -const gt = __webpack_require__(/*! ./gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") -const gte = __webpack_require__(/*! ./gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js") -const lt = __webpack_require__(/*! ./lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js") -const lte = __webpack_require__(/*! ./lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js") - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js ***! - \******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") -const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - let next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) - return null - - return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) -} -module.exports = coerce - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js ***! - \*************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js ***! - \*************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js ***! - \*******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") -const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js") - -const diff = (version1, version2) => { - if (eq(version1, version2)) { - return null - } else { - const v1 = parse(version1) - const v2 = parse(version2) - const hasPre = v1.prerelease.length || v2.prerelease.length - const prefix = hasPre ? 'pre' : '' - const defaultResult = hasPre ? 'prerelease' : '' - for (const key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} -module.exports = diff - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") - -const inc = (version, release, options, identifier) => { - if (typeof (options) === 'string') { - identifier = options - options = undefined - } - - try { - return new SemVer(version, options).inc(release, identifier).version - } catch (er) { - return null - } -} -module.exports = inc - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const {MAX_LENGTH} = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") -const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") -const parse = (version, options) => { - options = parseOptions(options) - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - const r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -module.exports = parse - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js ***! - \**********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js") -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js ***! - \*********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js") -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/index.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/index.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __webpack_require__(/*! ./internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") -module.exports = { - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: __webpack_require__(/*! ./internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js").SEMVER_SPEC_VERSION, - SemVer: __webpack_require__(/*! ./classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js"), - compareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js").compareIdentifiers, - rcompareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js").rcompareIdentifiers, - parse: __webpack_require__(/*! ./functions/parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js"), - valid: __webpack_require__(/*! ./functions/valid */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js"), - clean: __webpack_require__(/*! ./functions/clean */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js"), - inc: __webpack_require__(/*! ./functions/inc */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js"), - diff: __webpack_require__(/*! ./functions/diff */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js"), - major: __webpack_require__(/*! ./functions/major */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js"), - minor: __webpack_require__(/*! ./functions/minor */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js"), - patch: __webpack_require__(/*! ./functions/patch */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js"), - prerelease: __webpack_require__(/*! ./functions/prerelease */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js"), - compare: __webpack_require__(/*! ./functions/compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js"), - rcompare: __webpack_require__(/*! ./functions/rcompare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js"), - compareLoose: __webpack_require__(/*! ./functions/compare-loose */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js"), - compareBuild: __webpack_require__(/*! ./functions/compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js"), - sort: __webpack_require__(/*! ./functions/sort */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js"), - rsort: __webpack_require__(/*! ./functions/rsort */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js"), - gt: __webpack_require__(/*! ./functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js"), - lt: __webpack_require__(/*! ./functions/lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js"), - eq: __webpack_require__(/*! ./functions/eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js"), - neq: __webpack_require__(/*! ./functions/neq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js"), - gte: __webpack_require__(/*! ./functions/gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js"), - lte: __webpack_require__(/*! ./functions/lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js"), - cmp: __webpack_require__(/*! ./functions/cmp */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js"), - coerce: __webpack_require__(/*! ./functions/coerce */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js"), - Comparator: __webpack_require__(/*! ./classes/comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js"), - Range: __webpack_require__(/*! ./classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js"), - satisfies: __webpack_require__(/*! ./functions/satisfies */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js"), - toComparators: __webpack_require__(/*! ./ranges/to-comparators */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js"), - maxSatisfying: __webpack_require__(/*! ./ranges/max-satisfying */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js"), - minSatisfying: __webpack_require__(/*! ./ranges/min-satisfying */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js"), - minVersion: __webpack_require__(/*! ./ranges/min-version */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js"), - validRange: __webpack_require__(/*! ./ranges/valid */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js"), - outside: __webpack_require__(/*! ./ranges/outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js"), - gtr: __webpack_require__(/*! ./ranges/gtr */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js"), - ltr: __webpack_require__(/*! ./ranges/ltr */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js"), - intersects: __webpack_require__(/*! ./ranges/intersects */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js"), - simplifyRange: __webpack_require__(/*! ./ranges/simplify */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js"), - subset: __webpack_require__(/*! ./ranges/subset */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js"), -} - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -module.exports = { - SEMVER_SPEC_VERSION, - MAX_LENGTH, - MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH -} - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js ***! - \**********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers -} - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js ***! - \************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// parse out just the options we care about so we always get a consistent -// obj with keys in a consistent order. -const opts = ['includePrerelease', 'loose', 'rtl'] -const parseOptions = options => - !options ? {} - : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((options, k) => { - options[k] = true - return options - }, {}) -module.exports = parseOptions - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js ***! - \*************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(/*! ./constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") -const debug = __webpack_require__(/*! ./debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 - -const createToken = (name, value, isGlobal) => { - const index = R++ - debug(index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Determine if version is greater than all the versions possible in the range. -const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js") -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js ***! - \*******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} -module.exports = intersects - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js") -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js ***! - \***********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js ***! - \***********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) - minver = setMin - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") -const Comparator = __webpack_require__(/*! ../classes/comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") -const {ANY} = Comparator -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const satisfies = __webpack_require__(/*! ../functions/satisfies */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") -const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") -const lt = __webpack_require__(/*! ../functions/lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js") -const lte = __webpack_require__(/*! ../functions/lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js") -const gte = __webpack_require__(/*! ../functions/gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js") - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") -const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") -module.exports = (versions, range, options) => { - const set = [] - let min = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!min) - min = version - } else { - if (prev) { - set.push([min, prev]) - } - prev = null - min = null - } - } - if (min) - set.push([min, null]) - - const ranges = [] - for (const [min, max] of set) { - if (min === max) - ranges.push(min) - else if (!max && min === v[0]) - ranges.push('*') - else if (!max) - ranges.push(`>=${min}`) - else if (min === v[0]) - ranges.push(`<=${max}`) - else - ranges.push(`${min} - ${max}`) - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range.js */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const Comparator = __webpack_require__(/*! ../classes/comparator.js */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") -const { ANY } = Comparator -const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") -const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) - return true - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) - continue OUTER - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) - return false - } - return true -} - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) - return true - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) - return true - else if (options.includePrerelease) - sub = [ new Comparator('>=0.0.0-0') ] - else - sub = [ new Comparator('>=0.0.0') ] - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) - return true - else - dom = [ new Comparator('>=0.0.0') ] - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') - gt = higherGT(gt, c, options) - else if (c.operator === '<' || c.operator === '<=') - lt = lowerLT(lt, c, options) - else - eqSet.add(c.semver) - } - - if (eqSet.size > 1) - return null - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) - return null - else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) - return null - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) - return null - - if (lt && !satisfies(eq, String(lt), options)) - return null - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) - return false - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) - return false - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) - return false - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) - return false - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) - return false - } - if (!c.operator && (lt || gt) && gtltComp !== 0) - return false - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) - return false - - if (lt && hasDomGT && !gt && gtltComp !== 0) - return false - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) - return false - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) - return b - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) - return b - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js ***! - \***********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators - - -/***/ }), - -/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange - - -/***/ }), - -/***/ "./node_modules/electron-dl/index.js": -/*!*******************************************!*\ - !*** ./node_modules/electron-dl/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(/*! path */ "path"); -const {app, BrowserWindow, shell, dialog} = __webpack_require__(/*! electron */ "electron"); -const unusedFilename = __webpack_require__(/*! unused-filename */ "./node_modules/unused-filename/index.js"); -const pupa = __webpack_require__(/*! pupa */ "./node_modules/pupa/index.js"); -const extName = __webpack_require__(/*! ext-name */ "./node_modules/ext-name/index.js"); - -const getFilenameFromMime = (name, mime) => { - const extensions = extName.mime(mime); - - if (extensions.length !== 1) { - return name; - } - - return `${name}.${extensions[0].ext}`; -}; - -const majorElectronVersion = () => { - const version = process.versions.electron.split('.'); - return Number.parseInt(version[0], 10); -}; - -const getWindowFromBrowserView = webContents => { - for (const currentWindow of BrowserWindow.getAllWindows()) { - for (const currentBrowserView of currentWindow.getBrowserViews()) { - if (currentBrowserView.webContents.id === webContents.id) { - return currentWindow; - } - } - } -}; - -const getWindowFromWebContents = webContents => { - let window_; - const webContentsType = webContents.getType(); - switch (webContentsType) { - case 'webview': - window_ = BrowserWindow.fromWebContents(webContents.hostWebContents); - break; - case 'browserView': - window_ = getWindowFromBrowserView(webContents); - break; - default: - window_ = BrowserWindow.fromWebContents(webContents); - break; - } - - return window_; -}; - -function registerListener(session, options, callback = () => {}) { - const downloadItems = new Set(); - let receivedBytes = 0; - let completedBytes = 0; - let totalBytes = 0; - const activeDownloadItems = () => downloadItems.size; - const progressDownloadItems = () => receivedBytes / totalBytes; - - options = { - showBadge: true, - ...options - }; - - const listener = (event, item, webContents) => { - downloadItems.add(item); - totalBytes += item.getTotalBytes(); - - const window_ = majorElectronVersion() >= 12 ? BrowserWindow.fromWebContents(webContents) : getWindowFromWebContents(webContents); - - if (options.directory && !path.isAbsolute(options.directory)) { - throw new Error('The `directory` option must be an absolute path'); - } - - const directory = options.directory || app.getPath('downloads'); - - let filePath; - if (options.filename) { - filePath = path.join(directory, options.filename); - } else { - const filename = item.getFilename(); - const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType()); - - filePath = options.overwrite ? path.join(directory, name) : unusedFilename.sync(path.join(directory, name)); - } - - const errorMessage = options.errorMessage || 'The download of {filename} was interrupted'; - - if (options.saveAs) { - item.setSaveDialogOptions({defaultPath: filePath}); - } else { - item.setSavePath(filePath); - } - - if (typeof options.onStarted === 'function') { - options.onStarted(item); - } - - item.on('updated', () => { - receivedBytes = completedBytes; - for (const item of downloadItems) { - receivedBytes += item.getReceivedBytes(); - } - - if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) { - app.badgeCount = activeDownloadItems(); - } - - if (!window_.isDestroyed()) { - window_.setProgressBar(progressDownloadItems()); - } - - if (typeof options.onProgress === 'function') { - const itemTransferredBytes = item.getReceivedBytes(); - const itemTotalBytes = item.getTotalBytes(); - - options.onProgress({ - percent: itemTotalBytes ? itemTransferredBytes / itemTotalBytes : 0, - transferredBytes: itemTransferredBytes, - totalBytes: itemTotalBytes - }); - } - - if (typeof options.onTotalProgress === 'function') { - options.onTotalProgress({ - percent: progressDownloadItems(), - transferredBytes: receivedBytes, - totalBytes - }); - } - }); - - item.on('done', (event, state) => { - completedBytes += item.getTotalBytes(); - downloadItems.delete(item); - - if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) { - app.badgeCount = activeDownloadItems(); - } - - if (!window_.isDestroyed() && !activeDownloadItems()) { - window_.setProgressBar(-1); - receivedBytes = 0; - completedBytes = 0; - totalBytes = 0; - } - - if (options.unregisterWhenDone) { - session.removeListener('will-download', listener); - } - - // eslint-disable-next-line unicorn/prefer-switch - if (state === 'cancelled') { - if (typeof options.onCancel === 'function') { - options.onCancel(item); - } - } else if (state === 'interrupted') { - const message = pupa(errorMessage, {filename: path.basename(filePath)}); - callback(new Error(message)); - } else if (state === 'completed') { - if (process.platform === 'darwin') { - app.dock.downloadFinished(filePath); - } - - if (options.openFolderWhenDone) { - shell.showItemInFolder(filePath); - } - - if (typeof options.onCompleted === 'function') { - options.onCompleted({ - fileName: item.getFilename(), - path: item.getSavePath(), - fileSize: item.getReceivedBytes(), - mimeType: item.getMimeType(), - url: item.getURL() - }); - } - - callback(null, item); - } - }); - }; - - session.on('will-download', listener); -} - -module.exports = (options = {}) => { - app.on('session-created', session => { - registerListener(session, options, (error, _) => { - if (error) { - const errorTitle = options.errorTitle || 'Download Error'; - dialog.showErrorBox(errorTitle, error.message); - } - }); - }); -}; - -module.exports.download = (window_, url, options) => new Promise((resolve, reject) => { - options = { - ...options, - unregisterWhenDone: true - }; - - registerListener(window_.webContents.session, options, (error, item) => { - if (error) { - reject(error); - } else { - resolve(item); - } - }); - - window_.webContents.downloadURL(url); -}); - - -/***/ }), - -/***/ "./node_modules/electron-is-dev/index.js": -/*!***********************************************!*\ - !*** ./node_modules/electron-is-dev/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const electron = __webpack_require__(/*! electron */ "electron"); - -if (typeof electron === 'string') { - throw new TypeError('Not running in an Electron environment!'); -} - -const app = electron.app || electron.remote.app; - -const isEnvSet = 'ELECTRON_IS_DEV' in process.env; -const getFromEnv = parseInt(process.env.ELECTRON_IS_DEV, 10) === 1; - -module.exports = isEnvSet ? getFromEnv : !app.isPackaged; - - -/***/ }), - -/***/ "./node_modules/electron-store/index.js": -/*!**********************************************!*\ - !*** ./node_modules/electron-store/index.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(/*! path */ "path"); -const electron = __webpack_require__(/*! electron */ "electron"); -const Conf = __webpack_require__(/*! conf */ "./node_modules/conf/index.js"); - -class ElectronStore extends Conf { - constructor(options) { - const defaultCwd = (electron.app || electron.remote.app).getPath('userData'); - - options = { - name: 'config', - ...options - }; - - if (options.cwd) { - options.cwd = path.isAbsolute(options.cwd) ? options.cwd : path.join(defaultCwd, options.cwd); - } else { - options.cwd = defaultCwd; - } - - options.configName = options.name; - delete options.name; - super(options); - } - - openInEditor() { - const open = electron.shell.openItem || electron.shell.openPath; - open(this.path); - } -} - -module.exports = ElectronStore; - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js ***! - \**************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CancellationError = exports.CancellationToken = void 0; -const events_1 = __webpack_require__(/*! events */ "events"); -class CancellationToken extends events_1.EventEmitter { - // babel cannot compile ... correctly for super calls - constructor(parent) { - super(); - this.parentCancelHandler = null; - this._parent = null; - this._cancelled = false; - if (parent != null) { - this.parent = parent; - } - } - get cancelled() { - return this._cancelled || (this._parent != null && this._parent.cancelled); - } - set parent(value) { - this.removeParentCancelHandler(); - this._parent = value; - this.parentCancelHandler = () => this.cancel(); - this._parent.onCancel(this.parentCancelHandler); - } - cancel() { - this._cancelled = true; - this.emit("cancel"); - } - onCancel(handler) { - if (this.cancelled) { - handler(); - } - else { - this.once("cancel", handler); - } - } - createPromise(callback) { - if (this.cancelled) { - return Promise.reject(new CancellationError()); - } - const finallyHandler = () => { - if (cancelHandler != null) { - try { - this.removeListener("cancel", cancelHandler); - cancelHandler = null; - } - catch (ignore) { - // ignore - } - } - }; - let cancelHandler = null; - return new Promise((resolve, reject) => { - let addedCancelHandler = null; - cancelHandler = () => { - try { - if (addedCancelHandler != null) { - addedCancelHandler(); - addedCancelHandler = null; - } - } - finally { - reject(new CancellationError()); - } - }; - if (this.cancelled) { - cancelHandler(); - return; - } - this.onCancel(cancelHandler); - callback(resolve, reject, (callback) => { - addedCancelHandler = callback; - }); - }) - .then(it => { - finallyHandler(); - return it; - }) - .catch(e => { - finallyHandler(); - throw e; - }); - } - removeParentCancelHandler() { - const parent = this._parent; - if (parent != null && this.parentCancelHandler != null) { - parent.removeListener("cancel", this.parentCancelHandler); - this.parentCancelHandler = null; - } - } - dispose() { - try { - this.removeParentCancelHandler(); - } - finally { - this.removeAllListeners(); - this._parent = null; - } - } -} -exports.CancellationToken = CancellationToken; -class CancellationError extends Error { - constructor() { - super("cancelled"); - } -} -exports.CancellationError = CancellationError; -//# sourceMappingURL=CancellationToken.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js ***! - \**********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ProgressCallbackTransform = void 0; -const stream_1 = __webpack_require__(/*! stream */ "stream"); -class ProgressCallbackTransform extends stream_1.Transform { - constructor(total, cancellationToken, onProgress) { - super(); - this.total = total; - this.cancellationToken = cancellationToken; - this.onProgress = onProgress; - this.start = Date.now(); - this.transferred = 0; - this.delta = 0; - this.nextUpdate = this.start + 1000; - } - _transform(chunk, encoding, callback) { - if (this.cancellationToken.cancelled) { - callback(new Error("cancelled"), null); - return; - } - this.transferred += chunk.length; - this.delta += chunk.length; - const now = Date.now(); - if (now >= this.nextUpdate && this.transferred !== this.total /* will be emitted on _flush */) { - this.nextUpdate = now + 1000; - this.onProgress({ - total: this.total, - delta: this.delta, - transferred: this.transferred, - percent: (this.transferred / this.total) * 100, - bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000)), - }); - this.delta = 0; - } - callback(null, chunk); - } - _flush(callback) { - if (this.cancellationToken.cancelled) { - callback(new Error("cancelled")); - return; - } - this.onProgress({ - total: this.total, - delta: this.delta, - transferred: this.total, - percent: 100, - bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), - }); - this.delta = 0; - callback(null); - } -} -exports.ProgressCallbackTransform = ProgressCallbackTransform; -//# sourceMappingURL=ProgressCallbackTransform.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BintrayClient = void 0; -const httpExecutor_1 = __webpack_require__(/*! ./httpExecutor */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js"); -class BintrayClient { - constructor(options, httpExecutor, cancellationToken, apiKey) { - this.httpExecutor = httpExecutor; - this.cancellationToken = cancellationToken; - this.requestHeaders = null; - if (options.owner == null) { - throw new Error("owner is not specified"); - } - if (options.package == null) { - throw new Error("package is not specified"); - } - this.repo = options.repo || "generic"; - this.packageName = options.package; - this.owner = options.owner; - this.user = options.user || options.owner; - this.component = options.component || null; - this.distribution = options.distribution || "stable"; - this.auth = apiKey == null ? null : `Basic ${Buffer.from(`${this.user}:${apiKey}`).toString("base64")}`; - this.basePath = `/packages/${this.owner}/${this.repo}/${this.packageName}`; - } - setRequestHeaders(value) { - this.requestHeaders = value; - } - bintrayRequest(path, auth, data = null, cancellationToken, method) { - return httpExecutor_1.parseJson(this.httpExecutor.request(httpExecutor_1.configureRequestOptions({ hostname: "api.bintray.com", path, headers: this.requestHeaders || undefined }, auth, method), cancellationToken, data)); - } - getVersion(version) { - return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken); - } - getVersionFiles(version) { - return this.bintrayRequest(`${this.basePath}/versions/${version}/files`, this.auth, null, this.cancellationToken); - } - createVersion(version) { - return this.bintrayRequest(`${this.basePath}/versions`, this.auth, { - name: version, - }, this.cancellationToken); - } - deleteVersion(version) { - return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken, "DELETE"); - } -} -exports.BintrayClient = BintrayClient; -//# sourceMappingURL=bintray.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js ***! - \*********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.safeStringifyJson = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.configureRequestUrl = exports.configureRequestOptionsFromUrl = exports.HttpExecutor = exports.parseJson = exports.HttpError = exports.createHttpError = void 0; -const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); -const debug_1 = __webpack_require__(/*! debug */ "./node_modules/debug/src/index.js"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -const stream_1 = __webpack_require__(/*! stream */ "stream"); -const url_1 = __webpack_require__(/*! url */ "url"); -const CancellationToken_1 = __webpack_require__(/*! ./CancellationToken */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js"); -const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const ProgressCallbackTransform_1 = __webpack_require__(/*! ./ProgressCallbackTransform */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js"); -const debug = debug_1.default("electron-builder"); -function createHttpError(response, description = null) { - return new HttpError(response.statusCode || -1, `${response.statusCode} ${response.statusMessage}` + - (description == null ? "" : "\n" + JSON.stringify(description, null, " ")) + - "\nHeaders: " + - safeStringifyJson(response.headers), description); -} -exports.createHttpError = createHttpError; -const HTTP_STATUS_CODES = new Map([ - [429, "Too many requests"], - [400, "Bad request"], - [403, "Forbidden"], - [404, "Not found"], - [405, "Method not allowed"], - [406, "Not acceptable"], - [408, "Request timeout"], - [413, "Request entity too large"], - [500, "Internal server error"], - [502, "Bad gateway"], - [503, "Service unavailable"], - [504, "Gateway timeout"], - [505, "HTTP version not supported"], -]); -class HttpError extends Error { - constructor(statusCode, message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`, description = null) { - super(message); - this.statusCode = statusCode; - this.description = description; - this.name = "HttpError"; - this.code = `HTTP_ERROR_${statusCode}`; - } -} -exports.HttpError = HttpError; -function parseJson(result) { - return result.then(it => (it == null || it.length === 0 ? null : JSON.parse(it))); -} -exports.parseJson = parseJson; -class HttpExecutor { - constructor() { - this.maxRedirects = 10; - } - request(options, cancellationToken = new CancellationToken_1.CancellationToken(), data) { - configureRequestOptions(options); - const encodedData = data == null ? undefined : Buffer.from(JSON.stringify(data)); - if (encodedData != null) { - options.method = "post"; - options.headers["Content-Type"] = "application/json"; - options.headers["Content-Length"] = encodedData.length; - } - return this.doApiRequest(options, cancellationToken, it => { - ; - it.end(encodedData); - }); - } - doApiRequest(options, cancellationToken, requestProcessor, redirectCount = 0) { - if (debug.enabled) { - debug(`Request: ${safeStringifyJson(options)}`); - } - return cancellationToken.createPromise((resolve, reject, onCancel) => { - const request = this.createRequest(options, (response) => { - try { - this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor); - } - catch (e) { - reject(e); - } - }); - this.addErrorAndTimeoutHandlers(request, reject); - this.addRedirectHandlers(request, options, reject, redirectCount, options => { - this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject); - }); - requestProcessor(request, reject); - onCancel(() => request.abort()); - }); - } - // noinspection JSUnusedLocalSymbols - // eslint-disable-next-line - addRedirectHandlers(request, options, reject, redirectCount, handler) { - // not required for NodeJS - } - addErrorAndTimeoutHandlers(request, reject) { - this.addTimeOutHandler(request, reject); - request.on("error", reject); - request.on("aborted", () => { - reject(new Error("Request has been aborted by the server")); - }); - } - handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor) { - if (debug.enabled) { - debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(options)}`); - } - // we handle any other >= 400 error on request end (read detailed message in the response body) - if (response.statusCode === 404) { - // error is clear, we don't need to read detailed error description - reject(createHttpError(response, `method: ${options.method || "GET"} url: ${options.protocol || "https:"}//${options.hostname}${options.port ? `:${options.port}` : ""}${options.path} - -Please double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404. -`)); - return; - } - else if (response.statusCode === 204) { - // on DELETE request - resolve(); - return; - } - const redirectUrl = safeGetHeader(response, "location"); - if (redirectUrl != null) { - if (redirectCount > this.maxRedirects) { - reject(this.createMaxRedirectError()); - return; - } - this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject); - return; - } - response.setEncoding("utf8"); - let data = ""; - response.on("error", reject); - response.on("data", (chunk) => (data += chunk)); - response.on("end", () => { - try { - if (response.statusCode != null && response.statusCode >= 400) { - const contentType = safeGetHeader(response, "content-type"); - const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes("json")) != null : contentType.includes("json")); - reject(createHttpError(response, isJson ? JSON.parse(data) : data)); - } - else { - resolve(data.length === 0 ? null : data); - } - } - catch (e) { - reject(e); - } - }); - } - async downloadToBuffer(url, options) { - return await options.cancellationToken.createPromise((resolve, reject, onCancel) => { - let result = null; - const requestOptions = { - headers: options.headers || undefined, - // because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually - redirect: "manual", - }; - configureRequestUrl(url, requestOptions); - configureRequestOptions(requestOptions); - this.doDownload(requestOptions, { - destination: null, - options, - onCancel, - callback: error => { - if (error == null) { - resolve(result); - } - else { - reject(error); - } - }, - responseHandler: (response, callback) => { - const contentLength = safeGetHeader(response, "content-length"); - let position = -1; - if (contentLength != null) { - const size = parseInt(contentLength, 10); - if (size > 0) { - if (size > 524288000) { - callback(new Error("Maximum allowed size is 500 MB")); - return; - } - result = Buffer.alloc(size); - position = 0; - } - } - response.on("data", (chunk) => { - if (position !== -1) { - chunk.copy(result, position); - position += chunk.length; - } - else if (result == null) { - result = chunk; - } - else { - if (result.length > 524288000) { - callback(new Error("Maximum allowed size is 500 MB")); - return; - } - result = Buffer.concat([result, chunk]); - } - }); - response.on("end", () => { - if (result != null && position !== -1 && position !== result.length) { - callback(new Error(`Received data length ${position} is not equal to expected ${result.length}`)); - } - else { - callback(null); - } - }); - }, - }, 0); - }); - } - doDownload(requestOptions, options, redirectCount) { - const request = this.createRequest(requestOptions, (response) => { - if (response.statusCode >= 400) { - options.callback(new Error(`Cannot download "${requestOptions.protocol || "https:"}//${requestOptions.hostname}${requestOptions.path}", status ${response.statusCode}: ${response.statusMessage}`)); - return; - } - // It is possible for the response stream to fail, e.g. when a network is lost while - // response stream is in progress. Stop waiting and reject so consumer can catch the error. - response.on("error", options.callback); - // this code not relevant for Electron (redirect event instead handled) - const redirectUrl = safeGetHeader(response, "location"); - if (redirectUrl != null) { - if (redirectCount < this.maxRedirects) { - this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++); - } - else { - options.callback(this.createMaxRedirectError()); - } - return; - } - if (options.responseHandler == null) { - configurePipes(options, response); - } - else { - options.responseHandler(response, options.callback); - } - }); - this.addErrorAndTimeoutHandlers(request, options.callback); - this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => { - this.doDownload(requestOptions, options, redirectCount++); - }); - request.end(); - } - createMaxRedirectError() { - return new Error(`Too many redirects (> ${this.maxRedirects})`); - } - addTimeOutHandler(request, callback) { - request.on("socket", (socket) => { - socket.setTimeout(60 * 1000, () => { - request.abort(); - callback(new Error("Request timed out")); - }); - }); - } - static prepareRedirectUrlOptions(redirectUrl, options) { - const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options }); - const headers = newOptions.headers; - if (headers != null && headers.authorization != null && headers.authorization.startsWith("token")) { - const parsedNewUrl = new url_1.URL(redirectUrl); - if (parsedNewUrl.hostname.endsWith(".amazonaws.com") || parsedNewUrl.searchParams.has("X-Amz-Credential")) { - delete headers.authorization; - } - } - return newOptions; - } -} -exports.HttpExecutor = HttpExecutor; -function configureRequestOptionsFromUrl(url, options) { - const result = configureRequestOptions(options); - configureRequestUrl(new url_1.URL(url), result); - return result; -} -exports.configureRequestOptionsFromUrl = configureRequestOptionsFromUrl; -function configureRequestUrl(url, options) { - options.protocol = url.protocol; - options.hostname = url.hostname; - if (url.port) { - options.port = url.port; - } - else if (options.port) { - delete options.port; - } - options.path = url.pathname + url.search; -} -exports.configureRequestUrl = configureRequestUrl; -class DigestTransform extends stream_1.Transform { - constructor(expected, algorithm = "sha512", encoding = "base64") { - super(); - this.expected = expected; - this.algorithm = algorithm; - this.encoding = encoding; - this._actual = null; - this.isValidateOnEnd = true; - this.digester = crypto_1.createHash(algorithm); - } - // noinspection JSUnusedGlobalSymbols - get actual() { - return this._actual; - } - // noinspection JSUnusedGlobalSymbols - _transform(chunk, encoding, callback) { - this.digester.update(chunk); - callback(null, chunk); - } - // noinspection JSUnusedGlobalSymbols - _flush(callback) { - this._actual = this.digester.digest(this.encoding); - if (this.isValidateOnEnd) { - try { - this.validate(); - } - catch (e) { - callback(e); - return; - } - } - callback(null); - } - validate() { - if (this._actual == null) { - throw index_1.newError("Not finished yet", "ERR_STREAM_NOT_FINISHED"); - } - if (this._actual !== this.expected) { - throw index_1.newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH"); - } - return null; - } -} -exports.DigestTransform = DigestTransform; -function checkSha2(sha2Header, sha2, callback) { - if (sha2Header != null && sha2 != null && sha2Header !== sha2) { - callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`)); - return false; - } - return true; -} -function safeGetHeader(response, headerKey) { - const value = response.headers[headerKey]; - if (value == null) { - return null; - } - else if (Array.isArray(value)) { - // electron API - return value.length === 0 ? null : value[value.length - 1]; - } - else { - return value; - } -} -exports.safeGetHeader = safeGetHeader; -function configurePipes(options, response) { - if (!checkSha2(safeGetHeader(response, "X-Checksum-Sha2"), options.options.sha2, options.callback)) { - return; - } - const streams = []; - if (options.options.onProgress != null) { - const contentLength = safeGetHeader(response, "content-length"); - if (contentLength != null) { - streams.push(new ProgressCallbackTransform_1.ProgressCallbackTransform(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress)); - } - } - const sha512 = options.options.sha512; - if (sha512 != null) { - streams.push(new DigestTransform(sha512, "sha512", sha512.length === 128 && !sha512.includes("+") && !sha512.includes("Z") && !sha512.includes("=") ? "hex" : "base64")); - } - else if (options.options.sha2 != null) { - streams.push(new DigestTransform(options.options.sha2, "sha256", "hex")); - } - const fileOut = fs_1.createWriteStream(options.destination); - streams.push(fileOut); - let lastStream = response; - for (const stream of streams) { - stream.on("error", (error) => { - if (!options.options.cancellationToken.cancelled) { - options.callback(error); - } - }); - lastStream = lastStream.pipe(stream); - } - fileOut.on("finish", () => { - ; - fileOut.close(options.callback); - }); -} -function configureRequestOptions(options, token, method) { - if (method != null) { - options.method = method; - } - options.headers = { ...options.headers }; - const headers = options.headers; - if (token != null) { - ; - headers.authorization = token.startsWith("Basic") ? token : `token ${token}`; - } - if (headers["User-Agent"] == null) { - headers["User-Agent"] = "electron-builder"; - } - if (method == null || method === "GET" || headers["Cache-Control"] == null) { - headers["Cache-Control"] = "no-cache"; - } - // do not specify for node (in any case we use https module) - if (options.protocol == null && process.versions.electron != null) { - options.protocol = "https:"; - } - return options; -} -exports.configureRequestOptions = configureRequestOptions; -function safeStringifyJson(data, skippedNames) { - return JSON.stringify(data, (name, value) => { - if (name.endsWith("authorization") || - name.endsWith("Password") || - name.endsWith("PASSWORD") || - name.endsWith("Token") || - name.includes("password") || - name.includes("token") || - (skippedNames != null && skippedNames.has(name))) { - return ""; - } - return value; - }, 2); -} -exports.safeStringifyJson = safeStringifyJson; -//# sourceMappingURL=httpExecutor.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.newError = exports.asArray = exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = exports.XElement = exports.parseXml = exports.ProgressCallbackTransform = exports.UUID = exports.parseDn = exports.githubUrl = exports.getS3LikeProviderBaseUrl = exports.configureRequestUrl = exports.parseJson = exports.safeStringifyJson = exports.configureRequestOptionsFromUrl = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.HttpExecutor = exports.createHttpError = exports.HttpError = exports.CancellationError = exports.CancellationToken = void 0; -var CancellationToken_1 = __webpack_require__(/*! ./CancellationToken */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js"); -Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return CancellationToken_1.CancellationToken; } }); -Object.defineProperty(exports, "CancellationError", { enumerable: true, get: function () { return CancellationToken_1.CancellationError; } }); -var httpExecutor_1 = __webpack_require__(/*! ./httpExecutor */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js"); -Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return httpExecutor_1.HttpError; } }); -Object.defineProperty(exports, "createHttpError", { enumerable: true, get: function () { return httpExecutor_1.createHttpError; } }); -Object.defineProperty(exports, "HttpExecutor", { enumerable: true, get: function () { return httpExecutor_1.HttpExecutor; } }); -Object.defineProperty(exports, "DigestTransform", { enumerable: true, get: function () { return httpExecutor_1.DigestTransform; } }); -Object.defineProperty(exports, "safeGetHeader", { enumerable: true, get: function () { return httpExecutor_1.safeGetHeader; } }); -Object.defineProperty(exports, "configureRequestOptions", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptions; } }); -Object.defineProperty(exports, "configureRequestOptionsFromUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptionsFromUrl; } }); -Object.defineProperty(exports, "safeStringifyJson", { enumerable: true, get: function () { return httpExecutor_1.safeStringifyJson; } }); -Object.defineProperty(exports, "parseJson", { enumerable: true, get: function () { return httpExecutor_1.parseJson; } }); -Object.defineProperty(exports, "configureRequestUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestUrl; } }); -var publishOptions_1 = __webpack_require__(/*! ./publishOptions */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js"); -Object.defineProperty(exports, "getS3LikeProviderBaseUrl", { enumerable: true, get: function () { return publishOptions_1.getS3LikeProviderBaseUrl; } }); -Object.defineProperty(exports, "githubUrl", { enumerable: true, get: function () { return publishOptions_1.githubUrl; } }); -var rfc2253Parser_1 = __webpack_require__(/*! ./rfc2253Parser */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js"); -Object.defineProperty(exports, "parseDn", { enumerable: true, get: function () { return rfc2253Parser_1.parseDn; } }); -var uuid_1 = __webpack_require__(/*! ./uuid */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js"); -Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return uuid_1.UUID; } }); -var ProgressCallbackTransform_1 = __webpack_require__(/*! ./ProgressCallbackTransform */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js"); -Object.defineProperty(exports, "ProgressCallbackTransform", { enumerable: true, get: function () { return ProgressCallbackTransform_1.ProgressCallbackTransform; } }); -var xml_1 = __webpack_require__(/*! ./xml */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js"); -Object.defineProperty(exports, "parseXml", { enumerable: true, get: function () { return xml_1.parseXml; } }); -Object.defineProperty(exports, "XElement", { enumerable: true, get: function () { return xml_1.XElement; } }); -// nsis -exports.CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"; -// nsis-web -exports.CURRENT_APP_PACKAGE_FILE_NAME = "package.7z"; -function asArray(v) { - if (v == null) { - return []; - } - else if (Array.isArray(v)) { - return v; - } - else { - return [v]; - } -} -exports.asArray = asArray; -function newError(message, code) { - const error = new Error(message); - error.code = code; - return error; -} -exports.newError = newError; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js ***! - \***********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getS3LikeProviderBaseUrl = exports.githubUrl = void 0; -/** @private */ -function githubUrl(options, defaultHost = "github.com") { - return `${options.protocol || "https"}://${options.host || defaultHost}`; -} -exports.githubUrl = githubUrl; -function getS3LikeProviderBaseUrl(configuration) { - const provider = configuration.provider; - if (provider === "s3") { - return s3Url(configuration); - } - if (provider === "spaces") { - return spacesUrl(configuration); - } - throw new Error(`Not supported provider: ${provider}`); -} -exports.getS3LikeProviderBaseUrl = getS3LikeProviderBaseUrl; -function s3Url(options) { - let url; - if (options.endpoint != null) { - url = `${options.endpoint}/${options.bucket}`; - } - else if (options.bucket.includes(".")) { - if (options.region == null) { - throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`); - } - // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro - if (options.region === "us-east-1") { - url = `https://s3.amazonaws.com/${options.bucket}`; - } - else { - url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`; - } - } - else if (options.region === "cn-north-1") { - url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`; - } - else { - url = `https://${options.bucket}.s3.amazonaws.com`; - } - return appendPath(url, options.path); -} -function appendPath(url, p) { - if (p != null && p.length > 0) { - if (!p.startsWith("/")) { - url += "/"; - } - url += p; - } - return url; -} -function spacesUrl(options) { - if (options.name == null) { - throw new Error(`name is missing`); - } - if (options.region == null) { - throw new Error(`region is missing`); - } - return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path); -} -//# sourceMappingURL=publishOptions.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js ***! - \**********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseDn = void 0; -function parseDn(seq) { - let quoted = false; - let key = null; - let token = ""; - let nextNonSpace = 0; - seq = seq.trim(); - const result = new Map(); - for (let i = 0; i <= seq.length; i++) { - if (i === seq.length) { - if (key !== null) { - result.set(key, token); - } - break; - } - const ch = seq[i]; - if (quoted) { - if (ch === '"') { - quoted = false; - continue; - } - } - else { - if (ch === '"') { - quoted = true; - continue; - } - if (ch === "\\") { - i++; - const ord = parseInt(seq.slice(i, i + 2), 16); - if (Number.isNaN(ord)) { - token += seq[i]; - } - else { - i++; - token += String.fromCharCode(ord); - } - continue; - } - if (key === null && ch === "=") { - key = token; - token = ""; - continue; - } - if (ch === "," || ch === ";" || ch === "+") { - if (key !== null) { - result.set(key, token); - } - key = null; - token = ""; - continue; - } - } - if (ch === " " && !quoted) { - if (token.length === 0) { - continue; - } - if (i > nextNonSpace) { - let j = i; - while (seq[j] === " ") { - j++; - } - nextNonSpace = j; - } - if (nextNonSpace >= seq.length || - seq[nextNonSpace] === "," || - seq[nextNonSpace] === ";" || - (key === null && seq[nextNonSpace] === "=") || - (key !== null && seq[nextNonSpace] === "+")) { - i = nextNonSpace - 1; - continue; - } - } - token += ch; - } - return result; -} -exports.parseDn = parseDn; -//# sourceMappingURL=rfc2253Parser.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js ***! - \*************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.nil = exports.UUID = void 0; -const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); -const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const invalidName = "options.name must be either a string or a Buffer"; -// Node ID according to rfc4122#section-4.5 -const randomHost = crypto_1.randomBytes(16); -randomHost[0] = randomHost[0] | 0x01; -// lookup table hex to byte -const hex2byte = {}; -// lookup table byte to hex -const byte2hex = []; -// populate lookup tables -for (let i = 0; i < 256; i++) { - const hex = (i + 0x100).toString(16).substr(1); - hex2byte[hex] = i; - byte2hex[i] = hex; -} -// UUID class -class UUID { - constructor(uuid) { - this.ascii = null; - this.binary = null; - const check = UUID.check(uuid); - if (!check) { - throw new Error("not a UUID"); - } - this.version = check.version; - if (check.format === "ascii") { - this.ascii = uuid; - } - else { - this.binary = uuid; - } - } - static v5(name, namespace) { - return uuidNamed(name, "sha1", 0x50, namespace); - } - toString() { - if (this.ascii == null) { - this.ascii = stringify(this.binary); - } - return this.ascii; - } - inspect() { - return `UUID v${this.version} ${this.toString()}`; - } - static check(uuid, offset = 0) { - if (typeof uuid === "string") { - uuid = uuid.toLowerCase(); - if (!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(uuid)) { - return false; - } - if (uuid === "00000000-0000-0000-0000-000000000000") { - return { version: undefined, variant: "nil", format: "ascii" }; - } - return { - version: (hex2byte[uuid[14] + uuid[15]] & 0xf0) >> 4, - variant: getVariant((hex2byte[uuid[19] + uuid[20]] & 0xe0) >> 5), - format: "ascii", - }; - } - if (Buffer.isBuffer(uuid)) { - if (uuid.length < offset + 16) { - return false; - } - let i = 0; - for (; i < 16; i++) { - if (uuid[offset + i] !== 0) { - break; - } - } - if (i === 16) { - return { version: undefined, variant: "nil", format: "binary" }; - } - return { - version: (uuid[offset + 6] & 0xf0) >> 4, - variant: getVariant((uuid[offset + 8] & 0xe0) >> 5), - format: "binary", - }; - } - throw index_1.newError("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE"); - } - // read stringified uuid into a Buffer - static parse(input) { - const buffer = Buffer.allocUnsafe(16); - let j = 0; - for (let i = 0; i < 16; i++) { - buffer[i] = hex2byte[input[j++] + input[j++]]; - if (i === 3 || i === 5 || i === 7 || i === 9) { - j += 1; - } - } - return buffer; - } -} -exports.UUID = UUID; -// from rfc4122#appendix-C -UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"); -// according to rfc4122#section-4.1.1 -function getVariant(bits) { - switch (bits) { - case 0: - case 1: - case 3: - return "ncs"; - case 4: - case 5: - return "rfc4122"; - case 6: - return "microsoft"; - default: - return "future"; - } -} -var UuidEncoding; -(function (UuidEncoding) { - UuidEncoding[UuidEncoding["ASCII"] = 0] = "ASCII"; - UuidEncoding[UuidEncoding["BINARY"] = 1] = "BINARY"; - UuidEncoding[UuidEncoding["OBJECT"] = 2] = "OBJECT"; -})(UuidEncoding || (UuidEncoding = {})); -// v3 + v5 -function uuidNamed(name, hashMethod, version, namespace, encoding = UuidEncoding.ASCII) { - const hash = crypto_1.createHash(hashMethod); - const nameIsNotAString = typeof name !== "string"; - if (nameIsNotAString && !Buffer.isBuffer(name)) { - throw index_1.newError(invalidName, "ERR_INVALID_UUID_NAME"); - } - hash.update(namespace); - hash.update(name); - const buffer = hash.digest(); - let result; - switch (encoding) { - case UuidEncoding.BINARY: - buffer[6] = (buffer[6] & 0x0f) | version; - buffer[8] = (buffer[8] & 0x3f) | 0x80; - result = buffer; - break; - case UuidEncoding.OBJECT: - buffer[6] = (buffer[6] & 0x0f) | version; - buffer[8] = (buffer[8] & 0x3f) | 0x80; - result = new UUID(buffer); - break; - default: - result = - byte2hex[buffer[0]] + - byte2hex[buffer[1]] + - byte2hex[buffer[2]] + - byte2hex[buffer[3]] + - "-" + - byte2hex[buffer[4]] + - byte2hex[buffer[5]] + - "-" + - byte2hex[(buffer[6] & 0x0f) | version] + - byte2hex[buffer[7]] + - "-" + - byte2hex[(buffer[8] & 0x3f) | 0x80] + - byte2hex[buffer[9]] + - "-" + - byte2hex[buffer[10]] + - byte2hex[buffer[11]] + - byte2hex[buffer[12]] + - byte2hex[buffer[13]] + - byte2hex[buffer[14]] + - byte2hex[buffer[15]]; - break; - } - return result; -} -function stringify(buffer) { - return (byte2hex[buffer[0]] + - byte2hex[buffer[1]] + - byte2hex[buffer[2]] + - byte2hex[buffer[3]] + - "-" + - byte2hex[buffer[4]] + - byte2hex[buffer[5]] + - "-" + - byte2hex[buffer[6]] + - byte2hex[buffer[7]] + - "-" + - byte2hex[buffer[8]] + - byte2hex[buffer[9]] + - "-" + - byte2hex[buffer[10]] + - byte2hex[buffer[11]] + - byte2hex[buffer[12]] + - byte2hex[buffer[13]] + - byte2hex[buffer[14]] + - byte2hex[buffer[15]]); -} -// according to rfc4122#section-4.1.7 -exports.nil = new UUID("00000000-0000-0000-0000-000000000000"); -// UUID.v4 = uuidRandom -// UUID.v4fast = uuidRandomFast -// UUID.v3 = function(options, callback) { -// return uuidNamed("md5", 0x30, options, callback) -// } -//# sourceMappingURL=uuid.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseXml = exports.XElement = void 0; -const sax = __webpack_require__(/*! sax */ "./node_modules/sax/lib/sax.js"); -const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -class XElement { - constructor(name) { - this.name = name; - this.value = ""; - this.attributes = null; - this.isCData = false; - this.elements = null; - if (!name) { - throw index_1.newError("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY"); - } - if (!isValidName(name)) { - throw index_1.newError(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME"); - } - } - attribute(name) { - const result = this.attributes === null ? null : this.attributes[name]; - if (result == null) { - throw index_1.newError(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE"); - } - return result; - } - removeAttribute(name) { - if (this.attributes !== null) { - delete this.attributes[name]; - } - } - element(name, ignoreCase = false, errorIfMissed = null) { - const result = this.elementOrNull(name, ignoreCase); - if (result === null) { - throw index_1.newError(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT"); - } - return result; - } - elementOrNull(name, ignoreCase = false) { - if (this.elements === null) { - return null; - } - for (const element of this.elements) { - if (isNameEquals(element, name, ignoreCase)) { - return element; - } - } - return null; - } - getElements(name, ignoreCase = false) { - if (this.elements === null) { - return []; - } - return this.elements.filter(it => isNameEquals(it, name, ignoreCase)); - } - elementValueOrEmpty(name, ignoreCase = false) { - const element = this.elementOrNull(name, ignoreCase); - return element === null ? "" : element.value; - } -} -exports.XElement = XElement; -const NAME_REG_EXP = new RegExp(/^[A-Za-z_][:A-Za-z0-9_-]*$/i); -function isValidName(name) { - return NAME_REG_EXP.test(name); -} -function isNameEquals(element, name, ignoreCase) { - const elementName = element.name; - return elementName === name || (ignoreCase === true && elementName.length === name.length && elementName.toLowerCase() === name.toLowerCase()); -} -function parseXml(data) { - let rootElement = null; - const parser = sax.parser(true, {}); - const elements = []; - parser.onopentag = saxElement => { - const element = new XElement(saxElement.name); - element.attributes = saxElement.attributes; - if (rootElement === null) { - rootElement = element; - } - else { - const parent = elements[elements.length - 1]; - if (parent.elements == null) { - parent.elements = []; - } - parent.elements.push(element); - } - elements.push(element); - }; - parser.onclosetag = () => { - elements.pop(); - }; - parser.ontext = text => { - if (elements.length > 0) { - elements[elements.length - 1].value = text; - } - }; - parser.oncdata = cdata => { - const element = elements[elements.length - 1]; - element.value = cdata; - element.isCData = true; - }; - parser.onerror = err => { - throw err; - }; - parser.write(data); - return rootElement; -} -exports.parseXml = parseXml; -//# sourceMappingURL=xml.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/classes/comparator.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - const sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - const sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - const sameSemVer = this.semver.version === comp.semver.version - const differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - const oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<') - const oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>') - - return ( - sameDirectionIncreasing || - sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || - oppositeDirectionsGreaterThan - ) - } -} - -module.exports = Comparator - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") -const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") -const cmp = __webpack_require__(/*! ../functions/cmp */ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js") -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") -const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ./range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/classes/range.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/classes/range.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range - .split(/\s*\|\|\s*/) - // map the range to a 2d array of comparators - .map(range => this.parseRange(range.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) - this.set = [first] - else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.format() - } - - format () { - this.range = this.set - .map((comps) => { - return comps.join(' ').trim() - }) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - range = range.trim() - - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = Object.keys(this.options).join(',') - const memoKey = `parseRange:${memoOpts}:${range}` - const cached = cache.get(memoKey) - if (cached) - return cached - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - // in loose mode, throw out any that are not valid comparators - .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) - .map(comp => new Comparator(comp, this.options)) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const l = rangeList.length - const rangeMap = new Map() - for (const comp of rangeList) { - if (isNullSet(comp)) - return [comp] - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) - rangeMap.delete('') - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} -module.exports = Range - -const LRU = __webpack_require__(/*! lru-cache */ "./node_modules/lru-cache/index.js") -const cache = new LRU({ max: 1000 }) - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") -const Comparator = __webpack_require__(/*! ./comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") -const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace -} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceTilde(comp, options) - }).join(' ') - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceCaret(comp, options) - }).join(' ') - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((comp) => { - return replaceXRange(comp, options) - }).join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') - pr = '-0' - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp.trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return (`${from} ${to}`).trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/classes/semver.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/classes/semver.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") -const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") -const { compareIdentifiers } = __webpack_require__(/*! ../internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js") -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid Version: ${version}`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.format() - this.raw = this.version - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/clean.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/clean.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/cmp.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js") -const neq = __webpack_require__(/*! ./neq */ "./node_modules/electron-updater/node_modules/semver/functions/neq.js") -const gt = __webpack_require__(/*! ./gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") -const gte = __webpack_require__(/*! ./gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js") -const lt = __webpack_require__(/*! ./lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js") -const lte = __webpack_require__(/*! ./lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js") - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/coerce.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/coerce.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") -const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - let next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) - return null - - return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) -} -module.exports = coerce - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/compare-build.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare.js": -/*!********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/compare.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/diff.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/diff.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") -const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js") - -const diff = (version1, version2) => { - if (eq(version1, version2)) { - return null - } else { - const v1 = parse(version1) - const v2 = parse(version2) - const hasPre = v1.prerelease.length || v2.prerelease.length - const prefix = hasPre ? 'pre' : '' - const defaultResult = hasPre ? 'prerelease' : '' - for (const key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} -module.exports = diff - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/eq.js": -/*!***************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/eq.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/gt.js": -/*!***************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/gt.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/gte.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/gte.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/inc.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/inc.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") - -const inc = (version, release, options, identifier) => { - if (typeof (options) === 'string') { - identifier = options - options = undefined - } - - try { - return new SemVer(version, options).inc(release, identifier).version - } catch (er) { - return null - } -} -module.exports = inc - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/lt.js": -/*!***************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/lt.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/lte.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/lte.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/major.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/major.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/minor.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/minor.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/neq.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/neq.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/parse.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/parse.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const {MAX_LENGTH} = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") -const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") - -const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") -const parse = (version, options) => { - options = parseOptions(options) - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - const r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -module.exports = parse - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/patch.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/patch.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/prerelease.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/prerelease.js ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/rcompare.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/rcompare.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/rsort.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/rsort.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js") -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/satisfies.js ***! - \**********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/sort.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/sort.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js") -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/functions/valid.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/functions/valid.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/index.js": -/*!********************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/index.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __webpack_require__(/*! ./internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") -module.exports = { - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: __webpack_require__(/*! ./internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js").SEMVER_SPEC_VERSION, - SemVer: __webpack_require__(/*! ./classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js"), - compareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js").compareIdentifiers, - rcompareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js").rcompareIdentifiers, - parse: __webpack_require__(/*! ./functions/parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js"), - valid: __webpack_require__(/*! ./functions/valid */ "./node_modules/electron-updater/node_modules/semver/functions/valid.js"), - clean: __webpack_require__(/*! ./functions/clean */ "./node_modules/electron-updater/node_modules/semver/functions/clean.js"), - inc: __webpack_require__(/*! ./functions/inc */ "./node_modules/electron-updater/node_modules/semver/functions/inc.js"), - diff: __webpack_require__(/*! ./functions/diff */ "./node_modules/electron-updater/node_modules/semver/functions/diff.js"), - major: __webpack_require__(/*! ./functions/major */ "./node_modules/electron-updater/node_modules/semver/functions/major.js"), - minor: __webpack_require__(/*! ./functions/minor */ "./node_modules/electron-updater/node_modules/semver/functions/minor.js"), - patch: __webpack_require__(/*! ./functions/patch */ "./node_modules/electron-updater/node_modules/semver/functions/patch.js"), - prerelease: __webpack_require__(/*! ./functions/prerelease */ "./node_modules/electron-updater/node_modules/semver/functions/prerelease.js"), - compare: __webpack_require__(/*! ./functions/compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js"), - rcompare: __webpack_require__(/*! ./functions/rcompare */ "./node_modules/electron-updater/node_modules/semver/functions/rcompare.js"), - compareLoose: __webpack_require__(/*! ./functions/compare-loose */ "./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js"), - compareBuild: __webpack_require__(/*! ./functions/compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js"), - sort: __webpack_require__(/*! ./functions/sort */ "./node_modules/electron-updater/node_modules/semver/functions/sort.js"), - rsort: __webpack_require__(/*! ./functions/rsort */ "./node_modules/electron-updater/node_modules/semver/functions/rsort.js"), - gt: __webpack_require__(/*! ./functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js"), - lt: __webpack_require__(/*! ./functions/lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js"), - eq: __webpack_require__(/*! ./functions/eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js"), - neq: __webpack_require__(/*! ./functions/neq */ "./node_modules/electron-updater/node_modules/semver/functions/neq.js"), - gte: __webpack_require__(/*! ./functions/gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js"), - lte: __webpack_require__(/*! ./functions/lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js"), - cmp: __webpack_require__(/*! ./functions/cmp */ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js"), - coerce: __webpack_require__(/*! ./functions/coerce */ "./node_modules/electron-updater/node_modules/semver/functions/coerce.js"), - Comparator: __webpack_require__(/*! ./classes/comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js"), - Range: __webpack_require__(/*! ./classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js"), - satisfies: __webpack_require__(/*! ./functions/satisfies */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js"), - toComparators: __webpack_require__(/*! ./ranges/to-comparators */ "./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js"), - maxSatisfying: __webpack_require__(/*! ./ranges/max-satisfying */ "./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js"), - minSatisfying: __webpack_require__(/*! ./ranges/min-satisfying */ "./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js"), - minVersion: __webpack_require__(/*! ./ranges/min-version */ "./node_modules/electron-updater/node_modules/semver/ranges/min-version.js"), - validRange: __webpack_require__(/*! ./ranges/valid */ "./node_modules/electron-updater/node_modules/semver/ranges/valid.js"), - outside: __webpack_require__(/*! ./ranges/outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js"), - gtr: __webpack_require__(/*! ./ranges/gtr */ "./node_modules/electron-updater/node_modules/semver/ranges/gtr.js"), - ltr: __webpack_require__(/*! ./ranges/ltr */ "./node_modules/electron-updater/node_modules/semver/ranges/ltr.js"), - intersects: __webpack_require__(/*! ./ranges/intersects */ "./node_modules/electron-updater/node_modules/semver/ranges/intersects.js"), - simplifyRange: __webpack_require__(/*! ./ranges/simplify */ "./node_modules/electron-updater/node_modules/semver/ranges/simplify.js"), - subset: __webpack_require__(/*! ./ranges/subset */ "./node_modules/electron-updater/node_modules/semver/ranges/subset.js"), -} - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/internal/constants.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/internal/constants.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -module.exports = { - SEMVER_SPEC_VERSION, - MAX_LENGTH, - MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH -} - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/internal/debug.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/internal/debug.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/internal/identifiers.js ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers -} - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/internal/parse-options.js ***! - \*************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// parse out just the options we care about so we always get a consistent -// obj with keys in a consistent order. -const opts = ['includePrerelease', 'loose', 'rtl'] -const parseOptions = options => - !options ? {} - : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((options, k) => { - options[k] = true - return options - }, {}) -module.exports = parseOptions - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/internal/re.js": -/*!**************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/internal/re.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(/*! ./constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") -const debug = __webpack_require__(/*! ./debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 - -const createToken = (name, value, isGlobal) => { - const index = R++ - debug(index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/gtr.js": -/*!*************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/gtr.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Determine if version is greater than all the versions possible in the range. -const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js") -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/intersects.js": -/*!********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/intersects.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} -module.exports = intersects - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/ltr.js": -/*!*************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/ltr.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js") -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/min-version.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/min-version.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) - minver = setMin - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/outside.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") -const Comparator = __webpack_require__(/*! ../classes/comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") -const {ANY} = Comparator -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const satisfies = __webpack_require__(/*! ../functions/satisfies */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") -const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") -const lt = __webpack_require__(/*! ../functions/lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js") -const lte = __webpack_require__(/*! ../functions/lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js") -const gte = __webpack_require__(/*! ../functions/gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js") - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/simplify.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/simplify.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") -const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") -module.exports = (versions, range, options) => { - const set = [] - let min = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!min) - min = version - } else { - if (prev) { - set.push([min, prev]) - } - prev = null - min = null - } - } - if (min) - set.push([min, null]) - - const ranges = [] - for (const [min, max] of set) { - if (min === max) - ranges.push(min) - else if (!max && min === v[0]) - ranges.push('*') - else if (!max) - ranges.push(`>=${min}`) - else if (min === v[0]) - ranges.push(`<=${max}`) - else - ranges.push(`${min} - ${max}`) - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/subset.js": -/*!****************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/subset.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range.js */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const Comparator = __webpack_require__(/*! ../classes/comparator.js */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") -const { ANY } = Comparator -const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") -const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) - return true - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) - continue OUTER - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) - return false - } - return true -} - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) - return true - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) - return true - else if (options.includePrerelease) - sub = [ new Comparator('>=0.0.0-0') ] - else - sub = [ new Comparator('>=0.0.0') ] - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) - return true - else - dom = [ new Comparator('>=0.0.0') ] - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') - gt = higherGT(gt, c, options) - else if (c.operator === '<' || c.operator === '<=') - lt = lowerLT(lt, c, options) - else - eqSet.add(c.semver) - } - - if (eqSet.size > 1) - return null - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) - return null - else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) - return null - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) - return null - - if (lt && !satisfies(eq, String(lt), options)) - return null - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) - return false - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) - return false - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) - return false - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) - return false - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) - return false - } - if (!c.operator && (lt || gt) && gtltComp !== 0) - return false - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) - return false - - if (lt && hasDomGT && !gt && gtltComp !== 0) - return false - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) - return false - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) - return b - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) - return b - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js": -/*!************************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators - - -/***/ }), - -/***/ "./node_modules/electron-updater/node_modules/semver/ranges/valid.js": -/*!***************************************************************************!*\ - !*** ./node_modules/electron-updater/node_modules/semver/ranges/valid.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange - - -/***/ }), - -/***/ "./node_modules/electron-updater/out/AppAdapter.js": -/*!*********************************************************!*\ - !*** ./node_modules/electron-updater/out/AppAdapter.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAppCacheDir = void 0; -const path = __webpack_require__(/*! path */ "path"); -const os_1 = __webpack_require__(/*! os */ "os"); -function getAppCacheDir() { - const homedir = os_1.homedir(); - // https://github.com/electron/electron/issues/1404#issuecomment-194391247 - let result; - if (process.platform === "win32") { - result = process.env.LOCALAPPDATA || path.join(homedir, "AppData", "Local"); - } - else if (process.platform === "darwin") { - result = path.join(homedir, "Library", "Application Support", "Caches"); - } - else { - result = process.env.XDG_CACHE_HOME || path.join(homedir, ".cache"); - } - return result; -} -exports.getAppCacheDir = getAppCacheDir; -//# sourceMappingURL=AppAdapter.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/AppImageUpdater.js": -/*!**************************************************************!*\ - !*** ./node_modules/electron-updater/out/AppImageUpdater.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AppImageUpdater = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -const path = __webpack_require__(/*! path */ "path"); -const BaseUpdater_1 = __webpack_require__(/*! ./BaseUpdater */ "./node_modules/electron-updater/out/BaseUpdater.js"); -const FileWithEmbeddedBlockMapDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js"); -const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); -const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -class AppImageUpdater extends BaseUpdater_1.BaseUpdater { - constructor(options, app) { - super(options, app); - } - isUpdaterActive() { - if (process.env.APPIMAGE == null) { - if (process.env.SNAP == null) { - this._logger.warn("APPIMAGE env is not defined, current application is not an AppImage"); - } - else { - this._logger.info("SNAP env is defined, updater is disabled"); - } - return false; - } - return super.isUpdaterActive(); - } - /*** @private */ - doDownloadUpdate(downloadUpdateOptions) { - const provider = downloadUpdateOptions.updateInfoAndProvider.provider; - const fileInfo = Provider_1.findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "AppImage"); - return this.executeDownload({ - fileExtension: "AppImage", - fileInfo, - downloadUpdateOptions, - task: async (updateFile, downloadOptions) => { - const oldFile = process.env.APPIMAGE; - if (oldFile == null) { - throw builder_util_runtime_1.newError("APPIMAGE env is not defined", "ERR_UPDATER_OLD_FILE_NOT_FOUND"); - } - let isDownloadFull = false; - try { - const downloadOptions = { - newUrl: fileInfo.url, - oldFile, - logger: this._logger, - newFile: updateFile, - isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, - requestHeaders: downloadUpdateOptions.requestHeaders, - cancellationToken: downloadUpdateOptions.cancellationToken, - }; - if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { - downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); - } - await new FileWithEmbeddedBlockMapDifferentialDownloader_1.FileWithEmbeddedBlockMapDifferentialDownloader(fileInfo.info, this.httpExecutor, downloadOptions).download(); - } - catch (e) { - this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); - // during test (developer machine mac) we must throw error - isDownloadFull = process.platform === "linux"; - } - if (isDownloadFull) { - await this.httpExecutor.download(fileInfo.url, updateFile, downloadOptions); - } - await fs_extra_1.chmod(updateFile, 0o755); - }, - }); - } - doInstall(options) { - const appImageFile = process.env.APPIMAGE; - if (appImageFile == null) { - throw builder_util_runtime_1.newError("APPIMAGE env is not defined", "ERR_UPDATER_OLD_FILE_NOT_FOUND"); - } - // https://stackoverflow.com/a/1712051/1910191 - fs_1.unlinkSync(appImageFile); - let destination; - const existingBaseName = path.basename(appImageFile); - // https://github.com/electron-userland/electron-builder/issues/2964 - // if no version in existing file name, it means that user wants to preserve current custom name - if (path.basename(options.installerPath) === existingBaseName || !/\d+\.\d+\.\d+/.test(existingBaseName)) { - // no version in the file name, overwrite existing - destination = appImageFile; - } - else { - destination = path.join(path.dirname(appImageFile), path.basename(options.installerPath)); - } - child_process_1.execFileSync("mv", ["-f", options.installerPath, destination]); - if (destination !== appImageFile) { - this.emit("appimage-filename-updated", destination); - } - const env = { - ...process.env, - APPIMAGE_SILENT_INSTALL: "true", - }; - if (options.isForceRunAfter) { - child_process_1.spawn(destination, [], { - detached: true, - stdio: "ignore", - env, - }).unref(); - } - else { - env.APPIMAGE_EXIT_AFTER_INSTALL = "true"; - child_process_1.execFileSync(destination, [], { env }); - } - return true; - } -} -exports.AppImageUpdater = AppImageUpdater; -//# sourceMappingURL=AppImageUpdater.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/AppUpdater.js": -/*!*********************************************************!*\ - !*** ./node_modules/electron-updater/out/AppUpdater.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoOpLogger = exports.AppUpdater = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); -const events_1 = __webpack_require__(/*! events */ "events"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); -const lazy_val_1 = __webpack_require__(/*! lazy-val */ "./node_modules/lazy-val/out/main.js"); -const path = __webpack_require__(/*! path */ "path"); -const semver_1 = __webpack_require__(/*! semver */ "./node_modules/electron-updater/node_modules/semver/index.js"); -const DownloadedUpdateHelper_1 = __webpack_require__(/*! ./DownloadedUpdateHelper */ "./node_modules/electron-updater/out/DownloadedUpdateHelper.js"); -const ElectronAppAdapter_1 = __webpack_require__(/*! ./ElectronAppAdapter */ "./node_modules/electron-updater/out/ElectronAppAdapter.js"); -const electronHttpExecutor_1 = __webpack_require__(/*! ./electronHttpExecutor */ "./node_modules/electron-updater/out/electronHttpExecutor.js"); -const GenericProvider_1 = __webpack_require__(/*! ./providers/GenericProvider */ "./node_modules/electron-updater/out/providers/GenericProvider.js"); -const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); -const providerFactory_1 = __webpack_require__(/*! ./providerFactory */ "./node_modules/electron-updater/out/providerFactory.js"); -class AppUpdater extends events_1.EventEmitter { - constructor(options, app) { - super(); - /** - * Whether to automatically download an update when it is found. - */ - this.autoDownload = true; - /** - * Whether to automatically install a downloaded update on app quit (if `quitAndInstall` was not called before). - */ - this.autoInstallOnAppQuit = true; - /** - * *GitHub provider only.* Whether to allow update to pre-release versions. Defaults to `true` if application version contains prerelease components (e.g. `0.12.1-alpha.1`, here `alpha` is a prerelease component), otherwise `false`. - * - * If `true`, downgrade will be allowed (`allowDowngrade` will be set to `true`). - */ - this.allowPrerelease = false; - /** - * *GitHub provider only.* Get all release notes (from current version to latest), not just the latest. - * @default false - */ - this.fullChangelog = false; - /** - * Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel). - * - * Taken in account only if channel differs (pre-release version component in terms of semantic versioning). - * - * @default false - */ - this.allowDowngrade = false; - this._channel = null; - this.downloadedUpdateHelper = null; - /** - * The request headers. - */ - this.requestHeaders = null; - this._logger = console; - // noinspection JSUnusedGlobalSymbols - /** - * For type safety you can use signals, e.g. `autoUpdater.signals.updateDownloaded(() => {})` instead of `autoUpdater.on('update-available', () => {})` - */ - this.signals = new main_1.UpdaterSignal(this); - this._appUpdateConfigPath = null; - this.clientPromise = null; - this.stagingUserIdPromise = new lazy_val_1.Lazy(() => this.getOrCreateStagingUserId()); - // public, allow to read old config for anyone - /** @internal */ - this.configOnDisk = new lazy_val_1.Lazy(() => this.loadUpdateConfig()); - this.checkForUpdatesPromise = null; - this.updateInfoAndProvider = null; - /** - * @private - * @internal - */ - this._testOnlyOptions = null; - this.on("error", (error) => { - this._logger.error(`Error: ${error.stack || error.message}`); - }); - if (app == null) { - this.app = new ElectronAppAdapter_1.ElectronAppAdapter(); - this.httpExecutor = new electronHttpExecutor_1.ElectronHttpExecutor((authInfo, callback) => this.emit("login", authInfo, callback)); - } - else { - this.app = app; - this.httpExecutor = null; - } - const currentVersionString = this.app.version; - const currentVersion = semver_1.parse(currentVersionString); - if (currentVersion == null) { - throw builder_util_runtime_1.newError(`App version is not a valid semver version: "${currentVersionString}"`, "ERR_UPDATER_INVALID_VERSION"); - } - this.currentVersion = currentVersion; - this.allowPrerelease = hasPrereleaseComponents(currentVersion); - if (options != null) { - this.setFeedURL(options); - if (typeof options !== "string" && options.requestHeaders) { - this.requestHeaders = options.requestHeaders; - } - } - } - /** - * Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set. - */ - get channel() { - return this._channel; - } - /** - * Set the update channel. Not applicable for GitHub. Overrides `channel` in the update configuration. - * - * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after. - */ - set channel(value) { - if (this._channel != null) { - // noinspection SuspiciousTypeOfGuard - if (typeof value !== "string") { - throw builder_util_runtime_1.newError(`Channel must be a string, but got: ${value}`, "ERR_UPDATER_INVALID_CHANNEL"); - } - else if (value.length === 0) { - throw builder_util_runtime_1.newError(`Channel must be not an empty string`, "ERR_UPDATER_INVALID_CHANNEL"); - } - } - this._channel = value; - this.allowDowngrade = true; - } - // noinspection JSMethodCanBeStatic,JSUnusedGlobalSymbols - get netSession() { - return electronHttpExecutor_1.getNetSession(); - } - /** - * The logger. You can pass [electron-log](https://github.com/megahertz/electron-log), [winston](https://github.com/winstonjs/winston) or another logger with the following interface: `{ info(), warn(), error() }`. - * Set it to `null` if you would like to disable a logging feature. - */ - get logger() { - return this._logger; - } - set logger(value) { - this._logger = value == null ? new NoOpLogger() : value; - } - // noinspection JSUnusedGlobalSymbols - /** - * test only - * @private - */ - set updateConfigPath(value) { - this.clientPromise = null; - this._appUpdateConfigPath = value; - this.configOnDisk = new lazy_val_1.Lazy(() => this.loadUpdateConfig()); - } - //noinspection JSMethodCanBeStatic,JSUnusedGlobalSymbols - getFeedURL() { - return "Deprecated. Do not use it."; - } - /** - * Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish#genericserveroptions) will be set with value as `url`. - * @param options If you want to override configuration in the `app-update.yml`. - */ - setFeedURL(options) { - const runtimeOptions = this.createProviderRuntimeOptions(); - // https://github.com/electron-userland/electron-builder/issues/1105 - let provider; - if (typeof options === "string") { - provider = new GenericProvider_1.GenericProvider({ provider: "generic", url: options }, this, { - ...runtimeOptions, - isUseMultipleRangeRequest: providerFactory_1.isUrlProbablySupportMultiRangeRequests(options), - }); - } - else { - provider = providerFactory_1.createClient(options, this, runtimeOptions); - } - this.clientPromise = Promise.resolve(provider); - } - /** - * Asks the server whether there is an update. - */ - checkForUpdates() { - let checkForUpdatesPromise = this.checkForUpdatesPromise; - if (checkForUpdatesPromise != null) { - this._logger.info("Checking for update (already in progress)"); - return checkForUpdatesPromise; - } - const nullizePromise = () => (this.checkForUpdatesPromise = null); - this._logger.info("Checking for update"); - checkForUpdatesPromise = this.doCheckForUpdates() - .then(it => { - nullizePromise(); - return it; - }) - .catch(e => { - nullizePromise(); - this.emit("error", e, `Cannot check for updates: ${(e.stack || e).toString()}`); - throw e; - }); - this.checkForUpdatesPromise = checkForUpdatesPromise; - return checkForUpdatesPromise; - } - isUpdaterActive() { - if (!this.app.isPackaged) { - this._logger.info("Skip checkForUpdatesAndNotify because application is not packed"); - return false; - } - return true; - } - // noinspection JSUnusedGlobalSymbols - checkForUpdatesAndNotify(downloadNotification) { - if (!this.isUpdaterActive()) { - return Promise.resolve(null); - } - return this.checkForUpdates().then(it => { - const downloadPromise = it.downloadPromise; - if (downloadPromise == null) { - if (this._logger.debug != null) { - this._logger.debug("checkForUpdatesAndNotify called, downloadPromise is null"); - } - return it; - } - void downloadPromise.then(() => { - const notificationContent = AppUpdater.formatDownloadNotification(it.updateInfo.version, this.app.name, downloadNotification); - new (__webpack_require__(/*! electron */ "electron").Notification)(notificationContent).show(); - }); - return it; - }); - } - static formatDownloadNotification(version, appName, downloadNotification) { - if (downloadNotification == null) { - downloadNotification = { - title: "A new update is ready to install", - body: `{appName} version {version} has been downloaded and will be automatically installed on exit`, - }; - } - downloadNotification = { - title: downloadNotification.title.replace("{appName}", appName).replace("{version}", version), - body: downloadNotification.body.replace("{appName}", appName).replace("{version}", version), - }; - return downloadNotification; - } - async isStagingMatch(updateInfo) { - const rawStagingPercentage = updateInfo.stagingPercentage; - let stagingPercentage = rawStagingPercentage; - if (stagingPercentage == null) { - return true; - } - stagingPercentage = parseInt(stagingPercentage, 10); - if (isNaN(stagingPercentage)) { - this._logger.warn(`Staging percentage is NaN: ${rawStagingPercentage}`); - return true; - } - // convert from user 0-100 to internal 0-1 - stagingPercentage = stagingPercentage / 100; - const stagingUserId = await this.stagingUserIdPromise.value; - const val = builder_util_runtime_1.UUID.parse(stagingUserId).readUInt32BE(12); - const percentage = val / 0xffffffff; - this._logger.info(`Staging percentage: ${stagingPercentage}, percentage: ${percentage}, user id: ${stagingUserId}`); - return percentage < stagingPercentage; - } - computeFinalHeaders(headers) { - if (this.requestHeaders != null) { - Object.assign(headers, this.requestHeaders); - } - return headers; - } - async isUpdateAvailable(updateInfo) { - const latestVersion = semver_1.parse(updateInfo.version); - if (latestVersion == null) { - throw builder_util_runtime_1.newError(`This file could not be downloaded, or the latest version (from update server) does not have a valid semver version: "${updateInfo.version}"`, "ERR_UPDATER_INVALID_VERSION"); - } - const currentVersion = this.currentVersion; - if (semver_1.eq(latestVersion, currentVersion)) { - return false; - } - const isStagingMatch = await this.isStagingMatch(updateInfo); - if (!isStagingMatch) { - return false; - } - // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405033227 - // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405030797 - const isLatestVersionNewer = semver_1.gt(latestVersion, currentVersion); - const isLatestVersionOlder = semver_1.lt(latestVersion, currentVersion); - if (isLatestVersionNewer) { - return true; - } - return this.allowDowngrade && isLatestVersionOlder; - } - async getUpdateInfoAndProvider() { - await this.app.whenReady(); - if (this.clientPromise == null) { - this.clientPromise = this.configOnDisk.value.then(it => providerFactory_1.createClient(it, this, this.createProviderRuntimeOptions())); - } - const client = await this.clientPromise; - const stagingUserId = await this.stagingUserIdPromise.value; - client.setRequestHeaders(this.computeFinalHeaders({ "x-user-staging-id": stagingUserId })); - return { - info: await client.getLatestVersion(), - provider: client, - }; - } - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - createProviderRuntimeOptions() { - return { - isUseMultipleRangeRequest: true, - platform: this._testOnlyOptions == null ? process.platform : this._testOnlyOptions.platform, - executor: this.httpExecutor, - }; - } - async doCheckForUpdates() { - this.emit("checking-for-update"); - const result = await this.getUpdateInfoAndProvider(); - const updateInfo = result.info; - if (!(await this.isUpdateAvailable(updateInfo))) { - this._logger.info(`Update for version ${this.currentVersion} is not available (latest version: ${updateInfo.version}, downgrade is ${this.allowDowngrade ? "allowed" : "disallowed"}).`); - this.emit("update-not-available", updateInfo); - return { - versionInfo: updateInfo, - updateInfo, - }; - } - this.updateInfoAndProvider = result; - this.onUpdateAvailable(updateInfo); - const cancellationToken = new builder_util_runtime_1.CancellationToken(); - //noinspection ES6MissingAwait - return { - versionInfo: updateInfo, - updateInfo, - cancellationToken, - downloadPromise: this.autoDownload ? this.downloadUpdate(cancellationToken) : null, - }; - } - onUpdateAvailable(updateInfo) { - this._logger.info(`Found version ${updateInfo.version} (url: ${builder_util_runtime_1.asArray(updateInfo.files) - .map(it => it.url) - .join(", ")})`); - this.emit("update-available", updateInfo); - } - /** - * Start downloading update manually. You can use this method if `autoDownload` option is set to `false`. - * @returns {Promise} Path to downloaded file. - */ - downloadUpdate(cancellationToken = new builder_util_runtime_1.CancellationToken()) { - const updateInfoAndProvider = this.updateInfoAndProvider; - if (updateInfoAndProvider == null) { - const error = new Error("Please check update first"); - this.dispatchError(error); - return Promise.reject(error); - } - this._logger.info(`Downloading update from ${builder_util_runtime_1.asArray(updateInfoAndProvider.info.files) - .map(it => it.url) - .join(", ")}`); - const errorHandler = (e) => { - // https://github.com/electron-userland/electron-builder/issues/1150#issuecomment-436891159 - if (!(e instanceof builder_util_runtime_1.CancellationError)) { - try { - this.dispatchError(e); - } - catch (nestedError) { - this._logger.warn(`Cannot dispatch error event: ${nestedError.stack || nestedError}`); - } - } - return e; - }; - try { - return this.doDownloadUpdate({ - updateInfoAndProvider, - requestHeaders: this.computeRequestHeaders(updateInfoAndProvider.provider), - cancellationToken, - }).catch(e => { - throw errorHandler(e); - }); - } - catch (e) { - return Promise.reject(errorHandler(e)); - } - } - dispatchError(e) { - this.emit("error", e, (e.stack || e).toString()); - } - dispatchUpdateDownloaded(event) { - this.emit(main_1.UPDATE_DOWNLOADED, event); - } - async loadUpdateConfig() { - if (this._appUpdateConfigPath == null) { - this._appUpdateConfigPath = this.app.appUpdateConfigPath; - } - return js_yaml_1.load(await fs_extra_1.readFile(this._appUpdateConfigPath, "utf-8")); - } - computeRequestHeaders(provider) { - const fileExtraDownloadHeaders = provider.fileExtraDownloadHeaders; - if (fileExtraDownloadHeaders != null) { - const requestHeaders = this.requestHeaders; - return requestHeaders == null - ? fileExtraDownloadHeaders - : { - ...fileExtraDownloadHeaders, - ...requestHeaders, - }; - } - return this.computeFinalHeaders({ accept: "*/*" }); - } - async getOrCreateStagingUserId() { - const file = path.join(this.app.userDataPath, ".updaterId"); - try { - const id = await fs_extra_1.readFile(file, "utf-8"); - if (builder_util_runtime_1.UUID.check(id)) { - return id; - } - else { - this._logger.warn(`Staging user id file exists, but content was invalid: ${id}`); - } - } - catch (e) { - if (e.code !== "ENOENT") { - this._logger.warn(`Couldn't read staging user ID, creating a blank one: ${e}`); - } - } - const id = builder_util_runtime_1.UUID.v5(crypto_1.randomBytes(4096), builder_util_runtime_1.UUID.OID); - this._logger.info(`Generated new staging user ID: ${id}`); - try { - await fs_extra_1.outputFile(file, id); - } - catch (e) { - this._logger.warn(`Couldn't write out staging user ID: ${e}`); - } - return id; - } - /** @internal */ - get isAddNoCacheQuery() { - const headers = this.requestHeaders; - // https://github.com/electron-userland/electron-builder/issues/3021 - if (headers == null) { - return true; - } - for (const headerName of Object.keys(headers)) { - const s = headerName.toLowerCase(); - if (s === "authorization" || s === "private-token") { - return false; - } - } - return true; - } - async getOrCreateDownloadHelper() { - let result = this.downloadedUpdateHelper; - if (result == null) { - const dirName = (await this.configOnDisk.value).updaterCacheDirName; - const logger = this._logger; - if (dirName == null) { - logger.error("updaterCacheDirName is not specified in app-update.yml Was app build using at least electron-builder 20.34.0?"); - } - const cacheDir = path.join(this.app.baseCachePath, dirName || this.app.name); - if (logger.debug != null) { - logger.debug(`updater cache dir: ${cacheDir}`); - } - result = new DownloadedUpdateHelper_1.DownloadedUpdateHelper(cacheDir); - this.downloadedUpdateHelper = result; - } - return result; - } - async executeDownload(taskOptions) { - const fileInfo = taskOptions.fileInfo; - const downloadOptions = { - headers: taskOptions.downloadUpdateOptions.requestHeaders, - cancellationToken: taskOptions.downloadUpdateOptions.cancellationToken, - sha2: fileInfo.info.sha2, - sha512: fileInfo.info.sha512, - }; - if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { - downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); - } - const updateInfo = taskOptions.downloadUpdateOptions.updateInfoAndProvider.info; - const version = updateInfo.version; - const packageInfo = fileInfo.packageInfo; - function getCacheUpdateFileName() { - // NodeJS URL doesn't decode automatically - const urlPath = decodeURIComponent(taskOptions.fileInfo.url.pathname); - if (urlPath.endsWith(`.${taskOptions.fileExtension}`)) { - return path.posix.basename(urlPath); - } - else { - // url like /latest, generate name - return `update.${taskOptions.fileExtension}`; - } - } - const downloadedUpdateHelper = await this.getOrCreateDownloadHelper(); - const cacheDir = downloadedUpdateHelper.cacheDirForPendingUpdate; - await fs_extra_1.ensureDir(cacheDir); - const updateFileName = getCacheUpdateFileName(); - let updateFile = path.join(cacheDir, updateFileName); - const packageFile = packageInfo == null ? null : path.join(cacheDir, `package-${version}${path.extname(packageInfo.path) || ".7z"}`); - const done = async (isSaveCache) => { - await downloadedUpdateHelper.setDownloadedFile(updateFile, packageFile, updateInfo, fileInfo, updateFileName, isSaveCache); - await taskOptions.done({ - ...updateInfo, - downloadedFile: updateFile, - }); - return packageFile == null ? [updateFile] : [updateFile, packageFile]; - }; - const log = this._logger; - const cachedUpdateFile = await downloadedUpdateHelper.validateDownloadedPath(updateFile, updateInfo, fileInfo, log); - if (cachedUpdateFile != null) { - updateFile = cachedUpdateFile; - return await done(false); - } - const removeFileIfAny = async () => { - await downloadedUpdateHelper.clear().catch(() => { - // ignore - }); - return await fs_extra_1.unlink(updateFile).catch(() => { - // ignore - }); - }; - const tempUpdateFile = await DownloadedUpdateHelper_1.createTempUpdateFile(`temp-${updateFileName}`, cacheDir, log); - try { - await taskOptions.task(tempUpdateFile, downloadOptions, packageFile, removeFileIfAny); - await fs_extra_1.rename(tempUpdateFile, updateFile); - } - catch (e) { - await removeFileIfAny(); - if (e instanceof builder_util_runtime_1.CancellationError) { - log.info("cancelled"); - this.emit("update-cancelled", updateInfo); - } - throw e; - } - log.info(`New version ${version} has been downloaded to ${updateFile}`); - return await done(true); - } -} -exports.AppUpdater = AppUpdater; -function hasPrereleaseComponents(version) { - const versionPrereleaseComponent = semver_1.prerelease(version); - return versionPrereleaseComponent != null && versionPrereleaseComponent.length > 0; -} -/** @private */ -class NoOpLogger { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - info(message) { - // ignore - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - warn(message) { - // ignore - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - error(message) { - // ignore - } -} -exports.NoOpLogger = NoOpLogger; -//# sourceMappingURL=AppUpdater.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/BaseUpdater.js": -/*!**********************************************************!*\ - !*** ./node_modules/electron-updater/out/BaseUpdater.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseUpdater = void 0; -const AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); -class BaseUpdater extends AppUpdater_1.AppUpdater { - constructor(options, app) { - super(options, app); - this.quitAndInstallCalled = false; - this.quitHandlerAdded = false; - } - quitAndInstall(isSilent = false, isForceRunAfter = false) { - this._logger.info(`Install on explicit quitAndInstall`); - const isInstalled = this.install(isSilent, isSilent ? isForceRunAfter : true); - if (isInstalled) { - setImmediate(() => { - this.app.quit(); - }); - } - else { - this.quitAndInstallCalled = false; - } - } - executeDownload(taskOptions) { - return super.executeDownload({ - ...taskOptions, - done: event => { - this.dispatchUpdateDownloaded(event); - this.addQuitHandler(); - return Promise.resolve(); - }, - }); - } - // must be sync (because quit even handler is not async) - install(isSilent, isForceRunAfter) { - if (this.quitAndInstallCalled) { - this._logger.warn("install call ignored: quitAndInstallCalled is set to true"); - return false; - } - const downloadedUpdateHelper = this.downloadedUpdateHelper; - const installerPath = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.file; - const downloadedFileInfo = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.downloadedFileInfo; - if (installerPath == null || downloadedFileInfo == null) { - this.dispatchError(new Error("No valid update available, can't quit and install")); - return false; - } - // prevent calling several times - this.quitAndInstallCalled = true; - try { - this._logger.info(`Install: isSilent: ${isSilent}, isForceRunAfter: ${isForceRunAfter}`); - return this.doInstall({ - installerPath, - isSilent, - isForceRunAfter, - isAdminRightsRequired: downloadedFileInfo.isAdminRightsRequired, - }); - } - catch (e) { - this.dispatchError(e); - return false; - } - } - addQuitHandler() { - if (this.quitHandlerAdded || !this.autoInstallOnAppQuit) { - return; - } - this.quitHandlerAdded = true; - this.app.onQuit(exitCode => { - if (this.quitAndInstallCalled) { - this._logger.info("Update installer has already been triggered. Quitting application."); - return; - } - if (!this.autoInstallOnAppQuit) { - this._logger.info("Update will not be installed on quit because autoInstallOnAppQuit is set to false."); - return; - } - if (exitCode !== 0) { - this._logger.info(`Update will be not installed on quit because application is quitting with exit code ${exitCode}`); - return; - } - this._logger.info("Auto install update on quit"); - this.install(true, false); - }); - } -} -exports.BaseUpdater = BaseUpdater; -//# sourceMappingURL=BaseUpdater.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/DownloadedUpdateHelper.js": -/*!*********************************************************************!*\ - !*** ./node_modules/electron-updater/out/DownloadedUpdateHelper.js ***! - \*********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createTempUpdateFile = exports.DownloadedUpdateHelper = void 0; -const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -// @ts-ignore -const isEqual = __webpack_require__(/*! lodash.isequal */ "./node_modules/lodash.isequal/index.js"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const path = __webpack_require__(/*! path */ "path"); -/** @private **/ -class DownloadedUpdateHelper { - constructor(cacheDir) { - this.cacheDir = cacheDir; - this._file = null; - this._packageFile = null; - this.versionInfo = null; - this.fileInfo = null; - this._downloadedFileInfo = null; - } - get downloadedFileInfo() { - return this._downloadedFileInfo; - } - get file() { - return this._file; - } - get packageFile() { - return this._packageFile; - } - get cacheDirForPendingUpdate() { - return path.join(this.cacheDir, "pending"); - } - async validateDownloadedPath(updateFile, updateInfo, fileInfo, logger) { - if (this.versionInfo != null && this.file === updateFile && this.fileInfo != null) { - // update has already been downloaded from this running instance - // check here only existence, not checksum - if (isEqual(this.versionInfo, updateInfo) && isEqual(this.fileInfo.info, fileInfo.info) && (await fs_extra_1.pathExists(updateFile))) { - return updateFile; - } - else { - return null; - } - } - // update has already been downloaded from some previous app launch - const cachedUpdateFile = await this.getValidCachedUpdateFile(fileInfo, logger); - if (cachedUpdateFile === null) { - return null; - } - logger.info(`Update has already been downloaded to ${updateFile}).`); - this._file = cachedUpdateFile; - return cachedUpdateFile; - } - async setDownloadedFile(downloadedFile, packageFile, versionInfo, fileInfo, updateFileName, isSaveCache) { - this._file = downloadedFile; - this._packageFile = packageFile; - this.versionInfo = versionInfo; - this.fileInfo = fileInfo; - this._downloadedFileInfo = { - fileName: updateFileName, - sha512: fileInfo.info.sha512, - isAdminRightsRequired: fileInfo.info.isAdminRightsRequired === true, - }; - if (isSaveCache) { - await fs_extra_1.outputJson(this.getUpdateInfoFile(), this._downloadedFileInfo); - } - } - async clear() { - this._file = null; - this._packageFile = null; - this.versionInfo = null; - this.fileInfo = null; - await this.cleanCacheDirForPendingUpdate(); - } - async cleanCacheDirForPendingUpdate() { - try { - // remove stale data - await fs_extra_1.emptyDir(this.cacheDirForPendingUpdate); - } - catch (ignore) { - // ignore - } - } - /** - * Returns "update-info.json" which is created in the update cache directory's "pending" subfolder after the first update is downloaded. If the update file does not exist then the cache is cleared and recreated. If the update file exists then its properties are validated. - * @param fileInfo - * @param logger - */ - async getValidCachedUpdateFile(fileInfo, logger) { - var _a; - const updateInfoFilePath = this.getUpdateInfoFile(); - const doesUpdateInfoFileExist = await fs_extra_1.pathExists(updateInfoFilePath); - if (!doesUpdateInfoFileExist) { - return null; - } - let cachedInfo; - try { - cachedInfo = await fs_extra_1.readJson(updateInfoFilePath); - } - catch (error) { - let message = `No cached update info available`; - if (error.code !== "ENOENT") { - await this.cleanCacheDirForPendingUpdate(); - message += ` (error on read: ${error.message})`; - } - logger.info(message); - return null; - } - const isCachedInfoFileNameValid = (_a = (cachedInfo === null || cachedInfo === void 0 ? void 0 : cachedInfo.fileName) !== null) !== null && _a !== void 0 ? _a : false; - if (!isCachedInfoFileNameValid) { - logger.warn(`Cached update info is corrupted: no fileName, directory for cached update will be cleaned`); - await this.cleanCacheDirForPendingUpdate(); - return null; - } - if (fileInfo.info.sha512 !== cachedInfo.sha512) { - logger.info(`Cached update sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${cachedInfo.sha512}, expected: ${fileInfo.info.sha512}. Directory for cached update will be cleaned`); - await this.cleanCacheDirForPendingUpdate(); - return null; - } - const updateFile = path.join(this.cacheDirForPendingUpdate, cachedInfo.fileName); - if (!(await fs_extra_1.pathExists(updateFile))) { - logger.info("Cached update file doesn't exist"); - return null; - } - const sha512 = await hashFile(updateFile); - if (fileInfo.info.sha512 !== sha512) { - logger.warn(`Sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${sha512}, expected: ${fileInfo.info.sha512}`); - await this.cleanCacheDirForPendingUpdate(); - return null; - } - this._downloadedFileInfo = cachedInfo; - return updateFile; - } - getUpdateInfoFile() { - return path.join(this.cacheDirForPendingUpdate, "update-info.json"); - } -} -exports.DownloadedUpdateHelper = DownloadedUpdateHelper; -function hashFile(file, algorithm = "sha512", encoding = "base64", options) { - return new Promise((resolve, reject) => { - const hash = crypto_1.createHash(algorithm); - hash.on("error", reject).setEncoding(encoding); - fs_1.createReadStream(file, { ...options, highWaterMark: 1024 * 1024 /* better to use more memory but hash faster */ }) - .on("error", reject) - .on("end", () => { - hash.end(); - resolve(hash.read()); - }) - .pipe(hash, { end: false }); - }); -} -async function createTempUpdateFile(name, cacheDir, log) { - // https://github.com/electron-userland/electron-builder/pull/2474#issuecomment-366481912 - let nameCounter = 0; - let result = path.join(cacheDir, name); - for (let i = 0; i < 3; i++) { - try { - await fs_extra_1.unlink(result); - return result; - } - catch (e) { - if (e.code === "ENOENT") { - return result; - } - log.warn(`Error on remove temp update file: ${e}`); - result = path.join(cacheDir, `${nameCounter++}-${name}`); - } - } - return result; -} -exports.createTempUpdateFile = createTempUpdateFile; -//# sourceMappingURL=DownloadedUpdateHelper.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/ElectronAppAdapter.js": -/*!*****************************************************************!*\ - !*** ./node_modules/electron-updater/out/ElectronAppAdapter.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ElectronAppAdapter = void 0; -const path = __webpack_require__(/*! path */ "path"); -const AppAdapter_1 = __webpack_require__(/*! ./AppAdapter */ "./node_modules/electron-updater/out/AppAdapter.js"); -class ElectronAppAdapter { - constructor(app = __webpack_require__(/*! electron */ "electron").app) { - this.app = app; - } - whenReady() { - return this.app.whenReady(); - } - get version() { - return this.app.getVersion(); - } - get name() { - return this.app.getName(); - } - get isPackaged() { - return this.app.isPackaged === true; - } - get appUpdateConfigPath() { - return this.isPackaged ? path.join(process.resourcesPath, "app-update.yml") : path.join(this.app.getAppPath(), "dev-app-update.yml"); - } - get userDataPath() { - return this.app.getPath("userData"); - } - get baseCachePath() { - return AppAdapter_1.getAppCacheDir(); - } - quit() { - this.app.quit(); - } - onQuit(handler) { - this.app.once("quit", (_, exitCode) => handler(exitCode)); - } -} -exports.ElectronAppAdapter = ElectronAppAdapter; -//# sourceMappingURL=ElectronAppAdapter.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/MacUpdater.js": -/*!*********************************************************!*\ - !*** ./node_modules/electron-updater/out/MacUpdater.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MacUpdater = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -const http_1 = __webpack_require__(/*! http */ "http"); -const AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); -const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -class MacUpdater extends AppUpdater_1.AppUpdater { - constructor(options, app) { - super(options, app); - this.nativeUpdater = __webpack_require__(/*! electron */ "electron").autoUpdater; - this.squirrelDownloadedUpdate = false; - this.nativeUpdater.on("error", it => { - this._logger.warn(it); - this.emit("error", it); - }); - this.nativeUpdater.on("update-downloaded", () => { - this.squirrelDownloadedUpdate = true; - }); - } - doDownloadUpdate(downloadUpdateOptions) { - let files = downloadUpdateOptions.updateInfoAndProvider.provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info); - // Allow arm64 macs to install universal or rosetta2(x64) - https://github.com/electron-userland/electron-builder/pull/5524 - const isArm64 = (file) => file.url.pathname.includes("arm64"); - if (files.some(isArm64)) { - files = files.filter(file => (process.arch === "arm64") === isArm64(file)); - } - const zipFileInfo = Provider_1.findFile(files, "zip", ["pkg", "dmg"]); - if (zipFileInfo == null) { - throw builder_util_runtime_1.newError(`ZIP file not provided: ${builder_util_runtime_1.safeStringifyJson(files)}`, "ERR_UPDATER_ZIP_FILE_NOT_FOUND"); - } - const server = http_1.createServer(); - server.on("close", () => { - this._logger.info(`Proxy server for native Squirrel.Mac is closed (was started to download ${zipFileInfo.url.href})`); - }); - function getServerUrl() { - const address = server.address(); - return `http://127.0.0.1:${address.port}`; - } - return this.executeDownload({ - fileExtension: "zip", - fileInfo: zipFileInfo, - downloadUpdateOptions, - task: (destinationFile, downloadOptions) => { - return this.httpExecutor.download(zipFileInfo.url, destinationFile, downloadOptions); - }, - done: async (event) => { - const downloadedFile = event.downloadedFile; - let updateFileSize = zipFileInfo.info.size; - if (updateFileSize == null) { - updateFileSize = (await fs_extra_1.stat(downloadedFile)).size; - } - return await new Promise((resolve, reject) => { - // insecure random is ok - const fileUrl = `/${Date.now()}-${Math.floor(Math.random() * 9999)}.zip`; - server.on("request", (request, response) => { - const requestUrl = request.url; - this._logger.info(`${requestUrl} requested`); - if (requestUrl === "/") { - const data = Buffer.from(`{ "url": "${getServerUrl()}${fileUrl}" }`); - response.writeHead(200, { "Content-Type": "application/json", "Content-Length": data.length }); - response.end(data); - return; - } - if (!requestUrl.startsWith(fileUrl)) { - this._logger.warn(`${requestUrl} requested, but not supported`); - response.writeHead(404); - response.end(); - return; - } - this._logger.info(`${fileUrl} requested by Squirrel.Mac, pipe ${downloadedFile}`); - let errorOccurred = false; - response.on("finish", () => { - try { - setImmediate(() => server.close()); - } - finally { - if (!errorOccurred) { - this.nativeUpdater.removeListener("error", reject); - resolve([]); - } - } - }); - const readStream = fs_1.createReadStream(downloadedFile); - readStream.on("error", error => { - try { - response.end(); - } - catch (e) { - this._logger.warn(`cannot end response: ${e}`); - } - errorOccurred = true; - this.nativeUpdater.removeListener("error", reject); - reject(new Error(`Cannot pipe "${downloadedFile}": ${error}`)); - }); - response.writeHead(200, { - "Content-Type": "application/zip", - "Content-Length": updateFileSize, - }); - readStream.pipe(response); - }); - server.listen(0, "127.0.0.1", () => { - this.nativeUpdater.setFeedURL({ - url: getServerUrl(), - headers: { "Cache-Control": "no-cache" }, - }); - // The update has been downloaded and is ready to be served to Squirrel - this.dispatchUpdateDownloaded(event); - if (this.autoInstallOnAppQuit) { - this.nativeUpdater.once("error", reject); - // This will trigger fetching and installing the file on Squirrel side - this.nativeUpdater.checkForUpdates(); - } - else { - resolve([]); - } - }); - }); - }, - }); - } - quitAndInstall() { - if (this.squirrelDownloadedUpdate) { - // Update already fetched by Squirrel, it's ready to install - this.nativeUpdater.quitAndInstall(); - } - else { - // Quit and install as soon as Squirrel get the update - this.nativeUpdater.on("update-downloaded", () => { - this.nativeUpdater.quitAndInstall(); - }); - // And trigger the update - this.nativeUpdater.checkForUpdates(); - } - } -} -exports.MacUpdater = MacUpdater; -//# sourceMappingURL=MacUpdater.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/NsisUpdater.js": -/*!**********************************************************!*\ - !*** ./node_modules/electron-updater/out/NsisUpdater.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NsisUpdater = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); -const path = __webpack_require__(/*! path */ "path"); -const BaseUpdater_1 = __webpack_require__(/*! ./BaseUpdater */ "./node_modules/electron-updater/out/BaseUpdater.js"); -const FileWithEmbeddedBlockMapDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js"); -const GenericDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/GenericDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js"); -const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); -const util_1 = __webpack_require__(/*! ./util */ "./node_modules/electron-updater/out/util.js"); -const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const windowsExecutableCodeSignatureVerifier_1 = __webpack_require__(/*! ./windowsExecutableCodeSignatureVerifier */ "./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js"); -const url_1 = __webpack_require__(/*! url */ "url"); -const zlib_1 = __webpack_require__(/*! zlib */ "zlib"); -class NsisUpdater extends BaseUpdater_1.BaseUpdater { - constructor(options, app) { - super(options, app); - } - /*** @private */ - doDownloadUpdate(downloadUpdateOptions) { - const provider = downloadUpdateOptions.updateInfoAndProvider.provider; - const fileInfo = Provider_1.findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "exe"); - return this.executeDownload({ - fileExtension: "exe", - downloadUpdateOptions, - fileInfo, - task: async (destinationFile, downloadOptions, packageFile, removeTempDirIfAny) => { - const packageInfo = fileInfo.packageInfo; - const isWebInstaller = packageInfo != null && packageFile != null; - if (isWebInstaller || (await this.differentialDownloadInstaller(fileInfo, downloadUpdateOptions, destinationFile, provider))) { - await this.httpExecutor.download(fileInfo.url, destinationFile, downloadOptions); - } - const signatureVerificationStatus = await this.verifySignature(destinationFile); - if (signatureVerificationStatus != null) { - await removeTempDirIfAny(); - // noinspection ThrowInsideFinallyBlockJS - throw builder_util_runtime_1.newError(`New version ${downloadUpdateOptions.updateInfoAndProvider.info.version} is not signed by the application owner: ${signatureVerificationStatus}`, "ERR_UPDATER_INVALID_SIGNATURE"); - } - if (isWebInstaller) { - if (await this.differentialDownloadWebPackage(downloadUpdateOptions, packageInfo, packageFile, provider)) { - try { - await this.httpExecutor.download(new url_1.URL(packageInfo.path), packageFile, { - headers: downloadUpdateOptions.requestHeaders, - cancellationToken: downloadUpdateOptions.cancellationToken, - sha512: packageInfo.sha512, - }); - } - catch (e) { - try { - await fs_extra_1.unlink(packageFile); - } - catch (ignored) { - // ignore - } - throw e; - } - } - } - }, - }); - } - // $certificateInfo = (Get-AuthenticodeSignature 'xxx\yyy.exe' - // | where {$_.Status.Equals([System.Management.Automation.SignatureStatus]::Valid) -and $_.SignerCertificate.Subject.Contains("CN=siemens.com")}) - // | Out-String ; if ($certificateInfo) { exit 0 } else { exit 1 } - async verifySignature(tempUpdateFile) { - let publisherName; - try { - publisherName = (await this.configOnDisk.value).publisherName; - if (publisherName == null) { - return null; - } - } - catch (e) { - if (e.code === "ENOENT") { - // no app-update.yml - return null; - } - throw e; - } - return await windowsExecutableCodeSignatureVerifier_1.verifySignature(Array.isArray(publisherName) ? publisherName : [publisherName], tempUpdateFile, this._logger); - } - doInstall(options) { - const args = ["--updated"]; - if (options.isSilent) { - args.push("/S"); - } - if (options.isForceRunAfter) { - args.push("--force-run"); - } - const packagePath = this.downloadedUpdateHelper == null ? null : this.downloadedUpdateHelper.packageFile; - if (packagePath != null) { - // only = form is supported - args.push(`--package-file=${packagePath}`); - } - const callUsingElevation = () => { - _spawn(path.join(process.resourcesPath, "elevate.exe"), [options.installerPath].concat(args)).catch(e => this.dispatchError(e)); - }; - if (options.isAdminRightsRequired) { - this._logger.info("isAdminRightsRequired is set to true, run installer using elevate.exe"); - callUsingElevation(); - return true; - } - _spawn(options.installerPath, args).catch((e) => { - // https://github.com/electron-userland/electron-builder/issues/1129 - // Node 8 sends errors: https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#errors_common_system_errors - const errorCode = e.code; - this._logger.info(`Cannot run installer: error code: ${errorCode}, error message: "${e.message}", will be executed again using elevate if EACCES"`); - if (errorCode === "UNKNOWN" || errorCode === "EACCES") { - callUsingElevation(); - } - else { - this.dispatchError(e); - } - }); - return true; - } - async differentialDownloadInstaller(fileInfo, downloadUpdateOptions, installerPath, provider) { - try { - if (this._testOnlyOptions != null && !this._testOnlyOptions.isUseDifferentialDownload) { - return true; - } - const blockmapFileUrls = util_1.blockmapFiles(fileInfo.url, downloadUpdateOptions.updateInfoAndProvider.info.version, this.app.version); - this._logger.info(`Download block maps (old: "${blockmapFileUrls[0]}", new: ${blockmapFileUrls[1]})`); - const downloadBlockMap = async (url) => { - const data = await this.httpExecutor.downloadToBuffer(url, { - headers: downloadUpdateOptions.requestHeaders, - cancellationToken: downloadUpdateOptions.cancellationToken, - }); - if (data == null || data.length === 0) { - throw new Error(`Blockmap "${url.href}" is empty`); - } - try { - return JSON.parse(zlib_1.gunzipSync(data).toString()); - } - catch (e) { - throw new Error(`Cannot parse blockmap "${url.href}", error: ${e}, raw data: ${data}`); - } - }; - const downloadOptions = { - newUrl: fileInfo.url, - oldFile: path.join(this.downloadedUpdateHelper.cacheDir, builder_util_runtime_1.CURRENT_APP_INSTALLER_FILE_NAME), - logger: this._logger, - newFile: installerPath, - isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, - requestHeaders: downloadUpdateOptions.requestHeaders, - cancellationToken: downloadUpdateOptions.cancellationToken, - }; - if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { - downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); - } - const blockMapDataList = await Promise.all(blockmapFileUrls.map(u => downloadBlockMap(u))); - await new GenericDifferentialDownloader_1.GenericDifferentialDownloader(fileInfo.info, this.httpExecutor, downloadOptions).download(blockMapDataList[0], blockMapDataList[1]); - return false; - } - catch (e) { - this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); - if (this._testOnlyOptions != null) { - // test mode - throw e; - } - return true; - } - } - async differentialDownloadWebPackage(downloadUpdateOptions, packageInfo, packagePath, provider) { - if (packageInfo.blockMapSize == null) { - return true; - } - try { - const downloadOptions = { - newUrl: new url_1.URL(packageInfo.path), - oldFile: path.join(this.downloadedUpdateHelper.cacheDir, builder_util_runtime_1.CURRENT_APP_PACKAGE_FILE_NAME), - logger: this._logger, - newFile: packagePath, - requestHeaders: this.requestHeaders, - isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, - cancellationToken: downloadUpdateOptions.cancellationToken, - }; - if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { - downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); - } - await new FileWithEmbeddedBlockMapDifferentialDownloader_1.FileWithEmbeddedBlockMapDifferentialDownloader(packageInfo, this.httpExecutor, downloadOptions).download(); - } - catch (e) { - this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); - // during test (developer machine mac or linux) we must throw error - return process.platform === "win32"; - } - return false; - } -} -exports.NsisUpdater = NsisUpdater; -/** - * This handles both node 8 and node 10 way of emitting error when spawning a process - * - node 8: Throws the error - * - node 10: Emit the error(Need to listen with on) - */ -async function _spawn(exe, args) { - return new Promise((resolve, reject) => { - try { - const process = child_process_1.spawn(exe, args, { - detached: true, - stdio: "ignore", - }); - process.on("error", error => { - reject(error); - }); - process.unref(); - if (process.pid !== undefined) { - resolve(true); - } - } - catch (error) { - reject(error); - } - }); -} -//# sourceMappingURL=NsisUpdater.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js ***! - \**********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DataSplitter = exports.copyData = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -const stream_1 = __webpack_require__(/*! stream */ "stream"); -const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); -const DOUBLE_CRLF = Buffer.from("\r\n\r\n"); -var ReadState; -(function (ReadState) { - ReadState[ReadState["INIT"] = 0] = "INIT"; - ReadState[ReadState["HEADER"] = 1] = "HEADER"; - ReadState[ReadState["BODY"] = 2] = "BODY"; -})(ReadState || (ReadState = {})); -function copyData(task, out, oldFileFd, reject, resolve) { - const readStream = fs_1.createReadStream("", { - fd: oldFileFd, - autoClose: false, - start: task.start, - // end is inclusive - end: task.end - 1, - }); - readStream.on("error", reject); - readStream.once("end", resolve); - readStream.pipe(out, { - end: false, - }); -} -exports.copyData = copyData; -class DataSplitter extends stream_1.Writable { - constructor(out, options, partIndexToTaskIndex, boundary, partIndexToLength, finishHandler) { - super(); - this.out = out; - this.options = options; - this.partIndexToTaskIndex = partIndexToTaskIndex; - this.partIndexToLength = partIndexToLength; - this.finishHandler = finishHandler; - this.partIndex = -1; - this.headerListBuffer = null; - this.readState = ReadState.INIT; - this.ignoreByteCount = 0; - this.remainingPartDataCount = 0; - this.actualPartLength = 0; - this.boundaryLength = boundary.length + 4; /* size of \r\n-- */ - // first chunk doesn't start with \r\n - this.ignoreByteCount = this.boundaryLength - 2; - } - get isFinished() { - return this.partIndex === this.partIndexToLength.length; - } - // noinspection JSUnusedGlobalSymbols - _write(data, encoding, callback) { - if (this.isFinished) { - console.error(`Trailing ignored data: ${data.length} bytes`); - return; - } - this.handleData(data).then(callback).catch(callback); - } - async handleData(chunk) { - let start = 0; - if (this.ignoreByteCount !== 0 && this.remainingPartDataCount !== 0) { - throw builder_util_runtime_1.newError("Internal error", "ERR_DATA_SPLITTER_BYTE_COUNT_MISMATCH"); - } - if (this.ignoreByteCount > 0) { - const toIgnore = Math.min(this.ignoreByteCount, chunk.length); - this.ignoreByteCount -= toIgnore; - start = toIgnore; - } - else if (this.remainingPartDataCount > 0) { - const toRead = Math.min(this.remainingPartDataCount, chunk.length); - this.remainingPartDataCount -= toRead; - await this.processPartData(chunk, 0, toRead); - start = toRead; - } - if (start === chunk.length) { - return; - } - if (this.readState === ReadState.HEADER) { - const headerListEnd = this.searchHeaderListEnd(chunk, start); - if (headerListEnd === -1) { - return; - } - start = headerListEnd; - this.readState = ReadState.BODY; - // header list is ignored, we don't need it - this.headerListBuffer = null; - } - while (true) { - if (this.readState === ReadState.BODY) { - this.readState = ReadState.INIT; - } - else { - this.partIndex++; - let taskIndex = this.partIndexToTaskIndex.get(this.partIndex); - if (taskIndex == null) { - if (this.isFinished) { - taskIndex = this.options.end; - } - else { - throw builder_util_runtime_1.newError("taskIndex is null", "ERR_DATA_SPLITTER_TASK_INDEX_IS_NULL"); - } - } - const prevTaskIndex = this.partIndex === 0 ? this.options.start : this.partIndexToTaskIndex.get(this.partIndex - 1) + 1; /* prev part is download, next maybe copy */ - if (prevTaskIndex < taskIndex) { - await this.copyExistingData(prevTaskIndex, taskIndex); - } - else if (prevTaskIndex > taskIndex) { - throw builder_util_runtime_1.newError("prevTaskIndex must be < taskIndex", "ERR_DATA_SPLITTER_TASK_INDEX_ASSERT_FAILED"); - } - if (this.isFinished) { - this.onPartEnd(); - this.finishHandler(); - return; - } - start = this.searchHeaderListEnd(chunk, start); - if (start === -1) { - this.readState = ReadState.HEADER; - return; - } - } - const partLength = this.partIndexToLength[this.partIndex]; - const end = start + partLength; - const effectiveEnd = Math.min(end, chunk.length); - await this.processPartStarted(chunk, start, effectiveEnd); - this.remainingPartDataCount = partLength - (effectiveEnd - start); - if (this.remainingPartDataCount > 0) { - return; - } - start = end + this.boundaryLength; - if (start >= chunk.length) { - this.ignoreByteCount = this.boundaryLength - (chunk.length - end); - return; - } - } - } - copyExistingData(index, end) { - return new Promise((resolve, reject) => { - const w = () => { - if (index === end) { - resolve(); - return; - } - const task = this.options.tasks[index]; - if (task.kind !== downloadPlanBuilder_1.OperationKind.COPY) { - reject(new Error("Task kind must be COPY")); - return; - } - copyData(task, this.out, this.options.oldFileFd, reject, () => { - index++; - w(); - }); - }; - w(); - }); - } - searchHeaderListEnd(chunk, readOffset) { - const headerListEnd = chunk.indexOf(DOUBLE_CRLF, readOffset); - if (headerListEnd !== -1) { - return headerListEnd + DOUBLE_CRLF.length; - } - // not all headers data were received, save to buffer - const partialChunk = readOffset === 0 ? chunk : chunk.slice(readOffset); - if (this.headerListBuffer == null) { - this.headerListBuffer = partialChunk; - } - else { - this.headerListBuffer = Buffer.concat([this.headerListBuffer, partialChunk]); - } - return -1; - } - onPartEnd() { - const expectedLength = this.partIndexToLength[this.partIndex - 1]; - if (this.actualPartLength !== expectedLength) { - throw builder_util_runtime_1.newError(`Expected length: ${expectedLength} differs from actual: ${this.actualPartLength}`, "ERR_DATA_SPLITTER_LENGTH_MISMATCH"); - } - this.actualPartLength = 0; - } - processPartStarted(data, start, end) { - if (this.partIndex !== 0) { - this.onPartEnd(); - } - return this.processPartData(data, start, end); - } - processPartData(data, start, end) { - this.actualPartLength += end - start; - const out = this.out; - if (out.write(start === 0 && data.length === end ? data : data.slice(start, end))) { - return Promise.resolve(); - } - else { - return new Promise((resolve, reject) => { - out.on("error", reject); - out.once("drain", () => { - out.removeListener("error", reject); - resolve(); - }); - }); - } - } -} -exports.DataSplitter = DataSplitter; -//# sourceMappingURL=DataSplitter.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DifferentialDownloader = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const fs_1 = __webpack_require__(/*! fs */ "fs"); -const DataSplitter_1 = __webpack_require__(/*! ./DataSplitter */ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js"); -const url_1 = __webpack_require__(/*! url */ "url"); -const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); -const multipleRangeDownloader_1 = __webpack_require__(/*! ./multipleRangeDownloader */ "./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js"); -const ProgressDifferentialDownloadCallbackTransform_1 = __webpack_require__(/*! ./ProgressDifferentialDownloadCallbackTransform */ "./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js"); -class DifferentialDownloader { - // noinspection TypeScriptAbstractClassConstructorCanBeMadeProtected - constructor(blockAwareFileInfo, httpExecutor, options) { - this.blockAwareFileInfo = blockAwareFileInfo; - this.httpExecutor = httpExecutor; - this.options = options; - this.fileMetadataBuffer = null; - this.logger = options.logger; - } - createRequestOptions() { - const result = { - headers: { - ...this.options.requestHeaders, - accept: "*/*", - }, - }; - builder_util_runtime_1.configureRequestUrl(this.options.newUrl, result); - // user-agent, cache-control and other common options - builder_util_runtime_1.configureRequestOptions(result); - return result; - } - doDownload(oldBlockMap, newBlockMap) { - // we don't check other metadata like compressionMethod - generic check that it is make sense to differentially update is suitable for it - if (oldBlockMap.version !== newBlockMap.version) { - throw new Error(`version is different (${oldBlockMap.version} - ${newBlockMap.version}), full download is required`); - } - const logger = this.logger; - const operations = downloadPlanBuilder_1.computeOperations(oldBlockMap, newBlockMap, logger); - if (logger.debug != null) { - logger.debug(JSON.stringify(operations, null, 2)); - } - let downloadSize = 0; - let copySize = 0; - for (const operation of operations) { - const length = operation.end - operation.start; - if (operation.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { - downloadSize += length; - } - else { - copySize += length; - } - } - const newSize = this.blockAwareFileInfo.size; - if (downloadSize + copySize + (this.fileMetadataBuffer == null ? 0 : this.fileMetadataBuffer.length) !== newSize) { - throw new Error(`Internal error, size mismatch: downloadSize: ${downloadSize}, copySize: ${copySize}, newSize: ${newSize}`); - } - logger.info(`Full: ${formatBytes(newSize)}, To download: ${formatBytes(downloadSize)} (${Math.round(downloadSize / (newSize / 100))}%)`); - return this.downloadFile(operations); - } - downloadFile(tasks) { - const fdList = []; - const closeFiles = () => { - return Promise.all(fdList.map(openedFile => { - return fs_extra_1.close(openedFile.descriptor).catch(e => { - this.logger.error(`cannot close file "${openedFile.path}": ${e}`); - }); - })); - }; - return this.doDownloadFile(tasks, fdList) - .then(closeFiles) - .catch(e => { - // then must be after catch here (since then always throws error) - return closeFiles() - .catch(closeFilesError => { - // closeFiles never throw error, but just to be sure - try { - this.logger.error(`cannot close files: ${closeFilesError}`); - } - catch (errorOnLog) { - try { - console.error(errorOnLog); - } - catch (ignored) { - // ok, give up and ignore error - } - } - throw e; - }) - .then(() => { - throw e; - }); - }); - } - async doDownloadFile(tasks, fdList) { - const oldFileFd = await fs_extra_1.open(this.options.oldFile, "r"); - fdList.push({ descriptor: oldFileFd, path: this.options.oldFile }); - const newFileFd = await fs_extra_1.open(this.options.newFile, "w"); - fdList.push({ descriptor: newFileFd, path: this.options.newFile }); - const fileOut = fs_1.createWriteStream(this.options.newFile, { fd: newFileFd }); - await new Promise((resolve, reject) => { - const streams = []; - // Create our download info transformer if we have one - let downloadInfoTransform = undefined; - if (!this.options.isUseMultipleRangeRequest && this.options.onProgress) { - // TODO: Does not support multiple ranges (someone feel free to PR this!) - const expectedByteCounts = []; - let grandTotalBytes = 0; - for (const task of tasks) { - if (task.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { - expectedByteCounts.push(task.end - task.start); - grandTotalBytes += task.end - task.start; - } - } - const progressDifferentialDownloadInfo = { - expectedByteCounts: expectedByteCounts, - grandTotal: grandTotalBytes, - }; - downloadInfoTransform = new ProgressDifferentialDownloadCallbackTransform_1.ProgressDifferentialDownloadCallbackTransform(progressDifferentialDownloadInfo, this.options.cancellationToken, this.options.onProgress); - streams.push(downloadInfoTransform); - } - const digestTransform = new builder_util_runtime_1.DigestTransform(this.blockAwareFileInfo.sha512); - // to simply debug, do manual validation to allow file to be fully written - digestTransform.isValidateOnEnd = false; - streams.push(digestTransform); - // noinspection JSArrowFunctionCanBeReplacedWithShorthand - fileOut.on("finish", () => { - ; - fileOut.close(() => { - // remove from fd list because closed successfully - fdList.splice(1, 1); - try { - digestTransform.validate(); - } - catch (e) { - reject(e); - return; - } - resolve(undefined); - }); - }); - streams.push(fileOut); - let lastStream = null; - for (const stream of streams) { - stream.on("error", reject); - if (lastStream == null) { - lastStream = stream; - } - else { - lastStream = lastStream.pipe(stream); - } - } - const firstStream = streams[0]; - let w; - if (this.options.isUseMultipleRangeRequest) { - w = multipleRangeDownloader_1.executeTasksUsingMultipleRangeRequests(this, tasks, firstStream, oldFileFd, reject); - w(0); - return; - } - let downloadOperationCount = 0; - let actualUrl = null; - this.logger.info(`Differential download: ${this.options.newUrl}`); - const requestOptions = this.createRequestOptions(); - requestOptions.redirect = "manual"; - w = (index) => { - var _a, _b; - if (index >= tasks.length) { - if (this.fileMetadataBuffer != null) { - firstStream.write(this.fileMetadataBuffer); - } - firstStream.end(); - return; - } - const operation = tasks[index++]; - if (operation.kind === downloadPlanBuilder_1.OperationKind.COPY) { - // We are copying, let's not send status updates to the UI - if (downloadInfoTransform) { - downloadInfoTransform.beginFileCopy(); - } - DataSplitter_1.copyData(operation, firstStream, oldFileFd, reject, () => w(index)); - return; - } - const range = `bytes=${operation.start}-${operation.end - 1}`; - requestOptions.headers.range = range; - (_b = (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, `download range: ${range}`); - // We are starting to download - if (downloadInfoTransform) { - downloadInfoTransform.beginRangeDownload(); - } - const request = this.httpExecutor.createRequest(requestOptions, response => { - // Electron net handles redirects automatically, our NodeJS test server doesn't use redirects - so, we don't check 3xx codes. - if (response.statusCode >= 400) { - reject(builder_util_runtime_1.createHttpError(response)); - } - response.pipe(firstStream, { - end: false, - }); - response.once("end", () => { - // Pass on that we are downloading a segment - if (downloadInfoTransform) { - downloadInfoTransform.endRangeDownload(); - } - if (++downloadOperationCount === 100) { - downloadOperationCount = 0; - setTimeout(() => w(index), 1000); - } - else { - w(index); - } - }); - }); - request.on("redirect", (statusCode, method, redirectUrl) => { - this.logger.info(`Redirect to ${removeQuery(redirectUrl)}`); - actualUrl = redirectUrl; - builder_util_runtime_1.configureRequestUrl(new url_1.URL(actualUrl), requestOptions); - request.followRedirect(); - }); - this.httpExecutor.addErrorAndTimeoutHandlers(request, reject); - request.end(); - }; - w(0); - }); - } - async readRemoteBytes(start, endInclusive) { - const buffer = Buffer.allocUnsafe(endInclusive + 1 - start); - const requestOptions = this.createRequestOptions(); - requestOptions.headers.range = `bytes=${start}-${endInclusive}`; - let position = 0; - await this.request(requestOptions, chunk => { - chunk.copy(buffer, position); - position += chunk.length; - }); - if (position !== buffer.length) { - throw new Error(`Received data length ${position} is not equal to expected ${buffer.length}`); - } - return buffer; - } - request(requestOptions, dataHandler) { - return new Promise((resolve, reject) => { - const request = this.httpExecutor.createRequest(requestOptions, response => { - if (!multipleRangeDownloader_1.checkIsRangesSupported(response, reject)) { - return; - } - response.on("data", dataHandler); - response.on("end", () => resolve()); - }); - this.httpExecutor.addErrorAndTimeoutHandlers(request, reject); - request.end(); - }); - } -} -exports.DifferentialDownloader = DifferentialDownloader; -function formatBytes(value, symbol = " KB") { - return new Intl.NumberFormat("en").format((value / 1024).toFixed(2)) + symbol; -} -// safety -function removeQuery(url) { - const index = url.indexOf("?"); - return index < 0 ? url : url.substring(0, index); -} -//# sourceMappingURL=DifferentialDownloader.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js ***! - \********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileWithEmbeddedBlockMapDifferentialDownloader = void 0; -const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); -const DifferentialDownloader_1 = __webpack_require__(/*! ./DifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js"); -const zlib_1 = __webpack_require__(/*! zlib */ "zlib"); -class FileWithEmbeddedBlockMapDifferentialDownloader extends DifferentialDownloader_1.DifferentialDownloader { - async download() { - const packageInfo = this.blockAwareFileInfo; - const fileSize = packageInfo.size; - const offset = fileSize - (packageInfo.blockMapSize + 4); - this.fileMetadataBuffer = await this.readRemoteBytes(offset, fileSize - 1); - const newBlockMap = readBlockMap(this.fileMetadataBuffer.slice(0, this.fileMetadataBuffer.length - 4)); - await this.doDownload(await readEmbeddedBlockMapData(this.options.oldFile), newBlockMap); - } -} -exports.FileWithEmbeddedBlockMapDifferentialDownloader = FileWithEmbeddedBlockMapDifferentialDownloader; -function readBlockMap(data) { - return JSON.parse(zlib_1.inflateRawSync(data).toString()); -} -async function readEmbeddedBlockMapData(file) { - const fd = await fs_extra_1.open(file, "r"); - try { - const fileSize = (await fs_extra_1.fstat(fd)).size; - const sizeBuffer = Buffer.allocUnsafe(4); - await fs_extra_1.read(fd, sizeBuffer, 0, sizeBuffer.length, fileSize - sizeBuffer.length); - const dataBuffer = Buffer.allocUnsafe(sizeBuffer.readUInt32BE(0)); - await fs_extra_1.read(fd, dataBuffer, 0, dataBuffer.length, fileSize - sizeBuffer.length - dataBuffer.length); - await fs_extra_1.close(fd); - return readBlockMap(dataBuffer); - } - catch (e) { - await fs_extra_1.close(fd); - throw e; - } -} -//# sourceMappingURL=FileWithEmbeddedBlockMapDifferentialDownloader.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js ***! - \***************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GenericDifferentialDownloader = void 0; -const DifferentialDownloader_1 = __webpack_require__(/*! ./DifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js"); -class GenericDifferentialDownloader extends DifferentialDownloader_1.DifferentialDownloader { - download(oldBlockMap, newBlockMap) { - return this.doDownload(oldBlockMap, newBlockMap); - } -} -exports.GenericDifferentialDownloader = GenericDifferentialDownloader; -//# sourceMappingURL=GenericDifferentialDownloader.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js": -/*!*******************************************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js ***! - \*******************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ProgressDifferentialDownloadCallbackTransform = void 0; -const stream_1 = __webpack_require__(/*! stream */ "stream"); -var OperationKind; -(function (OperationKind) { - OperationKind[OperationKind["COPY"] = 0] = "COPY"; - OperationKind[OperationKind["DOWNLOAD"] = 1] = "DOWNLOAD"; -})(OperationKind || (OperationKind = {})); -class ProgressDifferentialDownloadCallbackTransform extends stream_1.Transform { - constructor(progressDifferentialDownloadInfo, cancellationToken, onProgress) { - super(); - this.progressDifferentialDownloadInfo = progressDifferentialDownloadInfo; - this.cancellationToken = cancellationToken; - this.onProgress = onProgress; - this.start = Date.now(); - this.transferred = 0; - this.delta = 0; - this.expectedBytes = 0; - this.index = 0; - this.operationType = OperationKind.COPY; - this.nextUpdate = this.start + 1000; - } - _transform(chunk, encoding, callback) { - if (this.cancellationToken.cancelled) { - callback(new Error("cancelled"), null); - return; - } - // Don't send progress update when copying from disk - if (this.operationType == OperationKind.COPY) { - callback(null, chunk); - return; - } - this.transferred += chunk.length; - this.delta += chunk.length; - const now = Date.now(); - if (now >= this.nextUpdate && - this.transferred !== this.expectedBytes /* will be emitted by endRangeDownload() */ && - this.transferred !== this.progressDifferentialDownloadInfo.grandTotal /* will be emitted on _flush */) { - this.nextUpdate = now + 1000; - this.onProgress({ - total: this.progressDifferentialDownloadInfo.grandTotal, - delta: this.delta, - transferred: this.transferred, - percent: (this.transferred / this.progressDifferentialDownloadInfo.grandTotal) * 100, - bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000)), - }); - this.delta = 0; - } - callback(null, chunk); - } - beginFileCopy() { - this.operationType = OperationKind.COPY; - } - beginRangeDownload() { - this.operationType = OperationKind.DOWNLOAD; - this.expectedBytes += this.progressDifferentialDownloadInfo.expectedByteCounts[this.index++]; - } - endRangeDownload() { - // _flush() will doour final 100% - if (this.transferred !== this.progressDifferentialDownloadInfo.grandTotal) { - this.onProgress({ - total: this.progressDifferentialDownloadInfo.grandTotal, - delta: this.delta, - transferred: this.transferred, - percent: (this.transferred / this.progressDifferentialDownloadInfo.grandTotal) * 100, - bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), - }); - } - } - // Called when we are 100% done with the connection/download - _flush(callback) { - if (this.cancellationToken.cancelled) { - callback(new Error("cancelled")); - return; - } - this.onProgress({ - total: this.progressDifferentialDownloadInfo.grandTotal, - delta: this.delta, - transferred: this.transferred, - percent: 100, - bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), - }); - this.delta = 0; - this.transferred = 0; - callback(null); - } -} -exports.ProgressDifferentialDownloadCallbackTransform = ProgressDifferentialDownloadCallbackTransform; -//# sourceMappingURL=ProgressDifferentialDownloadCallbackTransform.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.computeOperations = exports.OperationKind = void 0; -var OperationKind; -(function (OperationKind) { - OperationKind[OperationKind["COPY"] = 0] = "COPY"; - OperationKind[OperationKind["DOWNLOAD"] = 1] = "DOWNLOAD"; -})(OperationKind = exports.OperationKind || (exports.OperationKind = {})); -function computeOperations(oldBlockMap, newBlockMap, logger) { - const nameToOldBlocks = buildBlockFileMap(oldBlockMap.files); - const nameToNewBlocks = buildBlockFileMap(newBlockMap.files); - let lastOperation = null; - // for now only one file is supported in block map - const blockMapFile = newBlockMap.files[0]; - const operations = []; - const name = blockMapFile.name; - const oldEntry = nameToOldBlocks.get(name); - if (oldEntry == null) { - // new file (unrealistic case for now, because in any case both blockmap contain the only file named as "file") - throw new Error(`no file ${name} in old blockmap`); - } - const newFile = nameToNewBlocks.get(name); - let changedBlockCount = 0; - const { checksumToOffset: checksumToOldOffset, checksumToOldSize } = buildChecksumMap(nameToOldBlocks.get(name), oldEntry.offset, logger); - let newOffset = blockMapFile.offset; - for (let i = 0; i < newFile.checksums.length; newOffset += newFile.sizes[i], i++) { - const blockSize = newFile.sizes[i]; - const checksum = newFile.checksums[i]; - let oldOffset = checksumToOldOffset.get(checksum); - if (oldOffset != null && checksumToOldSize.get(checksum) !== blockSize) { - logger.warn(`Checksum ("${checksum}") matches, but size differs (old: ${checksumToOldSize.get(checksum)}, new: ${blockSize})`); - oldOffset = undefined; - } - if (oldOffset === undefined) { - // download data from new file - changedBlockCount++; - if (lastOperation != null && lastOperation.kind === OperationKind.DOWNLOAD && lastOperation.end === newOffset) { - lastOperation.end += blockSize; - } - else { - lastOperation = { - kind: OperationKind.DOWNLOAD, - start: newOffset, - end: newOffset + blockSize, - // oldBlocks: null, - }; - validateAndAdd(lastOperation, operations, checksum, i); - } - } - else { - // reuse data from old file - if (lastOperation != null && lastOperation.kind === OperationKind.COPY && lastOperation.end === oldOffset) { - lastOperation.end += blockSize; - // lastOperation.oldBlocks!!.push(checksum) - } - else { - lastOperation = { - kind: OperationKind.COPY, - start: oldOffset, - end: oldOffset + blockSize, - // oldBlocks: [checksum] - }; - validateAndAdd(lastOperation, operations, checksum, i); - } - } - } - if (changedBlockCount > 0) { - logger.info(`File${blockMapFile.name === "file" ? "" : " " + blockMapFile.name} has ${changedBlockCount} changed blocks`); - } - return operations; -} -exports.computeOperations = computeOperations; -const isValidateOperationRange = process.env.DIFFERENTIAL_DOWNLOAD_PLAN_BUILDER_VALIDATE_RANGES === "true"; -function validateAndAdd(operation, operations, checksum, index) { - if (isValidateOperationRange && operations.length !== 0) { - const lastOperation = operations[operations.length - 1]; - if (lastOperation.kind === operation.kind && operation.start < lastOperation.end && operation.start > lastOperation.start) { - const min = [lastOperation.start, lastOperation.end, operation.start, operation.end].reduce((p, v) => (p < v ? p : v)); - throw new Error(`operation (block index: ${index}, checksum: ${checksum}, kind: ${OperationKind[operation.kind]}) overlaps previous operation (checksum: ${checksum}):\n` + - `abs: ${lastOperation.start} until ${lastOperation.end} and ${operation.start} until ${operation.end}\n` + - `rel: ${lastOperation.start - min} until ${lastOperation.end - min} and ${operation.start - min} until ${operation.end - min}`); - } - } - operations.push(operation); -} -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -function buildChecksumMap(file, fileOffset, logger) { - const checksumToOffset = new Map(); - const checksumToSize = new Map(); - let offset = fileOffset; - for (let i = 0; i < file.checksums.length; i++) { - const checksum = file.checksums[i]; - const size = file.sizes[i]; - const existing = checksumToSize.get(checksum); - if (existing === undefined) { - checksumToOffset.set(checksum, offset); - checksumToSize.set(checksum, size); - } - else if (logger.debug != null) { - const sizeExplanation = existing === size ? "(same size)" : `(size: ${existing}, this size: ${size})`; - logger.debug(`${checksum} duplicated in blockmap ${sizeExplanation}, it doesn't lead to broken differential downloader, just corresponding block will be skipped)`); - } - offset += size; - } - return { checksumToOffset, checksumToOldSize: checksumToSize }; -} -function buildBlockFileMap(list) { - const result = new Map(); - for (const item of list) { - result.set(item.name, item); - } - return result; -} -//# sourceMappingURL=downloadPlanBuilder.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js ***! - \*********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkIsRangesSupported = exports.executeTasksUsingMultipleRangeRequests = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const DataSplitter_1 = __webpack_require__(/*! ./DataSplitter */ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js"); -const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); -function executeTasksUsingMultipleRangeRequests(differentialDownloader, tasks, out, oldFileFd, reject) { - const w = (taskOffset) => { - if (taskOffset >= tasks.length) { - if (differentialDownloader.fileMetadataBuffer != null) { - out.write(differentialDownloader.fileMetadataBuffer); - } - out.end(); - return; - } - const nextOffset = taskOffset + 1000; - doExecuteTasks(differentialDownloader, { - tasks, - start: taskOffset, - end: Math.min(tasks.length, nextOffset), - oldFileFd, - }, out, () => w(nextOffset), reject); - }; - return w; -} -exports.executeTasksUsingMultipleRangeRequests = executeTasksUsingMultipleRangeRequests; -function doExecuteTasks(differentialDownloader, options, out, resolve, reject) { - let ranges = "bytes="; - let partCount = 0; - const partIndexToTaskIndex = new Map(); - const partIndexToLength = []; - for (let i = options.start; i < options.end; i++) { - const task = options.tasks[i]; - if (task.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { - ranges += `${task.start}-${task.end - 1}, `; - partIndexToTaskIndex.set(partCount, i); - partCount++; - partIndexToLength.push(task.end - task.start); - } - } - if (partCount <= 1) { - // the only remote range - copy - const w = (index) => { - if (index >= options.end) { - resolve(); - return; - } - const task = options.tasks[index++]; - if (task.kind === downloadPlanBuilder_1.OperationKind.COPY) { - DataSplitter_1.copyData(task, out, options.oldFileFd, reject, () => w(index)); - } - else { - const requestOptions = differentialDownloader.createRequestOptions(); - requestOptions.headers.Range = `bytes=${task.start}-${task.end - 1}`; - const request = differentialDownloader.httpExecutor.createRequest(requestOptions, response => { - if (!checkIsRangesSupported(response, reject)) { - return; - } - response.pipe(out, { - end: false, - }); - response.once("end", () => w(index)); - }); - differentialDownloader.httpExecutor.addErrorAndTimeoutHandlers(request, reject); - request.end(); - } - }; - w(options.start); - return; - } - const requestOptions = differentialDownloader.createRequestOptions(); - requestOptions.headers.Range = ranges.substring(0, ranges.length - 2); - const request = differentialDownloader.httpExecutor.createRequest(requestOptions, response => { - if (!checkIsRangesSupported(response, reject)) { - return; - } - const contentType = builder_util_runtime_1.safeGetHeader(response, "content-type"); - const m = /^multipart\/.+?(?:; boundary=(?:(?:"(.+)")|(?:([^\s]+))))$/i.exec(contentType); - if (m == null) { - reject(new Error(`Content-Type "multipart/byteranges" is expected, but got "${contentType}"`)); - return; - } - const dicer = new DataSplitter_1.DataSplitter(out, options, partIndexToTaskIndex, m[1] || m[2], partIndexToLength, resolve); - dicer.on("error", reject); - response.pipe(dicer); - response.on("end", () => { - setTimeout(() => { - request.abort(); - reject(new Error("Response ends without calling any handlers")); - }, 10000); - }); - }); - differentialDownloader.httpExecutor.addErrorAndTimeoutHandlers(request, reject); - request.end(); -} -function checkIsRangesSupported(response, reject) { - // Electron net handles redirects automatically, our NodeJS test server doesn't use redirects - so, we don't check 3xx codes. - if (response.statusCode >= 400) { - reject(builder_util_runtime_1.createHttpError(response)); - return false; - } - if (response.statusCode !== 206) { - const acceptRanges = builder_util_runtime_1.safeGetHeader(response, "accept-ranges"); - if (acceptRanges == null || acceptRanges === "none") { - reject(new Error(`Server doesn't support Accept-Ranges (response code ${response.statusCode})`)); - return false; - } - } - return true; -} -exports.checkIsRangesSupported = checkIsRangesSupported; -//# sourceMappingURL=multipleRangeDownloader.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/electronHttpExecutor.js": -/*!*******************************************************************!*\ - !*** ./node_modules/electron-updater/out/electronHttpExecutor.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ElectronHttpExecutor = exports.getNetSession = exports.NET_SESSION_NAME = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -exports.NET_SESSION_NAME = "electron-updater"; -function getNetSession() { - return __webpack_require__(/*! electron */ "electron").session.fromPartition(exports.NET_SESSION_NAME, { - cache: false, - }); -} -exports.getNetSession = getNetSession; -class ElectronHttpExecutor extends builder_util_runtime_1.HttpExecutor { - constructor(proxyLoginCallback) { - super(); - this.proxyLoginCallback = proxyLoginCallback; - this.cachedSession = null; - } - async download(url, destination, options) { - return await options.cancellationToken.createPromise((resolve, reject, onCancel) => { - const requestOptions = { - headers: options.headers || undefined, - redirect: "manual", - }; - builder_util_runtime_1.configureRequestUrl(url, requestOptions); - builder_util_runtime_1.configureRequestOptions(requestOptions); - this.doDownload(requestOptions, { - destination, - options, - onCancel, - callback: error => { - if (error == null) { - resolve(destination); - } - else { - reject(error); - } - }, - responseHandler: null, - }, 0); - }); - } - createRequest(options, callback) { - // fix (node 7+) for making electron updater work when using AWS private buckets, check if headers contain Host property - if (options.headers && options.headers.Host) { - // set host value from headers.Host - options.host = options.headers.Host; - // remove header property 'Host', if not removed causes net::ERR_INVALID_ARGUMENT exception - delete options.headers.Host; - } - // differential downloader can call this method very often, so, better to cache session - if (this.cachedSession == null) { - this.cachedSession = getNetSession(); - } - const request = __webpack_require__(/*! electron */ "electron").net.request({ - ...options, - session: this.cachedSession, - }); - request.on("response", callback); - if (this.proxyLoginCallback != null) { - request.on("login", this.proxyLoginCallback); - } - return request; - } - addRedirectHandlers(request, options, reject, redirectCount, handler) { - request.on("redirect", (statusCode, method, redirectUrl) => { - // no way to modify request options, abort old and make a new one - // https://github.com/electron/electron/issues/11505 - request.abort(); - if (redirectCount > this.maxRedirects) { - reject(this.createMaxRedirectError()); - } - else { - handler(builder_util_runtime_1.HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options)); - } - }); - } -} -exports.ElectronHttpExecutor = ElectronHttpExecutor; -//# sourceMappingURL=electronHttpExecutor.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/main.js": -/*!***************************************************!*\ - !*** ./node_modules/electron-updater/out/main.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdaterSignal = exports.UPDATE_DOWNLOADED = exports.DOWNLOAD_PROGRESS = exports.NsisUpdater = exports.MacUpdater = exports.AppImageUpdater = exports.Provider = exports.CancellationToken = exports.NoOpLogger = exports.AppUpdater = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return builder_util_runtime_1.CancellationToken; } }); -var AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); -Object.defineProperty(exports, "AppUpdater", { enumerable: true, get: function () { return AppUpdater_1.AppUpdater; } }); -Object.defineProperty(exports, "NoOpLogger", { enumerable: true, get: function () { return AppUpdater_1.NoOpLogger; } }); -var Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return Provider_1.Provider; } }); -var AppImageUpdater_1 = __webpack_require__(/*! ./AppImageUpdater */ "./node_modules/electron-updater/out/AppImageUpdater.js"); -Object.defineProperty(exports, "AppImageUpdater", { enumerable: true, get: function () { return AppImageUpdater_1.AppImageUpdater; } }); -var MacUpdater_1 = __webpack_require__(/*! ./MacUpdater */ "./node_modules/electron-updater/out/MacUpdater.js"); -Object.defineProperty(exports, "MacUpdater", { enumerable: true, get: function () { return MacUpdater_1.MacUpdater; } }); -var NsisUpdater_1 = __webpack_require__(/*! ./NsisUpdater */ "./node_modules/electron-updater/out/NsisUpdater.js"); -Object.defineProperty(exports, "NsisUpdater", { enumerable: true, get: function () { return NsisUpdater_1.NsisUpdater; } }); -// autoUpdater to mimic electron bundled autoUpdater -let _autoUpdater; -function doLoadAutoUpdater() { - // tslint:disable:prefer-conditional-expression - if (process.platform === "win32") { - _autoUpdater = new (__webpack_require__(/*! ./NsisUpdater */ "./node_modules/electron-updater/out/NsisUpdater.js").NsisUpdater)(); - } - else if (process.platform === "darwin") { - _autoUpdater = new (__webpack_require__(/*! ./MacUpdater */ "./node_modules/electron-updater/out/MacUpdater.js").MacUpdater)(); - } - else { - _autoUpdater = new (__webpack_require__(/*! ./AppImageUpdater */ "./node_modules/electron-updater/out/AppImageUpdater.js").AppImageUpdater)(); - } - return _autoUpdater; -} -Object.defineProperty(exports, "autoUpdater", { - enumerable: true, - get: () => { - return _autoUpdater || doLoadAutoUpdater(); - }, -}); -exports.DOWNLOAD_PROGRESS = "download-progress"; -exports.UPDATE_DOWNLOADED = "update-downloaded"; -class UpdaterSignal { - constructor(emitter) { - this.emitter = emitter; - } - /** - * Emitted when an authenticating proxy is [asking for user credentials](https://github.com/electron/electron/blob/master/docs/api/client-request.md#event-login). - */ - login(handler) { - addHandler(this.emitter, "login", handler); - } - progress(handler) { - addHandler(this.emitter, exports.DOWNLOAD_PROGRESS, handler); - } - updateDownloaded(handler) { - addHandler(this.emitter, exports.UPDATE_DOWNLOADED, handler); - } - updateCancelled(handler) { - addHandler(this.emitter, "update-cancelled", handler); - } -} -exports.UpdaterSignal = UpdaterSignal; -const isLogEvent = false; -function addHandler(emitter, event, handler) { - if (isLogEvent) { - emitter.on(event, (...args) => { - console.log("%s %s", event, args); - handler(...args); - }); - } - else { - emitter.on(event, handler); - } -} -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providerFactory.js": -/*!**************************************************************!*\ - !*** ./node_modules/electron-updater/out/providerFactory.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createClient = exports.isUrlProbablySupportMultiRangeRequests = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const BintrayProvider_1 = __webpack_require__(/*! ./providers/BintrayProvider */ "./node_modules/electron-updater/out/providers/BintrayProvider.js"); -const GenericProvider_1 = __webpack_require__(/*! ./providers/GenericProvider */ "./node_modules/electron-updater/out/providers/GenericProvider.js"); -const GitHubProvider_1 = __webpack_require__(/*! ./providers/GitHubProvider */ "./node_modules/electron-updater/out/providers/GitHubProvider.js"); -const PrivateGitHubProvider_1 = __webpack_require__(/*! ./providers/PrivateGitHubProvider */ "./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js"); -function isUrlProbablySupportMultiRangeRequests(url) { - return !url.includes("s3.amazonaws.com"); -} -exports.isUrlProbablySupportMultiRangeRequests = isUrlProbablySupportMultiRangeRequests; -function createClient(data, updater, runtimeOptions) { - // noinspection SuspiciousTypeOfGuard - if (typeof data === "string") { - throw builder_util_runtime_1.newError("Please pass PublishConfiguration object", "ERR_UPDATER_INVALID_PROVIDER_CONFIGURATION"); - } - const provider = data.provider; - switch (provider) { - case "github": { - const githubOptions = data; - const token = (githubOptions.private ? process.env.GH_TOKEN || process.env.GITHUB_TOKEN : null) || githubOptions.token; - if (token == null) { - return new GitHubProvider_1.GitHubProvider(githubOptions, updater, runtimeOptions); - } - else { - return new PrivateGitHubProvider_1.PrivateGitHubProvider(githubOptions, updater, token, runtimeOptions); - } - } - case "s3": - case "spaces": - return new GenericProvider_1.GenericProvider({ - provider: "generic", - url: builder_util_runtime_1.getS3LikeProviderBaseUrl(data), - channel: data.channel || null, - }, updater, { - ...runtimeOptions, - // https://github.com/minio/minio/issues/5285#issuecomment-350428955 - isUseMultipleRangeRequest: false, - }); - case "generic": { - const options = data; - return new GenericProvider_1.GenericProvider(options, updater, { - ...runtimeOptions, - isUseMultipleRangeRequest: options.useMultipleRangeRequest !== false && isUrlProbablySupportMultiRangeRequests(options.url), - }); - } - case "bintray": - return new BintrayProvider_1.BintrayProvider(data, runtimeOptions); - default: - throw builder_util_runtime_1.newError(`Unsupported provider: ${provider}`, "ERR_UPDATER_UNSUPPORTED_PROVIDER"); - } -} -exports.createClient = createClient; -//# sourceMappingURL=providerFactory.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providers/BintrayProvider.js": -/*!************************************************************************!*\ - !*** ./node_modules/electron-updater/out/providers/BintrayProvider.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BintrayProvider = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const bintray_1 = __webpack_require__(/*! builder-util-runtime/out/bintray */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js"); -const url_1 = __webpack_require__(/*! url */ "url"); -const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); -const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -class BintrayProvider extends Provider_1.Provider { - constructor(configuration, runtimeOptions) { - super(runtimeOptions); - this.client = new bintray_1.BintrayClient(configuration, runtimeOptions.executor, new builder_util_runtime_1.CancellationToken()); - this.baseUrl = util_1.newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`); - } - setRequestHeaders(value) { - super.setRequestHeaders(value); - this.client.setRequestHeaders(value); - } - async getLatestVersion() { - try { - const data = await this.client.getVersion("_latest"); - const channelFilename = util_1.getChannelFilename(this.getDefaultChannelName()); - const files = await this.client.getVersionFiles(data.name); - const channelFile = files.find(it => it.name.endsWith(`_${channelFilename}`) || it.name.endsWith(`-${channelFilename}`)); - if (channelFile == null) { - // noinspection ExceptionCaughtLocallyJS - throw builder_util_runtime_1.newError(`Cannot find channel file "${channelFilename}", existing files:\n${files.map(it => JSON.stringify(it, null, 2)).join(",\n")}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); - } - const channelFileUrl = new url_1.URL(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}/${channelFile.name}`); - return Provider_1.parseUpdateInfo(await this.httpRequest(channelFileUrl), channelFilename, channelFileUrl); - } - catch (e) { - if ("statusCode" in e && e.statusCode === 404) { - throw builder_util_runtime_1.newError(`No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); - } - throw e; - } - } - resolveFiles(updateInfo) { - return Provider_1.resolveFiles(updateInfo, this.baseUrl); - } -} -exports.BintrayProvider = BintrayProvider; -//# sourceMappingURL=BintrayProvider.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providers/GenericProvider.js": -/*!************************************************************************!*\ - !*** ./node_modules/electron-updater/out/providers/GenericProvider.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GenericProvider = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); -const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -class GenericProvider extends Provider_1.Provider { - constructor(configuration, updater, runtimeOptions) { - super(runtimeOptions); - this.configuration = configuration; - this.updater = updater; - this.baseUrl = util_1.newBaseUrl(this.configuration.url); - } - get channel() { - const result = this.updater.channel || this.configuration.channel; - return result == null ? this.getDefaultChannelName() : this.getCustomChannelName(result); - } - async getLatestVersion() { - const channelFile = util_1.getChannelFilename(this.channel); - const channelUrl = util_1.newUrlFromBase(channelFile, this.baseUrl, this.updater.isAddNoCacheQuery); - for (let attemptNumber = 0;; attemptNumber++) { - try { - return Provider_1.parseUpdateInfo(await this.httpRequest(channelUrl), channelFile, channelUrl); - } - catch (e) { - if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { - throw builder_util_runtime_1.newError(`Cannot find channel "${channelFile}" update info: ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); - } - else if (e.code === "ECONNREFUSED") { - if (attemptNumber < 3) { - await new Promise((resolve, reject) => { - try { - setTimeout(resolve, 1000 * attemptNumber); - } - catch (e) { - reject(e); - } - }); - continue; - } - } - throw e; - } - } - } - resolveFiles(updateInfo) { - return Provider_1.resolveFiles(updateInfo, this.baseUrl); - } -} -exports.GenericProvider = GenericProvider; -//# sourceMappingURL=GenericProvider.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providers/GitHubProvider.js": -/*!***********************************************************************!*\ - !*** ./node_modules/electron-updater/out/providers/GitHubProvider.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.computeReleaseNotes = exports.GitHubProvider = exports.BaseGitHubProvider = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const semver = __webpack_require__(/*! semver */ "./node_modules/electron-updater/node_modules/semver/index.js"); -const url_1 = __webpack_require__(/*! url */ "url"); -const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); -const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -const hrefRegExp = /\/tag\/v?([^/]+)$/; -class BaseGitHubProvider extends Provider_1.Provider { - constructor(options, defaultHost, runtimeOptions) { - super({ - ...runtimeOptions, - /* because GitHib uses S3 */ - isUseMultipleRangeRequest: false, - }); - this.options = options; - this.baseUrl = util_1.newBaseUrl(builder_util_runtime_1.githubUrl(options, defaultHost)); - const apiHost = defaultHost === "github.com" ? "api.github.com" : defaultHost; - this.baseApiUrl = util_1.newBaseUrl(builder_util_runtime_1.githubUrl(options, apiHost)); - } - computeGithubBasePath(result) { - // https://github.com/electron-userland/electron-builder/issues/1903#issuecomment-320881211 - const host = this.options.host; - return host != null && host !== "github.com" && host !== "api.github.com" ? `/api/v3${result}` : result; - } -} -exports.BaseGitHubProvider = BaseGitHubProvider; -class GitHubProvider extends BaseGitHubProvider { - constructor(options, updater, runtimeOptions) { - super(options, "github.com", runtimeOptions); - this.options = options; - this.updater = updater; - } - async getLatestVersion() { - const cancellationToken = new builder_util_runtime_1.CancellationToken(); - const feedXml = (await this.httpRequest(util_1.newUrlFromBase(`${this.basePath}.atom`, this.baseUrl), { - accept: "application/xml, application/atom+xml, text/xml, */*", - }, cancellationToken)); - const feed = builder_util_runtime_1.parseXml(feedXml); - // noinspection TypeScriptValidateJSTypes - let latestRelease = feed.element("entry", false, `No published versions on GitHub`); - let version; - try { - if (this.updater.allowPrerelease) { - // noinspection TypeScriptValidateJSTypes - version = hrefRegExp.exec(latestRelease.element("link").attribute("href"))[1]; - } - else { - version = await this.getLatestVersionString(cancellationToken); - for (const element of feed.getElements("entry")) { - // noinspection TypeScriptValidateJSTypes - if (hrefRegExp.exec(element.element("link").attribute("href"))[1] === version) { - latestRelease = element; - break; - } - } - } - } - catch (e) { - throw builder_util_runtime_1.newError(`Cannot parse releases feed: ${e.stack || e.message},\nXML:\n${feedXml}`, "ERR_UPDATER_INVALID_RELEASE_FEED"); - } - if (version == null) { - throw builder_util_runtime_1.newError(`No published versions on GitHub`, "ERR_UPDATER_NO_PUBLISHED_VERSIONS"); - } - const channelFile = util_1.getChannelFilename(this.getDefaultChannelName()); - const channelFileUrl = util_1.newUrlFromBase(this.getBaseDownloadPath(version, channelFile), this.baseUrl); - const requestOptions = this.createRequestOptions(channelFileUrl); - let rawData; - try { - rawData = (await this.executor.request(requestOptions, cancellationToken)); - } - catch (e) { - if (!this.updater.allowPrerelease && e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { - throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); - } - throw e; - } - const result = Provider_1.parseUpdateInfo(rawData, channelFile, channelFileUrl); - if (result.releaseName == null) { - result.releaseName = latestRelease.elementValueOrEmpty("title"); - } - if (result.releaseNotes == null) { - result.releaseNotes = computeReleaseNotes(this.updater.currentVersion, this.updater.fullChangelog, feed, latestRelease); - } - return result; - } - async getLatestVersionString(cancellationToken) { - const options = this.options; - // do not use API for GitHub to avoid limit, only for custom host or GitHub Enterprise - const url = options.host == null || options.host === "github.com" - ? util_1.newUrlFromBase(`${this.basePath}/latest`, this.baseUrl) - : new url_1.URL(`${this.computeGithubBasePath(`/repos/${options.owner}/${options.repo}/releases`)}/latest`, this.baseApiUrl); - try { - const rawData = await this.httpRequest(url, { Accept: "application/json" }, cancellationToken); - if (rawData == null) { - return null; - } - const releaseInfo = JSON.parse(rawData); - return releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name; - } - catch (e) { - throw builder_util_runtime_1.newError(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); - } - } - get basePath() { - return `/${this.options.owner}/${this.options.repo}/releases`; - } - resolveFiles(updateInfo) { - // still replace space to - due to backward compatibility - return Provider_1.resolveFiles(updateInfo, this.baseUrl, p => this.getBaseDownloadPath(updateInfo.version, p.replace(/ /g, "-"))); - } - getBaseDownloadPath(version, fileName) { - return `${this.basePath}/download/${this.options.vPrefixedTagName === false ? "" : "v"}${version}/${fileName}`; - } -} -exports.GitHubProvider = GitHubProvider; -function getNoteValue(parent) { - const result = parent.elementValueOrEmpty("content"); - // GitHub reports empty notes as No content. - return result === "No content." ? "" : result; -} -function computeReleaseNotes(currentVersion, isFullChangelog, feed, latestRelease) { - if (!isFullChangelog) { - return getNoteValue(latestRelease); - } - const releaseNotes = []; - for (const release of feed.getElements("entry")) { - // noinspection TypeScriptValidateJSTypes - const versionRelease = /\/tag\/v?([^/]+)$/.exec(release.element("link").attribute("href"))[1]; - if (semver.lt(currentVersion, versionRelease)) { - releaseNotes.push({ - version: versionRelease, - note: getNoteValue(release), - }); - } - } - return releaseNotes.sort((a, b) => semver.rcompare(a.version, b.version)); -} -exports.computeReleaseNotes = computeReleaseNotes; -//# sourceMappingURL=GitHubProvider.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js": -/*!******************************************************************************!*\ - !*** ./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrivateGitHubProvider = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); -const path = __webpack_require__(/*! path */ "path"); -const url_1 = __webpack_require__(/*! url */ "url"); -const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); -const GitHubProvider_1 = __webpack_require__(/*! ./GitHubProvider */ "./node_modules/electron-updater/out/providers/GitHubProvider.js"); -const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); -class PrivateGitHubProvider extends GitHubProvider_1.BaseGitHubProvider { - constructor(options, updater, token, runtimeOptions) { - super(options, "api.github.com", runtimeOptions); - this.updater = updater; - this.token = token; - } - createRequestOptions(url, headers) { - const result = super.createRequestOptions(url, headers); - result.redirect = "manual"; - return result; - } - async getLatestVersion() { - const cancellationToken = new builder_util_runtime_1.CancellationToken(); - const channelFile = util_1.getChannelFilename(this.getDefaultChannelName()); - const releaseInfo = await this.getLatestVersionInfo(cancellationToken); - const asset = releaseInfo.assets.find(it => it.name === channelFile); - if (asset == null) { - // html_url must be always, but just to be sure - throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the release ${releaseInfo.html_url || releaseInfo.name}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); - } - const url = new url_1.URL(asset.url); - let result; - try { - result = js_yaml_1.load((await this.httpRequest(url, this.configureHeaders("application/octet-stream"), cancellationToken))); - } - catch (e) { - if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { - throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the latest release artifacts (${url}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); - } - throw e; - } - ; - result.assets = releaseInfo.assets; - return result; - } - get fileExtraDownloadHeaders() { - return this.configureHeaders("application/octet-stream"); - } - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - configureHeaders(accept) { - return { - accept, - authorization: `token ${this.token}`, - }; - } - async getLatestVersionInfo(cancellationToken) { - const allowPrerelease = this.updater.allowPrerelease; - let basePath = this.basePath; - if (!allowPrerelease) { - basePath = `${basePath}/latest`; - } - const url = util_1.newUrlFromBase(basePath, this.baseUrl); - try { - const version = JSON.parse((await this.httpRequest(url, this.configureHeaders("application/vnd.github.v3+json"), cancellationToken))); - if (allowPrerelease) { - return version.find(it => it.prerelease) || version[0]; - } - else { - return version; - } - } - catch (e) { - throw builder_util_runtime_1.newError(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); - } - } - get basePath() { - return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`); - } - resolveFiles(updateInfo) { - return Provider_1.getFileList(updateInfo).map(it => { - const name = path.posix.basename(it.url).replace(/ /g, "-"); - const asset = updateInfo.assets.find(it => it != null && it.name === name); - if (asset == null) { - throw builder_util_runtime_1.newError(`Cannot find asset "${name}" in: ${JSON.stringify(updateInfo.assets, null, 2)}`, "ERR_UPDATER_ASSET_NOT_FOUND"); - } - return { - url: new url_1.URL(asset.url), - info: it, - }; - }); - } -} -exports.PrivateGitHubProvider = PrivateGitHubProvider; -//# sourceMappingURL=PrivateGitHubProvider.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/providers/Provider.js": -/*!*****************************************************************!*\ - !*** ./node_modules/electron-updater/out/providers/Provider.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveFiles = exports.getFileList = exports.parseUpdateInfo = exports.findFile = exports.Provider = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); -const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); -class Provider { - constructor(runtimeOptions) { - this.runtimeOptions = runtimeOptions; - this.requestHeaders = null; - this.executor = runtimeOptions.executor; - } - get isUseMultipleRangeRequest() { - return this.runtimeOptions.isUseMultipleRangeRequest !== false; - } - getChannelFilePrefix() { - if (this.runtimeOptions.platform === "linux") { - const arch = process.env.TEST_UPDATER_ARCH || process.arch; - const archSuffix = arch === "x64" ? "" : `-${arch}`; - return "-linux" + archSuffix; - } - else { - return this.runtimeOptions.platform === "darwin" ? "-mac" : ""; - } - } - // due to historical reasons for windows we use channel name without platform specifier - getDefaultChannelName() { - return this.getCustomChannelName("latest"); - } - getCustomChannelName(channel) { - return `${channel}${this.getChannelFilePrefix()}`; - } - get fileExtraDownloadHeaders() { - return null; - } - setRequestHeaders(value) { - this.requestHeaders = value; - } - /** - * Method to perform API request only to resolve update info, but not to download update. - */ - httpRequest(url, headers, cancellationToken) { - return this.executor.request(this.createRequestOptions(url, headers), cancellationToken); - } - createRequestOptions(url, headers) { - const result = {}; - if (this.requestHeaders == null) { - if (headers != null) { - result.headers = headers; - } - } - else { - result.headers = headers == null ? this.requestHeaders : { ...this.requestHeaders, ...headers }; - } - builder_util_runtime_1.configureRequestUrl(url, result); - return result; - } -} -exports.Provider = Provider; -function findFile(files, extension, not) { - if (files.length === 0) { - throw builder_util_runtime_1.newError("No files provided", "ERR_UPDATER_NO_FILES_PROVIDED"); - } - const result = files.find(it => it.url.pathname.toLowerCase().endsWith(`.${extension}`)); - if (result != null) { - return result; - } - else if (not == null) { - return files[0]; - } - else { - return files.find(fileInfo => !not.some(ext => fileInfo.url.pathname.toLowerCase().endsWith(`.${ext}`))); - } -} -exports.findFile = findFile; -function parseUpdateInfo(rawData, channelFile, channelFileUrl) { - if (rawData == null) { - throw builder_util_runtime_1.newError(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): rawData: null`, "ERR_UPDATER_INVALID_UPDATE_INFO"); - } - let result; - try { - result = js_yaml_1.load(rawData); - } - catch (e) { - throw builder_util_runtime_1.newError(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}, rawData: ${rawData}`, "ERR_UPDATER_INVALID_UPDATE_INFO"); - } - return result; -} -exports.parseUpdateInfo = parseUpdateInfo; -function getFileList(updateInfo) { - const files = updateInfo.files; - if (files != null && files.length > 0) { - return files; - } - // noinspection JSDeprecatedSymbols - if (updateInfo.path != null) { - // noinspection JSDeprecatedSymbols - return [ - { - url: updateInfo.path, - sha2: updateInfo.sha2, - sha512: updateInfo.sha512, - }, - ]; - } - else { - throw builder_util_runtime_1.newError(`No files provided: ${builder_util_runtime_1.safeStringifyJson(updateInfo)}`, "ERR_UPDATER_NO_FILES_PROVIDED"); - } -} -exports.getFileList = getFileList; -function resolveFiles(updateInfo, baseUrl, pathTransformer = (p) => p) { - const files = getFileList(updateInfo); - const result = files.map(fileInfo => { - if (fileInfo.sha2 == null && fileInfo.sha512 == null) { - throw builder_util_runtime_1.newError(`Update info doesn't contain nor sha256 neither sha512 checksum: ${builder_util_runtime_1.safeStringifyJson(fileInfo)}`, "ERR_UPDATER_NO_CHECKSUM"); - } - return { - url: util_1.newUrlFromBase(pathTransformer(fileInfo.url), baseUrl), - info: fileInfo, - }; - }); - const packages = updateInfo.packages; - const packageInfo = packages == null ? null : packages[process.arch] || packages.ia32; - if (packageInfo != null) { - ; - result[0].packageInfo = { - ...packageInfo, - path: util_1.newUrlFromBase(pathTransformer(packageInfo.path), baseUrl).href, - }; - } - return result; -} -exports.resolveFiles = resolveFiles; -//# sourceMappingURL=Provider.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/util.js": -/*!***************************************************!*\ - !*** ./node_modules/electron-updater/out/util.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.blockmapFiles = exports.getChannelFilename = exports.newUrlFromBase = exports.newBaseUrl = void 0; -// if baseUrl path doesn't ends with /, this path will be not prepended to passed pathname for new URL(input, base) -const url_1 = __webpack_require__(/*! url */ "url"); -// @ts-ignore -const escapeRegExp = __webpack_require__(/*! lodash.escaperegexp */ "./node_modules/lodash.escaperegexp/index.js"); -/** @internal */ -function newBaseUrl(url) { - const result = new url_1.URL(url); - if (!result.pathname.endsWith("/")) { - result.pathname += "/"; - } - return result; -} -exports.newBaseUrl = newBaseUrl; -// addRandomQueryToAvoidCaching is false by default because in most cases URL already contains version number, -// so, it makes sense only for Generic Provider for channel files -function newUrlFromBase(pathname, baseUrl, addRandomQueryToAvoidCaching = false) { - const result = new url_1.URL(pathname, baseUrl); - // search is not propagated (search is an empty string if not specified) - const search = baseUrl.search; - if (search != null && search.length !== 0) { - result.search = search; - } - else if (addRandomQueryToAvoidCaching) { - result.search = `noCache=${Date.now().toString(32)}`; - } - return result; -} -exports.newUrlFromBase = newUrlFromBase; -function getChannelFilename(channel) { - return `${channel}.yml`; -} -exports.getChannelFilename = getChannelFilename; -function blockmapFiles(baseUrl, oldVersion, newVersion) { - const newBlockMapUrl = newUrlFromBase(`${baseUrl.pathname}.blockmap`, baseUrl); - const oldBlockMapUrl = newUrlFromBase(`${baseUrl.pathname.replace(new RegExp(escapeRegExp(newVersion), "g"), oldVersion)}.blockmap`, baseUrl); - return [oldBlockMapUrl, newBlockMapUrl]; -} -exports.blockmapFiles = blockmapFiles; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ "./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js ***! - \*************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySignature = void 0; -const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); -const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); -const os = __webpack_require__(/*! os */ "os"); -// $certificateInfo = (Get-AuthenticodeSignature 'xxx\yyy.exe' -// | where {$_.Status.Equals([System.Management.Automation.SignatureStatus]::Valid) -and $_.SignerCertificate.Subject.Contains("CN=siemens.com")}) -// | Out-String ; if ($certificateInfo) { exit 0 } else { exit 1 } -function verifySignature(publisherNames, unescapedTempUpdateFile, logger) { - return new Promise(resolve => { - // Escape quotes and backticks in filenames to prevent user from breaking the - // arguments and perform a remote command injection. - // - // Consider example powershell command: - // ```powershell - // Get-AuthenticodeSignature 'C:\\path\\my-bad-';calc;'filename.exe' - // ``` - // The above would work expected and find the file name, however, it will also execute `;calc;` - // command and start the calculator app. - // - // From Powershell quoting rules: - // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7 - // * Double quotes `"` are treated literally within single-quoted strings; - // * Single quotes can be escaped by doubling them: 'don''t' -> don't; - // * Backticks can be escaped by doubling them: 'A backtick (``) character'; - // - // Also note that at this point the file has already been written to the disk, thus we are - // guaranteed that the path will not contains any illegal characters like <>:"/\|?* - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - const tempUpdateFile = unescapedTempUpdateFile.replace(/'/g, "''").replace(/`/g, "``"); - // https://github.com/electron-userland/electron-builder/issues/2421 - // https://github.com/electron-userland/electron-builder/issues/2535 - child_process_1.execFile("powershell.exe", [ - "-NoProfile", - "-NonInteractive", - "-InputFormat", - "None", - "-Command", - `Get-AuthenticodeSignature '${tempUpdateFile}' | ConvertTo-Json -Compress | ForEach-Object { [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($_)) }`, - ], { - timeout: 20 * 1000, - }, (error, stdout, stderr) => { - try { - if (error != null || stderr) { - handleError(logger, error, stderr); - resolve(null); - return; - } - const data = parseOut(Buffer.from(stdout, "base64").toString("utf-8")); - if (data.Status === 0) { - const name = builder_util_runtime_1.parseDn(data.SignerCertificate.Subject).get("CN"); - if (publisherNames.includes(name)) { - resolve(null); - return; - } - } - const result = `publisherNames: ${publisherNames.join(" | ")}, raw info: ` + JSON.stringify(data, (name, value) => (name === "RawData" ? undefined : value), 2); - logger.warn(`Sign verification failed, installer signed with incorrect certificate: ${result}`); - resolve(result); - } - catch (e) { - logger.warn(`Cannot execute Get-AuthenticodeSignature: ${error}. Ignoring signature validation due to unknown error.`); - resolve(null); - return; - } - }); - }); -} -exports.verifySignature = verifySignature; -function parseOut(out) { - const data = JSON.parse(out); - delete data.PrivateKey; - delete data.IsOSBinary; - delete data.SignatureType; - const signerCertificate = data.SignerCertificate; - if (signerCertificate != null) { - delete signerCertificate.Archived; - delete signerCertificate.Extensions; - delete signerCertificate.Handle; - delete signerCertificate.HasPrivateKey; - // duplicates data.SignerCertificate (contains RawData) - delete signerCertificate.SubjectName; - } - delete data.Path; - return data; -} -function handleError(logger, error, stderr) { - if (isOldWin6()) { - logger.warn(`Cannot execute Get-AuthenticodeSignature: ${error || stderr}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`); - return; - } - try { - child_process_1.execFileSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", "ConvertTo-Json test"], { timeout: 10 * 1000 }); - } - catch (testError) { - logger.warn(`Cannot execute ConvertTo-Json: ${testError.message}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`); - return; - } - if (error != null) { - throw error; - } - if (stderr) { - logger.warn(`Cannot execute Get-AuthenticodeSignature, stderr: ${stderr}. Ignoring signature validation due to unknown stderr.`); - return; - } -} -function isOldWin6() { - const winVersion = os.release(); - return winVersion.startsWith("6.") && !winVersion.startsWith("6.3"); -} -//# sourceMappingURL=windowsExecutableCodeSignatureVerifier.js.map - -/***/ }), - -/***/ "./node_modules/emoji-regex/index.js": -/*!*******************************************!*\ - !*** ./node_modules/emoji-regex/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; - - -/***/ }), - -/***/ "./node_modules/env-paths/index.js": -/*!*****************************************!*\ - !*** ./node_modules/env-paths/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(/*! path */ "path"); -const os = __webpack_require__(/*! os */ "os"); - -const homedir = os.homedir(); -const tmpdir = os.tmpdir(); -const {env} = process; - -const macos = name => { - const library = path.join(homedir, 'Library'); - - return { - data: path.join(library, 'Application Support', name), - config: path.join(library, 'Preferences', name), - cache: path.join(library, 'Caches', name), - log: path.join(library, 'Logs', name), - temp: path.join(tmpdir, name) - }; -}; - -const windows = name => { - const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming'); - const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); - - return { - // Data/config/cache/log are invented by me as Windows isn't opinionated about this - data: path.join(localAppData, name, 'Data'), - config: path.join(appData, name, 'Config'), - cache: path.join(localAppData, name, 'Cache'), - log: path.join(localAppData, name, 'Log'), - temp: path.join(tmpdir, name) - }; -}; - -// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html -const linux = name => { - const username = path.basename(homedir); - - return { - data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), - config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), - cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), - // https://wiki.debian.org/XDGBaseDirectorySpecification#state - log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), - temp: path.join(tmpdir, username, name) - }; -}; - -const envPaths = (name, options) => { - if (typeof name !== 'string') { - throw new TypeError(`Expected string, got ${typeof name}`); - } - - options = Object.assign({suffix: 'nodejs'}, options); - - if (options.suffix) { - // Add suffix to prevent possible conflict with native apps - name += `-${options.suffix}`; - } - - if (process.platform === 'darwin') { - return macos(name); - } - - if (process.platform === 'win32') { - return windows(name); - } - - return linux(name); -}; - -module.exports = envPaths; -// TODO: Remove this for the next major release -module.exports.default = envPaths; - - -/***/ }), - -/***/ "./node_modules/escape-goat/index.js": -/*!*******************************************!*\ - !*** ./node_modules/escape-goat/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.htmlEscape = string => string - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(//g, '>'); - -exports.htmlUnescape = htmlString => htmlString - .replace(/>/g, '>') - .replace(/</g, '<') - .replace(/�?39;/g, '\'') - .replace(/"/g, '"') - .replace(/&/g, '&'); - -exports.htmlEscapeTag = (strings, ...values) => { - let output = strings[0]; - for (let i = 0; i < values.length; i++) { - output = output + exports.htmlEscape(String(values[i])) + strings[i + 1]; - } - - return output; -}; - -exports.htmlUnescapeTag = (strings, ...values) => { - let output = strings[0]; - for (let i = 0; i < values.length; i++) { - output = output + exports.htmlUnescape(String(values[i])) + strings[i + 1]; - } - - return output; -}; - - -/***/ }), - -/***/ "./node_modules/ext-list/index.js": -/*!****************************************!*\ - !*** ./node_modules/ext-list/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var mimeDb = __webpack_require__(/*! mime-db */ "./node_modules/mime-db/index.js"); - -module.exports = function () { - var ret = {}; - - Object.keys(mimeDb).forEach(function (x) { - var val = mimeDb[x]; - - if (val.extensions && val.extensions.length > 0) { - val.extensions.forEach(function (y) { - ret[y] = x; - }); - } - }); - - return ret; -}; - - -/***/ }), - -/***/ "./node_modules/ext-name/index.js": -/*!****************************************!*\ - !*** ./node_modules/ext-name/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const extList = __webpack_require__(/*! ext-list */ "./node_modules/ext-list/index.js"); -const sortKeysLength = __webpack_require__(/*! sort-keys-length */ "./node_modules/sort-keys-length/index.js"); - -module.exports = str => { - const obj = sortKeysLength.desc(extList()); - const exts = Object.keys(obj).filter(x => str.endsWith(x)); - - if (exts.length === 0) { - return []; - } - - return exts.map(x => ({ - ext: x, - mime: obj[x] - })); -}; - -module.exports.mime = str => { - const obj = sortKeysLength.desc(extList()); - const exts = Object.keys(obj).filter(x => obj[x] === str); - - if (exts.length === 0) { - return []; - } - - return exts.map(x => ({ - ext: x, - mime: obj[x] - })); -}; - - -/***/ }), - -/***/ "./node_modules/fast-deep-equal/index.js": -/*!***********************************************!*\ - !*** ./node_modules/fast-deep-equal/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// do not edit .js files directly - edit src/index.jst - - - -module.exports = function equal(a, b) { - if (a === b) return true; - - if (a && b && typeof a == 'object' && typeof b == 'object') { - if (a.constructor !== b.constructor) return false; - - var length, i, keys; - if (Array.isArray(a)) { - length = a.length; - if (length != b.length) return false; - for (i = length; i-- !== 0;) - if (!equal(a[i], b[i])) return false; - return true; - } - - - - if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; - if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); - if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - - keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) return false; - - for (i = length; i-- !== 0;) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; - - for (i = length; i-- !== 0;) { - var key = keys[i]; - - if (!equal(a[key], b[key])) return false; - } - - return true; - } - - // true if both NaN, false otherwise - return a!==a && b!==b; -}; - - -/***/ }), - -/***/ "./node_modules/fast-json-stable-stringify/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/fast-json-stable-stringify/index.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (data, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; - - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - var seen = []; - return (function stringify (node) { - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - - if (node === undefined) return; - if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; - if (typeof node !== 'object') return JSON.stringify(node); - - var i, out; - if (Array.isArray(node)) { - out = '['; - for (i = 0; i < node.length; i++) { - if (i) out += ','; - out += stringify(node[i]) || 'null'; - } - return out + ']'; - } - - if (node === null) return 'null'; - - if (seen.indexOf(node) !== -1) { - if (cycles) return JSON.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } - - var seenIndex = seen.push(node) - 1; - var keys = Object.keys(node).sort(cmp && cmp(node)); - out = ''; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node[key]); - - if (!value) continue; - if (out) out += ','; - out += JSON.stringify(key) + ':' + value; - } - seen.splice(seenIndex, 1); - return '{' + out + '}'; - })(data); -}; - - -/***/ }), - -/***/ "./node_modules/find-up/index.js": -/*!***************************************!*\ - !*** ./node_modules/find-up/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(/*! path */ "path"); -const locatePath = __webpack_require__(/*! locate-path */ "./node_modules/locate-path/index.js"); - -module.exports = (filename, opts = {}) => { - const startDir = path.resolve(opts.cwd || ''); - const {root} = path.parse(startDir); - - const filenames = [].concat(filename); - - return new Promise(resolve => { - (function find(dir) { - locatePath(filenames, {cwd: dir}).then(file => { - if (file) { - resolve(path.join(dir, file)); - } else if (dir === root) { - resolve(null); - } else { - find(path.dirname(dir)); - } - }); - })(startDir); - }); -}; - -module.exports.sync = (filename, opts = {}) => { - let dir = path.resolve(opts.cwd || ''); - const {root} = path.parse(dir); - - const filenames = [].concat(filename); - - // eslint-disable-next-line no-constant-condition - while (true) { - const file = locatePath.sync(filenames, {cwd: dir}); - - if (file) { - return path.join(dir, file); - } - - if (dir === root) { - return null; - } - - dir = path.dirname(dir); - } -}; - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/copy-sync/copy-sync.js": -/*!**********************************************************!*\ - !*** ./node_modules/fs-extra/lib/copy-sync/copy-sync.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const mkdirsSync = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirsSync -const utimesMillisSync = __webpack_require__(/*! ../util/utimes */ "./node_modules/fs-extra/lib/util/utimes.js").utimesMillisSync -const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function copySync (src, dest, opts) { - if (typeof opts === 'function') { - opts = { filter: opts } - } - - opts = opts || {} - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts) - stat.checkParentPathsSync(src, srcStat, dest, 'copy') - return handleFilterAndCopy(destStat, src, dest, opts) -} - -function handleFilterAndCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - const destParent = path.dirname(dest) - if (!fs.existsSync(destParent)) mkdirsSync(destParent) - return getStats(destStat, src, dest, opts) -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - return getStats(destStat, src, dest, opts) -} - -function getStats (destStat, src, dest, opts) { - const statSync = opts.dereference ? fs.statSync : fs.lstatSync - const srcStat = statSync(src) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) - else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`) - else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`) - throw new Error(`Unknown file: ${src}`) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (!destStat) return copyFile(srcStat, src, dest, opts) - return mayCopyFile(srcStat, src, dest, opts) -} - -function mayCopyFile (srcStat, src, dest, opts) { - if (opts.overwrite) { - fs.unlinkSync(dest) - return copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new Error(`'${dest}' already exists`) - } -} - -function copyFile (srcStat, src, dest, opts) { - fs.copyFileSync(src, dest) - if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest) - return setDestMode(dest, srcStat.mode) -} - -function handleTimestamps (srcMode, src, dest) { - // Make sure the file is writable before setting the timestamp - // otherwise open fails with EPERM when invoked with 'r+' - // (through utimes call) - if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode) - return setDestTimestamps(src, dest) -} - -function fileIsNotWritable (srcMode) { - return (srcMode & 0o200) === 0 -} - -function makeFileWritable (dest, srcMode) { - return setDestMode(dest, srcMode | 0o200) -} - -function setDestMode (dest, srcMode) { - return fs.chmodSync(dest, srcMode) -} - -function setDestTimestamps (src, dest) { - // The initial srcStat.atime cannot be trusted - // because it is modified by the read(2) system call - // (See https://nodejs.org/api/fs.html#fs_stat_time_values) - const updatedSrcStat = fs.statSync(src) - return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts) - return copyDir(src, dest, opts) -} - -function mkDirAndCopy (srcMode, src, dest, opts) { - fs.mkdirSync(dest) - copyDir(src, dest, opts) - return setDestMode(dest, srcMode) -} - -function copyDir (src, dest, opts) { - fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) -} - -function copyDirItem (item, src, dest, opts) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts) - return startCopy(destStat, srcItem, destItem, opts) -} - -function onLink (destStat, src, dest, opts) { - let resolvedSrc = fs.readlinkSync(src) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlinkSync(resolvedSrc, dest) - } else { - let resolvedDest - try { - resolvedDest = fs.readlinkSync(dest) - } catch (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) - throw err - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) - } - - // prevent copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) - } - return copyLink(resolvedSrc, dest) - } -} - -function copyLink (resolvedSrc, dest) { - fs.unlinkSync(dest) - return fs.symlinkSync(resolvedSrc, dest) -} - -module.exports = copySync - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/copy-sync/index.js": -/*!******************************************************!*\ - !*** ./node_modules/fs-extra/lib/copy-sync/index.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - copySync: __webpack_require__(/*! ./copy-sync */ "./node_modules/fs-extra/lib/copy-sync/copy-sync.js") -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/copy/copy.js": -/*!************************************************!*\ - !*** ./node_modules/fs-extra/lib/copy/copy.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const mkdirs = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirs -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists -const utimesMillis = __webpack_require__(/*! ../util/utimes */ "./node_modules/fs-extra/lib/util/utimes.js").utimesMillis -const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function copy (src, dest, opts, cb) { - if (typeof opts === 'function' && !cb) { - cb = opts - opts = {} - } else if (typeof opts === 'function') { - opts = { filter: opts } - } - - cb = cb || function () {} - opts = opts || {} - - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - stat.checkPaths(src, dest, 'copy', opts, (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - stat.checkParentPaths(src, srcStat, dest, 'copy', err => { - if (err) return cb(err) - if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) - return checkParentDir(destStat, src, dest, opts, cb) - }) - }) -} - -function checkParentDir (destStat, src, dest, opts, cb) { - const destParent = path.dirname(dest) - pathExists(destParent, (err, dirExists) => { - if (err) return cb(err) - if (dirExists) return getStats(destStat, src, dest, opts, cb) - mkdirs(destParent, err => { - if (err) return cb(err) - return getStats(destStat, src, dest, opts, cb) - }) - }) -} - -function handleFilter (onInclude, destStat, src, dest, opts, cb) { - Promise.resolve(opts.filter(src, dest)).then(include => { - if (include) return onInclude(destStat, src, dest, opts, cb) - return cb() - }, error => cb(error)) -} - -function startCopy (destStat, src, dest, opts, cb) { - if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) - return getStats(destStat, src, dest, opts, cb) -} - -function getStats (destStat, src, dest, opts, cb) { - const stat = opts.dereference ? fs.stat : fs.lstat - stat(src, (err, srcStat) => { - if (err) return cb(err) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) - else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)) - else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`)) - return cb(new Error(`Unknown file: ${src}`)) - }) -} - -function onFile (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return copyFile(srcStat, src, dest, opts, cb) - return mayCopyFile(srcStat, src, dest, opts, cb) -} - -function mayCopyFile (srcStat, src, dest, opts, cb) { - if (opts.overwrite) { - fs.unlink(dest, err => { - if (err) return cb(err) - return copyFile(srcStat, src, dest, opts, cb) - }) - } else if (opts.errorOnExist) { - return cb(new Error(`'${dest}' already exists`)) - } else return cb() -} - -function copyFile (srcStat, src, dest, opts, cb) { - fs.copyFile(src, dest, err => { - if (err) return cb(err) - if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb) - return setDestMode(dest, srcStat.mode, cb) - }) -} - -function handleTimestampsAndMode (srcMode, src, dest, cb) { - // Make sure the file is writable before setting the timestamp - // otherwise open fails with EPERM when invoked with 'r+' - // (through utimes call) - if (fileIsNotWritable(srcMode)) { - return makeFileWritable(dest, srcMode, err => { - if (err) return cb(err) - return setDestTimestampsAndMode(srcMode, src, dest, cb) - }) - } - return setDestTimestampsAndMode(srcMode, src, dest, cb) -} - -function fileIsNotWritable (srcMode) { - return (srcMode & 0o200) === 0 -} - -function makeFileWritable (dest, srcMode, cb) { - return setDestMode(dest, srcMode | 0o200, cb) -} - -function setDestTimestampsAndMode (srcMode, src, dest, cb) { - setDestTimestamps(src, dest, err => { - if (err) return cb(err) - return setDestMode(dest, srcMode, cb) - }) -} - -function setDestMode (dest, srcMode, cb) { - return fs.chmod(dest, srcMode, cb) -} - -function setDestTimestamps (src, dest, cb) { - // The initial srcStat.atime cannot be trusted - // because it is modified by the read(2) system call - // (See https://nodejs.org/api/fs.html#fs_stat_time_values) - fs.stat(src, (err, updatedSrcStat) => { - if (err) return cb(err) - return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb) - }) -} - -function onDir (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb) - return copyDir(src, dest, opts, cb) -} - -function mkDirAndCopy (srcMode, src, dest, opts, cb) { - fs.mkdir(dest, err => { - if (err) return cb(err) - copyDir(src, dest, opts, err => { - if (err) return cb(err) - return setDestMode(dest, srcMode, cb) - }) - }) -} - -function copyDir (src, dest, opts, cb) { - fs.readdir(src, (err, items) => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) -} - -function copyDirItems (items, src, dest, opts, cb) { - const item = items.pop() - if (!item) return cb() - return copyDirItem(items, item, src, dest, opts, cb) -} - -function copyDirItem (items, item, src, dest, opts, cb) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => { - if (err) return cb(err) - const { destStat } = stats - startCopy(destStat, srcItem, destItem, opts, err => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) - }) -} - -function onLink (destStat, src, dest, opts, cb) { - fs.readlink(src, (err, resolvedSrc) => { - if (err) return cb(err) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlink(resolvedSrc, dest, cb) - } else { - fs.readlink(dest, (err, resolvedDest) => { - if (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) - return cb(err) - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) - } - - // do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) - } - return copyLink(resolvedSrc, dest, cb) - }) - } - }) -} - -function copyLink (resolvedSrc, dest, cb) { - fs.unlink(dest, err => { - if (err) return cb(err) - return fs.symlink(resolvedSrc, dest, cb) - }) -} - -module.exports = copy - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/copy/index.js": -/*!*************************************************!*\ - !*** ./node_modules/fs-extra/lib/copy/index.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -module.exports = { - copy: u(__webpack_require__(/*! ./copy */ "./node_modules/fs-extra/lib/copy/copy.js")) -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/empty/index.js": -/*!**************************************************!*\ - !*** ./node_modules/fs-extra/lib/empty/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise -const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") -const path = __webpack_require__(/*! path */ "path") -const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") -const remove = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js") - -const emptyDir = u(async function emptyDir (dir) { - let items - try { - items = await fs.readdir(dir) - } catch { - return mkdir.mkdirs(dir) - } - - return Promise.all(items.map(item => remove.remove(path.join(dir, item)))) -}) - -function emptyDirSync (dir) { - let items - try { - items = fs.readdirSync(dir) - } catch { - return mkdir.mkdirsSync(dir) - } - - items.forEach(item => { - item = path.join(dir, item) - remove.removeSync(item) - }) -} - -module.exports = { - emptyDirSync, - emptydirSync: emptyDirSync, - emptyDir, - emptydir: emptyDir -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/file.js": -/*!**************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/file.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const path = __webpack_require__(/*! path */ "path") -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") - -function createFile (file, callback) { - function makeFile () { - fs.writeFile(file, '', err => { - if (err) return callback(err) - callback() - }) - } - - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err - if (!err && stats.isFile()) return callback() - const dir = path.dirname(file) - fs.stat(dir, (err, stats) => { - if (err) { - // if the directory doesn't exist, make it - if (err.code === 'ENOENT') { - return mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeFile() - }) - } - return callback(err) - } - - if (stats.isDirectory()) makeFile() - else { - // parent is not a directory - // This is just to cause an internal ENOTDIR error to be thrown - fs.readdir(dir, err => { - if (err) return callback(err) - }) - } - }) - }) -} - -function createFileSync (file) { - let stats - try { - stats = fs.statSync(file) - } catch {} - if (stats && stats.isFile()) return - - const dir = path.dirname(file) - try { - if (!fs.statSync(dir).isDirectory()) { - // parent is not a directory - // This is just to cause an internal ENOTDIR error to be thrown - fs.readdirSync(dir) - } - } catch (err) { - // If the stat call above failed because the directory doesn't exist, create it - if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir) - else throw err - } - - fs.writeFileSync(file, '') -} - -module.exports = { - createFile: u(createFile), - createFileSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/index.js": -/*!***************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const file = __webpack_require__(/*! ./file */ "./node_modules/fs-extra/lib/ensure/file.js") -const link = __webpack_require__(/*! ./link */ "./node_modules/fs-extra/lib/ensure/link.js") -const symlink = __webpack_require__(/*! ./symlink */ "./node_modules/fs-extra/lib/ensure/symlink.js") - -module.exports = { - // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, - // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, - // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/link.js": -/*!**************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/link.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const path = __webpack_require__(/*! path */ "path") -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists -const { areIdentical } = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function createLink (srcpath, dstpath, callback) { - function makeLink (srcpath, dstpath) { - fs.link(srcpath, dstpath, err => { - if (err) return callback(err) - callback(null) - }) - } - - fs.lstat(dstpath, (_, dstStat) => { - fs.lstat(srcpath, (err, srcStat) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureLink') - return callback(err) - } - if (dstStat && areIdentical(srcStat, dstStat)) return callback(null) - - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeLink(srcpath, dstpath) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeLink(srcpath, dstpath) - }) - }) - }) - }) -} - -function createLinkSync (srcpath, dstpath) { - let dstStat - try { - dstStat = fs.lstatSync(dstpath) - } catch {} - - try { - const srcStat = fs.lstatSync(srcpath) - if (dstStat && areIdentical(srcStat, dstStat)) return - } catch (err) { - err.message = err.message.replace('lstat', 'ensureLink') - throw err - } - - const dir = path.dirname(dstpath) - const dirExists = fs.existsSync(dir) - if (dirExists) return fs.linkSync(srcpath, dstpath) - mkdir.mkdirsSync(dir) - - return fs.linkSync(srcpath, dstpath) -} - -module.exports = { - createLink: u(createLink), - createLinkSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/symlink-paths.js": -/*!***********************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/symlink-paths.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(/*! path */ "path") -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists - -/** - * Function that returns two types of paths, one relative to symlink, and one - * relative to the current working directory. Checks if path is absolute or - * relative. If the path is relative, this function checks if the path is - * relative to symlink or relative to current working directory. This is an - * initiative to find a smarter `srcpath` to supply when building symlinks. - * This allows you to determine which path to use out of one of three possible - * types of source paths. The first is an absolute path. This is detected by - * `path.isAbsolute()`. When an absolute path is provided, it is checked to - * see if it exists. If it does it's used, if not an error is returned - * (callback)/ thrown (sync). The other two options for `srcpath` are a - * relative url. By default Node's `fs.symlink` works by creating a symlink - * using `dstpath` and expects the `srcpath` to be relative to the newly - * created symlink. If you provide a `srcpath` that does not exist on the file - * system it results in a broken symlink. To minimize this, the function - * checks to see if the 'relative to symlink' source file exists, and if it - * does it will use it. If it does not, it checks if there's a file that - * exists that is relative to the current working directory, if does its used. - * This preserves the expectations of the original fs.symlink spec and adds - * the ability to pass in `relative to current working direcotry` paths. +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=383)}([function(e,t){e.exports=require("path")},function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("fs")},function(e,t,r){"use strict";var n=r(20),i=r(127),a=r(56),o=r(300),s=r(40);function c(e){return e}function l(e,t){for(var r=0;r1;)try{return u.stringifyByChunk(e,n,r)}catch(e){r=Math.floor(r/2)}return u.stringifyByChar(e)}function d(e,t){for(var r=0;ri)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=u},function(e,t,r){const n=r(49),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=r(48),{re:o,t:s}=r(31),c=r(50),{compareIdentifiers:l}=r(72);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=u},function(e,t,r){var n,i,a=r(2),o=r(168),s=r(170),c=r(171),l=r(9);function u(e,t){Object.defineProperty(e,n,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(n=Symbol.for("graceful-fs.queue"),i=Symbol.for("graceful-fs.previous")):(n="___graceful-fs.queue",i="___graceful-fs.previous");var p,d=function(){};if(l.debuglog?d=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!a[n]){var h=global[n]||[];u(a,h),a.close=function(e){function t(t,r){return e.call(a,t,(function(e){e||v(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,i,{value:e}),t}(a.close),a.closeSync=function(e){function t(t){e.apply(a,arguments),v()}return Object.defineProperty(t,i,{value:e}),t}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(a[n]),r(23).equal(a[n].length,0)}))}function f(e){o(e),e.gracefulify=f,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):m([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):m([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var c=s(e);h=c.ReadStream,v=c.WriteStream}var l=e.ReadStream;l&&(h.prototype=Object.create(l.prototype),h.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(v.prototype=Object.create(u.prototype),v.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var p=h;Object.defineProperty(e,"FileReadStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var d=v;function h(e,t){return this instanceof h?(l.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function v(e,t){return this instanceof v?(u.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var g=e.open;function b(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return g(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):m([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=b,e}function m(e){d("ENQUEUE",e[0].name,e[1]),a[n].push(e),g()}function v(){for(var e=Date.now(),t=0;t2&&(a[n][t][3]=e,a[n][t][4]=e);g()}function g(){if(clearTimeout(p),p=void 0,0!==a[n].length){var e=a[n].shift(),t=e[0],r=e[1],i=e[2],o=e[3],s=e[4];if(void 0===o)d("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){d("TIMEOUT",t.name,r);var c=r.pop();"function"==typeof c&&c.call(null,i)}else{var l=Date.now()-s,u=Math.max(s-o,1);l>=Math.min(1.2*u,100)?(d("RETRY",t.name,r),t.apply(null,r.concat([o]))):a[n].push(e)}void 0===p&&(p=setTimeout(g,0))}}global[n]||u(global,a[n]),e.exports=f(c(a)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched&&(e.exports=f(a),a.__patched=!0)},function(e,t,r){"use strict";t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise((r,n)=>{e.call(this,...t,(e,t)=>null!=e?n(e):r(t))});e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(e=>r(null,e),r)}),"name",{value:e.name})}},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},e.exports=n},function(e,t,r){const n=r(5);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},function(e,t,r){class n{constructor(e,t){if(t=a(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=i.get(t);if(r)return r;const n=this.options.loose,a=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(a,C(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],p),s("comparator trim",e,l[u.COMPARATORTRIM]),e=(e=(e=e.replace(l[u.TILDETRIM],d)).replace(l[u.CARETTRIM],h)).split(/\s+/).join(" ");const c=n?l[u.COMPARATORLOOSE]:l[u.COMPARATOR],m=e.split(" ").map(e=>g(e,this.options)).join(" ").split(/\s+/).map(e=>k(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new o(e,this.options)),v=(m.length,new Map);for(const e of m){if(f(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const b=[...v.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},g=(e,t)=>(s("comp",e,t),e=w(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=D(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,(t,r,n,i,a)=>{let o;return s("tilde",e,t,r,n,i,a),b(r)?o="":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${r}.${n}.${i}-${a} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,s("tilde return",o),o})},w=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{s("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,o)=>{let c;return s("caret",e,t,r,i,a,o),b(r)?c="":b(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(a)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${a}${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),s("caret return",c),c})},D=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>_(e,t)).join(" ")),_=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,(r,n,i,a,o,c)=>{s("xRange",e,r,n,i,a,o,c);const l=b(i),u=l||b(a),p=u||b(o),d=p;return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(a=0),o=0,">"===n?(n=">=",u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),"<"===n&&(c="-0"),r=`${n+i}.${a}.${o}${c}`):u?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",r),r})},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),C=e=>(t,r,n,i,a,o,s,c,l,u,p,d,h)=>`${r=b(n)?"":b(i)?`>=${n}.0.0${e?"-0":""}`:b(a)?`>=${n}.${i}.0${e?"-0":""}`:o?">="+r:`>=${r}${e?"-0":""}`} ${c=b(l)?"":b(u)?`<${+l+1}.0.0-0`:b(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),A=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},function(e,t,r){const n=r(6);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},function(e,t,r){class n{constructor(e,t){if(t=a(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=i.get(t);if(r)return r;const n=this.options.loose,a=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(a,C(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],p),s("comparator trim",e,l[u.COMPARATORTRIM]),e=(e=(e=e.replace(l[u.TILDETRIM],d)).replace(l[u.CARETTRIM],h)).split(/\s+/).join(" ");const c=n?l[u.COMPARATORLOOSE]:l[u.COMPARATOR],m=e.split(" ").map(e=>g(e,this.options)).join(" ").split(/\s+/).map(e=>k(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new o(e,this.options)),v=(m.length,new Map);for(const e of m){if(f(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const b=[...v.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},g=(e,t)=>(s("comp",e,t),e=w(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=D(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,(t,r,n,i,a)=>{let o;return s("tilde",e,t,r,n,i,a),b(r)?o="":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${r}.${n}.${i}-${a} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,s("tilde return",o),o})},w=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{s("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,o)=>{let c;return s("caret",e,t,r,i,a,o),b(r)?c="":b(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(a)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${a}${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),s("caret return",c),c})},D=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>_(e,t)).join(" ")),_=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,(r,n,i,a,o,c)=>{s("xRange",e,r,n,i,a,o,c);const l=b(i),u=l||b(a),p=u||b(o),d=p;return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(a=0),o=0,">"===n?(n=">=",u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),"<"===n&&(c="-0"),r=`${n+i}.${a}.${o}${c}`):u?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",r),r})},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),C=e=>(t,r,n,i,a,o,s,c,l,u,p,d,h)=>`${r=b(n)?"":b(i)?`>=${n}.0.0${e?"-0":""}`:b(a)?`>=${n}.${i}.0${e?"-0":""}`:o?">="+r:`>=${r}${e?"-0":""}`} ${c=b(l)?"":b(u)?`<${+l+1}.0.0-0`:b(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),A=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdaterSignal=t.UPDATE_DOWNLOADED=t.DOWNLOAD_PROGRESS=t.NsisUpdater=t.MacUpdater=t.AppImageUpdater=t.Provider=t.CancellationToken=t.NoOpLogger=t.AppUpdater=void 0;const n=r(4);Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return n.CancellationToken}});var i=r(58);Object.defineProperty(t,"AppUpdater",{enumerable:!0,get:function(){return i.AppUpdater}}),Object.defineProperty(t,"NoOpLogger",{enumerable:!0,get:function(){return i.NoOpLogger}});var a=r(19);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return a.Provider}});var o=r(101);Object.defineProperty(t,"AppImageUpdater",{enumerable:!0,get:function(){return o.AppImageUpdater}});var s=r(107);Object.defineProperty(t,"MacUpdater",{enumerable:!0,get:function(){return s.MacUpdater}});var c=r(108);let l;Object.defineProperty(t,"NsisUpdater",{enumerable:!0,get:function(){return c.NsisUpdater}}),Object.defineProperty(t,"autoUpdater",{enumerable:!0,get:()=>l||(l="win32"===process.platform?new(r(108).NsisUpdater):"darwin"===process.platform?new(r(107).MacUpdater):new(r(101).AppImageUpdater),l)}),t.DOWNLOAD_PROGRESS="download-progress",t.UPDATE_DOWNLOADED="update-downloaded";t.UpdaterSignal=class{constructor(e){this.emitter=e}login(e){u(this.emitter,"login",e)}progress(e){u(this.emitter,t.DOWNLOAD_PROGRESS,e)}updateDownloaded(e){u(this.emitter,t.UPDATE_DOWNLOADED,e)}updateCancelled(e){u(this.emitter,"update-cancelled",e)}};function u(e,t,r){e.on(t,r)}},function(e,t,r){"use strict";const n=r(8).fromPromise,{makeDir:i,makeDirSync:a}=r(173),o=n(i);e.exports={mkdirs:o,mkdirsSync:a,mkdirp:o,mkdirpSync:a,ensureDir:o,ensureDirSync:a}},function(e,t){e.exports=require("url")},function(e,t){e.exports=require("stream")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveFiles=t.getFileList=t.parseUpdateInfo=t.findFile=t.Provider=void 0;const n=r(4),i=r(61),a=r(30);function o(e){const t=e.files;if(null!=t&&t.length>0)return t;if(null!=e.path)return[{url:e.path,sha2:e.sha2,sha512:e.sha512}];throw n.newError("No files provided: "+n.safeStringifyJson(e),"ERR_UPDATER_NO_FILES_PROVIDED")}t.Provider=class{constructor(e){this.runtimeOptions=e,this.requestHeaders=null,this.executor=e.executor}get isUseMultipleRangeRequest(){return!1!==this.runtimeOptions.isUseMultipleRangeRequest}getChannelFilePrefix(){if("linux"===this.runtimeOptions.platform){const e=process.env.TEST_UPDATER_ARCH||process.arch;return"-linux"+("x64"===e?"":"-"+e)}return"darwin"===this.runtimeOptions.platform?"-mac":""}getDefaultChannelName(){return this.getCustomChannelName("latest")}getCustomChannelName(e){return`${e}${this.getChannelFilePrefix()}`}get fileExtraDownloadHeaders(){return null}setRequestHeaders(e){this.requestHeaders=e}httpRequest(e,t,r){return this.executor.request(this.createRequestOptions(e,t),r)}createRequestOptions(e,t){const r={};return null==this.requestHeaders?null!=t&&(r.headers=t):r.headers=null==t?this.requestHeaders:{...this.requestHeaders,...t},n.configureRequestUrl(e,r),r}},t.findFile=function(e,t,r){if(0===e.length)throw n.newError("No files provided","ERR_UPDATER_NO_FILES_PROVIDED");const i=e.find(e=>e.url.pathname.toLowerCase().endsWith("."+t));return null!=i?i:null==r?e[0]:e.find(e=>!r.some(t=>e.url.pathname.toLowerCase().endsWith("."+t)))},t.parseUpdateInfo=function(e,t,r){if(null==e)throw n.newError(`Cannot parse update info from ${t} in the latest release artifacts (${r}): rawData: null`,"ERR_UPDATER_INVALID_UPDATE_INFO");let a;try{a=i.load(e)}catch(i){throw n.newError(`Cannot parse update info from ${t} in the latest release artifacts (${r}): ${i.stack||i.message}, rawData: ${e}`,"ERR_UPDATER_INVALID_UPDATE_INFO")}return a},t.getFileList=o,t.resolveFiles=function(e,t,r=(e=>e)){const i=o(e).map(e=>{if(null==e.sha2&&null==e.sha512)throw n.newError("Update info doesn't contain nor sha256 neither sha512 checksum: "+n.safeStringifyJson(e),"ERR_UPDATER_NO_CHECKSUM");return{url:a.newUrlFromBase(r(e.url),t),info:e}}),s=e.packages,c=null==s?null:s[process.arch]||s.ia32;return null!=c&&(i[0].packageInfo={...c,path:a.newUrlFromBase(r(c.path),t).href}),i}},function(e,t,r){"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var n=new ArrayBuffer(0);try{t.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),t.blob=0===i.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!r(119).Readable}catch(e){t.nodestream=!1}},function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a!0).catch(()=>!1)})),pathExistsSync:i.existsSync}},function(e,t){e.exports=require("events")},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(7),a=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>"function"==typeof i[e]);Object.assign(t,i),a.forEach(e=>{t[e]=n(i[e])}),t.realpath.native=n(i.realpath.native),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise(t=>i.exists(e,t))},t.read=function(e,t,r,n,a,o){return"function"==typeof o?i.read(e,t,r,n,a,o):new Promise((o,s)=>{i.read(e,t,r,n,a,(e,t,r)=>{if(e)return s(e);o({bytesRead:t,buffer:r})})})},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?i.write(e,t,...r):new Promise((n,a)=>{i.write(e,t,...r,(e,t,r)=>{if(e)return a(e);n({bytesWritten:t,buffer:r})})})},"function"==typeof i.writev&&(t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?i.writev(e,t,...r):new Promise((n,a)=>{i.writev(e,t,...r,(e,t,r)=>{if(e)return a(e);n({bytesWritten:t,buffers:r})})})})},function(e,t,r){"use strict";const n=r(26),i=r(0),a=r(9);function o(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch(e=>{if("ENOENT"===e.code)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function s(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function c(e,t){const r=i.resolve(e).split(i.sep).filter(e=>e),n=i.resolve(t).split(i.sep).filter(e=>e);return r.reduce((e,t,r)=>e&&n[r]===t,!0)}function l(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:function(e,t,r,n,u){a.callbackify(o)(e,t,n,(n,a)=>{if(n)return u(n);const{srcStat:o,destStat:p}=a;if(p){if(s(o,p)){const n=i.basename(e),a=i.basename(t);return"move"===r&&n!==a&&n.toLowerCase()===a.toLowerCase()?u(null,{srcStat:o,destStat:p,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!p.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!o.isDirectory()&&p.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return o.isDirectory()&&c(e,t)?u(new Error(l(e,t,r))):u(null,{srcStat:o,destStat:p})})},checkPathsSync:function(e,t,r,a){const{srcStat:o,destStat:u}=function(e,t,r){let i;const a=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),o=a(e);try{i=a(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}(e,t,a);if(u){if(s(o,u)){const n=i.basename(e),a=i.basename(t);if("move"===r&&n!==a&&n.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!o.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(o.isDirectory()&&c(e,t))throw new Error(l(e,t,r));return{srcStat:o,destStat:u}},checkParentPaths:function e(t,r,a,o,c){const u=i.resolve(i.dirname(t)),p=i.resolve(i.dirname(a));if(p===u||p===i.parse(p).root)return c();n.stat(p,{bigint:!0},(n,i)=>n?"ENOENT"===n.code?c():c(n):s(r,i)?c(new Error(l(t,a,o))):e(t,r,p,o,c))},checkParentPathsSync:function e(t,r,a,o){const c=i.resolve(i.dirname(t)),u=i.resolve(i.dirname(a));if(u===c||u===i.parse(u).root)return;let p;try{p=n.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,p))throw new Error(l(t,a,o));return e(t,r,u,o)},isSrcSubdir:c,areIdentical:s}},function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(42),i=r(43),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;i(n,t),s[e]=n,o[n]=t,a[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),l("FULL",`^${o[s.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),l("LOOSE",`^${o[s.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[s.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),l("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[s.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,r){const{MAX_LENGTH:n}=r(42),{re:i,t:a}=r(28),o=r(5),s=r(44);e.exports=(e,t)=>{if(t=s(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blockmapFiles=t.getChannelFilename=t.newUrlFromBase=t.newBaseUrl=void 0;const n=r(17),i=r(224);function a(e,t,r=!1){const i=new n.URL(e,t),a=t.search;return null!=a&&0!==a.length?i.search=a:r&&(i.search="noCache="+Date.now().toString(32)),i}t.newBaseUrl=function(e){const t=new n.URL(e);return t.pathname.endsWith("/")||(t.pathname+="/"),t},t.newUrlFromBase=a,t.getChannelFilename=function(e){return e+".yml"},t.blockmapFiles=function(e,t,r){const n=a(e.pathname+".blockmap",e);return[a(e.pathname.replace(new RegExp(i(r),"g"),t)+".blockmap",e),n]}},function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(48),i=r(49),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;i(n,t),s[e]=n,o[n]=t,a[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),l("FULL",`^${o[s.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),l("LOOSE",`^${o[s.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[s.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),l("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[s.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,r){const{MAX_LENGTH:n}=r(48),{re:i,t:a}=r(31),o=r(6),s=r(50);e.exports=(e,t)=>{if(t=s(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},function(e,t,r){try{var n=r(9);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(289)}},function(e,t,r){"use strict";for(var n=r(3),i=r(20),a=r(56),o=r(10),s=new Array(256),c=0;c<256;c++)s[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;s[254]=s[254]=1;function l(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,"utf-8"):function(e){var t,r,n,a,o,s=e.length,c=0;for(a=0;a>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,a,o=e.length,c=new Array(2*o);for(r=0,t=0;t4)c[r++]=65533,t+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&t1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(l,o),l.prototype.processChunk=function(e){var r=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(r),c=r;o!==r.length&&(i.uint8array?(c=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(c=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=l,n.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=u},function(e,t,r){"use strict";var n=r(54),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=p;var a=Object.create(r(39));a.inherits=r(33);var o=r(120),s=r(124);a.inherits(p,o);for(var c=i(s.prototype),l=0;l=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,l=i.split("/"),u=0;uconsole.error("SEMVER",...e):()=>{};e.exports=r},function(e,t){const r=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:r.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)>0},function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||a&&o||s||l}}e.exports=i;const a=r(44),{re:o,t:s}=r(28),c=r(97),l=r(43),u=r(5),p=r(12)},function(e,t,r){const n=r(12);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},function(e,t){const r=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:r,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t){const r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=r},function(e,t){const r=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:r.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)>0},function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||a&&o||s||l}}e.exports=i;const a=r(50),{re:o,t:s}=r(31),c=r(112),l=r(49),u=r(6),p=r(14)},function(e,t,r){const n=r(14);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},function(e,t,r){"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(o-1),a=0;athis.getOrCreateStagingUserId()),this.configOnDisk=new c.Lazy(()=>this.loadUpdateConfig()),this.checkForUpdatesPromise=null,this.updateInfoAndProvider=null,this._testOnlyOptions=null,this.on("error",e=>{this._logger.error("Error: "+(e.stack||e.message))}),null==t?(this.app=new d.ElectronAppAdapter,this.httpExecutor=new h.ElectronHttpExecutor((e,t)=>this.emit("login",e,t))):(this.app=t,this.httpExecutor=null);const r=this.app.version,i=u.parse(r);if(null==i)throw n.newError(`App version is not a valid semver version: "${r}"`,"ERR_UPDATER_INVALID_VERSION");this.currentVersion=i,this.allowPrerelease=function(e){const t=u.prerelease(e);return null!=t&&t.length>0}(i),null!=e&&(this.setFeedURL(e),"string"!=typeof e&&e.requestHeaders&&(this.requestHeaders=e.requestHeaders))}get channel(){return this._channel}set channel(e){if(null!=this._channel){if("string"!=typeof e)throw n.newError("Channel must be a string, but got: "+e,"ERR_UPDATER_INVALID_CHANNEL");if(0===e.length)throw n.newError("Channel must be not an empty string","ERR_UPDATER_INVALID_CHANNEL")}this._channel=e,this.allowDowngrade=!0}get netSession(){return h.getNetSession()}get logger(){return this._logger}set logger(e){this._logger=null==e?new b:e}set updateConfigPath(e){this.clientPromise=null,this._appUpdateConfigPath=e,this.configOnDisk=new c.Lazy(()=>this.loadUpdateConfig())}getFeedURL(){return"Deprecated. Do not use it."}setFeedURL(e){const t=this.createProviderRuntimeOptions();let r;r="string"==typeof e?new f.GenericProvider({provider:"generic",url:e},this,{...t,isUseMultipleRangeRequest:v.isUrlProbablySupportMultiRangeRequests(e)}):v.createClient(e,this,t),this.clientPromise=Promise.resolve(r)}checkForUpdates(){let e=this.checkForUpdatesPromise;if(null!=e)return this._logger.info("Checking for update (already in progress)"),e;const t=()=>this.checkForUpdatesPromise=null;return this._logger.info("Checking for update"),e=this.doCheckForUpdates().then(e=>(t(),e)).catch(e=>{throw t(),this.emit("error",e,"Cannot check for updates: "+(e.stack||e).toString()),e}),this.checkForUpdatesPromise=e,e}isUpdaterActive(){return!!this.app.isPackaged||(this._logger.info("Skip checkForUpdatesAndNotify because application is not packed"),!1)}checkForUpdatesAndNotify(e){return this.isUpdaterActive()?this.checkForUpdates().then(t=>{const n=t.downloadPromise;return null==n?(null!=this._logger.debug&&this._logger.debug("checkForUpdatesAndNotify called, downloadPromise is null"),t):(n.then(()=>{const n=g.formatDownloadNotification(t.updateInfo.version,this.app.name,e);new(r(1).Notification)(n).show()}),t)}):Promise.resolve(null)}static formatDownloadNotification(e,t,r){return null==r&&(r={title:"A new update is ready to install",body:"{appName} version {version} has been downloaded and will be automatically installed on exit"}),r={title:r.title.replace("{appName}",t).replace("{version}",e),body:r.body.replace("{appName}",t).replace("{version}",e)}}async isStagingMatch(e){const t=e.stagingPercentage;let r=t;if(null==r)return!0;if(r=parseInt(r,10),isNaN(r))return this._logger.warn("Staging percentage is NaN: "+t),!0;r/=100;const i=await this.stagingUserIdPromise.value,a=n.UUID.parse(i).readUInt32BE(12)/4294967295;return this._logger.info(`Staging percentage: ${r}, percentage: ${a}, user id: ${i}`),av.createClient(e,this,this.createProviderRuntimeOptions())));const e=await this.clientPromise,t=await this.stagingUserIdPromise.value;return e.setRequestHeaders(this.computeFinalHeaders({"x-user-staging-id":t})),{info:await e.getLatestVersion(),provider:e}}createProviderRuntimeOptions(){return{isUseMultipleRangeRequest:!0,platform:null==this._testOnlyOptions?process.platform:this._testOnlyOptions.platform,executor:this.httpExecutor}}async doCheckForUpdates(){this.emit("checking-for-update");const e=await this.getUpdateInfoAndProvider(),t=e.info;if(!await this.isUpdateAvailable(t))return this._logger.info(`Update for version ${this.currentVersion} is not available (latest version: ${t.version}, downgrade is ${this.allowDowngrade?"allowed":"disallowed"}).`),this.emit("update-not-available",t),{versionInfo:t,updateInfo:t};this.updateInfoAndProvider=e,this.onUpdateAvailable(t);const r=new n.CancellationToken;return{versionInfo:t,updateInfo:t,cancellationToken:r,downloadPromise:this.autoDownload?this.downloadUpdate(r):null}}onUpdateAvailable(e){this._logger.info(`Found version ${e.version} (url: ${n.asArray(e.files).map(e=>e.url).join(", ")})`),this.emit("update-available",e)}downloadUpdate(e=new n.CancellationToken){const t=this.updateInfoAndProvider;if(null==t){const e=new Error("Please check update first");return this.dispatchError(e),Promise.reject(e)}this._logger.info("Downloading update from "+n.asArray(t.info.files).map(e=>e.url).join(", "));const r=e=>{if(!(e instanceof n.CancellationError))try{this.dispatchError(e)}catch(e){this._logger.warn("Cannot dispatch error event: "+(e.stack||e))}return e};try{return this.doDownloadUpdate({updateInfoAndProvider:t,requestHeaders:this.computeRequestHeaders(t.provider),cancellationToken:e}).catch(e=>{throw r(e)})}catch(e){return Promise.reject(r(e))}}dispatchError(e){this.emit("error",e,(e.stack||e).toString())}dispatchUpdateDownloaded(e){this.emit(m.UPDATE_DOWNLOADED,e)}async loadUpdateConfig(){return null==this._appUpdateConfigPath&&(this._appUpdateConfigPath=this.app.appUpdateConfigPath),s.load(await o.readFile(this._appUpdateConfigPath,"utf-8"))}computeRequestHeaders(e){const t=e.fileExtraDownloadHeaders;if(null!=t){const e=this.requestHeaders;return null==e?t:{...t,...e}}return this.computeFinalHeaders({accept:"*/*"})}async getOrCreateStagingUserId(){const e=l.join(this.app.userDataPath,".updaterId");try{const t=await o.readFile(e,"utf-8");if(n.UUID.check(t))return t;this._logger.warn("Staging user id file exists, but content was invalid: "+t)}catch(e){"ENOENT"!==e.code&&this._logger.warn("Couldn't read staging user ID, creating a blank one: "+e)}const t=n.UUID.v5(i.randomBytes(4096),n.UUID.OID);this._logger.info("Generated new staging user ID: "+t);try{await o.outputFile(e,t)}catch(e){this._logger.warn("Couldn't write out staging user ID: "+e)}return t}get isAddNoCacheQuery(){const e=this.requestHeaders;if(null==e)return!0;for(const t of Object.keys(e)){const e=t.toLowerCase();if("authorization"===e||"private-token"===e)return!1}return!0}async getOrCreateDownloadHelper(){let e=this.downloadedUpdateHelper;if(null==e){const t=(await this.configOnDisk.value).updaterCacheDirName,r=this._logger;null==t&&r.error("updaterCacheDirName is not specified in app-update.yml Was app build using at least electron-builder 20.34.0?");const n=l.join(this.app.baseCachePath,t||this.app.name);null!=r.debug&&r.debug("updater cache dir: "+n),e=new p.DownloadedUpdateHelper(n),this.downloadedUpdateHelper=e}return e}async executeDownload(e){const t=e.fileInfo,r={headers:e.downloadUpdateOptions.requestHeaders,cancellationToken:e.downloadUpdateOptions.cancellationToken,sha2:t.info.sha2,sha512:t.info.sha512};this.listenerCount(m.DOWNLOAD_PROGRESS)>0&&(r.onProgress=e=>this.emit(m.DOWNLOAD_PROGRESS,e));const i=e.downloadUpdateOptions.updateInfoAndProvider.info,a=i.version,s=t.packageInfo;const c=await this.getOrCreateDownloadHelper(),u=c.cacheDirForPendingUpdate;await o.ensureDir(u);const d=function(){const t=decodeURIComponent(e.fileInfo.url.pathname);return t.endsWith("."+e.fileExtension)?l.posix.basename(t):"update."+e.fileExtension}();let h=l.join(u,d);const f=null==s?null:l.join(u,`package-${a}${l.extname(s.path)||".7z"}`),v=async r=>(await c.setDownloadedFile(h,f,i,t,d,r),await e.done({...i,downloadedFile:h}),null==f?[h]:[h,f]),g=this._logger,b=await c.validateDownloadedPath(h,i,t,g);if(null!=b)return h=b,await v(!1);const y=async()=>(await c.clear().catch(()=>{}),await o.unlink(h).catch(()=>{})),x=await p.createTempUpdateFile("temp-"+d,u,g);try{await e.task(x,r,f,y),await o.rename(x,h)}catch(e){throw await y(),e instanceof n.CancellationError&&(g.info("cancelled"),this.emit("update-cancelled",i)),e}return g.info(`New version ${a} has been downloaded to ${h}`),await v(!0)}}t.AppUpdater=g;class b{info(e){}warn(e){}error(e){}}t.NoOpLogger=b},function(e,t){e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const a=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+a},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(7),a=r(0),o=r(16),s=r(24).pathExists;e.exports={outputFile:n((function(e,t,r,n){"function"==typeof r&&(n=r,r="utf8");const c=a.dirname(e);s(c,(a,s)=>a?n(a):s?i.writeFile(e,t,r,n):void o.mkdirs(c,a=>{if(a)return n(a);i.writeFile(e,t,r,n)}))})),outputFileSync:function(e,...t){const r=a.dirname(e);if(i.existsSync(r))return i.writeFileSync(e,...t);o.mkdirsSync(r),i.writeFileSync(e,...t)}}},function(e,t,r){"use strict"; +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function n(e){return null==e}r.r(t),r.d(t,"CORE_SCHEMA",(function(){return rt})),r.d(t,"DEFAULT_SCHEMA",(function(){return nt})),r.d(t,"FAILSAFE_SCHEMA",(function(){return et})),r.d(t,"JSON_SCHEMA",(function(){return tt})),r.d(t,"Schema",(function(){return Je})),r.d(t,"Type",(function(){return Ze})),r.d(t,"YAMLException",(function(){return st})),r.d(t,"dump",(function(){return ot})),r.d(t,"load",(function(){return it})),r.d(t,"loadAll",(function(){return at})),r.d(t,"safeDump",(function(){return pt})),r.d(t,"safeLoad",(function(){return lt})),r.d(t,"safeLoadAll",(function(){return ut})),r.d(t,"types",(function(){return ct}));var i={isNothing:n,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:n(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;rs&&(t=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+a.length}}function l(e,t){return i.repeat(" ",t-e.length)+e}var u=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,a=[0],o=[],s=-1;r=n.exec(e.buffer);)o.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var u,p,d="",h=Math.min(e.line+t.linesAfter,o.length).toString().length,f=t.maxLength-(t.indent+h+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=c(e.buffer,a[s-u],o[s-u],e.position-(a[s]-a[s-u]),f),d=i.repeat(" ",t.indent)+l((e.line-u+1).toString(),h)+" | "+p.str+"\n"+d;for(p=c(e.buffer,a[s],o[s],e.position,f),d+=i.repeat(" ",t.indent)+l((e.line+1).toString(),h)+" | "+p.str+"\n",d+=i.repeat("-",t.indent+h+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=o.length);u++)p=c(e.buffer,a[s+u],o[s+u],e.position-(a[s]-a[s+u]),f),d+=i.repeat(" ",t.indent)+l((e.line+u+1).toString(),h)+" | "+p.str+"\n";return d.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===p.indexOf(t))throw new s('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],r=[];if(e instanceof h)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(m.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=f(n,"implicit"),n.compiledExplicit=f(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),k=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var C=/^[-+]?[0-9]+e/;var A=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!k.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return r=e.toString(10),C.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),O=x.extend({implicit:[w,E,S,A]}),I=O,R=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==R.exec(e)||null!==P.exec(e))},construct:function(e){var t,r,n,i,a,o,s,c,l=0,u=null;if(null===(t=R.exec(e))&&(t=P.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var T=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var j=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,i=e.length,a=N;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=N,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",i=0,a=e.length,o=N;for(t=0;t>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),L=Object.prototype.hasOwnProperty,$=Object.prototype.toString;var U=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=[],s=e;for(t=0,r=s.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),oe=new Array(256),se=0;se<256;se++)ae[se]=ne(se)?1:0,oe[se]=ne(se);function ce(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=u(r),new s(t,r)}function ue(e,t){throw le(e,t)}function pe(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var de={YAML:function(e,t,r){var n,i,a;null!==e.version&&ue(e,"duplication of %YAML directive"),1!==r.length&&ue(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&ue(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&ue(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&pe(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&ue(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Y.test(n)||ue(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,n)&&ue(e,'there is a previously declared suffix for "'+n+'" tag handle'),Q.test(i)||ue(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){ue(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function he(e,t,r,n){var i,a,o,s;if(t1&&(e.result+=i.repeat("\n",t-1))}function xe(e,t){var r,n,i=e.tag,a=e.anchor,o=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),45===n)&&ee(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,De(e,t,3,!1,!0),o.push(e.result),ge(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)ue(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(g&&(o=e.line,s=e.lineStart,c=e.position),De(e,t,4,!0,i)&&(g?m=e.result:v=e.result),g||(me(e,d,h,f,m,v,o,s,c),f=m=v=null),ge(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==l)ue(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===a?ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ue(e,"repeat of an indentation width identifier"):(p=t+a-1,u=!0)}if(J(o)){do{o=e.input.charCodeAt(++e.position)}while(J(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!Z(o)&&0!==o)}for(;0!==o;){for(ve(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),Z(o))d++;else{if(e.lineIndent0){for(i=o,a=0;i>0;i--)(o=re(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+o:ue(e,"expected hexadecimal character");e.result+=ie(a),e.position++}else ue(e,"unknown escape sequence");r=n=e.position}else Z(s)?(he(e,r,n,!0),ye(e,ge(e,!1,t)),r=n=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ue(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!ee(n)&&!te(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),H.call(e.anchorMap,r)||ue(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ge(e,!0,-1),!0}(e)?function(e,t,r){var n,i,a,o,s,c,l,u,p=e.kind,d=e.result;if(ee(u=e.input.charCodeAt(e.position))||te(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;0!==u;){if(58===u){if(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n))break}else if(35===u){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&be(e)||r&&te(u))break;if(Z(u)){if(s=e.line,c=e.lineStart,l=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=c,e.lineIndent=l;break}}o&&(he(e,i,a,!1),ye(e,e.line-s),i=a=e.position,o=!1),J(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return he(e,i,a,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,h,1===r)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||ue(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(g=c&&xe(e,f))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ue(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,u=e.implicitTypes.length;l"),null!==e.result&&d.kind!==e.kind&&ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function _e(e){var t,r,n,i,a=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!ee(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&ue(e,"directive name must not be less than one character in length");0!==i;){for(;J(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!Z(i));break}if(Z(i))break;for(t=e.position;0!==i&&!ee(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&ve(e),H.call(de,r)?de[r](e,r,n):pe(e,'unknown document directive "'+r+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):o&&ue(e,"directives end mark is expected"),De(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&W.test(e.input.slice(a,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&be(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&n<=56319&&t+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Me(e){return/^\n* /.test(e)}function ze(e,t,r,n,i,a,o,s){var c,l,u=0,p=null,d=!1,h=!1,f=-1!==n,m=-1,v=Le(l=Be(e,0))&&65279!==l&&!je(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&function(e){return!je(e)&&58!==e}(Be(e,e.length-1));if(t||o)for(c=0;c=65536?c+=2:c++){if(!Le(u=Be(e,c)))return 5;v=v&&Ue(u,p,s),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Be(e,c)))d=!0,f&&(h=h||c-m-1>n&&" "!==e[m+1],m=c);else if(!Le(u))return 5;v=v&&Ue(u,p,s),p=u}h=h||f&&c-m-1>n&&" "!==e[m+1]}return d||h?r>9&&Me(e)?5:o?2===a?5:2:h?4:3:!v||o||i(e)?2===a?5:2:1}function qe(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ie.indexOf(t)||Re.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=n||e.flowLevel>-1&&r>=e.flowLevel;switch(ze(t,c,e.indent,o,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r"+Ge(t,e.indent)+He(Te(function(e,t){var r,n,i=/(\n+)([^\n]*)/g,a=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,Ve(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];var s;for(;n=i.exec(e);){var c=n[1],l=n[2];r=" "===l[0],a+=c+(o||r||""===l?"":"\n")+Ve(l,t),o=r}return a}(t,o),a));case 5:return'"'+function(e){for(var t,r="",n=0,i=0;i=65536?i+=2:i++)n=Be(e,i),!(t=Oe[n])&&Le(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Pe(n);return r}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function Ge(e,t){var r=Me(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function He(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ve(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,c="";r=i.exec(e);)(s=r.index)-a>t&&(n=o>a?o:s,c+="\n"+e.slice(a,n),a=n+1),o=s;return c+="\n",e.length-a>t&&o>a?c+=e.slice(a,o)+"\n"+e.slice(o+1):c+=e.slice(a),c.slice(1)}function We(e,t,r,n){var i,a,o,s="",c=e.tag;for(i=0,a=r.length;i tag resolver accepts not "'+l+'" style');n=c.represent[l](t,l)}e.dump=n}return!0}return!1}function Ye(e,t,r,n,i,a,o){e.tag=null,e.dump=r,Xe(e,r,!1)||Xe(e,r,!0);var c,l=Ce.call(e.dump),u=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var p,d,h="[object Object]"===l||"[object Array]"===l;if(h&&(d=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(i=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(h&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var i,a,o,c,l,u,p="",d=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(i=0,a=h.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,l&&(u+=Ne(e,t)),Ye(e,t+1,c,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,i,a,o,s,c="",l=e.tag,u=Object.keys(r);for(n=0,i=u.length;n1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ye(e,t,o,!1,!1)&&(c+=s+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?We(e,t-1,e.dump,i):We(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,i,a,o="",s=e.tag;for(n=0,i=r.length;n",e.dump=c+" "+e.dump)}return!0}function Qe(e,t){var r,n,i=[],a=[];for(function e(t,r,n){var i,a,o;if(null!==t&&"object"==typeof t)if(-1!==(a=r.indexOf(t)))-1===n.indexOf(a)&&n.push(a);else if(r.push(t),Array.isArray(t))for(a=0,o=t.length;a{const n=r.test(e),i=r.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:en(t,e)}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>0===n(e,t,r)},function(e,t,r){const n=r(5);e.exports=(e,t,r)=>{const i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)<0},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)>=0},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)<=0},function(e,t,r){const n=r(5),i=r(46),{ANY:a}=i,o=r(12),s=r(47),c=r(45),l=r(65),u=r(67),p=r(66);e.exports=(e,t,r,d)=>{let h,f,m,v,g;switch(e=new n(e,d),t=new o(t,d),r){case">":h=c,f=u,m=l,v=">",g=">=";break;case"<":h=l,f=p,m=c,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let r=0;r{e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,h(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===v||o.operator===g)return!1;if((!s.operator||s.operator===v)&&f(e,s.semver))return!1;if(s.operator===g&&m(e,s.semver))return!1}return!0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=require("child_process")},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.computeOperations=t.OperationKind=void 0,function(e){e[e.COPY=0]="COPY",e[e.DOWNLOAD=1]="DOWNLOAD"}(n=t.OperationKind||(t.OperationKind={})),t.computeOperations=function(e,t,r){const i=o(e.files),s=o(t.files);let c=null;const l=t.files[0],u=[],p=l.name,d=i.get(p);if(null==d)throw new Error(`no file ${p} in old blockmap`);const h=s.get(p);let f=0;const{checksumToOffset:m,checksumToOldSize:v}=function(e,t,r){const n=new Map,i=new Map;let a=t;for(let t=0;t0&&r.info(`File${"file"===l.name?"":" "+l.name} has ${f} changed blocks`),u};const i="true"===process.env.DIFFERENTIAL_DOWNLOAD_PLAN_BUILDER_VALIDATE_RANGES;function a(e,t,r,a){if(i&&0!==t.length){const i=t[t.length-1];if(i.kind===e.kind&&e.starti.start){const t=[i.start,i.end,e.start,e.end].reduce((e,t)=>e{const n=r.test(e),i=r.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:en(t,e)}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>0===n(e,t,r)},function(e,t,r){const n=r(6);e.exports=(e,t,r)=>{const i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)<0},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)>=0},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)<=0},function(e,t,r){const n=r(6),i=r(52),{ANY:a}=i,o=r(14),s=r(53),c=r(51),l=r(75),u=r(77),p=r(76);e.exports=(e,t,r,d)=>{let h,f,m,v,g;switch(e=new n(e,d),t=new o(t,d),r){case">":h=c,f=u,m=l,v=">",g=">=";break;case"<":h=l,f=p,m=c,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let r=0;r{e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,h(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===v||o.operator===g)return!1;if((!s.operator||s.operator===v)&&f(e,s.semver))return!1;if(s.operator===g&&m(e,s.semver))return!1}return!0}},function(e,t,r){e.exports=u,u.Minimatch=p;var n={sep:"/"};try{n=r(0)}catch(e){}var i=u.GLOBSTAR=p.GLOBSTAR={},a=r(286),o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},s="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var c=/\/+/;function l(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function u(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new p(t,r).match(e))}function p(e,t){if(!(this instanceof p))return new p(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==n.sep&&(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function d(e,t){if(t||(t=this instanceof p?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:a(e)}u.filter=function(e,t){return t=t||{},function(r,n,i){return u(r,e,t)}},u.defaults=function(e){if(!e||!Object.keys(e).length)return u;var t=u,r=function(r,n,i){return t.minimatch(r,n,l(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,l(e,n))},r},p.defaults=function(e){return e&&Object.keys(e).length?u.defaults(e).Minimatch:p},p.prototype.debug=function(){},p.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(c)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},p.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,a=e.length;i65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return i;if(""===e)return"";var n,a="",c=!!r.nocase,l=!1,u=[],p=[],d=!1,f=-1,m=-1,v="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this;function b(){if(n){switch(n){case"*":a+="[^/]*?",c=!0;break;case"?":a+="[^/]",c=!0;break;default:a+="\\"+n}g.debug("clearStateChar %j %j",n,a),n=!1}}for(var y,x=0,w=e.length;x-1;A--){var O=p[A],I=a.slice(0,O.reStart),R=a.slice(O.reStart,O.reEnd-8),P=a.slice(O.reEnd-8,O.reEnd),F=a.slice(O.reEnd);P+=F;var T=I.split("(").length-1,N=F;for(x=0;x=0&&!(i=e[a]);a--);for(a=0;a>> no match, partial?",e,d,t,h),d!==s))}if("string"==typeof u?(l=n.nocase?p.toLowerCase()===u.toLowerCase():p===u,this.debug("string match",u,p,l)):(l=p.match(u),this.debug("pattern match",u,p,l)),!l)return!1}if(a===s&&o===c)return!0;if(a===s)return r;if(o===c)return a===s-1&&""===e[a];throw new Error("wtf?")}},function(e,t,r){"use strict";function n(e){return"/"===e.charAt(0)}function i(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}e.exports="win32"===process.platform?i:n,e.exports.posix=n,e.exports.win32=i},function(e,t,r){"use strict";var n=r(40),i=r(130),a=r(131),o=r(305);function s(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new a).pipe(new o("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=s},function(e,t,r){"use strict";var n=r(3);var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";var n=r(349),i=r(85),a=r(36),o=r(145),s=r(351);function c(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return c.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof o)return f(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,a,s,u=l.call(this,t,r);return u&&(i=u.schema,t=u.root,s=u.baseId),i instanceof o?a=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(a=f(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),a}function l(e,t){var r=n.parse(t),i=v(r),a=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==a){var s=b(i),c=this._refs[s];if("string"==typeof c)return u.call(this,e,c,r);if(c instanceof o)c.validate||this._compile(c),e=c;else{if(!((c=this._schemas[s])instanceof o))return;if(c.validate||this._compile(c),s==b(t))return{schema:c,root:e,baseId:a};e=c}if(!e.schema)return;a=m(this._getId(e.schema))}return d.call(this,r,a,e.schema,e)}function u(e,t,r){var n=l.call(this,e,t);if(n){var i=n.schema,a=n.baseId;e=n.root;var o=this._getId(i);return o&&(a=y(a,o)),d.call(this,r,a,i,e)}}e.exports=c,c.normalizeId=b,c.fullPath=m,c.url=y,c.ids=function(e){var t=b(this._getId(e)),r={"":t},o={"":m(t,!1)},c={},l=this;return s(e,{allKeys:!0},(function(e,t,s,u,p,d,h){if(""!==t){var f=l._getId(e),m=r[u],v=o[u]+"/"+p;if(void 0!==h&&(v+="/"+("number"==typeof h?h:a.escapeFragment(h))),"string"==typeof f){f=m=b(m?n.resolve(m,f):f);var g=l._refs[f];if("string"==typeof g&&(g=l._refs[g]),g&&g.schema){if(!i(e,g.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=b(v))if("#"==f[0]){if(c[f]&&!i(e,c[f]))throw new Error('id "'+f+'" resolves to more than one schema');c[f]=e}else l._refs[f]=v}r[t]=m,o[t]=v}})),c},c.inlineRef=f,c.schema=l;var p=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;oa.resolve(c.getPath(),"IDMap.json");if(i.existsSync(u()))try{l=JSON.parse(i.readFileSync(u(),"utf8"))}catch(e){console.error("electron-devtools-installer: Invalid JSON present in the IDMap file")}const p=(e,t={})=>{"boolean"==typeof t&&(t={forceDownload:t});const{forceDownload:r,loadExtensionOptions:a}=t;if("browser"!==process.type)return Promise.reject(new Error("electron-devtools-installer can only be used from the main process"));if(Array.isArray(e))return e.reduce((e,r)=>e.then(()=>p(r,t)),Promise.resolve(""));let c;if("object"==typeof e&&e.id){c=e.id;const t=process.versions.electron.split("-")[0];if(!o.satisfies(t,e.electron))return Promise.reject(new Error(`Version of Electron: ${t} does not match required range ${e.electron} for extension ${c}`))}else{if("string"!=typeof e)return Promise.reject(new Error(`Invalid extensionReference passed in: "${e}"`));c=e}const d=l[c];let h;return h=n.session.defaultSession.getExtension?!!d&&n.session.defaultSession.getAllExtensions().find(e=>e.name===d):!!d&&n.BrowserWindow.getDevToolsExtensions&&n.BrowserWindow.getDevToolsExtensions().hasOwnProperty(d),!r&&h?Promise.resolve(l[c]):s.default(c,r||!1).then(e=>{if(h)if(n.session.defaultSession.removeExtension){const e=n.session.defaultSession.getAllExtensions().find(e=>e.name).id;n.session.defaultSession.removeExtension(e)}else n.BrowserWindow.removeDevToolsExtension(d);if(n.session.defaultSession.loadExtension)return n.session.defaultSession.loadExtension(e,a).then(e=>Promise.resolve(e.name));const t=n.BrowserWindow.addDevToolsExtension(e);return i.writeFileSync(u(),JSON.stringify(Object.assign(l,{[c]:t}))),Promise.resolve(t)})};t.default=p,t.EMBER_INSPECTOR={id:"bmdblncegkenkacieihfhpjfppoconhi",electron:">=1.2.1"},t.REACT_DEVELOPER_TOOLS={id:"fmkadmapgofadopljbjfkapdkoienihi",electron:">=1.2.1"},t.BACKBONE_DEBUGGER={id:"bhljhndlimiafopmmhjlgfpnnchjjbhd",electron:">=1.2.1"},t.JQUERY_DEBUGGER={id:"dbhhnnnpaeobfddmlalhnehgclcmjimi",electron:">=1.2.1"},t.ANGULARJS_BATARANG={id:"ighdmehidhipcmcojjgiloacoafjmpfk",electron:">=1.2.1"},t.VUEJS_DEVTOOLS={id:"nhdogjmejiglipccpnnnanhbledajbpd",electron:">=1.2.1"},t.VUEJS3_DEVTOOLS={id:"ljjemllljcmogpfapbkkighbhhppjdbg",electron:">=1.2.1"},t.REDUX_DEVTOOLS={id:"lmhkpmbekcpmknklioeibfkpmmfibljd",electron:">=1.2.1"},t.CYCLEJS_DEVTOOL={id:"dfgplfmhhmdekalbpejekgfegkonjpfp",electron:">=1.2.1"},t.APOLLO_DEVELOPER_TOOLS={id:"jdkknkkbebbapilgoeccciglkfbmbnfm",electron:">=1.2.1"},t.MOBX_DEVTOOLS={id:"pfgnfdagidkfgccljigdamigbcnndkod",electron:">=1.2.1"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationError=t.CancellationToken=void 0;const n=r(25);class i extends n.EventEmitter{constructor(e){super(),this.parentCancelHandler=null,this._parent=null,this._cancelled=!1,null!=e&&(this.parent=e)}get cancelled(){return this._cancelled||null!=this._parent&&this._parent.cancelled}set parent(e){this.removeParentCancelHandler(),this._parent=e,this.parentCancelHandler=()=>this.cancel(),this._parent.onCancel(this.parentCancelHandler)}cancel(){this._cancelled=!0,this.emit("cancel")}onCancel(e){this.cancelled?e():this.once("cancel",e)}createPromise(e){if(this.cancelled)return Promise.reject(new a);const t=()=>{if(null!=r)try{this.removeListener("cancel",r),r=null}catch(e){}};let r=null;return new Promise((t,n)=>{let i=null;r=()=>{try{null!=i&&(i(),i=null)}finally{n(new a)}},this.cancelled?r():(this.onCancel(r),e(t,n,e=>{i=e}))}).then(e=>(t(),e)).catch(e=>{throw t(),e})}removeParentCancelHandler(){const e=this._parent;null!=e&&null!=this.parentCancelHandler&&(e.removeListener("cancel",this.parentCancelHandler),this.parentCancelHandler=null)}dispose(){try{this.removeParentCancelHandler()}finally{this.removeAllListeners(),this._parent=null}}}t.CancellationToken=i;class a extends Error{constructor(){super("cancelled")}}t.CancellationError=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringifyJson=t.configureRequestOptions=t.safeGetHeader=t.DigestTransform=t.configureRequestUrl=t.configureRequestOptionsFromUrl=t.HttpExecutor=t.parseJson=t.HttpError=t.createHttpError=void 0;const n=r(38),i=r(155),a=r(2),o=r(18),s=r(17),c=r(88),l=r(4),u=r(91),p=i.default("electron-builder");function d(e,t=null){return new f(e.statusCode||-1,`${e.statusCode} ${e.statusMessage}`+(null==t?"":"\n"+JSON.stringify(t,null," "))+"\nHeaders: "+w(e.headers),t)}t.createHttpError=d;const h=new Map([[429,"Too many requests"],[400,"Bad request"],[403,"Forbidden"],[404,"Not found"],[405,"Method not allowed"],[406,"Not acceptable"],[408,"Request timeout"],[413,"Request entity too large"],[500,"Internal server error"],[502,"Bad gateway"],[503,"Service unavailable"],[504,"Gateway timeout"],[505,"HTTP version not supported"]]);class f extends Error{constructor(e,t="HTTP error: "+(h.get(e)||e),r=null){super(t),this.statusCode=e,this.description=r,this.name="HttpError",this.code="HTTP_ERROR_"+e}}t.HttpError=f,t.parseJson=function(e){return e.then(e=>null==e||0===e.length?null:JSON.parse(e))};class m{constructor(){this.maxRedirects=10}request(e,t=new c.CancellationToken,r){x(e);const n=null==r?void 0:Buffer.from(JSON.stringify(r));return null!=n&&(e.method="post",e.headers["Content-Type"]="application/json",e.headers["Content-Length"]=n.length),this.doApiRequest(e,t,e=>{e.end(n)})}doApiRequest(e,t,r,n=0){return p.enabled&&p("Request: "+w(e)),t.createPromise((i,a,o)=>{const s=this.createRequest(e,o=>{try{this.handleResponse(o,e,t,i,a,n,r)}catch(e){a(e)}});this.addErrorAndTimeoutHandlers(s,a),this.addRedirectHandlers(s,e,a,n,e=>{this.doApiRequest(e,t,r,n).then(i).catch(a)}),r(s,a),o(()=>s.abort())})}addRedirectHandlers(e,t,r,n,i){}addErrorAndTimeoutHandlers(e,t){this.addTimeOutHandler(e,t),e.on("error",t),e.on("aborted",()=>{t(new Error("Request has been aborted by the server"))})}handleResponse(e,t,r,n,i,a,o){if(p.enabled&&p(`Response: ${e.statusCode} ${e.statusMessage}, request options: ${w(t)}`),404===e.statusCode)return void i(d(e,`method: ${t.method||"GET"} url: ${t.protocol||"https:"}//${t.hostname}${t.port?":"+t.port:""}${t.path}\n\nPlease double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.\n`));if(204===e.statusCode)return void n();const s=y(e,"location");if(null!=s)return a>this.maxRedirects?void i(this.createMaxRedirectError()):void this.doApiRequest(m.prepareRedirectUrlOptions(s,t),r,o,a).then(n).catch(i);e.setEncoding("utf8");let c="";e.on("error",i),e.on("data",e=>c+=e),e.on("end",()=>{try{if(null!=e.statusCode&&e.statusCode>=400){const t=y(e,"content-type"),r=null!=t&&(Array.isArray(t)?null!=t.find(e=>e.includes("json")):t.includes("json"));i(d(e,r?JSON.parse(c):c))}else n(0===c.length?null:c)}catch(e){i(e)}})}async downloadToBuffer(e,t){return await t.cancellationToken.createPromise((r,n,i)=>{let a=null;const o={headers:t.headers||void 0,redirect:"manual"};g(e,o),x(o),this.doDownload(o,{destination:null,options:t,onCancel:i,callback:e=>{null==e?r(a):n(e)},responseHandler:(e,t)=>{const r=y(e,"content-length");let n=-1;if(null!=r){const e=parseInt(r,10);if(e>0){if(e>524288e3)return void t(new Error("Maximum allowed size is 500 MB"));a=Buffer.alloc(e),n=0}}e.on("data",e=>{if(-1!==n)e.copy(a,n),n+=e.length;else if(null==a)a=e;else{if(a.length>524288e3)return void t(new Error("Maximum allowed size is 500 MB"));a=Buffer.concat([a,e])}}),e.on("end",()=>{null!=a&&-1!==n&&n!==a.length?t(new Error(`Received data length ${n} is not equal to expected ${a.length}`)):t(null)})}},0)})}doDownload(e,t,r){const n=this.createRequest(e,n=>{if(n.statusCode>=400)return void t.callback(new Error(`Cannot download "${e.protocol||"https:"}//${e.hostname}${e.path}", status ${n.statusCode}: ${n.statusMessage}`));n.on("error",t.callback);const i=y(n,"location");null==i?null==t.responseHandler?function(e,t){if(!function(e,t,r){if(null!=e&&null!=t&&e!==t)return r(new Error(`checksum mismatch: expected ${t} but got ${e} (X-Checksum-Sha2 header)`)),!1;return!0}(y(t,"X-Checksum-Sha2"),e.options.sha2,e.callback))return;const r=[];if(null!=e.options.onProgress){const n=y(t,"content-length");null!=n&&r.push(new u.ProgressCallbackTransform(parseInt(n,10),e.options.cancellationToken,e.options.onProgress))}const n=e.options.sha512;null!=n?r.push(new b(n,"sha512",128!==n.length||n.includes("+")||n.includes("Z")||n.includes("=")?"base64":"hex")):null!=e.options.sha2&&r.push(new b(e.options.sha2,"sha256","hex"));const i=a.createWriteStream(e.destination);r.push(i);let o=t;for(const t of r)t.on("error",t=>{e.options.cancellationToken.cancelled||e.callback(t)}),o=o.pipe(t);i.on("finish",()=>{i.close(e.callback)})}(t,n):t.responseHandler(n,t.callback):r{this.doDownload(e,t,r++)}),n.end()}createMaxRedirectError(){return new Error(`Too many redirects (> ${this.maxRedirects})`)}addTimeOutHandler(e,t){e.on("socket",r=>{r.setTimeout(6e4,()=>{e.abort(),t(new Error("Request timed out"))})})}static prepareRedirectUrlOptions(e,t){const r=v(e,{...t}),n=r.headers;if(null!=n&&null!=n.authorization&&n.authorization.startsWith("token")){const t=new s.URL(e);(t.hostname.endsWith(".amazonaws.com")||t.searchParams.has("X-Amz-Credential"))&&delete n.authorization}return r}}function v(e,t){const r=x(t);return g(new s.URL(e),r),r}function g(e,t){t.protocol=e.protocol,t.hostname=e.hostname,e.port?t.port=e.port:t.port&&delete t.port,t.path=e.pathname+e.search}t.HttpExecutor=m,t.configureRequestOptionsFromUrl=v,t.configureRequestUrl=g;class b extends o.Transform{constructor(e,t="sha512",r="base64"){super(),this.expected=e,this.algorithm=t,this.encoding=r,this._actual=null,this.isValidateOnEnd=!0,this.digester=n.createHash(t)}get actual(){return this._actual}_transform(e,t,r){this.digester.update(e),r(null,e)}_flush(e){if(this._actual=this.digester.digest(this.encoding),this.isValidateOnEnd)try{this.validate()}catch(t){return void e(t)}e(null)}validate(){if(null==this._actual)throw l.newError("Not finished yet","ERR_STREAM_NOT_FINISHED");if(this._actual!==this.expected)throw l.newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`,"ERR_CHECKSUM_MISMATCH");return null}}function y(e,t){const r=e.headers[t];return null==r?null:Array.isArray(r)?0===r.length?null:r[r.length-1]:r}function x(e,t,r){null!=r&&(e.method=r),e.headers={...e.headers};const n=e.headers;return null!=t&&(n.authorization=t.startsWith("Basic")?t:"token "+t),null==n["User-Agent"]&&(n["User-Agent"]="electron-builder"),null!=r&&"GET"!==r&&null!=n["Cache-Control"]||(n["Cache-Control"]="no-cache"),null==e.protocol&&null!=process.versions.electron&&(e.protocol="https:"),e}function w(e,t){return JSON.stringify(e,(e,r)=>e.endsWith("authorization")||e.endsWith("Password")||e.endsWith("PASSWORD")||e.endsWith("Token")||e.includes("password")||e.includes("token")||null!=t&&t.has(e)?"":r,2)}t.DigestTransform=b,t.safeGetHeader=y,t.configureRequestOptions=x,t.safeStringifyJson=w},function(e,t,r){e.exports=function(e){function t(e){let r,i,a,o=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),a=i-(r||i);n.diff=a,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];r=a.call(n,t),e.splice(o,1),o--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t=this.nextUpdate&&this.transferred!==this.total&&(this.nextUpdate=n+1e3,this.onProgress({total:this.total,delta:this.delta,transferred:this.transferred,percent:this.transferred/this.total*100,bytesPerSecond:Math.round(this.transferred/((n-this.start)/1e3))}),this.delta=0),r(null,e)}_flush(e){this.cancellationToken.cancelled?e(new Error("cancelled")):(this.onProgress({total:this.total,delta:this.delta,transferred:this.total,percent:100,bytesPerSecond:Math.round(this.transferred/((Date.now()-this.start)/1e3))}),this.delta=0,e(null))}}t.ProgressCallbackTransform=i},function(e,t,r){"use strict";e.exports={copySync:r(172)}},function(e,t,r){"use strict";const n=r(7);e.exports={utimesMillis:function(e,t,r,i){n.open(e,"r+",(e,a)=>{if(e)return i(e);n.futimes(a,t,r,e=>{n.close(a,t=>{i&&i(e||t)})})})},utimesMillisSync:function(e,t,r){const i=n.openSync(e,"r+");return n.futimesSync(i,t,r),n.closeSync(i)}}},function(e,t,r){"use strict";const n=r(8).fromCallback;e.exports={copy:n(r(175))}},function(e,t,r){const n=r(28);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(42).SEMVER_SPEC_VERSION,SemVer:r(5),compareIdentifiers:r(62).compareIdentifiers,rcompareIdentifiers:r(62).rcompareIdentifiers,parse:r(29),valid:r(194),clean:r(195),inc:r(196),diff:r(197),major:r(198),minor:r(199),patch:r(200),prerelease:r(201),compare:r(11),rcompare:r(202),compareLoose:r(203),compareBuild:r(64),sort:r(204),rsort:r(205),gt:r(45),lt:r(65),eq:r(63),neq:r(96),gte:r(66),lte:r(67),cmp:r(97),coerce:r(206),Comparator:r(46),Range:r(12),satisfies:r(47),toComparators:r(209),maxSatisfying:r(210),minSatisfying:r(211),minVersion:r(212),validRange:r(213),outside:r(68),gtr:r(214),ltr:r(215),intersects:r(216),simplifyRange:r(217),subset:r(218)}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>0!==n(e,t,r)},function(e,t,r){const n=r(63),i=r(96),a=r(45),o=r(66),s=r(65),c=r(67);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return a(e,r,l);case">=":return o(e,r,l);case"<":return s(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,r){"use strict";const n=r(207),i=Symbol("max"),a=Symbol("length"),o=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1;const m=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(v(e,t)){if(b(e,n),!e[s])return}else r&&(e[h]&&(n.value.now=Date.now()),e[p].unshiftNode(n));return t.value}},v=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},g=e=>{if(e[a]>e[i])for(let t=e[p].tail;e[a]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[d].delete(r.key),e[p].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const x=(e,t,r,n)=>{let i=r.value;v(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[o]="function"!=typeof t?f:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,g(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,g(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[o]&&(this[o]=e,this[a]=0,this[p].forEach(e=>{e.length=this[o](e.value,e.key),this[a]+=e.length})),g(this)}get lengthCalculator(){return this[o]}get length(){return this[a]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;null!==r;){const n=r.prev;x(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[p].head;null!==r;){const n=r.next;x(this,e,r,t),r=n}}keys(){return this[p].toArray().map(e=>e.key)}values(){return this[p].toArray().map(e=>e.value)}reset(){this[l]&&this[p]&&this[p].length&&this[p].forEach(e=>this[l](e.key,e.value)),this[d]=new Map,this[p]=new n,this[a]=0}dump(){return this[p].map(e=>!v(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[p]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[o](t,e);if(this[d].has(e)){if(s>this[i])return b(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[l]&&(this[u]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=s-o.length,o.length=s,this.get(e),g(this),!0}const h=new y(e,t,s,n,r);return h.length>this[i]?(this[l]&&this[l](e,t),!1):(this[a]+=h.length,this[p].unshift(h),this[d].set(e,this[p].head),g(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!v(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach((e,t)=>m(this,t,!1))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericProvider=void 0;const n=r(4),i=r(30),a=r(19);class o extends a.Provider{constructor(e,t,r){super(r),this.configuration=e,this.updater=t,this.baseUrl=i.newBaseUrl(this.configuration.url)}get channel(){const e=this.updater.channel||this.configuration.channel;return null==e?this.getDefaultChannelName():this.getCustomChannelName(e)}async getLatestVersion(){const e=i.getChannelFilename(this.channel),t=i.newUrlFromBase(e,this.baseUrl,this.updater.isAddNoCacheQuery);for(let r=0;;r++)try{return a.parseUpdateInfo(await this.httpRequest(t),e,t)}catch(t){if(t instanceof n.HttpError&&404===t.statusCode)throw n.newError(`Cannot find channel "${e}" update info: ${t.stack||t.message}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");if("ECONNREFUSED"===t.code&&r<3){await new Promise((e,t)=>{try{setTimeout(e,1e3*r)}catch(e){t(e)}});continue}throw t}}resolveFiles(e){return a.resolveFiles(e,this.baseUrl)}}t.GenericProvider=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeReleaseNotes=t.GitHubProvider=t.BaseGitHubProvider=void 0;const n=r(4),i=r(95),a=r(17),o=r(30),s=r(19),c=/\/tag\/v?([^/]+)$/;class l extends s.Provider{constructor(e,t,r){super({...r,isUseMultipleRangeRequest:!1}),this.options=e,this.baseUrl=o.newBaseUrl(n.githubUrl(e,t));const i="github.com"===t?"api.github.com":t;this.baseApiUrl=o.newBaseUrl(n.githubUrl(e,i))}computeGithubBasePath(e){const t=this.options.host;return null!=t&&"github.com"!==t&&"api.github.com"!==t?"/api/v3"+e:e}}t.BaseGitHubProvider=l;function u(e){const t=e.elementValueOrEmpty("content");return"No content."===t?"":t}function p(e,t,r,n){if(!t)return u(n);const a=[];for(const t of r.getElements("entry")){const r=/\/tag\/v?([^/]+)$/.exec(t.element("link").attribute("href"))[1];i.lt(e,r)&&a.push({version:r,note:u(t)})}return a.sort((e,t)=>i.rcompare(e.version,t.version))}t.GitHubProvider=class extends l{constructor(e,t,r){super(e,"github.com",r),this.options=e,this.updater=t}async getLatestVersion(){const e=new n.CancellationToken,t=await this.httpRequest(o.newUrlFromBase(this.basePath+".atom",this.baseUrl),{accept:"application/xml, application/atom+xml, text/xml, */*"},e),r=n.parseXml(t);let i,a=r.element("entry",!1,"No published versions on GitHub");try{if(this.updater.allowPrerelease)i=c.exec(a.element("link").attribute("href"))[1];else{i=await this.getLatestVersionString(e);for(const e of r.getElements("entry"))if(c.exec(e.element("link").attribute("href"))[1]===i){a=e;break}}}catch(e){throw n.newError(`Cannot parse releases feed: ${e.stack||e.message},\nXML:\n${t}`,"ERR_UPDATER_INVALID_RELEASE_FEED")}if(null==i)throw n.newError("No published versions on GitHub","ERR_UPDATER_NO_PUBLISHED_VERSIONS");const l=o.getChannelFilename(this.getDefaultChannelName()),u=o.newUrlFromBase(this.getBaseDownloadPath(i,l),this.baseUrl),d=this.createRequestOptions(u);let h;try{h=await this.executor.request(d,e)}catch(e){if(!this.updater.allowPrerelease&&e instanceof n.HttpError&&404===e.statusCode)throw n.newError(`Cannot find ${l} in the latest release artifacts (${u}): ${e.stack||e.message}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");throw e}const f=s.parseUpdateInfo(h,l,u);return null==f.releaseName&&(f.releaseName=a.elementValueOrEmpty("title")),null==f.releaseNotes&&(f.releaseNotes=p(this.updater.currentVersion,this.updater.fullChangelog,r,a)),f}async getLatestVersionString(e){const t=this.options,r=null==t.host||"github.com"===t.host?o.newUrlFromBase(this.basePath+"/latest",this.baseUrl):new a.URL(this.computeGithubBasePath(`/repos/${t.owner}/${t.repo}/releases`)+"/latest",this.baseApiUrl);try{const t=await this.httpRequest(r,{Accept:"application/json"},e);if(null==t)return null;const n=JSON.parse(t);return n.tag_name.startsWith("v")?n.tag_name.substring(1):n.tag_name}catch(e){throw n.newError(`Unable to find latest version on GitHub (${r}), please ensure a production release exists: ${e.stack||e.message}`,"ERR_UPDATER_LATEST_VERSION_NOT_FOUND")}}get basePath(){return`/${this.options.owner}/${this.options.repo}/releases`}resolveFiles(e){return s.resolveFiles(e,this.baseUrl,t=>this.getBaseDownloadPath(e.version,t.replace(/ /g,"-")))}getBaseDownloadPath(e,t){return`${this.basePath}/download/${!1===this.options.vPrefixedTagName?"":"v"}${e}/${t}`}},t.computeReleaseNotes=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppImageUpdater=void 0;const n=r(4),i=r(70),a=r(22),o=r(2),s=r(0),c=r(102),l=r(103),u=r(15),p=r(19);class d extends c.BaseUpdater{constructor(e,t){super(e,t)}isUpdaterActive(){return null==process.env.APPIMAGE?(null==process.env.SNAP?this._logger.warn("APPIMAGE env is not defined, current application is not an AppImage"):this._logger.info("SNAP env is defined, updater is disabled"),!1):super.isUpdaterActive()}doDownloadUpdate(e){const t=e.updateInfoAndProvider.provider,r=p.findFile(t.resolveFiles(e.updateInfoAndProvider.info),"AppImage");return this.executeDownload({fileExtension:"AppImage",fileInfo:r,downloadUpdateOptions:e,task:async(i,o)=>{const s=process.env.APPIMAGE;if(null==s)throw n.newError("APPIMAGE env is not defined","ERR_UPDATER_OLD_FILE_NOT_FOUND");let c=!1;try{const n={newUrl:r.url,oldFile:s,logger:this._logger,newFile:i,isUseMultipleRangeRequest:t.isUseMultipleRangeRequest,requestHeaders:e.requestHeaders,cancellationToken:e.cancellationToken};this.listenerCount(u.DOWNLOAD_PROGRESS)>0&&(n.onProgress=e=>this.emit(u.DOWNLOAD_PROGRESS,e)),await new l.FileWithEmbeddedBlockMapDifferentialDownloader(r.info,this.httpExecutor,n).download()}catch(e){this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),c="linux"===process.platform}c&&await this.httpExecutor.download(r.url,i,o),await a.chmod(i,493)}})}doInstall(e){const t=process.env.APPIMAGE;if(null==t)throw n.newError("APPIMAGE env is not defined","ERR_UPDATER_OLD_FILE_NOT_FOUND");let r;o.unlinkSync(t);const a=s.basename(t);r=s.basename(e.installerPath)!==a&&/\d+\.\d+\.\d+/.test(a)?s.join(s.dirname(t),s.basename(e.installerPath)):t,i.execFileSync("mv",["-f",e.installerPath,r]),r!==t&&this.emit("appimage-filename-updated",r);const c={...process.env,APPIMAGE_SILENT_INSTALL:"true"};return e.isForceRunAfter?i.spawn(r,[],{detached:!0,stdio:"ignore",env:c}).unref():(c.APPIMAGE_EXIT_AFTER_INSTALL="true",i.execFileSync(r,[],{env:c})),!0}}t.AppImageUpdater=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseUpdater=void 0;const n=r(58);class i extends n.AppUpdater{constructor(e,t){super(e,t),this.quitAndInstallCalled=!1,this.quitHandlerAdded=!1}quitAndInstall(e=!1,t=!1){this._logger.info("Install on explicit quitAndInstall");this.install(e,!e||t)?setImmediate(()=>{this.app.quit()}):this.quitAndInstallCalled=!1}executeDownload(e){return super.executeDownload({...e,done:e=>(this.dispatchUpdateDownloaded(e),this.addQuitHandler(),Promise.resolve())})}install(e,t){if(this.quitAndInstallCalled)return this._logger.warn("install call ignored: quitAndInstallCalled is set to true"),!1;const r=this.downloadedUpdateHelper,n=null==r?null:r.file,i=null==r?null:r.downloadedFileInfo;if(null==n||null==i)return this.dispatchError(new Error("No valid update available, can't quit and install")),!1;this.quitAndInstallCalled=!0;try{return this._logger.info(`Install: isSilent: ${e}, isForceRunAfter: ${t}`),this.doInstall({installerPath:n,isSilent:e,isForceRunAfter:t,isAdminRightsRequired:i.isAdminRightsRequired})}catch(e){return this.dispatchError(e),!1}}addQuitHandler(){!this.quitHandlerAdded&&this.autoInstallOnAppQuit&&(this.quitHandlerAdded=!0,this.app.onQuit(e=>{this.quitAndInstallCalled?this._logger.info("Update installer has already been triggered. Quitting application."):this.autoInstallOnAppQuit?0===e?(this._logger.info("Auto install update on quit"),this.install(!0,!1)):this._logger.info("Update will be not installed on quit because application is quitting with exit code "+e):this._logger.info("Update will not be installed on quit because autoInstallOnAppQuit is set to false.")}))}}t.BaseUpdater=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileWithEmbeddedBlockMapDifferentialDownloader=void 0;const n=r(22),i=r(104),a=r(106);class o extends i.DifferentialDownloader{async download(){const e=this.blockAwareFileInfo,t=e.size,r=t-(e.blockMapSize+4);this.fileMetadataBuffer=await this.readRemoteBytes(r,t-1);const i=s(this.fileMetadataBuffer.slice(0,this.fileMetadataBuffer.length-4));await this.doDownload(await async function(e){const t=await n.open(e,"r");try{const e=(await n.fstat(t)).size,r=Buffer.allocUnsafe(4);await n.read(t,r,0,r.length,e-r.length);const i=Buffer.allocUnsafe(r.readUInt32BE(0));return await n.read(t,i,0,i.length,e-r.length-i.length),await n.close(t),s(i)}catch(e){throw await n.close(t),e}}(this.options.oldFile),i)}}function s(e){return JSON.parse(a.inflateRawSync(e).toString())}t.FileWithEmbeddedBlockMapDifferentialDownloader=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DifferentialDownloader=void 0;const n=r(4),i=r(22),a=r(2),o=r(105),s=r(17),c=r(71),l=r(229),u=r(230);function p(e,t=" KB"){return new Intl.NumberFormat("en").format((e/1024).toFixed(2))+t}t.DifferentialDownloader=class{constructor(e,t,r){this.blockAwareFileInfo=e,this.httpExecutor=t,this.options=r,this.fileMetadataBuffer=null,this.logger=r.logger}createRequestOptions(){const e={headers:{...this.options.requestHeaders,accept:"*/*"}};return n.configureRequestUrl(this.options.newUrl,e),n.configureRequestOptions(e),e}doDownload(e,t){if(e.version!==t.version)throw new Error(`version is different (${e.version} - ${t.version}), full download is required`);const r=this.logger,n=c.computeOperations(e,t,r);null!=r.debug&&r.debug(JSON.stringify(n,null,2));let i=0,a=0;for(const e of n){const t=e.end-e.start;e.kind===c.OperationKind.DOWNLOAD?i+=t:a+=t}const o=this.blockAwareFileInfo.size;if(i+a+(null==this.fileMetadataBuffer?0:this.fileMetadataBuffer.length)!==o)throw new Error(`Internal error, size mismatch: downloadSize: ${i}, copySize: ${a}, newSize: ${o}`);return r.info(`Full: ${p(o)}, To download: ${p(i)} (${Math.round(i/(o/100))}%)`),this.downloadFile(n)}downloadFile(e){const t=[],r=()=>Promise.all(t.map(e=>i.close(e.descriptor).catch(t=>{this.logger.error(`cannot close file "${e.path}": ${t}`)})));return this.doDownloadFile(e,t).then(r).catch(e=>r().catch(t=>{try{this.logger.error("cannot close files: "+t)}catch(e){try{console.error(e)}catch(e){}}throw e}).then(()=>{throw e}))}async doDownloadFile(e,t){const r=await i.open(this.options.oldFile,"r");t.push({descriptor:r,path:this.options.oldFile});const p=await i.open(this.options.newFile,"w");t.push({descriptor:p,path:this.options.newFile});const d=a.createWriteStream(this.options.newFile,{fd:p});await new Promise((i,a)=>{const p=[];let h=void 0;if(!this.options.isUseMultipleRangeRequest&&this.options.onProgress){const t=[];let r=0;for(const n of e)n.kind===c.OperationKind.DOWNLOAD&&(t.push(n.end-n.start),r+=n.end-n.start);const n={expectedByteCounts:t,grandTotal:r};h=new u.ProgressDifferentialDownloadCallbackTransform(n,this.options.cancellationToken,this.options.onProgress),p.push(h)}const f=new n.DigestTransform(this.blockAwareFileInfo.sha512);f.isValidateOnEnd=!1,p.push(f),d.on("finish",()=>{d.close(()=>{t.splice(1,1);try{f.validate()}catch(e){return void a(e)}i(void 0)})}),p.push(d);let m=null;for(const e of p)e.on("error",a),m=null==m?e:m.pipe(e);const v=p[0];let g;if(this.options.isUseMultipleRangeRequest)return g=l.executeTasksUsingMultipleRangeRequests(this,e,v,r,a),void g(0);let b=0,y=null;this.logger.info("Differential download: "+this.options.newUrl);const x=this.createRequestOptions();x.redirect="manual",g=t=>{var i,l;if(t>=e.length)return null!=this.fileMetadataBuffer&&v.write(this.fileMetadataBuffer),void v.end();const u=e[t++];if(u.kind===c.OperationKind.COPY)return h&&h.beginFileCopy(),void o.copyData(u,v,r,a,()=>g(t));const p=`bytes=${u.start}-${u.end-1}`;x.headers.range=p,null===(l=null===(i=this.logger)||void 0===i?void 0:i.debug)||void 0===l||l.call(i,"download range: "+p),h&&h.beginRangeDownload();const d=this.httpExecutor.createRequest(x,e=>{e.statusCode>=400&&a(n.createHttpError(e)),e.pipe(v,{end:!1}),e.once("end",()=>{h&&h.endRangeDownload(),100==++b?(b=0,setTimeout(()=>g(t),1e3)):g(t)})});d.on("redirect",(e,t,r)=>{this.logger.info("Redirect to "+function(e){const t=e.indexOf("?");return t<0?e:e.substring(0,t)}(r)),y=r,n.configureRequestUrl(new s.URL(y),x),d.followRedirect()}),this.httpExecutor.addErrorAndTimeoutHandlers(d,a),d.end()},g(0)})}async readRemoteBytes(e,t){const r=Buffer.allocUnsafe(t+1-e),n=this.createRequestOptions();n.headers.range=`bytes=${e}-${t}`;let i=0;if(await this.request(n,e=>{e.copy(r,i),i+=e.length}),i!==r.length)throw new Error(`Received data length ${i} is not equal to expected ${r.length}`);return r}request(e,t){return new Promise((r,n)=>{const i=this.httpExecutor.createRequest(e,e=>{l.checkIsRangesSupported(e,n)&&(e.on("data",t),e.on("end",()=>r()))});this.httpExecutor.addErrorAndTimeoutHandlers(i,n),i.end()})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataSplitter=t.copyData=void 0;const n=r(4),i=r(2),a=r(18),o=r(71),s=Buffer.from("\r\n\r\n");var c;function l(e,t,r,n,a){const o=i.createReadStream("",{fd:r,autoClose:!1,start:e.start,end:e.end-1});o.on("error",n),o.once("end",a),o.pipe(t,{end:!1})}!function(e){e[e.INIT=0]="INIT",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY"}(c||(c={})),t.copyData=l;class u extends a.Writable{constructor(e,t,r,n,i,a){super(),this.out=e,this.options=t,this.partIndexToTaskIndex=r,this.partIndexToLength=i,this.finishHandler=a,this.partIndex=-1,this.headerListBuffer=null,this.readState=c.INIT,this.ignoreByteCount=0,this.remainingPartDataCount=0,this.actualPartLength=0,this.boundaryLength=n.length+4,this.ignoreByteCount=this.boundaryLength-2}get isFinished(){return this.partIndex===this.partIndexToLength.length}_write(e,t,r){this.isFinished?console.error(`Trailing ignored data: ${e.length} bytes`):this.handleData(e).then(r).catch(r)}async handleData(e){let t=0;if(0!==this.ignoreByteCount&&0!==this.remainingPartDataCount)throw n.newError("Internal error","ERR_DATA_SPLITTER_BYTE_COUNT_MISMATCH");if(this.ignoreByteCount>0){const r=Math.min(this.ignoreByteCount,e.length);this.ignoreByteCount-=r,t=r}else if(this.remainingPartDataCount>0){const r=Math.min(this.remainingPartDataCount,e.length);this.remainingPartDataCount-=r,await this.processPartData(e,0,r),t=r}if(t!==e.length){if(this.readState===c.HEADER){const r=this.searchHeaderListEnd(e,t);if(-1===r)return;t=r,this.readState=c.BODY,this.headerListBuffer=null}for(;;){if(this.readState===c.BODY)this.readState=c.INIT;else{this.partIndex++;let r=this.partIndexToTaskIndex.get(this.partIndex);if(null==r){if(!this.isFinished)throw n.newError("taskIndex is null","ERR_DATA_SPLITTER_TASK_INDEX_IS_NULL");r=this.options.end}const i=0===this.partIndex?this.options.start:this.partIndexToTaskIndex.get(this.partIndex-1)+1;if(ir)throw n.newError("prevTaskIndex must be < taskIndex","ERR_DATA_SPLITTER_TASK_INDEX_ASSERT_FAILED");if(this.isFinished)return this.onPartEnd(),void this.finishHandler();if(t=this.searchHeaderListEnd(e,t),-1===t)return void(this.readState=c.HEADER)}const r=this.partIndexToLength[this.partIndex],i=t+r,a=Math.min(i,e.length);if(await this.processPartStarted(e,t,a),this.remainingPartDataCount=r-(a-t),this.remainingPartDataCount>0)return;if(t=i+this.boundaryLength,t>=e.length)return void(this.ignoreByteCount=this.boundaryLength-(e.length-i))}}}copyExistingData(e,t){return new Promise((r,n)=>{const i=()=>{if(e===t)return void r();const a=this.options.tasks[e];a.kind===o.OperationKind.COPY?l(a,this.out,this.options.oldFileFd,n,()=>{e++,i()}):n(new Error("Task kind must be COPY"))};i()})}searchHeaderListEnd(e,t){const r=e.indexOf(s,t);if(-1!==r)return r+s.length;const n=0===t?e:e.slice(t);return null==this.headerListBuffer?this.headerListBuffer=n:this.headerListBuffer=Buffer.concat([this.headerListBuffer,n]),-1}onPartEnd(){const e=this.partIndexToLength[this.partIndex-1];if(this.actualPartLength!==e)throw n.newError(`Expected length: ${e} differs from actual: ${this.actualPartLength}`,"ERR_DATA_SPLITTER_LENGTH_MISMATCH");this.actualPartLength=0}processPartStarted(e,t,r){return 0!==this.partIndex&&this.onPartEnd(),this.processPartData(e,t,r)}processPartData(e,t,r){this.actualPartLength+=r-t;const n=this.out;return n.write(0===t&&e.length===r?e:e.slice(t,r))?Promise.resolve():new Promise((e,t)=>{n.on("error",t),n.once("drain",()=>{n.removeListener("error",t),e()})})}}t.DataSplitter=u},function(e,t){e.exports=require("zlib")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MacUpdater=void 0;const n=r(4),i=r(22),a=r(2),o=r(231),s=r(58),c=r(19);class l extends s.AppUpdater{constructor(e,t){super(e,t),this.nativeUpdater=r(1).autoUpdater,this.squirrelDownloadedUpdate=!1,this.nativeUpdater.on("error",e=>{this._logger.warn(e),this.emit("error",e)}),this.nativeUpdater.on("update-downloaded",()=>{this.squirrelDownloadedUpdate=!0})}doDownloadUpdate(e){let t=e.updateInfoAndProvider.provider.resolveFiles(e.updateInfoAndProvider.info);const r=e=>e.url.pathname.includes("arm64");t.some(r)&&(t=t.filter(e=>"arm64"===process.arch===r(e)));const s=c.findFile(t,"zip",["pkg","dmg"]);if(null==s)throw n.newError("ZIP file not provided: "+n.safeStringifyJson(t),"ERR_UPDATER_ZIP_FILE_NOT_FOUND");const l=o.createServer();function u(){return"http://127.0.0.1:"+l.address().port}return l.on("close",()=>{this._logger.info(`Proxy server for native Squirrel.Mac is closed (was started to download ${s.url.href})`)}),this.executeDownload({fileExtension:"zip",fileInfo:s,downloadUpdateOptions:e,task:(e,t)=>this.httpExecutor.download(s.url,e,t),done:async e=>{const t=e.downloadedFile;let r=s.info.size;return null==r&&(r=(await i.stat(t)).size),await new Promise((n,i)=>{const o=`/${Date.now()}-${Math.floor(9999*Math.random())}.zip`;l.on("request",(e,s)=>{const c=e.url;if(this._logger.info(c+" requested"),"/"===c){const e=Buffer.from(`{ "url": "${u()}${o}" }`);return s.writeHead(200,{"Content-Type":"application/json","Content-Length":e.length}),void s.end(e)}if(!c.startsWith(o))return this._logger.warn(c+" requested, but not supported"),s.writeHead(404),void s.end();this._logger.info(`${o} requested by Squirrel.Mac, pipe ${t}`);let p=!1;s.on("finish",()=>{try{setImmediate(()=>l.close())}finally{p||(this.nativeUpdater.removeListener("error",i),n([]))}});const d=a.createReadStream(t);d.on("error",e=>{try{s.end()}catch(e){this._logger.warn("cannot end response: "+e)}p=!0,this.nativeUpdater.removeListener("error",i),i(new Error(`Cannot pipe "${t}": ${e}`))}),s.writeHead(200,{"Content-Type":"application/zip","Content-Length":r}),d.pipe(s)}),l.listen(0,"127.0.0.1",()=>{this.nativeUpdater.setFeedURL({url:u(),headers:{"Cache-Control":"no-cache"}}),this.dispatchUpdateDownloaded(e),this.autoInstallOnAppQuit?(this.nativeUpdater.once("error",i),this.nativeUpdater.checkForUpdates()):n([])})})}})}quitAndInstall(){this.squirrelDownloadedUpdate?this.nativeUpdater.quitAndInstall():(this.nativeUpdater.on("update-downloaded",()=>{this.nativeUpdater.quitAndInstall()}),this.nativeUpdater.checkForUpdates())}}t.MacUpdater=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NsisUpdater=void 0;const n=r(4),i=r(70),a=r(0),o=r(102),s=r(103),c=r(232),l=r(15),u=r(30),p=r(19),d=r(22),h=r(233),f=r(17),m=r(106);class v extends o.BaseUpdater{constructor(e,t){super(e,t)}doDownloadUpdate(e){const t=e.updateInfoAndProvider.provider,r=p.findFile(t.resolveFiles(e.updateInfoAndProvider.info),"exe");return this.executeDownload({fileExtension:"exe",downloadUpdateOptions:e,fileInfo:r,task:async(i,a,o,s)=>{const c=r.packageInfo,l=null!=c&&null!=o;(l||await this.differentialDownloadInstaller(r,e,i,t))&&await this.httpExecutor.download(r.url,i,a);const u=await this.verifySignature(i);if(null!=u)throw await s(),n.newError(`New version ${e.updateInfoAndProvider.info.version} is not signed by the application owner: ${u}`,"ERR_UPDATER_INVALID_SIGNATURE");if(l&&await this.differentialDownloadWebPackage(e,c,o,t))try{await this.httpExecutor.download(new f.URL(c.path),o,{headers:e.requestHeaders,cancellationToken:e.cancellationToken,sha512:c.sha512})}catch(e){try{await d.unlink(o)}catch(e){}throw e}}})}async verifySignature(e){let t;try{if(t=(await this.configOnDisk.value).publisherName,null==t)return null}catch(e){if("ENOENT"===e.code)return null;throw e}return await h.verifySignature(Array.isArray(t)?t:[t],e,this._logger)}doInstall(e){const t=["--updated"];e.isSilent&&t.push("/S"),e.isForceRunAfter&&t.push("--force-run");const r=null==this.downloadedUpdateHelper?null:this.downloadedUpdateHelper.packageFile;null!=r&&t.push("--package-file="+r);const n=()=>{g(a.join(process.resourcesPath,"elevate.exe"),[e.installerPath].concat(t)).catch(e=>this.dispatchError(e))};return e.isAdminRightsRequired?(this._logger.info("isAdminRightsRequired is set to true, run installer using elevate.exe"),n(),!0):(g(e.installerPath,t).catch(e=>{const t=e.code;this._logger.info(`Cannot run installer: error code: ${t}, error message: "${e.message}", will be executed again using elevate if EACCES"`),"UNKNOWN"===t||"EACCES"===t?n():this.dispatchError(e)}),!0)}async differentialDownloadInstaller(e,t,r,i){try{if(null!=this._testOnlyOptions&&!this._testOnlyOptions.isUseDifferentialDownload)return!0;const o=u.blockmapFiles(e.url,t.updateInfoAndProvider.info.version,this.app.version);this._logger.info(`Download block maps (old: "${o[0]}", new: ${o[1]})`);const s=async e=>{const r=await this.httpExecutor.downloadToBuffer(e,{headers:t.requestHeaders,cancellationToken:t.cancellationToken});if(null==r||0===r.length)throw new Error(`Blockmap "${e.href}" is empty`);try{return JSON.parse(m.gunzipSync(r).toString())}catch(t){throw new Error(`Cannot parse blockmap "${e.href}", error: ${t}, raw data: ${r}`)}},p={newUrl:e.url,oldFile:a.join(this.downloadedUpdateHelper.cacheDir,n.CURRENT_APP_INSTALLER_FILE_NAME),logger:this._logger,newFile:r,isUseMultipleRangeRequest:i.isUseMultipleRangeRequest,requestHeaders:t.requestHeaders,cancellationToken:t.cancellationToken};this.listenerCount(l.DOWNLOAD_PROGRESS)>0&&(p.onProgress=e=>this.emit(l.DOWNLOAD_PROGRESS,e));const d=await Promise.all(o.map(e=>s(e)));return await new c.GenericDifferentialDownloader(e.info,this.httpExecutor,p).download(d[0],d[1]),!1}catch(e){if(this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),null!=this._testOnlyOptions)throw e;return!0}}async differentialDownloadWebPackage(e,t,r,i){if(null==t.blockMapSize)return!0;try{const o={newUrl:new f.URL(t.path),oldFile:a.join(this.downloadedUpdateHelper.cacheDir,n.CURRENT_APP_PACKAGE_FILE_NAME),logger:this._logger,newFile:r,requestHeaders:this.requestHeaders,isUseMultipleRangeRequest:i.isUseMultipleRangeRequest,cancellationToken:e.cancellationToken};this.listenerCount(l.DOWNLOAD_PROGRESS)>0&&(o.onProgress=e=>this.emit(l.DOWNLOAD_PROGRESS,e)),await new s.FileWithEmbeddedBlockMapDifferentialDownloader(t,this.httpExecutor,o).download()}catch(e){return this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),"win32"===process.platform}return!1}}async function g(e,t){return new Promise((r,n)=>{try{const a=i.spawn(e,t,{detached:!0,stdio:"ignore"});a.on("error",e=>{n(e)}),a.unref(),void 0!==a.pid&&r(!0)}catch(e){n(e)}})}t.NsisUpdater=v},function(e,t,r){"use strict";const n=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));e.exports=n,e.exports.default=n},function(e,t,r){const n=r(239),i={};for(const e of Object.keys(n))i[n[e]]=e;const a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=a;for(const e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:r})}a.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i;let s,c;a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(60*s,360),s<0&&(s+=360);const l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,r,n,i,a;const o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),p=function(e){return(l-e)/6/u+.5};return 0===u?(i=0,a=0):(a=u/l,t=p(o),r=p(s),n=p(c),o===l?i=n-r:s===l?i=1/3+t-n:c===l&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*l]},a.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},a.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){const t=i[e];if(t)return t;let r,a=1/0;for(const t of Object.keys(n)){const i=n[t],c=(s=i,((o=e)[0]-s[0])**2+(o[1]-s[1])**2+(o[2]-s[2])**2);c.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},a.rgb.lab=function(e){const t=a.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},a.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,a,o;if(0===r)return o=255*n,[o,o,o];i=n<.5?n*(1+r):n+r-n*r;const s=2*n-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;return[t,100*(0===n?2*i/(a+i):2*r/(n+r)),100*((n+r)/2)]},a.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,a=t-Math.floor(t),o=255*n*(1-r),s=255*n*(1-r*a),c=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,c,o];case 1:return[s,n,o];case 2:return[o,n,c];case 3:return[o,s,n];case 4:return[c,o,n];case 5:return[n,o,s]}},a.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let a,o;o=(2-r)*n;const s=(2-r)*i;return a=r*i,a/=s<=1?s:2-s,a=a||0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let a;i>1&&(r/=i,n/=i);const o=Math.floor(6*t),s=1-n;a=6*t-o,0!=(1&o)&&(a=1-a);const c=r+a*(s-r);let l,u,p;switch(o){default:case 6:case 0:l=s,u=c,p=r;break;case 1:l=c,u=s,p=r;break;case 2:l=r,u=s,p=c;break;case 3:l=r,u=c,p=s;break;case 4:l=c,u=r,p=s;break;case 5:l=s,u=r,p=c}return[255*l,255*u,255*p]},a.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},a.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,a,o;return i=3.2406*t+-1.5372*r+-.4986*n,a=-.9689*t+1.8758*r+.0415*n,o=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},a.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,a=t**3,o=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},a.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},a.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},a.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},a.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},a.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),o=i-a;let s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(r-n)/o%6:i===r?2+(n-t)/o:4+(t-r)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},a.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],a=t%1*6,o=a%1,s=1-o;let c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-r)*n,[255*(r*i[0]+c),255*(r*i[1]+c),255*(r*i[2]+c)]},a.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},a.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},a.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},a.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>0!==n(e,t,r)},function(e,t,r){const n=r(73),i=r(111),a=r(51),o=r(76),s=r(75),c=r(77);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return a(e,r,l);case">=":return o(e,r,l);case"<":return s(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,r){e.exports=b;var n=r(114),i=r(79),a=(i.Minimatch,r(33)),o=r(25).EventEmitter,s=r(0),c=r(23),l=r(80),u=r(290),p=r(115),d=p.setopts,h=p.ownProp,f=r(291),m=(r(9),p.childrenIgnored),v=p.isIgnored,g=r(117);function b(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return u(e,t)}return new x(e,t,r)}b.sync=u;var y=b.GlobSync=u.GlobSync;function x(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new y(e,t)}if(!(this instanceof x))return new x(e,t,r);d(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=g(r),this.on("error",r),this.on("end",(function(e){r(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return o();for(var a=0;a1)return!0;for(var i=0;ithis.maxLength)return t();if(!this.stat&&h(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return t(null,i);if(n&&"FILE"===i)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?t():t(null,o,a)}var s=this,c=f("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return s.fs.stat(r,(function(n,a){n?s._stat2(e,r,null,i,t):s._stat2(e,r,n,a,t)}));s._stat2(e,r,n,i,t)}));c&&s.fs.lstat(r,c)},x.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var a="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,a&&"FILE"===o?i():i(null,o,n)}},function(e,t,r){e.exports=u,u.realpath=u,u.sync=p,u.realpathSync=p,u.monkeypatch=function(){n.realpath=u,n.realpathSync=p},u.unmonkeypatch=function(){n.realpath=i,n.realpathSync=a};var n=r(2),i=n.realpath,a=n.realpathSync,o=process.version,s=/^v[0-5]\./.test(o),c=r(285);function l(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function u(e,t,r){if(s)return i(e,t,r);"function"==typeof t&&(r=t,t=null),i(e,t,(function(n,i){l(n)?c.realpath(e,t,r):r(n,i)}))}function p(e,t){if(s)return a(e,t);try{return a(e,t)}catch(r){if(l(r))return c.realpathSync(e,t);throw r}}},function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.setopts=function(e,t,r){r||(r={});if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0);e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.fs=r.fs||i,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(u))}(e,r),e.changedCwd=!1;var o=process.cwd();n(r,"cwd")?(e.cwd=a.resolve(r.cwd),e.changedCwd=e.cwd!==o):e.cwd=o;e.root=r.root||a.resolve(e.cwd,"/"),e.root=a.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:p(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new c(t,r),e.options=e.minimatch.options},t.ownProp=n,t.makeAbs=p,t.finish=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n{const e=n.app.getPath("userData");return a.resolve(e+"/extensions")};const s=n.net?n.net.request:o.get;t.downloadFile=(e,r)=>new Promise((n,a)=>{const o=s(e);o.on("response",e=>{if(e.statusCode&&e.statusCode>=300&&e.statusCode<400&&e.headers.location)return t.downloadFile(e.headers.location,r).then(n).catch(a);e.pipe(i.createWriteStream(r)).on("close",n),e.on("error",a)}),o.on("error",a),o.end()});t.changePermissions=(e,r)=>{i.readdirSync(e).forEach(n=>{const o=a.join(e,n);i.chmodSync(o,parseInt(""+r,8)),i.statSync(o).isDirectory()&&t.changePermissions(o,r)})}},function(e,t,r){var n=r(18);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n,(t=e.exports=n.Readable).Readable=n.Readable,t.Writable=n.Writable,t.Duplex=n.Duplex,t.Transform=n.Transform,t.PassThrough=n.PassThrough,t.Stream=n):((t=e.exports=r(120)).Stream=n||t,t.Readable=t,t.Writable=r(124),t.Duplex=r(35),t.Transform=r(126),t.PassThrough=r(299))},function(e,t,r){"use strict";var n=r(54);e.exports=b;var i,a=r(296);b.ReadableState=g;r(25).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(121),c=r(55).Buffer,l=global.Uint8Array||function(){};var u=Object.create(r(39));u.inherits=r(33);var p=r(9),d=void 0;d=p&&p.debuglog?p.debuglog("stream"):function(){};var h,f=r(297),m=r(123);u.inherits(b,s);var v=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(i=i||r(35));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(125).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(35),!(this instanceof b))return new b(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function y(e,t,r,n,i){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(a=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):_(e,o)):x(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(D,e):D(e))}function D(e){d("emit readable"),e.emit("readable"),A(e)}function _(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):E(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?l:b;function c(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",v),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",f),p=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",c);var u=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,A(e))}}(r);e.on("drain",u);var p=!1;var h=!1;function f(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==P(i.pipes,e))&&!p&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function m(t){d("onerror",t),b(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",g),b()}function g(){d("onfinish"),e.removeListener("close",v),b()}function b(){d("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",v),e.once("finish",g),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?setImmediate:n.nextTick;v.WritableState=m;var s=Object.create(r(39));s.inherits=r(33);var c={deprecate:r(298)},l=r(121),u=r(55).Buffer,p=global.Uint8Array||function(){};var d,h=r(123);function f(){}function m(e,t){a=a||r(35),e=e||{};var s=t instanceof a;this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var c=e.highWaterMark,l=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=c||0===c?c:s&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var p=!1===e.decodeStrings;this.decodeStrings=!p,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(a(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,a);else{var s=x(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||y(e,r),i?o(b,e,r,s,a):b(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function v(e){if(a=a||r(35),!(d.call(v,this)||this instanceof a))return new v(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function g(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function b(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function y(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)a[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;a.allBuffers=c,g(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,p=r.callback;if(g(e,t,!1,t.objectMode?1:l.length,l,u,p),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=x(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}s.inherits(v,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===v&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof p);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=f),a.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var a=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),n.nextTick(i,o),a=!1),a}(this,a,e,r))&&(a.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=h.destroy,v.prototype._undestroy=h.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}},function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=p,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";e.exports=o;var n=r(35),i=Object.create(r(39));function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,s=(3&t)<<4|r>>4,c=h>1?(15&r)<<2|i>>6:64,l=h>2?63&i:64,u.push(a.charAt(o)+a.charAt(s)+a.charAt(c)+a.charAt(l));return u.join("")},t.decode=function(e){var t,r,n,o,s,c,l=0,u=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var p,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===a.charAt(64)&&d--,e.charAt(e.length-2)===a.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=i.uint8array?new Uint8Array(0|d):new Array(0|d);l>4,r=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,n=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),p[u++]=t,64!==s&&(p[u++]=r),64!==c&&(p[u++]=n);return p}},function(e,t,r){"use strict";var n=r(3),i=r(303),a=r(10),o=r(127),s=r(20),c=r(40),l=null;if(s.nodestream)try{l=r(304)}catch(e){}function u(e,t){return new c.Promise((function(r,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on("data",(function(e,r){a.push(e),t&&t(r)})).on("error",(function(e){a=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(c,function(e,t){var r,n=0,i=null,a=0;for(r=0;r=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},function(e,t,r){"use strict";var n=r(10),i=r(82);function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r(3).inherits(a,n),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=a},function(e,t,r){"use strict";var n=r(10);t.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=r(308)},function(e,t,r){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,i){var a=n,o=i+r;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},function(e,t,r){"use strict";var n=r(21),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)l[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return c(l,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},function(e,t,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,r){"use strict";var n=r(3),i=r(20),a=r(140),o=r(322),s=r(323),c=r(142);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new c(n.transformTo("uint8array",e)):new a(n.transformTo("array",e)):new o(e)}},function(e,t,r){"use strict";var n=r(141);function i(e){n.call(this,e);for(var t=0;t=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,r){"use strict";var n=r(3);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},function(e,t,r){"use strict";var n=r(140);function i(e){n.call(this,e)}r(3).inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t){var r;t=e.exports=p,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],a=t.src=[],o=t.tokens={},s=0;function c(e){o[e]=s++}c("NUMERICIDENTIFIER"),a[o.NUMERICIDENTIFIER]="0|[1-9]\\d*",c("NUMERICIDENTIFIERLOOSE"),a[o.NUMERICIDENTIFIERLOOSE]="[0-9]+",c("NONNUMERICIDENTIFIER"),a[o.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",c("MAINVERSION"),a[o.MAINVERSION]="("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")",c("MAINVERSIONLOOSE"),a[o.MAINVERSIONLOOSE]="("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")",c("PRERELEASEIDENTIFIER"),a[o.PRERELEASEIDENTIFIER]="(?:"+a[o.NUMERICIDENTIFIER]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASEIDENTIFIERLOOSE"),a[o.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[o.NUMERICIDENTIFIERLOOSE]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASE"),a[o.PRERELEASE]="(?:-("+a[o.PRERELEASEIDENTIFIER]+"(?:\\."+a[o.PRERELEASEIDENTIFIER]+")*))",c("PRERELEASELOOSE"),a[o.PRERELEASELOOSE]="(?:-?("+a[o.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[o.PRERELEASEIDENTIFIERLOOSE]+")*))",c("BUILDIDENTIFIER"),a[o.BUILDIDENTIFIER]="[0-9A-Za-z-]+",c("BUILD"),a[o.BUILD]="(?:\\+("+a[o.BUILDIDENTIFIER]+"(?:\\."+a[o.BUILDIDENTIFIER]+")*))",c("FULL"),c("FULLPLAIN"),a[o.FULLPLAIN]="v?"+a[o.MAINVERSION]+a[o.PRERELEASE]+"?"+a[o.BUILD]+"?",a[o.FULL]="^"+a[o.FULLPLAIN]+"$",c("LOOSEPLAIN"),a[o.LOOSEPLAIN]="[v=\\s]*"+a[o.MAINVERSIONLOOSE]+a[o.PRERELEASELOOSE]+"?"+a[o.BUILD]+"?",c("LOOSE"),a[o.LOOSE]="^"+a[o.LOOSEPLAIN]+"$",c("GTLT"),a[o.GTLT]="((?:<|>)?=?)",c("XRANGEIDENTIFIERLOOSE"),a[o.XRANGEIDENTIFIERLOOSE]=a[o.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",c("XRANGEIDENTIFIER"),a[o.XRANGEIDENTIFIER]=a[o.NUMERICIDENTIFIER]+"|x|X|\\*",c("XRANGEPLAIN"),a[o.XRANGEPLAIN]="[v=\\s]*("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:"+a[o.PRERELEASE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGEPLAINLOOSE"),a[o.XRANGEPLAINLOOSE]="[v=\\s]*("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:"+a[o.PRERELEASELOOSE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGE"),a[o.XRANGE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAIN]+"$",c("XRANGELOOSE"),a[o.XRANGELOOSE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAINLOOSE]+"$",c("COERCE"),a[o.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",c("COERCERTL"),i[o.COERCERTL]=new RegExp(a[o.COERCE],"g"),c("LONETILDE"),a[o.LONETILDE]="(?:~>?)",c("TILDETRIM"),a[o.TILDETRIM]="(\\s*)"+a[o.LONETILDE]+"\\s+",i[o.TILDETRIM]=new RegExp(a[o.TILDETRIM],"g");c("TILDE"),a[o.TILDE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAIN]+"$",c("TILDELOOSE"),a[o.TILDELOOSE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAINLOOSE]+"$",c("LONECARET"),a[o.LONECARET]="(?:\\^)",c("CARETTRIM"),a[o.CARETTRIM]="(\\s*)"+a[o.LONECARET]+"\\s+",i[o.CARETTRIM]=new RegExp(a[o.CARETTRIM],"g");c("CARET"),a[o.CARET]="^"+a[o.LONECARET]+a[o.XRANGEPLAIN]+"$",c("CARETLOOSE"),a[o.CARETLOOSE]="^"+a[o.LONECARET]+a[o.XRANGEPLAINLOOSE]+"$",c("COMPARATORLOOSE"),a[o.COMPARATORLOOSE]="^"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+")$|^$",c("COMPARATOR"),a[o.COMPARATOR]="^"+a[o.GTLT]+"\\s*("+a[o.FULLPLAIN]+")$|^$",c("COMPARATORTRIM"),a[o.COMPARATORTRIM]="(\\s*)"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+"|"+a[o.XRANGEPLAIN]+")",i[o.COMPARATORTRIM]=new RegExp(a[o.COMPARATORTRIM],"g");c("HYPHENRANGE"),a[o.HYPHENRANGE]="^\\s*("+a[o.XRANGEPLAIN]+")\\s+-\\s+("+a[o.XRANGEPLAIN]+")\\s*$",c("HYPHENRANGELOOSE"),a[o.HYPHENRANGELOOSE]="^\\s*("+a[o.XRANGEPLAINLOOSE]+")\\s+-\\s+("+a[o.XRANGEPLAINLOOSE]+")\\s*$",c("STAR"),a[o.STAR]="(<|>)?=?\\s*\\*";for(var l=0;l256)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new p(e,t)}catch(e){return null}}function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof p))return new p(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new p(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(g(e,t))return null;var r=u(e),n=u(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==n[o])return i+o;return a},t.compareIdentifiers=h;var d=/^[0-9]+$/;function h(e,t){var r=d.test(e),n=d.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function v(e,t,r){return f(e,t,r)<0}function g(e,t,r){return 0===f(e,t,r)}function b(e,t,r){return 0!==f(e,t,r)}function y(e,t,r){return f(e,t,r)>=0}function x(e,t,r){return f(e,t,r)<=0}function w(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return g(e,r,n);case"!=":return b(e,r,n);case">":return m(e,r,n);case">=":return y(e,r,n);case"<":return v(e,r,n);case"<=":return x(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function E(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof E){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof E))return new E(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return h(t,e)},t.major=function(e,t){return new p(e,t).major},t.minor=function(e,t){return new p(e,t).minor},t.patch=function(e,t){return new p(e,t).patch},t.compare=f,t.compareLoose=function(e,t){return f(e,t,!0)},t.compareBuild=function(e,t,r){var n=new p(e,r),i=new p(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return f(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=m,t.lt=v,t.eq=g,t.neq=b,t.gte=y,t.lte=x,t.cmp=w,t.Comparator=E;var D={};function _(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new _(e.raw,t);if(e instanceof E)return new _(e.value,t);if(!(this instanceof _))return new _(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function S(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function C(e,t,r,n,i,a,o,s,c,l,u,p,d){return((t=k(r)?"":k(n)?">="+r+".0.0":k(i)?">="+r+"."+n+".0":">="+t)+" "+(s=k(c)?"":k(l)?"<"+(+c+1)+".0.0":k(u)?"<"+c+"."+(+l+1)+".0":p?"<="+c+"."+l+"."+u+"-"+p:"<="+s)).trim()}function A(e,t,n){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function O(e,t,r){try{t=new _(t,r)}catch(e){return!1}return t.test(e)}function I(e,t,r,n){var i,a,o,s,c;switch(e=new p(e,n),t=new _(t,n),r){case">":i=m,a=x,o=v,s=">",c=">=";break;case"<":i=v,a=y,o=m,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(O(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,n)?d=e:o(e.semver,h.semver,n)&&(h=e)})),d.operator===s||d.operator===c)return!1;if((!h.operator||h.operator===s)&&a(e,h.semver))return!1;if(h.operator===c&&o(e,h.semver))return!1}return!0}E.prototype.parse=function(e){var t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new p(r[2],this.options.loose):this.semver=D},E.prototype.toString=function(){return this.value},E.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return w(e,this.operator,this.semver,this.options)},E.prototype.intersects=function(e,t){if(!(e instanceof E))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new _(e.value,t),O(this.value,r,t));if(""===e.operator)return""===e.value||(r=new _(this.value,t),O(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=w(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=w(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=_,_.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},_.prototype.toString=function(){return this.range},_.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[o.HYPHENRANGELOOSE]:i[o.HYPHENRANGE];e=e.replace(n,C),r("hyphen replace",e),e=e.replace(i[o.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,i[o.COMPARATORTRIM]),e=(e=(e=e.replace(i[o.TILDETRIM],"$1~")).replace(i[o.CARETTRIM],"$1^")).split(/\s+/).join(" ");var a=t?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[o.CARETLOOSE]:i[o.CARET];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),k(n)?s="":k(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":k(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[o.TILDELOOSE]:i[o.TILDE];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),k(n)?s="":k(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":k(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[o.XRANGELOOSE]:i[o.XRANGE];return e.replace(n,(function(n,i,a,o,s,c){r("xRange",e,n,i,a,o,s,c);var l=k(a),u=l||k(o),p=u||k(s),d=p;return"="===i&&d&&(i=""),c=t.includePrerelease?"-0":"",l?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(u&&(o=0),s=0,">"===i?(i=">=",u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",u?a=+a+1:o=+o+1),n=i+a+"."+o+"."+s+c):u?n=">="+a+".0.0"+c+" <"+(+a+1)+".0.0"+c:p&&(n=">="+a+"."+o+".0"+c+" <"+a+"."+(+o+1)+".0"+c),r("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[o.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(a)}))),s=s.map((function(e){return new E(e,this.options)}),this)},_.prototype.intersects=function(e,t){if(!(e instanceof _))throw new TypeError("a Range is required");return this.set.some((function(r){return S(r,t)&&e.set.some((function(e){return S(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new _(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},_.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!m(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new _(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return I(e,t,"<",r)},t.gtr=function(e,t,r){return I(e,t,">",r)},t.outside=I,t.prerelease=function(e,t){var r=u(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new _(e,r),t=new _(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof p)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i[o.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);if(null===r)return null;return u(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},function(e,t){e.exports=i,i.strict=a,i.loose=o;var r=Object.prototype.toString,n={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return a(e)||o(e)}function a(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return n[r.call(e)]}},function(e,t,r){"use strict";var n=r(36);e.exports=function(e){n.copy(e,this)}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},a={key:n,value:e[n]};return r(i,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,o;if(Array.isArray(t)){for(o="[",r=0;r",b=h?">":"<",y=void 0;if(!d&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!v&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(f+" must be number or boolean");if(v){var x=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,E="exclType"+a,D="exclIsNumber"+a,_="' + "+(C="op"+a)+" + '";i+=" var schemaExcl"+a+" = "+x+"; ",i+=" var "+w+"; var "+E+" = typeof "+(x="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var S;y=f;(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var k=i;i=S.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+E+" == 'number' ? ( ("+w+" = "+n+" === undefined || "+x+" "+g+"= "+n+") ? "+p+" "+b+"= "+x+" : "+p+" "+b+" "+n+" ) : ( ("+w+" = "+x+" === true) ? "+p+" "+b+"= "+n+" : "+p+" "+b+" "+n+" ) || "+p+" !== "+p+") { var op"+a+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(y=f,l=e.errSchemaPath+"/"+f,n=x,d=v)}else{_=g;if((D="number"==typeof m)&&d){var C="'"+_+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+g+"= "+n+" ? "+p+" "+b+"= "+m+" : "+p+" "+b+" "+n+" ) || "+p+" !== "+p+") { "}else{D&&void 0===s?(w=!0,y=f,l=e.errSchemaPath+"/"+f,n=m,b+="="):(D&&(n=Math[h?"min":"max"](m,s)),m===(!D||n)?(w=!0,y=f,l=e.errSchemaPath+"/"+f,b+="="):(w=!1,_+="="));C="'"+_+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+" "+b+" "+n+" || "+p+" !== "+p+") { "}}y=y||t,(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+C+", limit: "+n+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+_+" ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";k=i;return i=S.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var h=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");var h="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+h+" "+n+") { ";var f=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var v=i;return i=m.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+p+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var h=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,r){"use strict";const n=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};e.exports=n,e.exports.default=n},function(e,t,r){"use strict";const n=r(1),i=r(234),{download:a}=r(245),o=r(258),s=e=>e.webContents||e.getWebContentsId&&n.remote.webContents.fromId(e.getWebContentsId()),c=e=>(t={})=>(t.transform&&!t.click&&(e.transform=t.transform),e),l=(e,t)=>{const r=(r,l)=>{if("function"==typeof t.shouldShowMenu&&!1===t.shouldShowMenu(r,l))return;const{editFlags:u}=l,p=l.selectionText.trim().length>0,d=Boolean(l.linkURL),h=e=>u["can"+e]&&p,f={separator:()=>({type:"separator"}),learnSpelling:c({id:"learnSpelling",label:"&Learn Spelling",visible:Boolean(l.isEditable&&p&&l.misspelledWord),click(){s(e).session.addWordToSpellCheckerDictionary(l.misspelledWord)}}),lookUpSelection:c({id:"lookUpSelection",label:"Look Up “{selection}”",visible:"darwin"===process.platform&&p&&!d,click(){"darwin"===process.platform&&s(e).showDefinitionForSelection()}}),searchWithGoogle:c({id:"searchWithGoogle",label:"&Search with Google",visible:p,click(){const e=new URL("https://www.google.com/search");e.searchParams.set("q",l.selectionText),n.shell.openExternal(e.toString())}}),cut:c({id:"cut",label:"Cu&t",enabled:h("Cut"),visible:l.isEditable,click(t){const r=s(e);!t.transform&&r?r.cut():(l.selectionText=t.transform?t.transform(l.selectionText):l.selectionText,n.clipboard.writeText(l.selectionText))}}),copy:c({id:"copy",label:"&Copy",enabled:h("Copy"),visible:l.isEditable||p,click(t){const r=s(e);!t.transform&&r?r.copy():(l.selectionText=t.transform?t.transform(l.selectionText):l.selectionText,n.clipboard.writeText(l.selectionText))}}),paste:c({id:"paste",label:"&Paste",enabled:u.canPaste,visible:l.isEditable,click(t){const r=s(e);if(t.transform){let e=n.clipboard.readText(l.selectionText);e=t.transform?t.transform(e):e,r.insertText(e)}else r.paste()}}),saveImage:c({id:"saveImage",label:"Save I&mage",visible:"image"===l.mediaType,click(t){l.srcURL=t.transform?t.transform(l.srcURL):l.srcURL,a(e,l.srcURL)}}),saveImageAs:c({id:"saveImageAs",label:"Sa&ve Image As…",visible:"image"===l.mediaType,click(t){l.srcURL=t.transform?t.transform(l.srcURL):l.srcURL,a(e,l.srcURL,{saveAs:!0})}}),copyLink:c({id:"copyLink",label:"Copy Lin&k",visible:l.linkURL.length>0&&"none"===l.mediaType,click(e){l.linkURL=e.transform?e.transform(l.linkURL):l.linkURL,n.clipboard.write({bookmark:l.linkText,text:l.linkURL})}}),saveLinkAs:c({id:"saveLinkAs",label:"Save Link As…",visible:l.linkURL.length>0&&"none"===l.mediaType,click(t){l.linkURL=t.transform?t.transform(l.linkURL):l.linkURL,a(e,l.linkURL,{saveAs:!0})}}),copyImage:c({id:"copyImage",label:"Cop&y Image",visible:"image"===l.mediaType,click(){s(e).copyImageAt(l.x,l.y)}}),copyImageAddress:c({id:"copyImageAddress",label:"C&opy Image Address",visible:"image"===l.mediaType,click(e){l.srcURL=e.transform?e.transform(l.srcURL):l.srcURL,n.clipboard.write({bookmark:l.srcURL,text:l.srcURL})}}),inspect:()=>({id:"inspect",label:"I&nspect Element",click(){e.inspectElement(l.x,l.y),s(e).isDevToolsOpened()&&s(e).devToolsWebContents.focus()}}),services:()=>({id:"services",label:"Services",role:"services",visible:"darwin"===process.platform&&(l.isEditable||p)})},m="boolean"==typeof t.showInspectElement?t.showInspectElement:o;let v=[];p&&l.misspelledWord&&l.dictionarySuggestions.length>0?v=l.dictionarySuggestions.map(t=>function(t){return{id:"dictionarySuggestions",label:t,visible:Boolean(l.isEditable&&p&&l.misspelledWord),click(t){s(e).replaceMisspelling(t.label)}}}(t)):v.push({id:"dictionarySuggestions",label:"No Guesses Found",visible:Boolean(p&&l.misspelledWord),enabled:!1});let g=[v.length>0&&f.separator(),...v,f.separator(),f.learnSpelling(),f.separator(),!1!==t.showLookUpSelection&&f.lookUpSelection(),f.separator(),!1!==t.showSearchWithGoogle&&f.searchWithGoogle(),f.separator(),f.cut(),f.copy(),f.paste(),f.separator(),t.showSaveImage&&f.saveImage(),t.showSaveImageAs&&f.saveImageAs(),!1!==t.showCopyImage&&f.copyImage(),t.showCopyImageAddress&&f.copyImageAddress(),f.separator(),f.copyLink(),t.showSaveLinkAs&&f.saveLinkAs(),f.separator(),m&&f.inspect(),t.showServices&&f.services(),f.separator()];if(t.menu&&(g=t.menu(f,l,e,v)),t.prepend){const r=t.prepend(f,l,e);Array.isArray(r)&&g.unshift(...r)}if(t.append){const r=t.append(f,l,e);Array.isArray(r)&&g.push(...r)}g=(e=>{let t;return e.filter(e=>void 0!==e&&!1!==e&&!1!==e.visible&&""!==e.visible).filter((e,r,n)=>{const i="separator"===e.type&&(!t||r===n.length-1||"separator"===n[r+1].type);return t=i?t:e,!i})})(g);for(const e of g)if(t.labels&&t.labels[e.id]&&(e.label=t.labels[e.id]),"string"==typeof e.label&&e.label.includes("{selection}")){const t="string"==typeof l.selectionText?l.selectionText.trim():"";e.label=e.label.replace("{selection}",i(t,25).replace(/&/g,"&&"))}if(g.length>0){(n.remote?n.remote.Menu:n.Menu).buildFromTemplate(g).popup(n.remote?n.remote.getCurrentWindow():e)}};return s(e).on("context-menu",r),()=>{e.isDestroyed()||s(e).removeListener("context-menu",r)}};e.exports=(e={})=>{let t=!1;const r=[],i=n=>{if(t)return;const i=l(n,e);r.push(i);const a=()=>{const e=r.indexOf(i);-1!==e&&r.splice(e,1)};void 0!==n.once&&n.once("closed",a),r.push(()=>{n.off("closed",a)})},a=()=>{for(const e of r)e();r.length=0,t=!0};if(e.window){const t=e.window;if(void 0===s(t)){const e=()=>{i(t)};return(t.addEventListener||t.addListener)("dom-ready",e,{once:!0}),r.push(()=>{t.removeEventListener("dom-ready",e,{once:!0})}),a}return i(t),a}for(const e of(n.BrowserWindow||n.remote.BrowserWindow).getAllWindows())i(e);const o=n.app||n.remote.app,c=(e,t)=>{i(t)};return o.on("browser-window-created",c),r.push(()=>{o.removeListener("browser-window-created",c)}),a}},function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(156):e.exports=r(158)},function(e,t,r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(90)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},function(e,t){var r=1e3,n=6e4,i=60*n,a=24*i;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=n)return o(e,t,n,"minute");if(t>=r)return o(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){const n=r(159),i=r(9);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(160);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),e.exports=r(90)(t);const{formatters:a}=e.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},function(e,t){e.exports=require("tty")},function(e,t,r){"use strict";const n=r(37),i=r(161),a=process.env;let o;function s(e){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||"codeship"===a.CI_NAME?1:t;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:(a.TERM,t)}(e))}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in a&&(o=0===a.FORCE_COLOR.length||0!==parseInt(a.FORCE_COLOR,10)),e.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}},function(e,t,r){"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n0&&(t.startsWith("/")||(e+="/"),e+=t),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getS3LikeProviderBaseUrl=t.githubUrl=void 0,t.githubUrl=function(e,t="github.com"){return`${e.protocol||"https"}://${e.host||t}`},t.getS3LikeProviderBaseUrl=function(e){const t=e.provider;if("s3"===t)return function(e){let t;if(null!=e.endpoint)t=`${e.endpoint}/${e.bucket}`;else if(e.bucket.includes(".")){if(null==e.region)throw new Error(`Bucket name "${e.bucket}" includes a dot, but S3 region is missing`);t="us-east-1"===e.region?"https://s3.amazonaws.com/"+e.bucket:`https://s3-${e.region}.amazonaws.com/${e.bucket}`}else t="cn-north-1"===e.region?`https://${e.bucket}.s3.${e.region}.amazonaws.com.cn`:`https://${e.bucket}.s3.amazonaws.com`;return n(t,e.path)}(e);if("spaces"===t)return function(e){if(null==e.name)throw new Error("name is missing");if(null==e.region)throw new Error("region is missing");return n(`https://${e.name}.${e.region}.digitaloceanspaces.com`,e.path)}(e);throw new Error("Not supported provider: "+t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDn=void 0,t.parseDn=function(e){let t=!1,r=null,n="",i=0;e=e.trim();const a=new Map;for(let o=0;o<=e.length;o++){if(o===e.length){null!==r&&a.set(r,n);break}const s=e[o];if(t){if('"'===s){t=!1;continue}}else{if('"'===s){t=!0;continue}if("\\"===s){o++;const t=parseInt(e.slice(o,o+2),16);Number.isNaN(t)?n+=e[o]:(o++,n+=String.fromCharCode(t));continue}if(null===r&&"="===s){r=n,n="";continue}if(","===s||";"===s||"+"===s){null!==r&&a.set(r,n),r=null,n="";continue}}if(" "===s&&!t){if(0===n.length)continue;if(o>i){let t=o;for(;" "===e[t];)t++;i=t}if(i>=e.length||","===e[i]||";"===e[i]||null===r&&"="===e[i]||null!==r&&"+"===e[i]){o=i-1;continue}}n+=s}return a}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nil=t.UUID=void 0;const n=r(38),i=r(4),a=n.randomBytes(16);a[0]=1|a[0];const o={},s=[];for(let e=0;e<256;e++){const t=(e+256).toString(16).substr(1);o[t]=e,s[e]=t}class c{constructor(e){this.ascii=null,this.binary=null;const t=c.check(e);if(!t)throw new Error("not a UUID");this.version=t.version,"ascii"===t.format?this.ascii=e:this.binary=e}static v5(e,t){return function(e,t,r,a,o=u.ASCII){const l=n.createHash(t);if("string"!=typeof e&&!Buffer.isBuffer(e))throw i.newError("options.name must be either a string or a Buffer","ERR_INVALID_UUID_NAME");l.update(a),l.update(e);const p=l.digest();let d;switch(o){case u.BINARY:p[6]=15&p[6]|r,p[8]=63&p[8]|128,d=p;break;case u.OBJECT:p[6]=15&p[6]|r,p[8]=63&p[8]|128,d=new c(p);break;default:d=s[p[0]]+s[p[1]]+s[p[2]]+s[p[3]]+"-"+s[p[4]]+s[p[5]]+"-"+s[15&p[6]|r]+s[p[7]]+"-"+s[63&p[8]|128]+s[p[9]]+"-"+s[p[10]]+s[p[11]]+s[p[12]]+s[p[13]]+s[p[14]]+s[p[15]]}return d}(e,"sha1",80,t)}toString(){var e;return null==this.ascii&&(this.ascii=(e=this.binary,s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]])),this.ascii}inspect(){return`UUID v${this.version} ${this.toString()}`}static check(e,t=0){if("string"==typeof e)return e=e.toLowerCase(),!!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(e)&&("00000000-0000-0000-0000-000000000000"===e?{version:void 0,variant:"nil",format:"ascii"}:{version:(240&o[e[14]+e[15]])>>4,variant:l((224&o[e[19]+e[20]])>>5),format:"ascii"});if(Buffer.isBuffer(e)){if(e.length>4,variant:l((224&e[t+8])>>5),format:"binary"}}throw i.newError("Unknown type of uuid","ERR_UNKNOWN_UUID_TYPE")}static parse(e){const t=Buffer.allocUnsafe(16);let r=0;for(let n=0;n<16;n++)t[n]=o[e[r++]+e[r++]],3!==n&&5!==n&&7!==n&&9!==n||(r+=1);return t}}function l(e){switch(e){case 0:case 1:case 3:return"ncs";case 4:case 5:return"rfc4122";case 6:return"microsoft";default:return"future"}}var u;t.UUID=c,c.OID=c.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"),function(e){e[e.ASCII=0]="ASCII",e[e.BINARY=1]="BINARY",e[e.OBJECT=2]="OBJECT"}(u||(u={})),t.nil=new c("00000000-0000-0000-0000-000000000000")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseXml=t.XElement=void 0;const n=r(166),i=r(4);class a{constructor(e){if(this.name=e,this.value="",this.attributes=null,this.isCData=!1,this.elements=null,!e)throw i.newError("Element name cannot be empty","ERR_XML_ELEMENT_NAME_EMPTY");if(!function(e){return o.test(e)}(e))throw i.newError("Invalid element name: "+e,"ERR_XML_ELEMENT_INVALID_NAME")}attribute(e){const t=null===this.attributes?null:this.attributes[e];if(null==t)throw i.newError(`No attribute "${e}"`,"ERR_XML_MISSED_ATTRIBUTE");return t}removeAttribute(e){null!==this.attributes&&delete this.attributes[e]}element(e,t=!1,r=null){const n=this.elementOrNull(e,t);if(null===n)throw i.newError(r||`No element "${e}"`,"ERR_XML_MISSED_ELEMENT");return n}elementOrNull(e,t=!1){if(null===this.elements)return null;for(const r of this.elements)if(s(r,e,t))return r;return null}getElements(e,t=!1){return null===this.elements?[]:this.elements.filter(r=>s(r,e,t))}elementValueOrEmpty(e,t=!1){const r=this.elementOrNull(e,t);return null===r?"":r.value}}t.XElement=a;const o=new RegExp(/^[A-Za-z_][:A-Za-z0-9_-]*$/i);function s(e,t,r){const n=e.name;return n===t||!0===r&&n.length===t.length&&n.toLowerCase()===t.toLowerCase()}t.parseXml=function(e){let t=null;const r=n.parser(!0,{}),i=[];return r.onopentag=e=>{const r=new a(e.name);if(r.attributes=e.attributes,null===t)t=r;else{const e=i[i.length-1];null==e.elements&&(e.elements=[]),e.elements.push(r)}i.push(r)},r.onclosetag=()=>{i.pop()},r.ontext=e=>{i.length>0&&(i[i.length-1].value=e)},r.oncdata=e=>{const t=i[i.length-1];t.value=e,t.isCData=!0},r.onerror=e=>{throw e},r.write(e),t}},function(e,t,r){!function(e){e.parser=function(e,t){return new i(e,t)},e.SAXParser=i,e.SAXStream=o,e.createStream=function(e,t){return new o(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(t,r){if(!(this instanceof i))return new i(t,r);!function(e){for(var t=0,r=n.length;t"===i?(_(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=w.TEXT):f(i)?(this.state=w.SGML_DECL_QUOTED,this.sgmlDecl+=i):this.sgmlDecl+=i;continue;case w.SGML_DECL_QUOTED:i===this.q&&(this.state=w.SGML_DECL,this.q=""),this.sgmlDecl+=i;continue;case w.DOCTYPE:">"===i?(this.state=w.TEXT,_(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=i,"["===i?this.state=w.DOCTYPE_DTD:f(i)&&(this.state=w.DOCTYPE_QUOTED,this.q=i));continue;case w.DOCTYPE_QUOTED:this.doctype+=i,i===this.q&&(this.q="",this.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:this.doctype+=i,"]"===i?this.state=w.DOCTYPE:f(i)&&(this.state=w.DOCTYPE_DTD_QUOTED,this.q=i);continue;case w.DOCTYPE_DTD_QUOTED:this.doctype+=i,i===this.q&&(this.state=w.DOCTYPE_DTD,this.q="");continue;case w.COMMENT:"-"===i?this.state=w.COMMENT_ENDING:this.comment+=i;continue;case w.COMMENT_ENDING:"-"===i?(this.state=w.COMMENT_ENDED,this.comment=k(this.opt,this.comment),this.comment&&_(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+i,this.state=w.COMMENT);continue;case w.COMMENT_ENDED:">"!==i?(O(this,"Malformed comment"),this.comment+="--"+i,this.state=w.COMMENT):this.state=w.TEXT;continue;case w.CDATA:"]"===i?this.state=w.CDATA_ENDING:this.cdata+=i;continue;case w.CDATA_ENDING:"]"===i?this.state=w.CDATA_ENDING_2:(this.cdata+="]"+i,this.state=w.CDATA);continue;case w.CDATA_ENDING_2:">"===i?(this.cdata&&_(this,"oncdata",this.cdata),_(this,"onclosecdata"),this.cdata="",this.state=w.TEXT):"]"===i?this.cdata+="]":(this.cdata+="]]"+i,this.state=w.CDATA);continue;case w.PROC_INST:"?"===i?this.state=w.PROC_INST_ENDING:h(i)?this.state=w.PROC_INST_BODY:this.procInstName+=i;continue;case w.PROC_INST_BODY:if(!this.procInstBody&&h(i))continue;"?"===i?this.state=w.PROC_INST_ENDING:this.procInstBody+=i;continue;case w.PROC_INST_ENDING:">"===i?(_(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=w.TEXT):(this.procInstBody+="?"+i,this.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:v(u,i)?this.tagName+=i:(I(this),">"===i?F(this):"/"===i?this.state=w.OPEN_TAG_SLASH:(h(i)||O(this,"Invalid character in tag name"),this.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:">"===i?(F(this,!0),T(this)):(O(this,"Forward-slash in opening tag not followed by >"),this.state=w.ATTRIB);continue;case w.ATTRIB:if(h(i))continue;">"===i?F(this):"/"===i?this.state=w.OPEN_TAG_SLASH:v(l,i)?(this.attribName=i,this.attribValue="",this.state=w.ATTRIB_NAME):O(this,"Invalid attribute name");continue;case w.ATTRIB_NAME:"="===i?this.state=w.ATTRIB_VALUE:">"===i?(O(this,"Attribute without value"),this.attribValue=this.attribName,P(this),F(this)):h(i)?this.state=w.ATTRIB_NAME_SAW_WHITE:v(u,i)?this.attribName+=i:O(this,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if("="===i)this.state=w.ATTRIB_VALUE;else{if(h(i))continue;O(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",_(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===i?F(this):v(l,i)?(this.attribName=i,this.state=w.ATTRIB_NAME):(O(this,"Invalid attribute name"),this.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(h(i))continue;f(i)?(this.q=i,this.state=w.ATTRIB_VALUE_QUOTED):(O(this,"Unquoted attribute value"),this.state=w.ATTRIB_VALUE_UNQUOTED,this.attribValue=i);continue;case w.ATTRIB_VALUE_QUOTED:if(i!==this.q){"&"===i?this.state=w.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=i;continue}P(this),this.q="",this.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:h(i)?this.state=w.ATTRIB:">"===i?F(this):"/"===i?this.state=w.OPEN_TAG_SLASH:v(l,i)?(O(this,"No whitespace between attributes"),this.attribName=i,this.attribValue="",this.state=w.ATTRIB_NAME):O(this,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!m(i)){"&"===i?this.state=w.ATTRIB_VALUE_ENTITY_U:this.attribValue+=i;continue}P(this),">"===i?F(this):this.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(this.tagName)">"===i?T(this):v(u,i)?this.tagName+=i:this.script?(this.script+=""===i?T(this):O(this,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var s,c;switch(this.state){case w.TEXT_ENTITY:s=w.TEXT,c="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:s=w.ATTRIB_VALUE_QUOTED,c="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:s=w.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===i?(this[c]+=N(this),this.entity="",this.state=s):v(this.entity.length?d:p,i)?this.entity+=i:(O(this,"Invalid character in entity name"),this[c]+="&"+this.entity+i,this.entity="",this.state=s);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function(t){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,a=0,o=n.length;ar)switch(n[a]){case"textNode":S(t);break;case"cdata":_(t,"oncdata",t.cdata),t.cdata="";break;case"script":_(t,"onscript",t.script),t.script="";break;default:C(t,"Max buffer length exceeded: "+n[a])}i=Math.max(i,s)}var c=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=c+t.position}(this);return this} +/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;S(e=this),""!==e.cdata&&(_(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(_(e,"onscript",e.script),e.script="")}};try{t=r(18).Stream}catch(e){t=function(){}}var a=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function o(e,r){if(!(this instanceof o))return new o(e,r);t.apply(this),this._parser=new i(e,r),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,a.forEach((function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(t.prototype,{constructor:{value:o}}),o.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=r(167).StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===a.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var s="http://www.w3.org/XML/1998/namespace",c={xml:s,xmlns:"http://www.w3.org/2000/xmlns/"},l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,u=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function h(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function f(e){return'"'===e||"'"===e}function m(e){return">"===e||h(e)}function v(e,t){return e.test(t)}function g(e,t){return!v(e,t)}var b,y,x,w=0;for(var E in e.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n})),e.STATE)e.STATE[e.STATE[E]]=E;function D(e,t,r){e[t]&&e[t](r)}function _(e,t,r){e.textNode&&S(e),D(e,t,r)}function S(e){e.textNode=k(e.opt,e.textNode),e.textNode&&D(e,"ontext",e.textNode),e.textNode=""}function k(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function C(e,t){return S(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,D(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&O(e,"Unclosed root tag"),e.state!==w.BEGIN&&e.state!==w.BEGIN_WHITESPACE&&e.state!==w.TEXT&&C(e,"Unexpected end"),S(e),e.c="",e.closed=!0,D(e,"onend"),i.call(e,e.strict,e.opt),e}function O(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&C(e,t)}function I(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,_(e,"onopentagstart",r)}function R(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function P(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=R(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==s)O(e,"xml: prefix must be bound to "+s+"\nActual: "+e.attribValue);else if("xmlns"===n&&"http://www.w3.org/2000/xmlns/"!==e.attribValue)O(e,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,_(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function F(e,t){if(e.opt.xmlns){var r=e.tag,n=R(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(O(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var i=e.tags[e.tags.length-1]||e;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){_(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var a=0,o=e.attribList.length;a",e.tagName="",void(e.state=w.SCRIPT);_(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--;){if(e.tags[t].name===n)break;O(e,"Unexpected close tag")}if(t<0)return O(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=w.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,_(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach((function(t){var r=a.ns[t];_(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=w.TEXT}function N(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r?(O(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function j(e,t){"<"===t?(e.state=w.OPEN_WAKA,e.startTagPosition=e.position):h(t)||(O(e,"Non-whitespace before first tag."),e.textNode=t,e.state=w.TEXT)}function L(e,t){var r="";return t1114111||y(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?n.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,n.push(e,t)),(i+1===a||n.length>r)&&(o+=b.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x)}(t)},function(e,t){e.exports=require("string_decoder")},function(e,t,r){var n=r(169),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||(a=i.call(process)),a};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}e.exports=function(e){n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?i&&i(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,r){var i,a=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),o=!0;try{i=e.fchmodSync(a,r),o=!1}finally{if(o)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return i}}(e);e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,(function(t,n){t?a&&a(t):e.futimes(n,r,i,(function(t){e.close(n,(function(e){a&&a(t||e)}))}))}))},e.lutimesSync=function(t,r,i){var a,o=e.openSync(t,n.O_SYMLINK),s=!0;try{a=e.futimesSync(o,r,i),s=!1}finally{if(s)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return a}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=a(e.chown),e.fchown=a(e.fchown),e.lchown=a(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===o&&(e.rename=(t=e.rename,function(r,n,i){var a=Date.now(),o=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-a<6e4)return setTimeout((function(){e.stat(n,(function(e,a){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}));var t;function r(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){u(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function i(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!u(e))throw e}}:t}function a(t){return t?function(r,n,i,a){return t.call(e,r,n,i,(function(e){u(e)&&(e=null),a&&a.apply(this,arguments)}))}:t}function s(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!u(e))throw e}}:t}function c(t){return t?function(r,n,i){function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,a):t.call(e,r,a)}:t}function l(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function u(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function r(r,n,i,a,o,s){var c;if(s&&"function"==typeof s){var l=0;c=function(u,p,d){if(u&&"EAGAIN"===u.code&&l<10)return l++,t.call(e,r,n,i,a,o,c);s.apply(this,arguments)}}return t.call(e,r,n,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync=(p=e.readSync,function(t,r,n,i,a){for(var o=0;;)try{return p.call(e,t,r,n,i,a)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var p}},function(e,t){e.exports=require("constants")},function(e,t,r){var n=r(18).Stream;e.exports=function(e){return{ReadStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var o=Object.keys(i),s=0,c=o.length;sthis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){a._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return a.emit("error",e),void(a.readable=!1);a.fd=t,a.emit("open",t),a._read()}))},WriteStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var a=Object.keys(i),o=0,s=a.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},function(e,t,r){"use strict";e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:n(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t};var n=Object.getPrototypeOf||function(e){return e.__proto__}},function(e,t,r){"use strict";const n=r(7),i=r(0),a=r(16).mkdirsSync,o=r(93).utimesMillisSync,s=r(27);function c(e,t,r,a){const o=(a.dereference?n.statSync:n.lstatSync)(t);if(o.isDirectory())return function(e,t,r,i,a){return t?p(r,i,a):function(e,t,r,i){return n.mkdirSync(r),p(t,r,i),u(r,e)}(e.mode,r,i,a)}(o,e,t,r,a);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,r,i,a){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),l(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,a):l(e,r,i,a)}(o,e,t,r,a);if(o.isSymbolicLink())return function(e,t,r,a){let o=n.readlinkSync(t);a.dereference&&(o=i.resolve(process.cwd(),o));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(o,r);throw e}if(a.dereference&&(e=i.resolve(process.cwd(),e)),s.isSrcSubdir(o,e))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`);if(n.statSync(r).isDirectory()&&s.isSrcSubdir(e,o))throw new Error(`Cannot overwrite '${e}' with '${o}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(o,r)}return n.symlinkSync(o,r)}(e,t,r,a);if(o.isSocket())throw new Error("Cannot copy a socket file: "+t);if(o.isFIFO())throw new Error("Cannot copy a FIFO pipe: "+t);throw new Error("Unknown file: "+t)}function l(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return 0==(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);o(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function p(e,t,r){n.readdirSync(e).forEach(n=>function(e,t,r,n){const a=i.join(t,e),o=i.join(r,e),{destStat:l}=s.checkPathsSync(a,o,"copy",n);return function(e,t,r,n){if(!n.filter||n.filter(t,r))return c(e,t,r,n)}(l,a,o,n)}(n,e,t,r))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:o,destStat:l}=s.checkPathsSync(e,t,"copy",r);return s.checkParentPathsSync(e,o,t,"copy"),function(e,t,r,o){if(o.filter&&!o.filter(t,r))return;const s=i.dirname(r);n.existsSync(s)||a(s);return c(e,t,r,o)}(l,e,t,r)}},function(e,t,r){"use strict";const n=r(26),{checkPath:i}=r(174),a=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(i(e),n.mkdir(e,{mode:a(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(i(e),n.mkdirSync(e,{mode:a(t),recursive:!0}))},function(e,t,r){"use strict";const n=r(0);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error("Path contains invalid characters: "+e);throw t.code="EINVAL",t}}}},function(e,t,r){"use strict";const n=r(7),i=r(0),a=r(16).mkdirs,o=r(24).pathExists,s=r(93).utimesMillis,c=r(27);function l(e,t,r,n,s){const c=i.dirname(r);o(c,(i,o)=>i?s(i):o?p(e,t,r,n,s):void a(c,i=>i?s(i):p(e,t,r,n,s)))}function u(e,t,r,n,i,a){Promise.resolve(i.filter(r,n)).then(o=>o?e(t,r,n,i,a):a(),e=>a(e))}function p(e,t,r,i,a){(i.dereference?n.stat:n.lstat)(t,(o,s)=>o?a(o):s.isDirectory()?function(e,t,r,i,a,o){return t?m(r,i,a,o):function(e,t,r,i,a){n.mkdir(r,n=>{if(n)return a(n);m(t,r,i,t=>t?a(t):f(r,e,a))})}(e.mode,r,i,a,o)}(s,e,t,r,i,a):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?function(e,t,r,i,a,o){return t?function(e,t,r,i,a){if(!i.overwrite)return i.errorOnExist?a(new Error(`'${r}' already exists`)):a();n.unlink(r,n=>n?a(n):d(e,t,r,i,a))}(e,r,i,a,o):d(e,r,i,a,o)}(s,e,t,r,i,a):s.isSymbolicLink()?g(e,t,r,i,a):s.isSocket()?a(new Error("Cannot copy a socket file: "+t)):s.isFIFO()?a(new Error("Cannot copy a FIFO pipe: "+t)):a(new Error("Unknown file: "+t)))}function d(e,t,r,i,a){n.copyFile(t,r,n=>n?a(n):i.preserveTimestamps?function(e,t,r,n){if(function(e){return 0==(128&e)}(e))return function(e,t,r){return f(e,128|t,r)}(r,e,i=>i?n(i):h(e,t,r,n));return h(e,t,r,n)}(e.mode,t,r,a):f(r,e.mode,a))}function h(e,t,r,i){!function(e,t,r){n.stat(e,(e,n)=>e?r(e):s(t,n.atime,n.mtime,r))}(t,r,t=>t?i(t):f(r,e,i))}function f(e,t,r){return n.chmod(e,t,r)}function m(e,t,r,i){n.readdir(e,(n,a)=>n?i(n):v(a,e,t,r,i))}function v(e,t,r,n,a){const o=e.pop();return o?function(e,t,r,n,a,o){const s=i.join(r,t),l=i.join(n,t);c.checkPaths(s,l,"copy",a,(t,i)=>{if(t)return o(t);const{destStat:c}=i;!function(e,t,r,n,i){n.filter?u(p,e,t,r,n,i):p(e,t,r,n,i)}(c,s,l,a,t=>t?o(t):v(e,r,n,a,o))})}(e,o,t,r,n,a):a()}function g(e,t,r,a,o){n.readlink(t,(t,s)=>t?o(t):(a.dereference&&(s=i.resolve(process.cwd(),s)),e?void n.readlink(r,(t,l)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?n.symlink(s,r,o):o(t):(a.dereference&&(l=i.resolve(process.cwd(),l)),c.isSrcSubdir(s,l)?o(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${l}'.`)):e.isDirectory()&&c.isSrcSubdir(l,s)?o(new Error(`Cannot overwrite '${l}' with '${s}'.`)):function(e,t,r){n.unlink(t,i=>i?r(i):n.symlink(e,t,r))}(s,r,o))):n.symlink(s,r,o)))}e.exports=function(e,t,r,n){"function"!=typeof r||n?"function"==typeof r&&(r={filter:r}):(n=r,r={}),n=n||function(){},(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),c.checkPaths(e,t,"copy",r,(i,a)=>{if(i)return n(i);const{srcStat:o,destStat:s}=a;c.checkParentPaths(e,o,t,"copy",i=>i?n(i):r.filter?u(l,s,e,t,r,n):l(s,e,t,r,n))})}},function(e,t,r){"use strict";const n=r(8).fromPromise,i=r(26),a=r(0),o=r(16),s=r(41),c=n((async function(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map(t=>s.remove(a.join(e,t))))}));function l(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach(t=>{t=a.join(e,t),s.removeSync(t)})}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:c,emptydir:c}},function(e,t,r){"use strict";const n=r(7),i=r(0),a=r(23),o="win32"===process.platform;function s(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{e[t]=e[t]||n[t],e[t+="Sync"]=e[t]||n[t]}),e.maxBusyTries=e.maxBusyTries||3}function c(e,t,r){let n=0;"function"==typeof t&&(r=t,t={}),a(e,"rimraf: missing path"),a.strictEqual(typeof e,"string","rimraf: path should be a string"),a.strictEqual(typeof r,"function","rimraf: callback function required"),a(t,"rimraf: invalid options argument provided"),a.strictEqual(typeof t,"object","rimraf: options should be object"),s(t),l(e,t,(function i(a){if(a){if(("EBUSY"===a.code||"ENOTEMPTY"===a.code||"EPERM"===a.code)&&nl(e,t,i),100*n)}"ENOENT"===a.code&&(a=null)}r(a)}))}function l(e,t,r){a(e),a(t),a("function"==typeof r),t.lstat(e,(n,i)=>n&&"ENOENT"===n.code?r(null):n&&"EPERM"===n.code&&o?u(e,t,n,r):i&&i.isDirectory()?d(e,t,n,r):void t.unlink(e,n=>{if(n){if("ENOENT"===n.code)return r(null);if("EPERM"===n.code)return o?u(e,t,n,r):d(e,t,n,r);if("EISDIR"===n.code)return d(e,t,n,r)}return r(n)}))}function u(e,t,r,n){a(e),a(t),a("function"==typeof n),t.chmod(e,438,i=>{i?n("ENOENT"===i.code?null:r):t.stat(e,(i,a)=>{i?n("ENOENT"===i.code?null:r):a.isDirectory()?d(e,t,r,n):t.unlink(e,n)})})}function p(e,t,r){let n;a(e),a(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw r}try{n=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw r}n.isDirectory()?f(e,t,r):t.unlinkSync(e)}function d(e,t,r,n){a(e),a(t),a("function"==typeof n),t.rmdir(e,o=>{!o||"ENOTEMPTY"!==o.code&&"EEXIST"!==o.code&&"EPERM"!==o.code?o&&"ENOTDIR"===o.code?n(r):n(o):function(e,t,r){a(e),a(t),a("function"==typeof r),t.readdir(e,(n,a)=>{if(n)return r(n);let o,s=a.length;if(0===s)return t.rmdir(e,r);a.forEach(n=>{c(i.join(e,n),t,n=>{if(!o)return n?r(o=n):void(0==--s&&t.rmdir(e,r))})})})}(e,t,n)})}function h(e,t){let r;s(t=t||{}),a(e,"rimraf: missing path"),a.strictEqual(typeof e,"string","rimraf: path should be a string"),a(t,"rimraf: missing options"),a.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if("ENOENT"===r.code)return;"EPERM"===r.code&&o&&p(e,t,r)}try{r&&r.isDirectory()?f(e,t,null):t.unlinkSync(e)}catch(r){if("ENOENT"===r.code)return;if("EPERM"===r.code)return o?p(e,t,r):f(e,t,r);if("EISDIR"!==r.code)throw r;f(e,t,r)}}function f(e,t,r){a(e),a(t);try{t.rmdirSync(e)}catch(n){if("ENOTDIR"===n.code)throw r;if("ENOTEMPTY"===n.code||"EEXIST"===n.code||"EPERM"===n.code)!function(e,t){if(a(e),a(t),t.readdirSync(e).forEach(r=>h(i.join(e,r),t)),!o){return t.rmdirSync(e,t)}{const r=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(Date.now()-r<500)}}(e,t);else if("ENOENT"!==n.code)throw n}}e.exports=c,c.sync=h},function(e,t,r){"use strict";const n=r(179),i=r(180),a=r(181);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:a.createSymlink,createSymlinkSync:a.createSymlinkSync,ensureSymlink:a.createSymlink,ensureSymlinkSync:a.createSymlinkSync}},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(0),a=r(7),o=r(16);e.exports={createFile:n((function(e,t){function r(){a.writeFile(e,"",e=>{if(e)return t(e);t()})}a.stat(e,(n,s)=>{if(!n&&s.isFile())return t();const c=i.dirname(e);a.stat(c,(e,n)=>{if(e)return"ENOENT"===e.code?o.mkdirs(c,e=>{if(e)return t(e);r()}):t(e);n.isDirectory()?r():a.readdir(c,e=>{if(e)return t(e)})})})})),createFileSync:function(e){let t;try{t=a.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{a.statSync(r).isDirectory()||a.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;o.mkdirsSync(r)}a.writeFileSync(e,"")}}},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(0),a=r(7),o=r(16),s=r(24).pathExists,{areIdentical:c}=r(27);e.exports={createLink:n((function(e,t,r){function n(e,t){a.link(e,t,e=>{if(e)return r(e);r(null)})}a.lstat(t,(l,u)=>{a.lstat(e,(a,l)=>{if(a)return a.message=a.message.replace("lstat","ensureLink"),r(a);if(u&&c(l,u))return r(null);const p=i.dirname(t);s(p,(i,a)=>i?r(i):a?n(e,t):void o.mkdirs(p,i=>{if(i)return r(i);n(e,t)}))})})})),createLinkSync:function(e,t){let r;try{r=a.lstatSync(t)}catch{}try{const t=a.lstatSync(e);if(r&&c(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return a.existsSync(n)||o.mkdirsSync(n),a.linkSync(e,t)}}},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(0),a=r(26),o=r(16),s=o.mkdirs,c=o.mkdirsSync,l=r(182),u=l.symlinkPaths,p=l.symlinkPathsSync,d=r(183),h=d.symlinkType,f=d.symlinkTypeSync,m=r(24).pathExists,{areIdentical:v}=r(27);function g(e,t,r,n){u(e,t,(o,c)=>{if(o)return n(o);e=c.toDst,h(c.toCwd,r,(r,o)=>{if(r)return n(r);const c=i.dirname(t);m(c,(r,i)=>r?n(r):i?a.symlink(e,t,o,n):void s(c,r=>{if(r)return n(r);a.symlink(e,t,o,n)}))})})}e.exports={createSymlink:n((function(e,t,r,n){n="function"==typeof r?r:n,r="function"!=typeof r&&r,a.lstat(t,(i,o)=>{!i&&o.isSymbolicLink()?Promise.all([a.stat(e),a.stat(t)]).then(([i,a])=>{if(v(i,a))return n(null);g(e,t,r,n)}):g(e,t,r,n)})})),createSymlinkSync:function(e,t,r){let n;try{n=a.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=a.statSync(e),n=a.statSync(t);if(v(r,n))return}const o=p(e,t);e=o.toDst,r=f(o.toCwd,r);const s=i.dirname(t);return a.existsSync(s)||c(s),a.symlinkSync(e,t,r)}}},function(e,t,r){"use strict";const n=r(0),i=r(7),a=r(24).pathExists;e.exports={symlinkPaths:function(e,t,r){if(n.isAbsolute(e))return i.lstat(e,t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),r(t)):r(null,{toCwd:e,toDst:e}));{const o=n.dirname(t),s=n.join(o,e);return a(s,(t,a)=>t?r(t):a?r(null,{toCwd:s,toDst:e}):i.lstat(e,t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),r(t)):r(null,{toCwd:e,toDst:n.relative(o,e)})))}},symlinkPathsSync:function(e,t){let r;if(n.isAbsolute(e)){if(r=i.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const a=n.dirname(t),o=n.join(a,e);if(r=i.existsSync(o),r)return{toCwd:o,toDst:e};if(r=i.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(a,e)}}}}},function(e,t,r){"use strict";const n=r(7);e.exports={symlinkType:function(e,t,r){if(r="function"==typeof t?t:r,t="function"!=typeof t&&t)return r(null,t);n.lstat(e,(e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file",r(null,t)})},symlinkTypeSync:function(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},function(e,t,r){"use strict";const n=r(8).fromPromise,i=r(185);i.outputJson=n(r(187)),i.outputJsonSync=r(188),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},function(e,t,r){"use strict";const n=r(186);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},function(e,t,r){let n;try{n=r(7)}catch(e){n=r(2)}const i=r(8),{stringify:a,stripBom:o}=r(59);const s={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,a=!("throws"in t)||t.throws;let s,c=await i.fromCallback(r.readFile)(e,t);c=o(c);try{s=JSON.parse(c,t?t.reviver:null)}catch(t){if(a)throw t.message=`${e}: ${t.message}`,t;return null}return s})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=o(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const o=r.fs||n,s=a(t,r);await i.fromCallback(o.writeFile)(e,s,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,o=a(t,r);return i.writeFileSync(e,o,r)}};e.exports=s},function(e,t,r){"use strict";const{stringify:n}=r(59),{outputFile:i}=r(60);e.exports=async function(e,t,r={}){const a=n(t,r);await i(e,a,r)}},function(e,t,r){"use strict";const{stringify:n}=r(59),{outputFileSync:i}=r(60);e.exports=function(e,t,r){const a=n(t,r);i(e,a,r)}},function(e,t,r){"use strict";e.exports={moveSync:r(190)}},function(e,t,r){"use strict";const n=r(7),i=r(0),a=r(92).copySync,o=r(41).removeSync,s=r(16).mkdirpSync,c=r(27);function l(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){return a(e,t,{overwrite:r,errorOnExist:true}),o(e)}(e,t,r)}}e.exports=function(e,t,r){const a=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:p=!1}=c.checkPathsSync(e,t,"move",r);return c.checkParentPathsSync(e,u,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||s(i.dirname(t)),function(e,t,r,i){if(i)return l(e,t,r);if(r)return o(t),l(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,a,p)}},function(e,t,r){"use strict";const n=r(8).fromCallback;e.exports={move:n(r(192))}},function(e,t,r){"use strict";const n=r(7),i=r(0),a=r(94).copy,o=r(41).remove,s=r(16).mkdirp,c=r(24).pathExists,l=r(27);function u(e,t,r,n,i){return n?p(e,t,r,i):r?o(t,n=>n?i(n):p(e,t,r,i)):void c(t,(n,a)=>n?i(n):a?i(new Error("dest already exists.")):p(e,t,r,i))}function p(e,t,r,i){n.rename(e,t,n=>n?"EXDEV"!==n.code?i(n):function(e,t,r,n){a(e,t,{overwrite:r,errorOnExist:!0},t=>t?n(t):o(e,n))}(e,t,r,i):i())}e.exports=function(e,t,r,n){"function"==typeof r&&(n=r,r={});const a=r.overwrite||r.clobber||!1;l.checkPaths(e,t,"move",r,(r,o)=>{if(r)return n(r);const{srcStat:c,isChangingCase:p=!1}=o;l.checkParentPaths(e,c,t,"move",r=>r?n(r):function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)?u(e,t,a,p,n):void s(i.dirname(t),r=>r?n(r):u(e,t,a,p,n)))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0;t.Lazy=class{constructor(e){this._value=null,this.creator=e}get hasValue(){return null==this.creator}get value(){if(null==this.creator)return this._value;const e=this.creator();return this.value=e,e}set value(e){this._value=e,this.creator=null}}},function(e,t,r){const n=r(29);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},function(e,t,r){const n=r(29);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},function(e,t,r){const n=r(5);e.exports=(e,t,r,i)=>{"string"==typeof r&&(i=r,r=void 0);try{return new n(e,r).inc(t,i).version}catch(e){return null}}},function(e,t,r){const n=r(29),i=r(63);e.exports=(e,t)=>{if(i(e,t))return null;{const r=n(e),i=n(t),a=r.prerelease.length||i.prerelease.length,o=a?"pre":"",s=a?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==i[e])return o+e;return s}}},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).major},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).minor},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).patch},function(e,t,r){const n=r(29);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(t,e,r)},function(e,t,r){const n=r(11);e.exports=(e,t)=>n(e,t,!0)},function(e,t,r){const n=r(64);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},function(e,t,r){const n=r(64);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},function(e,t,r){const n=r(5),i=r(29),{re:a,t:o}=r(28);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=a[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),a[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;a[o.COERCERTL].lastIndex=-1}else r=e.match(a[o.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,a=this.head;null!==a&&ithis.length&&(t=this.length);for(var i=this.length,a=this.tail;null!==a&&i>t;i--)a=a.prev;for(;null!==a&&i>e;i--,a=a.prev)r.push(a.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,a=this.head;null!==a&&nnew n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,r){const n=r(5),i=r(12);e.exports=(e,t,r)=>{let a=null,o=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(a&&-1!==o.compare(e)||(a=e,o=new n(a,r)))}),a}},function(e,t,r){const n=r(5),i=r(12);e.exports=(e,t,r)=>{let a=null,o=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(a&&1!==o.compare(e)||(a=e,o=new n(a,r)))}),a}},function(e,t,r){const n=r(5),i=r(12),a=r(45);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!a(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!o||r&&!a(r,o)||(r=o)}return r&&e.test(r)?r:null}},function(e,t,r){const n=r(12);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},function(e,t,r){const n=r(68);e.exports=(e,t,r)=>n(e,t,">",r)},function(e,t,r){const n=r(68);e.exports=(e,t,r)=>n(e,t,"<",r)},function(e,t,r){const n=r(12);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},function(e,t,r){const n=r(47),i=r(11);e.exports=(e,t,r)=>{const a=[];let o=null,s=null;const c=e.sort((e,t)=>i(e,t,r));for(const e of c){n(e,t,r)?(s=e,o||(o=e)):(s&&a.push([o,s]),s=null,o=null)}o&&a.push([o,null]);const l=[];for(const[e,t]of a)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push("<="+t):l.push(`${e} - ${t}`):l.push(">="+e):l.push("*");const u=l.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length{if(e===t)return!0;if(1===e.length&&e[0].semver===a){if(1===t.length&&t[0].semver===a)return!0;e=r.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===a){if(r.includePrerelease)return!0;t=[new i(">=0.0.0")]}const n=new Set;let c,p,d,h,f,m,v;for(const t of e)">"===t.operator||">="===t.operator?c=l(c,t,r):"<"===t.operator||"<="===t.operator?p=u(p,t,r):n.add(t.semver);if(n.size>1)return null;if(c&&p){if(d=s(c.semver,p.semver,r),d>0)return null;if(0===d&&(">="!==c.operator||"<="!==p.operator))return null}for(const e of n){if(c&&!o(e,String(c),r))return null;if(p&&!o(e,String(p),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let g=!(!p||r.includePrerelease||!p.semver.prerelease.length)&&p.semver,b=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver;g&&1===g.prerelease.length&&"<"===p.operator&&0===g.prerelease[0]&&(g=!1);for(const e of t){if(v=v||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,c)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=l(c,e,r),h===e&&h!==c)return!1}else if(">="===c.operator&&!o(c.semver,String(e),r))return!1;if(p)if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),"<"===e.operator||"<="===e.operator){if(f=u(p,e,r),f===e&&f!==p)return!1}else if("<="===p.operator&&!o(p.semver,String(e),r))return!1;if(!e.operator&&(p||c)&&0!==d)return!1}return!(c&&m&&!p&&0!==d)&&(!(p&&v&&!c&&0!==d)&&(!b&&!g))},l=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=c(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTempUpdateFile=t.DownloadedUpdateHelper=void 0;const n=r(38),i=r(2),a=r(220),o=r(22),s=r(0);t.DownloadedUpdateHelper=class{constructor(e){this.cacheDir=e,this._file=null,this._packageFile=null,this.versionInfo=null,this.fileInfo=null,this._downloadedFileInfo=null}get downloadedFileInfo(){return this._downloadedFileInfo}get file(){return this._file}get packageFile(){return this._packageFile}get cacheDirForPendingUpdate(){return s.join(this.cacheDir,"pending")}async validateDownloadedPath(e,t,r,n){if(null!=this.versionInfo&&this.file===e&&null!=this.fileInfo)return a(this.versionInfo,t)&&a(this.fileInfo.info,r.info)&&await o.pathExists(e)?e:null;const i=await this.getValidCachedUpdateFile(r,n);return null===i?null:(n.info(`Update has already been downloaded to ${e}).`),this._file=i,i)}async setDownloadedFile(e,t,r,n,i,a){this._file=e,this._packageFile=t,this.versionInfo=r,this.fileInfo=n,this._downloadedFileInfo={fileName:i,sha512:n.info.sha512,isAdminRightsRequired:!0===n.info.isAdminRightsRequired},a&&await o.outputJson(this.getUpdateInfoFile(),this._downloadedFileInfo)}async clear(){this._file=null,this._packageFile=null,this.versionInfo=null,this.fileInfo=null,await this.cleanCacheDirForPendingUpdate()}async cleanCacheDirForPendingUpdate(){try{await o.emptyDir(this.cacheDirForPendingUpdate)}catch(e){}}async getValidCachedUpdateFile(e,t){var r;const a=this.getUpdateInfoFile();if(!await o.pathExists(a))return null;let c;try{c=await o.readJson(a)}catch(e){let r="No cached update info available";return"ENOENT"!==e.code&&(await this.cleanCacheDirForPendingUpdate(),r+=` (error on read: ${e.message})`),t.info(r),null}if(!(null!==(r=null!==(null==c?void 0:c.fileName))&&void 0!==r&&r))return t.warn("Cached update info is corrupted: no fileName, directory for cached update will be cleaned"),await this.cleanCacheDirForPendingUpdate(),null;if(e.info.sha512!==c.sha512)return t.info(`Cached update sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${c.sha512}, expected: ${e.info.sha512}. Directory for cached update will be cleaned`),await this.cleanCacheDirForPendingUpdate(),null;const l=s.join(this.cacheDirForPendingUpdate,c.fileName);if(!await o.pathExists(l))return t.info("Cached update file doesn't exist"),null;const u=await function(e,t="sha512",r="base64",a){return new Promise((o,s)=>{const c=n.createHash(t);c.on("error",s).setEncoding(r),i.createReadStream(e,{...a,highWaterMark:1048576}).on("error",s).on("end",()=>{c.end(),o(c.read())}).pipe(c,{end:!1})})}(l);return e.info.sha512!==u?(t.warn(`Sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${u}, expected: ${e.info.sha512}`),await this.cleanCacheDirForPendingUpdate(),null):(this._downloadedFileInfo=c,l)}getUpdateInfoFile(){return s.join(this.cacheDirForPendingUpdate,"update-info.json")}},t.createTempUpdateFile=async function(e,t,r){let n=0,i=s.join(t,e);for(let a=0;a<3;a++)try{return await o.unlink(i),i}catch(a){if("ENOENT"===a.code)return i;r.warn("Error on remove temp update file: "+a),i=s.join(t,`${n++}-${e}`)}return i}},function(e,t,r){(function(e){var r="[object Arguments]",n="[object Map]",i="[object Object]",a="[object Set]",o=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[r]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[n]=c["[object Number]"]=c[i]=c["[object RegExp]"]=c[a]=c["[object String]"]=c["[object WeakMap]"]=!1;var l="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),d=t&&!t.nodeType&&t,h=d&&"object"==typeof e&&e&&!e.nodeType&&e,f=h&&h.exports===d,m=f&&l.process,v=function(){try{return m&&m.binding&&m.binding("util")}catch(e){}}(),g=v&&v.isTypedArray;function b(e,t){for(var r=-1,n=null==e?0:e.length;++rs))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var u=-1,p=!0,d=2&r?new ie:void 0;for(a.set(e,t),a.set(t,e);++u-1},re.prototype.set=function(e,t){var r=this.__data__,n=se(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(q||re),string:new te}},ne.prototype.delete=function(e){var t=me(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return me(this,e).get(e)},ne.prototype.has=function(e){return me(this,e).has(e)},ne.prototype.set=function(e,t){var r=me(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new re,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof re){var n=r.__data__;if(!q||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ne(n)}return r.set(e,t),this.size=r.size,this};var ge=U?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function Ce(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var Oe=g?function(e){return function(t){return e(t)}}(g):function(e){return Ae(e)&&ke(e.length)&&!!c[ce(e)]};function Ie(e){return null!=(t=e)&&ke(t.length)&&!Se(t)?oe(e):de(e);var t}e.exports=function(e,t){return ue(e,t)}}).call(this,r(69)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronAppAdapter=void 0;const n=r(0),i=r(222);t.ElectronAppAdapter=class{constructor(e=r(1).app){this.app=e}whenReady(){return this.app.whenReady()}get version(){return this.app.getVersion()}get name(){return this.app.getName()}get isPackaged(){return!0===this.app.isPackaged}get appUpdateConfigPath(){return this.isPackaged?n.join(process.resourcesPath,"app-update.yml"):n.join(this.app.getAppPath(),"dev-app-update.yml")}get userDataPath(){return this.app.getPath("userData")}get baseCachePath(){return i.getAppCacheDir()}quit(){this.app.quit()}onQuit(e){this.app.once("quit",(t,r)=>e(r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAppCacheDir=void 0;const n=r(0),i=r(37);t.getAppCacheDir=function(){const e=i.homedir();let t;return t="win32"===process.platform?process.env.LOCALAPPDATA||n.join(e,"AppData","Local"):"darwin"===process.platform?n.join(e,"Library","Application Support","Caches"):process.env.XDG_CACHE_HOME||n.join(e,".cache"),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronHttpExecutor=t.getNetSession=t.NET_SESSION_NAME=void 0;const n=r(4);function i(){return r(1).session.fromPartition(t.NET_SESSION_NAME,{cache:!1})}t.NET_SESSION_NAME="electron-updater",t.getNetSession=i;class a extends n.HttpExecutor{constructor(e){super(),this.proxyLoginCallback=e,this.cachedSession=null}async download(e,t,r){return await r.cancellationToken.createPromise((i,a,o)=>{const s={headers:r.headers||void 0,redirect:"manual"};n.configureRequestUrl(e,s),n.configureRequestOptions(s),this.doDownload(s,{destination:t,options:r,onCancel:o,callback:e=>{null==e?i(t):a(e)},responseHandler:null},0)})}createRequest(e,t){e.headers&&e.headers.Host&&(e.host=e.headers.Host,delete e.headers.Host),null==this.cachedSession&&(this.cachedSession=i());const n=r(1).net.request({...e,session:this.cachedSession});return n.on("response",t),null!=this.proxyLoginCallback&&n.on("login",this.proxyLoginCallback),n}addRedirectHandlers(e,t,r,i,a){e.on("redirect",(o,s,c)=>{e.abort(),i>this.maxRedirects?r(this.createMaxRedirectError()):a(n.HttpExecutor.prepareRedirectUrlOptions(c,t))})}}t.ElectronHttpExecutor=a},function(e,t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),i="object"==typeof global&&global&&global.Object===Object&&global,a="object"==typeof self&&self&&self.Object===Object&&self,o=i||a||Function("return this")(),s=Object.prototype.toString,c=o.Symbol,l=c?c.prototype:void 0,u=l?l.toString:void 0;function p(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":p(t))&&n.test(e)?e.replace(r,"\\$&"):e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=t.isUrlProbablySupportMultiRangeRequests=void 0;const n=r(4),i=r(226),a=r(99),o=r(100),s=r(228);function c(e){return!e.includes("s3.amazonaws.com")}t.isUrlProbablySupportMultiRangeRequests=c,t.createClient=function(e,t,r){if("string"==typeof e)throw n.newError("Please pass PublishConfiguration object","ERR_UPDATER_INVALID_PROVIDER_CONFIGURATION");const l=e.provider;switch(l){case"github":{const n=e,i=(n.private?process.env.GH_TOKEN||process.env.GITHUB_TOKEN:null)||n.token;return null==i?new o.GitHubProvider(n,t,r):new s.PrivateGitHubProvider(n,t,i,r)}case"s3":case"spaces":return new a.GenericProvider({provider:"generic",url:n.getS3LikeProviderBaseUrl(e),channel:e.channel||null},t,{...r,isUseMultipleRangeRequest:!1});case"generic":{const n=e;return new a.GenericProvider(n,t,{...r,isUseMultipleRangeRequest:!1!==n.useMultipleRangeRequest&&c(n.url)})}case"bintray":return new i.BintrayProvider(e,r);default:throw n.newError("Unsupported provider: "+l,"ERR_UPDATER_UNSUPPORTED_PROVIDER")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BintrayProvider=void 0;const n=r(4),i=r(227),a=r(17),o=r(30),s=r(19);class c extends s.Provider{constructor(e,t){super(t),this.client=new i.BintrayClient(e,t.executor,new n.CancellationToken),this.baseUrl=o.newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`)}setRequestHeaders(e){super.setRequestHeaders(e),this.client.setRequestHeaders(e)}async getLatestVersion(){try{const e=await this.client.getVersion("_latest"),t=o.getChannelFilename(this.getDefaultChannelName()),r=await this.client.getVersionFiles(e.name),i=r.find(e=>e.name.endsWith("_"+t)||e.name.endsWith("-"+t));if(null==i)throw n.newError(`Cannot find channel file "${t}", existing files:\n${r.map(e=>JSON.stringify(e,null,2)).join(",\n")}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");const c=new a.URL(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}/${i.name}`);return s.parseUpdateInfo(await this.httpRequest(c),t,c)}catch(e){if("statusCode"in e&&404===e.statusCode)throw n.newError("No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. "+(e.stack||e.message),"ERR_UPDATER_LATEST_VERSION_NOT_FOUND");throw e}}resolveFiles(e){return s.resolveFiles(e,this.baseUrl)}}t.BintrayProvider=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BintrayClient=void 0;const n=r(89);t.BintrayClient=class{constructor(e,t,r,n){if(this.httpExecutor=t,this.cancellationToken=r,this.requestHeaders=null,null==e.owner)throw new Error("owner is not specified");if(null==e.package)throw new Error("package is not specified");this.repo=e.repo||"generic",this.packageName=e.package,this.owner=e.owner,this.user=e.user||e.owner,this.component=e.component||null,this.distribution=e.distribution||"stable",this.auth=null==n?null:"Basic "+Buffer.from(`${this.user}:${n}`).toString("base64"),this.basePath=`/packages/${this.owner}/${this.repo}/${this.packageName}`}setRequestHeaders(e){this.requestHeaders=e}bintrayRequest(e,t,r=null,i,a){return n.parseJson(this.httpExecutor.request(n.configureRequestOptions({hostname:"api.bintray.com",path:e,headers:this.requestHeaders||void 0},t,a),i,r))}getVersion(e){return this.bintrayRequest(`${this.basePath}/versions/${e}`,this.auth,null,this.cancellationToken)}getVersionFiles(e){return this.bintrayRequest(`${this.basePath}/versions/${e}/files`,this.auth,null,this.cancellationToken)}createVersion(e){return this.bintrayRequest(this.basePath+"/versions",this.auth,{name:e},this.cancellationToken)}deleteVersion(e){return this.bintrayRequest(`${this.basePath}/versions/${e}`,this.auth,null,this.cancellationToken,"DELETE")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivateGitHubProvider=void 0;const n=r(4),i=r(61),a=r(0),o=r(17),s=r(30),c=r(100),l=r(19);class u extends c.BaseGitHubProvider{constructor(e,t,r,n){super(e,"api.github.com",n),this.updater=t,this.token=r}createRequestOptions(e,t){const r=super.createRequestOptions(e,t);return r.redirect="manual",r}async getLatestVersion(){const e=new n.CancellationToken,t=s.getChannelFilename(this.getDefaultChannelName()),r=await this.getLatestVersionInfo(e),a=r.assets.find(e=>e.name===t);if(null==a)throw n.newError(`Cannot find ${t} in the release ${r.html_url||r.name}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");const c=new o.URL(a.url);let l;try{l=i.load(await this.httpRequest(c,this.configureHeaders("application/octet-stream"),e))}catch(e){if(e instanceof n.HttpError&&404===e.statusCode)throw n.newError(`Cannot find ${t} in the latest release artifacts (${c}): ${e.stack||e.message}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");throw e}return l.assets=r.assets,l}get fileExtraDownloadHeaders(){return this.configureHeaders("application/octet-stream")}configureHeaders(e){return{accept:e,authorization:"token "+this.token}}async getLatestVersionInfo(e){const t=this.updater.allowPrerelease;let r=this.basePath;t||(r+="/latest");const i=s.newUrlFromBase(r,this.baseUrl);try{const r=JSON.parse(await this.httpRequest(i,this.configureHeaders("application/vnd.github.v3+json"),e));return t?r.find(e=>e.prerelease)||r[0]:r}catch(e){throw n.newError(`Unable to find latest version on GitHub (${i}), please ensure a production release exists: ${e.stack||e.message}`,"ERR_UPDATER_LATEST_VERSION_NOT_FOUND")}}get basePath(){return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`)}resolveFiles(e){return l.getFileList(e).map(t=>{const r=a.posix.basename(t.url).replace(/ /g,"-"),i=e.assets.find(e=>null!=e&&e.name===r);if(null==i)throw n.newError(`Cannot find asset "${r}" in: ${JSON.stringify(e.assets,null,2)}`,"ERR_UPDATER_ASSET_NOT_FOUND");return{url:new o.URL(i.url),info:t}})}}t.PrivateGitHubProvider=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsRangesSupported=t.executeTasksUsingMultipleRangeRequests=void 0;const n=r(4),i=r(105),a=r(71);function o(e,t){if(e.statusCode>=400)return t(n.createHttpError(e)),!1;if(206!==e.statusCode){const r=n.safeGetHeader(e,"accept-ranges");if(null==r||"none"===r)return t(new Error(`Server doesn't support Accept-Ranges (response code ${e.statusCode})`)),!1}return!0}t.executeTasksUsingMultipleRangeRequests=function(e,t,r,s,c){const l=u=>{if(u>=t.length)return null!=e.fileMetadataBuffer&&r.write(e.fileMetadataBuffer),void r.end();const p=u+1e3;!function(e,t,r,s,c){let l="bytes=",u=0;const p=new Map,d=[];for(let e=t.start;e{if(l>=t.end)return void s();const u=t.tasks[l++];if(u.kind===a.OperationKind.COPY)i.copyData(u,r,t.oldFileFd,c,()=>n(l));else{const t=e.createRequestOptions();t.headers.Range=`bytes=${u.start}-${u.end-1}`;const i=e.httpExecutor.createRequest(t,e=>{o(e,c)&&(e.pipe(r,{end:!1}),e.once("end",()=>n(l)))});e.httpExecutor.addErrorAndTimeoutHandlers(i,c),i.end()}};return void n(t.start)}const h=e.createRequestOptions();h.headers.Range=l.substring(0,l.length-2);const f=e.httpExecutor.createRequest(h,e=>{if(!o(e,c))return;const a=n.safeGetHeader(e,"content-type"),l=/^multipart\/.+?(?:; boundary=(?:(?:"(.+)")|(?:([^\s]+))))$/i.exec(a);if(null==l)return void c(new Error(`Content-Type "multipart/byteranges" is expected, but got "${a}"`));const u=new i.DataSplitter(r,t,p,l[1]||l[2],d,s);u.on("error",c),e.pipe(u),e.on("end",()=>{setTimeout(()=>{f.abort(),c(new Error("Response ends without calling any handlers"))},1e4)})});e.httpExecutor.addErrorAndTimeoutHandlers(f,c),f.end()}(e,{tasks:t,start:u,end:Math.min(t.length,p),oldFileFd:s},r,()=>l(p),c)};return l},t.checkIsRangesSupported=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressDifferentialDownloadCallbackTransform=void 0;const n=r(18);var i;!function(e){e[e.COPY=0]="COPY",e[e.DOWNLOAD=1]="DOWNLOAD"}(i||(i={}));class a extends n.Transform{constructor(e,t,r){super(),this.progressDifferentialDownloadInfo=e,this.cancellationToken=t,this.onProgress=r,this.start=Date.now(),this.transferred=0,this.delta=0,this.expectedBytes=0,this.index=0,this.operationType=i.COPY,this.nextUpdate=this.start+1e3}_transform(e,t,r){if(this.cancellationToken.cancelled)return void r(new Error("cancelled"),null);if(this.operationType==i.COPY)return void r(null,e);this.transferred+=e.length,this.delta+=e.length;const n=Date.now();n>=this.nextUpdate&&this.transferred!==this.expectedBytes&&this.transferred!==this.progressDifferentialDownloadInfo.grandTotal&&(this.nextUpdate=n+1e3,this.onProgress({total:this.progressDifferentialDownloadInfo.grandTotal,delta:this.delta,transferred:this.transferred,percent:this.transferred/this.progressDifferentialDownloadInfo.grandTotal*100,bytesPerSecond:Math.round(this.transferred/((n-this.start)/1e3))}),this.delta=0),r(null,e)}beginFileCopy(){this.operationType=i.COPY}beginRangeDownload(){this.operationType=i.DOWNLOAD,this.expectedBytes+=this.progressDifferentialDownloadInfo.expectedByteCounts[this.index++]}endRangeDownload(){this.transferred!==this.progressDifferentialDownloadInfo.grandTotal&&this.onProgress({total:this.progressDifferentialDownloadInfo.grandTotal,delta:this.delta,transferred:this.transferred,percent:this.transferred/this.progressDifferentialDownloadInfo.grandTotal*100,bytesPerSecond:Math.round(this.transferred/((Date.now()-this.start)/1e3))})}_flush(e){this.cancellationToken.cancelled?e(new Error("cancelled")):(this.onProgress({total:this.progressDifferentialDownloadInfo.grandTotal,delta:this.delta,transferred:this.transferred,percent:100,bytesPerSecond:Math.round(this.transferred/((Date.now()-this.start)/1e3))}),this.delta=0,this.transferred=0,e(null))}}t.ProgressDifferentialDownloadCallbackTransform=a},function(e,t){e.exports=require("http")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericDifferentialDownloader=void 0;const n=r(104);class i extends n.DifferentialDownloader{download(e,t){return this.doDownload(e,t)}}t.GenericDifferentialDownloader=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifySignature=void 0;const n=r(4),i=r(70),a=r(37);t.verifySignature=function(e,t,r){return new Promise(o=>{const s=t.replace(/'/g,"''").replace(/`/g,"``");i.execFile("powershell.exe",["-NoProfile","-NonInteractive","-InputFormat","None","-Command",`Get-AuthenticodeSignature '${s}' | ConvertTo-Json -Compress | ForEach-Object { [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($_)) }`],{timeout:2e4},(t,s,c)=>{try{if(null!=t||c)return function(e,t,r){if(function(){const e=a.release();return e.startsWith("6.")&&!e.startsWith("6.3")}())return void e.warn(`Cannot execute Get-AuthenticodeSignature: ${t||r}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`);try{i.execFileSync("powershell.exe",["-NoProfile","-NonInteractive","-Command","ConvertTo-Json test"],{timeout:1e4})}catch(t){return void e.warn(`Cannot execute ConvertTo-Json: ${t.message}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`)}if(null!=t)throw t;if(r)e.warn(`Cannot execute Get-AuthenticodeSignature, stderr: ${r}. Ignoring signature validation due to unknown stderr.`)}(r,t,c),void o(null);const l=function(e){const t=JSON.parse(e);delete t.PrivateKey,delete t.IsOSBinary,delete t.SignatureType;const r=t.SignerCertificate;null!=r&&(delete r.Archived,delete r.Extensions,delete r.Handle,delete r.HasPrivateKey,delete r.SubjectName);return delete t.Path,t}(Buffer.from(s,"base64").toString("utf-8"));if(0===l.Status){const t=n.parseDn(l.SignerCertificate.Subject).get("CN");if(e.includes(t))return void o(null)}const u=`publisherNames: ${e.join(" | ")}, raw info: `+JSON.stringify(l,(e,t)=>"RawData"===e?void 0:t,2);r.warn("Sign verification failed, installer signed with incorrect certificate: "+u),o(u)}catch(e){return r.warn(`Cannot execute Get-AuthenticodeSignature: ${t}. Ignoring signature validation due to unknown error.`),void o(null)}})})}},function(e,t,r){"use strict";const n=r(235),i=r(241);function a(e,t,r){if(" "===e.charAt(t))return t;for(let n=1;n<=3;n++)if(r){if(" "===e.charAt(t+n))return t+n}else if(" "===e.charAt(t-n))return t-n;return t}e.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};const{position:o,space:s,preferTruncationOnSpace:c}=r;let l="…",u=1;if("string"!=typeof e)throw new TypeError("Expected `input` to be a string, got "+typeof e);if("number"!=typeof t)throw new TypeError("Expected `columns` to be a number, got "+typeof t);if(t<1)return"";if(1===t)return l;const p=i(e);if(p<=t)return e;if("start"===o){if(c){const r=a(e,p-t+1,!0);return l+n(e,r,p).trim()}return!0===s&&(l+=" ",u=2),l+n(e,p-t+u,p)}if("middle"===o){!0===s&&(l=" "+l+" ",u=3);const r=Math.floor(t/2);if(c){const i=a(e,r),o=a(e,p-(t-r)+1,!0);return n(e,0,i)+l+n(e,o,p).trim()}return n(e,0,r)+l+n(e,p-(t-r)+u,p)}if("end"===o){if(c){const r=a(e,t-1);return n(e,0,r)+l}return!0===s&&(l=" "+l,u=2),n(e,0,t-u)+l}throw new Error("Expected `options.position` to be either `start`, `middle` or `end`, got "+o)}},function(e,t,r){"use strict";const n=r(109),i=r(236),a=r(237),o=["","›"],s=e=>`${o[0]}[${e}m`,c=(e,t,r)=>{let n=[];e=[...e];for(let r of e){const i=r;r.match(";")&&(r=r.split(";")[0][0]+"0");const o=a.codes.get(parseInt(r,10));if(o){const r=e.indexOf(o.toString());r>=0?e.splice(r,1):n.push(s(t?o:i))}else{if(t){n.push(s(0));break}n.push(s(i))}}if(t&&(n=n.filter((e,t)=>n.indexOf(e)===t),void 0!==r)){const e=s(a.codes.get(parseInt(r,10)));n=n.reduce((t,r)=>r===e?[r,...t]:[...t,r],[])}return n.join("")};e.exports=(e,t,r)=>{const a=[...e.normalize()],s=[];r="number"==typeof r?r:a.length;let l,u=!1,p=0,d="";for(const[h,f]of a.entries()){let a=!1;if(o.includes(f)){const t=/\d[^m]*/.exec(e.slice(h,h+18));l=t&&t.length>0?t[0]:void 0,pt&&p<=r)d+=f;else if(p!==t||u||void 0===l){if(p>=r){d+=c(s,!0,l);break}}else d=c(s)}return d}},function(e,t,r){"use strict";e.exports=e=>e&&e.exact?new RegExp("^[\ud800-\udbff][\udc00-\udfff]$"):new RegExp("[\ud800-\udbff][\udc00-\udfff]","g")},function(e,t,r){"use strict";(function(e){const t=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},a=e=>e,o=(e,t,r)=>[e,t,r],s=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let c;const l=(e,t,n,i)=>{void 0===c&&(c=r(238));const a=i?10:0,o={};for(const[r,i]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?o[s]=e(n,a):"object"==typeof i&&(o[s]=e(i[t],a))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};r.color.gray=r.color.blackBright,r.bgColor.bgGray=r.bgColor.bgBlackBright,r.color.grey=r.color.blackBright,r.bgColor.bgGrey=r.bgColor.bgBlackBright;for(const[t,n]of Object.entries(r)){for(const[t,i]of Object.entries(n))r[t]={open:`[${i[0]}m`,close:`[${i[1]}m`},n[t]=r[t],e.set(i[0],i[1]);Object.defineProperty(r,t,{value:n,enumerable:!1})}return Object.defineProperty(r,"codes",{value:e,enumerable:!1}),r.color.close="",r.bgColor.close="",s(r.color,"ansi",()=>l(t,"ansi16",a,!1)),s(r.color,"ansi256",()=>l(n,"ansi256",a,!1)),s(r.color,"ansi16m",()=>l(i,"rgb",o,!1)),s(r.bgColor,"ansi",()=>l(t,"ansi16",a,!0)),s(r.bgColor,"ansi256",()=>l(n,"ansi256",a,!0)),s(r.bgColor,"ansi16m",()=>l(i,"rgb",o,!0)),r}})}).call(this,r(69)(e))},function(e,t,r){const n=r(110),i=r(240),a={};Object.keys(n).forEach(e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:n[e].channels}),Object.defineProperty(a[e],"labels",{value:n[e].labels});const t=i(e);Object.keys(t).forEach(r=>{const n=t[r];a[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})}),e.exports=a},function(e,t,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,r){const n=r(110);function i(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n{if("string"!=typeof e||0===e.length)return 0;if(0===(e=n(e)).length)return 0;e=e.replace(a()," ");let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=i(n)?2:1))}return t};e.exports=o,e.exports.default=o},function(e,t,r){"use strict";const n=r(243);e.exports=e=>"string"==typeof e?e.replace(n(),""):e},function(e,t,r){"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},function(e,t,r){"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},function(e,t,r){"use strict";const n=r(0),{app:i,BrowserWindow:a,shell:o,dialog:s}=r(1),c=r(246),l=r(249),u=r(251),p=e=>{let t;switch(e.getType()){case"webview":t=a.fromWebContents(e.hostWebContents);break;case"browserView":t=(e=>{for(const t of a.getAllWindows())for(const r of t.getBrowserViews())if(r.webContents.id===e.id)return t})(e);break;default:t=a.fromWebContents(e)}return t};function d(e,t,r=(()=>{})){const s=new Set;let d=0,h=0,f=0;const m=()=>s.size,v=()=>d/f;t={showBadge:!0,...t};const g=(b,y,x)=>{s.add(y),f+=y.getTotalBytes();const w=(()=>{const e=process.versions.electron.split(".");return Number.parseInt(e[0],10)})()>=12?a.fromWebContents(x):p(x);if(t.directory&&!n.isAbsolute(t.directory))throw new Error("The `directory` option must be an absolute path");const E=t.directory||i.getPath("downloads");let D;if(t.filename)D=n.join(E,t.filename);else{const e=y.getFilename(),r=n.extname(e)?e:((e,t)=>{const r=u.mime(t);return 1!==r.length?e:`${e}.${r[0].ext}`})(e,y.getMimeType());D=t.overwrite?n.join(E,r):c.sync(n.join(E,r))}const _=t.errorMessage||"The download of {filename} was interrupted";t.saveAs?y.setSaveDialogOptions({defaultPath:D}):y.setSavePath(D),"function"==typeof t.onStarted&&t.onStarted(y),y.on("updated",()=>{d=h;for(const e of s)d+=e.getReceivedBytes();if(t.showBadge&&["darwin","linux"].includes(process.platform)&&(i.badgeCount=m()),w.isDestroyed()||w.setProgressBar(v()),"function"==typeof t.onProgress){const e=y.getReceivedBytes(),r=y.getTotalBytes();t.onProgress({percent:r?e/r:0,transferredBytes:e,totalBytes:r})}"function"==typeof t.onTotalProgress&&t.onTotalProgress({percent:v(),transferredBytes:d,totalBytes:f})}),y.on("done",(a,c)=>{if(h+=y.getTotalBytes(),s.delete(y),t.showBadge&&["darwin","linux"].includes(process.platform)&&(i.badgeCount=m()),w.isDestroyed()||m()||(w.setProgressBar(-1),d=0,h=0,f=0),t.unregisterWhenDone&&e.removeListener("will-download",g),"cancelled"===c)"function"==typeof t.onCancel&&t.onCancel(y);else if("interrupted"===c){const e=l(_,{filename:n.basename(D)});r(new Error(e))}else"completed"===c&&("darwin"===process.platform&&i.dock.downloadFinished(D),t.openFolderWhenDone&&o.showItemInFolder(D),"function"==typeof t.onCompleted&&t.onCompleted({fileName:y.getFilename(),path:y.getSavePath(),fileSize:y.getReceivedBytes(),mimeType:y.getMimeType(),url:y.getURL()}),r(null,y))})};e.on("will-download",g)}e.exports=(e={})=>{i.on("session-created",t=>{d(t,e,(t,r)=>{if(t){const r=e.errorTitle||"Download Error";s.showErrorBox(r,t.message)}})})},e.exports.download=(e,t,r)=>new Promise((n,i)=>{r={...r,unregisterWhenDone:!0},d(e.webContents.session,r,(e,t)=>{e?i(e):n(t)}),e.webContents.downloadURL(t)})},function(e,t,r){"use strict";const n=r(247),i=r(248),a=e=>{let t=0;return()=>i(e,(e,r)=>`${e} (${++t})${r}`)},o=e=>{const t=a(e),r=async e=>await n(e)?r(t()):e;return r(e)};e.exports=o,e.exports.default=o,e.exports.sync=e=>{const t=a(e),r=e=>n.sync(e)?r(t()):e;return r(e)}},function(e,t,r){"use strict";const n=r(2),{promisify:i}=r(9),a=i(n.access);e.exports=async e=>{try{return await a(e),!0}catch(e){return!1}},e.exports.sync=e=>{try{return n.accessSync(e),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(0);e.exports=function e(t,r){if(2!==arguments.length)throw new Error("`path` and `modifier` required");if(Array.isArray(t))return t.map((function(t){return e(t,r)}));var i=n.extname(t);return n.join(n.dirname(t),r(n.basename(t,i),i))}},function(e,t,r){"use strict";const{htmlEscape:n}=r(250);e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);if("object"!=typeof t)throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof t}\``);const r=/{{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}}/gi;r.test(e)&&(e=e.replace(r,(e,r)=>{let i=t;for(const e of r.split("."))i=i?i[e]:"";return n(String(i))}));return e.replace(/{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}/gi,(e,r)=>{let n=t;for(const e of r.split("."))n=n?n[e]:"";return String(n)})}},function(e,t,r){"use strict";t.htmlEscape=e=>e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),t.htmlUnescape=e=>e.replace(/>/g,">").replace(/</g,"<").replace(/�?39;/g,"'").replace(/"/g,'"').replace(/&/g,"&"),t.htmlEscapeTag=(e,...r)=>{let n=e[0];for(let i=0;i{let n=e[0];for(let i=0;i{const t=i.desc(n()),r=Object.keys(t).filter(t=>e.endsWith(t));return 0===r.length?[]:r.map(e=>({ext:e,mime:t[e]}))},e.exports.mime=e=>{const t=i.desc(n()),r=Object.keys(t).filter(r=>t[r]===e);return 0===r.length?[]:r.map(e=>({ext:e,mime:t[e]}))}},function(e,t,r){"use strict";var n=r(253);e.exports=function(){var e={};return Object.keys(n).forEach((function(t){var r=n[t];r.extensions&&r.extensions.length>0&&r.extensions.forEach((function(r){e[r]=t}))})),e}},function(e,t,r){ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed */ - -function symlinkPaths (srcpath, dstpath, callback) { - if (path.isAbsolute(srcpath)) { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - toCwd: srcpath, - toDst: srcpath - }) - }) - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - return pathExists(relativeToDst, (err, exists) => { - if (err) return callback(err) - if (exists) { - return callback(null, { - toCwd: relativeToDst, - toDst: srcpath - }) - } else { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - toCwd: srcpath, - toDst: path.relative(dstdir, srcpath) - }) - }) - } - }) - } -} - -function symlinkPathsSync (srcpath, dstpath) { - let exists - if (path.isAbsolute(srcpath)) { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('absolute srcpath does not exist') - return { - toCwd: srcpath, - toDst: srcpath - } - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - exists = fs.existsSync(relativeToDst) - if (exists) { - return { - toCwd: relativeToDst, - toDst: srcpath - } - } else { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('relative srcpath does not exist') - return { - toCwd: srcpath, - toDst: path.relative(dstdir, srcpath) - } - } - } -} - -module.exports = { - symlinkPaths, - symlinkPathsSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/symlink-type.js": -/*!**********************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/symlink-type.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") - -function symlinkType (srcpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - if (type) return callback(null, type) - fs.lstat(srcpath, (err, stats) => { - if (err) return callback(null, 'file') - type = (stats && stats.isDirectory()) ? 'dir' : 'file' - callback(null, type) - }) -} - -function symlinkTypeSync (srcpath, type) { - let stats - - if (type) return type - try { - stats = fs.lstatSync(srcpath) - } catch { - return 'file' - } - return (stats && stats.isDirectory()) ? 'dir' : 'file' -} - -module.exports = { - symlinkType, - symlinkTypeSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/ensure/symlink.js": -/*!*****************************************************!*\ - !*** ./node_modules/fs-extra/lib/ensure/symlink.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const path = __webpack_require__(/*! path */ "path") -const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") -const _mkdirs = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") -const mkdirs = _mkdirs.mkdirs -const mkdirsSync = _mkdirs.mkdirsSync - -const _symlinkPaths = __webpack_require__(/*! ./symlink-paths */ "./node_modules/fs-extra/lib/ensure/symlink-paths.js") -const symlinkPaths = _symlinkPaths.symlinkPaths -const symlinkPathsSync = _symlinkPaths.symlinkPathsSync - -const _symlinkType = __webpack_require__(/*! ./symlink-type */ "./node_modules/fs-extra/lib/ensure/symlink-type.js") -const symlinkType = _symlinkType.symlinkType -const symlinkTypeSync = _symlinkType.symlinkTypeSync - -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists - -const { areIdentical } = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function createSymlink (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - fs.lstat(dstpath, (err, stats) => { - if (!err && stats.isSymbolicLink()) { - Promise.all([ - fs.stat(srcpath), - fs.stat(dstpath) - ]).then(([srcStat, dstStat]) => { - if (areIdentical(srcStat, dstStat)) return callback(null) - _createSymlink(srcpath, dstpath, type, callback) - }) - } else _createSymlink(srcpath, dstpath, type, callback) - }) -} - -function _createSymlink (srcpath, dstpath, type, callback) { - symlinkPaths(srcpath, dstpath, (err, relative) => { - if (err) return callback(err) - srcpath = relative.toDst - symlinkType(relative.toCwd, type, (err, type) => { - if (err) return callback(err) - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) - mkdirs(dir, err => { - if (err) return callback(err) - fs.symlink(srcpath, dstpath, type, callback) - }) - }) - }) - }) -} - -function createSymlinkSync (srcpath, dstpath, type) { - let stats - try { - stats = fs.lstatSync(dstpath) - } catch {} - if (stats && stats.isSymbolicLink()) { - const srcStat = fs.statSync(srcpath) - const dstStat = fs.statSync(dstpath) - if (areIdentical(srcStat, dstStat)) return - } - - const relative = symlinkPathsSync(srcpath, dstpath) - srcpath = relative.toDst - type = symlinkTypeSync(relative.toCwd, type) - const dir = path.dirname(dstpath) - const exists = fs.existsSync(dir) - if (exists) return fs.symlinkSync(srcpath, dstpath, type) - mkdirsSync(dir) - return fs.symlinkSync(srcpath, dstpath, type) -} - -module.exports = { - createSymlink: u(createSymlink), - createSymlinkSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/fs/index.js": -/*!***********************************************!*\ - !*** ./node_modules/fs-extra/lib/fs/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// This is adapted from https://github.com/normalize/mz -// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") - -const api = [ - 'access', - 'appendFile', - 'chmod', - 'chown', - 'close', - 'copyFile', - 'fchmod', - 'fchown', - 'fdatasync', - 'fstat', - 'fsync', - 'ftruncate', - 'futimes', - 'lchmod', - 'lchown', - 'link', - 'lstat', - 'mkdir', - 'mkdtemp', - 'open', - 'opendir', - 'readdir', - 'readFile', - 'readlink', - 'realpath', - 'rename', - 'rm', - 'rmdir', - 'stat', - 'symlink', - 'truncate', - 'unlink', - 'utimes', - 'writeFile' -].filter(key => { - // Some commands are not available on some systems. Ex: - // fs.opendir was added in Node.js v12.12.0 - // fs.rm was added in Node.js v14.14.0 - // fs.lchown is not available on at least some Linux - return typeof fs[key] === 'function' -}) - -// Export cloned fs: -Object.assign(exports, fs) - -// Universalify async methods: -api.forEach(method => { - exports[method] = u(fs[method]) -}) -exports.realpath.native = u(fs.realpath.native) - -// We differ from mz/fs in that we still ship the old, broken, fs.exists() -// since we are a drop-in replacement for the native module -exports.exists = function (filename, callback) { - if (typeof callback === 'function') { - return fs.exists(filename, callback) - } - return new Promise(resolve => { - return fs.exists(filename, resolve) - }) -} - -// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args - -exports.read = function (fd, buffer, offset, length, position, callback) { - if (typeof callback === 'function') { - return fs.read(fd, buffer, offset, length, position, callback) - } - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { - if (err) return reject(err) - resolve({ bytesRead, buffer }) - }) - }) -} - -// Function signature can be -// fs.write(fd, buffer[, offset[, length[, position]]], callback) -// OR -// fs.write(fd, string[, position[, encoding]], callback) -// We need to handle both cases, so we use ...args -exports.write = function (fd, buffer, ...args) { - if (typeof args[args.length - 1] === 'function') { - return fs.write(fd, buffer, ...args) - } - - return new Promise((resolve, reject) => { - fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) -} - -// fs.writev only available in Node v12.9.0+ -if (typeof fs.writev === 'function') { - // Function signature is - // s.writev(fd, buffers[, position], callback) - // We need to handle the optional arg, so we use ...args - exports.writev = function (fd, buffers, ...args) { - if (typeof args[args.length - 1] === 'function') { - return fs.writev(fd, buffers, ...args) - } - - return new Promise((resolve, reject) => { - fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => { - if (err) return reject(err) - resolve({ bytesWritten, buffers }) - }) - }) - } -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/index.js": -/*!********************************************!*\ - !*** ./node_modules/fs-extra/lib/index.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - // Export promiseified graceful-fs: - ...__webpack_require__(/*! ./fs */ "./node_modules/fs-extra/lib/fs/index.js"), - // Export extra methods: - ...__webpack_require__(/*! ./copy-sync */ "./node_modules/fs-extra/lib/copy-sync/index.js"), - ...__webpack_require__(/*! ./copy */ "./node_modules/fs-extra/lib/copy/index.js"), - ...__webpack_require__(/*! ./empty */ "./node_modules/fs-extra/lib/empty/index.js"), - ...__webpack_require__(/*! ./ensure */ "./node_modules/fs-extra/lib/ensure/index.js"), - ...__webpack_require__(/*! ./json */ "./node_modules/fs-extra/lib/json/index.js"), - ...__webpack_require__(/*! ./mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js"), - ...__webpack_require__(/*! ./move-sync */ "./node_modules/fs-extra/lib/move-sync/index.js"), - ...__webpack_require__(/*! ./move */ "./node_modules/fs-extra/lib/move/index.js"), - ...__webpack_require__(/*! ./output */ "./node_modules/fs-extra/lib/output/index.js"), - ...__webpack_require__(/*! ./path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js"), - ...__webpack_require__(/*! ./remove */ "./node_modules/fs-extra/lib/remove/index.js") -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/json/index.js": -/*!*************************************************!*\ - !*** ./node_modules/fs-extra/lib/json/index.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise -const jsonFile = __webpack_require__(/*! ./jsonfile */ "./node_modules/fs-extra/lib/json/jsonfile.js") - -jsonFile.outputJson = u(__webpack_require__(/*! ./output-json */ "./node_modules/fs-extra/lib/json/output-json.js")) -jsonFile.outputJsonSync = __webpack_require__(/*! ./output-json-sync */ "./node_modules/fs-extra/lib/json/output-json-sync.js") -// aliases -jsonFile.outputJSON = jsonFile.outputJson -jsonFile.outputJSONSync = jsonFile.outputJsonSync -jsonFile.writeJSON = jsonFile.writeJson -jsonFile.writeJSONSync = jsonFile.writeJsonSync -jsonFile.readJSON = jsonFile.readJson -jsonFile.readJSONSync = jsonFile.readJsonSync - -module.exports = jsonFile - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/json/jsonfile.js": -/*!****************************************************!*\ - !*** ./node_modules/fs-extra/lib/json/jsonfile.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const jsonFile = __webpack_require__(/*! jsonfile */ "./node_modules/jsonfile/index.js") - -module.exports = { - // jsonfile exports - readJson: jsonFile.readFile, - readJsonSync: jsonFile.readFileSync, - writeJson: jsonFile.writeFile, - writeJsonSync: jsonFile.writeFileSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/json/output-json-sync.js": -/*!************************************************************!*\ - !*** ./node_modules/fs-extra/lib/json/output-json-sync.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const { stringify } = __webpack_require__(/*! jsonfile/utils */ "./node_modules/jsonfile/utils.js") -const { outputFileSync } = __webpack_require__(/*! ../output */ "./node_modules/fs-extra/lib/output/index.js") - -function outputJsonSync (file, data, options) { - const str = stringify(data, options) - - outputFileSync(file, str, options) -} - -module.exports = outputJsonSync - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/json/output-json.js": -/*!*******************************************************!*\ - !*** ./node_modules/fs-extra/lib/json/output-json.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const { stringify } = __webpack_require__(/*! jsonfile/utils */ "./node_modules/jsonfile/utils.js") -const { outputFile } = __webpack_require__(/*! ../output */ "./node_modules/fs-extra/lib/output/index.js") - -async function outputJson (file, data, options = {}) { - const str = stringify(data, options) - - await outputFile(file, str, options) -} - -module.exports = outputJson - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/mkdirs/index.js": -/*!***************************************************!*\ - !*** ./node_modules/fs-extra/lib/mkdirs/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise -const { makeDir: _makeDir, makeDirSync } = __webpack_require__(/*! ./make-dir */ "./node_modules/fs-extra/lib/mkdirs/make-dir.js") -const makeDir = u(_makeDir) - -module.exports = { - mkdirs: makeDir, - mkdirsSync: makeDirSync, - // alias - mkdirp: makeDir, - mkdirpSync: makeDirSync, - ensureDir: makeDir, - ensureDirSync: makeDirSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/mkdirs/make-dir.js": -/*!******************************************************!*\ - !*** ./node_modules/fs-extra/lib/mkdirs/make-dir.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") -const { checkPath } = __webpack_require__(/*! ./utils */ "./node_modules/fs-extra/lib/mkdirs/utils.js") - -const getMode = options => { - const defaults = { mode: 0o777 } - if (typeof options === 'number') return options - return ({ ...defaults, ...options }).mode -} - -module.exports.makeDir = async (dir, options) => { - checkPath(dir) - - return fs.mkdir(dir, { - mode: getMode(options), - recursive: true - }) -} - -module.exports.makeDirSync = (dir, options) => { - checkPath(dir) - - return fs.mkdirSync(dir, { - mode: getMode(options), - recursive: true - }) -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/mkdirs/utils.js": -/*!***************************************************!*\ - !*** ./node_modules/fs-extra/lib/mkdirs/utils.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Adapted from https://github.com/sindresorhus/make-dir -// Copyright (c) Sindre Sorhus (sindresorhus.com) -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -const path = __webpack_require__(/*! path */ "path") - -// https://github.com/nodejs/node/issues/8987 -// https://github.com/libuv/libuv/pull/1088 -module.exports.checkPath = function checkPath (pth) { - if (process.platform === 'win32') { - const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')) - - if (pathHasInvalidWinCharacters) { - const error = new Error(`Path contains invalid characters: ${pth}`) - error.code = 'EINVAL' - throw error - } - } -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/move-sync/index.js": -/*!******************************************************!*\ - !*** ./node_modules/fs-extra/lib/move-sync/index.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - moveSync: __webpack_require__(/*! ./move-sync */ "./node_modules/fs-extra/lib/move-sync/move-sync.js") -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/move-sync/move-sync.js": -/*!**********************************************************!*\ - !*** ./node_modules/fs-extra/lib/move-sync/move-sync.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const copySync = __webpack_require__(/*! ../copy-sync */ "./node_modules/fs-extra/lib/copy-sync/index.js").copySync -const removeSync = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js").removeSync -const mkdirpSync = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirpSync -const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function moveSync (src, dest, opts) { - opts = opts || {} - const overwrite = opts.overwrite || opts.clobber || false - - const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts) - stat.checkParentPathsSync(src, srcStat, dest, 'move') - if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest)) - return doRename(src, dest, overwrite, isChangingCase) -} - -function isParentRoot (dest) { - const parent = path.dirname(dest) - const parsedPath = path.parse(parent) - return parsedPath.root === parent -} - -function doRename (src, dest, overwrite, isChangingCase) { - if (isChangingCase) return rename(src, dest, overwrite) - if (overwrite) { - removeSync(dest) - return rename(src, dest, overwrite) - } - if (fs.existsSync(dest)) throw new Error('dest already exists.') - return rename(src, dest, overwrite) -} - -function rename (src, dest, overwrite) { - try { - fs.renameSync(src, dest) - } catch (err) { - if (err.code !== 'EXDEV') throw err - return moveAcrossDevice(src, dest, overwrite) - } -} - -function moveAcrossDevice (src, dest, overwrite) { - const opts = { - overwrite, - errorOnExist: true - } - copySync(src, dest, opts) - return removeSync(src) -} - -module.exports = moveSync - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/move/index.js": -/*!*************************************************!*\ - !*** ./node_modules/fs-extra/lib/move/index.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -module.exports = { - move: u(__webpack_require__(/*! ./move */ "./node_modules/fs-extra/lib/move/move.js")) -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/move/move.js": -/*!************************************************!*\ - !*** ./node_modules/fs-extra/lib/move/move.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const copy = __webpack_require__(/*! ../copy */ "./node_modules/fs-extra/lib/copy/index.js").copy -const remove = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js").remove -const mkdirp = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirp -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists -const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") - -function move (src, dest, opts, cb) { - if (typeof opts === 'function') { - cb = opts - opts = {} - } - - const overwrite = opts.overwrite || opts.clobber || false - - stat.checkPaths(src, dest, 'move', opts, (err, stats) => { - if (err) return cb(err) - const { srcStat, isChangingCase = false } = stats - stat.checkParentPaths(src, srcStat, dest, 'move', err => { - if (err) return cb(err) - if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb) - mkdirp(path.dirname(dest), err => { - if (err) return cb(err) - return doRename(src, dest, overwrite, isChangingCase, cb) - }) - }) - }) -} - -function isParentRoot (dest) { - const parent = path.dirname(dest) - const parsedPath = path.parse(parent) - return parsedPath.root === parent -} - -function doRename (src, dest, overwrite, isChangingCase, cb) { - if (isChangingCase) return rename(src, dest, overwrite, cb) - if (overwrite) { - return remove(dest, err => { - if (err) return cb(err) - return rename(src, dest, overwrite, cb) - }) - } - pathExists(dest, (err, destExists) => { - if (err) return cb(err) - if (destExists) return cb(new Error('dest already exists.')) - return rename(src, dest, overwrite, cb) - }) -} - -function rename (src, dest, overwrite, cb) { - fs.rename(src, dest, err => { - if (!err) return cb() - if (err.code !== 'EXDEV') return cb(err) - return moveAcrossDevice(src, dest, overwrite, cb) - }) -} - -function moveAcrossDevice (src, dest, overwrite, cb) { - const opts = { - overwrite, - errorOnExist: true - } - copy(src, dest, opts, err => { - if (err) return cb(err) - return remove(src, cb) - }) -} - -module.exports = move - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/output/index.js": -/*!***************************************************!*\ - !*** ./node_modules/fs-extra/lib/output/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") -const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - const dir = path.dirname(file) - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - -function outputFileSync (file, ...args) { - const dir = path.dirname(file) - if (fs.existsSync(dir)) { - return fs.writeFileSync(file, ...args) - } - mkdir.mkdirsSync(dir) - fs.writeFileSync(file, ...args) -} - -module.exports = { - outputFile: u(outputFile), - outputFileSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/path-exists/index.js": -/*!********************************************************!*\ - !*** ./node_modules/fs-extra/lib/path-exists/index.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise -const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") - -function pathExists (path) { - return fs.access(path).then(() => true).catch(() => false) -} - -module.exports = { - pathExists: u(pathExists), - pathExistsSync: fs.existsSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/remove/index.js": -/*!***************************************************!*\ - !*** ./node_modules/fs-extra/lib/remove/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback -const rimraf = __webpack_require__(/*! ./rimraf */ "./node_modules/fs-extra/lib/remove/rimraf.js") - -function remove (path, callback) { - // Node 14.14.0+ - if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback) - rimraf(path, callback) -} - -function removeSync (path) { - // Node 14.14.0+ - if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true }) - rimraf.sync(path) -} - -module.exports = { - remove: u(remove), - removeSync -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/remove/rimraf.js": -/*!****************************************************!*\ - !*** ./node_modules/fs-extra/lib/remove/rimraf.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") -const path = __webpack_require__(/*! path */ "path") -const assert = __webpack_require__(/*! assert */ "assert") - -const isWindows = (process.platform === 'win32') - -function defaults (options) { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 -} - -function rimraf (p, options, cb) { - let busyTries = 0 - - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && - busyTries < options.maxBusyTries) { - busyTries++ - const time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), time) - } - - // already gone - if (er.code === 'ENOENT') er = null - } - - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === 'ENOENT') { - return cb(null) - } - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === 'EPERM' && isWindows) { - return fixWinEPERM(p, options, er, cb) - } - - if (st && st.isDirectory()) { - return rmdir(p, options, er, cb) - } - - options.unlink(p, er => { - if (er) { - if (er.code === 'ENOENT') { - return cb(null) - } - if (er.code === 'EPERM') { - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - } - if (er.code === 'EISDIR') { - return rmdir(p, options, er, cb) - } - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.chmod(p, 0o666, er2 => { - if (er2) { - cb(er2.code === 'ENOENT' ? null : er) - } else { - options.stat(p, (er3, stats) => { - if (er3) { - cb(er3.code === 'ENOENT' ? null : er) - } else if (stats.isDirectory()) { - rmdir(p, options, er, cb) - } else { - options.unlink(p, cb) - } - }) - } - }) -} - -function fixWinEPERMSync (p, options, er) { - let stats - - assert(p) - assert(options) - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === 'ENOENT') { - return - } else { - throw er - } - } - - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === 'ENOENT') { - return - } else { - throw er - } - } - - if (stats.isDirectory()) { - rmdirSync(p, options, er) - } else { - options.unlinkSync(p) - } -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { - rmkids(p, options, cb) - } else if (er && er.code === 'ENOTDIR') { - cb(originalEr) - } else { - cb(er) - } - }) -} - -function rmkids (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) return cb(er) - - let n = files.length - let errState - - if (n === 0) return options.rmdir(p, cb) - - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) { - return - } - if (er) return cb(errState = er) - if (--n === 0) { - options.rmdir(p, cb) - } - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - let st - - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === 'ENOENT') { - return - } - - // Windows can EPERM on stat. Life is suffering. - if (er.code === 'EPERM' && isWindows) { - fixWinEPERMSync(p, options, er) - } - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) { - rmdirSync(p, options, null) - } else { - options.unlinkSync(p) - } - } catch (er) { - if (er.code === 'ENOENT') { - return - } else if (er.code === 'EPERM') { - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - } else if (er.code !== 'EISDIR') { - throw er - } - rmdirSync(p, options, er) - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === 'ENOTDIR') { - throw originalEr - } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { - rmkidsSync(p, options) - } else if (er.code !== 'ENOENT') { - throw er - } - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - if (isWindows) { - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const startTime = Date.now() - do { - try { - const ret = options.rmdirSync(p, options) - return ret - } catch {} - } while (Date.now() - startTime < 500) // give up after 500ms - } else { - const ret = options.rmdirSync(p, options) - return ret - } -} - -module.exports = rimraf -rimraf.sync = rimrafSync - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/util/stat.js": -/*!************************************************!*\ - !*** ./node_modules/fs-extra/lib/util/stat.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") -const path = __webpack_require__(/*! path */ "path") -const util = __webpack_require__(/*! util */ "util") - -function getStats (src, dest, opts) { - const statFunc = opts.dereference - ? (file) => fs.stat(file, { bigint: true }) - : (file) => fs.lstat(file, { bigint: true }) - return Promise.all([ - statFunc(src), - statFunc(dest).catch(err => { - if (err.code === 'ENOENT') return null - throw err - }) - ]).then(([srcStat, destStat]) => ({ srcStat, destStat })) -} - -function getStatsSync (src, dest, opts) { - let destStat - const statFunc = opts.dereference - ? (file) => fs.statSync(file, { bigint: true }) - : (file) => fs.lstatSync(file, { bigint: true }) - const srcStat = statFunc(src) - try { - destStat = statFunc(dest) - } catch (err) { - if (err.code === 'ENOENT') return { srcStat, destStat: null } - throw err - } - return { srcStat, destStat } -} - -function checkPaths (src, dest, funcName, opts, cb) { - util.callbackify(getStats)(src, dest, opts, (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - - if (destStat) { - if (areIdentical(srcStat, destStat)) { - const srcBaseName = path.basename(src) - const destBaseName = path.basename(dest) - if (funcName === 'move' && - srcBaseName !== destBaseName && - srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { - return cb(null, { srcStat, destStat, isChangingCase: true }) - } - return cb(new Error('Source and destination must not be the same.')) - } - if (srcStat.isDirectory() && !destStat.isDirectory()) { - return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) - } - if (!srcStat.isDirectory() && destStat.isDirectory()) { - return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)) - } - } - - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return cb(null, { srcStat, destStat }) - }) -} - -function checkPathsSync (src, dest, funcName, opts) { - const { srcStat, destStat } = getStatsSync(src, dest, opts) - - if (destStat) { - if (areIdentical(srcStat, destStat)) { - const srcBaseName = path.basename(src) - const destBaseName = path.basename(dest) - if (funcName === 'move' && - srcBaseName !== destBaseName && - srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { - return { srcStat, destStat, isChangingCase: true } - } - throw new Error('Source and destination must not be the same.') - } - if (srcStat.isDirectory() && !destStat.isDirectory()) { - throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) - } - if (!srcStat.isDirectory() && destStat.isDirectory()) { - throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`) - } - } - - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new Error(errMsg(src, dest, funcName)) - } - return { srcStat, destStat } -} - -// recursively check if dest parent is a subdirectory of src. -// It works for all file types including symlinks since it -// checks the src and dest inodes. It starts from the deepest -// parent and stops once it reaches the src parent or the root path. -function checkParentPaths (src, srcStat, dest, funcName, cb) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return cb() - fs.stat(destParent, { bigint: true }, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb() - return cb(err) - } - if (areIdentical(srcStat, destStat)) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return checkParentPaths(src, srcStat, destParent, funcName, cb) - }) -} - -function checkParentPathsSync (src, srcStat, dest, funcName) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return - let destStat - try { - destStat = fs.statSync(destParent, { bigint: true }) - } catch (err) { - if (err.code === 'ENOENT') return - throw err - } - if (areIdentical(srcStat, destStat)) { - throw new Error(errMsg(src, dest, funcName)) - } - return checkParentPathsSync(src, srcStat, destParent, funcName) -} - -function areIdentical (srcStat, destStat) { - return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev -} - -// return true if dest is a subdir of src, otherwise false. -// It only checks the path strings. -function isSrcSubdir (src, dest) { - const srcArr = path.resolve(src).split(path.sep).filter(i => i) - const destArr = path.resolve(dest).split(path.sep).filter(i => i) - return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true) -} - -function errMsg (src, dest, funcName) { - return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.` -} - -module.exports = { - checkPaths, - checkPathsSync, - checkParentPaths, - checkParentPathsSync, - isSrcSubdir, - areIdentical -} - - -/***/ }), - -/***/ "./node_modules/fs-extra/lib/util/utimes.js": -/*!**************************************************!*\ - !*** ./node_modules/fs-extra/lib/util/utimes.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") - -function utimesMillis (path, atime, mtime, callback) { - // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) - fs.open(path, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, atime, mtime, futimesErr => { - fs.close(fd, closeErr => { - if (callback) callback(futimesErr || closeErr) - }) - }) - }) -} - -function utimesMillisSync (path, atime, mtime) { - const fd = fs.openSync(path, 'r+') - fs.futimesSync(fd, atime, mtime) - return fs.closeSync(fd) -} - -module.exports = { - utimesMillis, - utimesMillisSync -} - - -/***/ }), - -/***/ "./node_modules/fs.realpath/index.js": -/*!*******************************************!*\ - !*** ./node_modules/fs.realpath/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = __webpack_require__(/*! fs */ "fs") -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(/*! ./old.js */ "./node_modules/fs.realpath/old.js") - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} - - -/***/ }), - -/***/ "./node_modules/fs.realpath/old.js": -/*!*****************************************!*\ - !*** ./node_modules/fs.realpath/old.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = __webpack_require__(/*! path */ "path"); -var isWindows = process.platform === 'win32'; -var fs = __webpack_require__(/*! fs */ "fs"); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - -/***/ }), - -/***/ "./node_modules/glob/common.js": -/*!*************************************!*\ - !*** ./node_modules/glob/common.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = __webpack_require__(/*! fs */ "fs") -var path = __webpack_require__(/*! path */ "path") -var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") -var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - - -/***/ }), - -/***/ "./node_modules/glob/glob.js": -/*!***********************************!*\ - !*** ./node_modules/glob/glob.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js") -var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") -var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits.js") -var EE = __webpack_require__(/*! events */ "events").EventEmitter -var path = __webpack_require__(/*! path */ "path") -var assert = __webpack_require__(/*! assert */ "assert") -var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") -var globSync = __webpack_require__(/*! ./sync.js */ "./node_modules/glob/sync.js") -var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js") -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = __webpack_require__(/*! inflight */ "./node_modules/inflight/inflight.js") -var util = __webpack_require__(/*! util */ "util") -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = __webpack_require__(/*! once */ "./node_modules/once/once.js") - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} - - -/***/ }), - -/***/ "./node_modules/glob/sync.js": -/*!***********************************!*\ - !*** ./node_modules/glob/sync.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js") -var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") -var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(/*! ./glob.js */ "./node_modules/glob/glob.js").Glob -var util = __webpack_require__(/*! util */ "util") -var path = __webpack_require__(/*! path */ "path") -var assert = __webpack_require__(/*! assert */ "assert") -var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") -var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js") -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - - -/***/ }), - -/***/ "./node_modules/graceful-fs/clone.js": -/*!*******************************************!*\ - !*** ./node_modules/graceful-fs/clone.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), - -/***/ "./node_modules/graceful-fs/graceful-fs.js": -/*!*************************************************!*\ - !*** ./node_modules/graceful-fs/graceful-fs.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__(/*! fs */ "fs") -var polyfills = __webpack_require__(/*! ./polyfills.js */ "./node_modules/graceful-fs/polyfills.js") -var legacy = __webpack_require__(/*! ./legacy-streams.js */ "./node_modules/graceful-fs/legacy-streams.js") -var clone = __webpack_require__(/*! ./clone.js */ "./node_modules/graceful-fs/clone.js") - -var util = __webpack_require__(/*! util */ "util") - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __webpack_require__(/*! assert */ "assert").equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readdir(path, options, cb) - - function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - }) - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} - - -/***/ }), - -/***/ "./node_modules/graceful-fs/legacy-streams.js": -/*!****************************************************!*\ - !*** ./node_modules/graceful-fs/legacy-streams.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__(/*! stream */ "stream").Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), - -/***/ "./node_modules/graceful-fs/polyfills.js": -/*!***********************************************!*\ - !*** ./node_modules/graceful-fs/polyfills.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var constants = __webpack_require__(/*! constants */ "constants") - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - }})(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} - - -/***/ }), - -/***/ "./node_modules/has-flag/index.js": -/*!****************************************!*\ - !*** ./node_modules/has-flag/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; - - -/***/ }), - -/***/ "./node_modules/immediate/lib/index.js": -/*!*********************************************!*\ - !*** ./node_modules/immediate/lib/index.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var Mutation = global.MutationObserver || global.WebKitMutationObserver; - -var scheduleDrain; - -if (process.browser) { - if (Mutation) { - var called = 0; - var observer = new Mutation(nextTick); - var element = global.document.createTextNode(''); - observer.observe(element, { - characterData: true - }); - scheduleDrain = function () { - element.data = (called = ++called % 2); - }; - } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { - var channel = new global.MessageChannel(); - channel.port1.onmessage = nextTick; - scheduleDrain = function () { - channel.port2.postMessage(0); - }; - } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { - scheduleDrain = function () { - - // Create a