|
1 | 1 | /**
|
2 |
| - * auth0-js v9.25.0 |
| 2 | + * auth0-js v9.26.0 |
3 | 3 | * Author: Auth0
|
4 |
| - * Date: 2024-04-29 |
| 4 | + * Date: 2024-04-30 |
5 | 5 | * License: MIT
|
6 | 6 | */
|
7 | 7 |
|
|
11 | 11 | (global = global || self, global.CordovaAuth0Plugin = factory());
|
12 | 12 | }(this, (function () { 'use strict';
|
13 | 13 |
|
14 |
| - var version = { raw: '9.25.0' }; |
| 14 | + var version = { raw: '9.26.0' }; |
15 | 15 |
|
16 | 16 | var toString = Object.prototype.toString;
|
17 | 17 |
|
|
504 | 504 | return shams();
|
505 | 505 | };
|
506 | 506 |
|
507 |
| - var test = { |
508 |
| - foo: {} |
509 |
| - }; |
510 |
| - |
511 |
| - var $Object = Object; |
512 |
| - |
513 |
| - var hasProto = function hasProto() { |
514 |
| - return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); |
515 |
| - }; |
516 |
| - |
517 | 507 | /* eslint no-invalid-this: 1 */
|
518 | 508 |
|
519 | 509 | var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
| 510 | + var slice = Array.prototype.slice; |
520 | 511 | var toStr = Object.prototype.toString;
|
521 |
| - var max = Math.max; |
522 | 512 | var funcType = '[object Function]';
|
523 | 513 |
|
524 |
| - var concatty = function concatty(a, b) { |
525 |
| - var arr = []; |
526 |
| - |
527 |
| - for (var i = 0; i < a.length; i += 1) { |
528 |
| - arr[i] = a[i]; |
529 |
| - } |
530 |
| - for (var j = 0; j < b.length; j += 1) { |
531 |
| - arr[j + a.length] = b[j]; |
532 |
| - } |
533 |
| - |
534 |
| - return arr; |
535 |
| - }; |
536 |
| - |
537 |
| - var slicy = function slicy(arrLike, offset) { |
538 |
| - var arr = []; |
539 |
| - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { |
540 |
| - arr[j] = arrLike[i]; |
541 |
| - } |
542 |
| - return arr; |
543 |
| - }; |
544 |
| - |
545 |
| - var joiny = function (arr, joiner) { |
546 |
| - var str = ''; |
547 |
| - for (var i = 0; i < arr.length; i += 1) { |
548 |
| - str += arr[i]; |
549 |
| - if (i + 1 < arr.length) { |
550 |
| - str += joiner; |
551 |
| - } |
552 |
| - } |
553 |
| - return str; |
554 |
| - }; |
555 |
| - |
556 | 514 | var implementation = function bind(that) {
|
557 | 515 | var target = this;
|
558 |
| - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { |
| 516 | + if (typeof target !== 'function' || toStr.call(target) !== funcType) { |
559 | 517 | throw new TypeError(ERROR_MESSAGE + target);
|
560 | 518 | }
|
561 |
| - var args = slicy(arguments, 1); |
| 519 | + var args = slice.call(arguments, 1); |
562 | 520 |
|
563 | 521 | var bound;
|
564 | 522 | var binder = function () {
|
565 | 523 | if (this instanceof bound) {
|
566 | 524 | var result = target.apply(
|
567 | 525 | this,
|
568 |
| - concatty(args, arguments) |
| 526 | + args.concat(slice.call(arguments)) |
569 | 527 | );
|
570 | 528 | if (Object(result) === result) {
|
571 | 529 | return result;
|
572 | 530 | }
|
573 | 531 | return this;
|
| 532 | + } else { |
| 533 | + return target.apply( |
| 534 | + that, |
| 535 | + args.concat(slice.call(arguments)) |
| 536 | + ); |
574 | 537 | }
|
575 |
| - return target.apply( |
576 |
| - that, |
577 |
| - concatty(args, arguments) |
578 |
| - ); |
579 |
| - |
580 | 538 | };
|
581 | 539 |
|
582 |
| - var boundLength = max(0, target.length - args.length); |
| 540 | + var boundLength = Math.max(0, target.length - args.length); |
583 | 541 | var boundArgs = [];
|
584 | 542 | for (var i = 0; i < boundLength; i++) {
|
585 |
| - boundArgs[i] = '$' + i; |
| 543 | + boundArgs.push('$' + i); |
586 | 544 | }
|
587 | 545 |
|
588 |
| - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); |
| 546 | + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); |
589 | 547 |
|
590 | 548 | if (target.prototype) {
|
591 | 549 | var Empty = function Empty() {};
|
|
644 | 602 | : throwTypeError;
|
645 | 603 |
|
646 | 604 | var hasSymbols$1 = hasSymbols();
|
647 |
| - var hasProto$1 = hasProto(); |
648 | 605 |
|
649 |
| - var getProto = Object.getPrototypeOf || ( |
650 |
| - hasProto$1 |
651 |
| - ? function (x) { return x.__proto__; } // eslint-disable-line no-proto |
652 |
| - : null |
653 |
| - ); |
| 606 | + var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto |
654 | 607 |
|
655 | 608 | var needsEval = {};
|
656 | 609 |
|
657 |
| - var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array); |
| 610 | + var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array); |
658 | 611 |
|
659 | 612 | var INTRINSICS = {
|
660 | 613 | '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
661 | 614 | '%Array%': Array,
|
662 | 615 | '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
663 |
| - '%ArrayIteratorPrototype%': hasSymbols$1 && getProto ? getProto([][Symbol.iterator]()) : undefined$1, |
| 616 | + '%ArrayIteratorPrototype%': hasSymbols$1 ? getProto([][Symbol.iterator]()) : undefined$1, |
664 | 617 | '%AsyncFromSyncIteratorPrototype%': undefined$1,
|
665 | 618 | '%AsyncFunction%': needsEval,
|
666 | 619 | '%AsyncGenerator%': needsEval,
|
|
690 | 643 | '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
691 | 644 | '%isFinite%': isFinite,
|
692 | 645 | '%isNaN%': isNaN,
|
693 |
| - '%IteratorPrototype%': hasSymbols$1 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1, |
| 646 | + '%IteratorPrototype%': hasSymbols$1 ? getProto(getProto([][Symbol.iterator]())) : undefined$1, |
694 | 647 | '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
695 | 648 | '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
696 |
| - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()), |
| 649 | + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Map()[Symbol.iterator]()), |
697 | 650 | '%Math%': Math,
|
698 | 651 | '%Number%': Number,
|
699 | 652 | '%Object%': Object,
|
|
706 | 659 | '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
707 | 660 | '%RegExp%': RegExp,
|
708 | 661 | '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
709 |
| - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()), |
| 662 | + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Set()[Symbol.iterator]()), |
710 | 663 | '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
711 | 664 | '%String%': String,
|
712 |
| - '%StringIteratorPrototype%': hasSymbols$1 && getProto ? getProto(''[Symbol.iterator]()) : undefined$1, |
| 665 | + '%StringIteratorPrototype%': hasSymbols$1 ? getProto(''[Symbol.iterator]()) : undefined$1, |
713 | 666 | '%Symbol%': hasSymbols$1 ? Symbol : undefined$1,
|
714 | 667 | '%SyntaxError%': $SyntaxError,
|
715 | 668 | '%ThrowTypeError%': ThrowTypeError,
|
|
725 | 678 | '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
726 | 679 | };
|
727 | 680 |
|
728 |
| - if (getProto) { |
729 |
| - try { |
730 |
| - null.error; // eslint-disable-line no-unused-expressions |
731 |
| - } catch (e) { |
732 |
| - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 |
733 |
| - var errorProto = getProto(getProto(e)); |
734 |
| - INTRINSICS['%Error.prototype%'] = errorProto; |
735 |
| - } |
| 681 | + try { |
| 682 | + null.error; // eslint-disable-line no-unused-expressions |
| 683 | + } catch (e) { |
| 684 | + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 |
| 685 | + var errorProto = getProto(getProto(e)); |
| 686 | + INTRINSICS['%Error.prototype%'] = errorProto; |
736 | 687 | }
|
737 | 688 |
|
738 | 689 | var doEval = function doEval(name) {
|
|
750 | 701 | }
|
751 | 702 | } else if (name === '%AsyncIteratorPrototype%') {
|
752 | 703 | var gen = doEval('%AsyncGenerator%');
|
753 |
| - if (gen && getProto) { |
| 704 | + if (gen) { |
754 | 705 | value = getProto(gen.prototype);
|
755 | 706 | }
|
756 | 707 | }
|
|
1943 | 1894 | };
|
1944 | 1895 |
|
1945 | 1896 | var isArray$3 = Array.isArray;
|
| 1897 | + var split = String.prototype.split; |
1946 | 1898 | var push = Array.prototype.push;
|
1947 | 1899 | var pushToArray = function (arr, valueOrArray) {
|
1948 | 1900 | push.apply(arr, isArray$3(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
2044 | 1996 | if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
2045 | 1997 | if (encoder) {
|
2046 | 1998 | var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
| 1999 | + if (generateArrayPrefix === 'comma' && encodeValuesOnly) { |
| 2000 | + var valuesArray = split.call(String(obj), ','); |
| 2001 | + var valuesJoined = ''; |
| 2002 | + for (var i = 0; i < valuesArray.length; ++i) { |
| 2003 | + valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format)); |
| 2004 | + } |
| 2005 | + return [formatter(keyValue) + (commaRoundTrip && isArray$3(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined]; |
| 2006 | + } |
2047 | 2007 | return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
2048 | 2008 | }
|
2049 | 2009 | return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
2058 | 2018 | var objKeys;
|
2059 | 2019 | if (generateArrayPrefix === 'comma' && isArray$3(obj)) {
|
2060 | 2020 | // we need to join elements in
|
2061 |
| - if (encodeValuesOnly && encoder) { |
2062 |
| - obj = utils.maybeMap(obj, encoder); |
2063 |
| - } |
2064 | 2021 | objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
2065 | 2022 | } else if (isArray$3(filter)) {
|
2066 | 2023 | objKeys = filter;
|
|
2093 | 2050 | commaRoundTrip,
|
2094 | 2051 | strictNullHandling,
|
2095 | 2052 | skipNulls,
|
2096 |
| - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$3(obj) ? null : encoder, |
| 2053 | + encoder, |
2097 | 2054 | filter,
|
2098 | 2055 | sort,
|
2099 | 2056 | allowDots,
|
|
2290 | 2247 | var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
2291 | 2248 |
|
2292 | 2249 | var parseValues = function parseQueryStringValues(str, options) {
|
2293 |
| - var obj = { __proto__: null }; |
2294 |
| - |
| 2250 | + var obj = {}; |
2295 | 2251 | var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
2296 | 2252 | var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
2297 | 2253 | var parts = cleanStr.split(options.delimiter, limit);
|
|
0 commit comments