use standard URLSearchParams insead of custom functions
This commit is contained in:
@@ -11,7 +11,11 @@
|
||||
<body>
|
||||
<div class="js-main-content"></div>
|
||||
|
||||
<!-- ie support -->
|
||||
<script type="text/javascript" src="node_modules/es6-promise/dist/es6-promise.auto.js"></script>
|
||||
<script type="text/javascript" src="node_modules/@ungap/url-search-params/index.js"></script>
|
||||
<!-- /ie support -->
|
||||
|
||||
<script type="text/javascript" src="node_modules/jquery/dist/jquery.js"></script>
|
||||
<script type="text/javascript" src="node_modules/i18next/i18next.js"></script>
|
||||
<script type="text/javascript" src="node_modules/i18next-browser-languagedetector/i18nextBrowserLanguageDetector.js"></script>
|
||||
|
42
js/index.js
42
js/index.js
@@ -4,34 +4,8 @@
|
||||
|
||||
|
||||
// utility functions
|
||||
MyApp.Utils.getUrlParameter = function(name) {
|
||||
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||||
var results = regex.exec(location.search);
|
||||
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
MyApp.Utils.removeURLParameter = function(url, parameter) {
|
||||
//prefer to use l.search if you have a location/link object
|
||||
var urlparts = url.split('?');
|
||||
if (urlparts.length >= 2) {
|
||||
|
||||
var prefix = encodeURIComponent(parameter) + '=';
|
||||
var pars = urlparts[1].split(/[&;]/g);
|
||||
|
||||
//reverse iteration as may be destructive
|
||||
for (var i = pars.length; i-- > 0;) {
|
||||
//idiom for string.startsWith
|
||||
if (pars[i].lastIndexOf(prefix, 0) !== -1) {
|
||||
pars.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : '');
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
// MyApp.Utils.someUtilityFunction = function() {}
|
||||
// MyApp.Utils.someOtherUtilityFunction = function() {}
|
||||
|
||||
// app functions
|
||||
MyApp.renderShell = function() {
|
||||
@@ -94,8 +68,8 @@
|
||||
cookieMinutes: 5256000
|
||||
},
|
||||
whitelist: ['en', 'de', 'it'],
|
||||
fallbackLng: 'it',
|
||||
load: 'languageOnly',
|
||||
fallbackLng: 'it',
|
||||
backend: {
|
||||
loadPath: '/i18n/{{lng}}.json'
|
||||
}
|
||||
@@ -103,10 +77,12 @@
|
||||
.then(function() {
|
||||
// language initialized
|
||||
// if there is a lang query string parameter, remove it and reload: we save the language in a cookie so the url stays nice
|
||||
if (MyApp.Utils.getUrlParameter('lang')) {
|
||||
var newUrl = MyApp.Utils.removeURLParameter(window.location.toString(), 'lang');
|
||||
//removeURLParameter does not return the hash. add it back if there is one.
|
||||
newUrl = newUrl + window.location.hash;
|
||||
var urlQueryString = new URLSearchParams(window.location.search);
|
||||
if (urlQueryString.has('lang')) {
|
||||
urlQueryString.delete('lang');
|
||||
var newUrl = [location.protocol, '//', location.host, location.pathname].join('') +
|
||||
urlQueryString.toString() +
|
||||
window.location.hash;
|
||||
window.location = newUrl;
|
||||
return;
|
||||
}
|
||||
|
15
node_modules/@ungap/url-search-params/LICENSE
generated
vendored
Normal file
15
node_modules/@ungap/url-search-params/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2018, Andrea Giammarchi, @WebReflection
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
22
node_modules/@ungap/url-search-params/README.md
generated
vendored
Normal file
22
node_modules/@ungap/url-search-params/README.md
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# URLSearchParams
|
||||
|
||||
[](https://travis-ci.com/ungap/url-search-params) [](https://coveralls.io/github/ungap/url-search-params?branch=master) [](https://greenkeeper.io/) 
|
||||
|
||||
|
||||
The [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) polyfill.
|
||||
|
||||
Previously known as [url-search-params](https://github.com/WebReflection/url-search-params).
|
||||
|
||||
All detections have been included and the code covered 100% (DOM patches are not measured on NodeJS though).
|
||||
|
||||
* CDN global patch via https://unpkg.com/@ungap/url-search-params
|
||||
* ESM via `import URLSearchParams from '@ungap/url-search-params'`
|
||||
* CJS via `const URLSearchParams = require('@ungap/url-search-params')`
|
||||
|
||||
[Live test](https://ungap.github.io/url-search-params/test/)
|
||||
|
||||
### ⚠ Webpack Users
|
||||
|
||||
If you have issues just requiring `@ungap/url-search-params`, be sure you require `@ungap/url-search-params/cjs` instead.
|
||||
|
||||
No issue should happen if you just `import` the module instead.
|
375
node_modules/@ungap/url-search-params/cjs/index.js
generated
vendored
Normal file
375
node_modules/@ungap/url-search-params/cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,375 @@
|
||||
/*! (c) Andrea Giammarchi - ISC */
|
||||
var self = this || /* istanbul ignore next */ {};
|
||||
try {
|
||||
(function (URLSearchParams, plus) {
|
||||
if (
|
||||
new URLSearchParams('q=%2B').get('q') !== plus ||
|
||||
new URLSearchParams({q: plus}).get('q') !== plus ||
|
||||
new URLSearchParams([['q', plus]]).get('q') !== plus ||
|
||||
new URLSearchParams('q=\n').toString() !== 'q=%0A' ||
|
||||
new URLSearchParams({q: ' &'}).toString() !== 'q=+%26' ||
|
||||
new URLSearchParams({q: '%zx'}).toString() !== 'q=%25zx'
|
||||
)
|
||||
throw URLSearchParams;
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
}(URLSearchParams, '+'));
|
||||
} catch(URLSearchParams) {
|
||||
(function (Object, String, isArray) {'use strict';
|
||||
var create = Object.create;
|
||||
var defineProperty = Object.defineProperty;
|
||||
var find = /[!'\(\)~]|%20|%00/g;
|
||||
var findPercentSign = /%(?![0-9a-fA-F]{2})/g;
|
||||
var plus = /\+/g;
|
||||
var replace = {
|
||||
'!': '%21',
|
||||
"'": '%27',
|
||||
'(': '%28',
|
||||
')': '%29',
|
||||
'~': '%7E',
|
||||
'%20': '+',
|
||||
'%00': '\x00'
|
||||
};
|
||||
var proto = {
|
||||
append: function (key, value) {
|
||||
appendTo(this._ungap, key, value);
|
||||
},
|
||||
delete: function (key) {
|
||||
delete this._ungap[key];
|
||||
},
|
||||
get: function (key) {
|
||||
return this.has(key) ? this._ungap[key][0] : null;
|
||||
},
|
||||
getAll: function (key) {
|
||||
return this.has(key) ? this._ungap[key].slice(0) : [];
|
||||
},
|
||||
has: function (key) {
|
||||
return key in this._ungap;
|
||||
},
|
||||
set: function (key, value) {
|
||||
this._ungap[key] = [String(value)];
|
||||
},
|
||||
forEach: function (callback, thisArg) {
|
||||
var self = this;
|
||||
for (var key in self._ungap)
|
||||
self._ungap[key].forEach(invoke, key);
|
||||
function invoke(value) {
|
||||
callback.call(thisArg, value, String(key), self);
|
||||
}
|
||||
},
|
||||
toJSON: function () {
|
||||
return {};
|
||||
},
|
||||
toString: function () {
|
||||
var query = [];
|
||||
for (var key in this._ungap) {
|
||||
var encoded = encode(key);
|
||||
for (var
|
||||
i = 0,
|
||||
value = this._ungap[key];
|
||||
i < value.length; i++
|
||||
) {
|
||||
query.push(encoded + '=' + encode(value[i]));
|
||||
}
|
||||
}
|
||||
return query.join('&');
|
||||
}
|
||||
};
|
||||
for (var key in proto)
|
||||
defineProperty(URLSearchParams.prototype, key, {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: proto[key]
|
||||
});
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
function URLSearchParams(query) {
|
||||
var dict = create(null);
|
||||
defineProperty(this, '_ungap', {value: dict});
|
||||
switch (true) {
|
||||
case !query:
|
||||
break;
|
||||
case typeof query === 'string':
|
||||
if (query.charAt(0) === '?') {
|
||||
query = query.slice(1);
|
||||
}
|
||||
for (var
|
||||
pairs = query.split('&'),
|
||||
i = 0,
|
||||
length = pairs.length; i < length; i++
|
||||
) {
|
||||
var value = pairs[i];
|
||||
var index = value.indexOf('=');
|
||||
if (-1 < index) {
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value.slice(0, index)),
|
||||
decode(value.slice(index + 1))
|
||||
);
|
||||
} else if (value.length){
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value),
|
||||
''
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case isArray(query):
|
||||
for (var
|
||||
i = 0,
|
||||
length = query.length; i < length; i++
|
||||
) {
|
||||
var value = query[i];
|
||||
appendTo(dict, value[0], value[1]);
|
||||
}
|
||||
break;
|
||||
case 'forEach' in query:
|
||||
query.forEach(addEach, dict);
|
||||
break;
|
||||
default:
|
||||
for (var key in query)
|
||||
appendTo(dict, key, query[key]);
|
||||
}
|
||||
}
|
||||
|
||||
function addEach(value, key) {
|
||||
appendTo(this, key, value);
|
||||
}
|
||||
|
||||
function appendTo(dict, key, value) {
|
||||
var res = isArray(value) ? value.join(',') : value;
|
||||
if (key in dict)
|
||||
dict[key].push(res);
|
||||
else
|
||||
dict[key] = [res];
|
||||
}
|
||||
|
||||
function decode(str) {
|
||||
return decodeURIComponent(str.replace(findPercentSign, '%25').replace(plus, ' '));
|
||||
}
|
||||
|
||||
function encode(str) {
|
||||
return encodeURIComponent(str).replace(find, replacer);
|
||||
}
|
||||
|
||||
function replacer(match) {
|
||||
return replace[match];
|
||||
}
|
||||
|
||||
}(Object, String, Array.isArray));
|
||||
}
|
||||
|
||||
(function (URLSearchParamsProto) {
|
||||
|
||||
var iterable = false;
|
||||
try { iterable = !!Symbol.iterator; } catch (o_O) {}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('forEach' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.forEach = function forEach(callback, thisArg) {
|
||||
var self = this;
|
||||
var names = Object.create(null);
|
||||
this.toString()
|
||||
.replace(/=[\s\S]*?(?:&|$)/g, '=')
|
||||
.split('=')
|
||||
.forEach(function (name) {
|
||||
if (!name.length || name in names)
|
||||
return;
|
||||
(names[name] = self.getAll(name)).forEach(function(value) {
|
||||
callback.call(thisArg, value, name, self);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('keys' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.keys = function keys() {
|
||||
return iterator(this, function(value, key) { this.push(key); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('values' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.values = function values() {
|
||||
return iterator(this, function(value, key) { this.push(value); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('entries' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.entries = function entries() {
|
||||
return iterator(this, function(value, key) { this.push([key, value]); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (iterable && !(Symbol.iterator in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto[Symbol.iterator] = URLSearchParamsProto.entries;
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('sort' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.sort = function sort() {
|
||||
var
|
||||
entries = this.entries(),
|
||||
entry = entries.next(),
|
||||
done = entry.done,
|
||||
keys = [],
|
||||
values = Object.create(null),
|
||||
i, key, value
|
||||
;
|
||||
while (!done) {
|
||||
value = entry.value;
|
||||
key = value[0];
|
||||
keys.push(key);
|
||||
if (!(key in values)) {
|
||||
values[key] = [];
|
||||
}
|
||||
values[key].push(value[1]);
|
||||
entry = entries.next();
|
||||
done = entry.done;
|
||||
}
|
||||
// not the champion in efficiency
|
||||
// but these two bits just do the job
|
||||
keys.sort();
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
this.delete(keys[i]);
|
||||
}
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
key = keys[i];
|
||||
this.append(key, values[key].shift());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function iterator(self, callback) {
|
||||
var items = [];
|
||||
self.forEach(callback, items);
|
||||
return iterable ?
|
||||
items[Symbol.iterator]() :
|
||||
{
|
||||
next: function() {
|
||||
var value = items.shift();
|
||||
return {done: value === undefined, value: value};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
(function (Object) {
|
||||
var
|
||||
dP = Object.defineProperty,
|
||||
gOPD = Object.getOwnPropertyDescriptor,
|
||||
createSearchParamsPollute = function (search) {
|
||||
function append(name, value) {
|
||||
URLSearchParamsProto.append.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function del(name) {
|
||||
URLSearchParamsProto.delete.call(this, name);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function set(name, value) {
|
||||
URLSearchParamsProto.set.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
return function (sp, value) {
|
||||
sp.append = append;
|
||||
sp.delete = del;
|
||||
sp.set = set;
|
||||
return dP(sp, '_usp', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: value
|
||||
});
|
||||
};
|
||||
},
|
||||
createSearchParamsCreate = function (polluteSearchParams) {
|
||||
return function (obj, sp) {
|
||||
dP(
|
||||
obj, '_searchParams', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: polluteSearchParams(sp, obj)
|
||||
}
|
||||
);
|
||||
return sp;
|
||||
};
|
||||
},
|
||||
updateSearchParams = function (sp) {
|
||||
var append = sp.append;
|
||||
sp.append = URLSearchParamsProto.append;
|
||||
URLSearchParams.call(sp, sp._usp.search.slice(1));
|
||||
sp.append = append;
|
||||
},
|
||||
verifySearchParams = function (obj, Class) {
|
||||
if (!(obj instanceof Class)) throw new TypeError(
|
||||
"'searchParams' accessed on an object that " +
|
||||
"does not implement interface " + Class.name
|
||||
);
|
||||
},
|
||||
upgradeClass = function (Class) {
|
||||
var
|
||||
ClassProto = Class.prototype,
|
||||
searchParams = gOPD(ClassProto, 'searchParams'),
|
||||
href = gOPD(ClassProto, 'href'),
|
||||
search = gOPD(ClassProto, 'search'),
|
||||
createSearchParams
|
||||
;
|
||||
if (!searchParams && search && search.set) {
|
||||
createSearchParams = createSearchParamsCreate(
|
||||
createSearchParamsPollute(search)
|
||||
);
|
||||
Object.defineProperties(
|
||||
ClassProto,
|
||||
{
|
||||
href: {
|
||||
get: function () {
|
||||
return href.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
href.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
search: {
|
||||
get: function () {
|
||||
return search.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
search.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
searchParams: {
|
||||
get: function () {
|
||||
verifySearchParams(this, Class);
|
||||
return this._searchParams || createSearchParams(
|
||||
this,
|
||||
new URLSearchParams(this.search.slice(1))
|
||||
);
|
||||
},
|
||||
set: function (sp) {
|
||||
verifySearchParams(this, Class);
|
||||
createSearchParams(this, sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
;
|
||||
try {
|
||||
upgradeClass(HTMLAnchorElement);
|
||||
if (/^function|object$/.test(typeof URL) && URL.prototype)
|
||||
upgradeClass(URL);
|
||||
} catch (meh) {}
|
||||
}(Object));
|
||||
|
||||
}(self.URLSearchParams.prototype, Object));
|
||||
module.exports = self.URLSearchParams;
|
375
node_modules/@ungap/url-search-params/esm/index.js
generated
vendored
Normal file
375
node_modules/@ungap/url-search-params/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,375 @@
|
||||
/*! (c) Andrea Giammarchi - ISC */
|
||||
var self = this || /* istanbul ignore next */ {};
|
||||
try {
|
||||
(function (URLSearchParams, plus) {
|
||||
if (
|
||||
new URLSearchParams('q=%2B').get('q') !== plus ||
|
||||
new URLSearchParams({q: plus}).get('q') !== plus ||
|
||||
new URLSearchParams([['q', plus]]).get('q') !== plus ||
|
||||
new URLSearchParams('q=\n').toString() !== 'q=%0A' ||
|
||||
new URLSearchParams({q: ' &'}).toString() !== 'q=+%26' ||
|
||||
new URLSearchParams({q: '%zx'}).toString() !== 'q=%25zx'
|
||||
)
|
||||
throw URLSearchParams;
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
}(URLSearchParams, '+'));
|
||||
} catch(URLSearchParams) {
|
||||
(function (Object, String, isArray) {'use strict';
|
||||
var create = Object.create;
|
||||
var defineProperty = Object.defineProperty;
|
||||
var find = /[!'\(\)~]|%20|%00/g;
|
||||
var findPercentSign = /%(?![0-9a-fA-F]{2})/g;
|
||||
var plus = /\+/g;
|
||||
var replace = {
|
||||
'!': '%21',
|
||||
"'": '%27',
|
||||
'(': '%28',
|
||||
')': '%29',
|
||||
'~': '%7E',
|
||||
'%20': '+',
|
||||
'%00': '\x00'
|
||||
};
|
||||
var proto = {
|
||||
append: function (key, value) {
|
||||
appendTo(this._ungap, key, value);
|
||||
},
|
||||
delete: function (key) {
|
||||
delete this._ungap[key];
|
||||
},
|
||||
get: function (key) {
|
||||
return this.has(key) ? this._ungap[key][0] : null;
|
||||
},
|
||||
getAll: function (key) {
|
||||
return this.has(key) ? this._ungap[key].slice(0) : [];
|
||||
},
|
||||
has: function (key) {
|
||||
return key in this._ungap;
|
||||
},
|
||||
set: function (key, value) {
|
||||
this._ungap[key] = [String(value)];
|
||||
},
|
||||
forEach: function (callback, thisArg) {
|
||||
var self = this;
|
||||
for (var key in self._ungap)
|
||||
self._ungap[key].forEach(invoke, key);
|
||||
function invoke(value) {
|
||||
callback.call(thisArg, value, String(key), self);
|
||||
}
|
||||
},
|
||||
toJSON: function () {
|
||||
return {};
|
||||
},
|
||||
toString: function () {
|
||||
var query = [];
|
||||
for (var key in this._ungap) {
|
||||
var encoded = encode(key);
|
||||
for (var
|
||||
i = 0,
|
||||
value = this._ungap[key];
|
||||
i < value.length; i++
|
||||
) {
|
||||
query.push(encoded + '=' + encode(value[i]));
|
||||
}
|
||||
}
|
||||
return query.join('&');
|
||||
}
|
||||
};
|
||||
for (var key in proto)
|
||||
defineProperty(URLSearchParams.prototype, key, {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: proto[key]
|
||||
});
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
function URLSearchParams(query) {
|
||||
var dict = create(null);
|
||||
defineProperty(this, '_ungap', {value: dict});
|
||||
switch (true) {
|
||||
case !query:
|
||||
break;
|
||||
case typeof query === 'string':
|
||||
if (query.charAt(0) === '?') {
|
||||
query = query.slice(1);
|
||||
}
|
||||
for (var
|
||||
pairs = query.split('&'),
|
||||
i = 0,
|
||||
length = pairs.length; i < length; i++
|
||||
) {
|
||||
var value = pairs[i];
|
||||
var index = value.indexOf('=');
|
||||
if (-1 < index) {
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value.slice(0, index)),
|
||||
decode(value.slice(index + 1))
|
||||
);
|
||||
} else if (value.length){
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value),
|
||||
''
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case isArray(query):
|
||||
for (var
|
||||
i = 0,
|
||||
length = query.length; i < length; i++
|
||||
) {
|
||||
var value = query[i];
|
||||
appendTo(dict, value[0], value[1]);
|
||||
}
|
||||
break;
|
||||
case 'forEach' in query:
|
||||
query.forEach(addEach, dict);
|
||||
break;
|
||||
default:
|
||||
for (var key in query)
|
||||
appendTo(dict, key, query[key]);
|
||||
}
|
||||
}
|
||||
|
||||
function addEach(value, key) {
|
||||
appendTo(this, key, value);
|
||||
}
|
||||
|
||||
function appendTo(dict, key, value) {
|
||||
var res = isArray(value) ? value.join(',') : value;
|
||||
if (key in dict)
|
||||
dict[key].push(res);
|
||||
else
|
||||
dict[key] = [res];
|
||||
}
|
||||
|
||||
function decode(str) {
|
||||
return decodeURIComponent(str.replace(findPercentSign, '%25').replace(plus, ' '));
|
||||
}
|
||||
|
||||
function encode(str) {
|
||||
return encodeURIComponent(str).replace(find, replacer);
|
||||
}
|
||||
|
||||
function replacer(match) {
|
||||
return replace[match];
|
||||
}
|
||||
|
||||
}(Object, String, Array.isArray));
|
||||
}
|
||||
|
||||
(function (URLSearchParamsProto) {
|
||||
|
||||
var iterable = false;
|
||||
try { iterable = !!Symbol.iterator; } catch (o_O) {}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('forEach' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.forEach = function forEach(callback, thisArg) {
|
||||
var self = this;
|
||||
var names = Object.create(null);
|
||||
this.toString()
|
||||
.replace(/=[\s\S]*?(?:&|$)/g, '=')
|
||||
.split('=')
|
||||
.forEach(function (name) {
|
||||
if (!name.length || name in names)
|
||||
return;
|
||||
(names[name] = self.getAll(name)).forEach(function(value) {
|
||||
callback.call(thisArg, value, name, self);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('keys' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.keys = function keys() {
|
||||
return iterator(this, function(value, key) { this.push(key); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('values' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.values = function values() {
|
||||
return iterator(this, function(value, key) { this.push(value); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('entries' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.entries = function entries() {
|
||||
return iterator(this, function(value, key) { this.push([key, value]); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (iterable && !(Symbol.iterator in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto[Symbol.iterator] = URLSearchParamsProto.entries;
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('sort' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.sort = function sort() {
|
||||
var
|
||||
entries = this.entries(),
|
||||
entry = entries.next(),
|
||||
done = entry.done,
|
||||
keys = [],
|
||||
values = Object.create(null),
|
||||
i, key, value
|
||||
;
|
||||
while (!done) {
|
||||
value = entry.value;
|
||||
key = value[0];
|
||||
keys.push(key);
|
||||
if (!(key in values)) {
|
||||
values[key] = [];
|
||||
}
|
||||
values[key].push(value[1]);
|
||||
entry = entries.next();
|
||||
done = entry.done;
|
||||
}
|
||||
// not the champion in efficiency
|
||||
// but these two bits just do the job
|
||||
keys.sort();
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
this.delete(keys[i]);
|
||||
}
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
key = keys[i];
|
||||
this.append(key, values[key].shift());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function iterator(self, callback) {
|
||||
var items = [];
|
||||
self.forEach(callback, items);
|
||||
return iterable ?
|
||||
items[Symbol.iterator]() :
|
||||
{
|
||||
next: function() {
|
||||
var value = items.shift();
|
||||
return {done: value === undefined, value: value};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
(function (Object) {
|
||||
var
|
||||
dP = Object.defineProperty,
|
||||
gOPD = Object.getOwnPropertyDescriptor,
|
||||
createSearchParamsPollute = function (search) {
|
||||
function append(name, value) {
|
||||
URLSearchParamsProto.append.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function del(name) {
|
||||
URLSearchParamsProto.delete.call(this, name);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function set(name, value) {
|
||||
URLSearchParamsProto.set.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
return function (sp, value) {
|
||||
sp.append = append;
|
||||
sp.delete = del;
|
||||
sp.set = set;
|
||||
return dP(sp, '_usp', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: value
|
||||
});
|
||||
};
|
||||
},
|
||||
createSearchParamsCreate = function (polluteSearchParams) {
|
||||
return function (obj, sp) {
|
||||
dP(
|
||||
obj, '_searchParams', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: polluteSearchParams(sp, obj)
|
||||
}
|
||||
);
|
||||
return sp;
|
||||
};
|
||||
},
|
||||
updateSearchParams = function (sp) {
|
||||
var append = sp.append;
|
||||
sp.append = URLSearchParamsProto.append;
|
||||
URLSearchParams.call(sp, sp._usp.search.slice(1));
|
||||
sp.append = append;
|
||||
},
|
||||
verifySearchParams = function (obj, Class) {
|
||||
if (!(obj instanceof Class)) throw new TypeError(
|
||||
"'searchParams' accessed on an object that " +
|
||||
"does not implement interface " + Class.name
|
||||
);
|
||||
},
|
||||
upgradeClass = function (Class) {
|
||||
var
|
||||
ClassProto = Class.prototype,
|
||||
searchParams = gOPD(ClassProto, 'searchParams'),
|
||||
href = gOPD(ClassProto, 'href'),
|
||||
search = gOPD(ClassProto, 'search'),
|
||||
createSearchParams
|
||||
;
|
||||
if (!searchParams && search && search.set) {
|
||||
createSearchParams = createSearchParamsCreate(
|
||||
createSearchParamsPollute(search)
|
||||
);
|
||||
Object.defineProperties(
|
||||
ClassProto,
|
||||
{
|
||||
href: {
|
||||
get: function () {
|
||||
return href.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
href.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
search: {
|
||||
get: function () {
|
||||
return search.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
search.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
searchParams: {
|
||||
get: function () {
|
||||
verifySearchParams(this, Class);
|
||||
return this._searchParams || createSearchParams(
|
||||
this,
|
||||
new URLSearchParams(this.search.slice(1))
|
||||
);
|
||||
},
|
||||
set: function (sp) {
|
||||
verifySearchParams(this, Class);
|
||||
createSearchParams(this, sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
;
|
||||
try {
|
||||
upgradeClass(HTMLAnchorElement);
|
||||
if (/^function|object$/.test(typeof URL) && URL.prototype)
|
||||
upgradeClass(URL);
|
||||
} catch (meh) {}
|
||||
}(Object));
|
||||
|
||||
}(self.URLSearchParams.prototype, Object));
|
||||
export default self.URLSearchParams;
|
1
node_modules/@ungap/url-search-params/index.d.ts
generated
vendored
Normal file
1
node_modules/@ungap/url-search-params/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export = URLSearchParams
|
374
node_modules/@ungap/url-search-params/index.js
generated
vendored
Normal file
374
node_modules/@ungap/url-search-params/index.js
generated
vendored
Normal file
@@ -0,0 +1,374 @@
|
||||
/*! (c) Andrea Giammarchi - ISC */
|
||||
var self = this || /* istanbul ignore next */ {};
|
||||
try {
|
||||
(function (URLSearchParams, plus) {
|
||||
if (
|
||||
new URLSearchParams('q=%2B').get('q') !== plus ||
|
||||
new URLSearchParams({q: plus}).get('q') !== plus ||
|
||||
new URLSearchParams([['q', plus]]).get('q') !== plus ||
|
||||
new URLSearchParams('q=\n').toString() !== 'q=%0A' ||
|
||||
new URLSearchParams({q: ' &'}).toString() !== 'q=+%26' ||
|
||||
new URLSearchParams({q: '%zx'}).toString() !== 'q=%25zx'
|
||||
)
|
||||
throw URLSearchParams;
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
}(URLSearchParams, '+'));
|
||||
} catch(URLSearchParams) {
|
||||
(function (Object, String, isArray) {'use strict';
|
||||
var create = Object.create;
|
||||
var defineProperty = Object.defineProperty;
|
||||
var find = /[!'\(\)~]|%20|%00/g;
|
||||
var findPercentSign = /%(?![0-9a-fA-F]{2})/g;
|
||||
var plus = /\+/g;
|
||||
var replace = {
|
||||
'!': '%21',
|
||||
"'": '%27',
|
||||
'(': '%28',
|
||||
')': '%29',
|
||||
'~': '%7E',
|
||||
'%20': '+',
|
||||
'%00': '\x00'
|
||||
};
|
||||
var proto = {
|
||||
append: function (key, value) {
|
||||
appendTo(this._ungap, key, value);
|
||||
},
|
||||
delete: function (key) {
|
||||
delete this._ungap[key];
|
||||
},
|
||||
get: function (key) {
|
||||
return this.has(key) ? this._ungap[key][0] : null;
|
||||
},
|
||||
getAll: function (key) {
|
||||
return this.has(key) ? this._ungap[key].slice(0) : [];
|
||||
},
|
||||
has: function (key) {
|
||||
return key in this._ungap;
|
||||
},
|
||||
set: function (key, value) {
|
||||
this._ungap[key] = [String(value)];
|
||||
},
|
||||
forEach: function (callback, thisArg) {
|
||||
var self = this;
|
||||
for (var key in self._ungap)
|
||||
self._ungap[key].forEach(invoke, key);
|
||||
function invoke(value) {
|
||||
callback.call(thisArg, value, String(key), self);
|
||||
}
|
||||
},
|
||||
toJSON: function () {
|
||||
return {};
|
||||
},
|
||||
toString: function () {
|
||||
var query = [];
|
||||
for (var key in this._ungap) {
|
||||
var encoded = encode(key);
|
||||
for (var
|
||||
i = 0,
|
||||
value = this._ungap[key];
|
||||
i < value.length; i++
|
||||
) {
|
||||
query.push(encoded + '=' + encode(value[i]));
|
||||
}
|
||||
}
|
||||
return query.join('&');
|
||||
}
|
||||
};
|
||||
for (var key in proto)
|
||||
defineProperty(URLSearchParams.prototype, key, {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: proto[key]
|
||||
});
|
||||
self.URLSearchParams = URLSearchParams;
|
||||
function URLSearchParams(query) {
|
||||
var dict = create(null);
|
||||
defineProperty(this, '_ungap', {value: dict});
|
||||
switch (true) {
|
||||
case !query:
|
||||
break;
|
||||
case typeof query === 'string':
|
||||
if (query.charAt(0) === '?') {
|
||||
query = query.slice(1);
|
||||
}
|
||||
for (var
|
||||
pairs = query.split('&'),
|
||||
i = 0,
|
||||
length = pairs.length; i < length; i++
|
||||
) {
|
||||
var value = pairs[i];
|
||||
var index = value.indexOf('=');
|
||||
if (-1 < index) {
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value.slice(0, index)),
|
||||
decode(value.slice(index + 1))
|
||||
);
|
||||
} else if (value.length){
|
||||
appendTo(
|
||||
dict,
|
||||
decode(value),
|
||||
''
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case isArray(query):
|
||||
for (var
|
||||
i = 0,
|
||||
length = query.length; i < length; i++
|
||||
) {
|
||||
var value = query[i];
|
||||
appendTo(dict, value[0], value[1]);
|
||||
}
|
||||
break;
|
||||
case 'forEach' in query:
|
||||
query.forEach(addEach, dict);
|
||||
break;
|
||||
default:
|
||||
for (var key in query)
|
||||
appendTo(dict, key, query[key]);
|
||||
}
|
||||
}
|
||||
|
||||
function addEach(value, key) {
|
||||
appendTo(this, key, value);
|
||||
}
|
||||
|
||||
function appendTo(dict, key, value) {
|
||||
var res = isArray(value) ? value.join(',') : value;
|
||||
if (key in dict)
|
||||
dict[key].push(res);
|
||||
else
|
||||
dict[key] = [res];
|
||||
}
|
||||
|
||||
function decode(str) {
|
||||
return decodeURIComponent(str.replace(findPercentSign, '%25').replace(plus, ' '));
|
||||
}
|
||||
|
||||
function encode(str) {
|
||||
return encodeURIComponent(str).replace(find, replacer);
|
||||
}
|
||||
|
||||
function replacer(match) {
|
||||
return replace[match];
|
||||
}
|
||||
|
||||
}(Object, String, Array.isArray));
|
||||
}
|
||||
|
||||
(function (URLSearchParamsProto) {
|
||||
|
||||
var iterable = false;
|
||||
try { iterable = !!Symbol.iterator; } catch (o_O) {}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('forEach' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.forEach = function forEach(callback, thisArg) {
|
||||
var self = this;
|
||||
var names = Object.create(null);
|
||||
this.toString()
|
||||
.replace(/=[\s\S]*?(?:&|$)/g, '=')
|
||||
.split('=')
|
||||
.forEach(function (name) {
|
||||
if (!name.length || name in names)
|
||||
return;
|
||||
(names[name] = self.getAll(name)).forEach(function(value) {
|
||||
callback.call(thisArg, value, name, self);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('keys' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.keys = function keys() {
|
||||
return iterator(this, function(value, key) { this.push(key); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('values' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.values = function values() {
|
||||
return iterator(this, function(value, key) { this.push(value); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('entries' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.entries = function entries() {
|
||||
return iterator(this, function(value, key) { this.push([key, value]); });
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (iterable && !(Symbol.iterator in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto[Symbol.iterator] = URLSearchParamsProto.entries;
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (!('sort' in URLSearchParamsProto)) {
|
||||
URLSearchParamsProto.sort = function sort() {
|
||||
var
|
||||
entries = this.entries(),
|
||||
entry = entries.next(),
|
||||
done = entry.done,
|
||||
keys = [],
|
||||
values = Object.create(null),
|
||||
i, key, value
|
||||
;
|
||||
while (!done) {
|
||||
value = entry.value;
|
||||
key = value[0];
|
||||
keys.push(key);
|
||||
if (!(key in values)) {
|
||||
values[key] = [];
|
||||
}
|
||||
values[key].push(value[1]);
|
||||
entry = entries.next();
|
||||
done = entry.done;
|
||||
}
|
||||
// not the champion in efficiency
|
||||
// but these two bits just do the job
|
||||
keys.sort();
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
this.delete(keys[i]);
|
||||
}
|
||||
for (i = 0; i < keys.length; i++) {
|
||||
key = keys[i];
|
||||
this.append(key, values[key].shift());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function iterator(self, callback) {
|
||||
var items = [];
|
||||
self.forEach(callback, items);
|
||||
return iterable ?
|
||||
items[Symbol.iterator]() :
|
||||
{
|
||||
next: function() {
|
||||
var value = items.shift();
|
||||
return {done: value === undefined, value: value};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
(function (Object) {
|
||||
var
|
||||
dP = Object.defineProperty,
|
||||
gOPD = Object.getOwnPropertyDescriptor,
|
||||
createSearchParamsPollute = function (search) {
|
||||
function append(name, value) {
|
||||
URLSearchParamsProto.append.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function del(name) {
|
||||
URLSearchParamsProto.delete.call(this, name);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
function set(name, value) {
|
||||
URLSearchParamsProto.set.call(this, name, value);
|
||||
name = this.toString();
|
||||
search.set.call(this._usp, name ? ('?' + name) : '');
|
||||
}
|
||||
return function (sp, value) {
|
||||
sp.append = append;
|
||||
sp.delete = del;
|
||||
sp.set = set;
|
||||
return dP(sp, '_usp', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: value
|
||||
});
|
||||
};
|
||||
},
|
||||
createSearchParamsCreate = function (polluteSearchParams) {
|
||||
return function (obj, sp) {
|
||||
dP(
|
||||
obj, '_searchParams', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: polluteSearchParams(sp, obj)
|
||||
}
|
||||
);
|
||||
return sp;
|
||||
};
|
||||
},
|
||||
updateSearchParams = function (sp) {
|
||||
var append = sp.append;
|
||||
sp.append = URLSearchParamsProto.append;
|
||||
URLSearchParams.call(sp, sp._usp.search.slice(1));
|
||||
sp.append = append;
|
||||
},
|
||||
verifySearchParams = function (obj, Class) {
|
||||
if (!(obj instanceof Class)) throw new TypeError(
|
||||
"'searchParams' accessed on an object that " +
|
||||
"does not implement interface " + Class.name
|
||||
);
|
||||
},
|
||||
upgradeClass = function (Class) {
|
||||
var
|
||||
ClassProto = Class.prototype,
|
||||
searchParams = gOPD(ClassProto, 'searchParams'),
|
||||
href = gOPD(ClassProto, 'href'),
|
||||
search = gOPD(ClassProto, 'search'),
|
||||
createSearchParams
|
||||
;
|
||||
if (!searchParams && search && search.set) {
|
||||
createSearchParams = createSearchParamsCreate(
|
||||
createSearchParamsPollute(search)
|
||||
);
|
||||
Object.defineProperties(
|
||||
ClassProto,
|
||||
{
|
||||
href: {
|
||||
get: function () {
|
||||
return href.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
href.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
search: {
|
||||
get: function () {
|
||||
return search.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
var sp = this._searchParams;
|
||||
search.set.call(this, value);
|
||||
if (sp) updateSearchParams(sp);
|
||||
}
|
||||
},
|
||||
searchParams: {
|
||||
get: function () {
|
||||
verifySearchParams(this, Class);
|
||||
return this._searchParams || createSearchParams(
|
||||
this,
|
||||
new URLSearchParams(this.search.slice(1))
|
||||
);
|
||||
},
|
||||
set: function (sp) {
|
||||
verifySearchParams(this, Class);
|
||||
createSearchParams(this, sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
;
|
||||
try {
|
||||
upgradeClass(HTMLAnchorElement);
|
||||
if (/^function|object$/.test(typeof URL) && URL.prototype)
|
||||
upgradeClass(URL);
|
||||
} catch (meh) {}
|
||||
}(Object));
|
||||
|
||||
}(self.URLSearchParams.prototype, Object));
|
2
node_modules/@ungap/url-search-params/min.js
generated
vendored
Normal file
2
node_modules/@ungap/url-search-params/min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/*! (c) Andrea Giammarchi - ISC */
|
||||
var self=this||{};try{!function(t,e){if(new t("q=%2B").get("q")!==e||new t({q:e}).get("q")!==e||new t([["q",e]]).get("q")!==e||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;self.URLSearchParams=t}(URLSearchParams,"+")}catch(t){!function(t,a,o){"use strict";var u=t.create,h=t.defineProperty,e=/[!'\(\)~]|%20|%00/g,n=/%(?![0-9a-fA-F]{2})/g,r=/\+/g,i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},s={append:function(t,e){p(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,e){this._ungap[t]=[a(e)]},forEach:function(e,n){var r=this;for(var i in r._ungap)r._ungap[i].forEach(t,i);function t(t){e.call(n,t,a(i),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=v(e),r=0,i=this._ungap[e];r<i.length;r++)t.push(n+"="+v(i[r]));return t.join("&")}};for(var c in s)h(f.prototype,c,{configurable:!0,writable:!0,value:s[c]});function f(t){var e=u(null);switch(h(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var n=t.split("&"),r=0,i=n.length;r<i;r++){var a=(s=n[r]).indexOf("=");-1<a?p(e,g(s.slice(0,a)),g(s.slice(a+1))):s.length&&p(e,g(s),"")}break;case o(t):for(r=0,i=t.length;r<i;r++){var s;p(e,(s=t[r])[0],s[1])}break;case"forEach"in t:t.forEach(l,e);break;default:for(var c in t)p(e,c,t[c])}}function l(t,e){p(this,e,t)}function p(t,e,n){var r=o(n)?n.join(","):n;e in t?t[e].push(r):t[e]=[r]}function g(t){return decodeURIComponent(t.replace(n,"%25").replace(r," "))}function v(t){return encodeURIComponent(t).replace(e,d)}function d(t){return i[t]}self.URLSearchParams=f}(Object,String,Array.isArray)}!function(d){var r=!1;try{r=!!Symbol.iterator}catch(t){}function t(t,e){var n=[];return t.forEach(e,n),r?n[Symbol.iterator]():{next:function(){var t=n.shift();return{done:void 0===t,value:t}}}}"forEach"in d||(d.forEach=function(n,r){var i=this,t=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach(function(e){!e.length||e in t||(t[e]=i.getAll(e)).forEach(function(t){n.call(r,t,e,i)})})}),"keys"in d||(d.keys=function(){return t(this,function(t,e){this.push(e)})}),"values"in d||(d.values=function(){return t(this,function(t,e){this.push(t)})}),"entries"in d||(d.entries=function(){return t(this,function(t,e){this.push([e,t])})}),!r||Symbol.iterator in d||(d[Symbol.iterator]=d.entries),"sort"in d||(d.sort=function(){for(var t,e,n,r=this.entries(),i=r.next(),a=i.done,s=[],c=Object.create(null);!a;)e=(n=i.value)[0],s.push(e),e in c||(c[e]=[]),c[e].push(n[1]),a=(i=r.next()).done;for(s.sort(),t=0;t<s.length;t++)this.delete(s[t]);for(t=0;t<s.length;t++)e=s[t],this.append(e,c[e].shift())}),function(f){function l(t){var e=t.append;t.append=d.append,URLSearchParams.call(t,t._usp.search.slice(1)),t.append=e}function p(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)}function t(e){var n,r,i,t=e.prototype,a=v(t,"searchParams"),s=v(t,"href"),c=v(t,"search");function o(t,e){d.append.call(this,t,e),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}function u(t){d.delete.call(this,t),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}function h(t,e){d.set.call(this,t,e),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}!a&&c&&c.set&&(i=c,r=function(t,e){return t.append=o,t.delete=u,t.set=h,g(t,"_usp",{configurable:!0,writable:!0,value:e})},n=function(t,e){return g(t,"_searchParams",{configurable:!0,writable:!0,value:r(e,t)}),e},f.defineProperties(t,{href:{get:function(){return s.get.call(this)},set:function(t){var e=this._searchParams;s.set.call(this,t),e&&l(e)}},search:{get:function(){return c.get.call(this)},set:function(t){var e=this._searchParams;c.set.call(this,t),e&&l(e)}},searchParams:{get:function(){return p(this,e),this._searchParams||n(this,new URLSearchParams(this.search.slice(1)))},set:function(t){p(this,e),n(this,t)}}}))}var g=f.defineProperty,v=f.getOwnPropertyDescriptor;try{t(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&t(URL)}catch(t){}}(Object)}(self.URLSearchParams.prototype,Object);
|
68
node_modules/@ungap/url-search-params/package.json
generated
vendored
Normal file
68
node_modules/@ungap/url-search-params/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@ungap/url-search-params@0.1.4",
|
||||
"/home/s2/Code/vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_from": "@ungap/url-search-params@0.1.4",
|
||||
"_id": "@ungap/url-search-params@0.1.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-RLwrxCTDNiNev9hpr9rDq8NyeQ8Nn0X1we4Wu7Tlf368I8r+7hBj3uObhifhuLk74egaYaSX5nUsBlWz6kjj+A==",
|
||||
"_location": "/@ungap/url-search-params",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@ungap/url-search-params@0.1.4",
|
||||
"name": "@ungap/url-search-params",
|
||||
"escapedName": "@ungap%2furl-search-params",
|
||||
"scope": "@ungap",
|
||||
"rawSpec": "0.1.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.1.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@ungap/url-search-params/-/url-search-params-0.1.4.tgz",
|
||||
"_spec": "0.1.4",
|
||||
"_where": "/home/s2/Code/vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Andrea Giammarchi"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ungap/url-search-params/issues"
|
||||
},
|
||||
"description": "The URLSearchParams polyfill.",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.9",
|
||||
"istanbul": "^0.4.5",
|
||||
"uglify-js": "^3.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/ungap/url-search-params#readme",
|
||||
"keywords": [
|
||||
"URLSearchParams",
|
||||
"polyfill",
|
||||
"ungap"
|
||||
],
|
||||
"license": "ISC",
|
||||
"main": "cjs/index.js",
|
||||
"module": "esm/index.js",
|
||||
"name": "@ungap/url-search-params",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ungap/url-search-params.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run cjs && npm run esm && npm run min && npm run test && npm run size",
|
||||
"cjs": "cp index.js cjs/ && echo 'module.exports = self.URLSearchParams;' >> cjs/index.js",
|
||||
"coveralls": "cat ./coverage/lcov.info | coveralls",
|
||||
"esm": "cp index.js esm/ && echo 'export default self.URLSearchParams;' >> esm/index.js",
|
||||
"min": "uglifyjs index.js --support-ie8 --comments=/^!/ -c -m -o min.js",
|
||||
"size": "cat index.js | wc -c && cat min.js | wc -c && gzip -c9 min.js | wc -c && cat min.js | brotli | wc -c",
|
||||
"test": "istanbul cover test/index.js"
|
||||
},
|
||||
"unpkg": "min.js",
|
||||
"version": "0.1.4"
|
||||
}
|
912
node_modules/debug/dist/debug.js
generated
vendored
Normal file
912
node_modules/debug/dist/debug.js
generated
vendored
Normal file
@@ -0,0 +1,912 @@
|
||||
"use strict";
|
||||
|
||||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
||||
|
||||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
||||
|
||||
function _typeof(obj) { 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 (f) {
|
||||
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
|
||||
module.exports = f();
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define([], f);
|
||||
} else {
|
||||
var g;
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
g = window;
|
||||
} else if (typeof global !== "undefined") {
|
||||
g = global;
|
||||
} else if (typeof self !== "undefined") {
|
||||
g = self;
|
||||
} else {
|
||||
g = this;
|
||||
}
|
||||
|
||||
g.debug = f();
|
||||
}
|
||||
})(function () {
|
||||
var define, module, exports;
|
||||
return function () {
|
||||
function r(e, n, t) {
|
||||
function o(i, f) {
|
||||
if (!n[i]) {
|
||||
if (!e[i]) {
|
||||
var c = "function" == typeof require && require;
|
||||
if (!f && c) return c(i, !0);
|
||||
if (u) return u(i, !0);
|
||||
var a = new Error("Cannot find module '" + i + "'");
|
||||
throw a.code = "MODULE_NOT_FOUND", a;
|
||||
}
|
||||
|
||||
var p = n[i] = {
|
||||
exports: {}
|
||||
};
|
||||
e[i][0].call(p.exports, function (r) {
|
||||
var n = e[i][1][r];
|
||||
return o(n || r);
|
||||
}, p, p.exports, r, e, n, t);
|
||||
}
|
||||
|
||||
return n[i].exports;
|
||||
}
|
||||
|
||||
for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
|
||||
o(t[i]);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
return r;
|
||||
}()({
|
||||
1: [function (require, module, exports) {
|
||||
/**
|
||||
* Helpers.
|
||||
*/
|
||||
var s = 1000;
|
||||
var m = s * 60;
|
||||
var h = m * 60;
|
||||
var d = h * 24;
|
||||
var w = d * 7;
|
||||
var y = d * 365.25;
|
||||
/**
|
||||
* Parse or format the given `val`.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `long` verbose formatting [false]
|
||||
*
|
||||
* @param {String|Number} val
|
||||
* @param {Object} [options]
|
||||
* @throws {Error} throw an error if val is not a non-empty string or a number
|
||||
* @return {String|Number}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function (val, options) {
|
||||
options = options || {};
|
||||
|
||||
var type = _typeof(val);
|
||||
|
||||
if (type === 'string' && val.length > 0) {
|
||||
return parse(val);
|
||||
} else if (type === 'number' && isNaN(val) === false) {
|
||||
return options.long ? fmtLong(val) : fmtShort(val);
|
||||
}
|
||||
|
||||
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
||||
};
|
||||
/**
|
||||
* Parse the given `str` and return milliseconds.
|
||||
*
|
||||
* @param {String} str
|
||||
* @return {Number}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function parse(str) {
|
||||
str = String(str);
|
||||
|
||||
if (str.length > 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
||||
|
||||
if (!match) {
|
||||
return;
|
||||
}
|
||||
|
||||
var n = parseFloat(match[1]);
|
||||
var type = (match[2] || 'ms').toLowerCase();
|
||||
|
||||
switch (type) {
|
||||
case 'years':
|
||||
case 'year':
|
||||
case 'yrs':
|
||||
case 'yr':
|
||||
case 'y':
|
||||
return n * y;
|
||||
|
||||
case 'weeks':
|
||||
case 'week':
|
||||
case 'w':
|
||||
return n * w;
|
||||
|
||||
case 'days':
|
||||
case 'day':
|
||||
case 'd':
|
||||
return n * d;
|
||||
|
||||
case 'hours':
|
||||
case 'hour':
|
||||
case 'hrs':
|
||||
case 'hr':
|
||||
case 'h':
|
||||
return n * h;
|
||||
|
||||
case 'minutes':
|
||||
case 'minute':
|
||||
case 'mins':
|
||||
case 'min':
|
||||
case 'm':
|
||||
return n * m;
|
||||
|
||||
case 'seconds':
|
||||
case 'second':
|
||||
case 'secs':
|
||||
case 'sec':
|
||||
case 's':
|
||||
return n * s;
|
||||
|
||||
case 'milliseconds':
|
||||
case 'millisecond':
|
||||
case 'msecs':
|
||||
case 'msec':
|
||||
case 'ms':
|
||||
return n;
|
||||
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Short format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function fmtShort(ms) {
|
||||
var msAbs = Math.abs(ms);
|
||||
|
||||
if (msAbs >= d) {
|
||||
return Math.round(ms / d) + 'd';
|
||||
}
|
||||
|
||||
if (msAbs >= h) {
|
||||
return Math.round(ms / h) + 'h';
|
||||
}
|
||||
|
||||
if (msAbs >= m) {
|
||||
return Math.round(ms / m) + 'm';
|
||||
}
|
||||
|
||||
if (msAbs >= s) {
|
||||
return Math.round(ms / s) + 's';
|
||||
}
|
||||
|
||||
return ms + 'ms';
|
||||
}
|
||||
/**
|
||||
* Long format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function fmtLong(ms) {
|
||||
var msAbs = Math.abs(ms);
|
||||
|
||||
if (msAbs >= d) {
|
||||
return plural(ms, msAbs, d, 'day');
|
||||
}
|
||||
|
||||
if (msAbs >= h) {
|
||||
return plural(ms, msAbs, h, 'hour');
|
||||
}
|
||||
|
||||
if (msAbs >= m) {
|
||||
return plural(ms, msAbs, m, 'minute');
|
||||
}
|
||||
|
||||
if (msAbs >= s) {
|
||||
return plural(ms, msAbs, s, 'second');
|
||||
}
|
||||
|
||||
return ms + ' ms';
|
||||
}
|
||||
/**
|
||||
* Pluralization helper.
|
||||
*/
|
||||
|
||||
|
||||
function plural(ms, msAbs, n, name) {
|
||||
var isPlural = msAbs >= n * 1.5;
|
||||
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
||||
}
|
||||
}, {}],
|
||||
2: [function (require, module, exports) {
|
||||
// shim for using process in browser
|
||||
var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
|
||||
// don't break things. But we need to wrap it in a try catch in case it is
|
||||
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
||||
// function because try/catches deoptimize in certain engines.
|
||||
|
||||
var cachedSetTimeout;
|
||||
var cachedClearTimeout;
|
||||
|
||||
function defaultSetTimout() {
|
||||
throw new Error('setTimeout has not been defined');
|
||||
}
|
||||
|
||||
function defaultClearTimeout() {
|
||||
throw new Error('clearTimeout has not been defined');
|
||||
}
|
||||
|
||||
(function () {
|
||||
try {
|
||||
if (typeof setTimeout === 'function') {
|
||||
cachedSetTimeout = setTimeout;
|
||||
} else {
|
||||
cachedSetTimeout = defaultSetTimout;
|
||||
}
|
||||
} catch (e) {
|
||||
cachedSetTimeout = defaultSetTimout;
|
||||
}
|
||||
|
||||
try {
|
||||
if (typeof clearTimeout === 'function') {
|
||||
cachedClearTimeout = clearTimeout;
|
||||
} else {
|
||||
cachedClearTimeout = defaultClearTimeout;
|
||||
}
|
||||
} catch (e) {
|
||||
cachedClearTimeout = defaultClearTimeout;
|
||||
}
|
||||
})();
|
||||
|
||||
function runTimeout(fun) {
|
||||
if (cachedSetTimeout === setTimeout) {
|
||||
//normal enviroments in sane situations
|
||||
return setTimeout(fun, 0);
|
||||
} // if setTimeout wasn't available but was latter defined
|
||||
|
||||
|
||||
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
||||
cachedSetTimeout = setTimeout;
|
||||
return setTimeout(fun, 0);
|
||||
}
|
||||
|
||||
try {
|
||||
// when when somebody has screwed with setTimeout but no I.E. maddness
|
||||
return cachedSetTimeout(fun, 0);
|
||||
} catch (e) {
|
||||
try {
|
||||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
||||
return cachedSetTimeout.call(null, fun, 0);
|
||||
} catch (e) {
|
||||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
||||
return cachedSetTimeout.call(this, fun, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runClearTimeout(marker) {
|
||||
if (cachedClearTimeout === clearTimeout) {
|
||||
//normal enviroments in sane situations
|
||||
return clearTimeout(marker);
|
||||
} // if clearTimeout wasn't available but was latter defined
|
||||
|
||||
|
||||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
||||
cachedClearTimeout = clearTimeout;
|
||||
return clearTimeout(marker);
|
||||
}
|
||||
|
||||
try {
|
||||
// when when somebody has screwed with setTimeout but no I.E. maddness
|
||||
return cachedClearTimeout(marker);
|
||||
} catch (e) {
|
||||
try {
|
||||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
||||
return cachedClearTimeout.call(null, marker);
|
||||
} catch (e) {
|
||||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
||||
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
||||
return cachedClearTimeout.call(this, marker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var queue = [];
|
||||
var draining = false;
|
||||
var currentQueue;
|
||||
var queueIndex = -1;
|
||||
|
||||
function cleanUpNextTick() {
|
||||
if (!draining || !currentQueue) {
|
||||
return;
|
||||
}
|
||||
|
||||
draining = false;
|
||||
|
||||
if (currentQueue.length) {
|
||||
queue = currentQueue.concat(queue);
|
||||
} else {
|
||||
queueIndex = -1;
|
||||
}
|
||||
|
||||
if (queue.length) {
|
||||
drainQueue();
|
||||
}
|
||||
}
|
||||
|
||||
function drainQueue() {
|
||||
if (draining) {
|
||||
return;
|
||||
}
|
||||
|
||||
var timeout = runTimeout(cleanUpNextTick);
|
||||
draining = true;
|
||||
var len = queue.length;
|
||||
|
||||
while (len) {
|
||||
currentQueue = queue;
|
||||
queue = [];
|
||||
|
||||
while (++queueIndex < len) {
|
||||
if (currentQueue) {
|
||||
currentQueue[queueIndex].run();
|
||||
}
|
||||
}
|
||||
|
||||
queueIndex = -1;
|
||||
len = queue.length;
|
||||
}
|
||||
|
||||
currentQueue = null;
|
||||
draining = false;
|
||||
runClearTimeout(timeout);
|
||||
}
|
||||
|
||||
process.nextTick = function (fun) {
|
||||
var args = new Array(arguments.length - 1);
|
||||
|
||||
if (arguments.length > 1) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
args[i - 1] = arguments[i];
|
||||
}
|
||||
}
|
||||
|
||||
queue.push(new Item(fun, args));
|
||||
|
||||
if (queue.length === 1 && !draining) {
|
||||
runTimeout(drainQueue);
|
||||
}
|
||||
}; // v8 likes predictible objects
|
||||
|
||||
|
||||
function Item(fun, array) {
|
||||
this.fun = fun;
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
Item.prototype.run = function () {
|
||||
this.fun.apply(null, this.array);
|
||||
};
|
||||
|
||||
process.title = 'browser';
|
||||
process.browser = true;
|
||||
process.env = {};
|
||||
process.argv = [];
|
||||
process.version = ''; // empty string to avoid regexp issues
|
||||
|
||||
process.versions = {};
|
||||
|
||||
function noop() {}
|
||||
|
||||
process.on = noop;
|
||||
process.addListener = noop;
|
||||
process.once = noop;
|
||||
process.off = noop;
|
||||
process.removeListener = noop;
|
||||
process.removeAllListeners = noop;
|
||||
process.emit = noop;
|
||||
process.prependListener = noop;
|
||||
process.prependOnceListener = noop;
|
||||
|
||||
process.listeners = function (name) {
|
||||
return [];
|
||||
};
|
||||
|
||||
process.binding = function (name) {
|
||||
throw new Error('process.binding is not supported');
|
||||
};
|
||||
|
||||
process.cwd = function () {
|
||||
return '/';
|
||||
};
|
||||
|
||||
process.chdir = function (dir) {
|
||||
throw new Error('process.chdir is not supported');
|
||||
};
|
||||
|
||||
process.umask = function () {
|
||||
return 0;
|
||||
};
|
||||
}, {}],
|
||||
3: [function (require, module, exports) {
|
||||
/**
|
||||
* This is the common logic for both the Node.js and web browser
|
||||
* implementations of `debug()`.
|
||||
*/
|
||||
function setup(env) {
|
||||
createDebug.debug = createDebug;
|
||||
createDebug.default = createDebug;
|
||||
createDebug.coerce = coerce;
|
||||
createDebug.disable = disable;
|
||||
createDebug.enable = enable;
|
||||
createDebug.enabled = enabled;
|
||||
createDebug.humanize = require('ms');
|
||||
Object.keys(env).forEach(function (key) {
|
||||
createDebug[key] = env[key];
|
||||
});
|
||||
/**
|
||||
* Active `debug` instances.
|
||||
*/
|
||||
|
||||
createDebug.instances = [];
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
*/
|
||||
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
/**
|
||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||
*
|
||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||
*/
|
||||
|
||||
createDebug.formatters = {};
|
||||
/**
|
||||
* Selects a color for a debug namespace
|
||||
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
||||
* @return {Number|String} An ANSI color code for the given namespace
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function selectColor(namespace) {
|
||||
var hash = 0;
|
||||
|
||||
for (var i = 0; i < namespace.length; i++) {
|
||||
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
|
||||
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
||||
}
|
||||
|
||||
createDebug.selectColor = selectColor;
|
||||
/**
|
||||
* Create a debugger with the given `namespace`.
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function createDebug(namespace) {
|
||||
var prevTime;
|
||||
|
||||
function debug() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
// Disabled?
|
||||
if (!debug.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = debug; // Set `diff` timestamp
|
||||
|
||||
var curr = Number(new Date());
|
||||
var ms = curr - (prevTime || curr);
|
||||
self.diff = ms;
|
||||
self.prev = prevTime;
|
||||
self.curr = curr;
|
||||
prevTime = curr;
|
||||
args[0] = createDebug.coerce(args[0]);
|
||||
|
||||
if (typeof args[0] !== 'string') {
|
||||
// Anything else let's inspect with %O
|
||||
args.unshift('%O');
|
||||
} // Apply any `formatters` transformations
|
||||
|
||||
|
||||
var index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
||||
// If we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') {
|
||||
return match;
|
||||
}
|
||||
|
||||
index++;
|
||||
var formatter = createDebug.formatters[format];
|
||||
|
||||
if (typeof formatter === 'function') {
|
||||
var val = args[index];
|
||||
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
||||
|
||||
args.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
|
||||
return match;
|
||||
}); // Apply env-specific formatting (colors, etc.)
|
||||
|
||||
createDebug.formatArgs.call(self, args);
|
||||
var logFn = self.log || createDebug.log;
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.enabled = createDebug.enabled(namespace);
|
||||
debug.useColors = createDebug.useColors();
|
||||
debug.color = selectColor(namespace);
|
||||
debug.destroy = destroy;
|
||||
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
||||
// debug.rawLog = rawLog;
|
||||
// env-specific initialization logic for debug instances
|
||||
|
||||
if (typeof createDebug.init === 'function') {
|
||||
createDebug.init(debug);
|
||||
}
|
||||
|
||||
createDebug.instances.push(debug);
|
||||
return debug;
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
var index = createDebug.instances.indexOf(this);
|
||||
|
||||
if (index !== -1) {
|
||||
createDebug.instances.splice(index, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function extend(namespace, delimiter) {
|
||||
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||
newDebug.log = this.log;
|
||||
return newDebug;
|
||||
}
|
||||
/**
|
||||
* Enables a debug mode by namespaces. This can include modes
|
||||
* separated by a colon and wildcards.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function enable(namespaces) {
|
||||
createDebug.save(namespaces);
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
var i;
|
||||
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
||||
var len = split.length;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (!split[i]) {
|
||||
// ignore empty strings
|
||||
continue;
|
||||
}
|
||||
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
|
||||
if (namespaces[0] === '-') {
|
||||
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
||||
} else {
|
||||
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < createDebug.instances.length; i++) {
|
||||
var instance = createDebug.instances[i];
|
||||
instance.enabled = createDebug.enabled(instance.namespace);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @return {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function disable() {
|
||||
var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
|
||||
return '-' + namespace;
|
||||
}))).join(',');
|
||||
createDebug.enable('');
|
||||
return namespaces;
|
||||
}
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function enabled(name) {
|
||||
if (name[name.length - 1] === '*') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var i;
|
||||
var len;
|
||||
|
||||
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
||||
if (createDebug.skips[i].test(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
||||
if (createDebug.names[i].test(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Convert regexp to namespace
|
||||
*
|
||||
* @param {RegExp} regxep
|
||||
* @return {String} namespace
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function toNamespace(regexp) {
|
||||
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
|
||||
}
|
||||
/**
|
||||
* Coerce `val`.
|
||||
*
|
||||
* @param {Mixed} val
|
||||
* @return {Mixed}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function coerce(val) {
|
||||
if (val instanceof Error) {
|
||||
return val.stack || val.message;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
createDebug.enable(createDebug.load());
|
||||
return createDebug;
|
||||
}
|
||||
|
||||
module.exports = setup;
|
||||
}, {
|
||||
"ms": 1
|
||||
}],
|
||||
4: [function (require, module, exports) {
|
||||
(function (process) {
|
||||
/* eslint-env browser */
|
||||
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*/
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = localstorage();
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
// eslint-disable-next-line complexity
|
||||
|
||||
function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
||||
return true;
|
||||
} // Internet Explorer and Edge do not support colors.
|
||||
|
||||
|
||||
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
||||
return false;
|
||||
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
|
||||
|
||||
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
||||
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
||||
}
|
||||
/**
|
||||
* Colorize log arguments if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function formatArgs(args) {
|
||||
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
||||
|
||||
if (!this.useColors) {
|
||||
return;
|
||||
}
|
||||
|
||||
var c = 'color: ' + this.color;
|
||||
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
// figure out the correct index to insert the CSS into
|
||||
|
||||
var index = 0;
|
||||
var lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
||||
if (match === '%%') {
|
||||
return;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (match === '%c') {
|
||||
// We only are interested in the *last* %c
|
||||
// (the user may have provided their own)
|
||||
lastC = index;
|
||||
}
|
||||
});
|
||||
args.splice(lastC, 0, c);
|
||||
}
|
||||
/**
|
||||
* Invokes `console.log()` when available.
|
||||
* No-op when `console.log` is not a "function".
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function log() {
|
||||
var _console;
|
||||
|
||||
// This hackery is required for IE8/9, where
|
||||
// the `console.log` function doesn't have 'apply'
|
||||
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
||||
}
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function save(namespaces) {
|
||||
try {
|
||||
if (namespaces) {
|
||||
exports.storage.setItem('debug', namespaces);
|
||||
} else {
|
||||
exports.storage.removeItem('debug');
|
||||
}
|
||||
} catch (error) {// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function load() {
|
||||
var r;
|
||||
|
||||
try {
|
||||
r = exports.storage.getItem('debug');
|
||||
} catch (error) {} // Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||
|
||||
|
||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||
r = process.env.DEBUG;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
/**
|
||||
* Localstorage attempts to return the localstorage.
|
||||
*
|
||||
* This is necessary because safari throws
|
||||
* when a user disables cookies/localstorage
|
||||
* and you attempt to access it.
|
||||
*
|
||||
* @return {LocalStorage}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function localstorage() {
|
||||
try {
|
||||
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
||||
// The Browser also has localStorage in the global context.
|
||||
return localStorage;
|
||||
} catch (error) {// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = require('./common')(exports);
|
||||
var formatters = module.exports.formatters;
|
||||
/**
|
||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
||||
*/
|
||||
|
||||
formatters.j = function (v) {
|
||||
try {
|
||||
return JSON.stringify(v);
|
||||
} catch (error) {
|
||||
return '[UnexpectedJSONParseError]: ' + error.message;
|
||||
}
|
||||
};
|
||||
}).call(this, require('_process'));
|
||||
}, {
|
||||
"./common": 3,
|
||||
"_process": 2
|
||||
}]
|
||||
}, {}, [4])(4);
|
||||
});
|
6401
node_modules/esprima/dist/esprima.js
generated
vendored
Normal file
6401
node_modules/esprima/dist/esprima.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
77
node_modules/i18next-xhr-backend/dist/commonjs/ajax.js
generated
vendored
Normal file
77
node_modules/i18next-xhr-backend/dist/commonjs/ajax.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
function addQueryString(url, params) {
|
||||
if (params && (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object') {
|
||||
var queryString = '',
|
||||
e = encodeURIComponent;
|
||||
|
||||
// Must encode data
|
||||
for (var paramName in params) {
|
||||
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
|
||||
}
|
||||
|
||||
if (!queryString) {
|
||||
return url;
|
||||
}
|
||||
|
||||
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
// https://gist.github.com/Xeoncross/7663273
|
||||
function ajax(url, options, callback, data, cache) {
|
||||
|
||||
if (data && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
|
||||
if (!cache) {
|
||||
data['_t'] = new Date();
|
||||
}
|
||||
// URL encoded form data must be in querystring format
|
||||
data = addQueryString('', data).slice(1);
|
||||
}
|
||||
|
||||
if (options.queryStringParams) {
|
||||
url = addQueryString(url, options.queryStringParams);
|
||||
}
|
||||
|
||||
try {
|
||||
var x;
|
||||
if (XMLHttpRequest) {
|
||||
x = new XMLHttpRequest();
|
||||
} else {
|
||||
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
|
||||
}
|
||||
x.open(data ? 'POST' : 'GET', url, 1);
|
||||
if (!options.crossDomain) {
|
||||
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
}
|
||||
x.withCredentials = !!options.withCredentials;
|
||||
if (data) {
|
||||
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
if (x.overrideMimeType) {
|
||||
x.overrideMimeType("application/json");
|
||||
}
|
||||
var h = options.customHeaders;
|
||||
if (h) {
|
||||
for (var i in h) {
|
||||
x.setRequestHeader(i, h[i]);
|
||||
}
|
||||
}
|
||||
x.onreadystatechange = function () {
|
||||
x.readyState > 3 && callback && callback(x.responseText, x);
|
||||
};
|
||||
x.send(data);
|
||||
} catch (e) {
|
||||
console && console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = ajax;
|
123
node_modules/i18next-xhr-backend/dist/commonjs/index.js
generated
vendored
Normal file
123
node_modules/i18next-xhr-backend/dist/commonjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _utils = require('./utils.js');
|
||||
|
||||
var utils = _interopRequireWildcard(_utils);
|
||||
|
||||
var _ajax = require('./ajax.js');
|
||||
|
||||
var _ajax2 = _interopRequireDefault(_ajax);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function getDefaults() {
|
||||
return {
|
||||
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
||||
addPath: '/locales/add/{{lng}}/{{ns}}',
|
||||
allowMultiLoading: false,
|
||||
parse: JSON.parse,
|
||||
crossDomain: false,
|
||||
ajax: _ajax2.default
|
||||
};
|
||||
}
|
||||
|
||||
var Backend = function () {
|
||||
function Backend(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
_classCallCheck(this, Backend);
|
||||
|
||||
this.init(services, options);
|
||||
|
||||
this.type = 'backend';
|
||||
}
|
||||
|
||||
_createClass(Backend, [{
|
||||
key: 'init',
|
||||
value: function init(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
this.services = services;
|
||||
this.options = utils.defaults(options, this.options || {}, getDefaults());
|
||||
}
|
||||
}, {
|
||||
key: 'readMulti',
|
||||
value: function readMulti(languages, namespaces, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath(languages, namespaces);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'read',
|
||||
value: function read(language, namespace, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath([language], [namespace]);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'loadUrl',
|
||||
value: function loadUrl(url, callback) {
|
||||
var _this = this;
|
||||
|
||||
this.options.ajax(url, this.options, function (data, xhr) {
|
||||
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true /* retry */);
|
||||
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false /* no retry */);
|
||||
|
||||
var ret = void 0,
|
||||
err = void 0;
|
||||
try {
|
||||
ret = _this.options.parse(data, url);
|
||||
} catch (e) {
|
||||
err = 'failed parsing ' + url + ' to json';
|
||||
}
|
||||
if (err) return callback(err, false);
|
||||
callback(null, ret);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'create',
|
||||
value: function create(languages, namespace, key, fallbackValue) {
|
||||
var _this2 = this;
|
||||
|
||||
if (typeof languages === 'string') languages = [languages];
|
||||
|
||||
var payload = {};
|
||||
payload[key] = fallbackValue || '';
|
||||
|
||||
languages.forEach(function (lng) {
|
||||
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, { lng: lng, ns: namespace });
|
||||
|
||||
_this2.options.ajax(url, _this2.options, function (data, xhr) {
|
||||
//const statusCode = xhr.status.toString();
|
||||
// TODO: if statusCode === 4xx do log
|
||||
}, payload);
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Backend;
|
||||
}();
|
||||
|
||||
Backend.type = 'backend';
|
||||
|
||||
exports.default = Backend;
|
32
node_modules/i18next-xhr-backend/dist/commonjs/utils.js
generated
vendored
Normal file
32
node_modules/i18next-xhr-backend/dist/commonjs/utils.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.defaults = defaults;
|
||||
exports.extend = extend;
|
||||
var arr = [];
|
||||
var each = arr.forEach;
|
||||
var slice = arr.slice;
|
||||
|
||||
function defaults(obj) {
|
||||
each.call(slice.call(arguments, 1), function (source) {
|
||||
if (source) {
|
||||
for (var prop in source) {
|
||||
if (obj[prop] === undefined) obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
function extend(obj) {
|
||||
each.call(slice.call(arguments, 1), function (source) {
|
||||
if (source) {
|
||||
for (var prop in source) {
|
||||
obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
71
node_modules/i18next-xhr-backend/dist/es/ajax.js
generated
vendored
Normal file
71
node_modules/i18next-xhr-backend/dist/es/ajax.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
function addQueryString(url, params) {
|
||||
if (params && (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object') {
|
||||
var queryString = '',
|
||||
e = encodeURIComponent;
|
||||
|
||||
// Must encode data
|
||||
for (var paramName in params) {
|
||||
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
|
||||
}
|
||||
|
||||
if (!queryString) {
|
||||
return url;
|
||||
}
|
||||
|
||||
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
// https://gist.github.com/Xeoncross/7663273
|
||||
function ajax(url, options, callback, data, cache) {
|
||||
|
||||
if (data && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
|
||||
if (!cache) {
|
||||
data['_t'] = new Date();
|
||||
}
|
||||
// URL encoded form data must be in querystring format
|
||||
data = addQueryString('', data).slice(1);
|
||||
}
|
||||
|
||||
if (options.queryStringParams) {
|
||||
url = addQueryString(url, options.queryStringParams);
|
||||
}
|
||||
|
||||
try {
|
||||
var x;
|
||||
if (XMLHttpRequest) {
|
||||
x = new XMLHttpRequest();
|
||||
} else {
|
||||
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
|
||||
}
|
||||
x.open(data ? 'POST' : 'GET', url, 1);
|
||||
if (!options.crossDomain) {
|
||||
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
}
|
||||
x.withCredentials = !!options.withCredentials;
|
||||
if (data) {
|
||||
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
if (x.overrideMimeType) {
|
||||
x.overrideMimeType("application/json");
|
||||
}
|
||||
var h = options.customHeaders;
|
||||
if (h) {
|
||||
for (var i in h) {
|
||||
x.setRequestHeader(i, h[i]);
|
||||
}
|
||||
}
|
||||
x.onreadystatechange = function () {
|
||||
x.readyState > 3 && callback && callback(x.responseText, x);
|
||||
};
|
||||
x.send(data);
|
||||
} catch (e) {
|
||||
console && console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
export default ajax;
|
108
node_modules/i18next-xhr-backend/dist/es/index.js
generated
vendored
Normal file
108
node_modules/i18next-xhr-backend/dist/es/index.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
import * as utils from './utils.js';
|
||||
import ajax from './ajax.js';
|
||||
|
||||
function getDefaults() {
|
||||
return {
|
||||
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
||||
addPath: '/locales/add/{{lng}}/{{ns}}',
|
||||
allowMultiLoading: false,
|
||||
parse: JSON.parse,
|
||||
crossDomain: false,
|
||||
ajax: ajax
|
||||
};
|
||||
}
|
||||
|
||||
var Backend = function () {
|
||||
function Backend(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
_classCallCheck(this, Backend);
|
||||
|
||||
this.init(services, options);
|
||||
|
||||
this.type = 'backend';
|
||||
}
|
||||
|
||||
_createClass(Backend, [{
|
||||
key: 'init',
|
||||
value: function init(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
this.services = services;
|
||||
this.options = utils.defaults(options, this.options || {}, getDefaults());
|
||||
}
|
||||
}, {
|
||||
key: 'readMulti',
|
||||
value: function readMulti(languages, namespaces, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath(languages, namespaces);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'read',
|
||||
value: function read(language, namespace, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath([language], [namespace]);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'loadUrl',
|
||||
value: function loadUrl(url, callback) {
|
||||
var _this = this;
|
||||
|
||||
this.options.ajax(url, this.options, function (data, xhr) {
|
||||
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true /* retry */);
|
||||
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false /* no retry */);
|
||||
|
||||
var ret = void 0,
|
||||
err = void 0;
|
||||
try {
|
||||
ret = _this.options.parse(data, url);
|
||||
} catch (e) {
|
||||
err = 'failed parsing ' + url + ' to json';
|
||||
}
|
||||
if (err) return callback(err, false);
|
||||
callback(null, ret);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'create',
|
||||
value: function create(languages, namespace, key, fallbackValue) {
|
||||
var _this2 = this;
|
||||
|
||||
if (typeof languages === 'string') languages = [languages];
|
||||
|
||||
var payload = {};
|
||||
payload[key] = fallbackValue || '';
|
||||
|
||||
languages.forEach(function (lng) {
|
||||
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, { lng: lng, ns: namespace });
|
||||
|
||||
_this2.options.ajax(url, _this2.options, function (data, xhr) {
|
||||
//const statusCode = xhr.status.toString();
|
||||
// TODO: if statusCode === 4xx do log
|
||||
}, payload);
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Backend;
|
||||
}();
|
||||
|
||||
Backend.type = 'backend';
|
||||
|
||||
export default Backend;
|
25
node_modules/i18next-xhr-backend/dist/es/utils.js
generated
vendored
Normal file
25
node_modules/i18next-xhr-backend/dist/es/utils.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
var arr = [];
|
||||
var each = arr.forEach;
|
||||
var slice = arr.slice;
|
||||
|
||||
export function defaults(obj) {
|
||||
each.call(slice.call(arguments, 1), function (source) {
|
||||
if (source) {
|
||||
for (var prop in source) {
|
||||
if (obj[prop] === undefined) obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function extend(obj) {
|
||||
each.call(slice.call(arguments, 1), function (source) {
|
||||
if (source) {
|
||||
for (var prop in source) {
|
||||
obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
198
node_modules/i18next-xhr-backend/dist/umd/i18nextXHRBackend.js
generated
vendored
Normal file
198
node_modules/i18next-xhr-backend/dist/umd/i18nextXHRBackend.js
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global.i18nextXHRBackend = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
var arr = [];
|
||||
var each = arr.forEach;
|
||||
var slice = arr.slice;
|
||||
|
||||
function defaults(obj) {
|
||||
each.call(slice.call(arguments, 1), function (source) {
|
||||
if (source) {
|
||||
for (var prop in source) {
|
||||
if (obj[prop] === undefined) obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
function addQueryString(url, params) {
|
||||
if (params && (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object') {
|
||||
var queryString = '',
|
||||
e = encodeURIComponent;
|
||||
|
||||
// Must encode data
|
||||
for (var paramName in params) {
|
||||
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
|
||||
}
|
||||
|
||||
if (!queryString) {
|
||||
return url;
|
||||
}
|
||||
|
||||
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
// https://gist.github.com/Xeoncross/7663273
|
||||
function ajax(url, options, callback, data, cache) {
|
||||
|
||||
if (data && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
|
||||
if (!cache) {
|
||||
data['_t'] = new Date();
|
||||
}
|
||||
// URL encoded form data must be in querystring format
|
||||
data = addQueryString('', data).slice(1);
|
||||
}
|
||||
|
||||
if (options.queryStringParams) {
|
||||
url = addQueryString(url, options.queryStringParams);
|
||||
}
|
||||
|
||||
try {
|
||||
var x;
|
||||
if (XMLHttpRequest) {
|
||||
x = new XMLHttpRequest();
|
||||
} else {
|
||||
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
|
||||
}
|
||||
x.open(data ? 'POST' : 'GET', url, 1);
|
||||
if (!options.crossDomain) {
|
||||
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
}
|
||||
x.withCredentials = !!options.withCredentials;
|
||||
if (data) {
|
||||
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
if (x.overrideMimeType) {
|
||||
x.overrideMimeType("application/json");
|
||||
}
|
||||
var h = options.customHeaders;
|
||||
if (h) {
|
||||
for (var i in h) {
|
||||
x.setRequestHeader(i, h[i]);
|
||||
}
|
||||
}
|
||||
x.onreadystatechange = function () {
|
||||
x.readyState > 3 && callback && callback(x.responseText, x);
|
||||
};
|
||||
x.send(data);
|
||||
} catch (e) {
|
||||
console && console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function getDefaults() {
|
||||
return {
|
||||
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
||||
addPath: '/locales/add/{{lng}}/{{ns}}',
|
||||
allowMultiLoading: false,
|
||||
parse: JSON.parse,
|
||||
crossDomain: false,
|
||||
ajax: ajax
|
||||
};
|
||||
}
|
||||
|
||||
var Backend = function () {
|
||||
function Backend(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
_classCallCheck(this, Backend);
|
||||
|
||||
this.init(services, options);
|
||||
|
||||
this.type = 'backend';
|
||||
}
|
||||
|
||||
_createClass(Backend, [{
|
||||
key: 'init',
|
||||
value: function init(services) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
this.services = services;
|
||||
this.options = defaults(options, this.options || {}, getDefaults());
|
||||
}
|
||||
}, {
|
||||
key: 'readMulti',
|
||||
value: function readMulti(languages, namespaces, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath(languages, namespaces);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'read',
|
||||
value: function read(language, namespace, callback) {
|
||||
var loadPath = this.options.loadPath;
|
||||
if (typeof this.options.loadPath === 'function') {
|
||||
loadPath = this.options.loadPath([language], [namespace]);
|
||||
}
|
||||
|
||||
var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });
|
||||
|
||||
this.loadUrl(url, callback);
|
||||
}
|
||||
}, {
|
||||
key: 'loadUrl',
|
||||
value: function loadUrl(url, callback) {
|
||||
var _this = this;
|
||||
|
||||
this.options.ajax(url, this.options, function (data, xhr) {
|
||||
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true /* retry */);
|
||||
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false /* no retry */);
|
||||
|
||||
var ret = void 0,
|
||||
err = void 0;
|
||||
try {
|
||||
ret = _this.options.parse(data, url);
|
||||
} catch (e) {
|
||||
err = 'failed parsing ' + url + ' to json';
|
||||
}
|
||||
if (err) return callback(err, false);
|
||||
callback(null, ret);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: 'create',
|
||||
value: function create(languages, namespace, key, fallbackValue) {
|
||||
var _this2 = this;
|
||||
|
||||
if (typeof languages === 'string') languages = [languages];
|
||||
|
||||
var payload = {};
|
||||
payload[key] = fallbackValue || '';
|
||||
|
||||
languages.forEach(function (lng) {
|
||||
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, { lng: lng, ns: namespace });
|
||||
|
||||
_this2.options.ajax(url, _this2.options, function (data, xhr) {
|
||||
//const statusCode = xhr.status.toString();
|
||||
// TODO: if statusCode === 4xx do log
|
||||
}, payload);
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Backend;
|
||||
}();
|
||||
|
||||
Backend.type = 'backend';
|
||||
|
||||
return Backend;
|
||||
|
||||
})));
|
1
node_modules/i18next-xhr-backend/dist/umd/i18nextXHRBackend.min.js
generated
vendored
Normal file
1
node_modules/i18next-xhr-backend/dist/umd/i18nextXHRBackend.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextXHRBackend=e()}(this,function(){"use strict";function t(t){return r.call(s.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t}function e(t,e){if(e&&"object"===(void 0===e?"undefined":l(e))){var n="",o=encodeURIComponent;for(var i in e)n+="&"+o(i)+"="+o(e[i]);if(!n)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+n.slice(1)}return t}function n(t,n,o,i,a){i&&"object"===(void 0===i?"undefined":l(i))&&(a||(i._t=new Date),i=e("",i).slice(1)),n.queryStringParams&&(t=e(t,n.queryStringParams));try{var r;r=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0"),r.open(i?"POST":"GET",t,1),n.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!n.withCredentials,i&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var s=n.customHeaders;if(s)for(var u in s)r.setRequestHeader(u,s[u]);r.onreadystatechange=function(){r.readyState>3&&o&&o(r.responseText,r)},r.send(i)}catch(t){console&&console.log(t)}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,crossDomain:!1,ajax:n}}var a=[],r=a.forEach,s=a.slice,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n),this.type="backend"}return u(e,[{key:"init",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=t(n,this.options||{},i())}},{key:"readMulti",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(t,e));var i=this.services.interpolator.interpolate(o,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(i,n)}},{key:"read",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath([t],[e]));var i=this.services.interpolator.interpolate(o,{lng:t,ns:e});this.loadUrl(i,n)}},{key:"loadUrl",value:function(t,e){var n=this;this.options.ajax(t,this.options,function(o,i){if(i.status>=500&&i.status<600)return e("failed loading "+t,!0);if(i.status>=400&&i.status<500)return e("failed loading "+t,!1);var a=void 0,r=void 0;try{a=n.options.parse(o,t)}catch(e){r="failed parsing "+t+" to json"}if(r)return e(r,!1);e(null,a)})}},{key:"create",value:function(t,e,n,o){var i=this;"string"==typeof t&&(t=[t]);var a={};a[n]=o||"",t.forEach(function(t){var n=i.services.interpolator.interpolate(i.options.addPath,{lng:t,ns:e});i.options.ajax(n,i.options,function(t,e){},a)})}}]),e}();return c.type="backend",c});
|
14
node_modules/lodash/package.json
generated
vendored
14
node_modules/lodash/package.json
generated
vendored
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "lodash@^4.17.15",
|
||||
"_from": "lodash@4.17.15",
|
||||
"_id": "lodash@4.17.15",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"_location": "/lodash",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "lodash@^4.17.15",
|
||||
"raw": "lodash@4.17.15",
|
||||
"name": "lodash",
|
||||
"escapedName": "lodash",
|
||||
"rawSpec": "^4.17.15",
|
||||
"rawSpec": "4.17.15",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.17.15"
|
||||
"fetchSpec": "4.17.15"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/request-promise-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"_shasum": "b447f6670a0455bbfeedd11392eff330ea097548",
|
||||
"_spec": "lodash@^4.17.15",
|
||||
"_where": "/home/s2/Code/vanillajs-seed/node_modules/request-promise-core",
|
||||
"_spec": "lodash@4.17.15",
|
||||
"_where": "F:\\projects\\p\\vanillajs-seed\\node_modules\\request-promise-core",
|
||||
"author": {
|
||||
"name": "John-David Dalton",
|
||||
"email": "john.david.dalton@gmail.com"
|
||||
|
156
node_modules/popper.js/dist/umd/poppper.js.flow
generated
vendored
Normal file
156
node_modules/popper.js/dist/umd/poppper.js.flow
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
declare module 'popper.js' {
|
||||
declare type Position = 'top' | 'right' | 'bottom' | 'left';
|
||||
declare type Placement =
|
||||
| 'auto-start'
|
||||
| 'auto'
|
||||
| 'auto-end'
|
||||
| 'top-start'
|
||||
| 'top'
|
||||
| 'top-end'
|
||||
| 'right-start'
|
||||
| 'right'
|
||||
| 'right-end'
|
||||
| 'bottom-end'
|
||||
| 'bottom'
|
||||
| 'bottom-start'
|
||||
| 'left-end'
|
||||
| 'left'
|
||||
| 'left-start';
|
||||
|
||||
declare type Offset = {
|
||||
top: number,
|
||||
left: number,
|
||||
width: number,
|
||||
height: number,
|
||||
position: Position,
|
||||
};
|
||||
|
||||
declare type Boundary = 'scrollParent' | 'viewport' | 'window';
|
||||
|
||||
declare type Behavior = 'flip' | 'clockwise' | 'counterclockwise';
|
||||
|
||||
declare type Data = {
|
||||
instance: Popper,
|
||||
placement: Placement,
|
||||
originalPlacement: Placement,
|
||||
flipped: boolean,
|
||||
hide: boolean,
|
||||
arrowElement: Element,
|
||||
styles: CSSStyleDeclaration,
|
||||
arrowStyles: CSSStyleDeclaration,
|
||||
boundaries: Object,
|
||||
offsets: {
|
||||
popper: Offset,
|
||||
reference: Offset,
|
||||
arrow: {
|
||||
top: number,
|
||||
left: number,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
declare type ModifierFn = (data: Data, options: Object) => Data;
|
||||
|
||||
declare type Padding = {
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
left?: number,
|
||||
right?: number,
|
||||
}
|
||||
|
||||
declare type BaseModifier = {
|
||||
order?: number,
|
||||
enabled?: boolean,
|
||||
fn?: ModifierFn,
|
||||
};
|
||||
|
||||
declare type Modifiers = {
|
||||
shift?: BaseModifier,
|
||||
offset?: BaseModifier & {
|
||||
offset?: number | string,
|
||||
},
|
||||
preventOverflow?: BaseModifier & {
|
||||
priority?: Position[],
|
||||
padding?: number | Padding,
|
||||
boundariesElement?: Boundary | Element,
|
||||
escapeWithReference?: boolean,
|
||||
},
|
||||
keepTogether?: BaseModifier,
|
||||
arrow?: BaseModifier & {
|
||||
element?: string | Element | null,
|
||||
},
|
||||
flip?: BaseModifier & {
|
||||
behavior?: Behavior | Position[],
|
||||
padding?: number | Padding,
|
||||
boundariesElement?: Boundary | Element,
|
||||
flipVariations?: boolean,
|
||||
flipVariationsByContent?: boolean,
|
||||
},
|
||||
inner?: BaseModifier,
|
||||
hide?: BaseModifier,
|
||||
applyStyle?: BaseModifier & {
|
||||
onLoad?: Function,
|
||||
gpuAcceleration?: boolean,
|
||||
},
|
||||
computeStyle?: BaseModifier & {
|
||||
gpuAcceleration?: boolean,
|
||||
x?: 'bottom' | 'top',
|
||||
y?: 'left' | 'right',
|
||||
},
|
||||
|
||||
[name: string]: (BaseModifier & { [string]: * }) | null,
|
||||
};
|
||||
|
||||
declare type Options = {
|
||||
placement?: Placement,
|
||||
positionFixed?: boolean,
|
||||
eventsEnabled?: boolean,
|
||||
modifiers?: Modifiers,
|
||||
removeOnDestroy?: boolean,
|
||||
|
||||
onCreate?: (data: Data) => void,
|
||||
|
||||
onUpdate?: (data: Data) => void,
|
||||
};
|
||||
|
||||
declare var placements: Placement;
|
||||
|
||||
declare type ReferenceObject = {
|
||||
+clientHeight: number,
|
||||
+clientWidth: number,
|
||||
|
||||
getBoundingClientRect():
|
||||
| ClientRect
|
||||
| {
|
||||
width: number,
|
||||
height: number,
|
||||
top: number,
|
||||
right: number,
|
||||
bottom: number,
|
||||
left: number,
|
||||
},
|
||||
};
|
||||
|
||||
declare type Instance = {
|
||||
destroy: () => void,
|
||||
scheduleUpdate: () => void,
|
||||
update: () => void,
|
||||
enableEventListeners: () => void,
|
||||
disableEventListeners: () => void,
|
||||
};
|
||||
|
||||
declare class Popper {
|
||||
static placements: Placement;
|
||||
|
||||
popper: Element;
|
||||
reference: Element | ReferenceObject;
|
||||
|
||||
constructor(
|
||||
reference: Element | ReferenceObject,
|
||||
popper: Element,
|
||||
options?: Options
|
||||
): Instance;
|
||||
}
|
||||
|
||||
declare module.exports: Class<Popper>;
|
||||
}
|
638
node_modules/qs/dist/qs.js
generated
vendored
Normal file
638
node_modules/qs/dist/qs.js
generated
vendored
Normal file
@@ -0,0 +1,638 @@
|
||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var replace = String.prototype.replace;
|
||||
var percentTwenties = /%20/g;
|
||||
|
||||
module.exports = {
|
||||
'default': 'RFC3986',
|
||||
formatters: {
|
||||
RFC1738: function (value) {
|
||||
return replace.call(value, percentTwenties, '+');
|
||||
},
|
||||
RFC3986: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
RFC1738: 'RFC1738',
|
||||
RFC3986: 'RFC3986'
|
||||
};
|
||||
|
||||
},{}],2:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var stringify = require('./stringify');
|
||||
var parse = require('./parse');
|
||||
var formats = require('./formats');
|
||||
|
||||
module.exports = {
|
||||
formats: formats,
|
||||
parse: parse,
|
||||
stringify: stringify
|
||||
};
|
||||
|
||||
},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var utils = require('./utils');
|
||||
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
|
||||
var defaults = {
|
||||
allowDots: false,
|
||||
allowPrototypes: false,
|
||||
arrayLimit: 20,
|
||||
decoder: utils.decode,
|
||||
delimiter: '&',
|
||||
depth: 5,
|
||||
parameterLimit: 1000,
|
||||
plainObjects: false,
|
||||
strictNullHandling: false
|
||||
};
|
||||
|
||||
var parseValues = function parseQueryStringValues(str, options) {
|
||||
var obj = {};
|
||||
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
||||
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
||||
var parts = cleanStr.split(options.delimiter, limit);
|
||||
|
||||
for (var i = 0; i < parts.length; ++i) {
|
||||
var part = parts[i];
|
||||
|
||||
var bracketEqualsPos = part.indexOf(']=');
|
||||
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
||||
|
||||
var key, val;
|
||||
if (pos === -1) {
|
||||
key = options.decoder(part, defaults.decoder);
|
||||
val = options.strictNullHandling ? null : '';
|
||||
} else {
|
||||
key = options.decoder(part.slice(0, pos), defaults.decoder);
|
||||
val = options.decoder(part.slice(pos + 1), defaults.decoder);
|
||||
}
|
||||
if (has.call(obj, key)) {
|
||||
obj[key] = [].concat(obj[key]).concat(val);
|
||||
} else {
|
||||
obj[key] = val;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
var parseObject = function (chain, val, options) {
|
||||
var leaf = val;
|
||||
|
||||
for (var i = chain.length - 1; i >= 0; --i) {
|
||||
var obj;
|
||||
var root = chain[i];
|
||||
|
||||
if (root === '[]') {
|
||||
obj = [];
|
||||
obj = obj.concat(leaf);
|
||||
} else {
|
||||
obj = options.plainObjects ? Object.create(null) : {};
|
||||
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
||||
var index = parseInt(cleanRoot, 10);
|
||||
if (
|
||||
!isNaN(index)
|
||||
&& root !== cleanRoot
|
||||
&& String(index) === cleanRoot
|
||||
&& index >= 0
|
||||
&& (options.parseArrays && index <= options.arrayLimit)
|
||||
) {
|
||||
obj = [];
|
||||
obj[index] = leaf;
|
||||
} else {
|
||||
obj[cleanRoot] = leaf;
|
||||
}
|
||||
}
|
||||
|
||||
leaf = obj;
|
||||
}
|
||||
|
||||
return leaf;
|
||||
};
|
||||
|
||||
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
||||
if (!givenKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Transform dot notation to bracket notation
|
||||
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
||||
|
||||
// The regex chunks
|
||||
|
||||
var brackets = /(\[[^[\]]*])/;
|
||||
var child = /(\[[^[\]]*])/g;
|
||||
|
||||
// Get the parent
|
||||
|
||||
var segment = brackets.exec(key);
|
||||
var parent = segment ? key.slice(0, segment.index) : key;
|
||||
|
||||
// Stash the parent if it exists
|
||||
|
||||
var keys = [];
|
||||
if (parent) {
|
||||
// If we aren't using plain objects, optionally prefix keys
|
||||
// that would overwrite object prototype properties
|
||||
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
||||
if (!options.allowPrototypes) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
keys.push(parent);
|
||||
}
|
||||
|
||||
// Loop through children appending to the array until we hit depth
|
||||
|
||||
var i = 0;
|
||||
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
||||
i += 1;
|
||||
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
||||
if (!options.allowPrototypes) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
keys.push(segment[1]);
|
||||
}
|
||||
|
||||
// If there's a remainder, just add whatever is left
|
||||
|
||||
if (segment) {
|
||||
keys.push('[' + key.slice(segment.index) + ']');
|
||||
}
|
||||
|
||||
return parseObject(keys, val, options);
|
||||
};
|
||||
|
||||
module.exports = function (str, opts) {
|
||||
var options = opts ? utils.assign({}, opts) : {};
|
||||
|
||||
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
|
||||
throw new TypeError('Decoder has to be a function.');
|
||||
}
|
||||
|
||||
options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
|
||||
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
|
||||
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
|
||||
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
|
||||
options.parseArrays = options.parseArrays !== false;
|
||||
options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
|
||||
options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
|
||||
options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
|
||||
options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
|
||||
options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
|
||||
options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
|
||||
|
||||
if (str === '' || str === null || typeof str === 'undefined') {
|
||||
return options.plainObjects ? Object.create(null) : {};
|
||||
}
|
||||
|
||||
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
||||
var obj = options.plainObjects ? Object.create(null) : {};
|
||||
|
||||
// Iterate over the keys and setup the new object
|
||||
|
||||
var keys = Object.keys(tempObj);
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var key = keys[i];
|
||||
var newObj = parseKeys(key, tempObj[key], options);
|
||||
obj = utils.merge(obj, newObj, options);
|
||||
}
|
||||
|
||||
return utils.compact(obj);
|
||||
};
|
||||
|
||||
},{"./utils":5}],4:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var utils = require('./utils');
|
||||
var formats = require('./formats');
|
||||
|
||||
var arrayPrefixGenerators = {
|
||||
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
|
||||
return prefix + '[]';
|
||||
},
|
||||
indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
|
||||
return prefix + '[' + key + ']';
|
||||
},
|
||||
repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
|
||||
return prefix;
|
||||
}
|
||||
};
|
||||
|
||||
var toISO = Date.prototype.toISOString;
|
||||
|
||||
var defaults = {
|
||||
delimiter: '&',
|
||||
encode: true,
|
||||
encoder: utils.encode,
|
||||
encodeValuesOnly: false,
|
||||
serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
|
||||
return toISO.call(date);
|
||||
},
|
||||
skipNulls: false,
|
||||
strictNullHandling: false
|
||||
};
|
||||
|
||||
var stringify = function stringify( // eslint-disable-line func-name-matching
|
||||
object,
|
||||
prefix,
|
||||
generateArrayPrefix,
|
||||
strictNullHandling,
|
||||
skipNulls,
|
||||
encoder,
|
||||
filter,
|
||||
sort,
|
||||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
) {
|
||||
var obj = object;
|
||||
if (typeof filter === 'function') {
|
||||
obj = filter(prefix, obj);
|
||||
} else if (obj instanceof Date) {
|
||||
obj = serializeDate(obj);
|
||||
} else if (obj === null) {
|
||||
if (strictNullHandling) {
|
||||
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
|
||||
}
|
||||
|
||||
obj = '';
|
||||
}
|
||||
|
||||
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
|
||||
if (encoder) {
|
||||
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
|
||||
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
|
||||
}
|
||||
return [formatter(prefix) + '=' + formatter(String(obj))];
|
||||
}
|
||||
|
||||
var values = [];
|
||||
|
||||
if (typeof obj === 'undefined') {
|
||||
return values;
|
||||
}
|
||||
|
||||
var objKeys;
|
||||
if (Array.isArray(filter)) {
|
||||
objKeys = filter;
|
||||
} else {
|
||||
var keys = Object.keys(obj);
|
||||
objKeys = sort ? keys.sort(sort) : keys;
|
||||
}
|
||||
|
||||
for (var i = 0; i < objKeys.length; ++i) {
|
||||
var key = objKeys[i];
|
||||
|
||||
if (skipNulls && obj[key] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
values = values.concat(stringify(
|
||||
obj[key],
|
||||
generateArrayPrefix(prefix, key),
|
||||
generateArrayPrefix,
|
||||
strictNullHandling,
|
||||
skipNulls,
|
||||
encoder,
|
||||
filter,
|
||||
sort,
|
||||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
));
|
||||
} else {
|
||||
values = values.concat(stringify(
|
||||
obj[key],
|
||||
prefix + (allowDots ? '.' + key : '[' + key + ']'),
|
||||
generateArrayPrefix,
|
||||
strictNullHandling,
|
||||
skipNulls,
|
||||
encoder,
|
||||
filter,
|
||||
sort,
|
||||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
};
|
||||
|
||||
module.exports = function (object, opts) {
|
||||
var obj = object;
|
||||
var options = opts ? utils.assign({}, opts) : {};
|
||||
|
||||
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
|
||||
throw new TypeError('Encoder has to be a function.');
|
||||
}
|
||||
|
||||
var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
|
||||
var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
|
||||
var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
|
||||
var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
|
||||
var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
|
||||
var sort = typeof options.sort === 'function' ? options.sort : null;
|
||||
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
|
||||
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
|
||||
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
|
||||
if (typeof options.format === 'undefined') {
|
||||
options.format = formats['default'];
|
||||
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
|
||||
throw new TypeError('Unknown format option provided.');
|
||||
}
|
||||
var formatter = formats.formatters[options.format];
|
||||
var objKeys;
|
||||
var filter;
|
||||
|
||||
if (typeof options.filter === 'function') {
|
||||
filter = options.filter;
|
||||
obj = filter('', obj);
|
||||
} else if (Array.isArray(options.filter)) {
|
||||
filter = options.filter;
|
||||
objKeys = filter;
|
||||
}
|
||||
|
||||
var keys = [];
|
||||
|
||||
if (typeof obj !== 'object' || obj === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var arrayFormat;
|
||||
if (options.arrayFormat in arrayPrefixGenerators) {
|
||||
arrayFormat = options.arrayFormat;
|
||||
} else if ('indices' in options) {
|
||||
arrayFormat = options.indices ? 'indices' : 'repeat';
|
||||
} else {
|
||||
arrayFormat = 'indices';
|
||||
}
|
||||
|
||||
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
||||
|
||||
if (!objKeys) {
|
||||
objKeys = Object.keys(obj);
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
objKeys.sort(sort);
|
||||
}
|
||||
|
||||
for (var i = 0; i < objKeys.length; ++i) {
|
||||
var key = objKeys[i];
|
||||
|
||||
if (skipNulls && obj[key] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
keys = keys.concat(stringify(
|
||||
obj[key],
|
||||
key,
|
||||
generateArrayPrefix,
|
||||
strictNullHandling,
|
||||
skipNulls,
|
||||
encode ? encoder : null,
|
||||
filter,
|
||||
sort,
|
||||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
));
|
||||
}
|
||||
|
||||
var joined = keys.join(delimiter);
|
||||
var prefix = options.addQueryPrefix === true ? '?' : '';
|
||||
|
||||
return joined.length > 0 ? prefix + joined : '';
|
||||
};
|
||||
|
||||
},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
|
||||
var hexTable = (function () {
|
||||
var array = [];
|
||||
for (var i = 0; i < 256; ++i) {
|
||||
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
||||
}
|
||||
|
||||
return array;
|
||||
}());
|
||||
|
||||
var compactQueue = function compactQueue(queue) {
|
||||
var obj;
|
||||
|
||||
while (queue.length) {
|
||||
var item = queue.pop();
|
||||
obj = item.obj[item.prop];
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
var compacted = [];
|
||||
|
||||
for (var j = 0; j < obj.length; ++j) {
|
||||
if (typeof obj[j] !== 'undefined') {
|
||||
compacted.push(obj[j]);
|
||||
}
|
||||
}
|
||||
|
||||
item.obj[item.prop] = compacted;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
var arrayToObject = function arrayToObject(source, options) {
|
||||
var obj = options && options.plainObjects ? Object.create(null) : {};
|
||||
for (var i = 0; i < source.length; ++i) {
|
||||
if (typeof source[i] !== 'undefined') {
|
||||
obj[i] = source[i];
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
var merge = function merge(target, source, options) {
|
||||
if (!source) {
|
||||
return target;
|
||||
}
|
||||
|
||||
if (typeof source !== 'object') {
|
||||
if (Array.isArray(target)) {
|
||||
target.push(source);
|
||||
} else if (typeof target === 'object') {
|
||||
if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
|
||||
target[source] = true;
|
||||
}
|
||||
} else {
|
||||
return [target, source];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
if (typeof target !== 'object') {
|
||||
return [target].concat(source);
|
||||
}
|
||||
|
||||
var mergeTarget = target;
|
||||
if (Array.isArray(target) && !Array.isArray(source)) {
|
||||
mergeTarget = arrayToObject(target, options);
|
||||
}
|
||||
|
||||
if (Array.isArray(target) && Array.isArray(source)) {
|
||||
source.forEach(function (item, i) {
|
||||
if (has.call(target, i)) {
|
||||
if (target[i] && typeof target[i] === 'object') {
|
||||
target[i] = merge(target[i], item, options);
|
||||
} else {
|
||||
target.push(item);
|
||||
}
|
||||
} else {
|
||||
target[i] = item;
|
||||
}
|
||||
});
|
||||
return target;
|
||||
}
|
||||
|
||||
return Object.keys(source).reduce(function (acc, key) {
|
||||
var value = source[key];
|
||||
|
||||
if (has.call(acc, key)) {
|
||||
acc[key] = merge(acc[key], value, options);
|
||||
} else {
|
||||
acc[key] = value;
|
||||
}
|
||||
return acc;
|
||||
}, mergeTarget);
|
||||
};
|
||||
|
||||
var assign = function assignSingleSource(target, source) {
|
||||
return Object.keys(source).reduce(function (acc, key) {
|
||||
acc[key] = source[key];
|
||||
return acc;
|
||||
}, target);
|
||||
};
|
||||
|
||||
var decode = function (str) {
|
||||
try {
|
||||
return decodeURIComponent(str.replace(/\+/g, ' '));
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
var encode = function encode(str) {
|
||||
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
||||
// It has been adapted here for stricter adherence to RFC 3986
|
||||
if (str.length === 0) {
|
||||
return str;
|
||||
}
|
||||
|
||||
var string = typeof str === 'string' ? str : String(str);
|
||||
|
||||
var out = '';
|
||||
for (var i = 0; i < string.length; ++i) {
|
||||
var c = string.charCodeAt(i);
|
||||
|
||||
if (
|
||||
c === 0x2D // -
|
||||
|| c === 0x2E // .
|
||||
|| c === 0x5F // _
|
||||
|| c === 0x7E // ~
|
||||
|| (c >= 0x30 && c <= 0x39) // 0-9
|
||||
|| (c >= 0x41 && c <= 0x5A) // a-z
|
||||
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
||||
) {
|
||||
out += string.charAt(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c < 0x80) {
|
||||
out = out + hexTable[c];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c < 0x800) {
|
||||
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c < 0xD800 || c >= 0xE000) {
|
||||
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
||||
continue;
|
||||
}
|
||||
|
||||
i += 1;
|
||||
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
||||
out += hexTable[0xF0 | (c >> 18)]
|
||||
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
||||
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
||||
+ hexTable[0x80 | (c & 0x3F)];
|
||||
}
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
var compact = function compact(value) {
|
||||
var queue = [{ obj: { o: value }, prop: 'o' }];
|
||||
var refs = [];
|
||||
|
||||
for (var i = 0; i < queue.length; ++i) {
|
||||
var item = queue[i];
|
||||
var obj = item.obj[item.prop];
|
||||
|
||||
var keys = Object.keys(obj);
|
||||
for (var j = 0; j < keys.length; ++j) {
|
||||
var key = keys[j];
|
||||
var val = obj[key];
|
||||
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
||||
queue.push({ obj: obj, prop: key });
|
||||
refs.push(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return compactQueue(queue);
|
||||
};
|
||||
|
||||
var isRegExp = function isRegExp(obj) {
|
||||
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
||||
};
|
||||
|
||||
var isBuffer = function isBuffer(obj) {
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
arrayToObject: arrayToObject,
|
||||
assign: assign,
|
||||
compact: compact,
|
||||
decode: decode,
|
||||
encode: encode,
|
||||
isBuffer: isBuffer,
|
||||
isRegExp: isRegExp,
|
||||
merge: merge
|
||||
};
|
||||
|
||||
},{}]},{},[2])(2)
|
||||
});
|
3234
node_modules/source-map/dist/source-map.debug.js
generated
vendored
Normal file
3234
node_modules/source-map/dist/source-map.debug.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3233
node_modules/source-map/dist/source-map.js
generated
vendored
Normal file
3233
node_modules/source-map/dist/source-map.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
node_modules/source-map/dist/source-map.min.js
generated
vendored
Normal file
2
node_modules/source-map/dist/source-map.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/source-map/dist/source-map.min.js.map
generated
vendored
Normal file
1
node_modules/source-map/dist/source-map.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21955
node_modules/terser/dist/bundle.js
generated
vendored
Normal file
21955
node_modules/terser/dist/bundle.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/terser/dist/bundle.js.map
generated
vendored
Normal file
1
node_modules/terser/dist/bundle.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
node_modules/uri-js/dist/es5/uri.all.d.ts
generated
vendored
Normal file
59
node_modules/uri-js/dist/es5/uri.all.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
1389
node_modules/uri-js/dist/es5/uri.all.js
generated
vendored
Normal file
1389
node_modules/uri-js/dist/es5/uri.all.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/uri-js/dist/es5/uri.all.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/es5/uri.all.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
node_modules/uri-js/dist/es5/uri.all.min.d.ts
generated
vendored
Normal file
59
node_modules/uri-js/dist/es5/uri.all.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
3
node_modules/uri-js/dist/es5/uri.all.min.js
generated
vendored
Normal file
3
node_modules/uri-js/dist/es5/uri.all.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/uri-js/dist/es5/uri.all.min.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/es5/uri.all.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/uri-js/dist/esnext/index.d.ts
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./uri";
|
13
node_modules/uri-js/dist/esnext/index.js
generated
vendored
Normal file
13
node_modules/uri-js/dist/esnext/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SCHEMES } from "./uri";
|
||||
import http from "./schemes/http";
|
||||
SCHEMES[http.scheme] = http;
|
||||
import https from "./schemes/https";
|
||||
SCHEMES[https.scheme] = https;
|
||||
import mailto from "./schemes/mailto";
|
||||
SCHEMES[mailto.scheme] = mailto;
|
||||
import urn from "./schemes/urn";
|
||||
SCHEMES[urn.scheme] = urn;
|
||||
import uuid from "./schemes/urn-uuid";
|
||||
SCHEMES[uuid.scheme] = uuid;
|
||||
export * from "./uri";
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/uri-js/dist/esnext/index.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"}
|
3
node_modules/uri-js/dist/esnext/regexps-iri.d.ts
generated
vendored
Normal file
3
node_modules/uri-js/dist/esnext/regexps-iri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URIRegExps } from "./uri";
|
||||
declare const _default: URIRegExps;
|
||||
export default _default;
|
3
node_modules/uri-js/dist/esnext/regexps-iri.js
generated
vendored
Normal file
3
node_modules/uri-js/dist/esnext/regexps-iri.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { buildExps } from "./regexps-uri";
|
||||
export default buildExps(true);
|
||||
//# sourceMappingURL=regexps-iri.js.map
|
1
node_modules/uri-js/dist/esnext/regexps-iri.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/regexps-iri.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"}
|
4
node_modules/uri-js/dist/esnext/regexps-uri.d.ts
generated
vendored
Normal file
4
node_modules/uri-js/dist/esnext/regexps-uri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { URIRegExps } from "./uri";
|
||||
export declare function buildExps(isIRI: boolean): URIRegExps;
|
||||
declare const _default: URIRegExps;
|
||||
export default _default;
|
42
node_modules/uri-js/dist/esnext/regexps-uri.js
generated
vendored
Normal file
42
node_modules/uri-js/dist/esnext/regexps-uri.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import { merge, subexp } from "./util";
|
||||
export function buildExps(isIRI) {
|
||||
const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive
|
||||
LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded
|
||||
GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters
|
||||
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset
|
||||
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules
|
||||
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32
|
||||
IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32
|
||||
IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32
|
||||
IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
|
||||
IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
|
||||
IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
|
||||
IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32
|
||||
IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16
|
||||
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::"
|
||||
IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874
|
||||
IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874
|
||||
IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules
|
||||
IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874
|
||||
REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified
|
||||
PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified
|
||||
PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified
|
||||
PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
||||
return {
|
||||
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
||||
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
||||
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
||||
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
||||
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
||||
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
||||
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
||||
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
|
||||
};
|
||||
}
|
||||
export default buildExps(false);
|
||||
//# sourceMappingURL=regexps-uri.js.map
|
1
node_modules/uri-js/dist/esnext/regexps-uri.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/regexps-uri.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/uri-js/dist/esnext/schemes/http.d.ts
generated
vendored
Normal file
3
node_modules/uri-js/dist/esnext/schemes/http.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URISchemeHandler } from "../uri";
|
||||
declare const handler: URISchemeHandler;
|
||||
export default handler;
|
27
node_modules/uri-js/dist/esnext/schemes/http.js
generated
vendored
Normal file
27
node_modules/uri-js/dist/esnext/schemes/http.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
const handler = {
|
||||
scheme: "http",
|
||||
domainHost: true,
|
||||
parse: function (components, options) {
|
||||
//report missing host
|
||||
if (!components.host) {
|
||||
components.error = components.error || "HTTP URIs must have a host.";
|
||||
}
|
||||
return components;
|
||||
},
|
||||
serialize: function (components, options) {
|
||||
//normalize the default port
|
||||
if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") {
|
||||
components.port = undefined;
|
||||
}
|
||||
//normalize the empty path
|
||||
if (!components.path) {
|
||||
components.path = "/";
|
||||
}
|
||||
//NOTE: We do not parse query strings for HTTP URIs
|
||||
//as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
||||
//and not the HTTP spec.
|
||||
return components;
|
||||
}
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=http.js.map
|
1
node_modules/uri-js/dist/esnext/schemes/http.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/schemes/http.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACnH,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
3
node_modules/uri-js/dist/esnext/schemes/https.d.ts
generated
vendored
Normal file
3
node_modules/uri-js/dist/esnext/schemes/https.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URISchemeHandler } from "../uri";
|
||||
declare const handler: URISchemeHandler;
|
||||
export default handler;
|
9
node_modules/uri-js/dist/esnext/schemes/https.js
generated
vendored
Normal file
9
node_modules/uri-js/dist/esnext/schemes/https.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import http from "./http";
|
||||
const handler = {
|
||||
scheme: "https",
|
||||
domainHost: http.domainHost,
|
||||
parse: http.parse,
|
||||
serialize: http.serialize
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=https.js.map
|
1
node_modules/uri-js/dist/esnext/schemes/https.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/schemes/https.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"}
|
12
node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
generated
vendored
Normal file
12
node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { URISchemeHandler, URIComponents } from "../uri";
|
||||
export interface MailtoHeaders {
|
||||
[hfname: string]: string;
|
||||
}
|
||||
export interface MailtoComponents extends URIComponents {
|
||||
to: Array<string>;
|
||||
headers?: MailtoHeaders;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<MailtoComponents>;
|
||||
export default handler;
|
148
node_modules/uri-js/dist/esnext/schemes/mailto.js
generated
vendored
Normal file
148
node_modules/uri-js/dist/esnext/schemes/mailto.js
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
import { pctEncChar, pctDecChars, unescapeComponent } from "../uri";
|
||||
import punycode from "punycode";
|
||||
import { merge, subexp, toUpperCase, toArray } from "../util";
|
||||
const O = {};
|
||||
const isIRI = true;
|
||||
//RFC 3986
|
||||
const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
|
||||
const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
||||
const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
||||
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
||||
//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
|
||||
//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
|
||||
//const VCHAR$$ = "[\\x21-\\x7E]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
|
||||
//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
|
||||
//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
|
||||
//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
|
||||
const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
||||
const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
||||
const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
|
||||
const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*");
|
||||
const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$);
|
||||
const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$);
|
||||
const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"');
|
||||
//RFC 6068
|
||||
const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126
|
||||
const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
||||
const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$);
|
||||
const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]");
|
||||
const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$);
|
||||
const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$);
|
||||
const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*");
|
||||
const HFNAME$ = subexp(QCHAR$ + "*");
|
||||
const HFVALUE$ = HFNAME$;
|
||||
const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$);
|
||||
const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*");
|
||||
const HFIELDS$ = subexp("\\?" + HFIELDS2$);
|
||||
const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$");
|
||||
const UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
||||
const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
||||
const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
||||
const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g");
|
||||
const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
||||
const NOT_HFVALUE = NOT_HFNAME;
|
||||
const TO = new RegExp("^" + TO$ + "$");
|
||||
const HFIELDS = new RegExp("^" + HFIELDS2$ + "$");
|
||||
function decodeUnreserved(str) {
|
||||
const decStr = pctDecChars(str);
|
||||
return (!decStr.match(UNRESERVED) ? str : decStr);
|
||||
}
|
||||
const handler = {
|
||||
scheme: "mailto",
|
||||
parse: function (components, options) {
|
||||
const mailtoComponents = components;
|
||||
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
|
||||
mailtoComponents.path = undefined;
|
||||
if (mailtoComponents.query) {
|
||||
let unknownHeaders = false;
|
||||
const headers = {};
|
||||
const hfields = mailtoComponents.query.split("&");
|
||||
for (let x = 0, xl = hfields.length; x < xl; ++x) {
|
||||
const hfield = hfields[x].split("=");
|
||||
switch (hfield[0]) {
|
||||
case "to":
|
||||
const toAddrs = hfield[1].split(",");
|
||||
for (let x = 0, xl = toAddrs.length; x < xl; ++x) {
|
||||
to.push(toAddrs[x]);
|
||||
}
|
||||
break;
|
||||
case "subject":
|
||||
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
case "body":
|
||||
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
default:
|
||||
unknownHeaders = true;
|
||||
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (unknownHeaders)
|
||||
mailtoComponents.headers = headers;
|
||||
}
|
||||
mailtoComponents.query = undefined;
|
||||
for (let x = 0, xl = to.length; x < xl; ++x) {
|
||||
const addr = to[x].split("@");
|
||||
addr[0] = unescapeComponent(addr[0]);
|
||||
if (!options.unicodeSupport) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
||||
}
|
||||
catch (e) {
|
||||
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
}
|
||||
else {
|
||||
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
||||
}
|
||||
to[x] = addr.join("@");
|
||||
}
|
||||
return mailtoComponents;
|
||||
},
|
||||
serialize: function (mailtoComponents, options) {
|
||||
const components = mailtoComponents;
|
||||
const to = toArray(mailtoComponents.to);
|
||||
if (to) {
|
||||
for (let x = 0, xl = to.length; x < xl; ++x) {
|
||||
const toAddr = String(to[x]);
|
||||
const atIdx = toAddr.lastIndexOf("@");
|
||||
const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
||||
let domain = toAddr.slice(atIdx + 1);
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
to[x] = localPart + "@" + domain;
|
||||
}
|
||||
components.path = to.join(",");
|
||||
}
|
||||
const headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
||||
if (mailtoComponents.subject)
|
||||
headers["subject"] = mailtoComponents.subject;
|
||||
if (mailtoComponents.body)
|
||||
headers["body"] = mailtoComponents.body;
|
||||
const fields = [];
|
||||
for (const name in headers) {
|
||||
if (headers[name] !== O[name]) {
|
||||
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +
|
||||
"=" +
|
||||
headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
||||
}
|
||||
}
|
||||
if (fields.length) {
|
||||
components.query = fields.join("&");
|
||||
}
|
||||
return components;
|
||||
}
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=mailto.js.map
|
1
node_modules/uri-js/dist/esnext/schemes/mailto.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/schemes/mailto.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
generated
vendored
Normal file
7
node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { URISchemeHandler, URIOptions } from "../uri";
|
||||
import { URNComponents } from "./urn";
|
||||
export interface UUIDComponents extends URNComponents {
|
||||
uuid?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<UUIDComponents, URIOptions, URNComponents>;
|
||||
export default handler;
|
23
node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
generated
vendored
Normal file
23
node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
||||
const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/;
|
||||
//RFC 4122
|
||||
const handler = {
|
||||
scheme: "urn:uuid",
|
||||
parse: function (urnComponents, options) {
|
||||
const uuidComponents = urnComponents;
|
||||
uuidComponents.uuid = uuidComponents.nss;
|
||||
uuidComponents.nss = undefined;
|
||||
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
||||
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
||||
}
|
||||
return uuidComponents;
|
||||
},
|
||||
serialize: function (uuidComponents, options) {
|
||||
const urnComponents = uuidComponents;
|
||||
//normalize UUID
|
||||
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
||||
return urnComponents;
|
||||
},
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=urn-uuid.js.map
|
1
node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
10
node_modules/uri-js/dist/esnext/schemes/urn.d.ts
generated
vendored
Normal file
10
node_modules/uri-js/dist/esnext/schemes/urn.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { URISchemeHandler, URIComponents, URIOptions } from "../uri";
|
||||
export interface URNComponents extends URIComponents {
|
||||
nid?: string;
|
||||
nss?: string;
|
||||
}
|
||||
export interface URNOptions extends URIOptions {
|
||||
nid?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<URNComponents, URNOptions>;
|
||||
export default handler;
|
49
node_modules/uri-js/dist/esnext/schemes/urn.js
generated
vendored
Normal file
49
node_modules/uri-js/dist/esnext/schemes/urn.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { SCHEMES } from "../uri";
|
||||
const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})";
|
||||
const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})";
|
||||
const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]";
|
||||
const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)";
|
||||
const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$");
|
||||
const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$");
|
||||
const URN_PARSE = /^([^\:]+)\:(.*)/;
|
||||
const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g;
|
||||
//RFC 2141
|
||||
const handler = {
|
||||
scheme: "urn",
|
||||
parse: function (components, options) {
|
||||
const matches = components.path && components.path.match(URN_PARSE);
|
||||
let urnComponents = components;
|
||||
if (matches) {
|
||||
const scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
const nid = matches[1].toLowerCase();
|
||||
const nss = matches[2];
|
||||
const urnScheme = `${scheme}:${options.nid || nid}`;
|
||||
const schemeHandler = SCHEMES[urnScheme];
|
||||
urnComponents.nid = nid;
|
||||
urnComponents.nss = nss;
|
||||
urnComponents.path = undefined;
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.parse(urnComponents, options);
|
||||
}
|
||||
}
|
||||
else {
|
||||
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
||||
}
|
||||
return urnComponents;
|
||||
},
|
||||
serialize: function (urnComponents, options) {
|
||||
const scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
const nid = urnComponents.nid;
|
||||
const urnScheme = `${scheme}:${options.nid || nid}`;
|
||||
const schemeHandler = SCHEMES[urnScheme];
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.serialize(urnComponents, options);
|
||||
}
|
||||
const uriComponents = urnComponents;
|
||||
const nss = urnComponents.nss;
|
||||
uriComponents.path = `${nid || options.nid}:${nss}`;
|
||||
return uriComponents;
|
||||
},
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=urn.js.map
|
1
node_modules/uri-js/dist/esnext/schemes/urn.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/schemes/urn.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,OAAO,GAAG,mEAAmE,CAAC;AACpF,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,OAAO,GAAG,KAAK,CAAC;AAC7D,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACjE,MAAM,SAAS,GAAG,iBAAiB,CAAC;AACpC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAEvE,UAAU;AACV,MAAM,OAAO,GAA8C;IAC1D,MAAM,EAAG,KAAK;IAEd,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,aAAa,GAAG,UAA2B,CAAC;QAEhD,IAAI,OAAO,EAAE;YACZ,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;YAC/D,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;YACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;YAEzC,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;YACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;YACxB,aAAa,CAAC,IAAI,GAAG,SAAS,CAAC;YAE/B,IAAI,aAAa,EAAE;gBAClB,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;aAC7E;SACD;aAAM;YACN,aAAa,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,wBAAwB,CAAC;SACtE;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,SAAS,EAAG,UAAU,aAA2B,EAAE,OAAkB;QACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;QAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
59
node_modules/uri-js/dist/esnext/uri.d.ts
generated
vendored
Normal file
59
node_modules/uri-js/dist/esnext/uri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
480
node_modules/uri-js/dist/esnext/uri.js
generated
vendored
Normal file
480
node_modules/uri-js/dist/esnext/uri.js
generated
vendored
Normal file
@@ -0,0 +1,480 @@
|
||||
/**
|
||||
* URI.js
|
||||
*
|
||||
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
|
||||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
||||
* @see http://github.com/garycourt/uri-js
|
||||
*/
|
||||
/**
|
||||
* Copyright 2011 Gary Court. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of Gary Court.
|
||||
*/
|
||||
import URI_PROTOCOL from "./regexps-uri";
|
||||
import IRI_PROTOCOL from "./regexps-iri";
|
||||
import punycode from "punycode";
|
||||
import { toUpperCase, typeOf, assign } from "./util";
|
||||
export const SCHEMES = {};
|
||||
export function pctEncChar(chr) {
|
||||
const c = chr.charCodeAt(0);
|
||||
let e;
|
||||
if (c < 16)
|
||||
e = "%0" + c.toString(16).toUpperCase();
|
||||
else if (c < 128)
|
||||
e = "%" + c.toString(16).toUpperCase();
|
||||
else if (c < 2048)
|
||||
e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
|
||||
else
|
||||
e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
|
||||
return e;
|
||||
}
|
||||
export function pctDecChars(str) {
|
||||
let newStr = "";
|
||||
let i = 0;
|
||||
const il = str.length;
|
||||
while (i < il) {
|
||||
const c = parseInt(str.substr(i + 1, 2), 16);
|
||||
if (c < 128) {
|
||||
newStr += String.fromCharCode(c);
|
||||
i += 3;
|
||||
}
|
||||
else if (c >= 194 && c < 224) {
|
||||
if ((il - i) >= 6) {
|
||||
const c2 = parseInt(str.substr(i + 4, 2), 16);
|
||||
newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 6);
|
||||
}
|
||||
i += 6;
|
||||
}
|
||||
else if (c >= 224) {
|
||||
if ((il - i) >= 9) {
|
||||
const c2 = parseInt(str.substr(i + 4, 2), 16);
|
||||
const c3 = parseInt(str.substr(i + 7, 2), 16);
|
||||
newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 9);
|
||||
}
|
||||
i += 9;
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 3);
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
function _normalizeComponentEncoding(components, protocol) {
|
||||
function decodeUnreserved(str) {
|
||||
const decStr = pctDecChars(str);
|
||||
return (!decStr.match(protocol.UNRESERVED) ? str : decStr);
|
||||
}
|
||||
if (components.scheme)
|
||||
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
||||
if (components.userinfo !== undefined)
|
||||
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.host !== undefined)
|
||||
components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.path !== undefined)
|
||||
components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.query !== undefined)
|
||||
components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.fragment !== undefined)
|
||||
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
return components;
|
||||
}
|
||||
;
|
||||
function _stripLeadingZeros(str) {
|
||||
return str.replace(/^0*(.*)/, "$1") || "0";
|
||||
}
|
||||
function _normalizeIPv4(host, protocol) {
|
||||
const matches = host.match(protocol.IPV4ADDRESS) || [];
|
||||
const [, address] = matches;
|
||||
if (address) {
|
||||
return address.split(".").map(_stripLeadingZeros).join(".");
|
||||
}
|
||||
else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
function _normalizeIPv6(host, protocol) {
|
||||
const matches = host.match(protocol.IPV6ADDRESS) || [];
|
||||
const [, address, zone] = matches;
|
||||
if (address) {
|
||||
const [last, first] = address.toLowerCase().split('::').reverse();
|
||||
const firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
||||
const lastFields = last.split(":").map(_stripLeadingZeros);
|
||||
const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
||||
const fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
||||
const lastFieldsStart = lastFields.length - fieldCount;
|
||||
const fields = Array(fieldCount);
|
||||
for (let x = 0; x < fieldCount; ++x) {
|
||||
fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
|
||||
}
|
||||
if (isLastFieldIPv4Address) {
|
||||
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
||||
}
|
||||
const allZeroFields = fields.reduce((acc, field, index) => {
|
||||
if (!field || field === "0") {
|
||||
const lastLongest = acc[acc.length - 1];
|
||||
if (lastLongest && lastLongest.index + lastLongest.length === index) {
|
||||
lastLongest.length++;
|
||||
}
|
||||
else {
|
||||
acc.push({ index, length: 1 });
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];
|
||||
let newHost;
|
||||
if (longestZeroFields && longestZeroFields.length > 1) {
|
||||
const newFirst = fields.slice(0, longestZeroFields.index);
|
||||
const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
||||
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
||||
}
|
||||
else {
|
||||
newHost = fields.join(":");
|
||||
}
|
||||
if (zone) {
|
||||
newHost += "%" + zone;
|
||||
}
|
||||
return newHost;
|
||||
}
|
||||
else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
|
||||
const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined;
|
||||
export function parse(uriString, options = {}) {
|
||||
const components = {};
|
||||
const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
if (options.reference === "suffix")
|
||||
uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
|
||||
const matches = uriString.match(URI_PARSE);
|
||||
if (matches) {
|
||||
if (NO_MATCH_IS_UNDEFINED) {
|
||||
//store each component
|
||||
components.scheme = matches[1];
|
||||
components.userinfo = matches[3];
|
||||
components.host = matches[4];
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = matches[7];
|
||||
components.fragment = matches[8];
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = matches[5];
|
||||
}
|
||||
}
|
||||
else { //IE FIX for improper RegExp matching
|
||||
//store each component
|
||||
components.scheme = matches[1] || undefined;
|
||||
components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined);
|
||||
components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined);
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined);
|
||||
components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined);
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined);
|
||||
}
|
||||
}
|
||||
if (components.host) {
|
||||
//normalize IP hosts
|
||||
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
||||
}
|
||||
//determine reference type
|
||||
if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
|
||||
components.reference = "same-document";
|
||||
}
|
||||
else if (components.scheme === undefined) {
|
||||
components.reference = "relative";
|
||||
}
|
||||
else if (components.fragment === undefined) {
|
||||
components.reference = "absolute";
|
||||
}
|
||||
else {
|
||||
components.reference = "uri";
|
||||
}
|
||||
//check for reference errors
|
||||
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
||||
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
||||
}
|
||||
//find scheme handler
|
||||
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//check if scheme can't handle IRIs
|
||||
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
||||
//if host component is a domain name
|
||||
if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
}
|
||||
//convert IRI -> URI
|
||||
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
||||
}
|
||||
else {
|
||||
//normalize encodings
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
}
|
||||
//perform scheme specific parsing
|
||||
if (schemeHandler && schemeHandler.parse) {
|
||||
schemeHandler.parse(components, options);
|
||||
}
|
||||
}
|
||||
else {
|
||||
components.error = components.error || "URI can not be parsed.";
|
||||
}
|
||||
return components;
|
||||
}
|
||||
;
|
||||
function _recomposeAuthority(components, options) {
|
||||
const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
const uriTokens = [];
|
||||
if (components.userinfo !== undefined) {
|
||||
uriTokens.push(components.userinfo);
|
||||
uriTokens.push("@");
|
||||
}
|
||||
if (components.host !== undefined) {
|
||||
//normalize IP hosts, add brackets and escape zone separator for IPv6
|
||||
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]"));
|
||||
}
|
||||
if (typeof components.port === "number") {
|
||||
uriTokens.push(":");
|
||||
uriTokens.push(components.port.toString(10));
|
||||
}
|
||||
return uriTokens.length ? uriTokens.join("") : undefined;
|
||||
}
|
||||
;
|
||||
const RDS1 = /^\.\.?\//;
|
||||
const RDS2 = /^\/\.(\/|$)/;
|
||||
const RDS3 = /^\/\.\.(\/|$)/;
|
||||
const RDS4 = /^\.\.?$/;
|
||||
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
||||
export function removeDotSegments(input) {
|
||||
const output = [];
|
||||
while (input.length) {
|
||||
if (input.match(RDS1)) {
|
||||
input = input.replace(RDS1, "");
|
||||
}
|
||||
else if (input.match(RDS2)) {
|
||||
input = input.replace(RDS2, "/");
|
||||
}
|
||||
else if (input.match(RDS3)) {
|
||||
input = input.replace(RDS3, "/");
|
||||
output.pop();
|
||||
}
|
||||
else if (input === "." || input === "..") {
|
||||
input = "";
|
||||
}
|
||||
else {
|
||||
const im = input.match(RDS5);
|
||||
if (im) {
|
||||
const s = im[0];
|
||||
input = input.slice(s.length);
|
||||
output.push(s);
|
||||
}
|
||||
else {
|
||||
throw new Error("Unexpected dot segment condition");
|
||||
}
|
||||
}
|
||||
}
|
||||
return output.join("");
|
||||
}
|
||||
;
|
||||
export function serialize(components, options = {}) {
|
||||
const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
const uriTokens = [];
|
||||
//find scheme handler
|
||||
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//perform scheme specific serialization
|
||||
if (schemeHandler && schemeHandler.serialize)
|
||||
schemeHandler.serialize(components, options);
|
||||
if (components.host) {
|
||||
//if host component is an IPv6 address
|
||||
if (protocol.IPV6ADDRESS.test(components.host)) {
|
||||
//TODO: normalize IPv6 address as per RFC 5952
|
||||
}
|
||||
//if host component is a domain name
|
||||
else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
}
|
||||
}
|
||||
//normalize encoding
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
if (options.reference !== "suffix" && components.scheme) {
|
||||
uriTokens.push(components.scheme);
|
||||
uriTokens.push(":");
|
||||
}
|
||||
const authority = _recomposeAuthority(components, options);
|
||||
if (authority !== undefined) {
|
||||
if (options.reference !== "suffix") {
|
||||
uriTokens.push("//");
|
||||
}
|
||||
uriTokens.push(authority);
|
||||
if (components.path && components.path.charAt(0) !== "/") {
|
||||
uriTokens.push("/");
|
||||
}
|
||||
}
|
||||
if (components.path !== undefined) {
|
||||
let s = components.path;
|
||||
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
||||
s = removeDotSegments(s);
|
||||
}
|
||||
if (authority === undefined) {
|
||||
s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
|
||||
}
|
||||
uriTokens.push(s);
|
||||
}
|
||||
if (components.query !== undefined) {
|
||||
uriTokens.push("?");
|
||||
uriTokens.push(components.query);
|
||||
}
|
||||
if (components.fragment !== undefined) {
|
||||
uriTokens.push("#");
|
||||
uriTokens.push(components.fragment);
|
||||
}
|
||||
return uriTokens.join(""); //merge tokens into a string
|
||||
}
|
||||
;
|
||||
export function resolveComponents(base, relative, options = {}, skipNormalization) {
|
||||
const target = {};
|
||||
if (!skipNormalization) {
|
||||
base = parse(serialize(base, options), options); //normalize base components
|
||||
relative = parse(serialize(relative, options), options); //normalize relative components
|
||||
}
|
||||
options = options || {};
|
||||
if (!options.tolerant && relative.scheme) {
|
||||
target.scheme = relative.scheme;
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
if (!relative.path) {
|
||||
target.path = base.path;
|
||||
if (relative.query !== undefined) {
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
target.query = base.query;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (relative.path.charAt(0) === "/") {
|
||||
target.path = removeDotSegments(relative.path);
|
||||
}
|
||||
else {
|
||||
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
||||
target.path = "/" + relative.path;
|
||||
}
|
||||
else if (!base.path) {
|
||||
target.path = relative.path;
|
||||
}
|
||||
else {
|
||||
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
||||
}
|
||||
target.path = removeDotSegments(target.path);
|
||||
}
|
||||
target.query = relative.query;
|
||||
}
|
||||
//target.authority = base.authority;
|
||||
target.userinfo = base.userinfo;
|
||||
target.host = base.host;
|
||||
target.port = base.port;
|
||||
}
|
||||
target.scheme = base.scheme;
|
||||
}
|
||||
target.fragment = relative.fragment;
|
||||
return target;
|
||||
}
|
||||
;
|
||||
export function resolve(baseURI, relativeURI, options) {
|
||||
const schemelessOptions = assign({ scheme: 'null' }, options);
|
||||
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
||||
}
|
||||
;
|
||||
export function normalize(uri, options) {
|
||||
if (typeof uri === "string") {
|
||||
uri = serialize(parse(uri, options), options);
|
||||
}
|
||||
else if (typeOf(uri) === "object") {
|
||||
uri = parse(serialize(uri, options), options);
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
;
|
||||
export function equal(uriA, uriB, options) {
|
||||
if (typeof uriA === "string") {
|
||||
uriA = serialize(parse(uriA, options), options);
|
||||
}
|
||||
else if (typeOf(uriA) === "object") {
|
||||
uriA = serialize(uriA, options);
|
||||
}
|
||||
if (typeof uriB === "string") {
|
||||
uriB = serialize(parse(uriB, options), options);
|
||||
}
|
||||
else if (typeOf(uriB) === "object") {
|
||||
uriB = serialize(uriB, options);
|
||||
}
|
||||
return uriA === uriB;
|
||||
}
|
||||
;
|
||||
export function escapeComponent(str, options) {
|
||||
return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);
|
||||
}
|
||||
;
|
||||
export function unescapeComponent(str, options) {
|
||||
return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=uri.js.map
|
1
node_modules/uri-js/dist/esnext/uri.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/uri.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/uri-js/dist/esnext/util.d.ts
generated
vendored
Normal file
6
node_modules/uri-js/dist/esnext/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function merge(...sets: Array<string>): string;
|
||||
export declare function subexp(str: string): string;
|
||||
export declare function typeOf(o: any): string;
|
||||
export declare function toUpperCase(str: string): string;
|
||||
export declare function toArray(obj: any): Array<any>;
|
||||
export declare function assign(target: object, source: any): any;
|
36
node_modules/uri-js/dist/esnext/util.js
generated
vendored
Normal file
36
node_modules/uri-js/dist/esnext/util.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
export function merge(...sets) {
|
||||
if (sets.length > 1) {
|
||||
sets[0] = sets[0].slice(0, -1);
|
||||
const xl = sets.length - 1;
|
||||
for (let x = 1; x < xl; ++x) {
|
||||
sets[x] = sets[x].slice(1, -1);
|
||||
}
|
||||
sets[xl] = sets[xl].slice(1);
|
||||
return sets.join('');
|
||||
}
|
||||
else {
|
||||
return sets[0];
|
||||
}
|
||||
}
|
||||
export function subexp(str) {
|
||||
return "(?:" + str + ")";
|
||||
}
|
||||
export function typeOf(o) {
|
||||
return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase());
|
||||
}
|
||||
export function toUpperCase(str) {
|
||||
return str.toUpperCase();
|
||||
}
|
||||
export function toArray(obj) {
|
||||
return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];
|
||||
}
|
||||
export function assign(target, source) {
|
||||
const obj = target;
|
||||
if (source) {
|
||||
for (const key in source) {
|
||||
obj[key] = source[key];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
1
node_modules/uri-js/dist/esnext/util.js.map
generated
vendored
Normal file
1
node_modules/uri-js/dist/esnext/util.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACrB;SAAM;QACN,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;KACf;AACF,CAAC;AAED,MAAM,iBAAiB,GAAU;IAChC,OAAO,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;AAC1B,CAAC;AAED,MAAM,iBAAiB,CAAK;IAC3B,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACpJ,CAAC;AAED,MAAM,sBAAsB,GAAU;IACrC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,kBAAkB,GAAO;IAC9B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvM,CAAC;AAGD,MAAM,iBAAiB,MAAc,EAAE,MAAW;IACjD,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,IAAI,MAAM,EAAE;QACX,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
5
package-lock.json
generated
5
package-lock.json
generated
@@ -12,6 +12,11 @@
|
||||
"regenerator-runtime": "^0.13.2"
|
||||
}
|
||||
},
|
||||
"@ungap/url-search-params": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/url-search-params/-/url-search-params-0.1.4.tgz",
|
||||
"integrity": "sha512-RLwrxCTDNiNev9hpr9rDq8NyeQ8Nn0X1we4Wu7Tlf368I8r+7hBj3uObhifhuLk74egaYaSX5nUsBlWz6kjj+A=="
|
||||
},
|
||||
"abab": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz",
|
||||
|
15
package.json
15
package.json
@@ -9,12 +9,13 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.4.1",
|
||||
"ejs": "^2.7.4",
|
||||
"ejs-render-remote": "^1.0.7",
|
||||
"es6-promise": "^4.2.8",
|
||||
"i18next": "^15.1.3",
|
||||
"i18next-browser-languagedetector": "^3.1.1",
|
||||
"@ungap/url-search-params": "^0.1.4",
|
||||
"bootstrap": "^4.3.1",
|
||||
"ejs": "^2.6.1",
|
||||
"ejs-render-remote": "^1.0.3",
|
||||
"es6-promise": "^4.2.6",
|
||||
"i18next": "^15.0.9",
|
||||
"i18next-browser-languagedetector": "^3.0.1",
|
||||
"i18next-xhr-backend": "^2.0.1",
|
||||
"jquery": "^3.4.1",
|
||||
"page": "^1.11.5",
|
||||
@@ -22,6 +23,6 @@
|
||||
"popper.js": "^1.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"minifyfromhtml": "^1.1.7"
|
||||
"minifyfromhtml": "^1.1.2"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user