| | | | |
| Offset 1, 24 lines modified | Offset 1, 21 lines modified |
| 1 | { | 1 | { |
| 2 | ····"file":·"axios.cjs", | 2 | ····"file":·"axios.cjs", |
| 3 | ····"mappings":·";;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,MAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACTA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AA[·...·truncated·by·diffoscope;·len:·260314,·SHA:·604f1fe8517fb42d53a4b268463bfc74d04d2521cc5518532168af9b4be4866e·...·],gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;", | 3 | ····"mappings":·";;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,MAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACTA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,[·...·truncated·by·diffoscope;·len:·209828,·SHA:·a0e301fdad16be19c5d85c6e00d8aebb331360cfae4454292100536c4685cd7d·...·],gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;", |
| 4 | ····"names":·[ | 4 | ····"names":·[ |
| 5 | ········"bind", | 5 | ········"bind", |
| 6 | ········"toStringTag", | 6 | ········"toStringTag", |
| 7 | ········"isBuffer", | |
| 8 | ········"isFunction", | 7 | ········"isFunction", |
| 9 | ········"isString", | |
| 10 | ········"noop", | |
| 11 | ········"utils", | 8 | ········"utils", |
| 12 | ········"prototype", | 9 | ········"prototype", |
| 13 | ········"Stream", | 10 | ········"Stream", |
| 14 | ········"require$$0", | 11 | ········"require$$0", |
| 15 | ········"util", | 12 | ········"util", |
| 16 | ········"DelayedStream", | |
| 17 | ········"require$$1", | 13 | ········"require$$1", |
| | 14 | ········"DelayedStream", |
| 18 | ········"require$$2", | 15 | ········"require$$2", |
| 19 | ········"CombinedStream", | 16 | ········"CombinedStream", |
| 20 | ········"mimeScore", | 17 | ········"mimeScore", |
| 21 | ········"defer", | 18 | ········"defer", |
| 22 | ········"async", | 19 | ········"async", |
| 23 | ········"abort", | 20 | ········"abort", |
| 24 | ········"iterate", | 21 | ········"iterate", |
| Offset 33, 45 lines modified | Offset 30, 36 lines modified |
| 33 | ········"hasProto", | 30 | ········"hasProto", |
| 34 | ········"implementation", | 31 | ········"implementation", |
| 35 | ········"undefined", | 32 | ········"undefined", |
| 36 | ········"$TypeError", | 33 | ········"$TypeError", |
| 37 | ········"hasOwn", | 34 | ········"hasOwn", |
| 38 | ········"require$$3", | 35 | ········"require$$3", |
| 39 | ········"populate", | 36 | ········"populate", |
| 40 | ········"http", | |
| 41 | ········"https", | |
| 42 | ········"parseUrl", | |
| 43 | ········"require$$5", | |
| 44 | ········"require$$7", | 37 | ········"require$$7", |
| 45 | ········"require$$9", | 38 | ········"require$$9", |
| 46 | ········"require$$10", | 39 | ········"require$$10", |
| 47 | ········"require$$11", | 40 | ········"require$$11", |
| 48 | ········"require$$12", | 41 | ········"require$$12", |
| 49 | ········"require$$13", | 42 | ········"require$$13", |
| 50 | ········"FormData", | 43 | ········"FormData", |
| 51 | ········"PlatformFormData", | 44 | ········"PlatformFormData", |
| 52 | ········"encode", | 45 | ········"encode", |
| 53 | ········"url", | 46 | ········"url", |
| 54 | ········"crypto", | 47 | ········"crypto", |
| 55 | ········"platform", | 48 | ········"platform", |
| 56 | ········"defaults", | 49 | ········"defaults", |
| 57 | ········"AxiosHeaders", | 50 | ········"AxiosHeaders", |
| 58 | ········"supportsColor_1", | |
| 59 | ········"supportsColor", | |
| 60 | ········"srcModule", | |
| 61 | ········"debug", | |
| 62 | ········"URL", | |
| 63 | ········"require$$4", | |
| 64 | ········"followRedirectsModule", | |
| 65 | ········"readBlob", | 51 | ········"readBlob", |
| 66 | ········"Readable", | 52 | ········"Readable", |
| 67 | ········"callbackify", | 53 | ········"callbackify", |
| 68 | ········"EventEmitter", | 54 | ········"EventEmitter", |
| 69 | ········"formDataToStream", | 55 | ········"formDataToStream", |
| 70 | ········"AxiosTransformStream", | 56 | ········"AxiosTransformStream", |
| | 57 | ········"https", |
| | 58 | ········"http", |
| 71 | ········"ZlibHeaderTransformStream", | 59 | ········"ZlibHeaderTransformStream", |
| 72 | ········"ReadableStream", | 60 | ········"ReadableStream", |
| 73 | ········"TextEncoder", | 61 | ········"TextEncoder", |
| 74 | ········"composeSignals", | 62 | ········"composeSignals", |
| 75 | ········"fetchAdapter.getFetch", | 63 | ········"fetchAdapter.getFetch", |
| 76 | ········"validators", | 64 | ········"validators", |
| 77 | ········"InterceptorManager", | 65 | ········"InterceptorManager", |
| Offset 127, 24 lines modified | Offset 115, 14 lines modified |
| 127 | ········"../../lib/core/transformData.js", | 115 | ········"../../lib/core/transformData.js", |
| 128 | ········"../../lib/cancel/isCancel.js", | 116 | ········"../../lib/cancel/isCancel.js", |
| 129 | ········"../../lib/cancel/CanceledError.js", | 117 | ········"../../lib/cancel/CanceledError.js", |
| 130 | ········"../../lib/core/settle.js", | 118 | ········"../../lib/core/settle.js", |
| 131 | ········"../../lib/helpers/isAbsoluteURL.js", | 119 | ········"../../lib/helpers/isAbsoluteURL.js", |
| 132 | ········"../../lib/helpers/combineURLs.js", | 120 | ········"../../lib/helpers/combineURLs.js", |
| 133 | ········"../../lib/core/buildFullPath.js", | 121 | ········"../../lib/core/buildFullPath.js", |
| 134 | ········"../../../../../usr/share/nodejs/proxy-from-env/index.js", | |
| 135 | ········"../../../../../usr/share/nodejs/ms/index.js", | |
| 136 | ········"../../../../../usr/share/nodejs/debug/src/common.js", | |
| 137 | ········"../../../../../usr/share/nodejs/debug/src/browser.js", | |
| 138 | ········"../../../../../usr/share/nodejs/has-flag/index.cjs", | |
| 139 | ········"../../../../../usr/share/nodejs/supports-color/index.cjs", | |
| 140 | ········"../../../../../usr/share/nodejs/debug/src/node.js", | |
| 141 | ········"../../../../../usr/share/nodejs/debug/src/index.js", | |
| 142 | ········"../../../../../usr/share/nodejs/follow-redirects/debug.js", | |
| 143 | ········"../../../../../usr/share/nodejs/follow-redirects/index.js", | |
| 144 | ········"../../lib/env/data.js", | 122 | ········"../../lib/env/data.js", |
| 145 | ········"../../lib/helpers/parseProtocol.js", | 123 | ········"../../lib/helpers/parseProtocol.js", |
| 146 | ········"../../lib/helpers/fromDataURI.js", | 124 | ········"../../lib/helpers/fromDataURI.js", |
| 147 | ········"../../lib/helpers/AxiosTransformStream.js", | 125 | ········"../../lib/helpers/AxiosTransformStream.js", |
| 148 | ········"../../lib/helpers/readBlob.js", | 126 | ········"../../lib/helpers/readBlob.js", |
| 149 | ········"../../lib/helpers/formDataToStream.js", | 127 | ········"../../lib/helpers/formDataToStream.js", |
| 150 | ········"../../lib/helpers/ZlibHeaderTransformStream.js", | 128 | ········"../../lib/helpers/ZlibHeaderTransformStream.js", |
| Offset 220, 24 lines modified | Offset 198, 14 lines modified |
| 220 | ········"'use·strict';\n\nimport·utils·from·'./../utils.js';\nimport·defaults·from·'../defaults/index.js';\nimport·AxiosHeaders·from·'../core/AxiosHeaders.js';\n\n/**\n·*·Transform·the·data·for·a·request·or·a·response\n·*\n·*·@param·{Array|Function}·fns·A·single·function·or·Array·of·functions\n·*·@param·{?Object}·response·The·response·object\n·*\n·*·@returns·{*}·The·resulting·transformed·data\n·*/\nexport·default·function·transformData(fns,·response)·{\n··const·config·=·this·||·defaults;\n··const·context·=·response·||·config;\n··const·headers·=·AxiosHeaders.from(context.headers);\n··let·data·=·context.data;\n\n··utils.forEach(fns,·function·transform(fn)·{\n····data·=·fn.call(config,·data,·headers.normalize(),·response·?·response.status·:·undefined);\n··});\n\n··headers.normalize();\n\n··return·data;\n}\n", | 198 | ········"'use·strict';\n\nimport·utils·from·'./../utils.js';\nimport·defaults·from·'../defaults/index.js';\nimport·AxiosHeaders·from·'../core/AxiosHeaders.js';\n\n/**\n·*·Transform·the·data·for·a·request·or·a·response\n·*\n·*·@param·{Array|Function}·fns·A·single·function·or·Array·of·functions\n·*·@param·{?Object}·response·The·response·object\n·*\n·*·@returns·{*}·The·resulting·transformed·data\n·*/\nexport·default·function·transformData(fns,·response)·{\n··const·config·=·this·||·defaults;\n··const·context·=·response·||·config;\n··const·headers·=·AxiosHeaders.from(context.headers);\n··let·data·=·context.data;\n\n··utils.forEach(fns,·function·transform(fn)·{\n····data·=·fn.call(config,·data,·headers.normalize(),·response·?·response.status·:·undefined);\n··});\n\n··headers.normalize();\n\n··return·data;\n}\n", |
| 221 | ········"'use·strict';\n\nexport·default·function·isCancel(value)·{\n··return·!!(value·&&·value.__CANCEL__);\n}\n", | 199 | ········"'use·strict';\n\nexport·default·function·isCancel(value)·{\n··return·!!(value·&&·value.__CANCEL__);\n}\n", |
| 222 | ········"'use·strict';\n\nimport·AxiosError·from·'../core/AxiosError.js';\nimport·utils·from·'../utils.js';\n\n/**\n·*·A·`CanceledError`·is·an·object·that·is·thrown·when·an·operation·is·canceled.\n·*\n·*·@param·{string=}·message·The·message.\n·*·@param·{Object=}·config·The·config.\n·*·@param·{Object=}·request·The·request.\n·*\n·*·@returns·{CanceledError}·The·created·error.\n·*/\nfunction·CanceledError(message,·config,·request)·{\n··//·eslint-disable-next-line·no-eq-null,eqeqeq\n··AxiosError.call(this,·message·==·null·?·'canceled'·:·message,·AxiosError.ERR_CANCELED,·config,·request);\n··this.name·=·'CanceledError';\n}\n\nutils.inherits(CanceledError,·AxiosError,·{\n··__CANCEL__:·true\n});\n\nexport·default·CanceledError;\n", | 200 | ········"'use·strict';\n\nimport·AxiosError·from·'../core/AxiosError.js';\nimport·utils·from·'../utils.js';\n\n/**\n·*·A·`CanceledError`·is·an·object·that·is·thrown·when·an·operation·is·canceled.\n·*\n·*·@param·{string=}·message·The·message.\n·*·@param·{Object=}·config·The·config.\n·*·@param·{Object=}·request·The·request.\n·*\n·*·@returns·{CanceledError}·The·created·error.\n·*/\nfunction·CanceledError(message,·config,·request)·{\n··//·eslint-disable-next-line·no-eq-null,eqeqeq\n··AxiosError.call(this,·message·==·null·?·'canceled'·:·message,·AxiosError.ERR_CANCELED,·config,·request);\n··this.name·=·'CanceledError';\n}\n\nutils.inherits(CanceledError,·AxiosError,·{\n··__CANCEL__:·true\n});\n\nexport·default·CanceledError;\n", |
| 223 | ········"'use·strict';\n\nimport·AxiosError·from·'./AxiosError.js';\n\n/**\n·*·Resolve·or·reject·a·Promise·based·on·response·status.\n·*\n·*·@param·{Function}·resolve·A·function·that·resolves·the·promise.\n·*·@param·{Function}·reject·A·function·that·rejects·the·promise.\n·*·@param·{object}·response·The·response.\n·*\n·*·@returns·{object}·The·response.\n·*/\nexport·default·function·settle(resolve,·reject,·response)·{\n··const·validateStatus·=·response.config.validateStatus;\n··if·(!response.status·||·!validateStatus·||·validateStatus(response.status))·{\n····resolve(response);\n··}·else·{\n····reject(new·AxiosError(\n······'Request·failed·with·status·code·'·+·response.status,\n······[AxiosError.ERR_BAD_REQUEST,·AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status·/·100)·-·4],\n······response.config,\n······response.request,\n······response\n····));\n··}\n}\n", | 201 | ········"'use·strict';\n\nimport·AxiosError·from·'./AxiosError.js';\n\n/**\n·*·Resolve·or·reject·a·Promise·based·on·response·status.\n·*\n·*·@param·{Function}·resolve·A·function·that·resolves·the·promise.\n·*·@param·{Function}·reject·A·function·that·rejects·the·promise.\n·*·@param·{object}·response·The·response.\n·*\n·*·@returns·{object}·The·response.\n·*/\nexport·default·function·settle(resolve,·reject,·response)·{\n··const·validateStatus·=·response.config.validateStatus;\n··if·(!response.status·||·!validateStatus·||·validateStatus(response.status))·{\n····resolve(response);\n··}·else·{\n····reject(new·AxiosError(\n······'Request·failed·with·status·code·'·+·response.status,\n······[AxiosError.ERR_BAD_REQUEST,·AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status·/·100)·-·4],\n······response.config,\n······response.request,\n······response\n····));\n··}\n}\n", |
| 224 | ········"'use·strict';\n\n/**\n·*·Determines·whether·the·specified·URL·is·absolute\n·*\n·*·@param·{string}·url·The·URL·to·test\n·*\n·*·@returns·{boolean}·True·if·the·specified·URL·is·absolute,·otherwise·false\n·*/\nexport·default·function·isAbsoluteURL(url)·{\n··//·A·URL·is·considered·absolute·if·it·begins·with·\"<scheme>://\"·or·\"//\"·(protocol-relative·URL).\n··//·RFC·3986·defines·scheme·name·as·a·sequence·of·characters·beginning·with·a·letter·and·followed\n··//·by·any·combination·of·letters,·digits,·plus,·period,·or·hyphen.\n··return·/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", | 202 | ········"'use·strict';\n\n/**\n·*·Determines·whether·the·specified·URL·is·absolute\n·*\n·*·@param·{string}·url·The·URL·to·test\n·*\n·*·@returns·{boolean}·True·if·the·specified·URL·is·absolute,·otherwise·false\n·*/\nexport·default·function·isAbsoluteURL(url)·{\n··//·A·URL·is·considered·absolute·if·it·begins·with·\"<scheme>://\"·or·\"//\"·(protocol-relative·URL).\n··//·RFC·3986·defines·scheme·name·as·a·sequence·of·characters·beginning·with·a·letter·and·followed\n··//·by·any·combination·of·letters,·digits,·plus,·period,·or·hyphen.\n··return·/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", |
| 225 | ········"'use·strict';\n\n/**\n·*·Creates·a·new·URL·by·combining·the·specified·URLs\n·*\n·*·@param·{string}·baseURL·The·base·URL\n·*·@param·{string}·relativeURL·The·relative·URL\n·*\n·*·@returns·{string}·The·combined·URL\n·*/\nexport·default·function·combineURLs(baseURL,·relativeURL)·{\n··return·relativeURL\n····?·baseURL.replace(/\\/?\\/$/,·'')·+·'/'·+·relativeURL.replace(/^\\/+/,·'')\n····:·baseURL;\n}\n", | 203 | ········"'use·strict';\n\n/**\n·*·Creates·a·new·URL·by·combining·the·specified·URLs\n·*\n·*·@param·{string}·baseURL·The·base·URL\n·*·@param·{string}·relativeURL·The·relative·URL\n·*\n·*·@returns·{string}·The·combined·URL\n·*/\nexport·default·function·combineURLs(baseURL,·relativeURL)·{\n··return·relativeURL\n····?·baseURL.replace(/\\/?\\/$/,·'')·+·'/'·+·relativeURL.replace(/^\\/+/,·'')\n····:·baseURL;\n}\n", |
| 226 | ········"'use·strict';\n\nimport·isAbsoluteURL·from·'../helpers/isAbsoluteURL.js';\nimport·combineURLs·from·'../helpers/combineURLs.js';\n\n/**\n·*·Creates·a·new·URL·by·combining·the·baseURL·with·the·requestedURL,\n·*·only·when·the·requestedURL·is·not·already·an·absolute·URL.\n·*·If·the·requestURL·is·absolute,·this·function·returns·the·requestedURL·untouched.\n·*\n·*·@param·{string}·baseURL·The·base·URL\n·*·@param·{string}·requestedURL·Absolute·or·relative·URL·to·combine\n·*\n·*·@returns·{string}·The·combined·full·path\n·*/\nexport·default·function·buildFullPath(baseURL,·requestedURL,·allowAbsoluteUrls)·{\n··let·isRelativeUrl·=·!isAbsoluteURL(requestedURL);\n··if·(baseURL·&&·(isRelativeUrl·||·allowAbsoluteUrls·==·false))·{\n····return·combineURLs(baseURL,·requestedURL);\n··}\n··return·requestedURL;\n}\n", | 204 | ········"'use·strict';\n\nimport·isAbsoluteURL·from·'../helpers/isAbsoluteURL.js';\nimport·combineURLs·from·'../helpers/combineURLs.js';\n\n/**\n·*·Creates·a·new·URL·by·combining·the·baseURL·with·the·requestedURL,\n·*·only·when·the·requestedURL·is·not·already·an·absolute·URL.\n·*·If·the·requestURL·is·absolute,·this·function·returns·the·requestedURL·untouched.\n·*\n·*·@param·{string}·baseURL·The·base·URL\n·*·@param·{string}·requestedURL·Absolute·or·relative·URL·to·combine\n·*\n·*·@returns·{string}·The·combined·full·path\n·*/\nexport·default·function·buildFullPath(baseURL,·requestedURL,·allowAbsoluteUrls)·{\n··let·isRelativeUrl·=·!isAbsoluteURL(requestedURL);\n··if·(baseURL·&&·(isRelativeUrl·||·allowAbsoluteUrls·==·false))·{\n····return·combineURLs(baseURL,·requestedURL);\n··}\n··return·requestedURL;\n}\n", |
| 227 | ········"'use·strict';\n\nvar·parseUrl·=·require('url').parse;\n\nvar·DEFAULT_PORTS·=·{\n··ftp:·21,\n··gopher:·70,\n··http:·80,\n··https:·443,\n··ws:·80,\n··wss:·443,\n};\n\nvar·stringEndsWith·=·String.prototype.endsWith·||·function(s)·{\n··return·s.length·<=·this.length·&&\n····this.indexOf(s,·this.length·-·s.length)·!==·-1;\n};\n\n/**\n·*·@param·{string|object}·url·-·The·URL,·or·the·result·from·url.parse.\n·*·@return·{string}·The·URL·of·the·proxy·that·should·handle·the·request·to·the\n·*··given·URL.·If·no·proxy·is·set,·this·will·be·an·empty·string.\n·*/\nfunction·getProxyForUrl(url)·{\n··var·parsedUrl·=·typeof·url·===·'string'·?·parseUrl(url)·:·url·||·{};\n··var·proto·=·parsedUrl.protocol;\n··var·hostname·=·parsedUrl.host;\n··var·port·=·parsedUrl.port;\n··if·(typeof·hostname·!==·'string'·||·!hostname·||·typeof·proto·!==·'string')·{\n····return·'';··//·Don't·proxy·URLs·without·a·valid·scheme·or·host.\n··}\n\n··proto·=·proto.split(':',·1)[0];\n··//·Stripping·ports·in·this·way·instead·of·using·parsedUrl.hostname·to·make\n··//·sure·that·the·brackets·around·IPv6·addresses·are·kept.\n··hostname·=·hostname.replace(/:\\d*$/,·'');\n··port·=·parseInt(port)·||·DEFAULT_PORTS[proto]·||·0;\n··if·(!shouldProxy(hostname,·port))·{\n····return·'';··//·Don't·proxy·URLs·that·match·NO_PROXY.\n··}\n\n··var·proxy·=\n····getEnv('npm_config_'·+·proto·+·'_proxy')·||\n····getEnv(proto·+·'_proxy')·||\n····getEnv('npm_config_proxy')·||\n····getEnv('all_proxy');\n··if·(proxy·&&·proxy.indexOf('://')·===·-1)·{\n····//·Missing·scheme·in·proxy,·default·to·the·requested·URL's·scheme.\n····proxy·=·proto·+·'://'·+·proxy;\n··}\n··return·proxy;\n}\n\n/**\n·*·Determines·whether·a·given·URL·should·be·proxied.\n·*\n·*·@param·{string}·hostname·-·The·host·name·of·the·URL.\n·*·@param·{number}·port·-·The·effective·port·of·the·URL.\n·*·@returns·{boolean}·Whether·the·given·URL·should·be·proxied.\n·*·@private\n·*/\nfunction·shouldProxy(hostname,·port)·{\n··var·NO_PROXY·=\n····(getEnv('npm_config_no_proxy')·||·getEnv('no_proxy')).toLowerCase();\n··if·(!NO_PROXY)·{\n····return·true;··//·Always·proxy·if·NO_PROXY·is·not·set.\n··}\n··if·(NO_PROXY·===·'*')·{\n····return·false;··//·Never·proxy·if·wildcard·is·set.\n··}\n\n··return·NO_PROXY.split(/[,\\s]/).every(function(proxy)·{\n····if·(!proxy)·{\n······return·true;··//·Skip·zero-length·hosts.\n····}\n····var·parsedProxy·=·proxy.match(/^(.+):(\\d+)$/);\n····var·parsedProxyHostname·=·parsedProxy·?·parsedProxy[1]·:·proxy;\n····var·parsedProxyPort·=·parsedProxy·?·parseInt(parsedProxy[2])·:·0;\n····if·(parsedProxyPort·&&·parsedProxyPort·!==·port)·{\n······return·true;··//·Skip·if·ports·don't·match.\n····}\n\n····if·(!/^[.*]/.test(parsedProxyHostname))·{\n······//·No·wildcards,·so·stop·proxying·if·there·is·an·exact·match.\n······return·hostname·!==·parsedProxyHostname;\n····}\n\n····if·(parsedProxyHostname.charAt(0)·===·'*')·{\n······//·Remove·leading·wildcard.\n······parsedProxyHostname·=·parsedProxyHostname.slice(1);\n····}\n····//·Stop·proxying·if·the·hostname·ends·with·the·no_proxy·host.\n····return·!stringEndsWith.call(hostname,·parsedProxyHostname);\n··});\n}\n\n/**\n·*·Get·the·value·for·an·environment·variable.\n·*\n·*·@param·{string}·key·-·The·name·of·the·environment·variable.\n·*·@return·{string}·The·value·of·the·environment·variable.\n·*·@private\n·*/\nfunction·getEnv(key)·{\n··return·process.env[key.toLowerCase()]·||·process.env[key.toUpperCase()]·||·'';\n}\n\nexports.getProxyForUrl·=·getProxyForUrl;\n", | |
| 228 | ········"/**\n·*·Helpers.\n·*/\n\nvar·s·=·1000;\nvar·m·=·s·*·60;\nvar·h·=·m·*·60;\nvar·d·=·h·*·24;\nvar·w·=·d·*·7;\nvar·y·=·d·*·365.25;\n\n/**\n·*·Parse·or·format·the·given·`val`.\n·*\n·*·Options:\n·*\n·*··-·`long`·verbose·formatting·[false]\n·*\n·*·@param·{String|Number}·val\n·*·@param·{Object}·[options]\n·*·@throws·{Error}·throw·an·error·if·val·is·not·a·non-empty·string·or·a·number\n·*·@return·{String|Number}\n·*·@api·public\n·*/\n\nmodule.exports·=·function·(val,·options)·{\n··options·=·options·||·{};\n··var·type·=·typeof·val;\n··if·(type·===·'string'·&&·val.length·>·0)·{\n····return·parse(val);\n··}·else·if·(type·===·'number'·&&·isFinite(val))·{\n····return·options.long·?·fmtLong(val)·:·fmtShort(val);\n··}\n··throw·new·Error(\n····'val·is·not·a·non-empty·string·or·a·valid·number.·val='·+\n······JSON.stringify(val)\n··);\n};\n\n/**\n·*·Parse·the·given·`str`·and·return·milliseconds.\n·*\n·*·@param·{String}·str\n·*·@return·{Number}\n·*·@api·private\n·*/\n\nfunction·parse(str)·{\n··str·=·String(str);\n··if·(str.length·>·100)·{\n····return;\n··}\n··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(\n····str\n··);\n··if·(!match)·{\n····return;\n··}\n··var·n·=·parseFloat(match[1]);\n··var·type·=·(match[2]·||·'ms').toLowerCase();\n··switch·(type)·{\n····case·'years':\n····case·'year':\n····case·'yrs':\n····case·'yr':\n····case·'y':\n······return·n·*·y;\n····case·'weeks':\n····case·'week':\n····case·'w':\n······return·n·*·w;\n····case·'days':\n····case·'day':\n····case·'d':\n······return·n·*·d;\n····case·'hours':\n····case·'hour':\n····case·'hrs':\n····case·'hr':\n····case·'h':\n······return·n·*·h;\n····case·'minutes':\n····case·'minute':\n····case·'mins':\n····case·'min':\n····case·'m':\n······return·n·*·m;\n····case·'seconds':\n····case·'second':\n····case·'secs':\n····case·'sec':\n····case·'s':\n······return·n·*·s;\n····case·'milliseconds':\n····case·'millisecond':\n····case·'msecs':\n····case·'msec':\n····case·'ms':\n······return·n;\n····default:\n······return·undefined;\n··}\n}\n\n/**\n·*·Short·format·for·`ms`.\n·*\n·*·@param·{Number}·ms\n·*·@return·{String}\n·*·@api·private\n·*/\n\nfunction·fmtShort(ms)·{\n··var·msAbs·=·Math.abs(ms);\n··if·(msAbs·>=·d)·{\n····return·Math.round(ms·/·d)·+·'d';\n··}\n··if·(msAbs·>=·h)·{\n····return·Math.round(ms·/·h)·+·'h';\n··}\n··if·(msAbs·>=·m)·{\n····return·Math.round(ms·/·m)·+·'m';\n··}\n··if·(msAbs·>=·s)·{\n····return·Math.round(ms·/·s)·+·'s';\n··}\n··return·ms·+·'ms';\n}\n\n/**\n·*·Long·format·for·`ms`.\n·*\n·*·@param·{Number}·ms\n·*·@return·{String}\n·*·@api·private\n·*/\n\nfunction·fmtLong(ms)·{\n··var·msAbs·=·Math.abs(ms);\n··if·(msAbs·>=·d)·{\n····return·plural(ms,·msAbs,·d,·'day');\n··}\n··if·(msAbs·>=·h)·{\n····return·plural(ms,·msAbs,·h,·'hour');\n··}\n··if·(msAbs·>=·m)·{\n····return·plural(ms,·msAbs,·m,·'minute');\n··}\n··if·(msAbs·>=·s)·{\n····return·plural(ms,·msAbs,·s,·'second');\n··}\n··return·ms·+·'·ms';\n}\n\n/**\n·*·Pluralization·helper.\n·*/\n\nfunction·plural(ms,·msAbs,·n,·name)·{\n··var·isPlural·=·msAbs·>=·n·*·1.5;\n··return·Math.round(ms·/·n)·+·'·'·+·name·+·(isPlural·?·'s'·:·'');\n}\n", | |
| 229 | ········"\n/**\n·*·This·is·the·common·logic·for·both·the·Node.js·and·web·browser\n·*·implementations·of·`debug()`.\n·*/\n\nfunction·setup(env)·{\n\tcreateDebug.debug·=·createDebug;\n\tcreateDebug.default·=·createDebug;\n\tcreateDebug.coerce·=·coerce;\n\tcreateDebug.disable·=·disable;\n\tcreateDebug.enable·=·enable;\n\tcreateDebug.enabled·=·enabled;\n\tcreateDebug.humanize·=·require('ms');\n\tcreateDebug.destroy·=·destroy;\n\n\tObject.keys(env).forEach(key·=>·{\n\t\tcreateDebug[key]·=·env[key];\n\t});\n\n\t/**\n\t*·The·currently·active·debug·mode·names,·and·names·to·skip.\n\t*/\n\n\tcreateDebug.names·=·[];\n\tcreateDebug.skips·=·[];\n\n\t/**\n\t*·Map·of·special·\"%n\"·handling·functions,·for·the·debug·\"format\"·argument.\n\t*\n\t*·Valid·key·names·are·a·single,·lower·or·upper-case·letter,·i.e.·\"n\"·and·\"N\".\n\t*/\n\tcreateDebug.formatters·=·{};\n\n\t/**\n\t*·Selects·a·color·for·a·debug·namespace\n\t*·@param·{String}·namespace·The·namespace·string·for·the·debug·instance·to·be·colored\n\t*·@return·{Number|String}·An·ANSI·color·code·for·the·given·namespace\n\t*·@api·private\n\t*/\n\tfunction·selectColor(namespace)·{\n\t\tlet·hash·=·0;\n\n\t\tfor·(let·i·=·0;·i·<·namespace.length;·i++)·{\n\t\t\thash·=·((hash·<<·5)·-·hash)·+·namespace.charCodeAt(i);\n\t\t\thash·|=·0;·//·Convert·to·32bit·integer\n\t\t}\n\n\t\treturn·createDebug.colors[Math.abs(hash)·%·createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor·=·selectColor;\n\n\t/**\n\t*·Create·a·debugger·with·the·given·`namespace`.\n\t*\n\t*·@param·{String}·namespace\n\t*·@return·{Function}\n\t*·@api·public\n\t*/\n\tfunction·createDebug(namespace)·{\n\t\tlet·prevTime;\n\t\tlet·enableOverride·=·null;\n\t\tlet·namespacesCache;\n\t\tlet·enabledCache;\n\n\t\tfunction·debug(...args)·{\n\t\t\t//·Disabled?\n\t\t\tif·(!debug.enabled)·{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst·self·=·debug;\n\n\t\t\t//·Set·`diff`·timestamp\n\t\t\tconst·curr·=·Number(new·Date());\n\t\t\tconst·ms·=·curr·-·(prevTime·||·curr);\n\t\t\tself.diff·=·ms;\n\t\t\tself.prev·=·prevTime;\n\t\t\tself.curr·=·curr;\n\t\t\tprevTime·=·curr;\n\n\t\t\targs[0]·=·createDebug.coerce(args[0]);\n\n\t\t\tif·(typeof·args[0]·!==·'string')·{\n\t\t\t\t//·Anything·else·let's·inspect·with·%O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t//·Apply·any·`formatters`·transformations\n\t\t\tlet·index·=·0;\n\t\t\targs[0]·=·args[0].replace(/%([a-zA-Z%])/g,·(match,·format)·=>·{\n\t\t\t\t//·If·we·encounter·an·escaped·%·then·don't·increase·the·array·index\n\t\t\t\tif·(match·===·'%%')·{\n\t\t\t\t\treturn·'%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst·formatter·=·createDebug.formatters[format];\n\t\t\t\tif·(typeof·formatter·===·'function')·{\n\t\t\t\t\tconst·val·=·args[index];\n\t\t\t\t\tmatch·=·formatter.call(self,·val);\n\n\t\t\t\t\t//·Now·we·need·to·remove·`args[index]`·since·it's·inlined·in·the·`format`\n\t\t\t\t\targs.splice(index,·1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn·match;\n\t\t\t});\n\n\t\t\t//·Apply·env-specific·formatting·(colors,·etc.)\n\t\t\tcreateDebug.formatArgs.call(self,·args);\n\n\t\t\tconst·logFn·=·self.log·||·createDebug.log;\n\t\t\tlogFn.apply(self,·args);\n\t\t}\n\n\t\tdebug.namespace·=·namespace;\n\t\tdebug.useColors·=·createDebug.useColors();\n\t\tdebug.color·=·createDebug.selectColor(namespace);\n\t\tdebug.extend·=·extend;\n\t\tdebug.destroy·=·createDebug.destroy;·//·XXX·Temporary.·Will·be·removed·in·the·next·major·release.\n\n\t\tObject.defineProperty(debug,·'enabled',·{\n\t\t\tenumerable:·true,\n\t\t\tconfigurable:·false,\n\t\t\tget:·()·=>·{\n\t\t\t\tif·(enableOverride·!==·null)·{\n\t\t\t\t\treturn·enableOverride;\n\t\t\t\t}\n\t\t\t\tif·(namespacesCache·!==·createDebug.namespaces)·{\n\t\t\t\t\tnamespacesCache·=·createDebug.namespaces;\n\t\t\t\t\tenabledCache·=·createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn·enabledCache;\n\t\t\t},\n\t\t\tset:·v·=>·{\n\t\t\t\tenableOverride·=·v;\n\t\t\t}\n\t\t});\n\n\t\t//·Env-specific·initialization·logic·for·debug·instances\n\t\tif·(typeof·createDebug.init·===·'function')·{\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn·debug;\n\t}\n\n\tfunction·extend(namespace,·delimiter)·{\n\t\tconst·newDebug·=·createDebug(this.namespace·+·(typeof·delimiter·===·'undefined'·?·':'·:·delimiter)·+·namespace);\n\t\tnewDebug.log·=·this.log;\n\t\treturn·newDebug;\n\t}\n\n\t/**\n\t*·Enables·a·debug·mode·by·namespaces.·This·can·include·modes\n\t*·separated·by·a·colon·and·wildcards.\n\t*\n\t*·@param·{String}·namespaces\n\t*·@api·public\n\t*/\n\tfunction·enable(namespaces)·{\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces·=·namespaces;\n\n\t\tcreateDebug.names·=·[];\n\t\tcreateDebug.skips·=·[];\n\n\t\tconst·split·=·(typeof·namespaces·===·'string'·?·namespaces·:·'')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g,·',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor·(const·ns·of·split)·{\n\t\t\tif·(ns[0]·===·'-')·{\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t}·else·{\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t·*·Checks·if·the·given·string·matches·a·namespace·template,·honoring\n\t·*·asterisks·as·wildcards.\n\t·*\n\t·*·@param·{String}·search\n\t·*·@param·{String}·template\n\t·*·@return·{Boolean}\n\t·*/\n\tfunction·matchesTemplate(search,·template)·{\n\t\tlet·searchIndex·=·0;\n\t\tlet·templateIndex·=·0;\n\t\tlet·starIndex·=·-1;\n\t\tlet·matchIndex·=·0;\n\n\t\twhile·(searchIndex·<·search.length)·{\n\t\t\tif·(templateIndex·<·template.length·&&·(template[templateIndex]·===·search[searchIndex]·||·template[templateIndex]·===·'*'))·{\n\t\t\t\t//·Match·character·or·proceed·with·wildcard\n\t\t\t\tif·(template[templateIndex]·===·'*')·{\n\t\t\t\t\tstarIndex·=·templateIndex;\n\t\t\t\t\tmatchIndex·=·searchIndex;\n\t\t\t\t\ttemplateIndex++;·//·Skip·the·'*'\n\t\t\t\t}·else·{\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t}·else·if·(starIndex·!==·-1)·{·//·eslint-disable-line·no-negated-condition\n\t\t\t\t//·Backtrack·to·the·last·'*'·and·try·to·match·more·characters\n\t\t\t\ttemplateIndex·=·starIndex·+·1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex·=·matchIndex;\n\t\t\t}·else·{\n\t\t\t\treturn·false;·//·No·match\n\t\t\t}\n\t\t}\n\n\t\t//·Handle·trailing·'*'·in·template\n\t\twhile·(templateIndex·<·template.length·&&·template[templateIndex]·===·'*')·{\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn·templateIndex·===·template.length;\n\t}\n\n\t/**\n\t*·Disable·debug·output.\n\t*\n\t*·@return·{String}·namespaces\n\t*·@api·public\n\t*/\n\tfunction·disable()·{\n\t\tconst·namespaces·=·[\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace·=>·'-'·+·namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn·namespaces;\n\t}\n\n\t/**\n\t*·Returns·true·if·the·given·mode·name·is·enabled,·false·otherwise.\n\t*\n\t*·@param·{String}·name\n\t*·@return·{Boolean}\n\t*·@api·public\n\t*/\n\tfunction·enabled(name)·{\n\t\tfor·(const·skip·of·createDebug.skips)·{\n\t\t\tif·(matchesTemplate(name,·skip))·{\n\t\t\t\treturn·false;\n\t\t\t}\n\t\t}\n\n\t\tfor·(const·ns·of·createDebug.names)·{\n\t\t\tif·(matchesTemplate(name,·ns))·{\n\t\t\t\treturn·true;\n\t\t\t}\n\t\t}\n\n\t\treturn·false;\n\t}\n\n\t/**\n\t*·Coerce·`val`.\n\t*\n\t*·@param·{Mixed}·val\n\t*·@return·{Mixed}\n\t*·@api·private\n\t*/\n\tfunction·coerce(val)·{\n\t\tif·(val·instanceof·Error)·{\n\t\t\treturn·val.stack·||·val.message;\n\t\t}\n\t\treturn·val;\n\t}\n\n\t/**\n\t*·XXX·DO·NOT·USE.·This·is·a·temporary·stub·function.\n\t*·XXX·It·WILL·be·removed·in·the·next·major·release.\n\t*/\n\tfunction·destroy()·{\n\t\tconsole.warn('Instance·method·`debug.destroy()`·is·deprecated·and·no·longer·does·anything.·It·will·be·removed·in·the·next·major·version·of·`debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn·createDebug;\n}\n\nmodule.exports·=·setup;\n", | |
| 230 | ········"/*·eslint-env·browser·*/\n\n/**\n·*·This·is·the·web·browser·implementation·of·`debug()`.\n·*/\n\nexports.formatArgs·=·formatArgs;\nexports.save·=·save;\nexports.load·=·load;\nexports.useColors·=·useColors;\nexports.storage·=·localstorage();\nexports.destroy·=·(()·=>·{\n\tlet·warned·=·false;\n\n\treturn·()·=>·{\n\t\tif·(!warned)·{\n\t\t\twarned·=·true;\n\t\t\tconsole.warn('Instance·method·`debug.destroy()`·is·deprecated·and·no·longer·does·anything.·It·will·be·removed·in·the·next·major·version·of·`debug`.');\n\t\t}\n\t};\n})();\n\n/**\n·*·Colors.\n·*/\n\nexports.colors·=·[\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n·*·Currently·only·WebKit-based·Web·Inspectors,·Firefox·>=·v31,\n·*·and·the·Firebug·extension·(any·Firefox·version)·are·known\n·*·to·support·\"%c\"·CSS·customizations.\n·*\n·*·TODO:·add·a·`localStorage`·variable·to·explicitly·enable/disable·colors\n·*/\n\n//·eslint-disable-next-line·complexity\nfunction·useColors()·{\n\t//·NB:·In·an·Electron·preload·script,·document·will·be·defined·but·not·fully\n\t//·initialized.·Since·we·know·we're·in·Chrome,·we'll·just·detect·this·case\n\t//·explicitly\n\tif·(typeof·window·!==·'undefined'·&&·window.process·&&·(window.process.type·===·'renderer'·||·window.process.__nwjs))·{\n\t\treturn·true;\n\t}\n\n\t//·Internet·Explorer·and·Edge·do·not·support·colors.\n\tif·(typeof·navigator·!==·'undefined'·&&·navigator.userAgent·&&·navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))·{\n\t\treturn·false;\n\t}\n\n\tlet·m;\n\n\t//·Is·webkit?·http://stackoverflow.com/a/16459606/376773\n\t//·document·is·undefined·in·react-native:·https://github.com/facebook/react-native/pull/1632\n\t//·eslint-disable-next-line·no-return-assign\n\treturn·(typeof·document·!==·'undefined'·&&·document.documentElement·&&·document.documentElement.style·&&·document.documentElement.style.WebkitAppearance)·||\n\t\t//·Is·firebug?·http://stackoverflow.com/a/398120/376773\n\t\t(typeof·window·!==·'undefined'·&&·window.console·&&·(window.console.firebug·||·(window.console.exception·&&·window.console.table)))·||\n\t\t//·Is·firefox·>=·v31?\n\t\t//·https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof·navigator·!==·'undefined'·&&·navigator.userAgent·&&·(m·=·navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))·&&·parseInt(m[1],·10)·>=·31)·||\n\t\t//·Double·check·webkit·in·userAgent·just·in·case·we·are·in·a·worker\n\t\t(typeof·navigator·!==·'undefined'·&&·navigator.userAgent·&&·navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n·*·Colorize·log·arguments·if·enabled.\n·*\n·*·@api·public\n·*/\n\nfunction·formatArgs(args)·{\n\targs[0]·=·(this.useColors·?·'%c'·:·'')·+\n\t\tthis.namespace·+\n\t\t(this.useColors·?·'·%c'·:·'·')·+\n\t\targs[0]·+\n\t\t(this.useColors·?·'%c·'·:·'·')·+\n\t\t'+'·+·module.exports.humanize(this.diff);\n\n\tif·(!this.useColors)·{\n\t\treturn;\n\t}\n\n\tconst·c·=·'color:·'·+·this.color;\n\targs.splice(1,·0,·c,·'color:·inherit');\n\n\t//·The·final·\"%c\"·is·somewhat·tricky,·because·there·could·be·other\n\t//·arguments·passed·either·before·or·after·the·%c,·so·we·need·to\n\t//·figure·out·the·correct·index·to·insert·the·CSS·into\n\tlet·index·=·0;\n\tlet·lastC·=·0;\n\targs[0].replace(/%[a-zA-Z%]/g,·match·=>·{\n\t\tif·(match·===·'%%')·{\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif·(match·===·'%c')·{\n\t\t\t//·We·only·are·interested·in·the·*last*·%c\n\t\t\t//·(the·user·may·have·provided·their·own)\n\t\t\tlastC·=·index;\n\t\t}\n\t});\n\n\targs.splice(lastC,·0,·c);\n}\n\n/**\n·*·Invokes·`console.debug()`·when·available.\n·*·No-op·when·`console.debug`·is·not·a·\"function\".\n·*·If·`console.debug`·is·not·available,·falls·back\n·*·to·`console.log`.\n·*\n·*·@api·public\n·*/\nexports.log·=·console.debug·||·console.log·||·(()·=>·{});\n\n/**\n·*·Save·`namespaces`.\n·*\n·*·@param·{String}·namespaces\n·*·@api·private\n·*/\nfunction·save(namespaces)·{\n\ttry·{\n\t\tif·(namespaces)·{\n\t\t\texports.storage.setItem('debug',·namespaces);\n\t\t}·else·{\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t}·catch·(error)·{\n\t\t//·Swallow\n\t\t//·XXX·(@Qix-)·should·we·be·logging·these?\n\t}\n}\n\n/**\n·*·Load·`namespaces`.\n·*\n·*·@return·{String}·returns·the·previously·persisted·debug·modes\n·*·@api·private\n·*/\nfunction·load()·{\n\tlet·r;\n\ttry·{\n\t\tr·=·exports.storage.getItem('debug')·||·exports.storage.getItem('DEBUG')·;\n\t}·catch·(error)·{\n\t\t//·Swallow\n\t\t//·XXX·(@Qix-)·should·we·be·logging·these?\n\t}\n\n\t//·If·debug·isn't·set·in·LS,·and·we're·in·Electron,·try·to·load·$DEBUG\n\tif·(!r·&&·typeof·process·!==·'undefined'·&&·'env'·in·process)·{\n\t\tr·=·process.env.DEBUG;\n\t}\n\n\treturn·r;\n}\n\n/**\n·*·Localstorage·attempts·to·return·the·localstorage.\n·*\n·*·This·is·necessary·because·safari·throws\n·*·when·a·user·disables·cookies/localstorage\n·*·and·you·attempt·to·access·it.\n·*\n·*·@return·{LocalStorage}\n·*·@api·private\n·*/\n\nfunction·localstorage()·{\n\ttry·{\n\t\t//·TVMLKit·(Apple·TV·JS·Runtime)·does·not·have·a·window·object,·just·localStorage·in·the·global·context\n\t\t//·The·Browser·also·has·localStorage·in·the·global·context.\n\t\treturn·localStorage;\n\t}·catch·(error)·{\n\t\t//·Swallow\n\t\t//·XXX·(@Qix-)·should·we·be·logging·these?\n\t}\n}\n\nmodule.exports·=·require('./common')(exports);\n\nconst·{formatters}·=·module.exports;\n\n/**\n·*·Map·%j·to·`JSON.stringify()`,·since·no·Web·Inspectors·do·that·by·default.\n·*/\n\nformatters.j·=·function·(v)·{\n\ttry·{\n\t\treturn·JSON.stringify(v);\n\t}·catch·(error)·{\n\t\treturn·'[UnexpectedJSONParseError]:·'·+·error.message;\n\t}\n};\n", | |
| 231 | ········"var·process·=·require('process');\n\nfunction·_interopDefault·(e)·{·return·e·&&·e.__esModule·?·e·:·{·default:·e·};·}\n\nvar·process__default·=·/*#__PURE__*/_interopDefault(process);\n\nfunction·hasFlag(flag,·argv·=·process__default.default.argv)·{\n\tconst·prefix·=·flag.startsWith('-')·?·''·:·(flag.length·===·1·?·'-'·:·'--');\n\tconst·position·=·argv.indexOf(prefix·+·flag);\n\tconst·terminatorPosition·=·argv.indexOf('--');\n\treturn·position·!==·-1·&&·(terminatorPosition·===·-1·||·position·<·terminatorPosition);\n}\n\nmodule.exports·=·hasFlag;\n", | |
| 232 | ········"Object.defineProperty(exports,·'__esModule',·{·value:·true·});\n\nvar·process·=·require('node:process');\nvar·os·=·require('node:os');\nvar·tty·=·require('node:tty');\nvar·hasFlag·=·require('has-flag');\n\nfunction·_interopDefault·(e)·{·return·e·&&·e.__esModule·?·e·:·{·default:·e·};·}\n\nvar·process__default·=·/*#__PURE__*/_interopDefault(process);\nvar·os__default·=·/*#__PURE__*/_interopDefault(os);\nvar·tty__default·=·/*#__PURE__*/_interopDefault(tty);\nvar·hasFlag__default·=·/*#__PURE__*/_interopDefault(hasFlag);\n\nconst·{env}·=·process__default.default;\n\nlet·flagForceColor;\nif·(\n\thasFlag__default.default('no-color')\n\t||·hasFlag__default.default('no-colors')\n\t||·hasFlag__default.default('color=false')\n\t||·hasFlag__default.default('color=never')\n)·{\n\tflagForceColor·=·0;\n}·else·if·(\n\thasFlag__default.default('color')\n\t||·hasFlag__default.default('colors')\n\t||·hasFlag__default.default('color=true')\n\t||·hasFlag__default.default('color=always')\n)·{\n\tflagForceColor·=·1;\n}\n\nfunction·envForceColor()·{\n\tif·(!('FORCE_COLOR'·in·env))·{\n\t\treturn;\n\t}\n\n\tif·(env.FORCE_COLOR·===·'true')·{\n\t\treturn·1;\n\t}\n\n\tif·(env.FORCE_COLOR·===·'false')·{\n\t\treturn·0;\n\t}\n\n\tif·(env.FORCE_COLOR.length·===·0)·{\n\t\treturn·1;\n\t}\n\n\tconst·level·=·Math.min(Number.parseInt(env.FORCE_COLOR,·10),·3);\n\n\tif·(![0,·1,·2,·3].includes(level))·{\n\t\treturn;\n\t}\n\n\treturn·level;\n}\n\nfunction·translateLevel(level)·{\n\tif·(level·===·0)·{\n\t\treturn·false;\n\t}\n\n\treturn·{\n\t\tlevel,\n\t\thasBasic:·true,\n\t\thas256:·level·>=·2,\n\t\thas16m:·level·>=·3,\n\t};\n}\n\nfunction·_supportsColor(haveStream,·{streamIsTTY,·sniffFlags·=·true}·=·{})·{\n\tconst·noFlagForceColor·=·envForceColor();\n\tif·(noFlagForceColor·!==·undefined)·{\n\t\tflagForceColor·=·noFlagForceColor;\n\t}\n\n\tconst·forceColor·=·sniffFlags·?·flagForceColor·:·noFlagForceColor;\n\n\tif·(forceColor·===·0)·{\n\t\treturn·0;\n\t}\n\n\tif·(sniffFlags)·{\n\t\tif·(hasFlag__default.default('color=16m')\n\t\t\t||·hasFlag__default.default('color=full')\n\t\t\t||·hasFlag__default.default('color=truecolor'))·{\n\t\t\treturn·3;\n\t\t}\n\n\t\tif·(hasFlag__default.default('color=256'))·{\n\t\t\treturn·2;\n\t\t}\n\t}\n\n\t//·Check·for·Azure·DevOps·pipelines.\n\t//·Has·to·be·above·the·`!streamIsTTY`·check.\n\tif·('TF_BUILD'·in·env·&&·'AGENT_NAME'·in·env)·{\n\t\treturn·1;\n\t}\n\n\tif·(haveStream·&&·!streamIsTTY·&&·forceColor·===·undefined)·{\n\t\treturn·0;\n\t}\n\n\tconst·min·=·forceColor·||·0;\n\n\tif·(env.TERM·===·'dumb')·{\n\t\treturn·min;\n\t}\n\n\tif·(process__default.default.platform·===·'win32')·{\n\t\t//·Windows·10·build·10586·is·the·first·Windows·release·that·supports·256·colors.\n\t\t//·Windows·10·build·14931·is·the·first·release·that·supports·16m/TrueColor.\n\t\tconst·osRelease·=·os__default.default.release().split('.');\n\t\tif·(\n\t\t\tNumber(osRelease[0])·>=·10\n\t\t\t&&·Number(osRelease[2])·>=·10_586\n\t\t)·{\n\t\t\treturn·Number(osRelease[2])·>=·14_931·?·3·:·2;\n\t\t}\n\n\t\treturn·1;\n\t}\n\n\tif·('CI'·in·env)·{\n\t\tif·(['GITHUB_ACTIONS',·'GITEA_ACTIONS',·'CIRCLECI'].some(key·=>·key·in·env))·{\n\t\t\treturn·3;\n\t\t}\n\n\t\tif·(['TRAVIS',·'APPVEYOR',·'GITLAB_CI',·'BUILDKITE',·'DRONE'].some(sign·=>·sign·in·env)·||·env.CI_NAME·===·'codeship')·{\n\t\t\treturn·1;\n\t\t}\n\n\t\treturn·min;\n\t}\n\n\tif·('TEAMCITY_VERSION'·in·env)·{\n\t\treturn·/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION)·?·1·:·0;\n\t}\n\n\tif·(env.COLORTERM·===·'truecolor')·{\n\t\treturn·3;\n\t}\n\n\tif·(env.TERM·===·'xterm-kitty')·{\n\t\treturn·3;\n\t}\n\n\tif·(env.TERM·===·'xterm-ghostty')·{\n\t\treturn·3;\n\t}\n\n\tif·(env.TERM·===·'wezterm')·{\n\t\treturn·3;\n\t}\n\n\tif·('TERM_PROGRAM'·in·env)·{\n\t\tconst·version·=·Number.parseInt((env.TERM_PROGRAM_VERSION·||·'').split('.')[0],·10);\n\n\t\tswitch·(env.TERM_PROGRAM)·{\n\t\t\tcase·'iTerm.app':·{\n\t\t\t\treturn·version·>=·3·?·3·:·2;\n\t\t\t}\n\n\t\t\tcase·'Apple_Terminal':·{\n\t\t\t\treturn·2;\n\t\t\t}\n\t\t\t//·No·default\n\t\t}\n\t}\n\n\tif·(/-256(color)?$/i.test(env.TERM))·{\n\t\treturn·2;\n\t}\n\n\tif·(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM))·{\n\t\treturn·1;\n\t}\n\n\tif·('COLORTERM'·in·env)·{\n\t\treturn·1;\n\t}\n\n\treturn·min;\n}\n\nfunction·createSupportsColor(stream,·options·=·{})·{\n\tconst·level·=·_supportsColor(stream,·{\n\t\tstreamIsTTY:·stream·&&·stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn·translateLevel(level);\n}\n\nconst·supportsColor·=·{\n\tstdout:·createSupportsColor({isTTY:·tty__default.default.isatty(1)}),\n\tstderr:·createSupportsColor({isTTY:·tty__default.default.isatty(2)}),\n};\n\nexports.createSupportsColor·=·createSupportsColor;\nexports.default·=·supportsColor;\n", | |
| 233 | ········"/**\n·*·Module·dependencies.\n·*/\n\nconst·tty·=·require('tty');\nconst·util·=·require('util');\n\n/**\n·*·This·is·the·Node.js·implementation·of·`debug()`.\n·*/\n\nexports.init·=·init;\nexports.log·=·log;\nexports.formatArgs·=·formatArgs;\nexports.save·=·save;\nexports.load·=·load;\nexports.useColors·=·useColors;\nexports.destroy·=·util.deprecate(\n\t()·=>·{},\n\t'Instance·method·`debug.destroy()`·is·deprecated·and·no·longer·does·anything.·It·will·be·removed·in·the·next·major·version·of·`debug`.'\n);\n\n/**\n·*·Colors.\n·*/\n\nexports.colors·=·[6,·2,·3,·4,·5,·1];\n\ntry·{\n\t//·Optional·dependency·(as·in,·doesn't·need·to·be·installed,·NOT·like·optionalDependencies·in·package.json)\n\t//·eslint-disable-next-line·import/no-extraneous-dependencies\n\tconst·supportsColor·=·require('supports-color');\n\n\tif·(supportsColor·&&·(supportsColor.stderr·||·supportsColor).level·>=·2)·{\n\t\texports.colors·=·[\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n}·catch·(error)·{\n\t//·Swallow·-·we·only·care·if·`supports-color`·is·available;·it·doesn't·have·to·be.\n}\n\n/**\n·*·Build·up·the·default·`inspectOpts`·object·from·the·environment·variables.\n·*\n·*···$·DEBUG_COLORS=no·DEBUG_DEPTH=10·DEBUG_SHOW_HIDDEN=enabled·node·script.js\n·*/\n\nexports.inspectOpts·=·Object.keys(process.env).filter(key·=>·{\n\treturn·/^debug_/i.test(key);\n}).reduce((obj,·key)·=>·{\n\t//·Camel-case\n\tconst·prop·=·key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g,·(_,·k)·=>·{\n\t\t\treturn·k.toUpperCase();\n\t\t});\n\n\t//·Coerce·string·value·into·JS·value\n\tlet·val·=·process.env[key];\n\tif·(/^(yes|on|true|enabled)$/i.test(val))·{\n\t\tval·=·true;\n\t}·else·if·(/^(no|off|false|disabled)$/i.test(val))·{\n\t\tval·=·false;\n\t}·else·if·(val·===·'null')·{\n\t\tval·=·null;\n\t}·else·{\n\t\tval·=·Number(val);\n\t}\n\n\tobj[prop]·=·val;\n\treturn·obj;\n},·{});\n\n/**\n·*·Is·stdout·a·TTY?·Colored·output·is·enabled·when·`true`.\n·*/\n\nfunction·useColors()·{\n\treturn·'colors'·in·exports.inspectOpts·?\n\t\tBoolean(exports.inspectOpts.colors)·:\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n·*·Adds·ANSI·color·escape·codes·if·enabled.\n·*\n·*·@api·public\n·*/\n\nfunction·formatArgs(args)·{\n\tconst·{namespace:·name,·useColors}·=·this;\n\n\tif·(useColors)·{\n\t\tconst·c·=·this.color;\n\t\tconst·colorCode·=·'\\u001B[3'·+·(c·<·8·?·c·:·'8;5;'·+·c);\n\t\tconst·prefix·=·`··${colorCode};1m${name}·\\u001B[0m`;\n\n\t\targs[0]·=·prefix·+·args[0].split('\\n').join('\\n'·+·prefix);\n\t\targs.push(colorCode·+·'m+'·+·module.exports.humanize(this.diff)·+·'\\u001B[0m');\n\t}·else·{\n\t\targs[0]·=·getDate()·+·name·+·'·'·+·args[0];\n\t}\n}\n\nfunction·getDate()·{\n\tif·(exports.inspectOpts.hideDate)·{\n\t\treturn·'';\n\t}\n\treturn·new·Date().toISOString()·+·'·';\n}\n\n/**\n·*·Invokes·`util.formatWithOptions()`·with·the·specified·arguments·and·writes·to·stderr.\n·*/\n\nfunction·log(...args)·{\n\treturn·process.stderr.write(util.formatWithOptions(exports.inspectOpts,·...args)·+·'\\n');\n}\n\n/**\n·*·Save·`namespaces`.\n·*\n·*·@param·{String}·namespaces\n·*·@api·private\n·*/\nfunction·save(namespaces)·{\n\tif·(namespaces)·{\n\t\tprocess.env.DEBUG·=·namespaces;\n\t}·else·{\n\t\t//·If·you·set·a·process.env·field·to·null·or·undefined,·it·gets·cast·to·the\n\t\t//·string·'null'·or·'undefined'.·Just·delete·instead.\n\t\tdelete·process.env.DEBUG;\n\t}\n}\n\n/**\n·*·Load·`namespaces`.\n·*\n·*·@return·{String}·returns·the·previously·persisted·debug·modes\n·*·@api·private\n·*/\n\nfunction·load()·{\n\treturn·process.env.DEBUG;\n}\n\n/**\n·*·Init·logic·for·`debug`·instances.\n·*\n·*·Create·a·new·`inspectOpts`·object·in·case·`useColors`·is·set\n·*·differently·for·a·particular·`debug`·instance.\n·*/\n\nfunction·init(debug)·{\n\tdebug.inspectOpts·=·{};\n\n\tconst·keys·=·Object.keys(exports.inspectOpts);\n\tfor·(let·i·=·0;·i·<·keys.length;·i++)·{\n\t\tdebug.inspectOpts[keys[i]]·=·exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports·=·require('./common')(exports);\n\nconst·{formatters}·=·module.exports;\n\n/**\n·*·Map·%o·to·`util.inspect()`,·all·on·a·single·line.\n·*/\n\nformatters.o·=·function·(v)·{\n\tthis.inspectOpts.colors·=·this.useColors;\n\treturn·util.inspect(v,·this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str·=>·str.trim())\n\t\t.join('·');\n};\n\n/**\n·*·Map·%O·to·`util.inspect()`,·allowing·multiple·lines·if·needed.\n·*/\n\nformatters.O·=·function·(v)·{\n\tthis.inspectOpts.colors·=·this.useColors;\n\treturn·util.inspect(v,·this.inspectOpts);\n};\n", | |
| 234 | ········"/**\n·*·Detect·Electron·renderer·/·nwjs·process,·which·is·node,·but·we·should\n·*·treat·as·a·browser.\n·*/\n\nif·(typeof·process·===·'undefined'·||·process.type·===·'renderer'·||·process.browser·===·true·||·process.__nwjs)·{\n\tmodule.exports·=·require('./browser.js');\n}·else·{\n\tmodule.exports·=·require('./node.js');\n}\n", | |
| 235 | ········"var·debug;\n\nmodule.exports·=·function·()·{\n··if·(!debug)·{\n····try·{\n······/*·eslint·global-require:·off·*/\n······debug·=·require(\"debug\")(\"follow-redirects\");\n····}\n····catch·(error)·{·/*·*/·}\n····if·(typeof·debug·!==·\"function\")·{\n······debug·=·function·()·{·/*·*/·};\n····}\n··}\n··debug.apply(null,·arguments);\n};\n", | |
| 236 | ········"var·url·=·require(\"url\");\nvar·URL·=·url.URL;\nvar·http·=·require(\"http\");\nvar·https·=·require(\"https\");\nvar·Writable·=·require(\"stream\").Writable;\nvar·assert·=·require(\"assert\");\nvar·debug·=·require(\"./debug\");\n\n//·Preventive·platform·detection\n//·istanbul·ignore·next\n(function·detectUnsupportedEnvironment()·{\n··var·looksLikeNode·=·typeof·process·!==·\"undefined\";\n··var·looksLikeBrowser·=·typeof·window·!==·\"undefined\"·&&·typeof·document·!==·\"undefined\";\n··var·looksLikeV8·=·isFunction(Error.captureStackTrace);\n··if·(!looksLikeNode·&&·(looksLikeBrowser·||·!looksLikeV8))·{\n····console.warn(\"The·follow-redirects·package·should·be·excluded·from·browser·builds.\");\n··}\n}());\n\n//·Whether·to·use·the·native·URL·object·or·the·legacy·url·module\nvar·useNativeURL·=·false;\ntry·{\n··assert(new·URL(\"\"));\n}\ncatch·(error)·{\n··useNativeURL·=·error.code·===·\"ERR_INVALID_URL\";\n}\n\n//·URL·fields·to·preserve·in·copy·operations\nvar·preservedUrlFields·=·[\n··\"auth\",\n··\"host\",\n··\"hostname\",\n··\"href\",\n··\"path\",\n··\"pathname\",\n··\"port\",\n··\"protocol\",\n··\"query\",\n··\"search\",\n··\"hash\",\n];\n\n//·Create·handlers·that·pass·events·from·native·requests\nvar·events·=·[\"abort\",·\"aborted\",·\"connect\",·\"error\",·\"socket\",·\"timeout\"];\nvar·eventHandlers·=·Object.create(null);\nevents.forEach(function·(event)·{\n··eventHandlers[event]·=·function·(arg1,·arg2,·arg3)·{\n····this._redirectable.emit(event,·arg1,·arg2,·arg3);\n··};\n});\n\n//·Error·types·with·codes\nvar·InvalidUrlError·=·createErrorType(\n··\"ERR_INVALID_URL\",\n··\"Invalid·URL\",\n··TypeError\n);\nvar·RedirectionError·=·createErrorType(\n··\"ERR_FR_REDIRECTION_FAILURE\",\n··\"Redirected·request·failed\"\n);\nvar·TooManyRedirectsError·=·createErrorType(\n··\"ERR_FR_TOO_MANY_REDIRECTS\",\n··\"Maximum·number·of·redirects·exceeded\",\n··RedirectionError\n);\nvar·MaxBodyLengthExceededError·=·createErrorType(\n··\"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n··\"Request·body·larger·than·maxBodyLength·limit\"\n);\nvar·WriteAfterEndError·=·createErrorType(\n··\"ERR_STREAM_WRITE_AFTER_END\",\n··\"write·after·end\"\n);\n\n//·istanbul·ignore·next\nvar·destroy·=·Writable.prototype.destroy·||·noop;\n\n//·An·HTTP(S)·request·that·can·be·redirected\nfunction·RedirectableRequest(options,·responseCallback)·{\n··//·Initialize·the·request\n··Writable.call(this);\n··this._sanitizeOptions(options);\n··this._options·=·options;\n··this._ended·=·false;\n··this._ending·=·false;\n··this._redirectCount·=·0;\n··this._redirects·=·[];\n··this._requestBodyLength·=·0;\n··this._requestBodyBuffers·=·[];\n\n··//·Attach·a·callback·if·passed\n··if·(responseCallback)·{\n····this.on(\"response\",·responseCallback);\n··}\n\n··//·React·to·responses·of·native·requests\n··var·self·=·this;\n··this._onNativeResponse·=·function·(response)·{\n····try·{\n······self._processResponse(response);\n····}\n····catch·(cause)·{\n······self.emit(\"error\",·cause·instanceof·RedirectionError·?\n········cause·:·new·RedirectionError({·cause:·cause·}));\n····}\n··};\n\n··//·Perform·the·first·request\n··this._performRequest();\n}\nRedirectableRequest.prototype·=·Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort·=·function·()·{\n··destroyRequest(this._currentRequest);\n··this._currentRequest.abort();\n··this.emit(\"abort\");\n};\n\nRedirectableRequest.prototype.destroy·=·function·(error)·{\n··destroyRequest(this._currentRequest,·error);\n··destroy.call(this,·error);\n··return·this;\n};\n\n//·Writes·buffered·data·to·the·current·native·request\nRedirectableRequest.prototype.write·=·function·(data,·encoding,·callback)·{\n··//·Writing·is·not·allowed·if·end·has·been·called\n··if·(this._ending)·{\n····throw·new·WriteAfterEndError();\n··}\n\n··//·Validate·input·and·shift·parameters·if·necessary\n··if·(!isString(data)·&&·!isBuffer(data))·{\n····throw·new·TypeError(\"data·should·be·a·string,·Buffer·or·Uint8Array\");\n··}\n··if·(isFunction(encoding))·{\n····callback·=·encoding;\n····encoding·=·null;\n··}\n\n··//·Ignore·empty·buffers,·since·writing·them·doesn't·invoke·the·callback\n··//·https://github.com/nodejs/node/issues/22066\n··if·(data.length·===·0)·{\n····if·(callback)·{\n······callback();\n····}\n····return;\n··}\n··//·Only·write·when·we·don't·exceed·the·maximum·body·length\n··if·(this._requestBodyLength·+·data.length·<=·this._options.maxBodyLength)·{\n····this._requestBodyLength·+=·data.length;\n····this._requestBodyBuffers.push({·data:·data,·encoding:·encoding·});\n····this._currentRequest.write(data,·encoding,·callback);\n··}\n··//·Error·when·we·exceed·the·maximum·body·length\n··else·{\n····this.emit(\"error\",·new·MaxBodyLengthExceededError());\n····this.abort();\n··}\n};\n\n//·Ends·the·current·native·request\nRedirectableRequest.prototype.end·=·function·(data,·encoding,·callback)·{\n··//·Shift·parameters·if·necessary\n··if·(isFunction(data))·{\n····callback·=·data;\n····data·=·encoding·=·null;\n··}\n··else·if·(isFunction(encoding))·{\n····callback·=·encoding;\n····encoding·=·null;\n··}\n\n··//·Write·data·if·needed·and·end\n··if·(!data)·{\n····this._ended·=·this._ending·=·true;\n····this._currentRequest.end(null,·null,·callback);\n··}\n··else·{\n····var·self·=·this;\n····var·currentRequest·=·this._currentRequest;\n····this.write(data,·encoding,·function·()·{\n······self._ended·=·true;\n······currentRequest.end(null,·null,·callback);\n····});\n····this._ending·=·true;\n··}\n};\n\n//·Sets·a·header·value·on·the·current·native·request\nRedirectableRequest.prototype.setHeader·=·function·(name,·value)·{\n··this._options.headers[name]·=·value;\n··this._currentRequest.setHeader(name,·value);\n};\n\n//·Clears·a·header·value·on·the·current·native·request\nRedirectableRequest.prototype.removeHeader·=·function·(name)·{\n··delete·this._options.headers[name];\n··this._currentRequest.removeHeader(name);\n};\n\n//·Global·timeout·for·all·underlying·requests\nRedirectableRequest.prototype.setTimeout·=·function·(msecs,·callback)·{\n··var·self·=·this;\n\n··//·Destroys·the·socket·on·timeout\n··function·destroyOnTimeout(socket)·{\n····socket.setTimeout(msecs);\n····socket.removeListener(\"timeout\",·socket.destroy);\n····socket.addListener(\"timeout\",·socket.destroy);\n··}\n\n··//·Sets·up·a·timer·to·trigger·a·timeout·event\n··function·startTimer(socket)·{\n····if·(self._timeout)·{\n······clearTimeout(self._timeout);\n····}\n····self._timeout·=·setTimeout(function·()·{\n······self.emit(\"timeout\");\n······clearTimer();\n····},·msecs);\n····destroyOnTimeout(socket);\n··}\n\n··//·Stops·a·timeout·from·triggering\n··function·clearTimer()·{\n····//·Clear·the·timeout\n····if·(self._timeout)·{\n······clearTimeout(self._timeout);\n······self._timeout·=·null;\n····}\n\n····//·Clean·up·all·attached·listeners\n····self.removeListener(\"abort\",·clearTimer);\n····self.removeListener(\"error\",·clearTimer);\n····self.removeListener(\"response\",·clearTimer);\n····self.removeListener(\"close\",·clearTimer);\n····if·(callback)·{\n······self.removeListener(\"timeout\",·callback);\n····}\n····if·(!self.socket)·{\n······self._currentRequest.removeListener(\"socket\",·startTimer);\n····}\n··}\n\n··//·Attach·callback·if·passed\n··if·(callback)·{\n····this.on(\"timeout\",·callback);\n··}\n\n··//·Start·the·timer·if·or·when·the·socket·is·opened\n··if·(this.socket)·{\n····startTimer(this.socket);\n··}\n··else·{\n····this._currentRequest.once(\"socket\",·startTimer);\n··}\n\n··//·Clean·up·on·events\n··this.on(\"socket\",·destroyOnTimeout);\n··this.on(\"abort\",·clearTimer);\n··this.on(\"error\",·clearTimer);\n··this.on(\"response\",·clearTimer);\n··this.on(\"close\",·clearTimer);\n\n··return·this;\n};\n\n//·Proxy·all·other·public·ClientRequest·methods\n[\n··\"flushHeaders\",·\"getHeader\",\n··\"setNoDelay\",·\"setSocketKeepAlive\",\n].forEach(function·(method)·{\n··RedirectableRequest.prototype[method]·=·function·(a,·b)·{\n····return·this._currentRequest[method](a,·b);\n··};\n});\n\n//·Proxy·all·public·ClientRequest·properties\n[\"aborted\",·\"connection\",·\"socket\"].forEach(function·(property)·{\n··Object.defineProperty(RedirectableRequest.prototype,·property,·{\n····get:·function·()·{·return·this._currentRequest[property];·},\n··});\n});\n\nRedirectableRequest.prototype._sanitizeOptions·=·function·(options)·{\n··//·Ensure·headers·are·always·present\n··if·(!options.headers)·{\n····options.headers·=·{};\n··}\n\n··//·Since·http.request·treats·host·as·an·alias·of·hostname,\n··//·but·the·url·module·interprets·host·as·hostname·plus·port,\n··//·eliminate·the·host·property·to·avoid·confusion.\n··if·(options.host)·{\n····//·Use·hostname·if·set,·because·it·has·precedence\n····if·(!options.hostname)·{\n······options.hostname·=·options.host;\n····}\n····delete·options.host;\n··}\n\n··//·Complete·the·URL·object·when·necessary\n··if·(!options.pathname·&&·options.path)·{\n····var·searchPos·=·options.path.indexOf(\"?\");\n····if·(searchPos·<·0)·{\n······options.pathname·=·options.path;\n····}\n····else·{\n······options.pathname·=·options.path.substring(0,·searchPos);\n······options.search·=·options.path.substring(searchPos);\n····}\n··}\n};\n\n\n//·Executes·the·next·native·request·(initial·or·redirect)\nRedirectableRequest.prototype._performRequest·=·function·()·{\n··//·Load·the·native·protocol\n··var·protocol·=·this._options.protocol;\n··var·nativeProtocol·=·this._options.nativeProtocols[protocol];\n··if·(!nativeProtocol)·{\n····throw·new·TypeError(\"Unsupported·protocol·\"·+·protocol);\n··}\n\n··//·If·specified,·use·the·agent·corresponding·to·the·protocol\n··//·(HTTP·and·HTTPS·use·different·types·of·agents)\n··if·(this._options.agents)·{\n····var·scheme·=·protocol.slice(0,·-1);\n····this._options.agent·=·this._options.agents[scheme];\n··}\n\n··//·Create·the·native·request·and·set·up·its·event·handlers\n··var·request·=·this._currentRequest·=\n········nativeProtocol.request(this._options,·this._onNativeResponse);\n··request._redirectable·=·this;\n··for·(var·event·of·events)·{\n····request.on(event,·eventHandlers[event]);\n··}\n\n··//·RFC7230\u00a75.3.1:·When·making·a·request·directly·to·an·origin·server,·[\u2026]\n··//·a·client·MUST·send·only·the·absolute·path·[\u2026]·as·the·request-target.\n··this._currentUrl·=·/^\\//.test(this._options.path)·?\n····url.format(this._options)·:\n····//·When·making·a·request·to·a·proxy,·[\u2026]\n····//·a·client·MUST·send·the·target·URI·in·absolute-form·[\u2026].\n····this._options.path;\n\n··//·End·a·redirected·request\n··//·(The·first·request·must·be·ended·explicitly·with·RedirectableRequest#end)\n··if·(this._isRedirect)·{\n····//·Write·the·request·entity·and·end\n····var·i·=·0;\n····var·self·=·this;\n····var·buffers·=·this._requestBodyBuffers;\n····(function·writeNext(error)·{\n······//·Only·write·if·this·request·has·not·been·redirected·yet\n······//·istanbul·ignore·else\n······if·(request·===·self._currentRequest)·{\n········//·Report·any·write·errors\n········//·istanbul·ignore·if\n········if·(error)·{\n··········self.emit(\"error\",·error);\n········}\n········//·Write·the·next·buffer·if·there·are·still·left\n········else·if·(i·<·buffers.length)·{\n··········var·buffer·=·buffers[i++];\n··········//·istanbul·ignore·else\n··········if·(!request.finished)·{\n············request.write(buffer.data,·buffer.encoding,·writeNext);\n··········}\n········}\n········//·End·the·request·if·`end`·has·been·called·on·us\n········else·if·(self._ended)·{\n··········request.end();\n········}\n······}\n····}());\n··}\n};\n\n//·Processes·a·response·from·the·current·native·request\nRedirectableRequest.prototype._processResponse·=·function·(response)·{\n··//·Store·the·redirected·response\n··var·statusCode·=·response.statusCode;\n··if·(this._options.trackRedirects)·{\n····this._redirects.push({\n······url:·this._currentUrl,\n······headers:·response.headers,\n······statusCode:·statusCode,\n····});\n··}\n\n··//·RFC7231\u00a76.4:·The·3xx·(Redirection)·class·of·status·code·indicates\n··//·that·further·action·needs·to·be·taken·by·the·user·agent·in·order·to\n··//·fulfill·the·request.·If·a·Location·header·field·is·provided,\n··//·the·user·agent·MAY·automatically·redirect·its·request·to·the·URI\n··//·referenced·by·the·Location·field·value,\n··//·even·if·the·specific·status·code·is·not·understood.\n\n··//·If·the·response·is·not·a·redirect;·return·it·as-is\n··var·location·=·response.headers.location;\n··if·(!location·||·this._options.followRedirects·===·false·||\n······statusCode·<·300·||·statusCode·>=·400)·{\n····response.responseUrl·=·this._currentUrl;\n····response.redirects·=·this._redirects;\n····this.emit(\"response\",·response);\n\n····//·Clean·up\n····this._requestBodyBuffers·=·[];\n····return;\n··}\n\n··//·The·response·is·a·redirect,·so·abort·the·current·request\n··destroyRequest(this._currentRequest);\n··//·Discard·the·remainder·of·the·response·to·avoid·waiting·for·data\n··response.destroy();\n\n··//·RFC7231\u00a76.4:·A·client·SHOULD·detect·and·intervene\n··//·in·cyclical·redirections·(i.e.,·\"infinite\"·redirection·loops).\n··if·(++this._redirectCount·>·this._options.maxRedirects)·{\n····throw·new·TooManyRedirectsError();\n··}\n\n··//·Store·the·request·headers·if·applicable\n··var·requestHeaders;\n··var·beforeRedirect·=·this._options.beforeRedirect;\n··if·(beforeRedirect)·{\n····requestHeaders·=·Object.assign({\n······//·The·Host·header·was·set·by·nativeProtocol.request\n······Host:·response.req.getHeader(\"host\"),\n····},·this._options.headers);\n··}\n\n··//·RFC7231\u00a76.4:·Automatic·redirection·needs·to·done·with\n··//·care·for·methods·not·known·to·be·safe,·[\u2026]\n··//·RFC7231\u00a76.4.2\u20133:·For·historical·reasons,·a·user·agent·MAY·change\n··//·the·request·method·from·POST·to·GET·for·the·subsequent·request.\n··var·method·=·this._options.method;\n··if·((statusCode·===·301·||·statusCode·===·302)·&&·this._options.method·===·\"POST\"·||\n······//·RFC7231\u00a76.4.4:·The·303·(See·Other)·status·code·indicates·that\n······//·the·server·is·redirecting·the·user·agent·to·a·different·resource·[\u2026]\n······//·A·user·agent·can·perform·a·retrieval·request·targeting·that·URI\n······//·(a·GET·or·HEAD·request·if·using·HTTP)·[\u2026]\n······(statusCode·===·303)·&&·!/^(?:GET|HEAD)$/.test(this._options.method))·{\n····this._options.method·=·\"GET\";\n····//·Drop·a·possible·entity·and·headers·related·to·it\n····this._requestBodyBuffers·=·[];\n····removeMatchingHeaders(/^content-/i,·this._options.headers);\n··}\n\n··//·Drop·the·Host·header,·as·the·redirect·might·lead·to·a·different·host\n··var·currentHostHeader·=·removeMatchingHeaders(/^host$/i,·this._options.headers);\n\n··//·If·the·redirect·is·relative,·carry·over·the·host·of·the·last·request\n··var·currentUrlParts·=·parseUrl(this._currentUrl);\n··var·currentHost·=·currentHostHeader·||·currentUrlParts.host;\n··var·currentUrl·=·/^\\w+:/.test(location)·?·this._currentUrl·:\n····url.format(Object.assign(currentUrlParts,·{·host:·currentHost·}));\n\n··//·Create·the·redirected·request\n··var·redirectUrl·=·resolveUrl(location,·currentUrl);\n··debug(\"redirecting·to\",·redirectUrl.href);\n··this._isRedirect·=·true;\n··spreadUrlObject(redirectUrl,·this._options);\n\n··//·Drop·confidential·headers·when·redirecting·to·a·less·secure·protocol\n··//·or·to·a·different·domain·that·is·not·a·superdomain\n··if·(redirectUrl.protocol·!==·currentUrlParts.protocol·&&\n·····redirectUrl.protocol·!==·\"https:\"·||\n·····redirectUrl.host·!==·currentHost·&&\n·····!isSubdomain(redirectUrl.host,·currentHost))·{\n····removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i,·this._options.headers);\n··}\n\n··//·Evaluate·the·beforeRedirect·callback\n··if·(isFunction(beforeRedirect))·{\n····var·responseDetails·=·{\n······headers:·response.headers,\n······statusCode:·statusCode,\n····};\n····var·requestDetails·=·{\n······url:·currentUrl,\n······method:·method,\n······headers:·requestHeaders,\n····};\n····beforeRedirect(this._options,·responseDetails,·requestDetails);\n····this._sanitizeOptions(this._options);\n··}\n\n··//·Perform·the·redirected·request\n··this._performRequest();\n};\n\n//·Wraps·the·key/value·object·of·protocols·with·redirect·functionality\nfunction·wrap(protocols)·{\n··//·Default·settings\n··var·exports·=·{\n····maxRedirects:·21,\n····maxBodyLength:·10·*·1024·*·1024,\n··};\n\n··//·Wrap·each·protocol\n··var·nativeProtocols·=·{};\n··Object.keys(protocols).forEach(function·(scheme)·{\n····var·protocol·=·scheme·+·\":\";\n····var·nativeProtocol·=·nativeProtocols[protocol]·=·protocols[scheme];\n····var·wrappedProtocol·=·exports[scheme]·=·Object.create(nativeProtocol);\n\n····//·Executes·a·request,·following·redirects\n····function·request(input,·options,·callback)·{\n······//·Parse·parameters,·ensuring·that·input·is·an·object\n······if·(isURL(input))·{\n········input·=·spreadUrlObject(input);\n······}\n······else·if·(isString(input))·{\n········input·=·spreadUrlObject(parseUrl(input));\n······}\n······else·{\n········callback·=·options;\n········options·=·validateUrl(input);\n········input·=·{·protocol:·protocol·};\n······}\n······if·(isFunction(options))·{\n········callback·=·options;\n········options·=·null;\n······}\n\n······//·Set·defaults\n······options·=·Object.assign({\n········maxRedirects:·exports.maxRedirects,\n········maxBodyLength:·exports.maxBodyLength,\n······},·input,·options);\n······options.nativeProtocols·=·nativeProtocols;\n······if·(!isString(options.host)·&&·!isString(options.hostname))·{\n········options.hostname·=·\"::1\";\n······}\n\n······assert.equal(options.protocol,·protocol,·\"protocol·mismatch\");\n······debug(\"options\",·options);\n······return·new·RedirectableRequest(options,·callback);\n····}\n\n····//·Executes·a·GET·request,·following·redirects\n····function·get(input,·options,·callback)·{\n······var·wrappedRequest·=·wrappedProtocol.request(input,·options,·callback);\n······wrappedRequest.end();\n······return·wrappedRequest;\n····}\n\n····//·Expose·the·properties·on·the·wrapped·protocol\n····Object.defineProperties(wrappedProtocol,·{\n······request:·{·value:·request,·configurable:·true,·enumerable:·true,·writable:·true·},\n······get:·{·value:·get,·configurable:·true,·enumerable:·true,·writable:·true·},\n····});\n··});\n··return·exports;\n}\n\nfunction·noop()·{·/*·empty·*/·}\n\nfunction·parseUrl(input)·{\n··var·parsed;\n··//·istanbul·ignore·else\n··if·(useNativeURL)·{\n····parsed·=·new·URL(input);\n··}\n··else·{\n····//·Ensure·the·URL·is·valid·and·absolute\n····parsed·=·validateUrl(url.parse(input));\n····if·(!isString(parsed.protocol))·{\n······throw·new·InvalidUrlError({·input·});\n····}\n··}\n··return·parsed;\n}\n\nfunction·resolveUrl(relative,·base)·{\n··//·istanbul·ignore·next\n··return·useNativeURL·?·new·URL(relative,·base)·:·parseUrl(url.resolve(base,·relative));\n}\n\nfunction·validateUrl(input)·{\n··if·(/^\\[/.test(input.hostname)·&&·!/^\\[[:0-9a-f]+\\]$/i.test(input.hostname))·{\n····throw·new·InvalidUrlError({·input:·input.href·||·input·});\n··}\n··if·(/^\\[/.test(input.host)·&&·!/^\\[[:0-9a-f]+\\](:\\d+)?$/i.test(input.host))·{\n····throw·new·InvalidUrlError({·input:·input.href·||·input·});\n··}\n··return·input;\n}\n\nfunction·spreadUrlObject(urlObject,·target)·{\n··var·spread·=·target·||·{};\n··for·(var·key·of·preservedUrlFields)·{\n····spread[key]·=·urlObject[key];\n··}\n\n··//·Fix·IPv6·hostname\n··if·(spread.hostname.startsWith(\"[\"))·{\n····spread.hostname·=·spread.hostname.slice(1,·-1);\n··}\n··//·Ensure·port·is·a·number\n··if·(spread.port·!==·\"\")·{\n····spread.port·=·Number(spread.port);\n··}\n··//·Concatenate·path\n··spread.path·=·spread.search·?·spread.pathname·+·spread.search·:·spread.pathname;\n\n··return·spread;\n}\n\nfunction·removeMatchingHeaders(regex,·headers)·{\n··var·lastValue;\n··for·(var·header·in·headers)·{\n····if·(regex.test(header))·{\n······lastValue·=·headers[header];\n······delete·headers[header];\n····}\n··}\n··return·(lastValue·===·null·||·typeof·lastValue·===·\"undefined\")·?\n····undefined·:·String(lastValue).trim();\n}\n\nfunction·createErrorType(code,·message,·baseClass)·{\n··//·Create·constructor\n··function·CustomError(properties)·{\n····//·istanbul·ignore·else\n····if·(isFunction(Error.captureStackTrace))·{\n······Error.captureStackTrace(this,·this.constructor);\n····}\n····Object.assign(this,·properties·||·{});\n····this.code·=·code;\n····this.message·=·this.cause·?·message·+·\":·\"·+·this.cause.message·:·message;\n··}\n\n··//·Attach·constructor·and·set·default·properties\n··CustomError.prototype·=·new·(baseClass·||·Error)();\n··Object.defineProperties(CustomError.prototype,·{\n····constructor:·{\n······value:·CustomError,\n······enumerable:·false,\n····},\n····name:·{\n······value:·\"Error·[\"·+·code·+·\"]\",\n······enumerable:·false,\n····},\n··});\n··return·CustomError;\n}\n\nfunction·destroyRequest(request,·error)·{\n··for·(var·event·of·events)·{\n····request.removeListener(event,·eventHandlers[event]);\n··}\n··request.on(\"error\",·noop);\n··request.destroy(error);\n}\n\nfunction·isSubdomain(subdomain,·domain)·{\n··assert(isString(subdomain)·&&·isString(domain));\n··var·dot·=·subdomain.length·-·domain.length·-·1;\n··return·dot·>·0·&&·subdomain[dot]·===·\".\"·&&·subdomain.endsWith(domain);\n}\n\nfunction·isString(value)·{\n··return·typeof·value·===·\"string\"·||·value·instanceof·String;\n}\n\nfunction·isFunction(value)·{\n··return·typeof·value·===·\"function\";\n}\n\nfunction·isBuffer(value)·{\n··return·typeof·value·===·\"object\"·&&·(\"length\"·in·value);\n}\n\nfunction·isURL(value)·{\n··return·URL·&&·value·instanceof·URL;\n}\n\n//·Exports\nmodule.exports·=·wrap({·http:·http,·https:·https·});\nmodule.exports.wrap·=·wrap;\n", | |
| 237 | ········"export·const·VERSION·=·\"1.13.2\";", | 205 | ········"export·const·VERSION·=·\"1.13.2\";", |
| 238 | ········"'use·strict';\n\nexport·default·function·parseProtocol(url)·{\n··const·match·=·/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n··return·match·&&·match[1]·||·'';\n}\n", | 206 | ········"'use·strict';\n\nexport·default·function·parseProtocol(url)·{\n··const·match·=·/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n··return·match·&&·match[1]·||·'';\n}\n", |
| 239 | ········"'use·strict';\n\nimport·AxiosError·from·'../core/AxiosError.js';\nimport·parseProtocol·from·'./parseProtocol.js';\nimport·platform·from·'../platform/index.js';\n\nconst·DATA_URL_PATTERN·=·/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n·*·Parse·data·uri·to·a·Buffer·or·Blob\n·*\n·*·@param·{String}·uri\n·*·@param·{?Boolean}·asBlob\n·*·@param·{?Object}·options\n·*·@param·{?Function}·options.Blob\n·*\n·*·@returns·{Buffer|Blob}\n·*/\nexport·default·function·fromDataURI(uri,·asBlob,·options)·{\n··const·_Blob·=·options·&&·options.Blob·||·platform.classes.Blob;\n··const·protocol·=·parseProtocol(uri);\n\n··if·(asBlob·===·undefined·&&·_Blob)·{\n····asBlob·=·true;\n··}\n\n··if·(protocol·===·'data')·{\n····uri·=·protocol.length·?·uri.slice(protocol.length·+·1)·:·uri;\n\n····const·match·=·DATA_URL_PATTERN.exec(uri);\n\n····if·(!match)·{\n······throw·new·AxiosError('Invalid·URL',·AxiosError.ERR_INVALID_URL);\n····}\n\n····const·mime·=·match[1];\n····const·isBase64·=·match[2];\n····const·body·=·match[3];\n····const·buffer·=·Buffer.from(decodeURIComponent(body),·isBase64·?·'base64'·:·'utf8');\n\n····if·(asBlob)·{\n······if·(!_Blob)·{\n········throw·new·AxiosError('Blob·is·not·supported',·AxiosError.ERR_NOT_SUPPORT);\n······}\n\n······return·new·_Blob([buffer],·{type:·mime});\n····}\n\n····return·buffer;\n··}\n\n··throw·new·AxiosError('Unsupported·protocol·'·+·protocol,·AxiosError.ERR_NOT_SUPPORT);\n}\n", | 207 | ········"'use·strict';\n\nimport·AxiosError·from·'../core/AxiosError.js';\nimport·parseProtocol·from·'./parseProtocol.js';\nimport·platform·from·'../platform/index.js';\n\nconst·DATA_URL_PATTERN·=·/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n·*·Parse·data·uri·to·a·Buffer·or·Blob\n·*\n·*·@param·{String}·uri\n·*·@param·{?Boolean}·asBlob\n·*·@param·{?Object}·options\n·*·@param·{?Function}·options.Blob\n·*\n·*·@returns·{Buffer|Blob}\n·*/\nexport·default·function·fromDataURI(uri,·asBlob,·options)·{\n··const·_Blob·=·options·&&·options.Blob·||·platform.classes.Blob;\n··const·protocol·=·parseProtocol(uri);\n\n··if·(asBlob·===·undefined·&&·_Blob)·{\n····asBlob·=·true;\n··}\n\n··if·(protocol·===·'data')·{\n····uri·=·protocol.length·?·uri.slice(protocol.length·+·1)·:·uri;\n\n····const·match·=·DATA_URL_PATTERN.exec(uri);\n\n····if·(!match)·{\n······throw·new·AxiosError('Invalid·URL',·AxiosError.ERR_INVALID_URL);\n····}\n\n····const·mime·=·match[1];\n····const·isBase64·=·match[2];\n····const·body·=·match[3];\n····const·buffer·=·Buffer.from(decodeURIComponent(body),·isBase64·?·'base64'·:·'utf8');\n\n····if·(asBlob)·{\n······if·(!_Blob)·{\n········throw·new·AxiosError('Blob·is·not·supported',·AxiosError.ERR_NOT_SUPPORT);\n······}\n\n······return·new·_Blob([buffer],·{type:·mime});\n····}\n\n····return·buffer;\n··}\n\n··throw·new·AxiosError('Unsupported·protocol·'·+·protocol,·AxiosError.ERR_NOT_SUPPORT);\n}\n", |
| 240 | ········"'use·strict';\n\nimport·stream·from·'stream';\nimport·utils·from·'../utils.js';\n\nconst·kInternals·=·Symbol('internals');\n\nclass·AxiosTransformStream·extends·stream.Transform{\n··constructor(options)·{\n····options·=·utils.toFlatObject(options,·{\n······maxRate:·0,\n······chunkSize:·64·*·1024,\n······minChunkSize:·100,\n······timeWindow:·500,\n······ticksRate:·2,\n······samplesCount:·15\n····},·null,·(prop,·source)·=>·{\n······return·!utils.isUndefined(source[prop]);\n····});\n\n····super({\n······readableHighWaterMark:·options.chunkSize\n····});\n\n····const·internals·=·this[kInternals]·=·{\n······timeWindow:·options.timeWindow,\n······chunkSize:·options.chunkSize,\n······maxRate:·options.maxRate,\n······minChunkSize:·options.minChunkSize,\n······bytesSeen:·0,\n······isCaptured:·false,\n······notifiedBytesLoaded:·0,\n······ts:·Date.now(),\n······bytes:·0,\n······onReadCallback:·null\n····};\n\n····this.on('newListener',·event·=>·{\n······if·(event·===·'progress')·{\n········if·(!internals.isCaptured)·{\n··········internals.isCaptured·=·true;\n········}\n······}\n····});\n··}\n\n··_read(size)·{\n····const·internals·=·this[kInternals];\n\n····if·(internals.onReadCallback)·{\n······internals.onReadCallback();\n····}\n\n····return·super._read(size);\n··}\n\n··_transform(chunk,·encoding,·callback)·{\n····const·internals·=·this[kInternals];\n····const·maxRate·=·internals.maxRate;\n\n····const·readableHighWaterMark·=·this.readableHighWaterMark;\n\n····const·timeWindow·=·internals.timeWindow;\n\n····const·divider·=·1000·/·timeWindow;\n····const·bytesThreshold·=·(maxRate·/·divider);\n····const·minChunkSize·=·internals.minChunkSize·!==·false·?·Math.max(internals.minChunkSize,·bytesThreshold·*·0.01)·:·0;\n\n····const·pushChunk·=·(_chunk,·_callback)·=>·{\n······const·bytes·=·Buffer.byteLength(_chunk);\n······internals.bytesSeen·+=·bytes;\n······internals.bytes·+=·bytes;\n\n······internals.isCaptured·&&·this.emit('progress',·internals.bytesSeen);\n\n······if·(this.push(_chunk))·{\n········process.nextTick(_callback);\n······}·else·{\n········internals.onReadCallback·=·()·=>·{\n··········internals.onReadCallback·=·null;\n··········process.nextTick(_callback);\n········};\n······}\n····}\n\n····const·transformChunk·=·(_chunk,·_callback)·=>·{\n······const·chunkSize·=·Buffer.byteLength(_chunk);\n······let·chunkRemainder·=·null;\n······let·maxChunkSize·=·readableHighWaterMark;\n······let·bytesLeft;\n······let·passed·=·0;\n\n······if·(maxRate)·{\n········const·now·=·Date.now();\n\n········if·(!internals.ts·||·(passed·=·(now·-·internals.ts))·>=·timeWindow)·{\n··········internals.ts·=·now;\n··········bytesLeft·=·bytesThreshold·-·internals.bytes;\n··········internals.bytes·=·bytesLeft·<·0·?·-bytesLeft·:·0;\n··········passed·=·0;\n········}\n\n········bytesLeft·=·bytesThreshold·-·internals.bytes;\n······}\n\n······if·(maxRate)·{\n········if·(bytesLeft·<=·0)·{\n··········//·next·time·window\n··········return·setTimeout(()·=>·{\n············_callback(null,·_chunk);\n··········},·timeWindow·-·passed);\n········}\n\n········if·(bytesLeft·<·maxChunkSize)·{\n··········maxChunkSize·=·bytesLeft;\n········}\n······}\n\n······if·(maxChunkSize·&&·chunkSize·>·maxChunkSize·&&·(chunkSize·-·maxChunkSize)·>·minChunkSize)·{\n········chunkRemainder·=·_chunk.subarray(maxChunkSize);\n········_chunk·=·_chunk.subarray(0,·maxChunkSize);\n······}\n\n······pushChunk(_chunk,·chunkRemainder·?·()·=>·{\n········process.nextTick(_callback,·null,·chunkRemainder);\n······}·:·_callback);\n····};\n\n····transformChunk(chunk,·function·transformNextChunk(err,·_chunk)·{\n······if·(err)·{\n········return·callback(err);\n······}\n\n······if·(_chunk)·{\n········transformChunk(_chunk,·transformNextChunk);\n······}·else·{\n········callback(null);\n······}\n····});\n··}\n}\n\nexport·default·AxiosTransformStream;\n", | 208 | ········"'use·strict';\n\nimport·stream·from·'stream';\nimport·utils·from·'../utils.js';\n\nconst·kInternals·=·Symbol('internals');\n\nclass·AxiosTransformStream·extends·stream.Transform{\n··constructor(options)·{\n····options·=·utils.toFlatObject(options,·{\n······maxRate:·0,\n······chunkSize:·64·*·1024,\n······minChunkSize:·100,\n······timeWindow:·500,\n······ticksRate:·2,\n······samplesCount:·15\n····},·null,·(prop,·source)·=>·{\n······return·!utils.isUndefined(source[prop]);\n····});\n\n····super({\n······readableHighWaterMark:·options.chunkSize\n····});\n\n····const·internals·=·this[kInternals]·=·{\n······timeWindow:·options.timeWindow,\n······chunkSize:·options.chunkSize,\n······maxRate:·options.maxRate,\n······minChunkSize:·options.minChunkSize,\n······bytesSeen:·0,\n······isCaptured:·false,\n······notifiedBytesLoaded:·0,\n······ts:·Date.now(),\n······bytes:·0,\n······onReadCallback:·null\n····};\n\n····this.on('newListener',·event·=>·{\n······if·(event·===·'progress')·{\n········if·(!internals.isCaptured)·{\n··········internals.isCaptured·=·true;\n········}\n······}\n····});\n··}\n\n··_read(size)·{\n····const·internals·=·this[kInternals];\n\n····if·(internals.onReadCallback)·{\n······internals.onReadCallback();\n····}\n\n····return·super._read(size);\n··}\n\n··_transform(chunk,·encoding,·callback)·{\n····const·internals·=·this[kInternals];\n····const·maxRate·=·internals.maxRate;\n\n····const·readableHighWaterMark·=·this.readableHighWaterMark;\n\n····const·timeWindow·=·internals.timeWindow;\n\n····const·divider·=·1000·/·timeWindow;\n····const·bytesThreshold·=·(maxRate·/·divider);\n····const·minChunkSize·=·internals.minChunkSize·!==·false·?·Math.max(internals.minChunkSize,·bytesThreshold·*·0.01)·:·0;\n\n····const·pushChunk·=·(_chunk,·_callback)·=>·{\n······const·bytes·=·Buffer.byteLength(_chunk);\n······internals.bytesSeen·+=·bytes;\n······internals.bytes·+=·bytes;\n\n······internals.isCaptured·&&·this.emit('progress',·internals.bytesSeen);\n\n······if·(this.push(_chunk))·{\n········process.nextTick(_callback);\n······}·else·{\n········internals.onReadCallback·=·()·=>·{\n··········internals.onReadCallback·=·null;\n··········process.nextTick(_callback);\n········};\n······}\n····}\n\n····const·transformChunk·=·(_chunk,·_callback)·=>·{\n······const·chunkSize·=·Buffer.byteLength(_chunk);\n······let·chunkRemainder·=·null;\n······let·maxChunkSize·=·readableHighWaterMark;\n······let·bytesLeft;\n······let·passed·=·0;\n\n······if·(maxRate)·{\n········const·now·=·Date.now();\n\n········if·(!internals.ts·||·(passed·=·(now·-·internals.ts))·>=·timeWindow)·{\n··········internals.ts·=·now;\n··········bytesLeft·=·bytesThreshold·-·internals.bytes;\n··········internals.bytes·=·bytesLeft·<·0·?·-bytesLeft·:·0;\n··········passed·=·0;\n········}\n\n········bytesLeft·=·bytesThreshold·-·internals.bytes;\n······}\n\n······if·(maxRate)·{\n········if·(bytesLeft·<=·0)·{\n··········//·next·time·window\n··········return·setTimeout(()·=>·{\n············_callback(null,·_chunk);\n··········},·timeWindow·-·passed);\n········}\n\n········if·(bytesLeft·<·maxChunkSize)·{\n··········maxChunkSize·=·bytesLeft;\n········}\n······}\n\n······if·(maxChunkSize·&&·chunkSize·>·maxChunkSize·&&·(chunkSize·-·maxChunkSize)·>·minChunkSize)·{\n········chunkRemainder·=·_chunk.subarray(maxChunkSize);\n········_chunk·=·_chunk.subarray(0,·maxChunkSize);\n······}\n\n······pushChunk(_chunk,·chunkRemainder·?·()·=>·{\n········process.nextTick(_callback,·null,·chunkRemainder);\n······}·:·_callback);\n····};\n\n····transformChunk(chunk,·function·transformNextChunk(err,·_chunk)·{\n······if·(err)·{\n········return·callback(err);\n······}\n\n······if·(_chunk)·{\n········transformChunk(_chunk,·transformNextChunk);\n······}·else·{\n········callback(null);\n······}\n····});\n··}\n}\n\nexport·default·AxiosTransformStream;\n", |
| 241 | ········"const·{asyncIterator}·=·Symbol;\n\nconst·readBlob·=·async·function*·(blob)·{\n··if·(blob.stream)·{\n····yield*·blob.stream()\n··}·else·if·(blob.arrayBuffer)·{\n····yield·await·blob.arrayBuffer()\n··}·else·if·(blob[asyncIterator])·{\n····yield*·blob[asyncIterator]();\n··}·else·{\n····yield·blob;\n··}\n}\n\nexport·default·readBlob;\n", | 209 | ········"const·{asyncIterator}·=·Symbol;\n\nconst·readBlob·=·async·function*·(blob)·{\n··if·(blob.stream)·{\n····yield*·blob.stream()\n··}·else·if·(blob.arrayBuffer)·{\n····yield·await·blob.arrayBuffer()\n··}·else·if·(blob[asyncIterator])·{\n····yield*·blob[asyncIterator]();\n··}·else·{\n····yield·blob;\n··}\n}\n\nexport·default·readBlob;\n", |
| 242 | ········"import·util·from·'util';\nimport·{Readable}·from·'stream';\nimport·utils·from·\"../utils.js\";\nimport·readBlob·from·\"./readBlob.js\";\nimport·platform·from·\"../platform/index.js\";\n\nconst·BOUNDARY_ALPHABET·=·platform.ALPHABET.ALPHA_DIGIT·+·'-_';\n\nconst·textEncoder·=·typeof·TextEncoder·===·'function'·?·new·TextEncoder()·:·new·util.TextEncoder();\n\nconst·CRLF·=·'\\r\\n';\nconst·CRLF_BYTES·=·textEncoder.encode(CRLF);\nconst·CRLF_BYTES_COUNT·=·2;\n\nclass·FormDataPart·{\n··constructor(name,·value)·{\n····const·{escapeName}·=·this.constructor;\n····const·isStringValue·=·utils.isString(value);\n\n····let·headers·=·`Content-Disposition:·form-data;·name=\"${escapeName(name)}\"${\n······!isStringValue·&&·value.name·?·`;·filename=\"${escapeName(value.name)}\"`·:·''\n····}${CRLF}`;\n\n····if·(isStringValue)·{\n······value·=·textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g,·CRLF));\n····}·else·{\n······headers·+=·`Content-Type:·${value.type·||·\"application/octet-stream\"}${CRLF}`\n····}\n\n····this.headers·=·textEncoder.encode(headers·+·CRLF);\n\n····this.contentLength·=·isStringValue·?·value.byteLength·:·value.size;\n\n····this.size·=·this.headers.byteLength·+·this.contentLength·+·CRLF_BYTES_COUNT;\n\n····this.name·=·name;\n····this.value·=·value;\n··}\n\n··async·*encode(){\n····yield·this.headers;\n\n····const·{value}·=·this;\n\n····if(utils.isTypedArray(value))·{\n······yield·value;\n····}·else·{\n······yield*·readBlob(value);\n····}\n\n····yield·CRLF_BYTES;\n··}\n\n··static·escapeName(name)·{\n······return·String(name).replace(/[\\r\\n\"]/g,·(match)·=>·({\n········'\\r'·:·'%0D',\n········'\\n'·:·'%0A',\n········'\"'·:·'%22',\n······}[match]));\n··}\n}\n\nconst·formDataToStream·=·(form,·headersHandler,·options)·=>·{\n··const·{\n····tag·=·'form-data-boundary',\n····size·=·25,\n····boundary·=·tag·+·'-'·+·platform.generateString(size,·BOUNDARY_ALPHABET)\n··}·=·options·||·{};\n\n··if(!utils.isFormData(form))·{\n····throw·TypeError('FormData·instance·required');\n··}\n\n··if·(boundary.length·<·1·||·boundary.length·>·70)·{\n····throw·Error('boundary·must·be·10-70·characters·long')\n··}\n\n··const·boundaryBytes·=·textEncoder.encode('--'·+·boundary·+·CRLF);\n··const·footerBytes·=·textEncoder.encode('--'·+·boundary·+·'--'·+·CRLF);\n··let·contentLength·=·footerBytes.byteLength;\n\n··const·parts·=·Array.from(form.entries()).map(([name,·value])·=>·{\n····const·part·=·new·FormDataPart(name,·value);\n····contentLength·+=·part.size;\n····return·part;\n··});\n\n··contentLength·+=·boundaryBytes.byteLength·*·parts.length;\n\n··contentLength·=·utils.toFiniteNumber(contentLength);\n\n··const·computedHeaders·=·{\n····'Content-Type':·`multipart/form-data;·boundary=${boundary}`\n··}\n\n··if·(Number.isFinite(contentLength))·{\n····computedHeaders['Content-Length']·=·contentLength;\n··}\n\n··headersHandler·&&·headersHandler(computedHeaders);\n\n··return·Readable.from((async·function·*()·{\n····for(const·part·of·parts)·{\n······yield·boundaryBytes;\n······yield*·part.encode();\n····}\n\n····yield·footerBytes;\n··})());\n};\n\nexport·default·formDataToStream;\n", | 210 | ········"import·util·from·'util';\nimport·{Readable}·from·'stream';\nimport·utils·from·\"../utils.js\";\nimport·readBlob·from·\"./readBlob.js\";\nimport·platform·from·\"../platform/index.js\";\n\nconst·BOUNDARY_ALPHABET·=·platform.ALPHABET.ALPHA_DIGIT·+·'-_';\n\nconst·textEncoder·=·typeof·TextEncoder·===·'function'·?·new·TextEncoder()·:·new·util.TextEncoder();\n\nconst·CRLF·=·'\\r\\n';\nconst·CRLF_BYTES·=·textEncoder.encode(CRLF);\nconst·CRLF_BYTES_COUNT·=·2;\n\nclass·FormDataPart·{\n··constructor(name,·value)·{\n····const·{escapeName}·=·this.constructor;\n····const·isStringValue·=·utils.isString(value);\n\n····let·headers·=·`Content-Disposition:·form-data;·name=\"${escapeName(name)}\"${\n······!isStringValue·&&·value.name·?·`;·filename=\"${escapeName(value.name)}\"`·:·''\n····}${CRLF}`;\n\n····if·(isStringValue)·{\n······value·=·textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g,·CRLF));\n····}·else·{\n······headers·+=·`Content-Type:·${value.type·||·\"application/octet-stream\"}${CRLF}`\n····}\n\n····this.headers·=·textEncoder.encode(headers·+·CRLF);\n\n····this.contentLength·=·isStringValue·?·value.byteLength·:·value.size;\n\n····this.size·=·this.headers.byteLength·+·this.contentLength·+·CRLF_BYTES_COUNT;\n\n····this.name·=·name;\n····this.value·=·value;\n··}\n\n··async·*encode(){\n····yield·this.headers;\n\n····const·{value}·=·this;\n\n····if(utils.isTypedArray(value))·{\n······yield·value;\n····}·else·{\n······yield*·readBlob(value);\n····}\n\n····yield·CRLF_BYTES;\n··}\n\n··static·escapeName(name)·{\n······return·String(name).replace(/[\\r\\n\"]/g,·(match)·=>·({\n········'\\r'·:·'%0D',\n········'\\n'·:·'%0A',\n········'\"'·:·'%22',\n······}[match]));\n··}\n}\n\nconst·formDataToStream·=·(form,·headersHandler,·options)·=>·{\n··const·{\n····tag·=·'form-data-boundary',\n····size·=·25,\n····boundary·=·tag·+·'-'·+·platform.generateString(size,·BOUNDARY_ALPHABET)\n··}·=·options·||·{};\n\n··if(!utils.isFormData(form))·{\n····throw·TypeError('FormData·instance·required');\n··}\n\n··if·(boundary.length·<·1·||·boundary.length·>·70)·{\n····throw·Error('boundary·must·be·10-70·characters·long')\n··}\n\n··const·boundaryBytes·=·textEncoder.encode('--'·+·boundary·+·CRLF);\n··const·footerBytes·=·textEncoder.encode('--'·+·boundary·+·'--'·+·CRLF);\n··let·contentLength·=·footerBytes.byteLength;\n\n··const·parts·=·Array.from(form.entries()).map(([name,·value])·=>·{\n····const·part·=·new·FormDataPart(name,·value);\n····contentLength·+=·part.size;\n····return·part;\n··});\n\n··contentLength·+=·boundaryBytes.byteLength·*·parts.length;\n\n··contentLength·=·utils.toFiniteNumber(contentLength);\n\n··const·computedHeaders·=·{\n····'Content-Type':·`multipart/form-data;·boundary=${boundary}`\n··}\n\n··if·(Number.isFinite(contentLength))·{\n····computedHeaders['Content-Length']·=·contentLength;\n··}\n\n··headersHandler·&&·headersHandler(computedHeaders);\n\n··return·Readable.from((async·function·*()·{\n····for(const·part·of·parts)·{\n······yield·boundaryBytes;\n······yield*·part.encode();\n····}\n\n····yield·footerBytes;\n··})());\n};\n\nexport·default·formDataToStream;\n", |
| 243 | ········"\"use·strict\";\n\nimport·stream·from·\"stream\";\n\nclass·ZlibHeaderTransformStream·extends·stream.Transform·{\n··__transform(chunk,·encoding,·callback)·{\n····this.push(chunk);\n····callback();\n··}\n\n··_transform(chunk,·encoding,·callback)·{\n····if·(chunk.length·!==·0)·{\n······this._transform·=·this.__transform;\n\n······//·Add·Default·Compression·headers·if·no·zlib·headers·are·present\n······if·(chunk[0]·!==·120)·{·//·Hex:·78\n········const·header·=·Buffer.alloc(2);\n········header[0]·=·120;·//·Hex:·78\n········header[1]·=·156;·//·Hex:·9C·\n········this.push(header,·encoding);\n······}\n····}\n\n····this.__transform(chunk,·encoding,·callback);\n··}\n}\n\nexport·default·ZlibHeaderTransformStream;\n", | 211 | ········"\"use·strict\";\n\nimport·stream·from·\"stream\";\n\nclass·ZlibHeaderTransformStream·extends·stream.Transform·{\n··__transform(chunk,·encoding,·callback)·{\n····this.push(chunk);\n····callback();\n··}\n\n··_transform(chunk,·encoding,·callback)·{\n····if·(chunk.length·!==·0)·{\n······this._transform·=·this.__transform;\n\n······//·Add·Default·Compression·headers·if·no·zlib·headers·are·present\n······if·(chunk[0]·!==·120)·{·//·Hex:·78\n········const·header·=·Buffer.alloc(2);\n········header[0]·=·120;·//·Hex:·78\n········header[1]·=·156;·//·Hex:·9C·\n········this.push(header,·encoding);\n······}\n····}\n\n····this.__transform(chunk,·encoding,·callback);\n··}\n}\n\nexport·default·ZlibHeaderTransformStream;\n", |