New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-it

Package Overview
Dependencies
Maintainers
5
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-it - npm Package Compare versions

Comparing version 6.0.0-0 to 6.0.0

lib-node/request/browser/fetchXhr.js

12

lib-node/index.js
"use strict";
const {
default: pubsub
} = require('nano-pubsub');
const pubsub = require('nano-pubsub');

@@ -13,3 +11,3 @@ const middlewareReducer = require('./util/middlewareReducer');

const httpRequest = require('./request'); // node-request in node, browser-request in browsers
const httpRequester = require('./request'); // node-request in node, browser-request in browsers

@@ -20,3 +18,3 @@

module.exports = function createRequester(initMiddleware = []) {
module.exports = function createRequester(initMiddleware = [], httpRequest = httpRequester) {
const loadedMiddleware = [];

@@ -112,2 +110,6 @@ const middleware = middlehooks.reduce((ware, name) => {

if (newMiddleware.onReturn && middleware.onReturn.length > 0) {
throw new Error('Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event');
}
middlehooks.forEach(key => {

@@ -114,0 +116,0 @@ if (newMiddleware[key]) {

@@ -17,3 +17,2 @@ "use strict";

exports.keepAlive = require('./keepAlive');
exports.rateLimit = require('./rateLimit');
//# sourceMappingURL=index.js.map

@@ -5,5 +5,3 @@ "use strict";

const {
isPlainObject
} = require('is-plain-object');
const isPlainObject = require('is-plain-object');

@@ -10,0 +8,0 @@ const serializeTypes = ['boolean', 'string', 'number'];

@@ -34,3 +34,9 @@ "use strict";

setTimeout(() => channels.request.publish(context), 0);
setTimeout(() => {
try {
channels.request.publish(context);
} catch (err) {
reject(err);
}
}, 0);
})

@@ -37,0 +43,0 @@ };

@@ -5,5 +5,3 @@ "use strict";

const {
isPlainObject
} = require('is-plain-object');
const isPlainObject = require('is-plain-object');

@@ -10,0 +8,0 @@ const urlEncode = require('form-urlencoded');

@@ -8,2 +8,4 @@ "use strict";

const FetchXhr = require('./browser/fetchXhr');
const noop = function () {

@@ -13,8 +15,15 @@ /* intentional noop */

const win = window;
const XmlHttpRequest = win.XMLHttpRequest || noop;
const hasXhr2 = ('withCredentials' in new XmlHttpRequest());
const XDomainRequest = hasXhr2 ? XmlHttpRequest : win.XDomainRequest;
const adapter = 'xhr';
const win = typeof window === 'undefined' ? undefined : window;
const adapter = win ? 'xhr' : 'fetch';
let XmlHttpRequest = typeof XMLHttpRequest === 'function' ? XMLHttpRequest : noop;
const hasXhr2 = ('withCredentials' in new XmlHttpRequest()); // eslint-disable-next-line no-undef
const XDR = typeof XDomainRequest === 'undefined' ? undefined : XDomainRequest;
let CrossDomainRequest = hasXhr2 ? XmlHttpRequest : XDR; // Fallback to fetch-based XHR polyfill for non-browser environments like Workers
if (!win) {
XmlHttpRequest = FetchXhr;
CrossDomainRequest = FetchXhr;
}
module.exports = (context, callback) => {

@@ -44,5 +53,6 @@ const opts = context.options;

let xhr = cors ? new XDomainRequest() : new XmlHttpRequest();
const isXdr = win.XDomainRequest && xhr instanceof win.XDomainRequest;
const headers = options.headers; // Request state
let xhr = cors ? new CrossDomainRequest() : new XmlHttpRequest();
const isXdr = win && win.XDomainRequest && xhr instanceof win.XDomainRequest;
const headers = options.headers;
const delays = options.timeout; // Request state

@@ -57,2 +67,3 @@ let aborted = false;

xhr.onabort = () => {
stopTimers(true);
aborted = true;

@@ -113,4 +124,2 @@ }; // IE9 must have onprogress be set to a unique function

const delays = options.timeout;
if (delays) {

@@ -149,5 +158,5 @@ timers.connect = setTimeout(() => timeoutRequest('ETIMEDOUT'), delays.connect);

function stopTimers() {
function stopTimers(force) {
// Only clear the connect timeout if we've got a connection
if (aborted || xhr.readyState >= 2 && timers.connect) {
if (force || aborted || xhr.readyState >= 2 && timers.connect) {
clearTimeout(timers.connect);

@@ -161,3 +170,3 @@ }

function onError() {
function onError(error) {
if (loaded) {

@@ -168,3 +177,3 @@ return;

stopTimers();
stopTimers(true);
loaded = true;

@@ -174,3 +183,3 @@ xhr = null; // Annoyingly, details are extremely scarce and hidden from us.

const err = new Error(`Network error while attempting to reach ${options.url}`);
const err = error || new Error(`Network error while attempting to reach ${options.url}`);
err.isNetworkError = true;

@@ -200,4 +209,3 @@ err.request = options;

body: xhr.response || xhr.responseText,
// responseURL has the "end" URL, eg after redirects
url: xhr.responseURL || options.url,
url: options.url,
method: options.method,

@@ -204,0 +212,0 @@ headers: isXdr ? {} : parseHeaders(xhr.getAllResponseHeaders()),

@@ -60,4 +60,4 @@ "use strict";

lengthHeader['content-length'] = options.bodySize;
} else if (options.body && Buffer.isBuffer(options.body)) {
lengthHeader['content-length'] = options.body.length;
} else if (options.body && bodyType !== 'stream') {
lengthHeader['content-length'] = Buffer.byteLength(options.body);
} // Make sure callback is not called in the event of a cancellation

@@ -102,3 +102,2 @@

reqOpts.maxRedirects = options.maxRedirects || 5;
reqOpts.maxBodyLength = +Infinity;
} // Apply currect options for proxy tunneling, if enabled

@@ -126,2 +125,9 @@

options.debug('Proxying using %s', reqOpts.agent ? 'tunnel agent' : `${reqOpts.host}:${reqOpts.port}`);
} // See if we should try to request a compressed response (and decompress on return)
const tryCompressed = reqOpts.method !== 'HEAD';
if (tryCompressed && !reqOpts.headers['accept-encoding'] && options.compress !== false) {
reqOpts.headers['accept-encoding'] = 'br, gzip, deflate';
}

@@ -131,5 +137,3 @@

const request = transport.request(finalOptions, response => {
// See if we should try to decompress the response
const tryDecompress = reqOpts.method !== 'HEAD';
const res = tryDecompress ? decompressResponse(response) : response;
const res = tryCompressed ? decompressResponse(response) : response;
const resStream = context.applyMiddleware('onHeaders', res, {

@@ -139,4 +143,12 @@ headers: response.headers,

context
}); // Concatenate the response body, then parse the response with middlewares
}); // On redirects, `responseUrl` is set
const reqUrl = response.responseUrl || options.url;
if (options.stream) {
callback(null, reduceResponse(res, reqUrl, reqOpts.method, resStream));
return;
} // Concatenate the response body, then parse the response with middlewares
concat(resStream, (err, data) => {

@@ -148,4 +160,3 @@ if (err) {

const body = options.rawBody ? data : data.toString();
const reduced = reduceResponse(res, response.responseUrl || options.url, // On redirects, `responseUrl` is set
reqOpts.method, body);
const reduced = reduceResponse(res, reqUrl, reqOpts.method, body);
return callback(null, reduced);

@@ -152,0 +163,0 @@ });

"use strict";
var _require = require('nano-pubsub'),
pubsub = _require.default;
var pubsub = require('nano-pubsub');

@@ -12,3 +11,3 @@ var middlewareReducer = require('./util/middlewareReducer');

var httpRequest = require('./request'); // node-request in node, browser-request in browsers
var httpRequester = require('./request'); // node-request in node, browser-request in browsers

@@ -21,2 +20,3 @@

var initMiddleware = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var httpRequest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : httpRequester;
var loadedMiddleware = [];

@@ -114,2 +114,6 @@ var middleware = middlehooks.reduce(function (ware, name) {

if (newMiddleware.onReturn && middleware.onReturn.length > 0) {
throw new Error('Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event');
}
middlehooks.forEach(function (key) {

@@ -116,0 +120,0 @@ if (newMiddleware[key]) {

@@ -17,3 +17,2 @@ "use strict";

exports.keepAlive = require('./keepAlive');
exports.rateLimit = require('./rateLimit');
//# sourceMappingURL=index.js.map
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var objectAssign = require('object-assign');
var _require = require('is-plain-object'),
isPlainObject = _require.isPlainObject;
var isPlainObject = require('is-plain-object');

@@ -10,0 +9,0 @@ var serializeTypes = ['boolean', 'string', 'number'];

@@ -37,3 +37,7 @@ "use strict";

setTimeout(function () {
return channels.request.publish(context);
try {
channels.request.publish(context);
} catch (err) {
reject(err);
}
}, 0);

@@ -40,0 +44,0 @@ });

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

@@ -5,0 +5,0 @@ var objectAssign = require('object-assign');

@@ -5,4 +5,3 @@ "use strict";

var _require = require('is-plain-object'),
isPlainObject = _require.isPlainObject;
var isPlainObject = require('is-plain-object');

@@ -9,0 +8,0 @@ var urlEncode = require('form-urlencoded');

@@ -8,2 +8,4 @@ "use strict";

var FetchXhr = require('./browser/fetchXhr');
var noop = function noop() {

@@ -13,8 +15,15 @@ /* intentional noop */

var win = window;
var XmlHttpRequest = win.XMLHttpRequest || noop;
var hasXhr2 = ('withCredentials' in new XmlHttpRequest());
var XDomainRequest = hasXhr2 ? XmlHttpRequest : win.XDomainRequest;
var adapter = 'xhr';
var win = typeof window === 'undefined' ? undefined : window;
var adapter = win ? 'xhr' : 'fetch';
var XmlHttpRequest = typeof XMLHttpRequest === 'function' ? XMLHttpRequest : noop;
var hasXhr2 = ('withCredentials' in new XmlHttpRequest()); // eslint-disable-next-line no-undef
var XDR = typeof XDomainRequest === 'undefined' ? undefined : XDomainRequest;
var CrossDomainRequest = hasXhr2 ? XmlHttpRequest : XDR; // Fallback to fetch-based XHR polyfill for non-browser environments like Workers
if (!win) {
XmlHttpRequest = FetchXhr;
CrossDomainRequest = FetchXhr;
}
module.exports = function (context, callback) {

@@ -46,5 +55,6 @@ var opts = context.options;

var xhr = cors ? new XDomainRequest() : new XmlHttpRequest();
var isXdr = win.XDomainRequest && xhr instanceof win.XDomainRequest;
var headers = options.headers; // Request state
var xhr = cors ? new CrossDomainRequest() : new XmlHttpRequest();
var isXdr = win && win.XDomainRequest && xhr instanceof win.XDomainRequest;
var headers = options.headers;
var delays = options.timeout; // Request state

@@ -59,2 +69,3 @@ var aborted = false;

xhr.onabort = function () {
stopTimers(true);
aborted = true;

@@ -115,4 +126,2 @@ }; // IE9 must have onprogress be set to a unique function

var delays = options.timeout;
if (delays) {

@@ -155,5 +164,5 @@ timers.connect = setTimeout(function () {

function stopTimers() {
function stopTimers(force) {
// Only clear the connect timeout if we've got a connection
if (aborted || xhr.readyState >= 2 && timers.connect) {
if (force || aborted || xhr.readyState >= 2 && timers.connect) {
clearTimeout(timers.connect);

@@ -167,3 +176,3 @@ }

function onError() {
function onError(error) {
if (loaded) {

@@ -174,3 +183,3 @@ return;

stopTimers();
stopTimers(true);
loaded = true;

@@ -180,3 +189,3 @@ xhr = null; // Annoyingly, details are extremely scarce and hidden from us.

var err = new Error("Network error while attempting to reach ".concat(options.url));
var err = error || new Error("Network error while attempting to reach ".concat(options.url));
err.isNetworkError = true;

@@ -206,4 +215,3 @@ err.request = options;

body: xhr.response || xhr.responseText,
// responseURL has the "end" URL, eg after redirects
url: xhr.responseURL || options.url,
url: options.url,
method: options.method,

@@ -210,0 +218,0 @@ headers: isXdr ? {} : parseHeaders(xhr.getAllResponseHeaders()),

@@ -11,7 +11,7 @@ "use strict";

function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

@@ -76,4 +76,4 @@ /* eslint-disable no-process-env */

lengthHeader['content-length'] = options.bodySize;
} else if (options.body && Buffer.isBuffer(options.body)) {
lengthHeader['content-length'] = options.body.length;
} else if (options.body && bodyType !== 'stream') {
lengthHeader['content-length'] = Buffer.byteLength(options.body);
} // Make sure callback is not called in the event of a cancellation

@@ -122,3 +122,2 @@

reqOpts.maxRedirects = options.maxRedirects || 5;
reqOpts.maxBodyLength = +Infinity;
} // Apply currect options for proxy tunneling, if enabled

@@ -152,2 +151,9 @@

options.debug('Proxying using %s', reqOpts.agent ? 'tunnel agent' : "".concat(reqOpts.host, ":").concat(reqOpts.port));
} // See if we should try to request a compressed response (and decompress on return)
var tryCompressed = reqOpts.method !== 'HEAD';
if (tryCompressed && !reqOpts.headers['accept-encoding'] && options.compress !== false) {
reqOpts.headers['accept-encoding'] = 'br, gzip, deflate';
}

@@ -157,5 +163,3 @@

var request = transport.request(finalOptions, function (response) {
// See if we should try to decompress the response
var tryDecompress = reqOpts.method !== 'HEAD';
var res = tryDecompress ? decompressResponse(response) : response;
var res = tryCompressed ? decompressResponse(response) : response;
var resStream = context.applyMiddleware('onHeaders', res, {

@@ -165,4 +169,12 @@ headers: response.headers,

context: context
}); // Concatenate the response body, then parse the response with middlewares
}); // On redirects, `responseUrl` is set
var reqUrl = response.responseUrl || options.url;
if (options.stream) {
callback(null, reduceResponse(res, reqUrl, reqOpts.method, resStream));
return;
} // Concatenate the response body, then parse the response with middlewares
concat(resStream, function (err, data) {

@@ -174,4 +186,3 @@ if (err) {

var body = options.rawBody ? data : data.toString();
var reduced = reduceResponse(res, response.responseUrl || options.url, // On redirects, `responseUrl` is set
reqOpts.method, body);
var reduced = reduceResponse(res, reqUrl, reqOpts.method, body);
return callback(null, reduced);

@@ -178,0 +189,0 @@ });

{
"name": "get-it",
"version": "6.0.0-0",
"version": "6.0.0",
"description": "Generic HTTP request library for node and browsers",
"main": "index.js",
"umd": "umd/get-it.min.js",
"sideEffects": false,
"engines": {
"node": ">=10.0.0"
"node": ">=12.0.0"
},

@@ -27,11 +25,12 @@ "browser": {

"scripts": {
"bundle": "npm run bundle:build && npm run bundle:build:all",
"bundle:build": "npm run compile && NODE_ENV=production DEBUG='' webpack",
"bundle:build:all": "npm run compile && NODE_ENV=production DEBUG='' BUNDLE_ALL=1 webpack",
"bundle": "npm run bundle:build && npm run bundle:build:all && npm run bundle:minify && npm run bundle:minify:all",
"bundle:build": "npm run compile && NODE_ENV=production DEBUG='' browserify -t envify -g uglifyify lib/index.js -o umd/get-it.js --standalone=getIt",
"bundle:build:all": "npm run compile && NODE_ENV=production DEBUG='' browserify -t envify -g uglifyify lib/bundle-all.js -o umd/get-it-all.js --standalone=getIt",
"bundle:minify": "uglifyjs -c -m -- umd/get-it.js > umd/get-it.min.js",
"bundle:minify:all": "uglifyjs -c -m -- umd/get-it-all.js > umd/get-it-all.min.js",
"build": "npm run compile && npm run bundle",
"ci": "npm run coverage && npm run karma && npm run lint",
"ci": "npm run coverage && npm run lint",
"clean": "rimraf lib-node lib .nyc_output coverage npm-debug.log yarn-debug.log umd/*.js",
"compile": "BABEL_ENV=node babel -s -D -d lib-node/ src/ && BABEL_ENV=browser babel -s -D -d lib/ src/",
"compile": "BABEL_ENV=node babel --source-maps --copy-files -d lib-node/ src/ && BABEL_ENV=browser babel --source-maps --copy-files -d lib/ src/",
"coverage": "nyc --reporter=html --reporter=lcov --reporter=text _mocha",
"karma": "karma start",
"lint": "eslint .",

@@ -50,16 +49,15 @@ "posttest": "npm run lint",

"dependencies": {
"@rexxars/p-ratelimit": "^1.0.1",
"@sanity/timed-out": "^4.0.2",
"create-error-class": "^3.0.2",
"debug": "^3.0.0",
"debug": "^2.6.8",
"decompress-response": "^6.0.0",
"follow-redirects": "^1.13.1",
"form-urlencoded": "^4.2.1",
"into-stream": "^6.0.0",
"is-plain-object": "^5.0.0",
"is-retry-allowed": "^2.2.0",
"is-stream": "^2.0.0",
"nano-pubsub": "^2.0.0",
"follow-redirects": "^1.2.4",
"form-urlencoded": "^2.0.7",
"into-stream": "^3.1.0",
"is-plain-object": "^2.0.4",
"is-retry-allowed": "^1.1.0",
"is-stream": "^1.1.0",
"nano-pubsub": "^1.0.2",
"object-assign": "^4.1.1",
"parse-headers": "^2.0.3",
"parse-headers": "^2.0.4",
"progress-stream": "^2.0.0",

@@ -72,29 +70,25 @@ "same-origin": "^0.1.1",

"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"babel-loader": "^8.2.2",
"chai": "^4.2.0",
"@babel/cli": "^7.16.8",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.16.9",
"browserify": "^14.4.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai-subset": "^1.5.0",
"check-error": "^1.0.2",
"envify": "^4.1.0",
"es6-promise": "^4.1.1",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-config-sanity": "^1.150.8",
"get-uri": "^3.0.2",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.0",
"karma-mocha": "^2.0.1",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^4.0.2",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-sanity": "^5.1.0",
"get-uri": "^2.0.1",
"lodash.once": "^4.1.1",
"mocha": "^8.2.1",
"mocha": "^9.2.0",
"node-fetch": "^2.0.0",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"pinkie-promise": "^2.0.1",
"prettier": "^1.15.2",
"rimraf": "^3.0.2",
"uglify-js": "^3.15.0",
"uglifyify": "^5.0.2",
"webpack": "^4.0.0",
"webpack-cli": "^4.3.1",
"zen-observable": "^0.8.15"
"zen-observable": "^0.4.0"
},

@@ -101,0 +95,0 @@ "repository": {

# get-it
[![npm version](http://img.shields.io/npm/v/get-it.svg?style=flat-square)](https://www.npmjs.com/package/get-it)[![Build Status](http://img.shields.io/travis/sanity-io/get-it/master.svg?style=flat-square)](https://travis-ci.org/sanity-io/get-it)
[![npm version](http://img.shields.io/npm/v/get-it.svg?style=flat-square)](https://www.npmjs.com/package/get-it)[![Build Status](http://img.shields.io/travis/sanity-io/get-it/main.svg?style=flat-square)](https://travis-ci.org/sanity-io/get-it)
Generic HTTP request library for node.js (>= 10) and browsers (IE9 and newer)
Generic HTTP request library for node.js (>= 12) and browsers (IE9 and newer)

@@ -7,0 +7,0 @@ ## Motivation

@@ -1,6 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.getIt=e():t.getIt=e()}(window,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var o=r(1).default,n=r(2),s=r(3),u=r(9),i=r(10),a=["request","response","progress","error","abort"],c=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=[],p=c.reduce((function(t,e){return t[e]=t[e]||[],t}),{processOptions:[s],validateOptions:[u]});function f(t){var e=a.reduce((function(t,e){return t[e]=o(),t}),{}),r=n(p),s=r("processOptions",t);r("validateOptions",s);var u={options:s,channels:e,applyMiddleware:r},c=null,f=e.request.subscribe((function(t){c=i(t,(function(o,n){return function(t,o,n){var s=t,u=o;if(!s)try{u=r("onResponse",o,n)}catch(t){u=null,s=t}(s=s&&r("onError",s,n))?e.error.publish(s):u&&e.response.publish(u)}(o,n,t)}))}));e.abort.subscribe((function(){f(),c&&c.abort()}));var l=r("onReturn",e,u);return l===e&&e.request.publish(u),l}return f.use=function(t){if(!t)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");return c.forEach((function(e){t[e]&&p[e].push(t[e])})),r.push(t),f},f.clone=function(){return t(r)},e.forEach(f.use),f}},function(t,e,r){"use strict";function o(){var t=[];return{publish:function(e){t.forEach((function(t){return t(e)}))},subscribe:function(e){var r=t.push(e)-1;return function(){t.splice(r,1)}}}}r.r(e),r.d(e,"default",(function(){return o}))},function(t,e,r){"use strict";t.exports=function(t){return function(e,r){for(var o="onError"===e,n=r,s=arguments.length,u=new Array(s>2?s-2:0),i=2;i<s;i++)u[i-2]=arguments[i];for(var a=0;a<t[e].length;a++){var c=t[e][a];if(n=c.apply(void 0,[n].concat(u)),o&&!n)break}return n}}},function(t,e,r){"use strict";var o=r(4),n=r(5),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,u=Object.prototype.hasOwnProperty,i={timeout:s?6e4:12e4};function a(t){var e=[];for(var r in t)u.call(t,r)&&o(r,t[r]);return e.length?e.join("&"):"";function o(t,r){Array.isArray(r)?r.forEach((function(e){return o(t,e)})):e.push([t,r].map(encodeURIComponent).join("="))}}t.exports=function(t){var e="string"==typeof t?o({url:t},i):o({},i,t),r=n(e.url,{},!0);return e.timeout=function t(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;var r=Number(e);if(isNaN(r))return t(i.timeout);return{connect:r,socket:r}}(e.timeout),e.query&&(r.query=o({},r.query,function(t){var e={};for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=r.toString(a),e}},function(t,e,r){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var o=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function u(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(t){o[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,i,a=u(t),c=1;c<arguments.length;c++){for(var p in r=Object(arguments[c]))n.call(r,p)&&(a[p]=r[p]);if(o){i=o(r);for(var f=0;f<i.length;f++)s.call(r,i[f])&&(a[i[f]]=r[i[f]])}}return a}},function(t,e,r){"use strict";(function(e){var o=r(7),n=r(8),s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,i=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function a(t){return(t||"").toString().replace(i,"")}var c=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(t){var r,o=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},n={},u=typeof(t=t||o);if("blob:"===t.protocol)n=new h(unescape(t.pathname),{});else if("string"===u)for(r in n=new h(t,{}),p)delete n[r];else if("object"===u){for(r in t)r in p||(n[r]=t[r]);void 0===n.slashes&&(n.slashes=s.test(t.href))}return n}function l(t){t=a(t);var e=u.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function h(t,e,r){if(t=a(t),!(this instanceof h))return new h(t,e,r);var s,u,i,p,d,v,y=c.slice(),b=typeof e,m=this,w=0;for("object"!==b&&"string"!==b&&(r=e,e=null),r&&"function"!=typeof r&&(r=n.parse),e=f(e),s=!(u=l(t||"")).protocol&&!u.slashes,m.slashes=u.slashes||s&&e.slashes,m.protocol=u.protocol||e.protocol||"",t=u.rest,u.slashes||(y[3]=[/(.*)/,"pathname"]);w<y.length;w++)"function"!=typeof(p=y[w])?(i=p[0],v=p[1],i!=i?m[v]=t:"string"==typeof i?~(d=t.indexOf(i))&&("number"==typeof p[2]?(m[v]=t.slice(0,d),t=t.slice(d+p[2])):(m[v]=t.slice(d),t=t.slice(0,d))):(d=i.exec(t))&&(m[v]=d[1],t=t.slice(0,d.index)),m[v]=m[v]||s&&p[3]&&e[v]||"",p[4]&&(m[v]=m[v].toLowerCase())):t=p(t);r&&(m.query=r(m.query)),s&&e.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==e.pathname)&&(m.pathname=function(t,e){if(""===t)return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),o=r.length,n=r[o-1],s=!1,u=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),u++):u&&(0===o&&(s=!0),r.splice(o,1),u--);return s&&r.unshift(""),"."!==n&&".."!==n||r.push(""),r.join("/")}(m.pathname,e.pathname)),o(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(p=m.auth.split(":"),m.username=p[0]||"",m.password=p[1]||""),m.origin=m.protocol&&m.host&&"file:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}h.prototype={set:function(t,e,r){var s=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||n.parse)(e)),s[t]=e;break;case"port":s[t]=e,o(e,s.protocol)?e&&(s.host=s.hostname+":"+e):(s.host=s.hostname,s[t]="");break;case"hostname":s[t]=e,s.port&&(e+=":"+s.port),s.host=e;break;case"host":s[t]=e,/:\d+$/.test(e)?(e=e.split(":"),s.port=e.pop(),s.hostname=e.join(":")):(s.hostname=e,s.port="");break;case"protocol":s.protocol=e.toLowerCase(),s.slashes=!r;break;case"pathname":case"hash":if(e){var u="pathname"===t?"/":"#";s[t]=e.charAt(0)!==u?u+e:e}else s[t]=e;break;default:s[t]=e}for(var i=0;i<c.length;i++){var a=c[i];a[4]&&(s[a[1]]=s[a[1]].toLowerCase())}return s.origin=s.protocol&&s.host&&"file:"!==s.protocol?s.protocol+"//"+s.host:"null",s.href=s.toString(),s},toString:function(t){t&&"function"==typeof t||(t=n.stringify);var e,r=this,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(r.slashes?"//":"");return r.username&&(s+=r.username,r.password&&(s+=":"+r.password),s+="@"),s+=r.host+r.pathname,(e="object"==typeof r.query?t(r.query):r.query)&&(s+="?"!==e.charAt(0)?"?"+e:e),r.hash&&(s+=r.hash),s}},h.extractProtocol=l,h.location=f,h.trimLeft=a,h.qs=n,t.exports=h}).call(this,r(6))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,r){"use strict";var o=Object.prototype.hasOwnProperty;function n(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,n,u=[];for(n in"string"!=typeof e&&(e="?"),t)if(o.call(t,n)){if((r=t[n])||null!=r&&!isNaN(r)||(r=""),n=s(n),r=s(r),null===n||null===r)continue;u.push(n+"="+r)}return u.length?e+u.join("&"):""},e.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,o={};e=r.exec(t);){var s=n(e[1]),u=n(e[2]);null===s||null===u||s in o||(o[s]=u)}return o}},function(t,e,r){"use strict";var o=/^https?:\/\//i;t.exports=function(t){if(!o.test(t.url))throw new Error('"'.concat(t.url,'" is not a valid URL'))}},function(t,e,r){"use strict";t.exports=r(11)},function(t,e,r){"use strict";var o=r(12),n=r(14),s=window,u=s.XMLHttpRequest||function(){},i="withCredentials"in new u?u:s.XDomainRequest;t.exports=function(t,e){var r=t.options,a=t.applyMiddleware("finalizeOptions",r),c={},p=s&&s.location&&!o(s.location.href,a.url),f=t.applyMiddleware("interceptRequest",void 0,{adapter:"xhr",context:t});if(f){var l=setTimeout(e,0,null,f);return{abort:function(){return clearTimeout(l)}}}var h=p?new i:new u,d=s.XDomainRequest&&h instanceof s.XDomainRequest,v=a.headers,y=!1,b=!1,m=!1;if(h.onerror=j,h.ontimeout=j,h.onabort=function(){y=!0},h.onprogress=function(){},h[d?"onload":"onreadystatechange"]=function(){!function(){if(!g)return;O(),c.socket=setTimeout((function(){return x("ESOCKETTIMEDOUT")}),g.socket)}(),y||4!==h.readyState&&!d||0!==h.status&&function(){if(y||b||m)return;if(0===h.status)return void j(new Error("Unknown XHR error"));O(),b=!0,e(null,function(){var t=h.status,e=h.statusText;if(d&&void 0===t)t=200;else{if(t>12e3&&t<12156)return j();t=1223===h.status?204:h.status,e=1223===h.status?"No Content":e}return{body:h.response||h.responseText,url:h.responseURL||a.url,method:a.method,headers:d?{}:n(h.getAllResponseHeaders()),statusCode:t,statusMessage:e}}())}()},h.open(a.method,a.url,!0),h.withCredentials=!!a.withCredentials,v&&h.setRequestHeader)for(var w in v)v.hasOwnProperty(w)&&h.setRequestHeader(w,v[w]);else if(v&&d)throw new Error("Headers cannot be set on an XDomainRequest object");a.rawBody&&(h.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:a,adapter:"xhr",request:h,context:t}),h.send(a.body||null);var g=a.timeout;return g&&(c.connect=setTimeout((function(){return x("ETIMEDOUT")}),g.connect)),{abort:function(){y=!0,h&&h.abort()}};function x(e){m=!0,h.abort();var r=new Error("ESOCKETTIMEDOUT"===e?"Socket timed out on request to ".concat(a.url):"Connection timed out on request to ".concat(a.url));r.code=e,t.channels.error.publish(r)}function O(){(y||h.readyState>=2&&c.connect)&&clearTimeout(c.connect),c.socket&&clearTimeout(c.socket)}function j(){if(!b){O(),b=!0,h=null;var t=new Error("Network error while attempting to reach ".concat(a.url));t.isNetworkError=!0,t.request=a,e(t)}}}},function(t,e,r){"use strict";var o=r(13);t.exports=function(t,e,r){if(t===e)return!0;var n=o.parse(t,!1,!0),s=o.parse(e,!1,!0),u=0|n.port||("https"===n.protocol?443:80),i=0|s.port||("https"===s.protocol?443:80),a={proto:n.protocol===s.protocol,hostname:n.hostname===s.hostname,port:u===i};return a.proto&&a.hostname&&(a.port||r)}},function(t,e,r){"use strict";var o=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:o,parse:function(t){var e=o.exec(t);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}}},function(t,e){var r=function(t){return t.replace(/^\s+|\s+$/g,"")};t.exports=function(t){if(!t)return{};for(var e,o={},n=r(t).split("\n"),s=0;s<n.length;s++){var u=n[s],i=u.indexOf(":"),a=r(u.slice(0,i)).toLowerCase(),c=r(u.slice(i+1));void 0===o[a]?o[a]=c:(e=o[a],"[object Array]"===Object.prototype.toString.call(e)?o[a].push(c):o[a]=[o[a],c])}return o}}])}));
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).getIt=e()}(function(){return function o(n,s,i){function a(t,e){if(!s[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=s[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,o,n,s,i)}return s[t].exports}for(var u="function"==typeof require&&require,e=0;e<i.length;e++)a(i[e]);return a}({1:[function(e,t,r){"use strict";var u=e("nano-pubsub"),c=e("./util/middlewareReducer"),s=e("./middleware/defaultOptionsProcessor"),i=e("./middleware/defaultOptionsValidator"),p=e("./request"),l=["request","response","progress","error","abort"],f=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:p,r=[],n=f.reduce(function(e,t){return e[t]=e[t]||[],e},{processOptions:[s],validateOptions:[i]});function o(e){var s=l.reduce(function(e,t){return e[t]=u(),e},{}),i=c(n),e=i("processOptions",e),e=(i("validateOptions",e),{options:e,channels:s,applyMiddleware:i}),t=null,r=s.request.subscribe(function(n){t=a(n,function(t,e){var r=n,o=e;if(!t)try{o=i("onResponse",e,r)}catch(e){o=null,t=e}(t=t&&i("onError",t,r))?s.error.publish(t):o&&s.response.publish(o)})}),o=(s.abort.subscribe(function(){r(),t&&t.abort()}),i("onReturn",s,e));return o===s&&s.request.publish(e),o}return o.use=function(t){if(!t)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&0<n.onReturn.length)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return f.forEach(function(e){t[e]&&n[e].push(t[e])}),r.push(t),o},o.clone=function(){return e(r)},t.forEach(o.use),o}},{"./middleware/defaultOptionsProcessor":2,"./middleware/defaultOptionsValidator":3,"./request":6,"./util/middlewareReducer":7,"nano-pubsub":8}],2:[function(e,t,r){"use strict";var o=e("object-assign"),n=e("url-parse"),e="undefined"!=typeof navigator&&"ReactNative"===navigator.product,s=Object.prototype.hasOwnProperty,i={timeout:e?6e4:12e4};function a(e){var t,o=[];for(t in e)s.call(e,t)&&function t(r,e){Array.isArray(e)?e.forEach(function(e){return t(r,e)}):o.push([r,e].map(encodeURIComponent).join("="))}(t,e[t]);return o.length?o.join("&"):""}t.exports=function(e){var e="string"==typeof e?o({url:e},i):o({},i,e),t=n(e.url,{},!0);return e.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;t=Number(t);return isNaN(t)?e(i.timeout):{connect:t,socket:t}}(e.timeout),e.query&&(t.query=o({},t.query,function(e){var t,r={};for(t in e)void 0!==e[t]&&(r[t]=e[t]);return r}(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=t.toString(a),e}},{"object-assign":9,"url-parse":15}],3:[function(e,t,r){"use strict";var o=/^https?:\/\//i;t.exports=function(e){if(!o.test(e.url))throw new Error('"'.concat(e.url,'" is not a valid URL'))}},{}],4:[function(e,t,n){"use strict";var b=e("same-origin"),g=e("parse-headers"),e=e("./browser/fetchXhr"),v="undefined"==typeof window?void 0:window,q=v?"xhr":"fetch",x="function"==typeof XMLHttpRequest?XMLHttpRequest:function(){},r="withCredentials"in new x,o="undefined"==typeof XDomainRequest?void 0:XDomainRequest,O=r?x:o;v||(O=x=e),t.exports=function(r,p){var l,f=r.options,o=r.applyMiddleware("finalizeOptions",f),t={},f=v&&v.location&&!b(v.location.href,o.url),h=r.applyMiddleware("interceptRequest",void 0,{adapter:q,context:r});if(h)return l=setTimeout(p,0,null,h),{abort:function(){return clearTimeout(l)}};var n=new(f?O:x),s=v&&v.XDomainRequest&&n instanceof v.XDomainRequest,e=o.headers,i=o.timeout,a=!1,u=!1,d=!1;if(n.onerror=m,n.ontimeout=m,n.onabort=function(){c(!0),a=!0},n.onprogress=function(){},n[s?"onload":"onreadystatechange"]=function(){i&&(c(),t.socket=setTimeout(function(){return w("ESOCKETTIMEDOUT")},i.socket)),a||4!==n.readyState&&!s||0===n.status||a||u||d||(0===n.status?m(new Error("Unknown XHR error")):(c(),u=!0,p(null,function(){var e=n.status,t=n.statusText;if(s&&void 0===e)e=200;else{if(12e3<e&&e<12156)return m();e=1223===n.status?204:n.status,t=1223===n.status?"No Content":t}return{body:n.response||n.responseText,url:o.url,method:o.method,headers:s?{}:g(n.getAllResponseHeaders()),statusCode:e,statusMessage:t}}())))},n.open(o.method,o.url,!0),n.withCredentials=!!o.withCredentials,e&&n.setRequestHeader)for(var y in e)e.hasOwnProperty(y)&&n.setRequestHeader(y,e[y]);else if(e&&s)throw new Error("Headers cannot be set on an XDomainRequest object");return o.rawBody&&(n.responseType="arraybuffer"),r.applyMiddleware("onRequest",{options:o,adapter:q,request:n,context:r}),n.send(o.body||null),i&&(t.connect=setTimeout(function(){return w("ETIMEDOUT")},i.connect)),{abort:function(){a=!0,n&&n.abort()}};function w(e){d=!0,n.abort();var t=new Error(("ESOCKETTIMEDOUT"===e?"Socket timed out on request to ":"Connection timed out on request to ").concat(o.url));t.code=e,r.channels.error.publish(t)}function c(e){(e||a||2<=n.readyState&&t.connect)&&clearTimeout(t.connect),t.socket&&clearTimeout(t.socket)}function m(e){u||(c(!0),u=!0,n=null,(e=e||new Error("Network error while attempting to reach ".concat(o.url))).isNetworkError=!0,e.request=o,p(e))}}},{"./browser/fetchXhr":5,"parse-headers":10,"same-origin":13}],5:[function(e,t,r){"use strict";function o(){this.readyState=0}o.prototype.open=function(e,t){this._method=e,this._url=t,this._resHeaders="",this.readyState=1,this.onreadystatechange()},o.prototype.abort=function(){this._controller&&this._controller.abort()},o.prototype.getAllResponseHeaders=function(){return this._resHeaders},o.prototype.setRequestHeader=function(e,t){this._headers=this._headers||{},this._headers[e]=t},o.prototype.send=function(e){var r=this,t=this._controller="function"==typeof AbortController&&new AbortController,o="arraybuffer"!==this.responseType,t={method:this._method,headers:this._headers,signal:t&&t.signal,body:e};"undefined"!=typeof window&&(t.credentials=this.withCredentials?"include":"omit"),fetch(this._url,t).then(function(e){return e.headers.forEach(function(e,t){r._resHeaders+="".concat(t,": ").concat(e,"\r\n")}),r.status=e.status,r.statusText=e.statusText,r.readyState=3,o?e.text():e.arrayBuffer()}).then(function(e){o?r.responseText=e:r.response=e,r.readyState=4,r.onreadystatechange()}).catch(function(e){"AbortError"!==e.name?r.onerror(e):r.onabort()})},t.exports=o},{}],6:[function(e,t,r){"use strict";t.exports=e("./node-request")},{"./node-request":4}],7:[function(e,t,r){"use strict";t.exports=function(u){return function(e,t){for(var r="onError"===e,o=t,n=arguments.length,s=new Array(2<n?n-2:0),i=2;i<n;i++)s[i-2]=arguments[i];for(var a=0;a<u[e].length&&(o=u[e][a].apply(void 0,[o].concat(s)),!r||o);a++);return o}}},{}],8:[function(e,t,r){t.exports=function(){var r=[];return{subscribe:function(t){return r.push(t),function(){var e=r.indexOf(t);-1<e&&r.splice(e,1)}},publish:function(){for(var e=0;e<r.length;e++)r[e].apply(null,arguments)}}}},{}],9:[function(e,t,r){"use strict";var u=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return}}()?Object.assign:function(e,t){for(var r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),n=1;n<arguments.length;n++){for(var s in r=Object(arguments[n]))c.call(r,s)&&(o[s]=r[s]);if(u)for(var i=u(r),a=0;a<i.length;a++)p.call(r,i[a])&&(o[i[a]]=r[i[a]])}return o}},{}],10:[function(e,t,r){function a(e){return e.replace(/^\s+|\s+$/g,"")}t.exports=function(e){if(!e)return{};for(var t={},r=a(e).split("\n"),o=0;o<r.length;o++){var n=r[o],s=n.indexOf(":"),i=a(n.slice(0,s)).toLowerCase(),n=a(n.slice(s+1));void 0===t[i]?t[i]=n:(s=t[i],"[object Array]"===Object.prototype.toString.call(s)?t[i].push(n):t[i]=[t[i],n])}return t}},{}],11:[function(e,t,r){"use strict";var s=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}r.stringify=function(e,t){var r,o,n=[];for(o in"string"!=typeof(t=t||"")&&(t="?"),e)if(s.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=encodeURIComponent(o),r=encodeURIComponent(r),null===o||null===r)continue;n.push(o+"="+r)}return n.length?t+n.join("&"):""},r.parse=function(e){for(var t=/([^=?&]+)=?([^&]*)/g,r={};n=t.exec(e);){var o=i(n[1]),n=i(n[2]);null===o||null===n||o in r||(r[o]=n)}return r}},{}],12:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],13:[function(e,t,r){"use strict";var i=e("url");t.exports=function(e,t,r){if(e===t)return!0;var e=i.parse(e,!1,!0),t=i.parse(t,!1,!0),o=0|e.port||("https"===e.protocol?443:80),n=0|t.port||("https"===t.protocol?443:80),s=e.protocol===t.protocol,e=e.hostname===t.hostname;return s&&e&&(o===n||r)}},{url:14}],14:[function(e,t,r){"use strict";var o=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:o,parse:function(e){e=o.exec(e);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}}},{}],15:[function(e,r,t){!function(n){"use strict";var f=e("requires-port"),h=e("querystringify"),i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,v=/^[a-zA-Z]:/,t=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function d(e){return(e||"").toString().replace(t,"")}var y=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],s={hash:1,query:1};function w(e){var t,r=("undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:{}).location||{},o={},r=typeof(e=e||r);if("blob:"===e.protocol)o=new g(unescape(e.pathname),{});else if("string"==r)for(t in o=new g(e,{}),s)delete o[t];else if("object"==r){for(t in e)t in s||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=i.test(e.href))}return o}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function b(e,t){e=d(e),t=t||{};var r,e=a.exec(e),o=e[1]?e[1].toLowerCase():"",n=!!e[2],s=!!e[3],i=0;return n?i=s?(r=e[2]+e[3]+e[4],e[2].length+e[3].length):(r=e[2]+e[4],e[2].length):s?(r=e[3]+e[4],i=e[3].length):r=e[4],"file:"===o?2<=i&&(r=r.slice(2)):m(o)?r=e[4]:o?n&&(r=r.slice(2)):2<=i&&m(t.protocol)&&(r=e[4]),{protocol:o,slashes:n||m(o),slashesCount:i,rest:r}}function g(e,t,r){if(e=d(e),!(this instanceof g))return new g(e,t,r);var o,n,s,i,a,p=y.slice(),u=typeof t,c=this,l=0;for("object"!=u&&"string"!=u&&(r=t,t=null),r&&"function"!=typeof r&&(r=h.parse),o=!(u=b(e||"",t=w(t))).protocol&&!u.slashes,c.slashes=u.slashes||o&&t.slashes,c.protocol=u.protocol||t.protocol||"",e=u.rest,("file:"===u.protocol&&(2!==u.slashesCount||v.test(e))||!u.slashes&&(u.protocol||u.slashesCount<2||!m(c.protocol)))&&(p[3]=[/(.*)/,"pathname"]);l<p.length;l++)"function"!=typeof(s=p[l])?(n=s[0],a=s[1],n!=n?c[a]=e:"string"==typeof n?~(i=e.indexOf(n))&&(e="number"==typeof s[2]?(c[a]=e.slice(0,i),e.slice(i+s[2])):(c[a]=e.slice(i),e.slice(0,i))):(i=n.exec(e))&&(c[a]=i[1],e=e.slice(0,i.index)),c[a]=c[a]||o&&s[3]&&t[a]||"",s[4]&&(c[a]=c[a].toLowerCase())):e=s(e,c);r&&(c.query=r(c.query)),o&&t.slashes&&"/"!==c.pathname.charAt(0)&&(""!==c.pathname||""!==t.pathname)&&(c.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=r.length,t=r[o-1],n=!1,s=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),s++):s&&(0===o&&(n=!0),r.splice(o,1),s--);return n&&r.unshift(""),"."!==t&&".."!==t||r.push(""),r.join("/")}(c.pathname,t.pathname)),"/"!==c.pathname.charAt(0)&&m(c.protocol)&&(c.pathname="/"+c.pathname),f(c.port,c.protocol)||(c.host=c.hostname,c.port=""),c.username=c.password="",c.auth&&(s=c.auth.split(":"),c.username=s[0],c.password=s[1]||""),c.origin="file:"!==c.protocol&&m(c.protocol)&&c.host?c.protocol+"//"+c.host:"null",c.href=c.toString()}g.prototype={set:function(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||h.parse)(t)),o[e]=t;break;case"port":o[e]=t,f(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,/:\d+$/.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":case"hash":t?(n="pathname"===e?"/":"#",o[e]=t.charAt(0)!==n?n+t:t):o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var n=t.split(":");o.username=n[0],o.password=2===n.length?n[1]:""}for(var s=0;s<y.length;s++){var i=y[s];i[4]&&(o[i[1]]=o[i[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=h.stringify);var t=this,r=((r=t.protocol)&&":"!==r.charAt(r.length-1)&&(r+=":"),r+(t.protocol&&t.slashes||m(t.protocol)?"//":""));return t.username?(r+=t.username,t.password&&(r+=":"+t.password),r+="@"):t.password&&(r=r+(":"+t.password)+"@"),r+=t.host+t.pathname,(e="object"==typeof t.query?e(t.query):t.query)&&(r+="?"!==e.charAt(0)?"?"+e:e),t.hash&&(r+=t.hash),r}},g.extractProtocol=b,g.location=w,g.trimLeft=d,g.qs=h,r.exports=g}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{querystringify:11,"requires-port":12}]},{},[1])(1)});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc