shogun-core 1.11.0 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68814,6 +68814,136 @@ module.exports = function(r){
|
|
|
68814
68814
|
|
|
68815
68815
|
/***/ }),
|
|
68816
68816
|
|
|
68817
|
+
/***/ "./node_modules/gun/lib/rfs.js":
|
|
68818
|
+
/*!*************************************!*\
|
|
68819
|
+
!*** ./node_modules/gun/lib/rfs.js ***!
|
|
68820
|
+
\*************************************/
|
|
68821
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
68822
|
+
|
|
68823
|
+
function Store(opt){
|
|
68824
|
+
opt = opt || {};
|
|
68825
|
+
opt.log = opt.log || console.log;
|
|
68826
|
+
opt.file = String(opt.file || 'radata');
|
|
68827
|
+
var fs = __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'fs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())), u;
|
|
68828
|
+
|
|
68829
|
+
var store = function Store(){};
|
|
68830
|
+
if(Store[opt.file]){
|
|
68831
|
+
console.log("Warning: reusing same fs store and options as 1st.");
|
|
68832
|
+
return Store[opt.file];
|
|
68833
|
+
}
|
|
68834
|
+
Store[opt.file] = store;
|
|
68835
|
+
var puts = {};
|
|
68836
|
+
|
|
68837
|
+
// TODO!!! ADD ZLIB INFLATE / DEFLATE COMPRESSION!
|
|
68838
|
+
store.put = function(file, data, cb){
|
|
68839
|
+
var random = Math.random().toString(36).slice(-3);
|
|
68840
|
+
puts[file] = {id: random, data: data};
|
|
68841
|
+
var tmp = opt.file+'-'+file+'-'+random+'.tmp';
|
|
68842
|
+
fs.writeFile(tmp, data, function(err, ok){
|
|
68843
|
+
if(err){
|
|
68844
|
+
if(random === (puts[file]||'').id){ delete puts[file] }
|
|
68845
|
+
return cb(err);
|
|
68846
|
+
}
|
|
68847
|
+
move(tmp, opt.file+'/'+file, function(err, ok){
|
|
68848
|
+
if(random === (puts[file]||'').id){ delete puts[file] }
|
|
68849
|
+
cb(err, ok || !err);
|
|
68850
|
+
});
|
|
68851
|
+
});
|
|
68852
|
+
};
|
|
68853
|
+
store.get = function(file, cb){ var tmp; // this took 3s+?
|
|
68854
|
+
if(tmp = puts[file]){ cb(u, tmp.data); return }
|
|
68855
|
+
fs.readFile(opt.file+'/'+file, function(err, data){
|
|
68856
|
+
if(err){
|
|
68857
|
+
if('ENOENT' === (err.code||'').toUpperCase()){
|
|
68858
|
+
return cb();
|
|
68859
|
+
}
|
|
68860
|
+
opt.log("ERROR:", err);
|
|
68861
|
+
}
|
|
68862
|
+
cb(err, data);
|
|
68863
|
+
});
|
|
68864
|
+
};
|
|
68865
|
+
|
|
68866
|
+
if(!fs.existsSync(opt.file)){ fs.mkdirSync(opt.file) }
|
|
68867
|
+
|
|
68868
|
+
function move(oldPath, newPath, cb) {
|
|
68869
|
+
fs.rename(oldPath, newPath, function (err) {
|
|
68870
|
+
if (err) {
|
|
68871
|
+
if (err.code === 'EXDEV') {
|
|
68872
|
+
var readStream = fs.createReadStream(oldPath);
|
|
68873
|
+
var writeStream = fs.createWriteStream(newPath);
|
|
68874
|
+
|
|
68875
|
+
readStream.on('error', cb);
|
|
68876
|
+
writeStream.on('error', cb);
|
|
68877
|
+
|
|
68878
|
+
readStream.on('close', function () {
|
|
68879
|
+
fs.unlink(oldPath, cb);
|
|
68880
|
+
});
|
|
68881
|
+
|
|
68882
|
+
readStream.pipe(writeStream);
|
|
68883
|
+
} else {
|
|
68884
|
+
cb(err);
|
|
68885
|
+
}
|
|
68886
|
+
} else {
|
|
68887
|
+
cb();
|
|
68888
|
+
}
|
|
68889
|
+
});
|
|
68890
|
+
};
|
|
68891
|
+
|
|
68892
|
+
store.list = function(cb, match, params, cbs){
|
|
68893
|
+
var dir = fs.readdirSync(opt.file);
|
|
68894
|
+
dir.forEach(function(file){
|
|
68895
|
+
cb(file);
|
|
68896
|
+
})
|
|
68897
|
+
cb();
|
|
68898
|
+
};
|
|
68899
|
+
|
|
68900
|
+
return store;
|
|
68901
|
+
}
|
|
68902
|
+
|
|
68903
|
+
var Gun = ( true)? window.Gun : 0;
|
|
68904
|
+
Gun.on('create', function(root){
|
|
68905
|
+
this.to.next(root);
|
|
68906
|
+
var opt = root.opt;
|
|
68907
|
+
if(opt.rfs === false){ return }
|
|
68908
|
+
opt.store = opt.store || (!Gun.window && Store(opt));
|
|
68909
|
+
});
|
|
68910
|
+
|
|
68911
|
+
module.exports = Store;
|
|
68912
|
+
|
|
68913
|
+
/***/ }),
|
|
68914
|
+
|
|
68915
|
+
/***/ "./node_modules/gun/lib/rfsmix.js":
|
|
68916
|
+
/*!****************************************!*\
|
|
68917
|
+
!*** ./node_modules/gun/lib/rfsmix.js ***!
|
|
68918
|
+
\****************************************/
|
|
68919
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
68920
|
+
|
|
68921
|
+
module.exports = function(opt, store){
|
|
68922
|
+
var rfs = __webpack_require__(/*! ./rfs */ "./node_modules/gun/lib/rfs.js")(opt);
|
|
68923
|
+
var p = store.put;
|
|
68924
|
+
var g = store.get;
|
|
68925
|
+
store.put = function(file, data, cb){
|
|
68926
|
+
var a, b, c = function(err, ok){
|
|
68927
|
+
if(b){ return cb(err || b) }
|
|
68928
|
+
if(a){ return cb(err, ok) }
|
|
68929
|
+
a = true;
|
|
68930
|
+
b = err;
|
|
68931
|
+
}
|
|
68932
|
+
p(file, data, c); // parallel
|
|
68933
|
+
rfs.put(file, data, c); // parallel
|
|
68934
|
+
}
|
|
68935
|
+
store.get = function(file, cb){
|
|
68936
|
+
rfs.get(file, function(err, data){
|
|
68937
|
+
//console.log("rfs3 hijacked", file);
|
|
68938
|
+
if(data){ return cb(err, data) }
|
|
68939
|
+
g(file, cb);
|
|
68940
|
+
});
|
|
68941
|
+
}
|
|
68942
|
+
return store;
|
|
68943
|
+
}
|
|
68944
|
+
|
|
68945
|
+
/***/ }),
|
|
68946
|
+
|
|
68817
68947
|
/***/ "./node_modules/gun/lib/rindexed.js":
|
|
68818
68948
|
/*!******************************************!*\
|
|
68819
68949
|
!*** ./node_modules/gun/lib/rindexed.js ***!
|
|
@@ -68899,6 +69029,125 @@ if (navigator.storage && navigator.storage.estimate) {
|
|
|
68899
69029
|
|
|
68900
69030
|
}());
|
|
68901
69031
|
|
|
69032
|
+
/***/ }),
|
|
69033
|
+
|
|
69034
|
+
/***/ "./node_modules/gun/lib/rs3.js":
|
|
69035
|
+
/*!*************************************!*\
|
|
69036
|
+
!*** ./node_modules/gun/lib/rs3.js ***!
|
|
69037
|
+
\*************************************/
|
|
69038
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
69039
|
+
|
|
69040
|
+
/* provided dependency */ var process = __webpack_require__(/*! process/browser */ "./node_modules/process/browser.js");
|
|
69041
|
+
var Gun = __webpack_require__(/*! ../gun */ "./node_modules/gun/gun.js");
|
|
69042
|
+
var Radisk = __webpack_require__(/*! ./radisk */ "./node_modules/gun/lib/radisk.js");
|
|
69043
|
+
var fs = __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'fs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
|
|
69044
|
+
var Radix = Radisk.Radix;
|
|
69045
|
+
var u, AWS;
|
|
69046
|
+
|
|
69047
|
+
Gun.on('create', function(root){
|
|
69048
|
+
this.to.next(root);
|
|
69049
|
+
var opt = root.opt;
|
|
69050
|
+
if(!opt.s3 && !process.env.AWS_S3_BUCKET){ return }
|
|
69051
|
+
//opt.batch = opt.batch || (1000 * 10);
|
|
69052
|
+
//opt.until = opt.until || (1000 * 3); // ignoring these now, cause perf > cost
|
|
69053
|
+
//opt.chunk = opt.chunk || (1024 * 1024 * 10); // 10MB // when cost only cents
|
|
69054
|
+
|
|
69055
|
+
try{AWS = __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'aws-sdk'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
|
|
69056
|
+
}catch(e){
|
|
69057
|
+
console.log("Please `npm install aws-sdk` or add it to your package.json !");
|
|
69058
|
+
AWS_SDK_NOT_INSTALLED;
|
|
69059
|
+
}
|
|
69060
|
+
|
|
69061
|
+
var opts = opt.s3 || (opt.s3 = {});
|
|
69062
|
+
opts.bucket = opts.bucket || process.env.AWS_S3_BUCKET;
|
|
69063
|
+
opts.region = opts.region || process.env.AWS_REGION || "us-east-1";
|
|
69064
|
+
opts.accessKeyId = opts.key = opts.key || opts.accessKeyId || process.env.AWS_ACCESS_KEY_ID;
|
|
69065
|
+
opts.secretAccessKey = opts.secret = opts.secret || opts.secretAccessKey || process.env.AWS_SECRET_ACCESS_KEY;
|
|
69066
|
+
|
|
69067
|
+
if(opt.fakes3 = opt.fakes3 || process.env.fakes3){
|
|
69068
|
+
opts.endpoint = opt.fakes3;
|
|
69069
|
+
opts.sslEnabled = false;
|
|
69070
|
+
opts.bucket = opts.bucket.replace('.','p');
|
|
69071
|
+
}
|
|
69072
|
+
|
|
69073
|
+
opts.config = new AWS.Config(opts);
|
|
69074
|
+
opts.s3 = opts.s3 || new AWS.S3(opts.config);
|
|
69075
|
+
|
|
69076
|
+
opt.store = Object.keys(opts.s3).length === 0 ? opt.store : Store(opt);
|
|
69077
|
+
});
|
|
69078
|
+
|
|
69079
|
+
function Store(opt){
|
|
69080
|
+
opt = opt || {};
|
|
69081
|
+
opt.file = String(opt.file || 'radata');
|
|
69082
|
+
var opts = opt.s3, s3 = opts.s3;
|
|
69083
|
+
var c = {p: {}, g: {}, l: {}};
|
|
69084
|
+
|
|
69085
|
+
var store = function Store(){};
|
|
69086
|
+
if(Store[opt.file]){
|
|
69087
|
+
console.log("Warning: reusing same S3 store and options as 1st.");
|
|
69088
|
+
return Store[opt.file];
|
|
69089
|
+
}
|
|
69090
|
+
Store[opt.file] = store;
|
|
69091
|
+
|
|
69092
|
+
store.put = function(file, data, cb){
|
|
69093
|
+
var params = {Bucket: opts.bucket, Key: file, Body: data};
|
|
69094
|
+
//console.log("RS3 PUT ---->", (data||"").slice(0,20));
|
|
69095
|
+
c.p[file] = data;
|
|
69096
|
+
delete c.g[file];//Gun.obj.del(c.g, file);
|
|
69097
|
+
delete c.l[1];//Gun.obj.del(c.l, 1);
|
|
69098
|
+
s3.putObject(params, function(err, ok){
|
|
69099
|
+
delete c.p[file];
|
|
69100
|
+
cb(err, 's3');
|
|
69101
|
+
});
|
|
69102
|
+
};
|
|
69103
|
+
store.get = function(file, cb){ var tmp;
|
|
69104
|
+
if(tmp = c.p[file]){ cb(u, tmp); return }
|
|
69105
|
+
if(tmp = c.g[file]){ tmp.push(cb); return }
|
|
69106
|
+
var cbs = c.g[file] = [cb];
|
|
69107
|
+
var params = {Bucket: opts.bucket, Key: file||''};
|
|
69108
|
+
//console.log("RS3 GET ---->", file);
|
|
69109
|
+
s3.getObject(params, function got(err, ack){
|
|
69110
|
+
if(err && 'NoSuchKey' === err.code){ err = u }
|
|
69111
|
+
//console.log("RS3 GOT <----", err, file, cbs.length, ((ack||{}).Body||'').length);//.toString().slice(0,20));
|
|
69112
|
+
delete c.g[file];//Gun.obj.del(c.g, file);
|
|
69113
|
+
var data, data = (ack||'').Body;
|
|
69114
|
+
//console.log(1, process.memoryUsage().heapUsed);
|
|
69115
|
+
var i = 0, cba; while(cba = cbs[i++]){ cba && cba(err, data) }//Gun.obj.map(cbs, cbe);
|
|
69116
|
+
});
|
|
69117
|
+
};
|
|
69118
|
+
store.list = function(cb, match, params, cbs){
|
|
69119
|
+
if(!cbs){
|
|
69120
|
+
if(c.l[1]){ return c.l[1].push(cb) }
|
|
69121
|
+
cbs = c.l[1] = [cb];
|
|
69122
|
+
}
|
|
69123
|
+
params = params || {Bucket: opts.bucket};
|
|
69124
|
+
//console.log("RS3 LIST --->");
|
|
69125
|
+
s3.listObjectsV2(params, function(err, data){
|
|
69126
|
+
//console.log("RS3 LIST <---", err, data, cbs.length);
|
|
69127
|
+
if(err){ return Gun.log(err, err.stack) }
|
|
69128
|
+
var IT = data.IsTruncated, cbe = function(cb){
|
|
69129
|
+
if(cb.end){ return }
|
|
69130
|
+
if(Gun.obj.map(data.Contents, function(content){
|
|
69131
|
+
return cb(content.Key);
|
|
69132
|
+
})){ cb.end = true; return }
|
|
69133
|
+
if(IT){ return }
|
|
69134
|
+
// Stream interface requires a final call to know when to be done.
|
|
69135
|
+
cb.end = true; cb();
|
|
69136
|
+
}
|
|
69137
|
+
// Gun.obj.map(cbs, cbe); // lets see if fixes heroku
|
|
69138
|
+
if(!IT){ delete c.l[1]; return }
|
|
69139
|
+
params.ContinuationToken = data.NextContinuationToken;
|
|
69140
|
+
store.list(cb, match, params, cbs);
|
|
69141
|
+
});
|
|
69142
|
+
};
|
|
69143
|
+
//store.list(function(){ return true });
|
|
69144
|
+
if(false !== opt.rfs){ __webpack_require__(/*! ./rfsmix */ "./node_modules/gun/lib/rfsmix.js")(opt, store) } // ugly, but gotta move fast for now.
|
|
69145
|
+
return store;
|
|
69146
|
+
}
|
|
69147
|
+
|
|
69148
|
+
module.exports = Store;
|
|
69149
|
+
|
|
69150
|
+
|
|
68902
69151
|
/***/ }),
|
|
68903
69152
|
|
|
68904
69153
|
/***/ "./node_modules/gun/lib/store.js":
|
|
@@ -69059,6 +69308,38 @@ Gun.on('create', function(root){
|
|
|
69059
69308
|
var statg = 0, statp = 0; // STATS!
|
|
69060
69309
|
});
|
|
69061
69310
|
|
|
69311
|
+
/***/ }),
|
|
69312
|
+
|
|
69313
|
+
/***/ "./node_modules/gun/lib/then.js":
|
|
69314
|
+
/*!**************************************!*\
|
|
69315
|
+
!*** ./node_modules/gun/lib/then.js ***!
|
|
69316
|
+
\**************************************/
|
|
69317
|
+
/***/ (() => {
|
|
69318
|
+
|
|
69319
|
+
var Gun = ( true)? window.Gun : 0;
|
|
69320
|
+
|
|
69321
|
+
// Returns a gun reference in a promise and then calls a callback if specified
|
|
69322
|
+
Gun.chain.promise = function(cb) {
|
|
69323
|
+
var gun = this, cb = cb || function(ctx) { return ctx };
|
|
69324
|
+
return (new Promise(function(res, rej) {
|
|
69325
|
+
gun.once(function(data, key){
|
|
69326
|
+
res({put: data, get: key, gun: this}); // gun reference is returned by promise
|
|
69327
|
+
});
|
|
69328
|
+
})).then(cb); //calling callback with resolved data
|
|
69329
|
+
};
|
|
69330
|
+
|
|
69331
|
+
// Returns a promise for the data, key of the gun call
|
|
69332
|
+
Gun.chain.then = function(cb) {
|
|
69333
|
+
var gun = this;
|
|
69334
|
+
var p = (new Promise((res, rej)=>{
|
|
69335
|
+
gun.once(function (data, key) {
|
|
69336
|
+
res(data, key); //call resolve when data is returned
|
|
69337
|
+
})
|
|
69338
|
+
}))
|
|
69339
|
+
return cb ? p.then(cb) : p;
|
|
69340
|
+
};
|
|
69341
|
+
|
|
69342
|
+
|
|
69062
69343
|
/***/ }),
|
|
69063
69344
|
|
|
69064
69345
|
/***/ "./node_modules/gun/lib/webrtc.js":
|
|
@@ -69182,99 +69463,6 @@ Gun.on('create', function(root){
|
|
|
69182
69463
|
|
|
69183
69464
|
/***/ }),
|
|
69184
69465
|
|
|
69185
|
-
/***/ "./node_modules/gun/lib/wire.js":
|
|
69186
|
-
/*!**************************************!*\
|
|
69187
|
-
!*** ./node_modules/gun/lib/wire.js ***!
|
|
69188
|
-
\**************************************/
|
|
69189
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
69190
|
-
|
|
69191
|
-
var Gun = __webpack_require__(/*! ../gun */ "./node_modules/gun/gun.js");
|
|
69192
|
-
|
|
69193
|
-
/*
|
|
69194
|
-
An Ad-Hoc Mesh-Network Daisy-Chain
|
|
69195
|
-
should work even if humans are
|
|
69196
|
-
communicating with each other blind.
|
|
69197
|
-
|
|
69198
|
-
To prevent infinite broadcast loops,
|
|
69199
|
-
we use a deduplication process
|
|
69200
|
-
based on the message's identifier.
|
|
69201
|
-
This is currently implemented in core.
|
|
69202
|
-
|
|
69203
|
-
However, because this still creates a
|
|
69204
|
-
N*2 (where N is the number of connections)
|
|
69205
|
-
flood, it is not scalable for traditional
|
|
69206
|
-
services that have a hub network topology.
|
|
69207
|
-
|
|
69208
|
-
Does this mean we have to abandon mesh
|
|
69209
|
-
algorithms? No, we can simply layer more
|
|
69210
|
-
efficient optimizations in based on constraints.
|
|
69211
|
-
If these constraints exist, it automatically
|
|
69212
|
-
upgrades, but if not, it falls back to the
|
|
69213
|
-
brute-force mesh based robust algorithm.
|
|
69214
|
-
A simple example is to limit peer connections
|
|
69215
|
-
and rely upon daisy chaining to relay messages.
|
|
69216
|
-
|
|
69217
|
-
Another example, is if peers are willing to
|
|
69218
|
-
identify themselves, then we can improve the
|
|
69219
|
-
efficiency of the network by having each peer
|
|
69220
|
-
include the names of peers it is connected in
|
|
69221
|
-
each message. Then each subsequent peer will
|
|
69222
|
-
not relay it to them, since it is unnecessary.
|
|
69223
|
-
This should create N (where N is the number of
|
|
69224
|
-
peers) messages (or possibly N+ if there is a
|
|
69225
|
-
common peer of uncommon peers that receives it
|
|
69226
|
-
and relays at exact latency timings), which is
|
|
69227
|
-
optimal.
|
|
69228
|
-
|
|
69229
|
-
Since computer networks aren't actually blind,
|
|
69230
|
-
we will implement the above method to improve
|
|
69231
|
-
the performance of the ad-hoc mesh network.
|
|
69232
|
-
|
|
69233
|
-
But why not have every message contain the
|
|
69234
|
-
whole history of peers that it relayed through?
|
|
69235
|
-
Because in sufficiently large enough networks,
|
|
69236
|
-
with extensive daisy chaining, this will cause
|
|
69237
|
-
the message to become prohibitively slow and
|
|
69238
|
-
increase indefinitely in size.
|
|
69239
|
-
|
|
69240
|
-
*/
|
|
69241
|
-
|
|
69242
|
-
Gun.on('opt', function(root){
|
|
69243
|
-
var opt = root.opt;
|
|
69244
|
-
if(false === opt.ws || opt.once){
|
|
69245
|
-
this.to.next(root);
|
|
69246
|
-
return;
|
|
69247
|
-
}
|
|
69248
|
-
|
|
69249
|
-
var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
|
|
69250
|
-
opt.mesh = opt.mesh || Gun.Mesh(root);
|
|
69251
|
-
opt.WebSocket = opt.WebSocket || __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'ws'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
|
|
69252
|
-
var ws = opt.ws = opt.ws || {};
|
|
69253
|
-
ws.path = ws.path || '/gun';
|
|
69254
|
-
// if we DO need an HTTP server, then choose ws specific one or GUN default one.
|
|
69255
|
-
if(!ws.noServer){
|
|
69256
|
-
ws.server = ws.server || opt.web;
|
|
69257
|
-
if(!ws.server){ this.to.next(root); return } // ugh, bug fix for @jamierez & unstoppable ryan.
|
|
69258
|
-
}
|
|
69259
|
-
ws.web = ws.web || new opt.WebSocket.Server(ws); // we still need a WS server.
|
|
69260
|
-
ws.web.on('connection', function(wire, req){ var peer;
|
|
69261
|
-
wire.headers = wire.headers || (req||'').headers || '';
|
|
69262
|
-
console.STAT && ((console.STAT.sites || (console.STAT.sites = {}))[wire.headers.origin] = 1);
|
|
69263
|
-
opt.mesh.hi(peer = {wire: wire});
|
|
69264
|
-
wire.on('message', function(msg){
|
|
69265
|
-
opt.mesh.hear(msg.data || msg, peer);
|
|
69266
|
-
});
|
|
69267
|
-
wire.on('close', function(){
|
|
69268
|
-
opt.mesh.bye(peer);
|
|
69269
|
-
});
|
|
69270
|
-
wire.on('error', function(e){});
|
|
69271
|
-
setTimeout(function heart(){ if(!opt.peers[peer.id]){ return } try{ wire.send("[]") }catch(e){} ;setTimeout(heart, 1000 * 20) }, 1000 * 20); // Some systems, like Heroku, require heartbeats to not time out. // TODO: Make this configurable? // TODO: PERF: Find better approach than try/timeouts?
|
|
69272
|
-
});
|
|
69273
|
-
this.to.next(root);
|
|
69274
|
-
});
|
|
69275
|
-
|
|
69276
|
-
/***/ }),
|
|
69277
|
-
|
|
69278
69466
|
/***/ "./node_modules/gun/lib/yson.js":
|
|
69279
69467
|
/*!**************************************!*\
|
|
69280
69468
|
!*** ./node_modules/gun/lib/yson.js ***!
|
|
@@ -79873,560 +80061,6 @@ exports.stringToBytes = stringToBytes;
|
|
|
79873
80061
|
exports.bytes = exports.stringToBytes;
|
|
79874
80062
|
|
|
79875
80063
|
|
|
79876
|
-
/***/ }),
|
|
79877
|
-
|
|
79878
|
-
/***/ "./node_modules/object-inspect/index.js":
|
|
79879
|
-
/*!**********************************************!*\
|
|
79880
|
-
!*** ./node_modules/object-inspect/index.js ***!
|
|
79881
|
-
\**********************************************/
|
|
79882
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
79883
|
-
|
|
79884
|
-
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
79885
|
-
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
79886
|
-
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
79887
|
-
var mapForEach = hasMap && Map.prototype.forEach;
|
|
79888
|
-
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
79889
|
-
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
79890
|
-
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
79891
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
79892
|
-
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
79893
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
79894
|
-
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
79895
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
79896
|
-
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
79897
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
79898
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
79899
|
-
var objectToString = Object.prototype.toString;
|
|
79900
|
-
var functionToString = Function.prototype.toString;
|
|
79901
|
-
var $match = String.prototype.match;
|
|
79902
|
-
var $slice = String.prototype.slice;
|
|
79903
|
-
var $replace = String.prototype.replace;
|
|
79904
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
79905
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
79906
|
-
var $test = RegExp.prototype.test;
|
|
79907
|
-
var $concat = Array.prototype.concat;
|
|
79908
|
-
var $join = Array.prototype.join;
|
|
79909
|
-
var $arrSlice = Array.prototype.slice;
|
|
79910
|
-
var $floor = Math.floor;
|
|
79911
|
-
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
79912
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
79913
|
-
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
79914
|
-
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
79915
|
-
// ie, `has-tostringtag/shams
|
|
79916
|
-
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
79917
|
-
? Symbol.toStringTag
|
|
79918
|
-
: null;
|
|
79919
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
79920
|
-
|
|
79921
|
-
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
79922
|
-
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
79923
|
-
? function (O) {
|
|
79924
|
-
return O.__proto__; // eslint-disable-line no-proto
|
|
79925
|
-
}
|
|
79926
|
-
: null
|
|
79927
|
-
);
|
|
79928
|
-
|
|
79929
|
-
function addNumericSeparator(num, str) {
|
|
79930
|
-
if (
|
|
79931
|
-
num === Infinity
|
|
79932
|
-
|| num === -Infinity
|
|
79933
|
-
|| num !== num
|
|
79934
|
-
|| (num && num > -1000 && num < 1000)
|
|
79935
|
-
|| $test.call(/e/, str)
|
|
79936
|
-
) {
|
|
79937
|
-
return str;
|
|
79938
|
-
}
|
|
79939
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
79940
|
-
if (typeof num === 'number') {
|
|
79941
|
-
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
79942
|
-
if (int !== num) {
|
|
79943
|
-
var intStr = String(int);
|
|
79944
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
79945
|
-
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
79946
|
-
}
|
|
79947
|
-
}
|
|
79948
|
-
return $replace.call(str, sepRegex, '$&_');
|
|
79949
|
-
}
|
|
79950
|
-
|
|
79951
|
-
var utilInspect = __webpack_require__(/*! ./util.inspect */ "?4f7e");
|
|
79952
|
-
var inspectCustom = utilInspect.custom;
|
|
79953
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
79954
|
-
|
|
79955
|
-
var quotes = {
|
|
79956
|
-
__proto__: null,
|
|
79957
|
-
'double': '"',
|
|
79958
|
-
single: "'"
|
|
79959
|
-
};
|
|
79960
|
-
var quoteREs = {
|
|
79961
|
-
__proto__: null,
|
|
79962
|
-
'double': /(["\\])/g,
|
|
79963
|
-
single: /(['\\])/g
|
|
79964
|
-
};
|
|
79965
|
-
|
|
79966
|
-
module.exports = function inspect_(obj, options, depth, seen) {
|
|
79967
|
-
var opts = options || {};
|
|
79968
|
-
|
|
79969
|
-
if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {
|
|
79970
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
79971
|
-
}
|
|
79972
|
-
if (
|
|
79973
|
-
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
79974
|
-
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
79975
|
-
: opts.maxStringLength !== null
|
|
79976
|
-
)
|
|
79977
|
-
) {
|
|
79978
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
79979
|
-
}
|
|
79980
|
-
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
|
79981
|
-
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
79982
|
-
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
79983
|
-
}
|
|
79984
|
-
|
|
79985
|
-
if (
|
|
79986
|
-
has(opts, 'indent')
|
|
79987
|
-
&& opts.indent !== null
|
|
79988
|
-
&& opts.indent !== '\t'
|
|
79989
|
-
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
79990
|
-
) {
|
|
79991
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
79992
|
-
}
|
|
79993
|
-
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
79994
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
79995
|
-
}
|
|
79996
|
-
var numericSeparator = opts.numericSeparator;
|
|
79997
|
-
|
|
79998
|
-
if (typeof obj === 'undefined') {
|
|
79999
|
-
return 'undefined';
|
|
80000
|
-
}
|
|
80001
|
-
if (obj === null) {
|
|
80002
|
-
return 'null';
|
|
80003
|
-
}
|
|
80004
|
-
if (typeof obj === 'boolean') {
|
|
80005
|
-
return obj ? 'true' : 'false';
|
|
80006
|
-
}
|
|
80007
|
-
|
|
80008
|
-
if (typeof obj === 'string') {
|
|
80009
|
-
return inspectString(obj, opts);
|
|
80010
|
-
}
|
|
80011
|
-
if (typeof obj === 'number') {
|
|
80012
|
-
if (obj === 0) {
|
|
80013
|
-
return Infinity / obj > 0 ? '0' : '-0';
|
|
80014
|
-
}
|
|
80015
|
-
var str = String(obj);
|
|
80016
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
80017
|
-
}
|
|
80018
|
-
if (typeof obj === 'bigint') {
|
|
80019
|
-
var bigIntStr = String(obj) + 'n';
|
|
80020
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
80021
|
-
}
|
|
80022
|
-
|
|
80023
|
-
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
80024
|
-
if (typeof depth === 'undefined') { depth = 0; }
|
|
80025
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
80026
|
-
return isArray(obj) ? '[Array]' : '[Object]';
|
|
80027
|
-
}
|
|
80028
|
-
|
|
80029
|
-
var indent = getIndent(opts, depth);
|
|
80030
|
-
|
|
80031
|
-
if (typeof seen === 'undefined') {
|
|
80032
|
-
seen = [];
|
|
80033
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
80034
|
-
return '[Circular]';
|
|
80035
|
-
}
|
|
80036
|
-
|
|
80037
|
-
function inspect(value, from, noIndent) {
|
|
80038
|
-
if (from) {
|
|
80039
|
-
seen = $arrSlice.call(seen);
|
|
80040
|
-
seen.push(from);
|
|
80041
|
-
}
|
|
80042
|
-
if (noIndent) {
|
|
80043
|
-
var newOpts = {
|
|
80044
|
-
depth: opts.depth
|
|
80045
|
-
};
|
|
80046
|
-
if (has(opts, 'quoteStyle')) {
|
|
80047
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
80048
|
-
}
|
|
80049
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
80050
|
-
}
|
|
80051
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
80052
|
-
}
|
|
80053
|
-
|
|
80054
|
-
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
|
80055
|
-
var name = nameOf(obj);
|
|
80056
|
-
var keys = arrObjKeys(obj, inspect);
|
|
80057
|
-
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
80058
|
-
}
|
|
80059
|
-
if (isSymbol(obj)) {
|
|
80060
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
80061
|
-
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
80062
|
-
}
|
|
80063
|
-
if (isElement(obj)) {
|
|
80064
|
-
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
80065
|
-
var attrs = obj.attributes || [];
|
|
80066
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
80067
|
-
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
80068
|
-
}
|
|
80069
|
-
s += '>';
|
|
80070
|
-
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
80071
|
-
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
80072
|
-
return s;
|
|
80073
|
-
}
|
|
80074
|
-
if (isArray(obj)) {
|
|
80075
|
-
if (obj.length === 0) { return '[]'; }
|
|
80076
|
-
var xs = arrObjKeys(obj, inspect);
|
|
80077
|
-
if (indent && !singleLineValues(xs)) {
|
|
80078
|
-
return '[' + indentedJoin(xs, indent) + ']';
|
|
80079
|
-
}
|
|
80080
|
-
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
80081
|
-
}
|
|
80082
|
-
if (isError(obj)) {
|
|
80083
|
-
var parts = arrObjKeys(obj, inspect);
|
|
80084
|
-
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
80085
|
-
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
80086
|
-
}
|
|
80087
|
-
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
80088
|
-
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
80089
|
-
}
|
|
80090
|
-
if (typeof obj === 'object' && customInspect) {
|
|
80091
|
-
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
80092
|
-
return utilInspect(obj, { depth: maxDepth - depth });
|
|
80093
|
-
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
80094
|
-
return obj.inspect();
|
|
80095
|
-
}
|
|
80096
|
-
}
|
|
80097
|
-
if (isMap(obj)) {
|
|
80098
|
-
var mapParts = [];
|
|
80099
|
-
if (mapForEach) {
|
|
80100
|
-
mapForEach.call(obj, function (value, key) {
|
|
80101
|
-
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
80102
|
-
});
|
|
80103
|
-
}
|
|
80104
|
-
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
80105
|
-
}
|
|
80106
|
-
if (isSet(obj)) {
|
|
80107
|
-
var setParts = [];
|
|
80108
|
-
if (setForEach) {
|
|
80109
|
-
setForEach.call(obj, function (value) {
|
|
80110
|
-
setParts.push(inspect(value, obj));
|
|
80111
|
-
});
|
|
80112
|
-
}
|
|
80113
|
-
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
80114
|
-
}
|
|
80115
|
-
if (isWeakMap(obj)) {
|
|
80116
|
-
return weakCollectionOf('WeakMap');
|
|
80117
|
-
}
|
|
80118
|
-
if (isWeakSet(obj)) {
|
|
80119
|
-
return weakCollectionOf('WeakSet');
|
|
80120
|
-
}
|
|
80121
|
-
if (isWeakRef(obj)) {
|
|
80122
|
-
return weakCollectionOf('WeakRef');
|
|
80123
|
-
}
|
|
80124
|
-
if (isNumber(obj)) {
|
|
80125
|
-
return markBoxed(inspect(Number(obj)));
|
|
80126
|
-
}
|
|
80127
|
-
if (isBigInt(obj)) {
|
|
80128
|
-
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
80129
|
-
}
|
|
80130
|
-
if (isBoolean(obj)) {
|
|
80131
|
-
return markBoxed(booleanValueOf.call(obj));
|
|
80132
|
-
}
|
|
80133
|
-
if (isString(obj)) {
|
|
80134
|
-
return markBoxed(inspect(String(obj)));
|
|
80135
|
-
}
|
|
80136
|
-
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
80137
|
-
/* eslint-env browser */
|
|
80138
|
-
if ( true && obj === window) {
|
|
80139
|
-
return '{ [object Window] }';
|
|
80140
|
-
}
|
|
80141
|
-
if (
|
|
80142
|
-
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
80143
|
-
|| (typeof __webpack_require__.g !== 'undefined' && obj === __webpack_require__.g)
|
|
80144
|
-
) {
|
|
80145
|
-
return '{ [object globalThis] }';
|
|
80146
|
-
}
|
|
80147
|
-
if (!isDate(obj) && !isRegExp(obj)) {
|
|
80148
|
-
var ys = arrObjKeys(obj, inspect);
|
|
80149
|
-
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
80150
|
-
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
80151
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
80152
|
-
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
80153
|
-
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
80154
|
-
if (ys.length === 0) { return tag + '{}'; }
|
|
80155
|
-
if (indent) {
|
|
80156
|
-
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
80157
|
-
}
|
|
80158
|
-
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
80159
|
-
}
|
|
80160
|
-
return String(obj);
|
|
80161
|
-
};
|
|
80162
|
-
|
|
80163
|
-
function wrapQuotes(s, defaultStyle, opts) {
|
|
80164
|
-
var style = opts.quoteStyle || defaultStyle;
|
|
80165
|
-
var quoteChar = quotes[style];
|
|
80166
|
-
return quoteChar + s + quoteChar;
|
|
80167
|
-
}
|
|
80168
|
-
|
|
80169
|
-
function quote(s) {
|
|
80170
|
-
return $replace.call(String(s), /"/g, '"');
|
|
80171
|
-
}
|
|
80172
|
-
|
|
80173
|
-
function canTrustToString(obj) {
|
|
80174
|
-
return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
|
80175
|
-
}
|
|
80176
|
-
function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }
|
|
80177
|
-
function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }
|
|
80178
|
-
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }
|
|
80179
|
-
function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }
|
|
80180
|
-
function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }
|
|
80181
|
-
function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }
|
|
80182
|
-
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }
|
|
80183
|
-
|
|
80184
|
-
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
80185
|
-
function isSymbol(obj) {
|
|
80186
|
-
if (hasShammedSymbols) {
|
|
80187
|
-
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
80188
|
-
}
|
|
80189
|
-
if (typeof obj === 'symbol') {
|
|
80190
|
-
return true;
|
|
80191
|
-
}
|
|
80192
|
-
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
80193
|
-
return false;
|
|
80194
|
-
}
|
|
80195
|
-
try {
|
|
80196
|
-
symToString.call(obj);
|
|
80197
|
-
return true;
|
|
80198
|
-
} catch (e) {}
|
|
80199
|
-
return false;
|
|
80200
|
-
}
|
|
80201
|
-
|
|
80202
|
-
function isBigInt(obj) {
|
|
80203
|
-
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
80204
|
-
return false;
|
|
80205
|
-
}
|
|
80206
|
-
try {
|
|
80207
|
-
bigIntValueOf.call(obj);
|
|
80208
|
-
return true;
|
|
80209
|
-
} catch (e) {}
|
|
80210
|
-
return false;
|
|
80211
|
-
}
|
|
80212
|
-
|
|
80213
|
-
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
80214
|
-
function has(obj, key) {
|
|
80215
|
-
return hasOwn.call(obj, key);
|
|
80216
|
-
}
|
|
80217
|
-
|
|
80218
|
-
function toStr(obj) {
|
|
80219
|
-
return objectToString.call(obj);
|
|
80220
|
-
}
|
|
80221
|
-
|
|
80222
|
-
function nameOf(f) {
|
|
80223
|
-
if (f.name) { return f.name; }
|
|
80224
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
80225
|
-
if (m) { return m[1]; }
|
|
80226
|
-
return null;
|
|
80227
|
-
}
|
|
80228
|
-
|
|
80229
|
-
function indexOf(xs, x) {
|
|
80230
|
-
if (xs.indexOf) { return xs.indexOf(x); }
|
|
80231
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
|
80232
|
-
if (xs[i] === x) { return i; }
|
|
80233
|
-
}
|
|
80234
|
-
return -1;
|
|
80235
|
-
}
|
|
80236
|
-
|
|
80237
|
-
function isMap(x) {
|
|
80238
|
-
if (!mapSize || !x || typeof x !== 'object') {
|
|
80239
|
-
return false;
|
|
80240
|
-
}
|
|
80241
|
-
try {
|
|
80242
|
-
mapSize.call(x);
|
|
80243
|
-
try {
|
|
80244
|
-
setSize.call(x);
|
|
80245
|
-
} catch (s) {
|
|
80246
|
-
return true;
|
|
80247
|
-
}
|
|
80248
|
-
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
80249
|
-
} catch (e) {}
|
|
80250
|
-
return false;
|
|
80251
|
-
}
|
|
80252
|
-
|
|
80253
|
-
function isWeakMap(x) {
|
|
80254
|
-
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
80255
|
-
return false;
|
|
80256
|
-
}
|
|
80257
|
-
try {
|
|
80258
|
-
weakMapHas.call(x, weakMapHas);
|
|
80259
|
-
try {
|
|
80260
|
-
weakSetHas.call(x, weakSetHas);
|
|
80261
|
-
} catch (s) {
|
|
80262
|
-
return true;
|
|
80263
|
-
}
|
|
80264
|
-
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
80265
|
-
} catch (e) {}
|
|
80266
|
-
return false;
|
|
80267
|
-
}
|
|
80268
|
-
|
|
80269
|
-
function isWeakRef(x) {
|
|
80270
|
-
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
80271
|
-
return false;
|
|
80272
|
-
}
|
|
80273
|
-
try {
|
|
80274
|
-
weakRefDeref.call(x);
|
|
80275
|
-
return true;
|
|
80276
|
-
} catch (e) {}
|
|
80277
|
-
return false;
|
|
80278
|
-
}
|
|
80279
|
-
|
|
80280
|
-
function isSet(x) {
|
|
80281
|
-
if (!setSize || !x || typeof x !== 'object') {
|
|
80282
|
-
return false;
|
|
80283
|
-
}
|
|
80284
|
-
try {
|
|
80285
|
-
setSize.call(x);
|
|
80286
|
-
try {
|
|
80287
|
-
mapSize.call(x);
|
|
80288
|
-
} catch (m) {
|
|
80289
|
-
return true;
|
|
80290
|
-
}
|
|
80291
|
-
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
80292
|
-
} catch (e) {}
|
|
80293
|
-
return false;
|
|
80294
|
-
}
|
|
80295
|
-
|
|
80296
|
-
function isWeakSet(x) {
|
|
80297
|
-
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
80298
|
-
return false;
|
|
80299
|
-
}
|
|
80300
|
-
try {
|
|
80301
|
-
weakSetHas.call(x, weakSetHas);
|
|
80302
|
-
try {
|
|
80303
|
-
weakMapHas.call(x, weakMapHas);
|
|
80304
|
-
} catch (s) {
|
|
80305
|
-
return true;
|
|
80306
|
-
}
|
|
80307
|
-
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
80308
|
-
} catch (e) {}
|
|
80309
|
-
return false;
|
|
80310
|
-
}
|
|
80311
|
-
|
|
80312
|
-
function isElement(x) {
|
|
80313
|
-
if (!x || typeof x !== 'object') { return false; }
|
|
80314
|
-
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
80315
|
-
return true;
|
|
80316
|
-
}
|
|
80317
|
-
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
80318
|
-
}
|
|
80319
|
-
|
|
80320
|
-
function inspectString(str, opts) {
|
|
80321
|
-
if (str.length > opts.maxStringLength) {
|
|
80322
|
-
var remaining = str.length - opts.maxStringLength;
|
|
80323
|
-
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
80324
|
-
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
80325
|
-
}
|
|
80326
|
-
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
80327
|
-
quoteRE.lastIndex = 0;
|
|
80328
|
-
// eslint-disable-next-line no-control-regex
|
|
80329
|
-
var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
80330
|
-
return wrapQuotes(s, 'single', opts);
|
|
80331
|
-
}
|
|
80332
|
-
|
|
80333
|
-
function lowbyte(c) {
|
|
80334
|
-
var n = c.charCodeAt(0);
|
|
80335
|
-
var x = {
|
|
80336
|
-
8: 'b',
|
|
80337
|
-
9: 't',
|
|
80338
|
-
10: 'n',
|
|
80339
|
-
12: 'f',
|
|
80340
|
-
13: 'r'
|
|
80341
|
-
}[n];
|
|
80342
|
-
if (x) { return '\\' + x; }
|
|
80343
|
-
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
80344
|
-
}
|
|
80345
|
-
|
|
80346
|
-
function markBoxed(str) {
|
|
80347
|
-
return 'Object(' + str + ')';
|
|
80348
|
-
}
|
|
80349
|
-
|
|
80350
|
-
function weakCollectionOf(type) {
|
|
80351
|
-
return type + ' { ? }';
|
|
80352
|
-
}
|
|
80353
|
-
|
|
80354
|
-
function collectionOf(type, size, entries, indent) {
|
|
80355
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
80356
|
-
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
80357
|
-
}
|
|
80358
|
-
|
|
80359
|
-
function singleLineValues(xs) {
|
|
80360
|
-
for (var i = 0; i < xs.length; i++) {
|
|
80361
|
-
if (indexOf(xs[i], '\n') >= 0) {
|
|
80362
|
-
return false;
|
|
80363
|
-
}
|
|
80364
|
-
}
|
|
80365
|
-
return true;
|
|
80366
|
-
}
|
|
80367
|
-
|
|
80368
|
-
function getIndent(opts, depth) {
|
|
80369
|
-
var baseIndent;
|
|
80370
|
-
if (opts.indent === '\t') {
|
|
80371
|
-
baseIndent = '\t';
|
|
80372
|
-
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
80373
|
-
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
80374
|
-
} else {
|
|
80375
|
-
return null;
|
|
80376
|
-
}
|
|
80377
|
-
return {
|
|
80378
|
-
base: baseIndent,
|
|
80379
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
80380
|
-
};
|
|
80381
|
-
}
|
|
80382
|
-
|
|
80383
|
-
function indentedJoin(xs, indent) {
|
|
80384
|
-
if (xs.length === 0) { return ''; }
|
|
80385
|
-
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
80386
|
-
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
80387
|
-
}
|
|
80388
|
-
|
|
80389
|
-
function arrObjKeys(obj, inspect) {
|
|
80390
|
-
var isArr = isArray(obj);
|
|
80391
|
-
var xs = [];
|
|
80392
|
-
if (isArr) {
|
|
80393
|
-
xs.length = obj.length;
|
|
80394
|
-
for (var i = 0; i < obj.length; i++) {
|
|
80395
|
-
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
|
80396
|
-
}
|
|
80397
|
-
}
|
|
80398
|
-
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
80399
|
-
var symMap;
|
|
80400
|
-
if (hasShammedSymbols) {
|
|
80401
|
-
symMap = {};
|
|
80402
|
-
for (var k = 0; k < syms.length; k++) {
|
|
80403
|
-
symMap['$' + syms[k]] = syms[k];
|
|
80404
|
-
}
|
|
80405
|
-
}
|
|
80406
|
-
|
|
80407
|
-
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
80408
|
-
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
80409
|
-
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
80410
|
-
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
80411
|
-
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
80412
|
-
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
80413
|
-
} else if ($test.call(/[^\w$]/, key)) {
|
|
80414
|
-
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
80415
|
-
} else {
|
|
80416
|
-
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
80417
|
-
}
|
|
80418
|
-
}
|
|
80419
|
-
if (typeof gOPS === 'function') {
|
|
80420
|
-
for (var j = 0; j < syms.length; j++) {
|
|
80421
|
-
if (isEnumerable.call(obj, syms[j])) {
|
|
80422
|
-
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
80423
|
-
}
|
|
80424
|
-
}
|
|
80425
|
-
}
|
|
80426
|
-
return xs;
|
|
80427
|
-
}
|
|
80428
|
-
|
|
80429
|
-
|
|
80430
80064
|
/***/ }),
|
|
80431
80065
|
|
|
80432
80066
|
/***/ "./node_modules/parse-asn1/aesid.json":
|
|
@@ -82400,1047 +82034,6 @@ module.exports = function xor (a, b) {
|
|
|
82400
82034
|
}
|
|
82401
82035
|
|
|
82402
82036
|
|
|
82403
|
-
/***/ }),
|
|
82404
|
-
|
|
82405
|
-
/***/ "./node_modules/qs/lib/formats.js":
|
|
82406
|
-
/*!****************************************!*\
|
|
82407
|
-
!*** ./node_modules/qs/lib/formats.js ***!
|
|
82408
|
-
\****************************************/
|
|
82409
|
-
/***/ ((module) => {
|
|
82410
|
-
|
|
82411
|
-
"use strict";
|
|
82412
|
-
|
|
82413
|
-
|
|
82414
|
-
var replace = String.prototype.replace;
|
|
82415
|
-
var percentTwenties = /%20/g;
|
|
82416
|
-
|
|
82417
|
-
var Format = {
|
|
82418
|
-
RFC1738: 'RFC1738',
|
|
82419
|
-
RFC3986: 'RFC3986'
|
|
82420
|
-
};
|
|
82421
|
-
|
|
82422
|
-
module.exports = {
|
|
82423
|
-
'default': Format.RFC3986,
|
|
82424
|
-
formatters: {
|
|
82425
|
-
RFC1738: function (value) {
|
|
82426
|
-
return replace.call(value, percentTwenties, '+');
|
|
82427
|
-
},
|
|
82428
|
-
RFC3986: function (value) {
|
|
82429
|
-
return String(value);
|
|
82430
|
-
}
|
|
82431
|
-
},
|
|
82432
|
-
RFC1738: Format.RFC1738,
|
|
82433
|
-
RFC3986: Format.RFC3986
|
|
82434
|
-
};
|
|
82435
|
-
|
|
82436
|
-
|
|
82437
|
-
/***/ }),
|
|
82438
|
-
|
|
82439
|
-
/***/ "./node_modules/qs/lib/index.js":
|
|
82440
|
-
/*!**************************************!*\
|
|
82441
|
-
!*** ./node_modules/qs/lib/index.js ***!
|
|
82442
|
-
\**************************************/
|
|
82443
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
82444
|
-
|
|
82445
|
-
"use strict";
|
|
82446
|
-
|
|
82447
|
-
|
|
82448
|
-
var stringify = __webpack_require__(/*! ./stringify */ "./node_modules/qs/lib/stringify.js");
|
|
82449
|
-
var parse = __webpack_require__(/*! ./parse */ "./node_modules/qs/lib/parse.js");
|
|
82450
|
-
var formats = __webpack_require__(/*! ./formats */ "./node_modules/qs/lib/formats.js");
|
|
82451
|
-
|
|
82452
|
-
module.exports = {
|
|
82453
|
-
formats: formats,
|
|
82454
|
-
parse: parse,
|
|
82455
|
-
stringify: stringify
|
|
82456
|
-
};
|
|
82457
|
-
|
|
82458
|
-
|
|
82459
|
-
/***/ }),
|
|
82460
|
-
|
|
82461
|
-
/***/ "./node_modules/qs/lib/parse.js":
|
|
82462
|
-
/*!**************************************!*\
|
|
82463
|
-
!*** ./node_modules/qs/lib/parse.js ***!
|
|
82464
|
-
\**************************************/
|
|
82465
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
82466
|
-
|
|
82467
|
-
"use strict";
|
|
82468
|
-
|
|
82469
|
-
|
|
82470
|
-
var utils = __webpack_require__(/*! ./utils */ "./node_modules/qs/lib/utils.js");
|
|
82471
|
-
|
|
82472
|
-
var has = Object.prototype.hasOwnProperty;
|
|
82473
|
-
var isArray = Array.isArray;
|
|
82474
|
-
|
|
82475
|
-
var defaults = {
|
|
82476
|
-
allowDots: false,
|
|
82477
|
-
allowEmptyArrays: false,
|
|
82478
|
-
allowPrototypes: false,
|
|
82479
|
-
allowSparse: false,
|
|
82480
|
-
arrayLimit: 20,
|
|
82481
|
-
charset: 'utf-8',
|
|
82482
|
-
charsetSentinel: false,
|
|
82483
|
-
comma: false,
|
|
82484
|
-
decodeDotInKeys: false,
|
|
82485
|
-
decoder: utils.decode,
|
|
82486
|
-
delimiter: '&',
|
|
82487
|
-
depth: 5,
|
|
82488
|
-
duplicates: 'combine',
|
|
82489
|
-
ignoreQueryPrefix: false,
|
|
82490
|
-
interpretNumericEntities: false,
|
|
82491
|
-
parameterLimit: 1000,
|
|
82492
|
-
parseArrays: true,
|
|
82493
|
-
plainObjects: false,
|
|
82494
|
-
strictDepth: false,
|
|
82495
|
-
strictNullHandling: false,
|
|
82496
|
-
throwOnLimitExceeded: false
|
|
82497
|
-
};
|
|
82498
|
-
|
|
82499
|
-
var interpretNumericEntities = function (str) {
|
|
82500
|
-
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
82501
|
-
return String.fromCharCode(parseInt(numberStr, 10));
|
|
82502
|
-
});
|
|
82503
|
-
};
|
|
82504
|
-
|
|
82505
|
-
var parseArrayValue = function (val, options, currentArrayLength) {
|
|
82506
|
-
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
82507
|
-
return val.split(',');
|
|
82508
|
-
}
|
|
82509
|
-
|
|
82510
|
-
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
82511
|
-
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
82512
|
-
}
|
|
82513
|
-
|
|
82514
|
-
return val;
|
|
82515
|
-
};
|
|
82516
|
-
|
|
82517
|
-
// This is what browsers will submit when the ✓ character occurs in an
|
|
82518
|
-
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
82519
|
-
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
82520
|
-
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
82521
|
-
// the ✓ character, such as us-ascii.
|
|
82522
|
-
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
82523
|
-
|
|
82524
|
-
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
82525
|
-
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
82526
|
-
|
|
82527
|
-
var parseValues = function parseQueryStringValues(str, options) {
|
|
82528
|
-
var obj = { __proto__: null };
|
|
82529
|
-
|
|
82530
|
-
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
82531
|
-
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
82532
|
-
|
|
82533
|
-
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
82534
|
-
var parts = cleanStr.split(
|
|
82535
|
-
options.delimiter,
|
|
82536
|
-
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
82537
|
-
);
|
|
82538
|
-
|
|
82539
|
-
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
82540
|
-
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
82541
|
-
}
|
|
82542
|
-
|
|
82543
|
-
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
82544
|
-
var i;
|
|
82545
|
-
|
|
82546
|
-
var charset = options.charset;
|
|
82547
|
-
if (options.charsetSentinel) {
|
|
82548
|
-
for (i = 0; i < parts.length; ++i) {
|
|
82549
|
-
if (parts[i].indexOf('utf8=') === 0) {
|
|
82550
|
-
if (parts[i] === charsetSentinel) {
|
|
82551
|
-
charset = 'utf-8';
|
|
82552
|
-
} else if (parts[i] === isoSentinel) {
|
|
82553
|
-
charset = 'iso-8859-1';
|
|
82554
|
-
}
|
|
82555
|
-
skipIndex = i;
|
|
82556
|
-
i = parts.length; // The eslint settings do not allow break;
|
|
82557
|
-
}
|
|
82558
|
-
}
|
|
82559
|
-
}
|
|
82560
|
-
|
|
82561
|
-
for (i = 0; i < parts.length; ++i) {
|
|
82562
|
-
if (i === skipIndex) {
|
|
82563
|
-
continue;
|
|
82564
|
-
}
|
|
82565
|
-
var part = parts[i];
|
|
82566
|
-
|
|
82567
|
-
var bracketEqualsPos = part.indexOf(']=');
|
|
82568
|
-
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
82569
|
-
|
|
82570
|
-
var key;
|
|
82571
|
-
var val;
|
|
82572
|
-
if (pos === -1) {
|
|
82573
|
-
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
82574
|
-
val = options.strictNullHandling ? null : '';
|
|
82575
|
-
} else {
|
|
82576
|
-
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
82577
|
-
|
|
82578
|
-
val = utils.maybeMap(
|
|
82579
|
-
parseArrayValue(
|
|
82580
|
-
part.slice(pos + 1),
|
|
82581
|
-
options,
|
|
82582
|
-
isArray(obj[key]) ? obj[key].length : 0
|
|
82583
|
-
),
|
|
82584
|
-
function (encodedVal) {
|
|
82585
|
-
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
82586
|
-
}
|
|
82587
|
-
);
|
|
82588
|
-
}
|
|
82589
|
-
|
|
82590
|
-
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
82591
|
-
val = interpretNumericEntities(String(val));
|
|
82592
|
-
}
|
|
82593
|
-
|
|
82594
|
-
if (part.indexOf('[]=') > -1) {
|
|
82595
|
-
val = isArray(val) ? [val] : val;
|
|
82596
|
-
}
|
|
82597
|
-
|
|
82598
|
-
var existing = has.call(obj, key);
|
|
82599
|
-
if (existing && options.duplicates === 'combine') {
|
|
82600
|
-
obj[key] = utils.combine(obj[key], val);
|
|
82601
|
-
} else if (!existing || options.duplicates === 'last') {
|
|
82602
|
-
obj[key] = val;
|
|
82603
|
-
}
|
|
82604
|
-
}
|
|
82605
|
-
|
|
82606
|
-
return obj;
|
|
82607
|
-
};
|
|
82608
|
-
|
|
82609
|
-
var parseObject = function (chain, val, options, valuesParsed) {
|
|
82610
|
-
var currentArrayLength = 0;
|
|
82611
|
-
if (chain.length > 0 && chain[chain.length - 1] === '[]') {
|
|
82612
|
-
var parentKey = chain.slice(0, -1).join('');
|
|
82613
|
-
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
82614
|
-
}
|
|
82615
|
-
|
|
82616
|
-
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
82617
|
-
|
|
82618
|
-
for (var i = chain.length - 1; i >= 0; --i) {
|
|
82619
|
-
var obj;
|
|
82620
|
-
var root = chain[i];
|
|
82621
|
-
|
|
82622
|
-
if (root === '[]' && options.parseArrays) {
|
|
82623
|
-
obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
|
|
82624
|
-
? []
|
|
82625
|
-
: utils.combine([], leaf);
|
|
82626
|
-
} else {
|
|
82627
|
-
obj = options.plainObjects ? { __proto__: null } : {};
|
|
82628
|
-
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
82629
|
-
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
82630
|
-
var index = parseInt(decodedRoot, 10);
|
|
82631
|
-
if (!options.parseArrays && decodedRoot === '') {
|
|
82632
|
-
obj = { 0: leaf };
|
|
82633
|
-
} else if (
|
|
82634
|
-
!isNaN(index)
|
|
82635
|
-
&& root !== decodedRoot
|
|
82636
|
-
&& String(index) === decodedRoot
|
|
82637
|
-
&& index >= 0
|
|
82638
|
-
&& (options.parseArrays && index <= options.arrayLimit)
|
|
82639
|
-
) {
|
|
82640
|
-
obj = [];
|
|
82641
|
-
obj[index] = leaf;
|
|
82642
|
-
} else if (decodedRoot !== '__proto__') {
|
|
82643
|
-
obj[decodedRoot] = leaf;
|
|
82644
|
-
}
|
|
82645
|
-
}
|
|
82646
|
-
|
|
82647
|
-
leaf = obj;
|
|
82648
|
-
}
|
|
82649
|
-
|
|
82650
|
-
return leaf;
|
|
82651
|
-
};
|
|
82652
|
-
|
|
82653
|
-
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
82654
|
-
if (!givenKey) {
|
|
82655
|
-
return;
|
|
82656
|
-
}
|
|
82657
|
-
|
|
82658
|
-
// Transform dot notation to bracket notation
|
|
82659
|
-
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
82660
|
-
|
|
82661
|
-
// The regex chunks
|
|
82662
|
-
|
|
82663
|
-
var brackets = /(\[[^[\]]*])/;
|
|
82664
|
-
var child = /(\[[^[\]]*])/g;
|
|
82665
|
-
|
|
82666
|
-
// Get the parent
|
|
82667
|
-
|
|
82668
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
82669
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
82670
|
-
|
|
82671
|
-
// Stash the parent if it exists
|
|
82672
|
-
|
|
82673
|
-
var keys = [];
|
|
82674
|
-
if (parent) {
|
|
82675
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
82676
|
-
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
82677
|
-
if (!options.allowPrototypes) {
|
|
82678
|
-
return;
|
|
82679
|
-
}
|
|
82680
|
-
}
|
|
82681
|
-
|
|
82682
|
-
keys.push(parent);
|
|
82683
|
-
}
|
|
82684
|
-
|
|
82685
|
-
// Loop through children appending to the array until we hit depth
|
|
82686
|
-
|
|
82687
|
-
var i = 0;
|
|
82688
|
-
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
82689
|
-
i += 1;
|
|
82690
|
-
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
82691
|
-
if (!options.allowPrototypes) {
|
|
82692
|
-
return;
|
|
82693
|
-
}
|
|
82694
|
-
}
|
|
82695
|
-
keys.push(segment[1]);
|
|
82696
|
-
}
|
|
82697
|
-
|
|
82698
|
-
// If there's a remainder, check strictDepth option for throw, else just add whatever is left
|
|
82699
|
-
|
|
82700
|
-
if (segment) {
|
|
82701
|
-
if (options.strictDepth === true) {
|
|
82702
|
-
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
82703
|
-
}
|
|
82704
|
-
keys.push('[' + key.slice(segment.index) + ']');
|
|
82705
|
-
}
|
|
82706
|
-
|
|
82707
|
-
return parseObject(keys, val, options, valuesParsed);
|
|
82708
|
-
};
|
|
82709
|
-
|
|
82710
|
-
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
82711
|
-
if (!opts) {
|
|
82712
|
-
return defaults;
|
|
82713
|
-
}
|
|
82714
|
-
|
|
82715
|
-
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
|
|
82716
|
-
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
|
|
82717
|
-
}
|
|
82718
|
-
|
|
82719
|
-
if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
|
|
82720
|
-
throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
|
|
82721
|
-
}
|
|
82722
|
-
|
|
82723
|
-
if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
|
|
82724
|
-
throw new TypeError('Decoder has to be a function.');
|
|
82725
|
-
}
|
|
82726
|
-
|
|
82727
|
-
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
82728
|
-
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
82729
|
-
}
|
|
82730
|
-
|
|
82731
|
-
if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {
|
|
82732
|
-
throw new TypeError('`throwOnLimitExceeded` option must be a boolean');
|
|
82733
|
-
}
|
|
82734
|
-
|
|
82735
|
-
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
82736
|
-
|
|
82737
|
-
var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
|
|
82738
|
-
|
|
82739
|
-
if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
|
|
82740
|
-
throw new TypeError('The duplicates option must be either combine, first, or last');
|
|
82741
|
-
}
|
|
82742
|
-
|
|
82743
|
-
var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
82744
|
-
|
|
82745
|
-
return {
|
|
82746
|
-
allowDots: allowDots,
|
|
82747
|
-
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
82748
|
-
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
82749
|
-
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
82750
|
-
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
82751
|
-
charset: charset,
|
|
82752
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
82753
|
-
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
82754
|
-
decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
|
|
82755
|
-
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
82756
|
-
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
82757
|
-
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
82758
|
-
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
82759
|
-
duplicates: duplicates,
|
|
82760
|
-
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
82761
|
-
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
82762
|
-
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
82763
|
-
parseArrays: opts.parseArrays !== false,
|
|
82764
|
-
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
82765
|
-
strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
|
|
82766
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
82767
|
-
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
|
|
82768
|
-
};
|
|
82769
|
-
};
|
|
82770
|
-
|
|
82771
|
-
module.exports = function (str, opts) {
|
|
82772
|
-
var options = normalizeParseOptions(opts);
|
|
82773
|
-
|
|
82774
|
-
if (str === '' || str === null || typeof str === 'undefined') {
|
|
82775
|
-
return options.plainObjects ? { __proto__: null } : {};
|
|
82776
|
-
}
|
|
82777
|
-
|
|
82778
|
-
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
82779
|
-
var obj = options.plainObjects ? { __proto__: null } : {};
|
|
82780
|
-
|
|
82781
|
-
// Iterate over the keys and setup the new object
|
|
82782
|
-
|
|
82783
|
-
var keys = Object.keys(tempObj);
|
|
82784
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
82785
|
-
var key = keys[i];
|
|
82786
|
-
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
82787
|
-
obj = utils.merge(obj, newObj, options);
|
|
82788
|
-
}
|
|
82789
|
-
|
|
82790
|
-
if (options.allowSparse === true) {
|
|
82791
|
-
return obj;
|
|
82792
|
-
}
|
|
82793
|
-
|
|
82794
|
-
return utils.compact(obj);
|
|
82795
|
-
};
|
|
82796
|
-
|
|
82797
|
-
|
|
82798
|
-
/***/ }),
|
|
82799
|
-
|
|
82800
|
-
/***/ "./node_modules/qs/lib/stringify.js":
|
|
82801
|
-
/*!******************************************!*\
|
|
82802
|
-
!*** ./node_modules/qs/lib/stringify.js ***!
|
|
82803
|
-
\******************************************/
|
|
82804
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
82805
|
-
|
|
82806
|
-
"use strict";
|
|
82807
|
-
|
|
82808
|
-
|
|
82809
|
-
var getSideChannel = __webpack_require__(/*! side-channel */ "./node_modules/side-channel/index.js");
|
|
82810
|
-
var utils = __webpack_require__(/*! ./utils */ "./node_modules/qs/lib/utils.js");
|
|
82811
|
-
var formats = __webpack_require__(/*! ./formats */ "./node_modules/qs/lib/formats.js");
|
|
82812
|
-
var has = Object.prototype.hasOwnProperty;
|
|
82813
|
-
|
|
82814
|
-
var arrayPrefixGenerators = {
|
|
82815
|
-
brackets: function brackets(prefix) {
|
|
82816
|
-
return prefix + '[]';
|
|
82817
|
-
},
|
|
82818
|
-
comma: 'comma',
|
|
82819
|
-
indices: function indices(prefix, key) {
|
|
82820
|
-
return prefix + '[' + key + ']';
|
|
82821
|
-
},
|
|
82822
|
-
repeat: function repeat(prefix) {
|
|
82823
|
-
return prefix;
|
|
82824
|
-
}
|
|
82825
|
-
};
|
|
82826
|
-
|
|
82827
|
-
var isArray = Array.isArray;
|
|
82828
|
-
var push = Array.prototype.push;
|
|
82829
|
-
var pushToArray = function (arr, valueOrArray) {
|
|
82830
|
-
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
82831
|
-
};
|
|
82832
|
-
|
|
82833
|
-
var toISO = Date.prototype.toISOString;
|
|
82834
|
-
|
|
82835
|
-
var defaultFormat = formats['default'];
|
|
82836
|
-
var defaults = {
|
|
82837
|
-
addQueryPrefix: false,
|
|
82838
|
-
allowDots: false,
|
|
82839
|
-
allowEmptyArrays: false,
|
|
82840
|
-
arrayFormat: 'indices',
|
|
82841
|
-
charset: 'utf-8',
|
|
82842
|
-
charsetSentinel: false,
|
|
82843
|
-
commaRoundTrip: false,
|
|
82844
|
-
delimiter: '&',
|
|
82845
|
-
encode: true,
|
|
82846
|
-
encodeDotInKeys: false,
|
|
82847
|
-
encoder: utils.encode,
|
|
82848
|
-
encodeValuesOnly: false,
|
|
82849
|
-
filter: void undefined,
|
|
82850
|
-
format: defaultFormat,
|
|
82851
|
-
formatter: formats.formatters[defaultFormat],
|
|
82852
|
-
// deprecated
|
|
82853
|
-
indices: false,
|
|
82854
|
-
serializeDate: function serializeDate(date) {
|
|
82855
|
-
return toISO.call(date);
|
|
82856
|
-
},
|
|
82857
|
-
skipNulls: false,
|
|
82858
|
-
strictNullHandling: false
|
|
82859
|
-
};
|
|
82860
|
-
|
|
82861
|
-
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
82862
|
-
return typeof v === 'string'
|
|
82863
|
-
|| typeof v === 'number'
|
|
82864
|
-
|| typeof v === 'boolean'
|
|
82865
|
-
|| typeof v === 'symbol'
|
|
82866
|
-
|| typeof v === 'bigint';
|
|
82867
|
-
};
|
|
82868
|
-
|
|
82869
|
-
var sentinel = {};
|
|
82870
|
-
|
|
82871
|
-
var stringify = function stringify(
|
|
82872
|
-
object,
|
|
82873
|
-
prefix,
|
|
82874
|
-
generateArrayPrefix,
|
|
82875
|
-
commaRoundTrip,
|
|
82876
|
-
allowEmptyArrays,
|
|
82877
|
-
strictNullHandling,
|
|
82878
|
-
skipNulls,
|
|
82879
|
-
encodeDotInKeys,
|
|
82880
|
-
encoder,
|
|
82881
|
-
filter,
|
|
82882
|
-
sort,
|
|
82883
|
-
allowDots,
|
|
82884
|
-
serializeDate,
|
|
82885
|
-
format,
|
|
82886
|
-
formatter,
|
|
82887
|
-
encodeValuesOnly,
|
|
82888
|
-
charset,
|
|
82889
|
-
sideChannel
|
|
82890
|
-
) {
|
|
82891
|
-
var obj = object;
|
|
82892
|
-
|
|
82893
|
-
var tmpSc = sideChannel;
|
|
82894
|
-
var step = 0;
|
|
82895
|
-
var findFlag = false;
|
|
82896
|
-
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
82897
|
-
// Where object last appeared in the ref tree
|
|
82898
|
-
var pos = tmpSc.get(object);
|
|
82899
|
-
step += 1;
|
|
82900
|
-
if (typeof pos !== 'undefined') {
|
|
82901
|
-
if (pos === step) {
|
|
82902
|
-
throw new RangeError('Cyclic object value');
|
|
82903
|
-
} else {
|
|
82904
|
-
findFlag = true; // Break while
|
|
82905
|
-
}
|
|
82906
|
-
}
|
|
82907
|
-
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
82908
|
-
step = 0;
|
|
82909
|
-
}
|
|
82910
|
-
}
|
|
82911
|
-
|
|
82912
|
-
if (typeof filter === 'function') {
|
|
82913
|
-
obj = filter(prefix, obj);
|
|
82914
|
-
} else if (obj instanceof Date) {
|
|
82915
|
-
obj = serializeDate(obj);
|
|
82916
|
-
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
82917
|
-
obj = utils.maybeMap(obj, function (value) {
|
|
82918
|
-
if (value instanceof Date) {
|
|
82919
|
-
return serializeDate(value);
|
|
82920
|
-
}
|
|
82921
|
-
return value;
|
|
82922
|
-
});
|
|
82923
|
-
}
|
|
82924
|
-
|
|
82925
|
-
if (obj === null) {
|
|
82926
|
-
if (strictNullHandling) {
|
|
82927
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
|
82928
|
-
}
|
|
82929
|
-
|
|
82930
|
-
obj = '';
|
|
82931
|
-
}
|
|
82932
|
-
|
|
82933
|
-
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
82934
|
-
if (encoder) {
|
|
82935
|
-
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
|
82936
|
-
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
82937
|
-
}
|
|
82938
|
-
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
82939
|
-
}
|
|
82940
|
-
|
|
82941
|
-
var values = [];
|
|
82942
|
-
|
|
82943
|
-
if (typeof obj === 'undefined') {
|
|
82944
|
-
return values;
|
|
82945
|
-
}
|
|
82946
|
-
|
|
82947
|
-
var objKeys;
|
|
82948
|
-
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
82949
|
-
// we need to join elements in
|
|
82950
|
-
if (encodeValuesOnly && encoder) {
|
|
82951
|
-
obj = utils.maybeMap(obj, encoder);
|
|
82952
|
-
}
|
|
82953
|
-
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
82954
|
-
} else if (isArray(filter)) {
|
|
82955
|
-
objKeys = filter;
|
|
82956
|
-
} else {
|
|
82957
|
-
var keys = Object.keys(obj);
|
|
82958
|
-
objKeys = sort ? keys.sort(sort) : keys;
|
|
82959
|
-
}
|
|
82960
|
-
|
|
82961
|
-
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
|
82962
|
-
|
|
82963
|
-
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
82964
|
-
|
|
82965
|
-
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
|
82966
|
-
return adjustedPrefix + '[]';
|
|
82967
|
-
}
|
|
82968
|
-
|
|
82969
|
-
for (var j = 0; j < objKeys.length; ++j) {
|
|
82970
|
-
var key = objKeys[j];
|
|
82971
|
-
var value = typeof key === 'object' && key && typeof key.value !== 'undefined'
|
|
82972
|
-
? key.value
|
|
82973
|
-
: obj[key];
|
|
82974
|
-
|
|
82975
|
-
if (skipNulls && value === null) {
|
|
82976
|
-
continue;
|
|
82977
|
-
}
|
|
82978
|
-
|
|
82979
|
-
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
|
|
82980
|
-
var keyPrefix = isArray(obj)
|
|
82981
|
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
|
|
82982
|
-
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
82983
|
-
|
|
82984
|
-
sideChannel.set(object, step);
|
|
82985
|
-
var valueSideChannel = getSideChannel();
|
|
82986
|
-
valueSideChannel.set(sentinel, sideChannel);
|
|
82987
|
-
pushToArray(values, stringify(
|
|
82988
|
-
value,
|
|
82989
|
-
keyPrefix,
|
|
82990
|
-
generateArrayPrefix,
|
|
82991
|
-
commaRoundTrip,
|
|
82992
|
-
allowEmptyArrays,
|
|
82993
|
-
strictNullHandling,
|
|
82994
|
-
skipNulls,
|
|
82995
|
-
encodeDotInKeys,
|
|
82996
|
-
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
|
|
82997
|
-
filter,
|
|
82998
|
-
sort,
|
|
82999
|
-
allowDots,
|
|
83000
|
-
serializeDate,
|
|
83001
|
-
format,
|
|
83002
|
-
formatter,
|
|
83003
|
-
encodeValuesOnly,
|
|
83004
|
-
charset,
|
|
83005
|
-
valueSideChannel
|
|
83006
|
-
));
|
|
83007
|
-
}
|
|
83008
|
-
|
|
83009
|
-
return values;
|
|
83010
|
-
};
|
|
83011
|
-
|
|
83012
|
-
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
83013
|
-
if (!opts) {
|
|
83014
|
-
return defaults;
|
|
83015
|
-
}
|
|
83016
|
-
|
|
83017
|
-
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
|
|
83018
|
-
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
|
|
83019
|
-
}
|
|
83020
|
-
|
|
83021
|
-
if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
|
|
83022
|
-
throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
|
|
83023
|
-
}
|
|
83024
|
-
|
|
83025
|
-
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
83026
|
-
throw new TypeError('Encoder has to be a function.');
|
|
83027
|
-
}
|
|
83028
|
-
|
|
83029
|
-
var charset = opts.charset || defaults.charset;
|
|
83030
|
-
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
83031
|
-
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
83032
|
-
}
|
|
83033
|
-
|
|
83034
|
-
var format = formats['default'];
|
|
83035
|
-
if (typeof opts.format !== 'undefined') {
|
|
83036
|
-
if (!has.call(formats.formatters, opts.format)) {
|
|
83037
|
-
throw new TypeError('Unknown format option provided.');
|
|
83038
|
-
}
|
|
83039
|
-
format = opts.format;
|
|
83040
|
-
}
|
|
83041
|
-
var formatter = formats.formatters[format];
|
|
83042
|
-
|
|
83043
|
-
var filter = defaults.filter;
|
|
83044
|
-
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
|
83045
|
-
filter = opts.filter;
|
|
83046
|
-
}
|
|
83047
|
-
|
|
83048
|
-
var arrayFormat;
|
|
83049
|
-
if (opts.arrayFormat in arrayPrefixGenerators) {
|
|
83050
|
-
arrayFormat = opts.arrayFormat;
|
|
83051
|
-
} else if ('indices' in opts) {
|
|
83052
|
-
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
83053
|
-
} else {
|
|
83054
|
-
arrayFormat = defaults.arrayFormat;
|
|
83055
|
-
}
|
|
83056
|
-
|
|
83057
|
-
if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
83058
|
-
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
83059
|
-
}
|
|
83060
|
-
|
|
83061
|
-
var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
83062
|
-
|
|
83063
|
-
return {
|
|
83064
|
-
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
|
83065
|
-
allowDots: allowDots,
|
|
83066
|
-
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
83067
|
-
arrayFormat: arrayFormat,
|
|
83068
|
-
charset: charset,
|
|
83069
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
83070
|
-
commaRoundTrip: !!opts.commaRoundTrip,
|
|
83071
|
-
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
|
83072
|
-
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
|
83073
|
-
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
|
|
83074
|
-
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
|
83075
|
-
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
83076
|
-
filter: filter,
|
|
83077
|
-
format: format,
|
|
83078
|
-
formatter: formatter,
|
|
83079
|
-
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
|
83080
|
-
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
|
83081
|
-
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
83082
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
83083
|
-
};
|
|
83084
|
-
};
|
|
83085
|
-
|
|
83086
|
-
module.exports = function (object, opts) {
|
|
83087
|
-
var obj = object;
|
|
83088
|
-
var options = normalizeStringifyOptions(opts);
|
|
83089
|
-
|
|
83090
|
-
var objKeys;
|
|
83091
|
-
var filter;
|
|
83092
|
-
|
|
83093
|
-
if (typeof options.filter === 'function') {
|
|
83094
|
-
filter = options.filter;
|
|
83095
|
-
obj = filter('', obj);
|
|
83096
|
-
} else if (isArray(options.filter)) {
|
|
83097
|
-
filter = options.filter;
|
|
83098
|
-
objKeys = filter;
|
|
83099
|
-
}
|
|
83100
|
-
|
|
83101
|
-
var keys = [];
|
|
83102
|
-
|
|
83103
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
83104
|
-
return '';
|
|
83105
|
-
}
|
|
83106
|
-
|
|
83107
|
-
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
|
|
83108
|
-
var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
|
|
83109
|
-
|
|
83110
|
-
if (!objKeys) {
|
|
83111
|
-
objKeys = Object.keys(obj);
|
|
83112
|
-
}
|
|
83113
|
-
|
|
83114
|
-
if (options.sort) {
|
|
83115
|
-
objKeys.sort(options.sort);
|
|
83116
|
-
}
|
|
83117
|
-
|
|
83118
|
-
var sideChannel = getSideChannel();
|
|
83119
|
-
for (var i = 0; i < objKeys.length; ++i) {
|
|
83120
|
-
var key = objKeys[i];
|
|
83121
|
-
var value = obj[key];
|
|
83122
|
-
|
|
83123
|
-
if (options.skipNulls && value === null) {
|
|
83124
|
-
continue;
|
|
83125
|
-
}
|
|
83126
|
-
pushToArray(keys, stringify(
|
|
83127
|
-
value,
|
|
83128
|
-
key,
|
|
83129
|
-
generateArrayPrefix,
|
|
83130
|
-
commaRoundTrip,
|
|
83131
|
-
options.allowEmptyArrays,
|
|
83132
|
-
options.strictNullHandling,
|
|
83133
|
-
options.skipNulls,
|
|
83134
|
-
options.encodeDotInKeys,
|
|
83135
|
-
options.encode ? options.encoder : null,
|
|
83136
|
-
options.filter,
|
|
83137
|
-
options.sort,
|
|
83138
|
-
options.allowDots,
|
|
83139
|
-
options.serializeDate,
|
|
83140
|
-
options.format,
|
|
83141
|
-
options.formatter,
|
|
83142
|
-
options.encodeValuesOnly,
|
|
83143
|
-
options.charset,
|
|
83144
|
-
sideChannel
|
|
83145
|
-
));
|
|
83146
|
-
}
|
|
83147
|
-
|
|
83148
|
-
var joined = keys.join(options.delimiter);
|
|
83149
|
-
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
83150
|
-
|
|
83151
|
-
if (options.charsetSentinel) {
|
|
83152
|
-
if (options.charset === 'iso-8859-1') {
|
|
83153
|
-
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
83154
|
-
prefix += 'utf8=%26%2310003%3B&';
|
|
83155
|
-
} else {
|
|
83156
|
-
// encodeURIComponent('✓')
|
|
83157
|
-
prefix += 'utf8=%E2%9C%93&';
|
|
83158
|
-
}
|
|
83159
|
-
}
|
|
83160
|
-
|
|
83161
|
-
return joined.length > 0 ? prefix + joined : '';
|
|
83162
|
-
};
|
|
83163
|
-
|
|
83164
|
-
|
|
83165
|
-
/***/ }),
|
|
83166
|
-
|
|
83167
|
-
/***/ "./node_modules/qs/lib/utils.js":
|
|
83168
|
-
/*!**************************************!*\
|
|
83169
|
-
!*** ./node_modules/qs/lib/utils.js ***!
|
|
83170
|
-
\**************************************/
|
|
83171
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
83172
|
-
|
|
83173
|
-
"use strict";
|
|
83174
|
-
|
|
83175
|
-
|
|
83176
|
-
var formats = __webpack_require__(/*! ./formats */ "./node_modules/qs/lib/formats.js");
|
|
83177
|
-
|
|
83178
|
-
var has = Object.prototype.hasOwnProperty;
|
|
83179
|
-
var isArray = Array.isArray;
|
|
83180
|
-
|
|
83181
|
-
var hexTable = (function () {
|
|
83182
|
-
var array = [];
|
|
83183
|
-
for (var i = 0; i < 256; ++i) {
|
|
83184
|
-
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
83185
|
-
}
|
|
83186
|
-
|
|
83187
|
-
return array;
|
|
83188
|
-
}());
|
|
83189
|
-
|
|
83190
|
-
var compactQueue = function compactQueue(queue) {
|
|
83191
|
-
while (queue.length > 1) {
|
|
83192
|
-
var item = queue.pop();
|
|
83193
|
-
var obj = item.obj[item.prop];
|
|
83194
|
-
|
|
83195
|
-
if (isArray(obj)) {
|
|
83196
|
-
var compacted = [];
|
|
83197
|
-
|
|
83198
|
-
for (var j = 0; j < obj.length; ++j) {
|
|
83199
|
-
if (typeof obj[j] !== 'undefined') {
|
|
83200
|
-
compacted.push(obj[j]);
|
|
83201
|
-
}
|
|
83202
|
-
}
|
|
83203
|
-
|
|
83204
|
-
item.obj[item.prop] = compacted;
|
|
83205
|
-
}
|
|
83206
|
-
}
|
|
83207
|
-
};
|
|
83208
|
-
|
|
83209
|
-
var arrayToObject = function arrayToObject(source, options) {
|
|
83210
|
-
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
83211
|
-
for (var i = 0; i < source.length; ++i) {
|
|
83212
|
-
if (typeof source[i] !== 'undefined') {
|
|
83213
|
-
obj[i] = source[i];
|
|
83214
|
-
}
|
|
83215
|
-
}
|
|
83216
|
-
|
|
83217
|
-
return obj;
|
|
83218
|
-
};
|
|
83219
|
-
|
|
83220
|
-
var merge = function merge(target, source, options) {
|
|
83221
|
-
/* eslint no-param-reassign: 0 */
|
|
83222
|
-
if (!source) {
|
|
83223
|
-
return target;
|
|
83224
|
-
}
|
|
83225
|
-
|
|
83226
|
-
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
83227
|
-
if (isArray(target)) {
|
|
83228
|
-
target.push(source);
|
|
83229
|
-
} else if (target && typeof target === 'object') {
|
|
83230
|
-
if (
|
|
83231
|
-
(options && (options.plainObjects || options.allowPrototypes))
|
|
83232
|
-
|| !has.call(Object.prototype, source)
|
|
83233
|
-
) {
|
|
83234
|
-
target[source] = true;
|
|
83235
|
-
}
|
|
83236
|
-
} else {
|
|
83237
|
-
return [target, source];
|
|
83238
|
-
}
|
|
83239
|
-
|
|
83240
|
-
return target;
|
|
83241
|
-
}
|
|
83242
|
-
|
|
83243
|
-
if (!target || typeof target !== 'object') {
|
|
83244
|
-
return [target].concat(source);
|
|
83245
|
-
}
|
|
83246
|
-
|
|
83247
|
-
var mergeTarget = target;
|
|
83248
|
-
if (isArray(target) && !isArray(source)) {
|
|
83249
|
-
mergeTarget = arrayToObject(target, options);
|
|
83250
|
-
}
|
|
83251
|
-
|
|
83252
|
-
if (isArray(target) && isArray(source)) {
|
|
83253
|
-
source.forEach(function (item, i) {
|
|
83254
|
-
if (has.call(target, i)) {
|
|
83255
|
-
var targetItem = target[i];
|
|
83256
|
-
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
83257
|
-
target[i] = merge(targetItem, item, options);
|
|
83258
|
-
} else {
|
|
83259
|
-
target.push(item);
|
|
83260
|
-
}
|
|
83261
|
-
} else {
|
|
83262
|
-
target[i] = item;
|
|
83263
|
-
}
|
|
83264
|
-
});
|
|
83265
|
-
return target;
|
|
83266
|
-
}
|
|
83267
|
-
|
|
83268
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
83269
|
-
var value = source[key];
|
|
83270
|
-
|
|
83271
|
-
if (has.call(acc, key)) {
|
|
83272
|
-
acc[key] = merge(acc[key], value, options);
|
|
83273
|
-
} else {
|
|
83274
|
-
acc[key] = value;
|
|
83275
|
-
}
|
|
83276
|
-
return acc;
|
|
83277
|
-
}, mergeTarget);
|
|
83278
|
-
};
|
|
83279
|
-
|
|
83280
|
-
var assign = function assignSingleSource(target, source) {
|
|
83281
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
83282
|
-
acc[key] = source[key];
|
|
83283
|
-
return acc;
|
|
83284
|
-
}, target);
|
|
83285
|
-
};
|
|
83286
|
-
|
|
83287
|
-
var decode = function (str, defaultDecoder, charset) {
|
|
83288
|
-
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
83289
|
-
if (charset === 'iso-8859-1') {
|
|
83290
|
-
// unescape never throws, no try...catch needed:
|
|
83291
|
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
83292
|
-
}
|
|
83293
|
-
// utf-8
|
|
83294
|
-
try {
|
|
83295
|
-
return decodeURIComponent(strWithoutPlus);
|
|
83296
|
-
} catch (e) {
|
|
83297
|
-
return strWithoutPlus;
|
|
83298
|
-
}
|
|
83299
|
-
};
|
|
83300
|
-
|
|
83301
|
-
var limit = 1024;
|
|
83302
|
-
|
|
83303
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
83304
|
-
|
|
83305
|
-
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
83306
|
-
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
83307
|
-
// It has been adapted here for stricter adherence to RFC 3986
|
|
83308
|
-
if (str.length === 0) {
|
|
83309
|
-
return str;
|
|
83310
|
-
}
|
|
83311
|
-
|
|
83312
|
-
var string = str;
|
|
83313
|
-
if (typeof str === 'symbol') {
|
|
83314
|
-
string = Symbol.prototype.toString.call(str);
|
|
83315
|
-
} else if (typeof str !== 'string') {
|
|
83316
|
-
string = String(str);
|
|
83317
|
-
}
|
|
83318
|
-
|
|
83319
|
-
if (charset === 'iso-8859-1') {
|
|
83320
|
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
83321
|
-
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
83322
|
-
});
|
|
83323
|
-
}
|
|
83324
|
-
|
|
83325
|
-
var out = '';
|
|
83326
|
-
for (var j = 0; j < string.length; j += limit) {
|
|
83327
|
-
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
83328
|
-
var arr = [];
|
|
83329
|
-
|
|
83330
|
-
for (var i = 0; i < segment.length; ++i) {
|
|
83331
|
-
var c = segment.charCodeAt(i);
|
|
83332
|
-
if (
|
|
83333
|
-
c === 0x2D // -
|
|
83334
|
-
|| c === 0x2E // .
|
|
83335
|
-
|| c === 0x5F // _
|
|
83336
|
-
|| c === 0x7E // ~
|
|
83337
|
-
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
83338
|
-
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
83339
|
-
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
83340
|
-
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
83341
|
-
) {
|
|
83342
|
-
arr[arr.length] = segment.charAt(i);
|
|
83343
|
-
continue;
|
|
83344
|
-
}
|
|
83345
|
-
|
|
83346
|
-
if (c < 0x80) {
|
|
83347
|
-
arr[arr.length] = hexTable[c];
|
|
83348
|
-
continue;
|
|
83349
|
-
}
|
|
83350
|
-
|
|
83351
|
-
if (c < 0x800) {
|
|
83352
|
-
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
83353
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
83354
|
-
continue;
|
|
83355
|
-
}
|
|
83356
|
-
|
|
83357
|
-
if (c < 0xD800 || c >= 0xE000) {
|
|
83358
|
-
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
83359
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
83360
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
83361
|
-
continue;
|
|
83362
|
-
}
|
|
83363
|
-
|
|
83364
|
-
i += 1;
|
|
83365
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
83366
|
-
|
|
83367
|
-
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
83368
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
83369
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
83370
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
83371
|
-
}
|
|
83372
|
-
|
|
83373
|
-
out += arr.join('');
|
|
83374
|
-
}
|
|
83375
|
-
|
|
83376
|
-
return out;
|
|
83377
|
-
};
|
|
83378
|
-
|
|
83379
|
-
var compact = function compact(value) {
|
|
83380
|
-
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
83381
|
-
var refs = [];
|
|
83382
|
-
|
|
83383
|
-
for (var i = 0; i < queue.length; ++i) {
|
|
83384
|
-
var item = queue[i];
|
|
83385
|
-
var obj = item.obj[item.prop];
|
|
83386
|
-
|
|
83387
|
-
var keys = Object.keys(obj);
|
|
83388
|
-
for (var j = 0; j < keys.length; ++j) {
|
|
83389
|
-
var key = keys[j];
|
|
83390
|
-
var val = obj[key];
|
|
83391
|
-
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
83392
|
-
queue.push({ obj: obj, prop: key });
|
|
83393
|
-
refs.push(val);
|
|
83394
|
-
}
|
|
83395
|
-
}
|
|
83396
|
-
}
|
|
83397
|
-
|
|
83398
|
-
compactQueue(queue);
|
|
83399
|
-
|
|
83400
|
-
return value;
|
|
83401
|
-
};
|
|
83402
|
-
|
|
83403
|
-
var isRegExp = function isRegExp(obj) {
|
|
83404
|
-
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
83405
|
-
};
|
|
83406
|
-
|
|
83407
|
-
var isBuffer = function isBuffer(obj) {
|
|
83408
|
-
if (!obj || typeof obj !== 'object') {
|
|
83409
|
-
return false;
|
|
83410
|
-
}
|
|
83411
|
-
|
|
83412
|
-
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
83413
|
-
};
|
|
83414
|
-
|
|
83415
|
-
var combine = function combine(a, b) {
|
|
83416
|
-
return [].concat(a, b);
|
|
83417
|
-
};
|
|
83418
|
-
|
|
83419
|
-
var maybeMap = function maybeMap(val, fn) {
|
|
83420
|
-
if (isArray(val)) {
|
|
83421
|
-
var mapped = [];
|
|
83422
|
-
for (var i = 0; i < val.length; i += 1) {
|
|
83423
|
-
mapped.push(fn(val[i]));
|
|
83424
|
-
}
|
|
83425
|
-
return mapped;
|
|
83426
|
-
}
|
|
83427
|
-
return fn(val);
|
|
83428
|
-
};
|
|
83429
|
-
|
|
83430
|
-
module.exports = {
|
|
83431
|
-
arrayToObject: arrayToObject,
|
|
83432
|
-
assign: assign,
|
|
83433
|
-
combine: combine,
|
|
83434
|
-
compact: compact,
|
|
83435
|
-
decode: decode,
|
|
83436
|
-
encode: encode,
|
|
83437
|
-
isBuffer: isBuffer,
|
|
83438
|
-
isRegExp: isRegExp,
|
|
83439
|
-
maybeMap: maybeMap,
|
|
83440
|
-
merge: merge
|
|
83441
|
-
};
|
|
83442
|
-
|
|
83443
|
-
|
|
83444
82037
|
/***/ }),
|
|
83445
82038
|
|
|
83446
82039
|
/***/ "./node_modules/randombytes/browser.js":
|
|
@@ -98053,358 +96646,6 @@ Sha512.prototype._hash = function () {
|
|
|
98053
96646
|
module.exports = Sha512;
|
|
98054
96647
|
|
|
98055
96648
|
|
|
98056
|
-
/***/ }),
|
|
98057
|
-
|
|
98058
|
-
/***/ "./node_modules/side-channel-list/index.js":
|
|
98059
|
-
/*!*************************************************!*\
|
|
98060
|
-
!*** ./node_modules/side-channel-list/index.js ***!
|
|
98061
|
-
\*************************************************/
|
|
98062
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
98063
|
-
|
|
98064
|
-
"use strict";
|
|
98065
|
-
|
|
98066
|
-
|
|
98067
|
-
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
98068
|
-
|
|
98069
|
-
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
98070
|
-
|
|
98071
|
-
/*
|
|
98072
|
-
* This function traverses the list returning the node corresponding to the given key.
|
|
98073
|
-
*
|
|
98074
|
-
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
98075
|
-
* By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
98076
|
-
*/
|
|
98077
|
-
/** @type {import('./list.d.ts').listGetNode} */
|
|
98078
|
-
// eslint-disable-next-line consistent-return
|
|
98079
|
-
var listGetNode = function (list, key, isDelete) {
|
|
98080
|
-
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
98081
|
-
var prev = list;
|
|
98082
|
-
/** @type {(typeof list)['next']} */
|
|
98083
|
-
var curr;
|
|
98084
|
-
// eslint-disable-next-line eqeqeq
|
|
98085
|
-
for (; (curr = prev.next) != null; prev = curr) {
|
|
98086
|
-
if (curr.key === key) {
|
|
98087
|
-
prev.next = curr.next;
|
|
98088
|
-
if (!isDelete) {
|
|
98089
|
-
// eslint-disable-next-line no-extra-parens
|
|
98090
|
-
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
98091
|
-
list.next = curr; // eslint-disable-line no-param-reassign
|
|
98092
|
-
}
|
|
98093
|
-
return curr;
|
|
98094
|
-
}
|
|
98095
|
-
}
|
|
98096
|
-
};
|
|
98097
|
-
|
|
98098
|
-
/** @type {import('./list.d.ts').listGet} */
|
|
98099
|
-
var listGet = function (objects, key) {
|
|
98100
|
-
if (!objects) {
|
|
98101
|
-
return void undefined;
|
|
98102
|
-
}
|
|
98103
|
-
var node = listGetNode(objects, key);
|
|
98104
|
-
return node && node.value;
|
|
98105
|
-
};
|
|
98106
|
-
/** @type {import('./list.d.ts').listSet} */
|
|
98107
|
-
var listSet = function (objects, key, value) {
|
|
98108
|
-
var node = listGetNode(objects, key);
|
|
98109
|
-
if (node) {
|
|
98110
|
-
node.value = value;
|
|
98111
|
-
} else {
|
|
98112
|
-
// Prepend the new node to the beginning of the list
|
|
98113
|
-
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
98114
|
-
key: key,
|
|
98115
|
-
next: objects.next,
|
|
98116
|
-
value: value
|
|
98117
|
-
});
|
|
98118
|
-
}
|
|
98119
|
-
};
|
|
98120
|
-
/** @type {import('./list.d.ts').listHas} */
|
|
98121
|
-
var listHas = function (objects, key) {
|
|
98122
|
-
if (!objects) {
|
|
98123
|
-
return false;
|
|
98124
|
-
}
|
|
98125
|
-
return !!listGetNode(objects, key);
|
|
98126
|
-
};
|
|
98127
|
-
/** @type {import('./list.d.ts').listDelete} */
|
|
98128
|
-
// eslint-disable-next-line consistent-return
|
|
98129
|
-
var listDelete = function (objects, key) {
|
|
98130
|
-
if (objects) {
|
|
98131
|
-
return listGetNode(objects, key, true);
|
|
98132
|
-
}
|
|
98133
|
-
};
|
|
98134
|
-
|
|
98135
|
-
/** @type {import('.')} */
|
|
98136
|
-
module.exports = function getSideChannelList() {
|
|
98137
|
-
/** @typedef {ReturnType<typeof getSideChannelList>} Channel */
|
|
98138
|
-
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
98139
|
-
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
98140
|
-
|
|
98141
|
-
/** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
|
|
98142
|
-
|
|
98143
|
-
/** @type {Channel} */
|
|
98144
|
-
var channel = {
|
|
98145
|
-
assert: function (key) {
|
|
98146
|
-
if (!channel.has(key)) {
|
|
98147
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
98148
|
-
}
|
|
98149
|
-
},
|
|
98150
|
-
'delete': function (key) {
|
|
98151
|
-
var root = $o && $o.next;
|
|
98152
|
-
var deletedNode = listDelete($o, key);
|
|
98153
|
-
if (deletedNode && root && root === deletedNode) {
|
|
98154
|
-
$o = void undefined;
|
|
98155
|
-
}
|
|
98156
|
-
return !!deletedNode;
|
|
98157
|
-
},
|
|
98158
|
-
get: function (key) {
|
|
98159
|
-
return listGet($o, key);
|
|
98160
|
-
},
|
|
98161
|
-
has: function (key) {
|
|
98162
|
-
return listHas($o, key);
|
|
98163
|
-
},
|
|
98164
|
-
set: function (key, value) {
|
|
98165
|
-
if (!$o) {
|
|
98166
|
-
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
98167
|
-
$o = {
|
|
98168
|
-
next: void undefined
|
|
98169
|
-
};
|
|
98170
|
-
}
|
|
98171
|
-
// eslint-disable-next-line no-extra-parens
|
|
98172
|
-
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
98173
|
-
}
|
|
98174
|
-
};
|
|
98175
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
98176
|
-
return channel;
|
|
98177
|
-
};
|
|
98178
|
-
|
|
98179
|
-
|
|
98180
|
-
/***/ }),
|
|
98181
|
-
|
|
98182
|
-
/***/ "./node_modules/side-channel-map/index.js":
|
|
98183
|
-
/*!************************************************!*\
|
|
98184
|
-
!*** ./node_modules/side-channel-map/index.js ***!
|
|
98185
|
-
\************************************************/
|
|
98186
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
98187
|
-
|
|
98188
|
-
"use strict";
|
|
98189
|
-
|
|
98190
|
-
|
|
98191
|
-
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
|
|
98192
|
-
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
98193
|
-
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
98194
|
-
|
|
98195
|
-
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
98196
|
-
var $Map = GetIntrinsic('%Map%', true);
|
|
98197
|
-
|
|
98198
|
-
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
98199
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
98200
|
-
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
98201
|
-
var $mapSet = callBound('Map.prototype.set', true);
|
|
98202
|
-
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
98203
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
98204
|
-
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
98205
|
-
var $mapDelete = callBound('Map.prototype.delete', true);
|
|
98206
|
-
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
98207
|
-
var $mapSize = callBound('Map.prototype.size', true);
|
|
98208
|
-
|
|
98209
|
-
/** @type {import('.')} */
|
|
98210
|
-
module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
98211
|
-
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
98212
|
-
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
98213
|
-
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
98214
|
-
|
|
98215
|
-
/** @type {Map<K, V> | undefined} */ var $m;
|
|
98216
|
-
|
|
98217
|
-
/** @type {Channel} */
|
|
98218
|
-
var channel = {
|
|
98219
|
-
assert: function (key) {
|
|
98220
|
-
if (!channel.has(key)) {
|
|
98221
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
98222
|
-
}
|
|
98223
|
-
},
|
|
98224
|
-
'delete': function (key) {
|
|
98225
|
-
if ($m) {
|
|
98226
|
-
var result = $mapDelete($m, key);
|
|
98227
|
-
if ($mapSize($m) === 0) {
|
|
98228
|
-
$m = void undefined;
|
|
98229
|
-
}
|
|
98230
|
-
return result;
|
|
98231
|
-
}
|
|
98232
|
-
return false;
|
|
98233
|
-
},
|
|
98234
|
-
get: function (key) { // eslint-disable-line consistent-return
|
|
98235
|
-
if ($m) {
|
|
98236
|
-
return $mapGet($m, key);
|
|
98237
|
-
}
|
|
98238
|
-
},
|
|
98239
|
-
has: function (key) {
|
|
98240
|
-
if ($m) {
|
|
98241
|
-
return $mapHas($m, key);
|
|
98242
|
-
}
|
|
98243
|
-
return false;
|
|
98244
|
-
},
|
|
98245
|
-
set: function (key, value) {
|
|
98246
|
-
if (!$m) {
|
|
98247
|
-
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
98248
|
-
$m = new $Map();
|
|
98249
|
-
}
|
|
98250
|
-
$mapSet($m, key, value);
|
|
98251
|
-
}
|
|
98252
|
-
};
|
|
98253
|
-
|
|
98254
|
-
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
98255
|
-
return channel;
|
|
98256
|
-
};
|
|
98257
|
-
|
|
98258
|
-
|
|
98259
|
-
/***/ }),
|
|
98260
|
-
|
|
98261
|
-
/***/ "./node_modules/side-channel-weakmap/index.js":
|
|
98262
|
-
/*!****************************************************!*\
|
|
98263
|
-
!*** ./node_modules/side-channel-weakmap/index.js ***!
|
|
98264
|
-
\****************************************************/
|
|
98265
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
98266
|
-
|
|
98267
|
-
"use strict";
|
|
98268
|
-
|
|
98269
|
-
|
|
98270
|
-
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
|
|
98271
|
-
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
98272
|
-
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
98273
|
-
var getSideChannelMap = __webpack_require__(/*! side-channel-map */ "./node_modules/side-channel-map/index.js");
|
|
98274
|
-
|
|
98275
|
-
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
98276
|
-
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
98277
|
-
|
|
98278
|
-
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
98279
|
-
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
98280
|
-
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
98281
|
-
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
98282
|
-
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
98283
|
-
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
98284
|
-
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
98285
|
-
var $weakMapDelete = callBound('WeakMap.prototype.delete', true);
|
|
98286
|
-
|
|
98287
|
-
/** @type {import('.')} */
|
|
98288
|
-
module.exports = $WeakMap
|
|
98289
|
-
? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
|
|
98290
|
-
/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
|
|
98291
|
-
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
98292
|
-
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
98293
|
-
|
|
98294
|
-
/** @type {WeakMap<K & object, V> | undefined} */ var $wm;
|
|
98295
|
-
/** @type {Channel | undefined} */ var $m;
|
|
98296
|
-
|
|
98297
|
-
/** @type {Channel} */
|
|
98298
|
-
var channel = {
|
|
98299
|
-
assert: function (key) {
|
|
98300
|
-
if (!channel.has(key)) {
|
|
98301
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
98302
|
-
}
|
|
98303
|
-
},
|
|
98304
|
-
'delete': function (key) {
|
|
98305
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
98306
|
-
if ($wm) {
|
|
98307
|
-
return $weakMapDelete($wm, key);
|
|
98308
|
-
}
|
|
98309
|
-
} else if (getSideChannelMap) {
|
|
98310
|
-
if ($m) {
|
|
98311
|
-
return $m['delete'](key);
|
|
98312
|
-
}
|
|
98313
|
-
}
|
|
98314
|
-
return false;
|
|
98315
|
-
},
|
|
98316
|
-
get: function (key) {
|
|
98317
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
98318
|
-
if ($wm) {
|
|
98319
|
-
return $weakMapGet($wm, key);
|
|
98320
|
-
}
|
|
98321
|
-
}
|
|
98322
|
-
return $m && $m.get(key);
|
|
98323
|
-
},
|
|
98324
|
-
has: function (key) {
|
|
98325
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
98326
|
-
if ($wm) {
|
|
98327
|
-
return $weakMapHas($wm, key);
|
|
98328
|
-
}
|
|
98329
|
-
}
|
|
98330
|
-
return !!$m && $m.has(key);
|
|
98331
|
-
},
|
|
98332
|
-
set: function (key, value) {
|
|
98333
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
98334
|
-
if (!$wm) {
|
|
98335
|
-
$wm = new $WeakMap();
|
|
98336
|
-
}
|
|
98337
|
-
$weakMapSet($wm, key, value);
|
|
98338
|
-
} else if (getSideChannelMap) {
|
|
98339
|
-
if (!$m) {
|
|
98340
|
-
$m = getSideChannelMap();
|
|
98341
|
-
}
|
|
98342
|
-
// eslint-disable-next-line no-extra-parens
|
|
98343
|
-
/** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
|
|
98344
|
-
}
|
|
98345
|
-
}
|
|
98346
|
-
};
|
|
98347
|
-
|
|
98348
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
98349
|
-
return channel;
|
|
98350
|
-
}
|
|
98351
|
-
: getSideChannelMap;
|
|
98352
|
-
|
|
98353
|
-
|
|
98354
|
-
/***/ }),
|
|
98355
|
-
|
|
98356
|
-
/***/ "./node_modules/side-channel/index.js":
|
|
98357
|
-
/*!********************************************!*\
|
|
98358
|
-
!*** ./node_modules/side-channel/index.js ***!
|
|
98359
|
-
\********************************************/
|
|
98360
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
98361
|
-
|
|
98362
|
-
"use strict";
|
|
98363
|
-
|
|
98364
|
-
|
|
98365
|
-
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
98366
|
-
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
98367
|
-
var getSideChannelList = __webpack_require__(/*! side-channel-list */ "./node_modules/side-channel-list/index.js");
|
|
98368
|
-
var getSideChannelMap = __webpack_require__(/*! side-channel-map */ "./node_modules/side-channel-map/index.js");
|
|
98369
|
-
var getSideChannelWeakMap = __webpack_require__(/*! side-channel-weakmap */ "./node_modules/side-channel-weakmap/index.js");
|
|
98370
|
-
|
|
98371
|
-
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
98372
|
-
|
|
98373
|
-
/** @type {import('.')} */
|
|
98374
|
-
module.exports = function getSideChannel() {
|
|
98375
|
-
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
|
98376
|
-
|
|
98377
|
-
/** @type {Channel | undefined} */ var $channelData;
|
|
98378
|
-
|
|
98379
|
-
/** @type {Channel} */
|
|
98380
|
-
var channel = {
|
|
98381
|
-
assert: function (key) {
|
|
98382
|
-
if (!channel.has(key)) {
|
|
98383
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
98384
|
-
}
|
|
98385
|
-
},
|
|
98386
|
-
'delete': function (key) {
|
|
98387
|
-
return !!$channelData && $channelData['delete'](key);
|
|
98388
|
-
},
|
|
98389
|
-
get: function (key) {
|
|
98390
|
-
return $channelData && $channelData.get(key);
|
|
98391
|
-
},
|
|
98392
|
-
has: function (key) {
|
|
98393
|
-
return !!$channelData && $channelData.has(key);
|
|
98394
|
-
},
|
|
98395
|
-
set: function (key, value) {
|
|
98396
|
-
if (!$channelData) {
|
|
98397
|
-
$channelData = makeChannel();
|
|
98398
|
-
}
|
|
98399
|
-
|
|
98400
|
-
$channelData.set(key, value);
|
|
98401
|
-
}
|
|
98402
|
-
};
|
|
98403
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
98404
|
-
return channel;
|
|
98405
|
-
};
|
|
98406
|
-
|
|
98407
|
-
|
|
98408
96649
|
/***/ }),
|
|
98409
96650
|
|
|
98410
96651
|
/***/ "./node_modules/stream-browserify/index.js":
|
|
@@ -99000,1324 +97241,6 @@ module.exports = $typedArrayBuffer || function typedArrayBuffer(x) {
|
|
|
99000
97241
|
};
|
|
99001
97242
|
|
|
99002
97243
|
|
|
99003
|
-
/***/ }),
|
|
99004
|
-
|
|
99005
|
-
/***/ "./node_modules/url/node_modules/punycode/punycode.js":
|
|
99006
|
-
/*!************************************************************!*\
|
|
99007
|
-
!*** ./node_modules/url/node_modules/punycode/punycode.js ***!
|
|
99008
|
-
\************************************************************/
|
|
99009
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
99010
|
-
|
|
99011
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
99012
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
99013
|
-
;(function(root) {
|
|
99014
|
-
|
|
99015
|
-
/** Detect free variables */
|
|
99016
|
-
var freeExports = true && exports &&
|
|
99017
|
-
!exports.nodeType && exports;
|
|
99018
|
-
var freeModule = true && module &&
|
|
99019
|
-
!module.nodeType && module;
|
|
99020
|
-
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g;
|
|
99021
|
-
if (
|
|
99022
|
-
freeGlobal.global === freeGlobal ||
|
|
99023
|
-
freeGlobal.window === freeGlobal ||
|
|
99024
|
-
freeGlobal.self === freeGlobal
|
|
99025
|
-
) {
|
|
99026
|
-
root = freeGlobal;
|
|
99027
|
-
}
|
|
99028
|
-
|
|
99029
|
-
/**
|
|
99030
|
-
* The `punycode` object.
|
|
99031
|
-
* @name punycode
|
|
99032
|
-
* @type Object
|
|
99033
|
-
*/
|
|
99034
|
-
var punycode,
|
|
99035
|
-
|
|
99036
|
-
/** Highest positive signed 32-bit float value */
|
|
99037
|
-
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
|
99038
|
-
|
|
99039
|
-
/** Bootstring parameters */
|
|
99040
|
-
base = 36,
|
|
99041
|
-
tMin = 1,
|
|
99042
|
-
tMax = 26,
|
|
99043
|
-
skew = 38,
|
|
99044
|
-
damp = 700,
|
|
99045
|
-
initialBias = 72,
|
|
99046
|
-
initialN = 128, // 0x80
|
|
99047
|
-
delimiter = '-', // '\x2D'
|
|
99048
|
-
|
|
99049
|
-
/** Regular expressions */
|
|
99050
|
-
regexPunycode = /^xn--/,
|
|
99051
|
-
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
|
|
99052
|
-
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
|
|
99053
|
-
|
|
99054
|
-
/** Error messages */
|
|
99055
|
-
errors = {
|
|
99056
|
-
'overflow': 'Overflow: input needs wider integers to process',
|
|
99057
|
-
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
|
99058
|
-
'invalid-input': 'Invalid input'
|
|
99059
|
-
},
|
|
99060
|
-
|
|
99061
|
-
/** Convenience shortcuts */
|
|
99062
|
-
baseMinusTMin = base - tMin,
|
|
99063
|
-
floor = Math.floor,
|
|
99064
|
-
stringFromCharCode = String.fromCharCode,
|
|
99065
|
-
|
|
99066
|
-
/** Temporary variable */
|
|
99067
|
-
key;
|
|
99068
|
-
|
|
99069
|
-
/*--------------------------------------------------------------------------*/
|
|
99070
|
-
|
|
99071
|
-
/**
|
|
99072
|
-
* A generic error utility function.
|
|
99073
|
-
* @private
|
|
99074
|
-
* @param {String} type The error type.
|
|
99075
|
-
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
|
99076
|
-
*/
|
|
99077
|
-
function error(type) {
|
|
99078
|
-
throw new RangeError(errors[type]);
|
|
99079
|
-
}
|
|
99080
|
-
|
|
99081
|
-
/**
|
|
99082
|
-
* A generic `Array#map` utility function.
|
|
99083
|
-
* @private
|
|
99084
|
-
* @param {Array} array The array to iterate over.
|
|
99085
|
-
* @param {Function} callback The function that gets called for every array
|
|
99086
|
-
* item.
|
|
99087
|
-
* @returns {Array} A new array of values returned by the callback function.
|
|
99088
|
-
*/
|
|
99089
|
-
function map(array, fn) {
|
|
99090
|
-
var length = array.length;
|
|
99091
|
-
var result = [];
|
|
99092
|
-
while (length--) {
|
|
99093
|
-
result[length] = fn(array[length]);
|
|
99094
|
-
}
|
|
99095
|
-
return result;
|
|
99096
|
-
}
|
|
99097
|
-
|
|
99098
|
-
/**
|
|
99099
|
-
* A simple `Array#map`-like wrapper to work with domain name strings or email
|
|
99100
|
-
* addresses.
|
|
99101
|
-
* @private
|
|
99102
|
-
* @param {String} domain The domain name or email address.
|
|
99103
|
-
* @param {Function} callback The function that gets called for every
|
|
99104
|
-
* character.
|
|
99105
|
-
* @returns {Array} A new string of characters returned by the callback
|
|
99106
|
-
* function.
|
|
99107
|
-
*/
|
|
99108
|
-
function mapDomain(string, fn) {
|
|
99109
|
-
var parts = string.split('@');
|
|
99110
|
-
var result = '';
|
|
99111
|
-
if (parts.length > 1) {
|
|
99112
|
-
// In email addresses, only the domain name should be punycoded. Leave
|
|
99113
|
-
// the local part (i.e. everything up to `@`) intact.
|
|
99114
|
-
result = parts[0] + '@';
|
|
99115
|
-
string = parts[1];
|
|
99116
|
-
}
|
|
99117
|
-
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
|
99118
|
-
string = string.replace(regexSeparators, '\x2E');
|
|
99119
|
-
var labels = string.split('.');
|
|
99120
|
-
var encoded = map(labels, fn).join('.');
|
|
99121
|
-
return result + encoded;
|
|
99122
|
-
}
|
|
99123
|
-
|
|
99124
|
-
/**
|
|
99125
|
-
* Creates an array containing the numeric code points of each Unicode
|
|
99126
|
-
* character in the string. While JavaScript uses UCS-2 internally,
|
|
99127
|
-
* this function will convert a pair of surrogate halves (each of which
|
|
99128
|
-
* UCS-2 exposes as separate characters) into a single code point,
|
|
99129
|
-
* matching UTF-16.
|
|
99130
|
-
* @see `punycode.ucs2.encode`
|
|
99131
|
-
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
99132
|
-
* @memberOf punycode.ucs2
|
|
99133
|
-
* @name decode
|
|
99134
|
-
* @param {String} string The Unicode input string (UCS-2).
|
|
99135
|
-
* @returns {Array} The new array of code points.
|
|
99136
|
-
*/
|
|
99137
|
-
function ucs2decode(string) {
|
|
99138
|
-
var output = [],
|
|
99139
|
-
counter = 0,
|
|
99140
|
-
length = string.length,
|
|
99141
|
-
value,
|
|
99142
|
-
extra;
|
|
99143
|
-
while (counter < length) {
|
|
99144
|
-
value = string.charCodeAt(counter++);
|
|
99145
|
-
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
99146
|
-
// high surrogate, and there is a next character
|
|
99147
|
-
extra = string.charCodeAt(counter++);
|
|
99148
|
-
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
|
99149
|
-
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
99150
|
-
} else {
|
|
99151
|
-
// unmatched surrogate; only append this code unit, in case the next
|
|
99152
|
-
// code unit is the high surrogate of a surrogate pair
|
|
99153
|
-
output.push(value);
|
|
99154
|
-
counter--;
|
|
99155
|
-
}
|
|
99156
|
-
} else {
|
|
99157
|
-
output.push(value);
|
|
99158
|
-
}
|
|
99159
|
-
}
|
|
99160
|
-
return output;
|
|
99161
|
-
}
|
|
99162
|
-
|
|
99163
|
-
/**
|
|
99164
|
-
* Creates a string based on an array of numeric code points.
|
|
99165
|
-
* @see `punycode.ucs2.decode`
|
|
99166
|
-
* @memberOf punycode.ucs2
|
|
99167
|
-
* @name encode
|
|
99168
|
-
* @param {Array} codePoints The array of numeric code points.
|
|
99169
|
-
* @returns {String} The new Unicode string (UCS-2).
|
|
99170
|
-
*/
|
|
99171
|
-
function ucs2encode(array) {
|
|
99172
|
-
return map(array, function(value) {
|
|
99173
|
-
var output = '';
|
|
99174
|
-
if (value > 0xFFFF) {
|
|
99175
|
-
value -= 0x10000;
|
|
99176
|
-
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
|
99177
|
-
value = 0xDC00 | value & 0x3FF;
|
|
99178
|
-
}
|
|
99179
|
-
output += stringFromCharCode(value);
|
|
99180
|
-
return output;
|
|
99181
|
-
}).join('');
|
|
99182
|
-
}
|
|
99183
|
-
|
|
99184
|
-
/**
|
|
99185
|
-
* Converts a basic code point into a digit/integer.
|
|
99186
|
-
* @see `digitToBasic()`
|
|
99187
|
-
* @private
|
|
99188
|
-
* @param {Number} codePoint The basic numeric code point value.
|
|
99189
|
-
* @returns {Number} The numeric value of a basic code point (for use in
|
|
99190
|
-
* representing integers) in the range `0` to `base - 1`, or `base` if
|
|
99191
|
-
* the code point does not represent a value.
|
|
99192
|
-
*/
|
|
99193
|
-
function basicToDigit(codePoint) {
|
|
99194
|
-
if (codePoint - 48 < 10) {
|
|
99195
|
-
return codePoint - 22;
|
|
99196
|
-
}
|
|
99197
|
-
if (codePoint - 65 < 26) {
|
|
99198
|
-
return codePoint - 65;
|
|
99199
|
-
}
|
|
99200
|
-
if (codePoint - 97 < 26) {
|
|
99201
|
-
return codePoint - 97;
|
|
99202
|
-
}
|
|
99203
|
-
return base;
|
|
99204
|
-
}
|
|
99205
|
-
|
|
99206
|
-
/**
|
|
99207
|
-
* Converts a digit/integer into a basic code point.
|
|
99208
|
-
* @see `basicToDigit()`
|
|
99209
|
-
* @private
|
|
99210
|
-
* @param {Number} digit The numeric value of a basic code point.
|
|
99211
|
-
* @returns {Number} The basic code point whose value (when used for
|
|
99212
|
-
* representing integers) is `digit`, which needs to be in the range
|
|
99213
|
-
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
|
99214
|
-
* used; else, the lowercase form is used. The behavior is undefined
|
|
99215
|
-
* if `flag` is non-zero and `digit` has no uppercase form.
|
|
99216
|
-
*/
|
|
99217
|
-
function digitToBasic(digit, flag) {
|
|
99218
|
-
// 0..25 map to ASCII a..z or A..Z
|
|
99219
|
-
// 26..35 map to ASCII 0..9
|
|
99220
|
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
99221
|
-
}
|
|
99222
|
-
|
|
99223
|
-
/**
|
|
99224
|
-
* Bias adaptation function as per section 3.4 of RFC 3492.
|
|
99225
|
-
* https://tools.ietf.org/html/rfc3492#section-3.4
|
|
99226
|
-
* @private
|
|
99227
|
-
*/
|
|
99228
|
-
function adapt(delta, numPoints, firstTime) {
|
|
99229
|
-
var k = 0;
|
|
99230
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
99231
|
-
delta += floor(delta / numPoints);
|
|
99232
|
-
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
|
99233
|
-
delta = floor(delta / baseMinusTMin);
|
|
99234
|
-
}
|
|
99235
|
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
99236
|
-
}
|
|
99237
|
-
|
|
99238
|
-
/**
|
|
99239
|
-
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
|
99240
|
-
* symbols.
|
|
99241
|
-
* @memberOf punycode
|
|
99242
|
-
* @param {String} input The Punycode string of ASCII-only symbols.
|
|
99243
|
-
* @returns {String} The resulting string of Unicode symbols.
|
|
99244
|
-
*/
|
|
99245
|
-
function decode(input) {
|
|
99246
|
-
// Don't use UCS-2
|
|
99247
|
-
var output = [],
|
|
99248
|
-
inputLength = input.length,
|
|
99249
|
-
out,
|
|
99250
|
-
i = 0,
|
|
99251
|
-
n = initialN,
|
|
99252
|
-
bias = initialBias,
|
|
99253
|
-
basic,
|
|
99254
|
-
j,
|
|
99255
|
-
index,
|
|
99256
|
-
oldi,
|
|
99257
|
-
w,
|
|
99258
|
-
k,
|
|
99259
|
-
digit,
|
|
99260
|
-
t,
|
|
99261
|
-
/** Cached calculation results */
|
|
99262
|
-
baseMinusT;
|
|
99263
|
-
|
|
99264
|
-
// Handle the basic code points: let `basic` be the number of input code
|
|
99265
|
-
// points before the last delimiter, or `0` if there is none, then copy
|
|
99266
|
-
// the first basic code points to the output.
|
|
99267
|
-
|
|
99268
|
-
basic = input.lastIndexOf(delimiter);
|
|
99269
|
-
if (basic < 0) {
|
|
99270
|
-
basic = 0;
|
|
99271
|
-
}
|
|
99272
|
-
|
|
99273
|
-
for (j = 0; j < basic; ++j) {
|
|
99274
|
-
// if it's not a basic code point
|
|
99275
|
-
if (input.charCodeAt(j) >= 0x80) {
|
|
99276
|
-
error('not-basic');
|
|
99277
|
-
}
|
|
99278
|
-
output.push(input.charCodeAt(j));
|
|
99279
|
-
}
|
|
99280
|
-
|
|
99281
|
-
// Main decoding loop: start just after the last delimiter if any basic code
|
|
99282
|
-
// points were copied; start at the beginning otherwise.
|
|
99283
|
-
|
|
99284
|
-
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
|
|
99285
|
-
|
|
99286
|
-
// `index` is the index of the next character to be consumed.
|
|
99287
|
-
// Decode a generalized variable-length integer into `delta`,
|
|
99288
|
-
// which gets added to `i`. The overflow checking is easier
|
|
99289
|
-
// if we increase `i` as we go, then subtract off its starting
|
|
99290
|
-
// value at the end to obtain `delta`.
|
|
99291
|
-
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
|
99292
|
-
|
|
99293
|
-
if (index >= inputLength) {
|
|
99294
|
-
error('invalid-input');
|
|
99295
|
-
}
|
|
99296
|
-
|
|
99297
|
-
digit = basicToDigit(input.charCodeAt(index++));
|
|
99298
|
-
|
|
99299
|
-
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
|
99300
|
-
error('overflow');
|
|
99301
|
-
}
|
|
99302
|
-
|
|
99303
|
-
i += digit * w;
|
|
99304
|
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
99305
|
-
|
|
99306
|
-
if (digit < t) {
|
|
99307
|
-
break;
|
|
99308
|
-
}
|
|
99309
|
-
|
|
99310
|
-
baseMinusT = base - t;
|
|
99311
|
-
if (w > floor(maxInt / baseMinusT)) {
|
|
99312
|
-
error('overflow');
|
|
99313
|
-
}
|
|
99314
|
-
|
|
99315
|
-
w *= baseMinusT;
|
|
99316
|
-
|
|
99317
|
-
}
|
|
99318
|
-
|
|
99319
|
-
out = output.length + 1;
|
|
99320
|
-
bias = adapt(i - oldi, out, oldi == 0);
|
|
99321
|
-
|
|
99322
|
-
// `i` was supposed to wrap around from `out` to `0`,
|
|
99323
|
-
// incrementing `n` each time, so we'll fix that now:
|
|
99324
|
-
if (floor(i / out) > maxInt - n) {
|
|
99325
|
-
error('overflow');
|
|
99326
|
-
}
|
|
99327
|
-
|
|
99328
|
-
n += floor(i / out);
|
|
99329
|
-
i %= out;
|
|
99330
|
-
|
|
99331
|
-
// Insert `n` at position `i` of the output
|
|
99332
|
-
output.splice(i++, 0, n);
|
|
99333
|
-
|
|
99334
|
-
}
|
|
99335
|
-
|
|
99336
|
-
return ucs2encode(output);
|
|
99337
|
-
}
|
|
99338
|
-
|
|
99339
|
-
/**
|
|
99340
|
-
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
|
99341
|
-
* Punycode string of ASCII-only symbols.
|
|
99342
|
-
* @memberOf punycode
|
|
99343
|
-
* @param {String} input The string of Unicode symbols.
|
|
99344
|
-
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
|
99345
|
-
*/
|
|
99346
|
-
function encode(input) {
|
|
99347
|
-
var n,
|
|
99348
|
-
delta,
|
|
99349
|
-
handledCPCount,
|
|
99350
|
-
basicLength,
|
|
99351
|
-
bias,
|
|
99352
|
-
j,
|
|
99353
|
-
m,
|
|
99354
|
-
q,
|
|
99355
|
-
k,
|
|
99356
|
-
t,
|
|
99357
|
-
currentValue,
|
|
99358
|
-
output = [],
|
|
99359
|
-
/** `inputLength` will hold the number of code points in `input`. */
|
|
99360
|
-
inputLength,
|
|
99361
|
-
/** Cached calculation results */
|
|
99362
|
-
handledCPCountPlusOne,
|
|
99363
|
-
baseMinusT,
|
|
99364
|
-
qMinusT;
|
|
99365
|
-
|
|
99366
|
-
// Convert the input in UCS-2 to Unicode
|
|
99367
|
-
input = ucs2decode(input);
|
|
99368
|
-
|
|
99369
|
-
// Cache the length
|
|
99370
|
-
inputLength = input.length;
|
|
99371
|
-
|
|
99372
|
-
// Initialize the state
|
|
99373
|
-
n = initialN;
|
|
99374
|
-
delta = 0;
|
|
99375
|
-
bias = initialBias;
|
|
99376
|
-
|
|
99377
|
-
// Handle the basic code points
|
|
99378
|
-
for (j = 0; j < inputLength; ++j) {
|
|
99379
|
-
currentValue = input[j];
|
|
99380
|
-
if (currentValue < 0x80) {
|
|
99381
|
-
output.push(stringFromCharCode(currentValue));
|
|
99382
|
-
}
|
|
99383
|
-
}
|
|
99384
|
-
|
|
99385
|
-
handledCPCount = basicLength = output.length;
|
|
99386
|
-
|
|
99387
|
-
// `handledCPCount` is the number of code points that have been handled;
|
|
99388
|
-
// `basicLength` is the number of basic code points.
|
|
99389
|
-
|
|
99390
|
-
// Finish the basic string - if it is not empty - with a delimiter
|
|
99391
|
-
if (basicLength) {
|
|
99392
|
-
output.push(delimiter);
|
|
99393
|
-
}
|
|
99394
|
-
|
|
99395
|
-
// Main encoding loop:
|
|
99396
|
-
while (handledCPCount < inputLength) {
|
|
99397
|
-
|
|
99398
|
-
// All non-basic code points < n have been handled already. Find the next
|
|
99399
|
-
// larger one:
|
|
99400
|
-
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
|
99401
|
-
currentValue = input[j];
|
|
99402
|
-
if (currentValue >= n && currentValue < m) {
|
|
99403
|
-
m = currentValue;
|
|
99404
|
-
}
|
|
99405
|
-
}
|
|
99406
|
-
|
|
99407
|
-
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
|
99408
|
-
// but guard against overflow
|
|
99409
|
-
handledCPCountPlusOne = handledCPCount + 1;
|
|
99410
|
-
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
|
99411
|
-
error('overflow');
|
|
99412
|
-
}
|
|
99413
|
-
|
|
99414
|
-
delta += (m - n) * handledCPCountPlusOne;
|
|
99415
|
-
n = m;
|
|
99416
|
-
|
|
99417
|
-
for (j = 0; j < inputLength; ++j) {
|
|
99418
|
-
currentValue = input[j];
|
|
99419
|
-
|
|
99420
|
-
if (currentValue < n && ++delta > maxInt) {
|
|
99421
|
-
error('overflow');
|
|
99422
|
-
}
|
|
99423
|
-
|
|
99424
|
-
if (currentValue == n) {
|
|
99425
|
-
// Represent delta as a generalized variable-length integer
|
|
99426
|
-
for (q = delta, k = base; /* no condition */; k += base) {
|
|
99427
|
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
99428
|
-
if (q < t) {
|
|
99429
|
-
break;
|
|
99430
|
-
}
|
|
99431
|
-
qMinusT = q - t;
|
|
99432
|
-
baseMinusT = base - t;
|
|
99433
|
-
output.push(
|
|
99434
|
-
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
|
99435
|
-
);
|
|
99436
|
-
q = floor(qMinusT / baseMinusT);
|
|
99437
|
-
}
|
|
99438
|
-
|
|
99439
|
-
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
|
99440
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
99441
|
-
delta = 0;
|
|
99442
|
-
++handledCPCount;
|
|
99443
|
-
}
|
|
99444
|
-
}
|
|
99445
|
-
|
|
99446
|
-
++delta;
|
|
99447
|
-
++n;
|
|
99448
|
-
|
|
99449
|
-
}
|
|
99450
|
-
return output.join('');
|
|
99451
|
-
}
|
|
99452
|
-
|
|
99453
|
-
/**
|
|
99454
|
-
* Converts a Punycode string representing a domain name or an email address
|
|
99455
|
-
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
|
|
99456
|
-
* it doesn't matter if you call it on a string that has already been
|
|
99457
|
-
* converted to Unicode.
|
|
99458
|
-
* @memberOf punycode
|
|
99459
|
-
* @param {String} input The Punycoded domain name or email address to
|
|
99460
|
-
* convert to Unicode.
|
|
99461
|
-
* @returns {String} The Unicode representation of the given Punycode
|
|
99462
|
-
* string.
|
|
99463
|
-
*/
|
|
99464
|
-
function toUnicode(input) {
|
|
99465
|
-
return mapDomain(input, function(string) {
|
|
99466
|
-
return regexPunycode.test(string)
|
|
99467
|
-
? decode(string.slice(4).toLowerCase())
|
|
99468
|
-
: string;
|
|
99469
|
-
});
|
|
99470
|
-
}
|
|
99471
|
-
|
|
99472
|
-
/**
|
|
99473
|
-
* Converts a Unicode string representing a domain name or an email address to
|
|
99474
|
-
* Punycode. Only the non-ASCII parts of the domain name will be converted,
|
|
99475
|
-
* i.e. it doesn't matter if you call it with a domain that's already in
|
|
99476
|
-
* ASCII.
|
|
99477
|
-
* @memberOf punycode
|
|
99478
|
-
* @param {String} input The domain name or email address to convert, as a
|
|
99479
|
-
* Unicode string.
|
|
99480
|
-
* @returns {String} The Punycode representation of the given domain name or
|
|
99481
|
-
* email address.
|
|
99482
|
-
*/
|
|
99483
|
-
function toASCII(input) {
|
|
99484
|
-
return mapDomain(input, function(string) {
|
|
99485
|
-
return regexNonASCII.test(string)
|
|
99486
|
-
? 'xn--' + encode(string)
|
|
99487
|
-
: string;
|
|
99488
|
-
});
|
|
99489
|
-
}
|
|
99490
|
-
|
|
99491
|
-
/*--------------------------------------------------------------------------*/
|
|
99492
|
-
|
|
99493
|
-
/** Define the public API */
|
|
99494
|
-
punycode = {
|
|
99495
|
-
/**
|
|
99496
|
-
* A string representing the current Punycode.js version number.
|
|
99497
|
-
* @memberOf punycode
|
|
99498
|
-
* @type String
|
|
99499
|
-
*/
|
|
99500
|
-
'version': '1.4.1',
|
|
99501
|
-
/**
|
|
99502
|
-
* An object of methods to convert from JavaScript's internal character
|
|
99503
|
-
* representation (UCS-2) to Unicode code points, and back.
|
|
99504
|
-
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
99505
|
-
* @memberOf punycode
|
|
99506
|
-
* @type Object
|
|
99507
|
-
*/
|
|
99508
|
-
'ucs2': {
|
|
99509
|
-
'decode': ucs2decode,
|
|
99510
|
-
'encode': ucs2encode
|
|
99511
|
-
},
|
|
99512
|
-
'decode': decode,
|
|
99513
|
-
'encode': encode,
|
|
99514
|
-
'toASCII': toASCII,
|
|
99515
|
-
'toUnicode': toUnicode
|
|
99516
|
-
};
|
|
99517
|
-
|
|
99518
|
-
/** Expose `punycode` */
|
|
99519
|
-
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
|
99520
|
-
// like the following:
|
|
99521
|
-
if (
|
|
99522
|
-
true
|
|
99523
|
-
) {
|
|
99524
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
|
99525
|
-
return punycode;
|
|
99526
|
-
}).call(exports, __webpack_require__, exports, module),
|
|
99527
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
99528
|
-
} else // removed by dead control flow
|
|
99529
|
-
{}
|
|
99530
|
-
|
|
99531
|
-
}(this));
|
|
99532
|
-
|
|
99533
|
-
|
|
99534
|
-
/***/ }),
|
|
99535
|
-
|
|
99536
|
-
/***/ "./node_modules/url/url.js":
|
|
99537
|
-
/*!*********************************!*\
|
|
99538
|
-
!*** ./node_modules/url/url.js ***!
|
|
99539
|
-
\*********************************/
|
|
99540
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
99541
|
-
|
|
99542
|
-
"use strict";
|
|
99543
|
-
/*
|
|
99544
|
-
* Copyright Joyent, Inc. and other Node contributors.
|
|
99545
|
-
*
|
|
99546
|
-
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
99547
|
-
* copy of this software and associated documentation files (the
|
|
99548
|
-
* "Software"), to deal in the Software without restriction, including
|
|
99549
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
99550
|
-
* distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
99551
|
-
* persons to whom the Software is furnished to do so, subject to the
|
|
99552
|
-
* following conditions:
|
|
99553
|
-
*
|
|
99554
|
-
* The above copyright notice and this permission notice shall be included
|
|
99555
|
-
* in all copies or substantial portions of the Software.
|
|
99556
|
-
*
|
|
99557
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
99558
|
-
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
99559
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
99560
|
-
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
99561
|
-
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
99562
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
99563
|
-
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
99564
|
-
*/
|
|
99565
|
-
|
|
99566
|
-
|
|
99567
|
-
|
|
99568
|
-
var punycode = __webpack_require__(/*! punycode/ */ "./node_modules/url/node_modules/punycode/punycode.js");
|
|
99569
|
-
|
|
99570
|
-
function Url() {
|
|
99571
|
-
this.protocol = null;
|
|
99572
|
-
this.slashes = null;
|
|
99573
|
-
this.auth = null;
|
|
99574
|
-
this.host = null;
|
|
99575
|
-
this.port = null;
|
|
99576
|
-
this.hostname = null;
|
|
99577
|
-
this.hash = null;
|
|
99578
|
-
this.search = null;
|
|
99579
|
-
this.query = null;
|
|
99580
|
-
this.pathname = null;
|
|
99581
|
-
this.path = null;
|
|
99582
|
-
this.href = null;
|
|
99583
|
-
}
|
|
99584
|
-
|
|
99585
|
-
// Reference: RFC 3986, RFC 1808, RFC 2396
|
|
99586
|
-
|
|
99587
|
-
/*
|
|
99588
|
-
* define these here so at least they only have to be
|
|
99589
|
-
* compiled once on the first module load.
|
|
99590
|
-
*/
|
|
99591
|
-
var protocolPattern = /^([a-z0-9.+-]+:)/i,
|
|
99592
|
-
portPattern = /:[0-9]*$/,
|
|
99593
|
-
|
|
99594
|
-
// Special case for a simple path URL
|
|
99595
|
-
simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,
|
|
99596
|
-
|
|
99597
|
-
/*
|
|
99598
|
-
* RFC 2396: characters reserved for delimiting URLs.
|
|
99599
|
-
* We actually just auto-escape these.
|
|
99600
|
-
*/
|
|
99601
|
-
delims = [
|
|
99602
|
-
'<', '>', '"', '`', ' ', '\r', '\n', '\t'
|
|
99603
|
-
],
|
|
99604
|
-
|
|
99605
|
-
// RFC 2396: characters not allowed for various reasons.
|
|
99606
|
-
unwise = [
|
|
99607
|
-
'{', '}', '|', '\\', '^', '`'
|
|
99608
|
-
].concat(delims),
|
|
99609
|
-
|
|
99610
|
-
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
|
|
99611
|
-
autoEscape = ['\''].concat(unwise),
|
|
99612
|
-
/*
|
|
99613
|
-
* Characters that are never ever allowed in a hostname.
|
|
99614
|
-
* Note that any invalid chars are also handled, but these
|
|
99615
|
-
* are the ones that are *expected* to be seen, so we fast-path
|
|
99616
|
-
* them.
|
|
99617
|
-
*/
|
|
99618
|
-
nonHostChars = [
|
|
99619
|
-
'%', '/', '?', ';', '#'
|
|
99620
|
-
].concat(autoEscape),
|
|
99621
|
-
hostEndingChars = [
|
|
99622
|
-
'/', '?', '#'
|
|
99623
|
-
],
|
|
99624
|
-
hostnameMaxLen = 255,
|
|
99625
|
-
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
|
|
99626
|
-
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
|
|
99627
|
-
// protocols that can allow "unsafe" and "unwise" chars.
|
|
99628
|
-
unsafeProtocol = {
|
|
99629
|
-
javascript: true,
|
|
99630
|
-
'javascript:': true
|
|
99631
|
-
},
|
|
99632
|
-
// protocols that never have a hostname.
|
|
99633
|
-
hostlessProtocol = {
|
|
99634
|
-
javascript: true,
|
|
99635
|
-
'javascript:': true
|
|
99636
|
-
},
|
|
99637
|
-
// protocols that always contain a // bit.
|
|
99638
|
-
slashedProtocol = {
|
|
99639
|
-
http: true,
|
|
99640
|
-
https: true,
|
|
99641
|
-
ftp: true,
|
|
99642
|
-
gopher: true,
|
|
99643
|
-
file: true,
|
|
99644
|
-
'http:': true,
|
|
99645
|
-
'https:': true,
|
|
99646
|
-
'ftp:': true,
|
|
99647
|
-
'gopher:': true,
|
|
99648
|
-
'file:': true
|
|
99649
|
-
},
|
|
99650
|
-
querystring = __webpack_require__(/*! qs */ "./node_modules/qs/lib/index.js");
|
|
99651
|
-
|
|
99652
|
-
function urlParse(url, parseQueryString, slashesDenoteHost) {
|
|
99653
|
-
if (url && typeof url === 'object' && url instanceof Url) { return url; }
|
|
99654
|
-
|
|
99655
|
-
var u = new Url();
|
|
99656
|
-
u.parse(url, parseQueryString, slashesDenoteHost);
|
|
99657
|
-
return u;
|
|
99658
|
-
}
|
|
99659
|
-
|
|
99660
|
-
Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {
|
|
99661
|
-
if (typeof url !== 'string') {
|
|
99662
|
-
throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
|
|
99663
|
-
}
|
|
99664
|
-
|
|
99665
|
-
/*
|
|
99666
|
-
* Copy chrome, IE, opera backslash-handling behavior.
|
|
99667
|
-
* Back slashes before the query string get converted to forward slashes
|
|
99668
|
-
* See: https://code.google.com/p/chromium/issues/detail?id=25916
|
|
99669
|
-
*/
|
|
99670
|
-
var queryIndex = url.indexOf('?'),
|
|
99671
|
-
splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',
|
|
99672
|
-
uSplit = url.split(splitter),
|
|
99673
|
-
slashRegex = /\\/g;
|
|
99674
|
-
uSplit[0] = uSplit[0].replace(slashRegex, '/');
|
|
99675
|
-
url = uSplit.join(splitter);
|
|
99676
|
-
|
|
99677
|
-
var rest = url;
|
|
99678
|
-
|
|
99679
|
-
/*
|
|
99680
|
-
* trim before proceeding.
|
|
99681
|
-
* This is to support parse stuff like " http://foo.com \n"
|
|
99682
|
-
*/
|
|
99683
|
-
rest = rest.trim();
|
|
99684
|
-
|
|
99685
|
-
if (!slashesDenoteHost && url.split('#').length === 1) {
|
|
99686
|
-
// Try fast path regexp
|
|
99687
|
-
var simplePath = simplePathPattern.exec(rest);
|
|
99688
|
-
if (simplePath) {
|
|
99689
|
-
this.path = rest;
|
|
99690
|
-
this.href = rest;
|
|
99691
|
-
this.pathname = simplePath[1];
|
|
99692
|
-
if (simplePath[2]) {
|
|
99693
|
-
this.search = simplePath[2];
|
|
99694
|
-
if (parseQueryString) {
|
|
99695
|
-
this.query = querystring.parse(this.search.substr(1));
|
|
99696
|
-
} else {
|
|
99697
|
-
this.query = this.search.substr(1);
|
|
99698
|
-
}
|
|
99699
|
-
} else if (parseQueryString) {
|
|
99700
|
-
this.search = '';
|
|
99701
|
-
this.query = {};
|
|
99702
|
-
}
|
|
99703
|
-
return this;
|
|
99704
|
-
}
|
|
99705
|
-
}
|
|
99706
|
-
|
|
99707
|
-
var proto = protocolPattern.exec(rest);
|
|
99708
|
-
if (proto) {
|
|
99709
|
-
proto = proto[0];
|
|
99710
|
-
var lowerProto = proto.toLowerCase();
|
|
99711
|
-
this.protocol = lowerProto;
|
|
99712
|
-
rest = rest.substr(proto.length);
|
|
99713
|
-
}
|
|
99714
|
-
|
|
99715
|
-
/*
|
|
99716
|
-
* figure out if it's got a host
|
|
99717
|
-
* user@server is *always* interpreted as a hostname, and url
|
|
99718
|
-
* resolution will treat //foo/bar as host=foo,path=bar because that's
|
|
99719
|
-
* how the browser resolves relative URLs.
|
|
99720
|
-
*/
|
|
99721
|
-
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
99722
|
-
var slashes = rest.substr(0, 2) === '//';
|
|
99723
|
-
if (slashes && !(proto && hostlessProtocol[proto])) {
|
|
99724
|
-
rest = rest.substr(2);
|
|
99725
|
-
this.slashes = true;
|
|
99726
|
-
}
|
|
99727
|
-
}
|
|
99728
|
-
|
|
99729
|
-
if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) {
|
|
99730
|
-
|
|
99731
|
-
/*
|
|
99732
|
-
* there's a hostname.
|
|
99733
|
-
* the first instance of /, ?, ;, or # ends the host.
|
|
99734
|
-
*
|
|
99735
|
-
* If there is an @ in the hostname, then non-host chars *are* allowed
|
|
99736
|
-
* to the left of the last @ sign, unless some host-ending character
|
|
99737
|
-
* comes *before* the @-sign.
|
|
99738
|
-
* URLs are obnoxious.
|
|
99739
|
-
*
|
|
99740
|
-
* ex:
|
|
99741
|
-
* http://a@b@c/ => user:a@b host:c
|
|
99742
|
-
* http://a@b?@c => user:a host:c path:/?@c
|
|
99743
|
-
*/
|
|
99744
|
-
|
|
99745
|
-
/*
|
|
99746
|
-
* v0.12 TODO(isaacs): This is not quite how Chrome does things.
|
|
99747
|
-
* Review our test case against browsers more comprehensively.
|
|
99748
|
-
*/
|
|
99749
|
-
|
|
99750
|
-
// find the first instance of any hostEndingChars
|
|
99751
|
-
var hostEnd = -1;
|
|
99752
|
-
for (var i = 0; i < hostEndingChars.length; i++) {
|
|
99753
|
-
var hec = rest.indexOf(hostEndingChars[i]);
|
|
99754
|
-
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }
|
|
99755
|
-
}
|
|
99756
|
-
|
|
99757
|
-
/*
|
|
99758
|
-
* at this point, either we have an explicit point where the
|
|
99759
|
-
* auth portion cannot go past, or the last @ char is the decider.
|
|
99760
|
-
*/
|
|
99761
|
-
var auth, atSign;
|
|
99762
|
-
if (hostEnd === -1) {
|
|
99763
|
-
// atSign can be anywhere.
|
|
99764
|
-
atSign = rest.lastIndexOf('@');
|
|
99765
|
-
} else {
|
|
99766
|
-
/*
|
|
99767
|
-
* atSign must be in auth portion.
|
|
99768
|
-
* http://a@b/c@d => host:b auth:a path:/c@d
|
|
99769
|
-
*/
|
|
99770
|
-
atSign = rest.lastIndexOf('@', hostEnd);
|
|
99771
|
-
}
|
|
99772
|
-
|
|
99773
|
-
/*
|
|
99774
|
-
* Now we have a portion which is definitely the auth.
|
|
99775
|
-
* Pull that off.
|
|
99776
|
-
*/
|
|
99777
|
-
if (atSign !== -1) {
|
|
99778
|
-
auth = rest.slice(0, atSign);
|
|
99779
|
-
rest = rest.slice(atSign + 1);
|
|
99780
|
-
this.auth = decodeURIComponent(auth);
|
|
99781
|
-
}
|
|
99782
|
-
|
|
99783
|
-
// the host is the remaining to the left of the first non-host char
|
|
99784
|
-
hostEnd = -1;
|
|
99785
|
-
for (var i = 0; i < nonHostChars.length; i++) {
|
|
99786
|
-
var hec = rest.indexOf(nonHostChars[i]);
|
|
99787
|
-
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }
|
|
99788
|
-
}
|
|
99789
|
-
// if we still have not hit it, then the entire thing is a host.
|
|
99790
|
-
if (hostEnd === -1) { hostEnd = rest.length; }
|
|
99791
|
-
|
|
99792
|
-
this.host = rest.slice(0, hostEnd);
|
|
99793
|
-
rest = rest.slice(hostEnd);
|
|
99794
|
-
|
|
99795
|
-
// pull out port.
|
|
99796
|
-
this.parseHost();
|
|
99797
|
-
|
|
99798
|
-
/*
|
|
99799
|
-
* we've indicated that there is a hostname,
|
|
99800
|
-
* so even if it's empty, it has to be present.
|
|
99801
|
-
*/
|
|
99802
|
-
this.hostname = this.hostname || '';
|
|
99803
|
-
|
|
99804
|
-
/*
|
|
99805
|
-
* if hostname begins with [ and ends with ]
|
|
99806
|
-
* assume that it's an IPv6 address.
|
|
99807
|
-
*/
|
|
99808
|
-
var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';
|
|
99809
|
-
|
|
99810
|
-
// validate a little.
|
|
99811
|
-
if (!ipv6Hostname) {
|
|
99812
|
-
var hostparts = this.hostname.split(/\./);
|
|
99813
|
-
for (var i = 0, l = hostparts.length; i < l; i++) {
|
|
99814
|
-
var part = hostparts[i];
|
|
99815
|
-
if (!part) { continue; }
|
|
99816
|
-
if (!part.match(hostnamePartPattern)) {
|
|
99817
|
-
var newpart = '';
|
|
99818
|
-
for (var j = 0, k = part.length; j < k; j++) {
|
|
99819
|
-
if (part.charCodeAt(j) > 127) {
|
|
99820
|
-
/*
|
|
99821
|
-
* we replace non-ASCII char with a temporary placeholder
|
|
99822
|
-
* we need this to make sure size of hostname is not
|
|
99823
|
-
* broken by replacing non-ASCII by nothing
|
|
99824
|
-
*/
|
|
99825
|
-
newpart += 'x';
|
|
99826
|
-
} else {
|
|
99827
|
-
newpart += part[j];
|
|
99828
|
-
}
|
|
99829
|
-
}
|
|
99830
|
-
// we test again with ASCII char only
|
|
99831
|
-
if (!newpart.match(hostnamePartPattern)) {
|
|
99832
|
-
var validParts = hostparts.slice(0, i);
|
|
99833
|
-
var notHost = hostparts.slice(i + 1);
|
|
99834
|
-
var bit = part.match(hostnamePartStart);
|
|
99835
|
-
if (bit) {
|
|
99836
|
-
validParts.push(bit[1]);
|
|
99837
|
-
notHost.unshift(bit[2]);
|
|
99838
|
-
}
|
|
99839
|
-
if (notHost.length) {
|
|
99840
|
-
rest = '/' + notHost.join('.') + rest;
|
|
99841
|
-
}
|
|
99842
|
-
this.hostname = validParts.join('.');
|
|
99843
|
-
break;
|
|
99844
|
-
}
|
|
99845
|
-
}
|
|
99846
|
-
}
|
|
99847
|
-
}
|
|
99848
|
-
|
|
99849
|
-
if (this.hostname.length > hostnameMaxLen) {
|
|
99850
|
-
this.hostname = '';
|
|
99851
|
-
} else {
|
|
99852
|
-
// hostnames are always lower case.
|
|
99853
|
-
this.hostname = this.hostname.toLowerCase();
|
|
99854
|
-
}
|
|
99855
|
-
|
|
99856
|
-
if (!ipv6Hostname) {
|
|
99857
|
-
/*
|
|
99858
|
-
* IDNA Support: Returns a punycoded representation of "domain".
|
|
99859
|
-
* It only converts parts of the domain name that
|
|
99860
|
-
* have non-ASCII characters, i.e. it doesn't matter if
|
|
99861
|
-
* you call it with a domain that already is ASCII-only.
|
|
99862
|
-
*/
|
|
99863
|
-
this.hostname = punycode.toASCII(this.hostname);
|
|
99864
|
-
}
|
|
99865
|
-
|
|
99866
|
-
var p = this.port ? ':' + this.port : '';
|
|
99867
|
-
var h = this.hostname || '';
|
|
99868
|
-
this.host = h + p;
|
|
99869
|
-
this.href += this.host;
|
|
99870
|
-
|
|
99871
|
-
/*
|
|
99872
|
-
* strip [ and ] from the hostname
|
|
99873
|
-
* the host field still retains them, though
|
|
99874
|
-
*/
|
|
99875
|
-
if (ipv6Hostname) {
|
|
99876
|
-
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
|
|
99877
|
-
if (rest[0] !== '/') {
|
|
99878
|
-
rest = '/' + rest;
|
|
99879
|
-
}
|
|
99880
|
-
}
|
|
99881
|
-
}
|
|
99882
|
-
|
|
99883
|
-
/*
|
|
99884
|
-
* now rest is set to the post-host stuff.
|
|
99885
|
-
* chop off any delim chars.
|
|
99886
|
-
*/
|
|
99887
|
-
if (!unsafeProtocol[lowerProto]) {
|
|
99888
|
-
|
|
99889
|
-
/*
|
|
99890
|
-
* First, make 100% sure that any "autoEscape" chars get
|
|
99891
|
-
* escaped, even if encodeURIComponent doesn't think they
|
|
99892
|
-
* need to be.
|
|
99893
|
-
*/
|
|
99894
|
-
for (var i = 0, l = autoEscape.length; i < l; i++) {
|
|
99895
|
-
var ae = autoEscape[i];
|
|
99896
|
-
if (rest.indexOf(ae) === -1) { continue; }
|
|
99897
|
-
var esc = encodeURIComponent(ae);
|
|
99898
|
-
if (esc === ae) {
|
|
99899
|
-
esc = escape(ae);
|
|
99900
|
-
}
|
|
99901
|
-
rest = rest.split(ae).join(esc);
|
|
99902
|
-
}
|
|
99903
|
-
}
|
|
99904
|
-
|
|
99905
|
-
// chop off from the tail first.
|
|
99906
|
-
var hash = rest.indexOf('#');
|
|
99907
|
-
if (hash !== -1) {
|
|
99908
|
-
// got a fragment string.
|
|
99909
|
-
this.hash = rest.substr(hash);
|
|
99910
|
-
rest = rest.slice(0, hash);
|
|
99911
|
-
}
|
|
99912
|
-
var qm = rest.indexOf('?');
|
|
99913
|
-
if (qm !== -1) {
|
|
99914
|
-
this.search = rest.substr(qm);
|
|
99915
|
-
this.query = rest.substr(qm + 1);
|
|
99916
|
-
if (parseQueryString) {
|
|
99917
|
-
this.query = querystring.parse(this.query);
|
|
99918
|
-
}
|
|
99919
|
-
rest = rest.slice(0, qm);
|
|
99920
|
-
} else if (parseQueryString) {
|
|
99921
|
-
// no query string, but parseQueryString still requested
|
|
99922
|
-
this.search = '';
|
|
99923
|
-
this.query = {};
|
|
99924
|
-
}
|
|
99925
|
-
if (rest) { this.pathname = rest; }
|
|
99926
|
-
if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
|
|
99927
|
-
this.pathname = '/';
|
|
99928
|
-
}
|
|
99929
|
-
|
|
99930
|
-
// to support http.request
|
|
99931
|
-
if (this.pathname || this.search) {
|
|
99932
|
-
var p = this.pathname || '';
|
|
99933
|
-
var s = this.search || '';
|
|
99934
|
-
this.path = p + s;
|
|
99935
|
-
}
|
|
99936
|
-
|
|
99937
|
-
// finally, reconstruct the href based on what has been validated.
|
|
99938
|
-
this.href = this.format();
|
|
99939
|
-
return this;
|
|
99940
|
-
};
|
|
99941
|
-
|
|
99942
|
-
// format a parsed object into a url string
|
|
99943
|
-
function urlFormat(obj) {
|
|
99944
|
-
/*
|
|
99945
|
-
* ensure it's an object, and not a string url.
|
|
99946
|
-
* If it's an obj, this is a no-op.
|
|
99947
|
-
* this way, you can call url_format() on strings
|
|
99948
|
-
* to clean up potentially wonky urls.
|
|
99949
|
-
*/
|
|
99950
|
-
if (typeof obj === 'string') { obj = urlParse(obj); }
|
|
99951
|
-
if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }
|
|
99952
|
-
return obj.format();
|
|
99953
|
-
}
|
|
99954
|
-
|
|
99955
|
-
Url.prototype.format = function () {
|
|
99956
|
-
var auth = this.auth || '';
|
|
99957
|
-
if (auth) {
|
|
99958
|
-
auth = encodeURIComponent(auth);
|
|
99959
|
-
auth = auth.replace(/%3A/i, ':');
|
|
99960
|
-
auth += '@';
|
|
99961
|
-
}
|
|
99962
|
-
|
|
99963
|
-
var protocol = this.protocol || '',
|
|
99964
|
-
pathname = this.pathname || '',
|
|
99965
|
-
hash = this.hash || '',
|
|
99966
|
-
host = false,
|
|
99967
|
-
query = '';
|
|
99968
|
-
|
|
99969
|
-
if (this.host) {
|
|
99970
|
-
host = auth + this.host;
|
|
99971
|
-
} else if (this.hostname) {
|
|
99972
|
-
host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');
|
|
99973
|
-
if (this.port) {
|
|
99974
|
-
host += ':' + this.port;
|
|
99975
|
-
}
|
|
99976
|
-
}
|
|
99977
|
-
|
|
99978
|
-
if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {
|
|
99979
|
-
query = querystring.stringify(this.query, {
|
|
99980
|
-
arrayFormat: 'repeat',
|
|
99981
|
-
addQueryPrefix: false
|
|
99982
|
-
});
|
|
99983
|
-
}
|
|
99984
|
-
|
|
99985
|
-
var search = this.search || (query && ('?' + query)) || '';
|
|
99986
|
-
|
|
99987
|
-
if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }
|
|
99988
|
-
|
|
99989
|
-
/*
|
|
99990
|
-
* only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
|
|
99991
|
-
* unless they had them to begin with.
|
|
99992
|
-
*/
|
|
99993
|
-
if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {
|
|
99994
|
-
host = '//' + (host || '');
|
|
99995
|
-
if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }
|
|
99996
|
-
} else if (!host) {
|
|
99997
|
-
host = '';
|
|
99998
|
-
}
|
|
99999
|
-
|
|
100000
|
-
if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }
|
|
100001
|
-
if (search && search.charAt(0) !== '?') { search = '?' + search; }
|
|
100002
|
-
|
|
100003
|
-
pathname = pathname.replace(/[?#]/g, function (match) {
|
|
100004
|
-
return encodeURIComponent(match);
|
|
100005
|
-
});
|
|
100006
|
-
search = search.replace('#', '%23');
|
|
100007
|
-
|
|
100008
|
-
return protocol + host + pathname + search + hash;
|
|
100009
|
-
};
|
|
100010
|
-
|
|
100011
|
-
function urlResolve(source, relative) {
|
|
100012
|
-
return urlParse(source, false, true).resolve(relative);
|
|
100013
|
-
}
|
|
100014
|
-
|
|
100015
|
-
Url.prototype.resolve = function (relative) {
|
|
100016
|
-
return this.resolveObject(urlParse(relative, false, true)).format();
|
|
100017
|
-
};
|
|
100018
|
-
|
|
100019
|
-
function urlResolveObject(source, relative) {
|
|
100020
|
-
if (!source) { return relative; }
|
|
100021
|
-
return urlParse(source, false, true).resolveObject(relative);
|
|
100022
|
-
}
|
|
100023
|
-
|
|
100024
|
-
Url.prototype.resolveObject = function (relative) {
|
|
100025
|
-
if (typeof relative === 'string') {
|
|
100026
|
-
var rel = new Url();
|
|
100027
|
-
rel.parse(relative, false, true);
|
|
100028
|
-
relative = rel;
|
|
100029
|
-
}
|
|
100030
|
-
|
|
100031
|
-
var result = new Url();
|
|
100032
|
-
var tkeys = Object.keys(this);
|
|
100033
|
-
for (var tk = 0; tk < tkeys.length; tk++) {
|
|
100034
|
-
var tkey = tkeys[tk];
|
|
100035
|
-
result[tkey] = this[tkey];
|
|
100036
|
-
}
|
|
100037
|
-
|
|
100038
|
-
/*
|
|
100039
|
-
* hash is always overridden, no matter what.
|
|
100040
|
-
* even href="" will remove it.
|
|
100041
|
-
*/
|
|
100042
|
-
result.hash = relative.hash;
|
|
100043
|
-
|
|
100044
|
-
// if the relative url is empty, then there's nothing left to do here.
|
|
100045
|
-
if (relative.href === '') {
|
|
100046
|
-
result.href = result.format();
|
|
100047
|
-
return result;
|
|
100048
|
-
}
|
|
100049
|
-
|
|
100050
|
-
// hrefs like //foo/bar always cut to the protocol.
|
|
100051
|
-
if (relative.slashes && !relative.protocol) {
|
|
100052
|
-
// take everything except the protocol from relative
|
|
100053
|
-
var rkeys = Object.keys(relative);
|
|
100054
|
-
for (var rk = 0; rk < rkeys.length; rk++) {
|
|
100055
|
-
var rkey = rkeys[rk];
|
|
100056
|
-
if (rkey !== 'protocol') { result[rkey] = relative[rkey]; }
|
|
100057
|
-
}
|
|
100058
|
-
|
|
100059
|
-
// urlParse appends trailing / to urls like http://www.example.com
|
|
100060
|
-
if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {
|
|
100061
|
-
result.pathname = '/';
|
|
100062
|
-
result.path = result.pathname;
|
|
100063
|
-
}
|
|
100064
|
-
|
|
100065
|
-
result.href = result.format();
|
|
100066
|
-
return result;
|
|
100067
|
-
}
|
|
100068
|
-
|
|
100069
|
-
if (relative.protocol && relative.protocol !== result.protocol) {
|
|
100070
|
-
/*
|
|
100071
|
-
* if it's a known url protocol, then changing
|
|
100072
|
-
* the protocol does weird things
|
|
100073
|
-
* first, if it's not file:, then we MUST have a host,
|
|
100074
|
-
* and if there was a path
|
|
100075
|
-
* to begin with, then we MUST have a path.
|
|
100076
|
-
* if it is file:, then the host is dropped,
|
|
100077
|
-
* because that's known to be hostless.
|
|
100078
|
-
* anything else is assumed to be absolute.
|
|
100079
|
-
*/
|
|
100080
|
-
if (!slashedProtocol[relative.protocol]) {
|
|
100081
|
-
var keys = Object.keys(relative);
|
|
100082
|
-
for (var v = 0; v < keys.length; v++) {
|
|
100083
|
-
var k = keys[v];
|
|
100084
|
-
result[k] = relative[k];
|
|
100085
|
-
}
|
|
100086
|
-
result.href = result.format();
|
|
100087
|
-
return result;
|
|
100088
|
-
}
|
|
100089
|
-
|
|
100090
|
-
result.protocol = relative.protocol;
|
|
100091
|
-
if (!relative.host && !hostlessProtocol[relative.protocol]) {
|
|
100092
|
-
var relPath = (relative.pathname || '').split('/');
|
|
100093
|
-
while (relPath.length && !(relative.host = relPath.shift())) { }
|
|
100094
|
-
if (!relative.host) { relative.host = ''; }
|
|
100095
|
-
if (!relative.hostname) { relative.hostname = ''; }
|
|
100096
|
-
if (relPath[0] !== '') { relPath.unshift(''); }
|
|
100097
|
-
if (relPath.length < 2) { relPath.unshift(''); }
|
|
100098
|
-
result.pathname = relPath.join('/');
|
|
100099
|
-
} else {
|
|
100100
|
-
result.pathname = relative.pathname;
|
|
100101
|
-
}
|
|
100102
|
-
result.search = relative.search;
|
|
100103
|
-
result.query = relative.query;
|
|
100104
|
-
result.host = relative.host || '';
|
|
100105
|
-
result.auth = relative.auth;
|
|
100106
|
-
result.hostname = relative.hostname || relative.host;
|
|
100107
|
-
result.port = relative.port;
|
|
100108
|
-
// to support http.request
|
|
100109
|
-
if (result.pathname || result.search) {
|
|
100110
|
-
var p = result.pathname || '';
|
|
100111
|
-
var s = result.search || '';
|
|
100112
|
-
result.path = p + s;
|
|
100113
|
-
}
|
|
100114
|
-
result.slashes = result.slashes || relative.slashes;
|
|
100115
|
-
result.href = result.format();
|
|
100116
|
-
return result;
|
|
100117
|
-
}
|
|
100118
|
-
|
|
100119
|
-
var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',
|
|
100120
|
-
isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',
|
|
100121
|
-
mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname),
|
|
100122
|
-
removeAllDots = mustEndAbs,
|
|
100123
|
-
srcPath = result.pathname && result.pathname.split('/') || [],
|
|
100124
|
-
relPath = relative.pathname && relative.pathname.split('/') || [],
|
|
100125
|
-
psychotic = result.protocol && !slashedProtocol[result.protocol];
|
|
100126
|
-
|
|
100127
|
-
/*
|
|
100128
|
-
* if the url is a non-slashed url, then relative
|
|
100129
|
-
* links like ../.. should be able
|
|
100130
|
-
* to crawl up to the hostname, as well. This is strange.
|
|
100131
|
-
* result.protocol has already been set by now.
|
|
100132
|
-
* Later on, put the first path part into the host field.
|
|
100133
|
-
*/
|
|
100134
|
-
if (psychotic) {
|
|
100135
|
-
result.hostname = '';
|
|
100136
|
-
result.port = null;
|
|
100137
|
-
if (result.host) {
|
|
100138
|
-
if (srcPath[0] === '') { srcPath[0] = result.host; } else { srcPath.unshift(result.host); }
|
|
100139
|
-
}
|
|
100140
|
-
result.host = '';
|
|
100141
|
-
if (relative.protocol) {
|
|
100142
|
-
relative.hostname = null;
|
|
100143
|
-
relative.port = null;
|
|
100144
|
-
if (relative.host) {
|
|
100145
|
-
if (relPath[0] === '') { relPath[0] = relative.host; } else { relPath.unshift(relative.host); }
|
|
100146
|
-
}
|
|
100147
|
-
relative.host = null;
|
|
100148
|
-
}
|
|
100149
|
-
mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
|
|
100150
|
-
}
|
|
100151
|
-
|
|
100152
|
-
if (isRelAbs) {
|
|
100153
|
-
// it's absolute.
|
|
100154
|
-
result.host = relative.host || relative.host === '' ? relative.host : result.host;
|
|
100155
|
-
result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;
|
|
100156
|
-
result.search = relative.search;
|
|
100157
|
-
result.query = relative.query;
|
|
100158
|
-
srcPath = relPath;
|
|
100159
|
-
// fall through to the dot-handling below.
|
|
100160
|
-
} else if (relPath.length) {
|
|
100161
|
-
/*
|
|
100162
|
-
* it's relative
|
|
100163
|
-
* throw away the existing file, and take the new path instead.
|
|
100164
|
-
*/
|
|
100165
|
-
if (!srcPath) { srcPath = []; }
|
|
100166
|
-
srcPath.pop();
|
|
100167
|
-
srcPath = srcPath.concat(relPath);
|
|
100168
|
-
result.search = relative.search;
|
|
100169
|
-
result.query = relative.query;
|
|
100170
|
-
} else if (relative.search != null) {
|
|
100171
|
-
/*
|
|
100172
|
-
* just pull out the search.
|
|
100173
|
-
* like href='?foo'.
|
|
100174
|
-
* Put this after the other two cases because it simplifies the booleans
|
|
100175
|
-
*/
|
|
100176
|
-
if (psychotic) {
|
|
100177
|
-
result.host = srcPath.shift();
|
|
100178
|
-
result.hostname = result.host;
|
|
100179
|
-
/*
|
|
100180
|
-
* occationaly the auth can get stuck only in host
|
|
100181
|
-
* this especially happens in cases like
|
|
100182
|
-
* url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
|
100183
|
-
*/
|
|
100184
|
-
var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;
|
|
100185
|
-
if (authInHost) {
|
|
100186
|
-
result.auth = authInHost.shift();
|
|
100187
|
-
result.hostname = authInHost.shift();
|
|
100188
|
-
result.host = result.hostname;
|
|
100189
|
-
}
|
|
100190
|
-
}
|
|
100191
|
-
result.search = relative.search;
|
|
100192
|
-
result.query = relative.query;
|
|
100193
|
-
// to support http.request
|
|
100194
|
-
if (result.pathname !== null || result.search !== null) {
|
|
100195
|
-
result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');
|
|
100196
|
-
}
|
|
100197
|
-
result.href = result.format();
|
|
100198
|
-
return result;
|
|
100199
|
-
}
|
|
100200
|
-
|
|
100201
|
-
if (!srcPath.length) {
|
|
100202
|
-
/*
|
|
100203
|
-
* no path at all. easy.
|
|
100204
|
-
* we've already handled the other stuff above.
|
|
100205
|
-
*/
|
|
100206
|
-
result.pathname = null;
|
|
100207
|
-
// to support http.request
|
|
100208
|
-
if (result.search) {
|
|
100209
|
-
result.path = '/' + result.search;
|
|
100210
|
-
} else {
|
|
100211
|
-
result.path = null;
|
|
100212
|
-
}
|
|
100213
|
-
result.href = result.format();
|
|
100214
|
-
return result;
|
|
100215
|
-
}
|
|
100216
|
-
|
|
100217
|
-
/*
|
|
100218
|
-
* if a url ENDs in . or .., then it must get a trailing slash.
|
|
100219
|
-
* however, if it ends in anything else non-slashy,
|
|
100220
|
-
* then it must NOT get a trailing slash.
|
|
100221
|
-
*/
|
|
100222
|
-
var last = srcPath.slice(-1)[0];
|
|
100223
|
-
var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';
|
|
100224
|
-
|
|
100225
|
-
/*
|
|
100226
|
-
* strip single dots, resolve double dots to parent dir
|
|
100227
|
-
* if the path tries to go above the root, `up` ends up > 0
|
|
100228
|
-
*/
|
|
100229
|
-
var up = 0;
|
|
100230
|
-
for (var i = srcPath.length; i >= 0; i--) {
|
|
100231
|
-
last = srcPath[i];
|
|
100232
|
-
if (last === '.') {
|
|
100233
|
-
srcPath.splice(i, 1);
|
|
100234
|
-
} else if (last === '..') {
|
|
100235
|
-
srcPath.splice(i, 1);
|
|
100236
|
-
up++;
|
|
100237
|
-
} else if (up) {
|
|
100238
|
-
srcPath.splice(i, 1);
|
|
100239
|
-
up--;
|
|
100240
|
-
}
|
|
100241
|
-
}
|
|
100242
|
-
|
|
100243
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
100244
|
-
if (!mustEndAbs && !removeAllDots) {
|
|
100245
|
-
for (; up--; up) {
|
|
100246
|
-
srcPath.unshift('..');
|
|
100247
|
-
}
|
|
100248
|
-
}
|
|
100249
|
-
|
|
100250
|
-
if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
|
|
100251
|
-
srcPath.unshift('');
|
|
100252
|
-
}
|
|
100253
|
-
|
|
100254
|
-
if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
|
|
100255
|
-
srcPath.push('');
|
|
100256
|
-
}
|
|
100257
|
-
|
|
100258
|
-
var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');
|
|
100259
|
-
|
|
100260
|
-
// put the host back
|
|
100261
|
-
if (psychotic) {
|
|
100262
|
-
result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';
|
|
100263
|
-
result.host = result.hostname;
|
|
100264
|
-
/*
|
|
100265
|
-
* occationaly the auth can get stuck only in host
|
|
100266
|
-
* this especially happens in cases like
|
|
100267
|
-
* url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
|
100268
|
-
*/
|
|
100269
|
-
var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;
|
|
100270
|
-
if (authInHost) {
|
|
100271
|
-
result.auth = authInHost.shift();
|
|
100272
|
-
result.hostname = authInHost.shift();
|
|
100273
|
-
result.host = result.hostname;
|
|
100274
|
-
}
|
|
100275
|
-
}
|
|
100276
|
-
|
|
100277
|
-
mustEndAbs = mustEndAbs || (result.host && srcPath.length);
|
|
100278
|
-
|
|
100279
|
-
if (mustEndAbs && !isAbsolute) {
|
|
100280
|
-
srcPath.unshift('');
|
|
100281
|
-
}
|
|
100282
|
-
|
|
100283
|
-
if (srcPath.length > 0) {
|
|
100284
|
-
result.pathname = srcPath.join('/');
|
|
100285
|
-
} else {
|
|
100286
|
-
result.pathname = null;
|
|
100287
|
-
result.path = null;
|
|
100288
|
-
}
|
|
100289
|
-
|
|
100290
|
-
// to support request.http
|
|
100291
|
-
if (result.pathname !== null || result.search !== null) {
|
|
100292
|
-
result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');
|
|
100293
|
-
}
|
|
100294
|
-
result.auth = relative.auth || result.auth;
|
|
100295
|
-
result.slashes = result.slashes || relative.slashes;
|
|
100296
|
-
result.href = result.format();
|
|
100297
|
-
return result;
|
|
100298
|
-
};
|
|
100299
|
-
|
|
100300
|
-
Url.prototype.parseHost = function () {
|
|
100301
|
-
var host = this.host;
|
|
100302
|
-
var port = portPattern.exec(host);
|
|
100303
|
-
if (port) {
|
|
100304
|
-
port = port[0];
|
|
100305
|
-
if (port !== ':') {
|
|
100306
|
-
this.port = port.substr(1);
|
|
100307
|
-
}
|
|
100308
|
-
host = host.substr(0, host.length - port.length);
|
|
100309
|
-
}
|
|
100310
|
-
if (host) { this.hostname = host; }
|
|
100311
|
-
};
|
|
100312
|
-
|
|
100313
|
-
exports.parse = urlParse;
|
|
100314
|
-
exports.resolve = urlResolve;
|
|
100315
|
-
exports.resolveObject = urlResolveObject;
|
|
100316
|
-
exports.format = urlFormat;
|
|
100317
|
-
|
|
100318
|
-
exports.Url = Url;
|
|
100319
|
-
|
|
100320
|
-
|
|
100321
97244
|
/***/ }),
|
|
100322
97245
|
|
|
100323
97246
|
/***/ "./node_modules/util-deprecate/browser.js":
|
|
@@ -103118,16 +100041,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
103118
100041
|
};
|
|
103119
100042
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
103120
100043
|
exports.createGun = exports.restrictedPut = exports.derive = exports.GunErrors = exports.crypto = exports.GunRxJS = exports.SEA = exports.GunInstance = exports.Gun = void 0;
|
|
100044
|
+
// Import Gun - will be bundled internally
|
|
103121
100045
|
const gun_1 = __importDefault(__webpack_require__(/*! gun/gun */ "./node_modules/gun/gun.js"));
|
|
103122
100046
|
const Gun = gun_1.default;
|
|
103123
100047
|
exports.Gun = Gun;
|
|
103124
100048
|
const sea_1 = __importDefault(__webpack_require__(/*! gun/sea */ "./node_modules/gun/sea.js"));
|
|
103125
100049
|
exports.SEA = sea_1.default;
|
|
100050
|
+
__webpack_require__(/*! gun/lib/then.js */ "./node_modules/gun/lib/then.js");
|
|
103126
100051
|
__webpack_require__(/*! gun/lib/radix.js */ "./node_modules/gun/lib/radix.js");
|
|
103127
100052
|
__webpack_require__(/*! gun/lib/radisk.js */ "./node_modules/gun/lib/radisk.js");
|
|
103128
|
-
__webpack_require__(/*! gun/lib/rindexed.js */ "./node_modules/gun/lib/rindexed.js");
|
|
103129
100053
|
__webpack_require__(/*! gun/lib/store.js */ "./node_modules/gun/lib/store.js");
|
|
103130
|
-
__webpack_require__(/*! gun/lib/
|
|
100054
|
+
__webpack_require__(/*! gun/lib/rindexed.js */ "./node_modules/gun/lib/rindexed.js");
|
|
100055
|
+
__webpack_require__(/*! gun/lib/rfs.js */ "./node_modules/gun/lib/rfs.js");
|
|
100056
|
+
__webpack_require__(/*! gun/lib/rs3.js */ "./node_modules/gun/lib/rs3.js");
|
|
103131
100057
|
__webpack_require__(/*! gun/lib/webrtc.js */ "./node_modules/gun/lib/webrtc.js");
|
|
103132
100058
|
__webpack_require__(/*! gun/lib/yson.js */ "./node_modules/gun/lib/yson.js");
|
|
103133
100059
|
const restricted_put_1 = __webpack_require__(/*! ./restricted-put */ "./src/gundb/restricted-put.ts");
|
|
@@ -103203,11 +100129,9 @@ class GunInstance {
|
|
|
103203
100129
|
this.node = this.gun.get(appScope);
|
|
103204
100130
|
if (sessionResult.success) {
|
|
103205
100131
|
// Session automatically restored
|
|
103206
|
-
console.log("Session automatically restored");
|
|
103207
100132
|
}
|
|
103208
100133
|
else {
|
|
103209
100134
|
// No previous session to restore
|
|
103210
|
-
console.log("No previous session to restore");
|
|
103211
100135
|
}
|
|
103212
100136
|
}
|
|
103213
100137
|
catch (error) {
|
|
@@ -105290,6 +102214,10 @@ async function loadGunModules() {
|
|
|
105290
102214
|
const gunModule = await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/gun */ "./node_modules/gun/gun.js")));
|
|
105291
102215
|
Gun = gunModule.default || gunModule;
|
|
105292
102216
|
await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/lib/yson */ "./node_modules/gun/lib/yson.js")));
|
|
102217
|
+
await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/lib/webrtc */ "./node_modules/gun/lib/webrtc.js")));
|
|
102218
|
+
await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/lib/radisk */ "./node_modules/gun/lib/radisk.js")));
|
|
102219
|
+
await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/lib/radix */ "./node_modules/gun/lib/radix.js")));
|
|
102220
|
+
await Promise.resolve().then(() => __importStar(__webpack_require__(/*! gun/lib/rindexed */ "./node_modules/gun/lib/rindexed.js")));
|
|
105293
102221
|
gunModulesLoaded = true;
|
|
105294
102222
|
return;
|
|
105295
102223
|
}
|
|
@@ -105311,13 +102239,12 @@ async function loadGunModules() {
|
|
|
105311
102239
|
"gun/lib/yson",
|
|
105312
102240
|
"gun/lib/serve",
|
|
105313
102241
|
"gun/lib/store",
|
|
102242
|
+
"gun/lib/radix",
|
|
102243
|
+
"gun/lib/radisk",
|
|
105314
102244
|
"gun/lib/rfs",
|
|
105315
102245
|
"gun/lib/rs3",
|
|
105316
|
-
"gun/lib/wire",
|
|
105317
102246
|
"gun/lib/multicast",
|
|
105318
102247
|
"gun/lib/stats",
|
|
105319
|
-
"gun/lib/radix",
|
|
105320
|
-
"gun/lib/radisk",
|
|
105321
102248
|
"gun/lib/webrtc",
|
|
105322
102249
|
];
|
|
105323
102250
|
for (const lib of nodeOnlyLibs) {
|
|
@@ -111607,16 +108534,6 @@ function generateDeterministicPassword(salt) {
|
|
|
111607
108534
|
|
|
111608
108535
|
/***/ }),
|
|
111609
108536
|
|
|
111610
|
-
/***/ "?4f7e":
|
|
111611
|
-
/*!********************************!*\
|
|
111612
|
-
!*** ./util.inspect (ignored) ***!
|
|
111613
|
-
\********************************/
|
|
111614
|
-
/***/ (() => {
|
|
111615
|
-
|
|
111616
|
-
/* (ignored) */
|
|
111617
|
-
|
|
111618
|
-
/***/ }),
|
|
111619
|
-
|
|
111620
108537
|
/***/ "?593c":
|
|
111621
108538
|
/*!**********************!*\
|
|
111622
108539
|
!*** util (ignored) ***!
|