sample-piral 1.6.2-beta.7367 → 1.6.2-beta.7393
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.
- package/app/{index.e226c4.js → index.75188b.js} +547 -445
- package/app/index.75188b.js.map +1 -0
- package/app/index.html +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +8 -8
- package/app/index.e226c4.js.map +0 -1
|
@@ -3535,11 +3535,113 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3535
3535
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3536
3536
|
/* harmony export */ createRouteMatcher: () => (/* binding */ createRouteMatcher)
|
|
3537
3537
|
/* harmony export */ });
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3538
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
3539
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3540
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
3541
|
+
var defaultDelimiter = escapeString('/');
|
|
3542
|
+
var pathExpr = new RegExp(['(\\\\.)', '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'].join('|'), 'g');
|
|
3543
|
+
function escapeString(str) {
|
|
3544
|
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1');
|
|
3545
|
+
}
|
|
3546
|
+
function escapeGroup(group) {
|
|
3547
|
+
return group.replace(/([=!:$\/()])/g, '\\$1');
|
|
3548
|
+
}
|
|
3549
|
+
function parse(str) {
|
|
3550
|
+
var tokens = [];
|
|
3551
|
+
var key = 0;
|
|
3552
|
+
var index = 0;
|
|
3553
|
+
var path = '';
|
|
3554
|
+
var res;
|
|
3555
|
+
while ((res = pathExpr.exec(str)) !== null) {
|
|
3556
|
+
var m = res[0];
|
|
3557
|
+
var escaped = res[1];
|
|
3558
|
+
var offset = res.index;
|
|
3559
|
+
path += str.slice(index, offset);
|
|
3560
|
+
index = offset + m.length;
|
|
3561
|
+
// Ignore already escaped sequences.
|
|
3562
|
+
if (escaped) {
|
|
3563
|
+
path += escaped[1];
|
|
3564
|
+
continue;
|
|
3565
|
+
}
|
|
3566
|
+
var next = str[index];
|
|
3567
|
+
var prefix = res[2];
|
|
3568
|
+
var name = res[3];
|
|
3569
|
+
var capture = res[4];
|
|
3570
|
+
var group = res[5];
|
|
3571
|
+
var modifier = res[6];
|
|
3572
|
+
var asterisk = res[7];
|
|
3573
|
+
// Push the current path onto the tokens.
|
|
3574
|
+
if (path) {
|
|
3575
|
+
tokens.push(path);
|
|
3576
|
+
path = '';
|
|
3577
|
+
}
|
|
3578
|
+
var partial = prefix != null && next != null && next !== prefix;
|
|
3579
|
+
var repeat = modifier === '+' || modifier === '*';
|
|
3580
|
+
var optional = modifier === '?' || modifier === '*';
|
|
3581
|
+
var delimiter = res[2] || '/';
|
|
3582
|
+
var pattern = capture || group;
|
|
3583
|
+
tokens.push({
|
|
3584
|
+
name: name || "".concat(key++),
|
|
3585
|
+
prefix: prefix || '',
|
|
3586
|
+
delimiter: delimiter,
|
|
3587
|
+
optional: optional,
|
|
3588
|
+
repeat: repeat,
|
|
3589
|
+
partial: partial,
|
|
3590
|
+
asterisk: !!asterisk,
|
|
3591
|
+
pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?'
|
|
3592
|
+
});
|
|
3593
|
+
}
|
|
3594
|
+
// Match any characters still remaining.
|
|
3595
|
+
if (index < str.length) {
|
|
3596
|
+
path += str.substring(index);
|
|
3597
|
+
}
|
|
3598
|
+
// If the path exists, push it onto the end.
|
|
3599
|
+
if (path) {
|
|
3600
|
+
tokens.push(path);
|
|
3601
|
+
}
|
|
3602
|
+
return tokens;
|
|
3603
|
+
}
|
|
3604
|
+
function tokensToRegExp(tokens) {
|
|
3605
|
+
var route = '';
|
|
3606
|
+
var _iterator = _createForOfIteratorHelper(tokens),
|
|
3607
|
+
_step;
|
|
3608
|
+
try {
|
|
3609
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3610
|
+
var token = _step.value;
|
|
3611
|
+
if (typeof token === 'string') {
|
|
3612
|
+
route += escapeString(token);
|
|
3613
|
+
} else {
|
|
3614
|
+
var prefix = escapeString(token.prefix);
|
|
3615
|
+
var capture = '(?:' + token.pattern + ')';
|
|
3616
|
+
if (token.repeat) {
|
|
3617
|
+
capture += '(?:' + prefix + capture + ')*';
|
|
3618
|
+
}
|
|
3619
|
+
if (token.optional) {
|
|
3620
|
+
if (!token.partial) {
|
|
3621
|
+
capture = '(?:' + prefix + '(' + capture + '))?';
|
|
3622
|
+
} else {
|
|
3623
|
+
capture = prefix + '(' + capture + ')?';
|
|
3624
|
+
}
|
|
3625
|
+
} else {
|
|
3626
|
+
capture = prefix + '(' + capture + ')';
|
|
3627
|
+
}
|
|
3628
|
+
route += capture;
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
} catch (err) {
|
|
3632
|
+
_iterator.e(err);
|
|
3633
|
+
} finally {
|
|
3634
|
+
_iterator.f();
|
|
3635
|
+
}
|
|
3636
|
+
var endsWithDelimiter = route.slice(-defaultDelimiter.length) === defaultDelimiter;
|
|
3637
|
+
var path = endsWithDelimiter ? route.slice(0, -defaultDelimiter.length) : route;
|
|
3638
|
+
return new RegExp("^".concat(path, "(?:").concat(defaultDelimiter, "(?=$))?$"), 'i');
|
|
3639
|
+
}
|
|
3640
|
+
function stringToRegexp(path) {
|
|
3641
|
+
return tokensToRegExp(parse(path));
|
|
3642
|
+
}
|
|
3541
3643
|
function createRouteMatcher(path) {
|
|
3542
|
-
return
|
|
3644
|
+
return stringToRegexp(path);
|
|
3543
3645
|
}
|
|
3544
3646
|
|
|
3545
3647
|
/***/ }),
|
|
@@ -6656,12 +6758,12 @@ function installPiralDebug(options) {
|
|
|
6656
6758
|
debug: debugApiVersion,
|
|
6657
6759
|
instance: {
|
|
6658
6760
|
name: "sample-piral",
|
|
6659
|
-
version: "1.6.2-beta.
|
|
6761
|
+
version: "1.6.2-beta.7393",
|
|
6660
6762
|
dependencies: "reactstrap,tslib,react,react-dom,react-router,react-router-dom"
|
|
6661
6763
|
},
|
|
6662
6764
|
build: {
|
|
6663
|
-
date: "2024-09-
|
|
6664
|
-
cli: "1.6.2-beta.
|
|
6765
|
+
date: "2024-09-10T15:30:34.426Z",
|
|
6766
|
+
cli: "1.6.2-beta.7393",
|
|
6665
6767
|
compat: "1"
|
|
6666
6768
|
}
|
|
6667
6769
|
};
|
|
@@ -12393,442 +12495,6 @@ return (0,piral_debug_utils__WEBPACK_IMPORTED_MODULE_14__.useDebugRouteFilter)(p
|
|
|
12393
12495
|
|
|
12394
12496
|
|
|
12395
12497
|
|
|
12396
|
-
/***/ }),
|
|
12397
|
-
|
|
12398
|
-
/***/ "../../../node_modules/path-to-regexp/index.js":
|
|
12399
|
-
/*!*****************************************************!*\
|
|
12400
|
-
!*** ../../../node_modules/path-to-regexp/index.js ***!
|
|
12401
|
-
\*****************************************************/
|
|
12402
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12403
|
-
|
|
12404
|
-
var isarray = __webpack_require__(/*! isarray */ "../../../node_modules/isarray/index.js")
|
|
12405
|
-
|
|
12406
|
-
/**
|
|
12407
|
-
* Expose `pathToRegexp`.
|
|
12408
|
-
*/
|
|
12409
|
-
module.exports = pathToRegexp
|
|
12410
|
-
module.exports.parse = parse
|
|
12411
|
-
module.exports.compile = compile
|
|
12412
|
-
module.exports.tokensToFunction = tokensToFunction
|
|
12413
|
-
module.exports.tokensToRegExp = tokensToRegExp
|
|
12414
|
-
|
|
12415
|
-
/**
|
|
12416
|
-
* The main path matching regexp utility.
|
|
12417
|
-
*
|
|
12418
|
-
* @type {RegExp}
|
|
12419
|
-
*/
|
|
12420
|
-
var PATH_REGEXP = new RegExp([
|
|
12421
|
-
// Match escaped characters that would otherwise appear in future matches.
|
|
12422
|
-
// This allows the user to escape special characters that won't transform.
|
|
12423
|
-
'(\\\\.)',
|
|
12424
|
-
// Match Express-style parameters and un-named parameters with a prefix
|
|
12425
|
-
// and optional suffixes. Matches appear as:
|
|
12426
|
-
//
|
|
12427
|
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
|
12428
|
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
|
12429
|
-
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
|
12430
|
-
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
|
12431
|
-
].join('|'), 'g')
|
|
12432
|
-
|
|
12433
|
-
/**
|
|
12434
|
-
* Parse a string for the raw tokens.
|
|
12435
|
-
*
|
|
12436
|
-
* @param {string} str
|
|
12437
|
-
* @param {Object=} options
|
|
12438
|
-
* @return {!Array}
|
|
12439
|
-
*/
|
|
12440
|
-
function parse (str, options) {
|
|
12441
|
-
var tokens = []
|
|
12442
|
-
var key = 0
|
|
12443
|
-
var index = 0
|
|
12444
|
-
var path = ''
|
|
12445
|
-
var defaultDelimiter = options && options.delimiter || '/'
|
|
12446
|
-
var res
|
|
12447
|
-
|
|
12448
|
-
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
12449
|
-
var m = res[0]
|
|
12450
|
-
var escaped = res[1]
|
|
12451
|
-
var offset = res.index
|
|
12452
|
-
path += str.slice(index, offset)
|
|
12453
|
-
index = offset + m.length
|
|
12454
|
-
|
|
12455
|
-
// Ignore already escaped sequences.
|
|
12456
|
-
if (escaped) {
|
|
12457
|
-
path += escaped[1]
|
|
12458
|
-
continue
|
|
12459
|
-
}
|
|
12460
|
-
|
|
12461
|
-
var next = str[index]
|
|
12462
|
-
var prefix = res[2]
|
|
12463
|
-
var name = res[3]
|
|
12464
|
-
var capture = res[4]
|
|
12465
|
-
var group = res[5]
|
|
12466
|
-
var modifier = res[6]
|
|
12467
|
-
var asterisk = res[7]
|
|
12468
|
-
|
|
12469
|
-
// Push the current path onto the tokens.
|
|
12470
|
-
if (path) {
|
|
12471
|
-
tokens.push(path)
|
|
12472
|
-
path = ''
|
|
12473
|
-
}
|
|
12474
|
-
|
|
12475
|
-
var partial = prefix != null && next != null && next !== prefix
|
|
12476
|
-
var repeat = modifier === '+' || modifier === '*'
|
|
12477
|
-
var optional = modifier === '?' || modifier === '*'
|
|
12478
|
-
var delimiter = res[2] || defaultDelimiter
|
|
12479
|
-
var pattern = capture || group
|
|
12480
|
-
|
|
12481
|
-
tokens.push({
|
|
12482
|
-
name: name || key++,
|
|
12483
|
-
prefix: prefix || '',
|
|
12484
|
-
delimiter: delimiter,
|
|
12485
|
-
optional: optional,
|
|
12486
|
-
repeat: repeat,
|
|
12487
|
-
partial: partial,
|
|
12488
|
-
asterisk: !!asterisk,
|
|
12489
|
-
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
|
12490
|
-
})
|
|
12491
|
-
}
|
|
12492
|
-
|
|
12493
|
-
// Match any characters still remaining.
|
|
12494
|
-
if (index < str.length) {
|
|
12495
|
-
path += str.substr(index)
|
|
12496
|
-
}
|
|
12497
|
-
|
|
12498
|
-
// If the path exists, push it onto the end.
|
|
12499
|
-
if (path) {
|
|
12500
|
-
tokens.push(path)
|
|
12501
|
-
}
|
|
12502
|
-
|
|
12503
|
-
return tokens
|
|
12504
|
-
}
|
|
12505
|
-
|
|
12506
|
-
/**
|
|
12507
|
-
* Compile a string to a template function for the path.
|
|
12508
|
-
*
|
|
12509
|
-
* @param {string} str
|
|
12510
|
-
* @param {Object=} options
|
|
12511
|
-
* @return {!function(Object=, Object=)}
|
|
12512
|
-
*/
|
|
12513
|
-
function compile (str, options) {
|
|
12514
|
-
return tokensToFunction(parse(str, options), options)
|
|
12515
|
-
}
|
|
12516
|
-
|
|
12517
|
-
/**
|
|
12518
|
-
* Prettier encoding of URI path segments.
|
|
12519
|
-
*
|
|
12520
|
-
* @param {string}
|
|
12521
|
-
* @return {string}
|
|
12522
|
-
*/
|
|
12523
|
-
function encodeURIComponentPretty (str) {
|
|
12524
|
-
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
|
12525
|
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
12526
|
-
})
|
|
12527
|
-
}
|
|
12528
|
-
|
|
12529
|
-
/**
|
|
12530
|
-
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
|
12531
|
-
*
|
|
12532
|
-
* @param {string}
|
|
12533
|
-
* @return {string}
|
|
12534
|
-
*/
|
|
12535
|
-
function encodeAsterisk (str) {
|
|
12536
|
-
return encodeURI(str).replace(/[?#]/g, function (c) {
|
|
12537
|
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
12538
|
-
})
|
|
12539
|
-
}
|
|
12540
|
-
|
|
12541
|
-
/**
|
|
12542
|
-
* Expose a method for transforming tokens into the path function.
|
|
12543
|
-
*/
|
|
12544
|
-
function tokensToFunction (tokens, options) {
|
|
12545
|
-
// Compile all the tokens into regexps.
|
|
12546
|
-
var matches = new Array(tokens.length)
|
|
12547
|
-
|
|
12548
|
-
// Compile all the patterns before compilation.
|
|
12549
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
12550
|
-
if (typeof tokens[i] === 'object') {
|
|
12551
|
-
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
|
12552
|
-
}
|
|
12553
|
-
}
|
|
12554
|
-
|
|
12555
|
-
return function (obj, opts) {
|
|
12556
|
-
var path = ''
|
|
12557
|
-
var data = obj || {}
|
|
12558
|
-
var options = opts || {}
|
|
12559
|
-
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
|
12560
|
-
|
|
12561
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
12562
|
-
var token = tokens[i]
|
|
12563
|
-
|
|
12564
|
-
if (typeof token === 'string') {
|
|
12565
|
-
path += token
|
|
12566
|
-
|
|
12567
|
-
continue
|
|
12568
|
-
}
|
|
12569
|
-
|
|
12570
|
-
var value = data[token.name]
|
|
12571
|
-
var segment
|
|
12572
|
-
|
|
12573
|
-
if (value == null) {
|
|
12574
|
-
if (token.optional) {
|
|
12575
|
-
// Prepend partial segment prefixes.
|
|
12576
|
-
if (token.partial) {
|
|
12577
|
-
path += token.prefix
|
|
12578
|
-
}
|
|
12579
|
-
|
|
12580
|
-
continue
|
|
12581
|
-
} else {
|
|
12582
|
-
throw new TypeError('Expected "' + token.name + '" to be defined')
|
|
12583
|
-
}
|
|
12584
|
-
}
|
|
12585
|
-
|
|
12586
|
-
if (isarray(value)) {
|
|
12587
|
-
if (!token.repeat) {
|
|
12588
|
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
|
12589
|
-
}
|
|
12590
|
-
|
|
12591
|
-
if (value.length === 0) {
|
|
12592
|
-
if (token.optional) {
|
|
12593
|
-
continue
|
|
12594
|
-
} else {
|
|
12595
|
-
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
|
12596
|
-
}
|
|
12597
|
-
}
|
|
12598
|
-
|
|
12599
|
-
for (var j = 0; j < value.length; j++) {
|
|
12600
|
-
segment = encode(value[j])
|
|
12601
|
-
|
|
12602
|
-
if (!matches[i].test(segment)) {
|
|
12603
|
-
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
|
12604
|
-
}
|
|
12605
|
-
|
|
12606
|
-
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
|
12607
|
-
}
|
|
12608
|
-
|
|
12609
|
-
continue
|
|
12610
|
-
}
|
|
12611
|
-
|
|
12612
|
-
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
|
12613
|
-
|
|
12614
|
-
if (!matches[i].test(segment)) {
|
|
12615
|
-
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
|
12616
|
-
}
|
|
12617
|
-
|
|
12618
|
-
path += token.prefix + segment
|
|
12619
|
-
}
|
|
12620
|
-
|
|
12621
|
-
return path
|
|
12622
|
-
}
|
|
12623
|
-
}
|
|
12624
|
-
|
|
12625
|
-
/**
|
|
12626
|
-
* Escape a regular expression string.
|
|
12627
|
-
*
|
|
12628
|
-
* @param {string} str
|
|
12629
|
-
* @return {string}
|
|
12630
|
-
*/
|
|
12631
|
-
function escapeString (str) {
|
|
12632
|
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
|
12633
|
-
}
|
|
12634
|
-
|
|
12635
|
-
/**
|
|
12636
|
-
* Escape the capturing group by escaping special characters and meaning.
|
|
12637
|
-
*
|
|
12638
|
-
* @param {string} group
|
|
12639
|
-
* @return {string}
|
|
12640
|
-
*/
|
|
12641
|
-
function escapeGroup (group) {
|
|
12642
|
-
return group.replace(/([=!:$\/()])/g, '\\$1')
|
|
12643
|
-
}
|
|
12644
|
-
|
|
12645
|
-
/**
|
|
12646
|
-
* Attach the keys as a property of the regexp.
|
|
12647
|
-
*
|
|
12648
|
-
* @param {!RegExp} re
|
|
12649
|
-
* @param {Array} keys
|
|
12650
|
-
* @return {!RegExp}
|
|
12651
|
-
*/
|
|
12652
|
-
function attachKeys (re, keys) {
|
|
12653
|
-
re.keys = keys
|
|
12654
|
-
return re
|
|
12655
|
-
}
|
|
12656
|
-
|
|
12657
|
-
/**
|
|
12658
|
-
* Get the flags for a regexp from the options.
|
|
12659
|
-
*
|
|
12660
|
-
* @param {Object} options
|
|
12661
|
-
* @return {string}
|
|
12662
|
-
*/
|
|
12663
|
-
function flags (options) {
|
|
12664
|
-
return options && options.sensitive ? '' : 'i'
|
|
12665
|
-
}
|
|
12666
|
-
|
|
12667
|
-
/**
|
|
12668
|
-
* Pull out keys from a regexp.
|
|
12669
|
-
*
|
|
12670
|
-
* @param {!RegExp} path
|
|
12671
|
-
* @param {!Array} keys
|
|
12672
|
-
* @return {!RegExp}
|
|
12673
|
-
*/
|
|
12674
|
-
function regexpToRegexp (path, keys) {
|
|
12675
|
-
// Use a negative lookahead to match only capturing groups.
|
|
12676
|
-
var groups = path.source.match(/\((?!\?)/g)
|
|
12677
|
-
|
|
12678
|
-
if (groups) {
|
|
12679
|
-
for (var i = 0; i < groups.length; i++) {
|
|
12680
|
-
keys.push({
|
|
12681
|
-
name: i,
|
|
12682
|
-
prefix: null,
|
|
12683
|
-
delimiter: null,
|
|
12684
|
-
optional: false,
|
|
12685
|
-
repeat: false,
|
|
12686
|
-
partial: false,
|
|
12687
|
-
asterisk: false,
|
|
12688
|
-
pattern: null
|
|
12689
|
-
})
|
|
12690
|
-
}
|
|
12691
|
-
}
|
|
12692
|
-
|
|
12693
|
-
return attachKeys(path, keys)
|
|
12694
|
-
}
|
|
12695
|
-
|
|
12696
|
-
/**
|
|
12697
|
-
* Transform an array into a regexp.
|
|
12698
|
-
*
|
|
12699
|
-
* @param {!Array} path
|
|
12700
|
-
* @param {Array} keys
|
|
12701
|
-
* @param {!Object} options
|
|
12702
|
-
* @return {!RegExp}
|
|
12703
|
-
*/
|
|
12704
|
-
function arrayToRegexp (path, keys, options) {
|
|
12705
|
-
var parts = []
|
|
12706
|
-
|
|
12707
|
-
for (var i = 0; i < path.length; i++) {
|
|
12708
|
-
parts.push(pathToRegexp(path[i], keys, options).source)
|
|
12709
|
-
}
|
|
12710
|
-
|
|
12711
|
-
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
|
12712
|
-
|
|
12713
|
-
return attachKeys(regexp, keys)
|
|
12714
|
-
}
|
|
12715
|
-
|
|
12716
|
-
/**
|
|
12717
|
-
* Create a path regexp from string input.
|
|
12718
|
-
*
|
|
12719
|
-
* @param {string} path
|
|
12720
|
-
* @param {!Array} keys
|
|
12721
|
-
* @param {!Object} options
|
|
12722
|
-
* @return {!RegExp}
|
|
12723
|
-
*/
|
|
12724
|
-
function stringToRegexp (path, keys, options) {
|
|
12725
|
-
return tokensToRegExp(parse(path, options), keys, options)
|
|
12726
|
-
}
|
|
12727
|
-
|
|
12728
|
-
/**
|
|
12729
|
-
* Expose a function for taking tokens and returning a RegExp.
|
|
12730
|
-
*
|
|
12731
|
-
* @param {!Array} tokens
|
|
12732
|
-
* @param {(Array|Object)=} keys
|
|
12733
|
-
* @param {Object=} options
|
|
12734
|
-
* @return {!RegExp}
|
|
12735
|
-
*/
|
|
12736
|
-
function tokensToRegExp (tokens, keys, options) {
|
|
12737
|
-
if (!isarray(keys)) {
|
|
12738
|
-
options = /** @type {!Object} */ (keys || options)
|
|
12739
|
-
keys = []
|
|
12740
|
-
}
|
|
12741
|
-
|
|
12742
|
-
options = options || {}
|
|
12743
|
-
|
|
12744
|
-
var strict = options.strict
|
|
12745
|
-
var end = options.end !== false
|
|
12746
|
-
var route = ''
|
|
12747
|
-
|
|
12748
|
-
// Iterate over the tokens and create our regexp string.
|
|
12749
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
12750
|
-
var token = tokens[i]
|
|
12751
|
-
|
|
12752
|
-
if (typeof token === 'string') {
|
|
12753
|
-
route += escapeString(token)
|
|
12754
|
-
} else {
|
|
12755
|
-
var prefix = escapeString(token.prefix)
|
|
12756
|
-
var capture = '(?:' + token.pattern + ')'
|
|
12757
|
-
|
|
12758
|
-
keys.push(token)
|
|
12759
|
-
|
|
12760
|
-
if (token.repeat) {
|
|
12761
|
-
capture += '(?:' + prefix + capture + ')*'
|
|
12762
|
-
}
|
|
12763
|
-
|
|
12764
|
-
if (token.optional) {
|
|
12765
|
-
if (!token.partial) {
|
|
12766
|
-
capture = '(?:' + prefix + '(' + capture + '))?'
|
|
12767
|
-
} else {
|
|
12768
|
-
capture = prefix + '(' + capture + ')?'
|
|
12769
|
-
}
|
|
12770
|
-
} else {
|
|
12771
|
-
capture = prefix + '(' + capture + ')'
|
|
12772
|
-
}
|
|
12773
|
-
|
|
12774
|
-
route += capture
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
|
|
12778
|
-
var delimiter = escapeString(options.delimiter || '/')
|
|
12779
|
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
|
12780
|
-
|
|
12781
|
-
// In non-strict mode we allow a slash at the end of match. If the path to
|
|
12782
|
-
// match already ends with a slash, we remove it for consistency. The slash
|
|
12783
|
-
// is valid at the end of a path match, not in the middle. This is important
|
|
12784
|
-
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
|
12785
|
-
if (!strict) {
|
|
12786
|
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
|
12787
|
-
}
|
|
12788
|
-
|
|
12789
|
-
if (end) {
|
|
12790
|
-
route += '$'
|
|
12791
|
-
} else {
|
|
12792
|
-
// In non-ending mode, we need the capturing groups to match as much as
|
|
12793
|
-
// possible by using a positive lookahead to the end or next path segment.
|
|
12794
|
-
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
|
12795
|
-
}
|
|
12796
|
-
|
|
12797
|
-
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
|
12798
|
-
}
|
|
12799
|
-
|
|
12800
|
-
/**
|
|
12801
|
-
* Normalize the given path string, returning a regular expression.
|
|
12802
|
-
*
|
|
12803
|
-
* An empty array can be passed in for the keys, which will hold the
|
|
12804
|
-
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
|
12805
|
-
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
|
12806
|
-
*
|
|
12807
|
-
* @param {(string|RegExp|Array)} path
|
|
12808
|
-
* @param {(Array|Object)=} keys
|
|
12809
|
-
* @param {Object=} options
|
|
12810
|
-
* @return {!RegExp}
|
|
12811
|
-
*/
|
|
12812
|
-
function pathToRegexp (path, keys, options) {
|
|
12813
|
-
if (!isarray(keys)) {
|
|
12814
|
-
options = /** @type {!Object} */ (keys || options)
|
|
12815
|
-
keys = []
|
|
12816
|
-
}
|
|
12817
|
-
|
|
12818
|
-
options = options || {}
|
|
12819
|
-
|
|
12820
|
-
if (path instanceof RegExp) {
|
|
12821
|
-
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
|
12822
|
-
}
|
|
12823
|
-
|
|
12824
|
-
if (isarray(path)) {
|
|
12825
|
-
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
|
12826
|
-
}
|
|
12827
|
-
|
|
12828
|
-
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
|
12829
|
-
}
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
12498
|
/***/ }),
|
|
12833
12499
|
|
|
12834
12500
|
/***/ "../../../node_modules/popper.js/dist/esm/popper.js":
|
|
@@ -47444,7 +47110,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47444
47110
|
/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tiny-warning */ "../../../node_modules/tiny-warning/dist/tiny-warning.esm.js");
|
|
47445
47111
|
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-invariant */ "../../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js");
|
|
47446
47112
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
47447
|
-
/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! path-to-regexp */ "../../../node_modules/path-to-regexp/index.js");
|
|
47113
|
+
/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! path-to-regexp */ "../../../node_modules/react-router/node_modules/path-to-regexp/index.js");
|
|
47448
47114
|
/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_4__);
|
|
47449
47115
|
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-is */ "../../../node_modules/react-is/index.js");
|
|
47450
47116
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
|
@@ -48402,6 +48068,442 @@ if (true) {
|
|
|
48402
48068
|
//# sourceMappingURL=react-router.js.map
|
|
48403
48069
|
|
|
48404
48070
|
|
|
48071
|
+
/***/ }),
|
|
48072
|
+
|
|
48073
|
+
/***/ "../../../node_modules/react-router/node_modules/path-to-regexp/index.js":
|
|
48074
|
+
/*!*******************************************************************************!*\
|
|
48075
|
+
!*** ../../../node_modules/react-router/node_modules/path-to-regexp/index.js ***!
|
|
48076
|
+
\*******************************************************************************/
|
|
48077
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
48078
|
+
|
|
48079
|
+
var isarray = __webpack_require__(/*! isarray */ "../../../node_modules/isarray/index.js")
|
|
48080
|
+
|
|
48081
|
+
/**
|
|
48082
|
+
* Expose `pathToRegexp`.
|
|
48083
|
+
*/
|
|
48084
|
+
module.exports = pathToRegexp
|
|
48085
|
+
module.exports.parse = parse
|
|
48086
|
+
module.exports.compile = compile
|
|
48087
|
+
module.exports.tokensToFunction = tokensToFunction
|
|
48088
|
+
module.exports.tokensToRegExp = tokensToRegExp
|
|
48089
|
+
|
|
48090
|
+
/**
|
|
48091
|
+
* The main path matching regexp utility.
|
|
48092
|
+
*
|
|
48093
|
+
* @type {RegExp}
|
|
48094
|
+
*/
|
|
48095
|
+
var PATH_REGEXP = new RegExp([
|
|
48096
|
+
// Match escaped characters that would otherwise appear in future matches.
|
|
48097
|
+
// This allows the user to escape special characters that won't transform.
|
|
48098
|
+
'(\\\\.)',
|
|
48099
|
+
// Match Express-style parameters and un-named parameters with a prefix
|
|
48100
|
+
// and optional suffixes. Matches appear as:
|
|
48101
|
+
//
|
|
48102
|
+
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
|
48103
|
+
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
|
48104
|
+
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
|
48105
|
+
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
|
48106
|
+
].join('|'), 'g')
|
|
48107
|
+
|
|
48108
|
+
/**
|
|
48109
|
+
* Parse a string for the raw tokens.
|
|
48110
|
+
*
|
|
48111
|
+
* @param {string} str
|
|
48112
|
+
* @param {Object=} options
|
|
48113
|
+
* @return {!Array}
|
|
48114
|
+
*/
|
|
48115
|
+
function parse (str, options) {
|
|
48116
|
+
var tokens = []
|
|
48117
|
+
var key = 0
|
|
48118
|
+
var index = 0
|
|
48119
|
+
var path = ''
|
|
48120
|
+
var defaultDelimiter = options && options.delimiter || '/'
|
|
48121
|
+
var res
|
|
48122
|
+
|
|
48123
|
+
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
48124
|
+
var m = res[0]
|
|
48125
|
+
var escaped = res[1]
|
|
48126
|
+
var offset = res.index
|
|
48127
|
+
path += str.slice(index, offset)
|
|
48128
|
+
index = offset + m.length
|
|
48129
|
+
|
|
48130
|
+
// Ignore already escaped sequences.
|
|
48131
|
+
if (escaped) {
|
|
48132
|
+
path += escaped[1]
|
|
48133
|
+
continue
|
|
48134
|
+
}
|
|
48135
|
+
|
|
48136
|
+
var next = str[index]
|
|
48137
|
+
var prefix = res[2]
|
|
48138
|
+
var name = res[3]
|
|
48139
|
+
var capture = res[4]
|
|
48140
|
+
var group = res[5]
|
|
48141
|
+
var modifier = res[6]
|
|
48142
|
+
var asterisk = res[7]
|
|
48143
|
+
|
|
48144
|
+
// Push the current path onto the tokens.
|
|
48145
|
+
if (path) {
|
|
48146
|
+
tokens.push(path)
|
|
48147
|
+
path = ''
|
|
48148
|
+
}
|
|
48149
|
+
|
|
48150
|
+
var partial = prefix != null && next != null && next !== prefix
|
|
48151
|
+
var repeat = modifier === '+' || modifier === '*'
|
|
48152
|
+
var optional = modifier === '?' || modifier === '*'
|
|
48153
|
+
var delimiter = res[2] || defaultDelimiter
|
|
48154
|
+
var pattern = capture || group
|
|
48155
|
+
|
|
48156
|
+
tokens.push({
|
|
48157
|
+
name: name || key++,
|
|
48158
|
+
prefix: prefix || '',
|
|
48159
|
+
delimiter: delimiter,
|
|
48160
|
+
optional: optional,
|
|
48161
|
+
repeat: repeat,
|
|
48162
|
+
partial: partial,
|
|
48163
|
+
asterisk: !!asterisk,
|
|
48164
|
+
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
|
48165
|
+
})
|
|
48166
|
+
}
|
|
48167
|
+
|
|
48168
|
+
// Match any characters still remaining.
|
|
48169
|
+
if (index < str.length) {
|
|
48170
|
+
path += str.substr(index)
|
|
48171
|
+
}
|
|
48172
|
+
|
|
48173
|
+
// If the path exists, push it onto the end.
|
|
48174
|
+
if (path) {
|
|
48175
|
+
tokens.push(path)
|
|
48176
|
+
}
|
|
48177
|
+
|
|
48178
|
+
return tokens
|
|
48179
|
+
}
|
|
48180
|
+
|
|
48181
|
+
/**
|
|
48182
|
+
* Compile a string to a template function for the path.
|
|
48183
|
+
*
|
|
48184
|
+
* @param {string} str
|
|
48185
|
+
* @param {Object=} options
|
|
48186
|
+
* @return {!function(Object=, Object=)}
|
|
48187
|
+
*/
|
|
48188
|
+
function compile (str, options) {
|
|
48189
|
+
return tokensToFunction(parse(str, options), options)
|
|
48190
|
+
}
|
|
48191
|
+
|
|
48192
|
+
/**
|
|
48193
|
+
* Prettier encoding of URI path segments.
|
|
48194
|
+
*
|
|
48195
|
+
* @param {string}
|
|
48196
|
+
* @return {string}
|
|
48197
|
+
*/
|
|
48198
|
+
function encodeURIComponentPretty (str) {
|
|
48199
|
+
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
|
48200
|
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
48201
|
+
})
|
|
48202
|
+
}
|
|
48203
|
+
|
|
48204
|
+
/**
|
|
48205
|
+
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
|
48206
|
+
*
|
|
48207
|
+
* @param {string}
|
|
48208
|
+
* @return {string}
|
|
48209
|
+
*/
|
|
48210
|
+
function encodeAsterisk (str) {
|
|
48211
|
+
return encodeURI(str).replace(/[?#]/g, function (c) {
|
|
48212
|
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
|
48213
|
+
})
|
|
48214
|
+
}
|
|
48215
|
+
|
|
48216
|
+
/**
|
|
48217
|
+
* Expose a method for transforming tokens into the path function.
|
|
48218
|
+
*/
|
|
48219
|
+
function tokensToFunction (tokens, options) {
|
|
48220
|
+
// Compile all the tokens into regexps.
|
|
48221
|
+
var matches = new Array(tokens.length)
|
|
48222
|
+
|
|
48223
|
+
// Compile all the patterns before compilation.
|
|
48224
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
48225
|
+
if (typeof tokens[i] === 'object') {
|
|
48226
|
+
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
|
48227
|
+
}
|
|
48228
|
+
}
|
|
48229
|
+
|
|
48230
|
+
return function (obj, opts) {
|
|
48231
|
+
var path = ''
|
|
48232
|
+
var data = obj || {}
|
|
48233
|
+
var options = opts || {}
|
|
48234
|
+
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
|
48235
|
+
|
|
48236
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
48237
|
+
var token = tokens[i]
|
|
48238
|
+
|
|
48239
|
+
if (typeof token === 'string') {
|
|
48240
|
+
path += token
|
|
48241
|
+
|
|
48242
|
+
continue
|
|
48243
|
+
}
|
|
48244
|
+
|
|
48245
|
+
var value = data[token.name]
|
|
48246
|
+
var segment
|
|
48247
|
+
|
|
48248
|
+
if (value == null) {
|
|
48249
|
+
if (token.optional) {
|
|
48250
|
+
// Prepend partial segment prefixes.
|
|
48251
|
+
if (token.partial) {
|
|
48252
|
+
path += token.prefix
|
|
48253
|
+
}
|
|
48254
|
+
|
|
48255
|
+
continue
|
|
48256
|
+
} else {
|
|
48257
|
+
throw new TypeError('Expected "' + token.name + '" to be defined')
|
|
48258
|
+
}
|
|
48259
|
+
}
|
|
48260
|
+
|
|
48261
|
+
if (isarray(value)) {
|
|
48262
|
+
if (!token.repeat) {
|
|
48263
|
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
|
48264
|
+
}
|
|
48265
|
+
|
|
48266
|
+
if (value.length === 0) {
|
|
48267
|
+
if (token.optional) {
|
|
48268
|
+
continue
|
|
48269
|
+
} else {
|
|
48270
|
+
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
|
48271
|
+
}
|
|
48272
|
+
}
|
|
48273
|
+
|
|
48274
|
+
for (var j = 0; j < value.length; j++) {
|
|
48275
|
+
segment = encode(value[j])
|
|
48276
|
+
|
|
48277
|
+
if (!matches[i].test(segment)) {
|
|
48278
|
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
|
48279
|
+
}
|
|
48280
|
+
|
|
48281
|
+
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
|
48282
|
+
}
|
|
48283
|
+
|
|
48284
|
+
continue
|
|
48285
|
+
}
|
|
48286
|
+
|
|
48287
|
+
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
|
48288
|
+
|
|
48289
|
+
if (!matches[i].test(segment)) {
|
|
48290
|
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
|
48291
|
+
}
|
|
48292
|
+
|
|
48293
|
+
path += token.prefix + segment
|
|
48294
|
+
}
|
|
48295
|
+
|
|
48296
|
+
return path
|
|
48297
|
+
}
|
|
48298
|
+
}
|
|
48299
|
+
|
|
48300
|
+
/**
|
|
48301
|
+
* Escape a regular expression string.
|
|
48302
|
+
*
|
|
48303
|
+
* @param {string} str
|
|
48304
|
+
* @return {string}
|
|
48305
|
+
*/
|
|
48306
|
+
function escapeString (str) {
|
|
48307
|
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
|
48308
|
+
}
|
|
48309
|
+
|
|
48310
|
+
/**
|
|
48311
|
+
* Escape the capturing group by escaping special characters and meaning.
|
|
48312
|
+
*
|
|
48313
|
+
* @param {string} group
|
|
48314
|
+
* @return {string}
|
|
48315
|
+
*/
|
|
48316
|
+
function escapeGroup (group) {
|
|
48317
|
+
return group.replace(/([=!:$\/()])/g, '\\$1')
|
|
48318
|
+
}
|
|
48319
|
+
|
|
48320
|
+
/**
|
|
48321
|
+
* Attach the keys as a property of the regexp.
|
|
48322
|
+
*
|
|
48323
|
+
* @param {!RegExp} re
|
|
48324
|
+
* @param {Array} keys
|
|
48325
|
+
* @return {!RegExp}
|
|
48326
|
+
*/
|
|
48327
|
+
function attachKeys (re, keys) {
|
|
48328
|
+
re.keys = keys
|
|
48329
|
+
return re
|
|
48330
|
+
}
|
|
48331
|
+
|
|
48332
|
+
/**
|
|
48333
|
+
* Get the flags for a regexp from the options.
|
|
48334
|
+
*
|
|
48335
|
+
* @param {Object} options
|
|
48336
|
+
* @return {string}
|
|
48337
|
+
*/
|
|
48338
|
+
function flags (options) {
|
|
48339
|
+
return options && options.sensitive ? '' : 'i'
|
|
48340
|
+
}
|
|
48341
|
+
|
|
48342
|
+
/**
|
|
48343
|
+
* Pull out keys from a regexp.
|
|
48344
|
+
*
|
|
48345
|
+
* @param {!RegExp} path
|
|
48346
|
+
* @param {!Array} keys
|
|
48347
|
+
* @return {!RegExp}
|
|
48348
|
+
*/
|
|
48349
|
+
function regexpToRegexp (path, keys) {
|
|
48350
|
+
// Use a negative lookahead to match only capturing groups.
|
|
48351
|
+
var groups = path.source.match(/\((?!\?)/g)
|
|
48352
|
+
|
|
48353
|
+
if (groups) {
|
|
48354
|
+
for (var i = 0; i < groups.length; i++) {
|
|
48355
|
+
keys.push({
|
|
48356
|
+
name: i,
|
|
48357
|
+
prefix: null,
|
|
48358
|
+
delimiter: null,
|
|
48359
|
+
optional: false,
|
|
48360
|
+
repeat: false,
|
|
48361
|
+
partial: false,
|
|
48362
|
+
asterisk: false,
|
|
48363
|
+
pattern: null
|
|
48364
|
+
})
|
|
48365
|
+
}
|
|
48366
|
+
}
|
|
48367
|
+
|
|
48368
|
+
return attachKeys(path, keys)
|
|
48369
|
+
}
|
|
48370
|
+
|
|
48371
|
+
/**
|
|
48372
|
+
* Transform an array into a regexp.
|
|
48373
|
+
*
|
|
48374
|
+
* @param {!Array} path
|
|
48375
|
+
* @param {Array} keys
|
|
48376
|
+
* @param {!Object} options
|
|
48377
|
+
* @return {!RegExp}
|
|
48378
|
+
*/
|
|
48379
|
+
function arrayToRegexp (path, keys, options) {
|
|
48380
|
+
var parts = []
|
|
48381
|
+
|
|
48382
|
+
for (var i = 0; i < path.length; i++) {
|
|
48383
|
+
parts.push(pathToRegexp(path[i], keys, options).source)
|
|
48384
|
+
}
|
|
48385
|
+
|
|
48386
|
+
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
|
48387
|
+
|
|
48388
|
+
return attachKeys(regexp, keys)
|
|
48389
|
+
}
|
|
48390
|
+
|
|
48391
|
+
/**
|
|
48392
|
+
* Create a path regexp from string input.
|
|
48393
|
+
*
|
|
48394
|
+
* @param {string} path
|
|
48395
|
+
* @param {!Array} keys
|
|
48396
|
+
* @param {!Object} options
|
|
48397
|
+
* @return {!RegExp}
|
|
48398
|
+
*/
|
|
48399
|
+
function stringToRegexp (path, keys, options) {
|
|
48400
|
+
return tokensToRegExp(parse(path, options), keys, options)
|
|
48401
|
+
}
|
|
48402
|
+
|
|
48403
|
+
/**
|
|
48404
|
+
* Expose a function for taking tokens and returning a RegExp.
|
|
48405
|
+
*
|
|
48406
|
+
* @param {!Array} tokens
|
|
48407
|
+
* @param {(Array|Object)=} keys
|
|
48408
|
+
* @param {Object=} options
|
|
48409
|
+
* @return {!RegExp}
|
|
48410
|
+
*/
|
|
48411
|
+
function tokensToRegExp (tokens, keys, options) {
|
|
48412
|
+
if (!isarray(keys)) {
|
|
48413
|
+
options = /** @type {!Object} */ (keys || options)
|
|
48414
|
+
keys = []
|
|
48415
|
+
}
|
|
48416
|
+
|
|
48417
|
+
options = options || {}
|
|
48418
|
+
|
|
48419
|
+
var strict = options.strict
|
|
48420
|
+
var end = options.end !== false
|
|
48421
|
+
var route = ''
|
|
48422
|
+
|
|
48423
|
+
// Iterate over the tokens and create our regexp string.
|
|
48424
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
48425
|
+
var token = tokens[i]
|
|
48426
|
+
|
|
48427
|
+
if (typeof token === 'string') {
|
|
48428
|
+
route += escapeString(token)
|
|
48429
|
+
} else {
|
|
48430
|
+
var prefix = escapeString(token.prefix)
|
|
48431
|
+
var capture = '(?:' + token.pattern + ')'
|
|
48432
|
+
|
|
48433
|
+
keys.push(token)
|
|
48434
|
+
|
|
48435
|
+
if (token.repeat) {
|
|
48436
|
+
capture += '(?:' + prefix + capture + ')*'
|
|
48437
|
+
}
|
|
48438
|
+
|
|
48439
|
+
if (token.optional) {
|
|
48440
|
+
if (!token.partial) {
|
|
48441
|
+
capture = '(?:' + prefix + '(' + capture + '))?'
|
|
48442
|
+
} else {
|
|
48443
|
+
capture = prefix + '(' + capture + ')?'
|
|
48444
|
+
}
|
|
48445
|
+
} else {
|
|
48446
|
+
capture = prefix + '(' + capture + ')'
|
|
48447
|
+
}
|
|
48448
|
+
|
|
48449
|
+
route += capture
|
|
48450
|
+
}
|
|
48451
|
+
}
|
|
48452
|
+
|
|
48453
|
+
var delimiter = escapeString(options.delimiter || '/')
|
|
48454
|
+
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
|
48455
|
+
|
|
48456
|
+
// In non-strict mode we allow a slash at the end of match. If the path to
|
|
48457
|
+
// match already ends with a slash, we remove it for consistency. The slash
|
|
48458
|
+
// is valid at the end of a path match, not in the middle. This is important
|
|
48459
|
+
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
|
48460
|
+
if (!strict) {
|
|
48461
|
+
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
|
48462
|
+
}
|
|
48463
|
+
|
|
48464
|
+
if (end) {
|
|
48465
|
+
route += '$'
|
|
48466
|
+
} else {
|
|
48467
|
+
// In non-ending mode, we need the capturing groups to match as much as
|
|
48468
|
+
// possible by using a positive lookahead to the end or next path segment.
|
|
48469
|
+
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
|
48470
|
+
}
|
|
48471
|
+
|
|
48472
|
+
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
|
48473
|
+
}
|
|
48474
|
+
|
|
48475
|
+
/**
|
|
48476
|
+
* Normalize the given path string, returning a regular expression.
|
|
48477
|
+
*
|
|
48478
|
+
* An empty array can be passed in for the keys, which will hold the
|
|
48479
|
+
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
|
48480
|
+
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
|
48481
|
+
*
|
|
48482
|
+
* @param {(string|RegExp|Array)} path
|
|
48483
|
+
* @param {(Array|Object)=} keys
|
|
48484
|
+
* @param {Object=} options
|
|
48485
|
+
* @return {!RegExp}
|
|
48486
|
+
*/
|
|
48487
|
+
function pathToRegexp (path, keys, options) {
|
|
48488
|
+
if (!isarray(keys)) {
|
|
48489
|
+
options = /** @type {!Object} */ (keys || options)
|
|
48490
|
+
keys = []
|
|
48491
|
+
}
|
|
48492
|
+
|
|
48493
|
+
options = options || {}
|
|
48494
|
+
|
|
48495
|
+
if (path instanceof RegExp) {
|
|
48496
|
+
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
|
48497
|
+
}
|
|
48498
|
+
|
|
48499
|
+
if (isarray(path)) {
|
|
48500
|
+
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
|
48501
|
+
}
|
|
48502
|
+
|
|
48503
|
+
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
|
48504
|
+
}
|
|
48505
|
+
|
|
48506
|
+
|
|
48405
48507
|
/***/ }),
|
|
48406
48508
|
|
|
48407
48509
|
/***/ "../../../node_modules/react-transition-group/CSSTransition.js":
|
|
@@ -66916,4 +67018,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(piral
|
|
|
66916
67018
|
|
|
66917
67019
|
/******/ })()
|
|
66918
67020
|
;
|
|
66919
|
-
//# sourceMappingURL=index.
|
|
67021
|
+
//# sourceMappingURL=index.75188b.js.map
|