(http://auth0.com)
- * Date: 08/02/2022, 15:03:19
+ * Date: 05/05/2022, 11:36:29
* License: MIT
*
*//******/ (function(modules) { // webpackBootstrap
@@ -1852,7 +1852,7 @@ module.exports = ReactDOMComponentTree;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__sync__ = __webpack_require__(28);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_trim__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_trim___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_trim__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_tenant__ = __webpack_require__(67);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_tenant__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__connection_enterprise__ = __webpack_require__(13);
@@ -7349,14 +7349,14 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_immutable__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_format__ = __webpack_require__(120);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify__ = __webpack_require__(77);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_dompurify__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__sync__ = __webpack_require__(28);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_data_utils__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__i18n_en__ = __webpack_require__(200);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__i18n_en___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__i18n_en__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_cdn_utils__ = __webpack_require__(76);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_cdn_utils__ = __webpack_require__(77);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -7452,7 +7452,7 @@ function assertLanguage(m, language, base) {
function syncLang(m, language, _cb) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_cdn_utils__["a" /* load */])({
method: 'registerLanguageDictionary',
- url: __WEBPACK_IMPORTED_MODULE_5__core_index__["languageBaseUrl"](m) + '/js/lock/' + '11.32.2' + '/' + language + '.js',
+ url: __WEBPACK_IMPORTED_MODULE_5__core_index__["languageBaseUrl"](m) + '/js/lock/' + '11.33.0' + '/' + language + '.js',
check: function check(str) {
return str && str === language;
},
@@ -7504,7 +7504,7 @@ if (typeof window !== 'undefined') {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_index__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_data_utils__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_email__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_username__ = __webpack_require__(71);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_username__ = __webpack_require__(72);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__engine_classic__ = __webpack_require__(34);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__database_index__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__store_index__ = __webpack_require__(8);
@@ -8415,7 +8415,7 @@ var CallbackQueue = __webpack_require__(128);
var PooledClass = __webpack_require__(30);
var ReactFeatureFlags = __webpack_require__(133);
var ReactReconciler = __webpack_require__(37);
-var Transaction = __webpack_require__(61);
+var Transaction = __webpack_require__(62);
var invariant = __webpack_require__(2);
@@ -9159,13 +9159,13 @@ var Auth0WebAPI = function () {
/* harmony export (immutable) */ __webpack_exports__["b"] = cancelMFALogin;
/* harmony export (immutable) */ __webpack_exports__["d"] = toggleTermsAcceptance;
/* unused harmony export showLoginMFAActivity */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_web_api__ = __webpack_require__(26);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_actions__ = __webpack_require__(16);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_web_api__ = __webpack_require__(26);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_actions__ = __webpack_require__(16);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_index__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dompurify__ = __webpack_require__(58);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dompurify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dompurify__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__i18n__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__captcha__ = __webpack_require__(40);
@@ -9180,17 +9180,18 @@ var Auth0WebAPI = function () {
+
function logIn(id) {
var needsMFA = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
var usernameField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username';
- var username = __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, usernameField);
+ var username = __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, usernameField);
var params = {
connection: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["m" /* databaseConnectionName */])(m),
username: username,
- password: __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'password')
+ password: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'password')
};
var fields = [usernameField, 'password'];
@@ -9200,14 +9201,14 @@ function logIn(id) {
return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__captcha__["b" /* showMissingCaptcha */])(m, id);
}
- var mfaCode = __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'mfa_code');
+ var mfaCode = __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'mfa_code');
if (needsMFA) {
params['mfa_code'] = mfaCode;
fields.push('mfa_code');
}
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_actions__["h" /* logIn */])(id, fields, params, function (id, error, fields, next) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["h" /* logIn */])(id, fields, params, function (id, error, fields, next) {
if (error.error === 'a0.mfa_required') {
return showLoginMFAActivity(id);
}
@@ -9232,7 +9233,7 @@ function generateRandomUsername(length) {
}
function signUp(id) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
var fields = ['email', 'password'];
// Skip the username validation if signUpHideUsernameField option is enabled.
@@ -9243,11 +9244,11 @@ function signUp(id) {
return fields.push(x.get('name'));
});
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_actions__["i" /* validateAndSubmit */])(id, fields, function (m) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["i" /* validateAndSubmit */])(id, fields, function (m) {
var params = {
connection: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["m" /* databaseConnectionName */])(m),
- email: __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'email'),
- password: __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'password'),
+ email: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'email'),
+ password: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'password'),
autoLogin: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["q" /* shouldAutoLogin */])(m)
};
@@ -9262,7 +9263,7 @@ function signUp(id) {
var range = usernameValidation ? usernameValidation.toJS() : { max: 15 };
params.username = generateRandomUsername(range.max);
} else {
- params.username = __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'username');
+ params.username = __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'username');
}
}
@@ -9271,7 +9272,8 @@ function signUp(id) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["p" /* additionalSignUpFields */])(m).forEach(function (x) {
var storage = x.get('storage');
var fieldName = x.get('name');
- var fieldValue = __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, x.get('name'));
+ var fieldValue = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5_dompurify__["sanitize"])(__WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, x.get('name')), { ALLOWED_TAGS: [] });
+
switch (storage) {
case 'root':
params[fieldName] = fieldValue;
@@ -9305,8 +9307,8 @@ function signUp(id) {
// If we need it later, it'll save a breaking change in hooks already in use.
var context = null;
- __WEBPACK_IMPORTED_MODULE_4__core_index__["runHook"](m, 'signingUp', context, function () {
- __WEBPACK_IMPORTED_MODULE_2__core_web_api__["a" /* default */].signUp(id, params, function (error, result, popupHandler) {
+ __WEBPACK_IMPORTED_MODULE_3__core_index__["runHook"](m, 'signingUp', context, function () {
+ __WEBPACK_IMPORTED_MODULE_1__core_web_api__["a" /* default */].signUp(id, params, function (error, result, popupHandler) {
for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
@@ -9325,27 +9327,27 @@ function signUp(id) {
}
function signUpSuccess(id, result, popupHandler) {
- var lock = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var lock = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
- __WEBPACK_IMPORTED_MODULE_4__core_index__["emitEvent"](lock, 'signup success', result);
+ __WEBPACK_IMPORTED_MODULE_3__core_index__["emitEvent"](lock, 'signup success', result);
if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["q" /* shouldAutoLogin */])(lock)) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
return m.set('signedUp', true);
});
// TODO: check options, redirect is missing
var options = {
connection: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["m" /* databaseConnectionName */])(lock),
- username: __WEBPACK_IMPORTED_MODULE_5__field_index__["g" /* email */](lock),
- password: __WEBPACK_IMPORTED_MODULE_5__field_index__["h" /* password */](lock)
+ username: __WEBPACK_IMPORTED_MODULE_4__field_index__["g" /* email */](lock),
+ password: __WEBPACK_IMPORTED_MODULE_4__field_index__["h" /* password */](lock)
};
if (!!popupHandler) {
options.popupHandler = popupHandler;
}
- return __WEBPACK_IMPORTED_MODULE_2__core_web_api__["a" /* default */].logIn(id, options, __WEBPACK_IMPORTED_MODULE_4__core_index__["auth"].params(lock).toJS(), function (error) {
+ return __WEBPACK_IMPORTED_MODULE_1__core_web_api__["a" /* default */].logIn(id, options, __WEBPACK_IMPORTED_MODULE_3__core_index__["auth"].params(lock).toJS(), function (error) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
@@ -9355,24 +9357,24 @@ function signUpSuccess(id, result, popupHandler) {
return autoLogInError(id, error);
}, 250);
} else {
- __WEBPACK_IMPORTED_MODULE_3__core_actions__["j" /* logInSuccess */].apply(undefined, [id].concat(args));
+ __WEBPACK_IMPORTED_MODULE_2__core_actions__["j" /* logInSuccess */].apply(undefined, [id].concat(args));
}
});
}
- var autoclose = __WEBPACK_IMPORTED_MODULE_4__core_index__["ui"].autoclose(lock);
+ var autoclose = __WEBPACK_IMPORTED_MODULE_3__core_index__["ui"].autoclose(lock);
if (!autoclose) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (lock) {
- return __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"](lock, false).set('signedUp', true);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (lock) {
+ return __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"](lock, false).set('signedUp', true);
});
} else {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_actions__["c" /* closeLock */])(id, false);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["c" /* closeLock */])(id, false);
}
}
function signUpError(id, error) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
var invalidPasswordKeys = {
PasswordDictionaryError: 'password_dictionary_error',
@@ -9380,46 +9382,46 @@ function signUpError(id, error) {
PasswordStrengthError: 'password_strength_error'
};
- __WEBPACK_IMPORTED_MODULE_4__core_index__["emitEvent"](m, 'signup error', error);
+ __WEBPACK_IMPORTED_MODULE_3__core_index__["emitEvent"](m, 'signup error', error);
var errorKey = error.code === 'invalid_password' && invalidPasswordKeys[error.name] || error.code;
var errorMessage = __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['error', 'signUp', errorKey]) || __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['error', 'signUp', 'lock.fallback']);
if (error.code === 'hook_error') {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"], false, error.description || errorMessage);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"], false, error.description || errorMessage);
return;
}
if (errorKey === 'invalid_captcha') {
errorMessage = __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['error', 'login', errorKey]);
return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__captcha__["c" /* swapCaptcha */])(id, true, function () {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"], false, errorMessage);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"], false, errorMessage);
});
}
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"], false, errorMessage);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"], false, errorMessage);
}
function autoLogInError(id, error) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- var errorMessage = __WEBPACK_IMPORTED_MODULE_4__core_index__["loginErrorMessage"](m, error);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ var errorMessage = __WEBPACK_IMPORTED_MODULE_3__core_index__["loginErrorMessage"](m, error);
if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["i" /* hasScreen */])(m, 'login')) {
- return __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */])(m, 'login'), false, errorMessage);
+ return __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */])(m, 'login'), false, errorMessage);
} else {
- return __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"](m, false, errorMessage);
+ return __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"](m, false, errorMessage);
}
});
}
function resetPassword(id) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_actions__["i" /* validateAndSubmit */])(id, ['email'], function (m) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["i" /* validateAndSubmit */])(id, ['email'], function (m) {
var params = {
connection: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["m" /* databaseConnectionName */])(m),
- email: __WEBPACK_IMPORTED_MODULE_5__field_index__["c" /* getFieldValue */](m, 'email')
+ email: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'email')
};
- __WEBPACK_IMPORTED_MODULE_2__core_web_api__["a" /* default */].resetPassword(id, params, function (error) {
+ __WEBPACK_IMPORTED_MODULE_1__core_web_api__["a" /* default */].resetPassword(id, params, function (error) {
if (error) {
setTimeout(function () {
return resetPasswordError(id, error);
@@ -9432,53 +9434,53 @@ function resetPassword(id) {
}
function resetPasswordSuccess(id) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["i" /* hasScreen */])(m, 'login')) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */])(__WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"](m, false), 'login', ['']);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */])(__WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"](m, false), 'login', ['']);
} // array with one empty string tells the function to not clear any field
);
// TODO: should be handled by box
setTimeout(function () {
var successMessage = __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['success', 'forgotPassword']);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_4__core_index__["setGlobalSuccess"], successMessage);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_3__core_index__["setGlobalSuccess"], successMessage);
}, 500);
} else {
- if (__WEBPACK_IMPORTED_MODULE_4__core_index__["ui"].autoclose(m)) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__core_actions__["c" /* closeLock */])(id);
+ if (__WEBPACK_IMPORTED_MODULE_3__core_index__["ui"].autoclose(m)) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["c" /* closeLock */])(id);
} else {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- return __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"](m, false).set('passwordResetted', true);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ return __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"](m, false).set('passwordResetted', true);
});
}
}
}
function resetPasswordError(id, error) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["e" /* getEntity */], 'lock', id);
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
var errorMessage = __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['error', 'forgotPassword', error.code]) || __WEBPACK_IMPORTED_MODULE_7__i18n__["html"](m, ['error', 'forgotPassword', 'lock.fallback']);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_4__core_index__["setSubmitting"], false, errorMessage);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_3__core_index__["setSubmitting"], false, errorMessage);
}
function showLoginActivity(id) {
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['password'];
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'login', fields);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'login', fields);
}
function showSignUpActivity(id) {
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['password'];
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'signUp', fields);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'signUp', fields);
}
function showResetPasswordActivity(id) {
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['password'];
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'forgotPassword', fields);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'forgotPassword', fields);
}
function cancelResetPassword(id) {
@@ -9490,13 +9492,13 @@ function cancelMFALogin(id) {
}
function toggleTermsAcceptance(id) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["t" /* toggleTermsAcceptance */]);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["t" /* toggleTermsAcceptance */]);
}
function showLoginMFAActivity(id) {
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['mfa_code'];
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'mfaLogin', fields);
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["s" /* setScreen */], 'mfaLogin', fields);
}
/***/ }),
@@ -9890,12 +9892,15 @@ function resendEmailError(id, error) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_6__index__["k" /* setResendFailed */]);
}
-function sendEmail(m, successFn, errorFn) {
- var connections = __WEBPACK_IMPORTED_MODULE_5__core_index__["connections"](m, 'passwordless', 'email');
- var connectionName = connections.size > 0 && __WEBPACK_IMPORTED_MODULE_5__core_index__["useCustomPasswordlessConnection"](m) ? connections.first().get('name') : 'email';
+function getPasswordlessConnectionName(m, defaultPasswordlessConnection) {
+ var connections = __WEBPACK_IMPORTED_MODULE_5__core_index__["connections"](m, 'passwordless', defaultPasswordlessConnection);
+
+ return connections.size > 0 && __WEBPACK_IMPORTED_MODULE_5__core_index__["useCustomPasswordlessConnection"](m) ? connections.first().get('name') : defaultPasswordlessConnection;
+}
+function sendEmail(m, successFn, errorFn) {
var params = {
- connection: connectionName,
+ connection: getPasswordlessConnectionName(m, 'email'),
email: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'email'),
send: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["l" /* send */])(m)
};
@@ -9917,11 +9922,8 @@ function sendEmail(m, successFn, errorFn) {
function sendSMS(id) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__core_actions__["i" /* validateAndSubmit */])(id, ['phoneNumber'], function (m) {
- var connections = __WEBPACK_IMPORTED_MODULE_5__core_index__["connections"](m, 'passwordless', 'sms');
- var connectionName = connections.size > 0 && __WEBPACK_IMPORTED_MODULE_5__core_index__["useCustomPasswordlessConnection"](m) ? connections.first().get('name') : 'sms';
-
var params = {
- connection: connectionName,
+ connection: getPasswordlessConnectionName(m, 'sms'),
phoneNumber: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__field_phone_number__["c" /* phoneNumberWithDiallingCode */])(m),
send: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["l" /* send */])(m)
};
@@ -9959,10 +9961,10 @@ function logIn(id) {
verificationCode: __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'vcode')
}, authParams);
if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["b" /* isEmail */])(m)) {
- params.connection = 'email';
+ params.connection = getPasswordlessConnectionName(m, 'email');
params.email = __WEBPACK_IMPORTED_MODULE_4__field_index__["c" /* getFieldValue */](m, 'email');
} else {
- params.connection = 'sms';
+ params.connection = getPasswordlessConnectionName(m, 'sms');
params.phoneNumber = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__field_phone_number__["c" /* phoneNumberWithDiallingCode */])(m);
}
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_5__core_index__["setSubmitting"], true);
@@ -10169,14 +10171,14 @@ function toggleTermsAcceptance(m) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_sso_index__ = __webpack_require__(51);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__connection_database_index__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__connection_enterprise__ = __webpack_require__(13);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_tenant__ = __webpack_require__(67);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_tenant__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__field_email__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__field_username__ = __webpack_require__(71);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__field_username__ = __webpack_require__(72);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__connection_enterprise_kerberos_screen__ = __webpack_require__(172);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__connection_enterprise_hrd_screen__ = __webpack_require__(171);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__connection_enterprise_quick_auth_screen__ = __webpack_require__(173);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__quick_auth__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__quick_auth__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__core_loading_screen__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__core_error_screen__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__core_sso_last_login_screen__ = __webpack_require__(114);
@@ -10393,7 +10395,7 @@ Classic.SCREENS = {
var DOMNamespaces = __webpack_require__(86);
-var setInnerHTML = __webpack_require__(63);
+var setInnerHTML = __webpack_require__(64);
var createMicrosoftUnsafeLocalFunction = __webpack_require__(94);
var setTextContent = __webpack_require__(146);
@@ -12577,7 +12579,7 @@ SocialButtonsPane.defaultProps = {
/* harmony export (immutable) */ __webpack_exports__["c"] = skipQuickAuth;
/* harmony export (immutable) */ __webpack_exports__["a"] = logIn;
/* harmony export (immutable) */ __webpack_exports__["b"] = checkSession;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quick_auth__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quick_auth__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__store_index__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_actions__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_index__ = __webpack_require__(1);
@@ -12814,3642 +12816,3659 @@ function isSmallScreen() {
/***/ }),
/* 58 */
-/***/ (function(module, exports) {
+/***/ (function(module, exports, __webpack_require__) {
-// shim for using process in browser
-var process = module.exports = {};
+/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
+(function (global, factory) {
+ true ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.DOMPurify = factory());
+}(this, function () { 'use strict';
-var cachedSetTimeout;
-var cachedClearTimeout;
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
+ var hasOwnProperty = Object.hasOwnProperty,
+ setPrototypeOf = Object.setPrototypeOf,
+ isFrozen = Object.isFrozen,
+ getPrototypeOf = Object.getPrototypeOf,
+ getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var freeze = Object.freeze,
+ seal = Object.seal,
+ create = Object.create; // eslint-disable-line import/no-mutable-exports
+
+ var _ref = typeof Reflect !== 'undefined' && Reflect,
+ apply = _ref.apply,
+ construct = _ref.construct;
+
+ if (!apply) {
+ apply = function apply(fun, thisValue, args) {
+ return fun.apply(thisValue, args);
+ };
+ }
+
+ if (!freeze) {
+ freeze = function freeze(x) {
+ return x;
+ };
+ }
+
+ if (!seal) {
+ seal = function seal(x) {
+ return x;
+ };
+ }
+
+ if (!construct) {
+ construct = function construct(Func, args) {
+ return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();
+ };
+ }
+
+ var arrayForEach = unapply(Array.prototype.forEach);
+ var arrayPop = unapply(Array.prototype.pop);
+ var arrayPush = unapply(Array.prototype.push);
+
+ var stringToLowerCase = unapply(String.prototype.toLowerCase);
+ var stringMatch = unapply(String.prototype.match);
+ var stringReplace = unapply(String.prototype.replace);
+ var stringIndexOf = unapply(String.prototype.indexOf);
+ var stringTrim = unapply(String.prototype.trim);
+
+ var regExpTest = unapply(RegExp.prototype.test);
+
+ var typeErrorCreate = unconstruct(TypeError);
+
+ function unapply(func) {
+ return function (thisArg) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ return apply(func, thisArg, args);
+ };
+ }
+
+ function unconstruct(func) {
+ return function () {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return construct(func, args);
+ };
+ }
+
+ /* Add properties to a lookup table */
+ function addToSet(set, array) {
+ if (setPrototypeOf) {
+ // Make 'in' and truthy checks like Boolean(set.constructor)
+ // independent of any properties defined on Object.prototype.
+ // Prevent prototype setters from intercepting set as a this value.
+ setPrototypeOf(set, null);
}
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
+
+ var l = array.length;
+ while (l--) {
+ var element = array[l];
+ if (typeof element === 'string') {
+ var lcElement = stringToLowerCase(element);
+ if (lcElement !== element) {
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
+ if (!isFrozen(array)) {
+ array[l] = lcElement;
+ }
+
+ element = lcElement;
}
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
+ }
+
+ set[element] = true;
}
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
+
+ return set;
+ }
+
+ /* Shallow clone an object */
+ function clone(object) {
+ var newObject = create(null);
+
+ var property = void 0;
+ for (property in object) {
+ if (apply(hasOwnProperty, object, [property])) {
+ newObject[property] = object[property];
+ }
}
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
+
+ return newObject;
+ }
+
+ /* IE10 doesn't support __lookupGetter__ so lets'
+ * simulate it. It also automatically checks
+ * if the prop is function or getter and behaves
+ * accordingly. */
+ function lookupGetter(object, prop) {
+ while (object !== null) {
+ var desc = getOwnPropertyDescriptor(object, prop);
+ if (desc) {
+ if (desc.get) {
+ return unapply(desc.get);
}
- }
+ if (typeof desc.value === 'function') {
+ return unapply(desc.value);
+ }
+ }
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
+ object = getPrototypeOf(object);
}
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
+
+ function fallbackValue(element) {
+ console.warn('fallback value for', element);
+ return null;
}
+ return fallbackValue;
+ }
+ var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
+ // SVG
+ var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
+ var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
-function drainQueue() {
- if (draining) {
- return;
+ // List of SVG elements that are disallowed by default.
+ // We still need to know them so that we can do namespace
+ // checks properly in case one wants to add them to
+ // allow-list.
+ var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
+
+ var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);
+
+ // Similarly to SVG, we want to know all MathML elements,
+ // even those that we disallow by default.
+ var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
+
+ var text = freeze(['#text']);
+
+ var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
+
+ var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
+
+ var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
+
+ var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
+
+ // eslint-disable-next-line unicorn/better-regex
+ var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
+ var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm);
+ var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
+ var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
+ var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
+ );
+ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
+ var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
+ );
+ var DOCTYPE_NAME = seal(/^html$/i);
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+ function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+ var getGlobal = function getGlobal() {
+ return typeof window === 'undefined' ? null : window;
+ };
+
+ /**
+ * Creates a no-op policy for internal use only.
+ * Don't export this function outside this module!
+ * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
+ * @param {Document} document The document object (to determine policy name suffix)
+ * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
+ * are not supported).
+ */
+ var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
+ if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
+ return null;
}
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
+ // Allow the callers to control the unique policy name
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
+ // Policy creation with duplicate names throws in Trusted Types.
+ var suffix = null;
+ var ATTR_NAME = 'data-tt-policy-suffix';
+ if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
+ suffix = document.currentScript.getAttribute(ATTR_NAME);
}
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
+ var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
+
+ try {
+ return trustedTypes.createPolicy(policyName, {
+ createHTML: function createHTML(html$$1) {
+ return html$$1;
}
+ });
+ } catch (_) {
+ // Policy creation failed (most likely another DOMPurify script has
+ // already run). Skip creating the policy, as this will only cause errors
+ // if TT are enforced.
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
+ return null;
}
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
+ };
+
+ function createDOMPurify() {
+ var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
+
+ var DOMPurify = function DOMPurify(root) {
+ return createDOMPurify(root);
+ };
+
+ /**
+ * Version label, exposed for easier checks
+ * if DOMPurify is up to date or not
+ */
+ DOMPurify.version = '2.3.6';
+
+ /**
+ * Array of elements that DOMPurify removed during sanitation.
+ * Empty if nothing was removed.
+ */
+ DOMPurify.removed = [];
+
+ if (!window || !window.document || window.document.nodeType !== 9) {
+ // Not running in a browser, provide a factory function
+ // so that you can pass your own Window
+ DOMPurify.isSupported = false;
+
+ return DOMPurify;
}
-};
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
+ var originalDocument = window.document;
-function noop() {}
+ var document = window.document;
+ var DocumentFragment = window.DocumentFragment,
+ HTMLTemplateElement = window.HTMLTemplateElement,
+ Node = window.Node,
+ Element = window.Element,
+ NodeFilter = window.NodeFilter,
+ _window$NamedNodeMap = window.NamedNodeMap,
+ NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
+ HTMLFormElement = window.HTMLFormElement,
+ DOMParser = window.DOMParser,
+ trustedTypes = window.trustedTypes;
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-process.listeners = function (name) { return [] }
+ var ElementPrototype = Element.prototype;
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
+ var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
+ var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
+ var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
+ var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
+ // As per issue #47, the web-components registry is inherited by a
+ // new document created via createHTMLDocument. As per the spec
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
+ // a new empty registry is used when creating a template contents owner
+ // document, so we use that as our parent document to ensure nothing
+ // is inherited.
+ if (typeof HTMLTemplateElement === 'function') {
+ var template = document.createElement('template');
+ if (template.content && template.content.ownerDocument) {
+ document = template.content.ownerDocument;
+ }
+ }
+ var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
+ var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
-/***/ }),
-/* 59 */
-/***/ (function(module, exports, __webpack_require__) {
+ var _document = document,
+ implementation = _document.implementation,
+ createNodeIterator = _document.createNodeIterator,
+ createDocumentFragment = _document.createDocumentFragment,
+ getElementsByTagName = _document.getElementsByTagName;
+ var importNode = originalDocument.importNode;
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
+ var documentMode = {};
+ try {
+ documentMode = clone(document).documentMode ? document.documentMode : {};
+ } catch (_) {}
+ var hooks = {};
-var _assign = __webpack_require__(7);
+ /**
+ * Expose whether this browser supports running the full DOMPurify.
+ */
+ DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
-var EventPluginRegistry = __webpack_require__(87);
-var ReactEventEmitterMixin = __webpack_require__(293);
-var ViewportMetrics = __webpack_require__(138);
+ var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,
+ ERB_EXPR$$1 = ERB_EXPR,
+ DATA_ATTR$$1 = DATA_ATTR,
+ ARIA_ATTR$$1 = ARIA_ATTR,
+ IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,
+ ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;
+ var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;
-var getVendorPrefixedEventName = __webpack_require__(325);
-var isEventSupported = __webpack_require__(98);
+ /**
+ * We consider the elements and attributes below to be safe. Ideally
+ * don't add any new ones but feel free to remove unwanted ones.
+ */
-/**
- * Summary of `ReactBrowserEventEmitter` event handling:
- *
- * - Top-level delegation is used to trap most native browser events. This
- * may only occur in the main thread and is the responsibility of
- * ReactEventListener, which is injected and can therefore support pluggable
- * event sources. This is the only work that occurs in the main thread.
- *
- * - We normalize and de-duplicate events to account for browser quirks. This
- * may be done in the worker thread.
- *
- * - Forward these native events (with the associated top-level type used to
- * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
- * to extract any synthetic events.
- *
- * - The `EventPluginHub` will then process each event by annotating them with
- * "dispatches", a sequence of listeners and IDs that care about that event.
- *
- * - The `EventPluginHub` then dispatches the events.
- *
- * Overview of React and the event system:
- *
- * +------------+ .
- * | DOM | .
- * +------------+ .
- * | .
- * v .
- * +------------+ .
- * | ReactEvent | .
- * | Listener | .
- * +------------+ . +-----------+
- * | . +--------+|SimpleEvent|
- * | . | |Plugin |
- * +-----|------+ . v +-----------+
- * | | | . +--------------+ +------------+
- * | +-----------.--->|EventPluginHub| | Event |
- * | | . | | +-----------+ | Propagators|
- * | ReactEvent | . | | |TapEvent | |------------|
- * | Emitter | . | |<---+|Plugin | |other plugin|
- * | | . | | +-----------+ | utilities |
- * | +-----------.--->| | +------------+
- * | | | . +--------------+
- * +-----|------+ . ^ +-----------+
- * | . | |Enter/Leave|
- * + . +-------+|Plugin |
- * +-------------+ . +-----------+
- * | application | .
- * |-------------| .
- * | | .
- * | | .
- * +-------------+ .
- * .
- * React Core . General Purpose Event Plugin System
- */
-
-var hasEventPageXY;
-var alreadyListeningTo = {};
-var isMonitoringScrollValue = false;
-var reactTopListenersCounter = 0;
-
-// For events like 'submit' which don't consistently bubble (which we trap at a
-// lower node than `document`), binding at `document` would cause duplicate
-// events so we don't include them here
-var topEventMapping = {
- topAbort: 'abort',
- topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
- topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
- topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
- topBlur: 'blur',
- topCanPlay: 'canplay',
- topCanPlayThrough: 'canplaythrough',
- topChange: 'change',
- topClick: 'click',
- topCompositionEnd: 'compositionend',
- topCompositionStart: 'compositionstart',
- topCompositionUpdate: 'compositionupdate',
- topContextMenu: 'contextmenu',
- topCopy: 'copy',
- topCut: 'cut',
- topDoubleClick: 'dblclick',
- topDrag: 'drag',
- topDragEnd: 'dragend',
- topDragEnter: 'dragenter',
- topDragExit: 'dragexit',
- topDragLeave: 'dragleave',
- topDragOver: 'dragover',
- topDragStart: 'dragstart',
- topDrop: 'drop',
- topDurationChange: 'durationchange',
- topEmptied: 'emptied',
- topEncrypted: 'encrypted',
- topEnded: 'ended',
- topError: 'error',
- topFocus: 'focus',
- topInput: 'input',
- topKeyDown: 'keydown',
- topKeyPress: 'keypress',
- topKeyUp: 'keyup',
- topLoadedData: 'loadeddata',
- topLoadedMetadata: 'loadedmetadata',
- topLoadStart: 'loadstart',
- topMouseDown: 'mousedown',
- topMouseMove: 'mousemove',
- topMouseOut: 'mouseout',
- topMouseOver: 'mouseover',
- topMouseUp: 'mouseup',
- topPaste: 'paste',
- topPause: 'pause',
- topPlay: 'play',
- topPlaying: 'playing',
- topProgress: 'progress',
- topRateChange: 'ratechange',
- topScroll: 'scroll',
- topSeeked: 'seeked',
- topSeeking: 'seeking',
- topSelectionChange: 'selectionchange',
- topStalled: 'stalled',
- topSuspend: 'suspend',
- topTextInput: 'textInput',
- topTimeUpdate: 'timeupdate',
- topTouchCancel: 'touchcancel',
- topTouchEnd: 'touchend',
- topTouchMove: 'touchmove',
- topTouchStart: 'touchstart',
- topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
- topVolumeChange: 'volumechange',
- topWaiting: 'waiting',
- topWheel: 'wheel'
-};
-
-/**
- * To ensure no conflicts with other potential React instances on the page
- */
-var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
+ /* allowed element names */
-function getListeningForDocument(mountAt) {
- // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
- // directly.
- if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
- mountAt[topListenersIDKey] = reactTopListenersCounter++;
- alreadyListeningTo[mountAt[topListenersIDKey]] = {};
- }
- return alreadyListeningTo[mountAt[topListenersIDKey]];
-}
+ var ALLOWED_TAGS = null;
+ var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));
-/**
- * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
- * example:
- *
- * EventPluginHub.putListener('myID', 'onClick', myFunction);
- *
- * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
- *
- * @internal
- */
-var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
- /**
- * Injectable event backend
- */
- ReactEventListener: null,
+ /* Allowed attribute names */
+ var ALLOWED_ATTR = null;
+ var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));
- injection: {
- /**
- * @param {object} ReactEventListener
+ /*
+ * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
*/
- injectReactEventListener: function (ReactEventListener) {
- ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
- ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
- }
- },
-
- /**
- * Sets whether or not any created callbacks should be enabled.
- *
- * @param {boolean} enabled True if callbacks should be enabled.
- */
- setEnabled: function (enabled) {
- if (ReactBrowserEventEmitter.ReactEventListener) {
- ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
- }
- },
-
- /**
- * @return {boolean} True if callbacks are enabled.
- */
- isEnabled: function () {
- return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
- },
-
- /**
- * We listen for bubbled touch events on the document object.
- *
- * Firefox v8.01 (and possibly others) exhibited strange behavior when
- * mounting `onmousemove` events at some node that was not the document
- * element. The symptoms were that if your mouse is not moving over something
- * contained within that mount point (for example on the background) the
- * top-level listeners for `onmousemove` won't be called. However, if you
- * register the `mousemove` on the document object, then it will of course
- * catch all `mousemove`s. This along with iOS quirks, justifies restricting
- * top-level listeners to the document object only, at least for these
- * movement types of events and possibly all events.
- *
- * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- *
- * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
- * they bubble to document.
- *
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @param {object} contentDocumentHandle Document which owns the container
- */
- listenTo: function (registrationName, contentDocumentHandle) {
- var mountAt = contentDocumentHandle;
- var isListening = getListeningForDocument(mountAt);
- var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
-
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
- if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
- if (dependency === 'topWheel') {
- if (isEventSupported('wheel')) {
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
- } else if (isEventSupported('mousewheel')) {
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
- } else {
- // Firefox needs to capture a different mouse scroll event.
- // @see http://www.quirksmode.org/dom/events/tests/scroll.html
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
- }
- } else if (dependency === 'topScroll') {
- if (isEventSupported('scroll', true)) {
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
- } else {
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
- }
- } else if (dependency === 'topFocus' || dependency === 'topBlur') {
- if (isEventSupported('focus', true)) {
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
- ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
- } else if (isEventSupported('focusin')) {
- // IE has `focusin` and `focusout` events which bubble.
- // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
- }
-
- // to make sure blur and focus event listeners are only attached once
- isListening.topBlur = true;
- isListening.topFocus = true;
- } else if (topEventMapping.hasOwnProperty(dependency)) {
- ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
- }
-
- isListening[dependency] = true;
+ var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
+ tagNameCheck: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: null
+ },
+ attributeNameCheck: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: null
+ },
+ allowCustomizedBuiltInElements: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: false
}
- }
- },
-
- trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
- return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
- },
-
- trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
- return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
- },
-
- /**
- * Protect against document.createEvent() returning null
- * Some popup blocker extensions appear to do this:
- * https://github.com/facebook/react/issues/6887
- */
- supportsEventPageXY: function () {
- if (!document.createEvent) {
- return false;
- }
- var ev = document.createEvent('MouseEvent');
- return ev != null && 'pageX' in ev;
- },
+ }));
- /**
- * Listens to window scroll and resize events. We cache scroll values so that
- * application code can access them without triggering reflows.
- *
- * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
- * pageX/pageY isn't supported (legacy browsers).
- *
- * NOTE: Scroll events do not bubble.
- *
- * @see http://www.quirksmode.org/dom/events/scroll.html
- */
- ensureScrollValueMonitoring: function () {
- if (hasEventPageXY === undefined) {
- hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
- }
- if (!hasEventPageXY && !isMonitoringScrollValue) {
- var refresh = ViewportMetrics.refreshScrollValues;
- ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
- isMonitoringScrollValue = true;
- }
- }
-});
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
+ var FORBID_TAGS = null;
-module.exports = ReactBrowserEventEmitter;
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
+ var FORBID_ATTR = null;
-/***/ }),
-/* 60 */
-/***/ (function(module, exports, __webpack_require__) {
+ /* Decide if ARIA attributes are okay */
+ var ALLOW_ARIA_ATTR = true;
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
+ /* Decide if custom data attributes are okay */
+ var ALLOW_DATA_ATTR = true;
+ /* Decide if unknown protocols are okay */
+ var ALLOW_UNKNOWN_PROTOCOLS = false;
+ /* Output should be safe for common template engines.
+ * This means, DOMPurify removes data attributes, mustaches and ERB
+ */
+ var SAFE_FOR_TEMPLATES = false;
-var SyntheticUIEvent = __webpack_require__(46);
-var ViewportMetrics = __webpack_require__(138);
+ /* Decide if document with ... should be returned */
+ var WHOLE_DOCUMENT = false;
-var getEventModifierState = __webpack_require__(96);
+ /* Track whether config is already set on this instance of DOMPurify. */
+ var SET_CONFIG = false;
-/**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-var MouseEventInterface = {
- screenX: null,
- screenY: null,
- clientX: null,
- clientY: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- getModifierState: getEventModifierState,
- button: function (event) {
- // Webkit, Firefox, IE9+
- // which: 1 2 3
- // button: 0 1 2 (standard)
- var button = event.button;
- if ('which' in event) {
- return button;
- }
- // IE<9
- // which: undefined
- // button: 0 0 0
- // button: 1 4 2 (onmouseup)
- return button === 2 ? 2 : button === 4 ? 1 : 0;
- },
- buttons: null,
- relatedTarget: function (event) {
- return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
- },
- // "Proprietary" Interface.
- pageX: function (event) {
- return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
- },
- pageY: function (event) {
- return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
- }
-};
+ /* Decide if all elements (e.g. style, script) must be children of
+ * document.body. By default, browsers might move them to document.head */
+ var FORCE_BODY = false;
-/**
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {string} dispatchMarker Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @extends {SyntheticUIEvent}
- */
-function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
- return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
-}
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
+ * string (or a TrustedHTML object if Trusted Types are supported).
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
+ */
+ var RETURN_DOM = false;
-SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
+ * string (or a TrustedHTML object if Trusted Types are supported) */
+ var RETURN_DOM_FRAGMENT = false;
-module.exports = SyntheticMouseEvent;
+ /* Try to return a Trusted Type object instead of a string, return a string in
+ * case Trusted Types are not supported */
+ var RETURN_TRUSTED_TYPE = false;
-/***/ }),
-/* 61 */
-/***/ (function(module, exports, __webpack_require__) {
+ /* Output should be free from DOM clobbering attacks? */
+ var SANITIZE_DOM = true;
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- *
- */
+ /* Keep element content when removing element? */
+ var KEEP_CONTENT = true;
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
+ * of importing it into a new Document and returning a sanitized copy */
+ var IN_PLACE = false;
+ /* Allow usage of profiles like html, svg and mathMl */
+ var USE_PROFILES = {};
-var _prodInvariant = __webpack_require__(5);
+ /* Tags to ignore content of when KEEP_CONTENT is true */
+ var FORBID_CONTENTS = null;
+ var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
-var invariant = __webpack_require__(2);
+ /* Tags that are safe for data: URIs */
+ var DATA_URI_TAGS = null;
+ var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
-var OBSERVED_ERROR = {};
+ /* Attributes safe for values like "javascript:" */
+ var URI_SAFE_ATTRIBUTES = null;
+ var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
-/**
- * `Transaction` creates a black box that is able to wrap any method such that
- * certain invariants are maintained before and after the method is invoked
- * (Even if an exception is thrown while invoking the wrapped method). Whoever
- * instantiates a transaction can provide enforcers of the invariants at
- * creation time. The `Transaction` class itself will supply one additional
- * automatic invariant for you - the invariant that any transaction instance
- * should not be run while it is already being run. You would typically create a
- * single instance of a `Transaction` for reuse multiple times, that potentially
- * is used to wrap several different methods. Wrappers are extremely simple -
- * they only require implementing two methods.
- *
- *
- * wrappers (injected at creation time)
- * + +
- * | |
- * +-----------------|--------|--------------+
- * | v | |
- * | +---------------+ | |
- * | +--| wrapper1 |---|----+ |
- * | | +---------------+ v | |
- * | | +-------------+ | |
- * | | +----| wrapper2 |--------+ |
- * | | | +-------------+ | | |
- * | | | | | |
- * | v v v v | wrapper
- * | +---+ +---+ +---------+ +---+ +---+ | invariants
- * perform(anyMethod) | | | | | | | | | | | | maintained
- * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
- * | | | | | | | | | | | |
- * | | | | | | | | | | | |
- * | | | | | | | | | | | |
- * | +---+ +---+ +---------+ +---+ +---+ |
- * | initialize close |
- * +-----------------------------------------+
- *
- *
- * Use cases:
- * - Preserving the input selection ranges before/after reconciliation.
- * Restoring selection even in the event of an unexpected error.
- * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
- * while guaranteeing that afterwards, the event system is reactivated.
- * - Flushing a queue of collected DOM mutations to the main UI thread after a
- * reconciliation takes place in a worker thread.
- * - Invoking any collected `componentDidUpdate` callbacks after rendering new
- * content.
- * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
- * to preserve the `scrollTop` (an automatic scroll aware DOM).
- * - (Future use case): Layout calculations before and after DOM updates.
- *
- * Transactional plugin API:
- * - A module that has an `initialize` method that returns any precomputation.
- * - and a `close` method that accepts the precomputation. `close` is invoked
- * when the wrapped process is completed, or has failed.
- *
- * @param {Array} transactionWrapper Wrapper modules
- * that implement `initialize` and `close`.
- * @return {Transaction} Single transaction for reuse in thread.
- *
- * @class Transaction
- */
-var TransactionImpl = {
- /**
- * Sets up this instance so that it is prepared for collecting metrics. Does
- * so such that this setup method may be used on an instance that is already
- * initialized, in a way that does not consume additional memory upon reuse.
- * That can be useful if you decide to make your subclass of this mixin a
- * "PooledClass".
- */
- reinitializeTransaction: function () {
- this.transactionWrappers = this.getTransactionWrappers();
- if (this.wrapperInitData) {
- this.wrapperInitData.length = 0;
- } else {
- this.wrapperInitData = [];
- }
- this._isInTransaction = false;
- },
+ var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
+ /* Document namespace */
+ var NAMESPACE = HTML_NAMESPACE;
+ var IS_EMPTY_INPUT = false;
- _isInTransaction: false,
+ /* Parsing of strict XHTML documents */
+ var PARSER_MEDIA_TYPE = void 0;
+ var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
+ var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
+ var transformCaseFunc = void 0;
- /**
- * @abstract
- * @return {Array} Array of transaction wrappers.
- */
- getTransactionWrappers: null,
+ /* Keep a reference to config to pass to hooks */
+ var CONFIG = null;
- isInTransaction: function () {
- return !!this._isInTransaction;
- },
+ /* Ideally, do not touch anything below this line */
+ /* ______________________________________________ */
- /* eslint-disable space-before-function-paren */
+ var formElement = document.createElement('form');
- /**
- * Executes the function within a safety window. Use this for the top level
- * methods that result in large amounts of computation/mutations that would
- * need to be safety checked. The optional arguments helps prevent the need
- * to bind in many cases.
- *
- * @param {function} method Member of scope to call.
- * @param {Object} scope Scope to invoke from.
- * @param {Object?=} a Argument to pass to the method.
- * @param {Object?=} b Argument to pass to the method.
- * @param {Object?=} c Argument to pass to the method.
- * @param {Object?=} d Argument to pass to the method.
- * @param {Object?=} e Argument to pass to the method.
- * @param {Object?=} f Argument to pass to the method.
- *
- * @return {*} Return value from `method`.
- */
- perform: function (method, scope, a, b, c, d, e, f) {
- /* eslint-enable space-before-function-paren */
- !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
- var errorThrown;
- var ret;
- try {
- this._isInTransaction = true;
- // Catching errors makes debugging more difficult, so we start with
- // errorThrown set to true before setting it to false after calling
- // close -- if it's still set to true in the finally block, it means
- // one of these calls threw.
- errorThrown = true;
- this.initializeAll(0);
- ret = method.call(scope, a, b, c, d, e, f);
- errorThrown = false;
- } finally {
- try {
- if (errorThrown) {
- // If `method` throws, prefer to show that stack trace over any thrown
- // by invoking `closeAll`.
- try {
- this.closeAll(0);
- } catch (err) {}
- } else {
- // Since `method` didn't throw, we don't want to silence the exception
- // here.
- this.closeAll(0);
- }
- } finally {
- this._isInTransaction = false;
- }
- }
- return ret;
- },
+ var isRegexOrFunction = function isRegexOrFunction(testValue) {
+ return testValue instanceof RegExp || testValue instanceof Function;
+ };
- initializeAll: function (startIndex) {
- var transactionWrappers = this.transactionWrappers;
- for (var i = startIndex; i < transactionWrappers.length; i++) {
- var wrapper = transactionWrappers[i];
- try {
- // Catching errors makes debugging more difficult, so we start with the
- // OBSERVED_ERROR state before overwriting it with the real return value
- // of initialize -- if it's still set to OBSERVED_ERROR in the finally
- // block, it means wrapper.initialize threw.
- this.wrapperInitData[i] = OBSERVED_ERROR;
- this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
- } finally {
- if (this.wrapperInitData[i] === OBSERVED_ERROR) {
- // The initializer for wrapper i threw an error; initialize the
- // remaining wrappers but silence any exceptions from them to ensure
- // that the first error is the one to bubble up.
- try {
- this.initializeAll(i + 1);
- } catch (err) {}
- }
+ /**
+ * _parseConfig
+ *
+ * @param {Object} cfg optional config literal
+ */
+ // eslint-disable-next-line complexity
+ var _parseConfig = function _parseConfig(cfg) {
+ if (CONFIG && CONFIG === cfg) {
+ return;
}
- }
- },
- /**
- * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
- * them the respective return values of `this.transactionWrappers.init[i]`
- * (`close`rs that correspond to initializers that failed will not be
- * invoked).
- */
- closeAll: function (startIndex) {
- !this.isInTransaction() ? false ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
- var transactionWrappers = this.transactionWrappers;
- for (var i = startIndex; i < transactionWrappers.length; i++) {
- var wrapper = transactionWrappers[i];
- var initData = this.wrapperInitData[i];
- var errorThrown;
- try {
- // Catching errors makes debugging more difficult, so we start with
- // errorThrown set to true before setting it to false after calling
- // close -- if it's still set to true in the finally block, it means
- // wrapper.close threw.
- errorThrown = true;
- if (initData !== OBSERVED_ERROR && wrapper.close) {
- wrapper.close.call(this, initData);
- }
- errorThrown = false;
- } finally {
- if (errorThrown) {
- // The closer for wrapper i threw an error; close the remaining
- // wrappers but silence any exceptions from them to ensure that the
- // first error is the one to bubble up.
- try {
- this.closeAll(i + 1);
- } catch (e) {}
- }
+ /* Shield configuration object from tampering */
+ if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {
+ cfg = {};
}
- }
- this.wrapperInitData.length = 0;
- }
-};
-module.exports = TransactionImpl;
-
-/***/ }),
-/* 62 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright (c) 2016-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- * Based on the escape-html library, which is used under the MIT License below:
- *
- * Copyright (c) 2012-2013 TJ Holowaychuk
- * Copyright (c) 2015 Andreas Lubbe
- * Copyright (c) 2015 Tiancheng "Timothy" Gu
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * 'Software'), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-
-
-// code copied and modified from escape-html
-/**
- * Module variables.
- * @private
- */
-
-var matchHtmlRegExp = /["'&<>]/;
-
-/**
- * Escape special characters in the given string of html.
- *
- * @param {string} string The string to escape for inserting into HTML
- * @return {string}
- * @public
- */
-
-function escapeHtml(string) {
- var str = '' + string;
- var match = matchHtmlRegExp.exec(str);
+ /* Shield configuration object from prototype pollution */
+ cfg = clone(cfg);
- if (!match) {
- return str;
- }
+ /* Set configuration parameters */
+ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;
+ ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;
+ URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;
+ DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;
+ FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;
+ FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};
+ FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};
+ USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
+ IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
+ }
- var escape;
- var html = '';
- var index = 0;
- var lastIndex = 0;
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
+ }
- for (index = match.index; index < str.length; index++) {
- switch (str.charCodeAt(index)) {
- case 34:
- // "
- escape = '"';
- break;
- case 38:
- // &
- escape = '&';
- break;
- case 39:
- // '
- escape = '''; // modified from escape-html; used to be '''
- break;
- case 60:
- // <
- escape = '<';
- break;
- case 62:
- // >
- escape = '>';
- break;
- default:
- continue;
- }
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
+ }
- if (lastIndex !== index) {
- html += str.substring(lastIndex, index);
- }
+ PARSER_MEDIA_TYPE =
+ // eslint-disable-next-line unicorn/prefer-includes
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;
- lastIndex = index + 1;
- html += escape;
- }
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {
+ return x;
+ } : stringToLowerCase;
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
-}
-// end code copied and modified from escape-html
+ if (SAFE_FOR_TEMPLATES) {
+ ALLOW_DATA_ATTR = false;
+ }
-/**
- * Escapes text to prevent scripting attacks.
- *
- * @param {*} text Text value to escape.
- * @return {string} An escaped string.
- */
-function escapeTextContentForBrowser(text) {
- if (typeof text === 'boolean' || typeof text === 'number') {
- // this shortcircuit helps perf for types that we know will never have
- // special characters, especially given that this function is used often
- // for numeric dom ids.
- return '' + text;
- }
- return escapeHtml(text);
-}
+ if (RETURN_DOM_FRAGMENT) {
+ RETURN_DOM = true;
+ }
-module.exports = escapeTextContentForBrowser;
+ /* Parse profile info */
+ if (USE_PROFILES) {
+ ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));
+ ALLOWED_ATTR = [];
+ if (USE_PROFILES.html === true) {
+ addToSet(ALLOWED_TAGS, html);
+ addToSet(ALLOWED_ATTR, html$1);
+ }
-/***/ }),
-/* 63 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (USE_PROFILES.svg === true) {
+ addToSet(ALLOWED_TAGS, svg);
+ addToSet(ALLOWED_ATTR, svg$1);
+ addToSet(ALLOWED_ATTR, xml);
+ }
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
+ if (USE_PROFILES.svgFilters === true) {
+ addToSet(ALLOWED_TAGS, svgFilters);
+ addToSet(ALLOWED_ATTR, svg$1);
+ addToSet(ALLOWED_ATTR, xml);
+ }
+ if (USE_PROFILES.mathMl === true) {
+ addToSet(ALLOWED_TAGS, mathMl);
+ addToSet(ALLOWED_ATTR, mathMl$1);
+ addToSet(ALLOWED_ATTR, xml);
+ }
+ }
+ /* Merge configuration parameters */
+ if (cfg.ADD_TAGS) {
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
+ }
-var ExecutionEnvironment = __webpack_require__(14);
-var DOMNamespaces = __webpack_require__(86);
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);
+ }
-var WHITESPACE_TEST = /^[ \r\n\t\f]/;
-var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
+ if (cfg.ADD_ATTR) {
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
+ }
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(94);
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);
+ }
-// SVG temp container for IE lacking innerHTML
-var reusableSVGContainer;
+ if (cfg.ADD_URI_SAFE_ATTR) {
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);
+ }
-/**
- * Set the innerHTML property of a node, ensuring that whitespace is preserved
- * even in IE8.
- *
- * @param {DOMElement} node
- * @param {string} html
- * @internal
- */
-var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
- // IE does not have innerHTML for SVG nodes, so instead we inject the
- // new markup in a temp node and then move the child nodes across into
- // the target node
- if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
- reusableSVGContainer = reusableSVGContainer || document.createElement('div');
- reusableSVGContainer.innerHTML = '' + html + ' ';
- var svgNode = reusableSVGContainer.firstChild;
- while (svgNode.firstChild) {
- node.appendChild(svgNode.firstChild);
- }
- } else {
- node.innerHTML = html;
- }
-});
+ if (cfg.FORBID_CONTENTS) {
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
+ }
-if (ExecutionEnvironment.canUseDOM) {
- // IE8: When updating a just created node with innerHTML only leading
- // whitespace is removed. When updating an existing node with innerHTML
- // whitespace in root TextNodes is also collapsed.
- // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS);
+ }
- // Feature detection; only IE8 is known to behave improperly like this.
- var testElement = document.createElement('div');
- testElement.innerHTML = ' ';
- if (testElement.innerHTML === '') {
- setInnerHTML = function (node, html) {
- // Magic theory: IE8 supposedly differentiates between added and updated
- // nodes when processing innerHTML, innerHTML on updated nodes suffers
- // from worse whitespace behavior. Re-adding a node like this triggers
- // the initial and more favorable whitespace behavior.
- // TODO: What to do on a detached node?
- if (node.parentNode) {
- node.parentNode.replaceChild(node, node);
+ /* Add #text in case KEEP_CONTENT is set to true */
+ if (KEEP_CONTENT) {
+ ALLOWED_TAGS['#text'] = true;
}
- // We also implement a workaround for non-visible tags disappearing into
- // thin air on IE8, this only happens if there is no visible text
- // in-front of the non-visible tags. Piggyback on the whitespace fix
- // and simply check if any non-visible tags appear in the source.
- if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
- // Recover leading whitespace by temporarily prepending any character.
- // \uFEFF has the potential advantage of being zero-width/invisible.
- // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
- // in hopes that this is preserved even if "\uFEFF" is transformed to
- // the actual Unicode character (by Babel, for example).
- // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
- node.innerHTML = String.fromCharCode(0xfeff) + html;
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
+ if (WHOLE_DOCUMENT) {
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
+ }
- // deleteData leaves an empty `TextNode` which offsets the index of all
- // children. Definitely want to avoid this.
- var textNode = node.firstChild;
- if (textNode.data.length === 1) {
- node.removeChild(textNode);
- } else {
- textNode.deleteData(0, 1);
- }
- } else {
- node.innerHTML = html;
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
+ if (ALLOWED_TAGS.table) {
+ addToSet(ALLOWED_TAGS, ['tbody']);
+ delete FORBID_TAGS.tbody;
}
- };
- }
- testElement = null;
-}
-module.exports = setInnerHTML;
+ // Prevent further manipulation of configuration.
+ // Not available in IE8, Safari 5, etc.
+ if (freeze) {
+ freeze(cfg);
+ }
-/***/ }),
-/* 64 */
-/***/ (function(module, exports, __webpack_require__) {
+ CONFIG = cfg;
+ };
-"use strict";
+ var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
+ var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = assertString;
+ /* Keep track of all possible SVG and MathML tags
+ * so that we can perform the namespace checks
+ * correctly. */
+ var ALL_SVG_TAGS = addToSet({}, svg);
+ addToSet(ALL_SVG_TAGS, svgFilters);
+ addToSet(ALL_SVG_TAGS, svgDisallowed);
-function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+ var ALL_MATHML_TAGS = addToSet({}, mathMl);
+ addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
-function assertString(input) {
- var isString = typeof input === 'string' || input instanceof String;
+ /**
+ *
+ *
+ * @param {Element} element a DOM element whose namespace is being checked
+ * @returns {boolean} Return false if the element has a
+ * namespace that a spec-compliant parser would never
+ * return. Return true otherwise.
+ */
+ var _checkValidNamespace = function _checkValidNamespace(element) {
+ var parent = getParentNode(element);
- if (!isString) {
- var invalidType = _typeof(input);
+ // In JSDOM, if we're inside shadow DOM, then parentNode
+ // can be null. We just simulate parent in this case.
+ if (!parent || !parent.tagName) {
+ parent = {
+ namespaceURI: HTML_NAMESPACE,
+ tagName: 'template'
+ };
+ }
- if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;
- throw new TypeError("Expected a string but received a ".concat(invalidType));
- }
-}
+ var tagName = stringToLowerCase(element.tagName);
+ var parentTagName = stringToLowerCase(parent.tagName);
-module.exports = exports.default;
-module.exports.default = exports.default;
+ if (element.namespaceURI === SVG_NAMESPACE) {
+ // The only way to switch from HTML namespace to SVG
+ // is via . If it happens via any other tag, then
+ // it should be killed.
+ if (parent.namespaceURI === HTML_NAMESPACE) {
+ return tagName === 'svg';
+ }
-/***/ }),
-/* 65 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ // The only way to switch from MathML to SVG is via
+ // svg if parent is either or MathML
+ // text integration points.
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+ // We only allow elements that are defined in SVG
+ // spec. All others are disallowed in SVG namespace.
+ return Boolean(ALL_SVG_TAGS[tagName]);
+ }
+ if (element.namespaceURI === MATHML_NAMESPACE) {
+ // The only way to switch from HTML namespace to MathML
+ // is via . If it happens via any other tag, then
+ // it should be killed.
+ if (parent.namespaceURI === HTML_NAMESPACE) {
+ return tagName === 'math';
+ }
-var SignUpTerms = function SignUpTerms(_ref) {
- var checkHandler = _ref.checkHandler,
- checked = _ref.checked,
- children = _ref.children,
- showCheckbox = _ref.showCheckbox;
+ // The only way to switch from SVG to MathML is via
+ // and HTML integration points
+ if (parent.namespaceURI === SVG_NAMESPACE) {
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
+ }
- return checkHandler ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- "span",
- { className: "auth0-lock-sign-up-terms-agreement" },
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- "label",
- null,
- showCheckbox && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", { type: "checkbox", onChange: checkHandler, checked: checked }),
- children
- )
- ) : children;
-};
+ // We only allow elements that are defined in MathML
+ // spec. All others are disallowed in MathML namespace.
+ return Boolean(ALL_MATHML_TAGS[tagName]);
+ }
-/* harmony default export */ __webpack_exports__["a"] = (SignUpTerms);
+ if (element.namespaceURI === HTML_NAMESPACE) {
+ // The only way to switch from SVG to HTML is via
+ // HTML integration points, and from MathML to HTML
+ // is via MathML text integration points
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
+ return false;
+ }
-/***/ }),
-/* 66 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
+ return false;
+ }
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = startHRD;
-/* harmony export (immutable) */ __webpack_exports__["c"] = cancelHRD;
-/* harmony export (immutable) */ __webpack_exports__["b"] = logIn;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enterprise__ = __webpack_require__(13);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_email__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_actions__ = __webpack_require__(16);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__captcha__ = __webpack_require__(40);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__database_index__ = __webpack_require__(10);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+ // Certain elements are allowed in both SVG and HTML
+ // namespace. We need to specify them explicitly
+ // so that they don't get erronously deleted from
+ // HTML namespace.
+ var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
+ // We disallow tags that are specific for MathML
+ // or SVG and should never appear in HTML namespace
+ return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);
+ }
+ // The code should never reach this place (this means
+ // that the element somehow got namespace that is not
+ // HTML, SVG or MathML). Return false just in case.
+ return false;
+ };
+ /**
+ * _forceRemove
+ *
+ * @param {Node} node a DOM node
+ */
+ var _forceRemove = function _forceRemove(node) {
+ arrayPush(DOMPurify.removed, { element: node });
+ try {
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
+ node.parentNode.removeChild(node);
+ } catch (_) {
+ try {
+ node.outerHTML = emptyHTML;
+ } catch (_) {
+ node.remove();
+ }
+ }
+ };
+ /**
+ * _removeAttribute
+ *
+ * @param {String} name an Attribute name
+ * @param {Node} node a DOM node
+ */
+ var _removeAttribute = function _removeAttribute(name, node) {
+ try {
+ arrayPush(DOMPurify.removed, {
+ attribute: node.getAttributeNode(name),
+ from: node
+ });
+ } catch (_) {
+ arrayPush(DOMPurify.removed, {
+ attribute: null,
+ from: node
+ });
+ }
+ node.removeAttribute(name);
+ // We void attribute values for unremovable "is"" attributes
+ if (name === 'is' && !ALLOWED_ATTR[name]) {
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
+ try {
+ _forceRemove(node);
+ } catch (_) {}
+ } else {
+ try {
+ node.setAttribute(name, '');
+ } catch (_) {}
+ }
+ }
+ };
+ /**
+ * _initDocument
+ *
+ * @param {String} dirty a string of dirty markup
+ * @return {Document} a DOM, filled with the dirty markup
+ */
+ var _initDocument = function _initDocument(dirty) {
+ /* Create a HTML document */
+ var doc = void 0;
+ var leadingWhitespace = void 0;
+ if (FORCE_BODY) {
+ dirty = ' ' + dirty;
+ } else {
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
+ var matches = stringMatch(dirty, /^[\r\n\t ]+/);
+ leadingWhitespace = matches && matches[0];
+ }
-// TODO: enterprise connections should not depend on database
-// connections. However, we now allow a username input to contain also
-// an email and this information is in the database module. We should
-// make this information flow from the UI (like we do for the startHRD
-// function). Including this dependency here allows us to do that
-// incrementally.
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
+ dirty = '' + dirty + '';
+ }
+ var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
+ /*
+ * Use the DOMParser API by default, fallback later if needs be
+ * DOMParser not work for svg when has multiple root element.
+ */
+ if (NAMESPACE === HTML_NAMESPACE) {
+ try {
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
+ } catch (_) {}
+ }
-function startHRD(id, email) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_1__enterprise__["l" /* toggleHRD */], email);
-}
+ /* Use createHTMLDocument in case DOMParser is not available */
+ if (!doc || !doc.documentElement) {
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
+ try {
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;
+ } catch (_) {
+ // Syntax error if dirtyPayload is invalid xml
+ }
+ }
-function cancelHRD(id) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["l" /* toggleHRD */])(m, false);
- m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["a" /* hideInvalidFields */])(m);
- return m;
- });
-}
+ var body = doc.body || doc.documentElement;
-function getConnectionScopesFrom(m, connection) {
- var connectionScopes = __WEBPACK_IMPORTED_MODULE_5__core_index__["auth"].connectionScopes(m);
- return connectionScopes.get(connection.get('name'));
-}
+ if (dirty && leadingWhitespace) {
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
+ }
-function logIn(id) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
- var email = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username');
- var ssoConnection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["m" /* matchConnection */])(m, email);
- var enterpriseConnection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["n" /* enterpriseActiveFlowConnection */])(m);
- var connectionScopes = getConnectionScopesFrom(m, ssoConnection || enterpriseConnection);
- var usernameField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username';
- var fields = [usernameField, 'password'];
+ /* Work on whole document or just its body */
+ if (NAMESPACE === HTML_NAMESPACE) {
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
+ }
- var params = {
- connection_scope: connectionScopes ? connectionScopes.toJS() : undefined
- };
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
+ };
- if (ssoConnection && !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["i" /* isHRDActive */])(m)) {
- return logInSSO(id, ssoConnection, params);
- }
+ /**
+ * _createIterator
+ *
+ * @param {Document} root document/fragment to create iterator for
+ * @return {Iterator} iterator instance
+ */
+ var _createIterator = function _createIterator(root) {
+ return createNodeIterator.call(root.ownerDocument || root, root,
+ // eslint-disable-next-line no-bitwise
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
+ };
- var isCaptchaValid = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["a" /* setCaptchaParams */])(m, params, fields);
+ /**
+ * _isClobbered
+ *
+ * @param {Node} elm element to check for clobbering attacks
+ * @return {Boolean} true if clobbered, false if safe
+ */
+ var _isClobbered = function _isClobbered(elm) {
+ return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');
+ };
- if (!isCaptchaValid && !ssoConnection) {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["b" /* showMissingCaptcha */])(m, id);
- }
+ /**
+ * _isNode
+ *
+ * @param {Node} obj object to check whether it's a DOM node
+ * @return {Boolean} true is object is a DOM node
+ */
+ var _isNode = function _isNode(object) {
+ return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
+ };
- logInActiveFlow(id, params);
-}
+ /**
+ * _executeHook
+ * Execute user configurable hooks
+ *
+ * @param {String} entryPoint Name of the hook's entry point
+ * @param {Node} currentNode node to work on with the hook
+ * @param {Object} data additional hook parameters
+ */
+ var _executeHook = function _executeHook(entryPoint, currentNode, data) {
+ if (!hooks[entryPoint]) {
+ return;
+ }
-function logInActiveFlow(id, params) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
- var usernameField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["i" /* isHRDActive */])(m) || !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'username' : 'email';
+ arrayForEach(hooks[entryPoint], function (hook) {
+ hook.call(DOMPurify, currentNode, data, CONFIG);
+ });
+ };
- var originalUsername = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, usernameField);
- var connection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["n" /* enterpriseActiveFlowConnection */])(m);
+ /**
+ * _sanitizeElements
+ *
+ * @protect nodeName
+ * @protect textContent
+ * @protect removeChild
+ *
+ * @param {Node} currentNode to check for permission to exist
+ * @return {Boolean} true if node was killed, false if left alive
+ */
+ var _sanitizeElements = function _sanitizeElements(currentNode) {
+ var content = void 0;
- var username = __WEBPACK_IMPORTED_MODULE_5__core_index__["defaultADUsernameFromEmailPrefix"](m) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__field_email__["b" /* emailLocalPart */])(originalUsername) : originalUsername;
+ /* Execute a hook if present */
+ _executeHook('beforeSanitizeElements', currentNode, null);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__core_actions__["h" /* logIn */])(id, ['password', usernameField], _extends({}, params, {
- connection: connection ? connection.get('name') : null,
- username: username,
- password: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, 'password'),
- login_hint: username
- }), function (id, error, fields, next) {
- var wasCaptchaInvalid = error && error.code === 'invalid captcha';
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["c" /* swapCaptcha */])(id, wasCaptchaInvalid, next);
- });
-}
+ /* Check if element is clobbered or can clobber */
+ if (_isClobbered(currentNode)) {
+ _forceRemove(currentNode);
+ return true;
+ }
-function logInSSO(id, connection, params) {
- var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
- var field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username';
+ /* Check if tagname contains Unicode */
+ if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) {
+ _forceRemove(currentNode);
+ return true;
+ }
- __WEBPACK_IMPORTED_MODULE_5__core_index__["emitEvent"](m, 'sso login', {
- lockID: id,
- connection: connection,
- field: field
- });
+ /* Now let's check the element's type and name */
+ var tagName = transformCaseFunc(currentNode.nodeName);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__core_actions__["h" /* logIn */])(id, [field], _extends({}, params, {
- connection: connection.get('name'),
- login_hint: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, field)
- }));
-}
+ /* Execute a hook if present */
+ _executeHook('uponSanitizeElement', currentNode, {
+ tagName: tagName,
+ allowedTags: ALLOWED_TAGS
+ });
-/***/ }),
-/* 67 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ /* Detect mXSS attempts abusing namespace confusion */
+ if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
+ _forceRemove(currentNode);
+ return true;
+ }
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["c"] = initTenant;
-/* unused harmony export tenantConnections */
-/* harmony export (immutable) */ __webpack_exports__["b"] = defaultDirectory;
-/* harmony export (immutable) */ __webpack_exports__["a"] = defaultDirectoryName;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies__ = __webpack_require__(105);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_auth0_password_policies__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_data_utils__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(1);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+ /* Mitigate a problem with templates inside select */
+ if (tagName === 'select' && regExpTest(/= 0; --i) {
+ parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
+ }
+ }
+ }
+ _forceRemove(currentNode);
+ return true;
+ }
+ /* Check whether element has a valid namespace */
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
+ _forceRemove(currentNode);
+ return true;
+ }
-var _dataFns = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_data_utils__["a" /* dataFns */])(['client']),
- initNS = _dataFns.initNS,
- get = _dataFns.get;
+ if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
+ _forceRemove(currentNode);
+ return true;
+ }
-var DEFAULT_CONNECTION_VALIDATION = { username: { min: 1, max: 15 } };
+ /* Sanitize element content to be template-safe */
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
+ /* Get the element's text content */
+ content = currentNode.textContent;
+ content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');
+ content = stringReplace(content, ERB_EXPR$$1, ' ');
+ if (currentNode.textContent !== content) {
+ arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
+ currentNode.textContent = content;
+ }
+ }
-function formatConnectionValidation() {
- var connectionValidation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ /* Execute a hook if present */
+ _executeHook('afterSanitizeElements', currentNode, null);
- if (connectionValidation.username == null) {
- return null;
- }
+ return false;
+ };
- var validation = _extends({}, DEFAULT_CONNECTION_VALIDATION, connectionValidation);
- var defaultMin = DEFAULT_CONNECTION_VALIDATION.username.min;
- var defaultMax = DEFAULT_CONNECTION_VALIDATION.username.max;
+ /**
+ * _isValidAttribute
+ *
+ * @param {string} lcTag Lowercase tag name of containing element.
+ * @param {string} lcName Lowercase attribute name.
+ * @param {string} value Attribute value.
+ * @return {Boolean} Returns true if `value` is valid, otherwise false.
+ */
+ // eslint-disable-next-line complexity
+ var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
+ /* Make sure attribute cannot clobber */
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
+ return false;
+ }
- validation.username.min = parseInt(validation.username.min, 10) || defaultMin;
- validation.username.max = parseInt(validation.username.max, 10) || defaultMax;
+ /* Allow valid data-* attributes: At least one character after "-"
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
+ We don't need to check the value; it's always URI safe. */
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
+ if (
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
+ _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
+ // Alternative, second condition checks if it's an `is`-attribute, AND
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
+ return false;
+ }
+ /* Check value is safe. First, is attr inert? If so, is safe */
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {
+ return false;
+ }
- if (validation.username.min > validation.username.max) {
- validation.username.min = defaultMin;
- validation.username.max = defaultMax;
- }
+ return true;
+ };
- return validation;
-}
+ /**
+ * _basicCustomElementCheck
+ * checks if at least one dash is included in tagName, and it's not the first char
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
+ * @param {string} tagName name of the tag of the node to sanitize
+ */
+ var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
+ return tagName.indexOf('-') > 0;
+ };
-var emptyConnections = __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS({
- database: [],
- enterprise: [],
- passwordless: [],
- social: [],
- unknown: [] // TODO: should be oauth2
-});
+ /**
+ * _sanitizeAttributes
+ *
+ * @protect attributes
+ * @protect nodeName
+ * @protect removeAttribute
+ * @protect setAttribute
+ *
+ * @param {Node} currentNode to sanitize
+ */
+ var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
+ var attr = void 0;
+ var value = void 0;
+ var lcName = void 0;
+ var l = void 0;
+ /* Execute a hook if present */
+ _executeHook('beforeSanitizeAttributes', currentNode, null);
-function initTenant(m, client_id, client) {
- return initNS(m, formatTenant(client_id, client));
-}
+ var attributes = currentNode.attributes;
-function formatTenant(client_id, o) {
- return new __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS({
- connections: formatTenantConnections(client_id, o),
- defaultDirectory: o.defaultDirectory || null
- });
-}
+ /* Check if we have attributes; if not we might have a text node */
-function formatTenantConnections(client_id, o) {
- var result = emptyConnections.toJS();
- var connectionTypes = Object.keys(o.connections).filter(function (name) {
- return name != 'passwordless';
- }); // disabled until lock supports passwordless connections within the same engine
- var connections_filter = null;
+ if (!attributes) {
+ return;
+ }
- if (o.clientsConnections && o.clientsConnections[client_id]) {
- connections_filter = o.clientsConnections[client_id];
- }
+ var hookEvent = {
+ attrName: '',
+ attrValue: '',
+ keepAttr: true,
+ allowedAttributes: ALLOWED_ATTR
+ };
+ l = attributes.length;
- connectionTypes.forEach(function (connectionTypeName) {
- var _result$connectionTyp;
+ /* Go backwards over all attributes; safely remove bad ones */
+ while (l--) {
+ attr = attributes[l];
+ var _attr = attr,
+ name = _attr.name,
+ namespaceURI = _attr.namespaceURI;
- var connections = o.connections[connectionTypeName].map(function (connection) {
- return formatTenantConnection(connectionTypeName, connection);
- }).filter(function (connection) {
- return connections_filter === null || connections_filter.includes(connection.name);
- });
- (_result$connectionTyp = result[connectionTypeName]).push.apply(_result$connectionTyp, connections);
- });
+ value = stringTrim(attr.value);
+ lcName = transformCaseFunc(name);
- return result;
-}
+ /* Execute a hook if present */
+ hookEvent.attrName = lcName;
+ hookEvent.attrValue = value;
+ hookEvent.keepAttr = true;
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
+ _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
+ value = hookEvent.attrValue;
+ /* Did the hooks approve of the attribute? */
+ if (hookEvent.forceKeepAttr) {
+ continue;
+ }
-function formatTenantConnection(connectionType, connection) {
- var result = {
- name: connection.name,
- strategy: connection.strategy,
- type: connectionType
- };
+ /* Remove attribute */
+ _removeAttribute(name, currentNode);
- if (connectionType === 'database') {
- if (connection.validation && connection.validation.passwordPolicy) {
- result.passwordPolicy = connection.validation.passwordPolicy;
- }
+ /* Did the hooks approve of the attribute? */
+ if (!hookEvent.keepAttr) {
+ continue;
+ }
- result.passwordPolicy = __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies___default.a[result.passwordPolicy || 'none'];
+ /* Work around a security issue in jQuery 3.0 */
+ if (regExpTest(/\/>/i, value)) {
+ _removeAttribute(name, currentNode);
+ continue;
+ }
- result.allowSignup = typeof connection.allowSignup === 'boolean' ? connection.allowSignup : true;
+ /* Sanitize attribute content to be template-safe */
+ if (SAFE_FOR_TEMPLATES) {
+ value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');
+ value = stringReplace(value, ERB_EXPR$$1, ' ');
+ }
- result.allowForgot = typeof connection.allowForgot === 'boolean' ? connection.allowForgot : true;
+ /* Is `value` valid for this attribute? */
+ var lcTag = transformCaseFunc(currentNode.nodeName);
+ if (!_isValidAttribute(lcTag, lcName, value)) {
+ continue;
+ }
- result.requireUsername = typeof connection.requiresUsername === 'boolean' ? connection.requiresUsername : false;
+ /* Handle invalid data-* attribute set by try-catching it */
+ try {
+ if (namespaceURI) {
+ currentNode.setAttributeNS(namespaceURI, name, value);
+ } else {
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
+ currentNode.setAttribute(name, value);
+ }
- result.validation = formatConnectionValidation(connection.validation);
- }
+ arrayPop(DOMPurify.removed);
+ } catch (_) {}
+ }
- if (connectionType === 'enterprise') {
- result.domains = connection.domains;
- }
+ /* Execute a hook if present */
+ _executeHook('afterSanitizeAttributes', currentNode, null);
+ };
- return result;
-}
+ /**
+ * _sanitizeShadowDOM
+ *
+ * @param {DocumentFragment} fragment to iterate over recursively
+ */
+ var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
+ var shadowNode = void 0;
+ var shadowIterator = _createIterator(fragment);
-function tenantConnections(m) {
- return get(m, 'connections', emptyConnections);
-}
+ /* Execute a hook if present */
+ _executeHook('beforeSanitizeShadowDOM', fragment, null);
-function defaultDirectory(m) {
- var name = defaultDirectoryName(m);
- return name && __WEBPACK_IMPORTED_MODULE_3__index__["findConnection"](m, name);
-}
+ while (shadowNode = shadowIterator.nextNode()) {
+ /* Execute a hook if present */
+ _executeHook('uponSanitizeShadowNode', shadowNode, null);
-function defaultDirectoryName(m) {
- return get(m, 'defaultDirectory', null);
-}
+ /* Sanitize tags and elements */
+ if (_sanitizeElements(shadowNode)) {
+ continue;
+ }
-/***/ }),
-/* 68 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ /* Deep shadow DOM detected */
+ if (shadowNode.content instanceof DocumentFragment) {
+ _sanitizeShadowDOM(shadowNode.content);
+ }
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["d"] = changeField;
-/* harmony export (immutable) */ __webpack_exports__["c"] = startOptionSelection;
-/* harmony export (immutable) */ __webpack_exports__["a"] = selectOption;
-/* harmony export (immutable) */ __webpack_exports__["b"] = cancelOptionSelection;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(3);
+ /* Check attributes, sanitize if necessary */
+ _sanitizeAttributes(shadowNode);
+ }
+ /* Execute a hook if present */
+ _executeHook('afterSanitizeShadowDOM', fragment, null);
+ };
+ /**
+ * Sanitize
+ * Public method providing core sanitation functionality
+ *
+ * @param {String|Node} dirty string or DOM node
+ * @param {Object} configuration object
+ */
+ // eslint-disable-next-line complexity
+ DOMPurify.sanitize = function (dirty, cfg) {
+ var body = void 0;
+ var importedNode = void 0;
+ var currentNode = void 0;
+ var oldNode = void 0;
+ var returnNode = void 0;
+ /* Make sure we have a string to sanitize.
+ DO NOT return early, as this will return the wrong type if
+ the user has requested a DOM object rather than a string */
+ IS_EMPTY_INPUT = !dirty;
+ if (IS_EMPTY_INPUT) {
+ dirty = '';
+ }
+ /* Stringify, in case dirty is an object */
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
+ // eslint-disable-next-line no-negated-condition
+ if (typeof dirty.toString !== 'function') {
+ throw typeErrorCreate('toString is not a function');
+ } else {
+ dirty = dirty.toString();
+ if (typeof dirty !== 'string') {
+ throw typeErrorCreate('dirty is not a string, aborting');
+ }
+ }
+ }
-function changeField(id, name, value, validationFn) {
- for (var _len = arguments.length, validationExtraArgs = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
- validationExtraArgs[_key - 4] = arguments[_key];
- }
+ /* Check we can run. Otherwise fall back or ignore */
+ if (!DOMPurify.isSupported) {
+ if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
+ if (typeof dirty === 'string') {
+ return window.toStaticHTML(dirty);
+ }
- __WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */].apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_2__index__["e" /* setField */], name, value, validationFn].concat(validationExtraArgs));
-}
+ if (_isNode(dirty)) {
+ return window.toStaticHTML(dirty.outerHTML);
+ }
+ }
-function startOptionSelection(id, name, iconUrl, icon) {
- // TODO: should be transient
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- return m.setIn(['field', 'selecting', 'name'], name).setIn(['field', 'selecting', 'iconUrl'], iconUrl).setIn(['field', 'selecting', 'icon'], icon);
- });
-}
+ return dirty;
+ }
-function selectOption(id, name, option) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__index__["f" /* setOptionField */])(m.deleteIn(['field', 'selecting']), name, option);
- });
-}
+ /* Assign config vars */
+ if (!SET_CONFIG) {
+ _parseConfig(cfg);
+ }
-function cancelOptionSelection(id) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
- return m.deleteIn(['field', 'selecting']);
- });
-}
+ /* Clean up removed elements */
+ DOMPurify.removed = [];
-/***/ }),
-/* 69 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ /* Check if dirty is correctly typed for IN_PLACE */
+ if (typeof dirty === 'string') {
+ IN_PLACE = false;
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_captcha_input__ = __webpack_require__(209);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__captcha__ = __webpack_require__(115);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__recaptcha__ = __webpack_require__(189);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+ if (IN_PLACE) {
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
+ if (dirty.nodeName) {
+ var tagName = transformCaseFunc(dirty.nodeName);
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
+ }
+ }
+ } else if (dirty instanceof Node) {
+ /* If dirty is a DOM element, append to an empty document to avoid
+ elements being stripped by the parser */
+ body = _initDocument('');
+ importedNode = body.ownerDocument.importNode(dirty, true);
+ if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
+ /* Node is already a body, use as is */
+ body = importedNode;
+ } else if (importedNode.nodeName === 'HTML') {
+ body = importedNode;
+ } else {
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
+ body.appendChild(importedNode);
+ }
+ } else {
+ /* Exit directly if we have nothing to do */
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
+ // eslint-disable-next-line unicorn/prefer-includes
+ dirty.indexOf('<') === -1) {
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
+ }
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+ /* Initialize the document to work on */
+ body = _initDocument(dirty);
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+ /* Check we have a DOM node from the data */
+ if (!body) {
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
+ }
+ }
-/* eslint-disable no-nested-ternary */
+ /* Remove first element node (ours) if FORCE_BODY is set */
+ if (body && FORCE_BODY) {
+ _forceRemove(body.firstChild);
+ }
+ /* Get node iterator */
+ var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
+ /* Now start iterating over the created document */
+ while (currentNode = nodeIterator.nextNode()) {
+ /* Fix IE's strange behavior with manipulated textNodes #89 */
+ if (currentNode.nodeType === 3 && currentNode === oldNode) {
+ continue;
+ }
+ /* Sanitize tags and elements */
+ if (_sanitizeElements(currentNode)) {
+ continue;
+ }
+ /* Shadow DOM detected, sanitize it */
+ if (currentNode.content instanceof DocumentFragment) {
+ _sanitizeShadowDOM(currentNode.content);
+ }
+ /* Check attributes, sanitize if necessary */
+ _sanitizeAttributes(currentNode);
+ oldNode = currentNode;
+ }
+ oldNode = null;
+ /* If we sanitized `dirty` in-place, return it. */
+ if (IN_PLACE) {
+ return dirty;
+ }
+ /* Return sanitized string or DOM */
+ if (RETURN_DOM) {
+ if (RETURN_DOM_FRAGMENT) {
+ returnNode = createDocumentFragment.call(body.ownerDocument);
-var CaptchaPane = function (_React$Component) {
- _inherits(CaptchaPane, _React$Component);
+ while (body.firstChild) {
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
+ returnNode.appendChild(body.firstChild);
+ }
+ } else {
+ returnNode = body;
+ }
- function CaptchaPane() {
- _classCallCheck(this, CaptchaPane);
+ if (ALLOWED_ATTR.shadowroot) {
+ /*
+ AdoptNode() is not used because internal state is not reset
+ (e.g. the past names map of a HTMLFormElement), this is safe
+ in theory but we would rather not risk another attack vector.
+ The state that is cloned by importNode() is explicitly defined
+ by the specs.
+ */
+ returnNode = importNode.call(originalDocument, returnNode, true);
+ }
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
+ return returnNode;
+ }
- CaptchaPane.prototype.render = function render() {
- var _props = this.props,
- i18n = _props.i18n,
- lock = _props.lock,
- onReload = _props.onReload;
+ var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
- var lockId = __WEBPACK_IMPORTED_MODULE_3__core_index__["id"](lock);
- var captcha = __WEBPACK_IMPORTED_MODULE_3__core_index__["captcha"](lock);
- var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["c" /* getFieldValue */])(lock, 'captcha');
- var isValid = !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["k" /* isFieldVisiblyInvalid */])(lock, 'captcha');
- var provider = captcha.get('provider');
+ /* Serialize doctype if allowed */
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
+ serializedHTML = '\n' + serializedHTML;
+ }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__recaptcha__["a" /* isRecaptcha */])(provider)) {
- var _handleChange = function _handleChange(value) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', lockId, __WEBPACK_IMPORTED_MODULE_5__captcha__["b" /* set */], value);
- };
+ /* Sanitize final string template-safe */
+ if (SAFE_FOR_TEMPLATES) {
+ serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');
+ serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');
+ }
- var reset = function reset() {
- _handleChange();
- };
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
+ };
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__recaptcha__["b" /* ReCAPTCHA */], {
- provider: provider,
- sitekey: captcha.get('siteKey'),
- onChange: _handleChange,
- onExpired: reset,
- hl: __WEBPACK_IMPORTED_MODULE_3__core_index__["ui"].language(lock),
- isValid: isValid,
- value: value
- });
- }
+ /**
+ * Public method to set the configuration once
+ * setConfig
+ *
+ * @param {Object} cfg configuration object
+ */
+ DOMPurify.setConfig = function (cfg) {
+ _parseConfig(cfg);
+ SET_CONFIG = true;
+ };
- function handleChange(e) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', lockId, __WEBPACK_IMPORTED_MODULE_5__captcha__["b" /* set */], e.target.value);
- }
+ /**
+ * Public method to remove the configuration
+ * clearConfig
+ *
+ */
+ DOMPurify.clearConfig = function () {
+ CONFIG = null;
+ SET_CONFIG = false;
+ };
- var placeholder = captcha.get('type') === 'code' ? i18n.str('captchaCodeInputPlaceholder') : i18n.str('captchaMathInputPlaceholder');
+ /**
+ * Public method to check if an attribute value is valid.
+ * Uses last set config, if any. Otherwise, uses config defaults.
+ * isValidAttribute
+ *
+ * @param {string} tag Tag name of containing element.
+ * @param {string} attr Attribute name.
+ * @param {string} value Attribute value.
+ * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
+ */
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
+ /* Initialize shared config vars if necessary. */
+ if (!CONFIG) {
+ _parseConfig({});
+ }
- // TODO: blankErrorHint is deprecated.
- // It is kept for backwards compatibiliy in the code for the customers overwriting
- // it with languageDictionary. It can be removed in the next major release.
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_captcha_input__["a" /* default */], {
- lockId: lockId,
- image: captcha.get('image'),
- placeholder: placeholder,
- isValid: isValid,
- onChange: handleChange,
- onReload: onReload,
- value: value,
- invalidHint: i18n.str('blankErrorHint') || i18n.str('blankCaptchaErrorHint')
- });
- };
+ var lcTag = transformCaseFunc(tag);
+ var lcName = transformCaseFunc(attr);
+ return _isValidAttribute(lcTag, lcName, value);
+ };
- return CaptchaPane;
-}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
+ /**
+ * AddHook
+ * Public method to add DOMPurify hooks
+ *
+ * @param {String} entryPoint entry point for the hook to add
+ * @param {Function} hookFunction function to execute
+ */
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
+ if (typeof hookFunction !== 'function') {
+ return;
+ }
-/* harmony default export */ __webpack_exports__["a"] = (CaptchaPane);
+ hooks[entryPoint] = hooks[entryPoint] || [];
+ arrayPush(hooks[entryPoint], hookFunction);
+ };
+ /**
+ * RemoveHook
+ * Public method to remove a DOMPurify hook at a given entryPoint
+ * (pops it from the stack of hooks if more are present)
+ *
+ * @param {String} entryPoint entry point for the hook to remove
+ */
+ DOMPurify.removeHook = function (entryPoint) {
+ if (hooks[entryPoint]) {
+ arrayPop(hooks[entryPoint]);
+ }
+ };
-CaptchaPane.propTypes = {
- i18n: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired,
- lock: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired,
- error: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- onReload: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
-};
+ /**
+ * RemoveHooks
+ * Public method to remove all DOMPurify hooks at a given entryPoint
+ *
+ * @param {String} entryPoint entry point for the hooks to remove
+ */
+ DOMPurify.removeHooks = function (entryPoint) {
+ if (hooks[entryPoint]) {
+ hooks[entryPoint] = [];
+ }
+ };
-CaptchaPane.defaultProps = {
- error: false
-};
+ /**
+ * RemoveAllHooks
+ * Public method to remove all DOMPurify hooks
+ *
+ */
+ DOMPurify.removeAllHooks = function () {
+ hooks = {};
+ };
-/***/ }),
-/* 70 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ return DOMPurify;
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_password_input__ = __webpack_require__(74);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__password__ = __webpack_require__(194);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+ var purify = createDOMPurify();
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+ return purify;
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+}));
+//# sourceMappingURL=purify.js.map
+/***/ }),
+/* 59 */
+/***/ (function(module, exports) {
+// shim for using process in browser
+var process = module.exports = {};
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+var cachedSetTimeout;
+var cachedClearTimeout;
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
-var PasswordPane = function (_React$Component) {
- _inherits(PasswordPane, _React$Component);
- function PasswordPane() {
- var _temp, _this, _ret;
- _classCallCheck(this, PasswordPane);
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
}
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleChange = function (e) {
- var _this$props = _this.props,
- lock = _this$props.lock,
- policy = _this$props.policy;
-
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__password__["a" /* setPassword */], e.target.value, policy);
- }, _this.handleShowPasswordChange = function (e) {
- var lock = _this.props.lock;
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__password__["b" /* setShowPassword */], e.target.checked);
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
- PasswordPane.prototype.render = function render() {
- var _props = this.props,
- i18n = _props.i18n,
- lock = _props.lock,
- placeholder = _props.placeholder,
- policy = _props.policy,
- strengthMessages = _props.strengthMessages,
- hidden = _props.hidden;
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
- var hiddenCss = hidden ? ' auth0-lock-hidden' : '';
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
- // TODO: invalidErrorHint and blankErrorHint are deprecated.
- // They are kept for backwards compatibiliy in the code for the customers overwriting
- // them with languageDictionary. They can be removed in the next major release.
- var invalidHint = __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'password') ? i18n.str('invalidErrorHint') || i18n.str('invalidPasswordErrorHint') : i18n.str('blankErrorHint') || i18n.str('blankPasswordErrorHint');
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'div',
- { className: 'auth0-lock-input-block auth0-lock-input-show-password' + hiddenCss },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_password_input__["b" /* default */], {
- value: __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'password'),
- invalidHint: invalidHint,
- showPasswordStrengthMessage: !__WEBPACK_IMPORTED_MODULE_3__index__["i" /* isFieldValid */](lock, 'password'),
- isValid: !__WEBPACK_IMPORTED_MODULE_3__index__["k" /* isFieldVisiblyInvalid */](lock, 'password'),
- onChange: this.handleChange,
- placeholder: placeholder,
- strengthMessages: strengthMessages,
- disabled: __WEBPACK_IMPORTED_MODULE_5__core_index__["submitting"](lock),
- policy: policy,
- showPassword: __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'showPassword', false),
- lock: lock
- }),
- __WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].allowShowPassword(lock) && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'div',
- { className: 'auth0-lock-show-password' },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { type: 'checkbox', id: 'slideOne', onChange: this.handleShowPasswordChange }),
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('label', { htmlFor: 'slideOne', title: i18n.str('showPassword') })
- )
- );
- };
+function noop() {}
- return PasswordPane;
-}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+process.prependListener = noop;
+process.prependOnceListener = noop;
-/* harmony default export */ __webpack_exports__["a"] = (PasswordPane);
+process.listeners = function (name) { return [] }
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
-PasswordPane.propTypes = {
- i18n: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
- lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
- onChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func,
- placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
- policy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
- strengthMessages: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
- hidden: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
};
+process.umask = function() { return 0; };
+
/***/ }),
-/* 71 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 60 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["b"] = getUsernameValidation;
-/* harmony export (immutable) */ __webpack_exports__["a"] = setUsername;
-/* harmony export (immutable) */ __webpack_exports__["c"] = usernameLooksLikeEmail;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__email__ = __webpack_require__(19);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connection_database__ = __webpack_require__(10);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_trim__ = __webpack_require__(31);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_trim___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_trim__);
-
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+var _assign = __webpack_require__(7);
-var DEFAULT_CONNECTION_VALIDATION = { username: { min: 1, max: 15 } };
-var regExp = /^[a-zA-Z0-9_+\-.!#\$\^`~@']*$/;
+var EventPluginRegistry = __webpack_require__(87);
+var ReactEventEmitterMixin = __webpack_require__(293);
+var ViewportMetrics = __webpack_require__(138);
-function validateUsername(str, validateFormat) {
- var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_CONNECTION_VALIDATION.username;
- var strictValidation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
+var getVendorPrefixedEventName = __webpack_require__(325);
+var isEventSupported = __webpack_require__(98);
- // If the connection does not have validation settings, it should only check if the field is empty.
- // validateFormat overrides this logic to disable validation on login (login should never validate format)
- if (!validateFormat || settings == null) {
- return __WEBPACK_IMPORTED_MODULE_3_trim___default()(str).length > 0;
- }
+/**
+ * Summary of `ReactBrowserEventEmitter` event handling:
+ *
+ * - Top-level delegation is used to trap most native browser events. This
+ * may only occur in the main thread and is the responsibility of
+ * ReactEventListener, which is injected and can therefore support pluggable
+ * event sources. This is the only work that occurs in the main thread.
+ *
+ * - We normalize and de-duplicate events to account for browser quirks. This
+ * may be done in the worker thread.
+ *
+ * - Forward these native events (with the associated top-level type used to
+ * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
+ * to extract any synthetic events.
+ *
+ * - The `EventPluginHub` will then process each event by annotating them with
+ * "dispatches", a sequence of listeners and IDs that care about that event.
+ *
+ * - The `EventPluginHub` then dispatches the events.
+ *
+ * Overview of React and the event system:
+ *
+ * +------------+ .
+ * | DOM | .
+ * +------------+ .
+ * | .
+ * v .
+ * +------------+ .
+ * | ReactEvent | .
+ * | Listener | .
+ * +------------+ . +-----------+
+ * | . +--------+|SimpleEvent|
+ * | . | |Plugin |
+ * +-----|------+ . v +-----------+
+ * | | | . +--------------+ +------------+
+ * | +-----------.--->|EventPluginHub| | Event |
+ * | | . | | +-----------+ | Propagators|
+ * | ReactEvent | . | | |TapEvent | |------------|
+ * | Emitter | . | |<---+|Plugin | |other plugin|
+ * | | . | | +-----------+ | utilities |
+ * | +-----------.--->| | +------------+
+ * | | | . +--------------+
+ * +-----|------+ . ^ +-----------+
+ * | . | |Enter/Leave|
+ * + . +-------+|Plugin |
+ * +-------------+ . +-----------+
+ * | application | .
+ * |-------------| .
+ * | | .
+ * | | .
+ * +-------------+ .
+ * .
+ * React Core . General Purpose Event Plugin System
+ */
- var lowercased = __WEBPACK_IMPORTED_MODULE_3_trim___default()(str.toLowerCase());
+var hasEventPageXY;
+var alreadyListeningTo = {};
+var isMonitoringScrollValue = false;
+var reactTopListenersCounter = 0;
- // check min value matched
- if (lowercased.length < settings.min) {
- return false;
- }
+// For events like 'submit' which don't consistently bubble (which we trap at a
+// lower node than `document`), binding at `document` would cause duplicate
+// events so we don't include them here
+var topEventMapping = {
+ topAbort: 'abort',
+ topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
+ topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
+ topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
+ topBlur: 'blur',
+ topCanPlay: 'canplay',
+ topCanPlayThrough: 'canplaythrough',
+ topChange: 'change',
+ topClick: 'click',
+ topCompositionEnd: 'compositionend',
+ topCompositionStart: 'compositionstart',
+ topCompositionUpdate: 'compositionupdate',
+ topContextMenu: 'contextmenu',
+ topCopy: 'copy',
+ topCut: 'cut',
+ topDoubleClick: 'dblclick',
+ topDrag: 'drag',
+ topDragEnd: 'dragend',
+ topDragEnter: 'dragenter',
+ topDragExit: 'dragexit',
+ topDragLeave: 'dragleave',
+ topDragOver: 'dragover',
+ topDragStart: 'dragstart',
+ topDrop: 'drop',
+ topDurationChange: 'durationchange',
+ topEmptied: 'emptied',
+ topEncrypted: 'encrypted',
+ topEnded: 'ended',
+ topError: 'error',
+ topFocus: 'focus',
+ topInput: 'input',
+ topKeyDown: 'keydown',
+ topKeyPress: 'keypress',
+ topKeyUp: 'keyup',
+ topLoadedData: 'loadeddata',
+ topLoadedMetadata: 'loadedmetadata',
+ topLoadStart: 'loadstart',
+ topMouseDown: 'mousedown',
+ topMouseMove: 'mousemove',
+ topMouseOut: 'mouseout',
+ topMouseOver: 'mouseover',
+ topMouseUp: 'mouseup',
+ topPaste: 'paste',
+ topPause: 'pause',
+ topPlay: 'play',
+ topPlaying: 'playing',
+ topProgress: 'progress',
+ topRateChange: 'ratechange',
+ topScroll: 'scroll',
+ topSeeked: 'seeked',
+ topSeeking: 'seeking',
+ topSelectionChange: 'selectionchange',
+ topStalled: 'stalled',
+ topSuspend: 'suspend',
+ topTextInput: 'textInput',
+ topTimeUpdate: 'timeupdate',
+ topTouchCancel: 'touchcancel',
+ topTouchEnd: 'touchend',
+ topTouchMove: 'touchmove',
+ topTouchStart: 'touchstart',
+ topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
+ topVolumeChange: 'volumechange',
+ topWaiting: 'waiting',
+ topWheel: 'wheel'
+};
- // check max value matched
- if (lowercased.length > settings.max) {
- return false;
- }
+/**
+ * To ensure no conflicts with other potential React instances on the page
+ */
+var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
- // check if user name is an email
- if (strictValidation && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(str) === true) {
- return false;
+function getListeningForDocument(mountAt) {
+ // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
+ // directly.
+ if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
+ mountAt[topListenersIDKey] = reactTopListenersCounter++;
+ alreadyListeningTo[mountAt[topListenersIDKey]] = {};
}
-
- // check allowed characters matched
- var result = regExp.exec(lowercased);
- return !!(result && result[0]);
-}
-
-function getUsernameValidation(m) {
- var usernameValidation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__connection_database__["r" /* databaseConnection */])(m).getIn(['validation', 'username']);
- return usernameValidation ? usernameValidation.toJS() : null;
-}
-
-function setUsername(m, str) {
- var usernameStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'username';
- var validateUsernameFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
- var strictValidation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
-
- var usernameValidation = validateUsernameFormat ? getUsernameValidation(m) : null;
-
- var validator = function validator(value) {
- switch (usernameStyle) {
- case 'email':
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(value);
- case 'username':
- return validateUsername(value, validateUsernameFormat, usernameValidation, strictValidation);
- default:
- return usernameLooksLikeEmail(value) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(value) : validateUsername(value, validateUsernameFormat, usernameValidation, strictValidation);
- }
- };
-
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__index__["e" /* setField */])(m, 'username', str, validator);
-}
-
-function usernameLooksLikeEmail(str) {
- return str.indexOf('@') > -1 && str.indexOf('.') > -1;
+ return alreadyListeningTo[mountAt[topListenersIDKey]];
}
-/***/ }),
-/* 72 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_username_input__ = __webpack_require__(215);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__username__ = __webpack_require__(71);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__avatar__ = __webpack_require__(107);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-
-
-
+/**
+ * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
+ * example:
+ *
+ * EventPluginHub.putListener('myID', 'onClick', myFunction);
+ *
+ * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
+ *
+ * @internal
+ */
+var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
+ /**
+ * Injectable event backend
+ */
+ ReactEventListener: null,
+ injection: {
+ /**
+ * @param {object} ReactEventListener
+ */
+ injectReactEventListener: function (ReactEventListener) {
+ ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
+ ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
+ }
+ },
+ /**
+ * Sets whether or not any created callbacks should be enabled.
+ *
+ * @param {boolean} enabled True if callbacks should be enabled.
+ */
+ setEnabled: function (enabled) {
+ if (ReactBrowserEventEmitter.ReactEventListener) {
+ ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
+ }
+ },
+ /**
+ * @return {boolean} True if callbacks are enabled.
+ */
+ isEnabled: function () {
+ return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
+ },
+ /**
+ * We listen for bubbled touch events on the document object.
+ *
+ * Firefox v8.01 (and possibly others) exhibited strange behavior when
+ * mounting `onmousemove` events at some node that was not the document
+ * element. The symptoms were that if your mouse is not moving over something
+ * contained within that mount point (for example on the background) the
+ * top-level listeners for `onmousemove` won't be called. However, if you
+ * register the `mousemove` on the document object, then it will of course
+ * catch all `mousemove`s. This along with iOS quirks, justifies restricting
+ * top-level listeners to the document object only, at least for these
+ * movement types of events and possibly all events.
+ *
+ * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
+ *
+ * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
+ * they bubble to document.
+ *
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @param {object} contentDocumentHandle Document which owns the container
+ */
+ listenTo: function (registrationName, contentDocumentHandle) {
+ var mountAt = contentDocumentHandle;
+ var isListening = getListeningForDocument(mountAt);
+ var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
+ for (var i = 0; i < dependencies.length; i++) {
+ var dependency = dependencies[i];
+ if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
+ if (dependency === 'topWheel') {
+ if (isEventSupported('wheel')) {
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
+ } else if (isEventSupported('mousewheel')) {
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
+ } else {
+ // Firefox needs to capture a different mouse scroll event.
+ // @see http://www.quirksmode.org/dom/events/tests/scroll.html
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
+ }
+ } else if (dependency === 'topScroll') {
+ if (isEventSupported('scroll', true)) {
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
+ } else {
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
+ }
+ } else if (dependency === 'topFocus' || dependency === 'topBlur') {
+ if (isEventSupported('focus', true)) {
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
+ ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
+ } else if (isEventSupported('focusin')) {
+ // IE has `focusin` and `focusout` events which bubble.
+ // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
+ }
-var UsernamePane = function (_React$Component) {
- _inherits(UsernamePane, _React$Component);
+ // to make sure blur and focus event listeners are only attached once
+ isListening.topBlur = true;
+ isListening.topFocus = true;
+ } else if (topEventMapping.hasOwnProperty(dependency)) {
+ ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
+ }
- function UsernamePane() {
- _classCallCheck(this, UsernamePane);
+ isListening[dependency] = true;
+ }
+ }
+ },
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
+ trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
+ return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
+ },
- UsernamePane.prototype.componentDidMount = function componentDidMount(e) {
- var _props = this.props,
- lock = _props.lock,
- validateFormat = _props.validateFormat,
- usernameStyle = _props.usernameStyle,
- strictValidation = _props.strictValidation;
+ trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
+ return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
+ },
- if (__WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].avatar(lock) && __WEBPACK_IMPORTED_MODULE_3__index__["q" /* username */](lock)) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__avatar__["a" /* requestAvatar */])(__WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_3__index__["q" /* username */](lock));
+ /**
+ * Protect against document.createEvent() returning null
+ * Some popup blocker extensions appear to do this:
+ * https://github.com/facebook/react/issues/6887
+ */
+ supportsEventPageXY: function () {
+ if (!document.createEvent) {
+ return false;
}
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__username__["a" /* setUsername */], __WEBPACK_IMPORTED_MODULE_3__index__["q" /* username */](lock), usernameStyle, validateFormat, strictValidation);
- };
-
- UsernamePane.prototype.handleChange = function handleChange(e) {
- var _props2 = this.props,
- lock = _props2.lock,
- validateFormat = _props2.validateFormat,
- usernameStyle = _props2.usernameStyle,
- strictValidation = _props2.strictValidation;
+ var ev = document.createEvent('MouseEvent');
+ return ev != null && 'pageX' in ev;
+ },
- if (__WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].avatar(lock)) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__avatar__["b" /* debouncedRequestAvatar */])(__WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), e.target.value);
+ /**
+ * Listens to window scroll and resize events. We cache scroll values so that
+ * application code can access them without triggering reflows.
+ *
+ * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
+ * pageX/pageY isn't supported (legacy browsers).
+ *
+ * NOTE: Scroll events do not bubble.
+ *
+ * @see http://www.quirksmode.org/dom/events/scroll.html
+ */
+ ensureScrollValueMonitoring: function () {
+ if (hasEventPageXY === undefined) {
+ hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
}
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__username__["a" /* setUsername */], e.target.value, usernameStyle, validateFormat, strictValidation);
- };
-
- UsernamePane.prototype.render = function render() {
- var _props3 = this.props,
- i18n = _props3.i18n,
- lock = _props3.lock,
- placeholder = _props3.placeholder,
- validateFormat = _props3.validateFormat;
+ if (!hasEventPageXY && !isMonitoringScrollValue) {
+ var refresh = ViewportMetrics.refreshScrollValues;
+ ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
+ isMonitoringScrollValue = true;
+ }
+ }
+});
- var allowAutocomplete = __WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].allowAutocomplete(lock);
- var value = __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'username');
- var usernameValidation = validateFormat ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__username__["b" /* getUsernameValidation */])(lock) : {};
+module.exports = ReactBrowserEventEmitter;
- // TODO: invalidErrorHint and blankErrorHint are deprecated.
- // They are kept for backwards compatibiliy in the code for the customers overwriting
- // them with languageDictionary. They can be removed in the next major release.
- var invalidHintKey = function invalidHintKey(str) {
- if (!str) {
- return i18n.str('blankErrorHint') ? 'blankErrorHint' : 'blankUsernameErrorHint';
- }
- if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__username__["c" /* usernameLooksLikeEmail */])(str) || !validateFormat) return i18n.str('invalidErrorHint') ? 'invalidErrorHint' : 'invalidUsernameErrorHint';
- return 'usernameFormatErrorHint';
- };
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
- var invalidHint = function invalidHint(str) {
- var hintKey = invalidHintKey(str);
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
- // only show format info in the error if it should validate the format and
- // if there is any format restrictions for the connection
- if ('usernameFormatErrorHint' === hintKey && validateFormat && usernameValidation != null) {
- return i18n.str(hintKey, usernameValidation.min, usernameValidation.max);
- }
- return i18n.str(hintKey);
- };
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_username_input__["a" /* default */], {
- value: value,
- invalidHint: invalidHint(value),
- isValid: !__WEBPACK_IMPORTED_MODULE_3__index__["k" /* isFieldVisiblyInvalid */](lock, 'username'),
- onChange: this.handleChange.bind(this),
- placeholder: placeholder,
- autoComplete: allowAutocomplete,
- disabled: __WEBPACK_IMPORTED_MODULE_5__core_index__["submitting"](lock)
- });
- };
+var SyntheticUIEvent = __webpack_require__(46);
+var ViewportMetrics = __webpack_require__(138);
- return UsernamePane;
-}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
+var getEventModifierState = __webpack_require__(96);
-/* harmony default export */ __webpack_exports__["a"] = (UsernamePane);
+/**
+ * @interface MouseEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+var MouseEventInterface = {
+ screenX: null,
+ screenY: null,
+ clientX: null,
+ clientY: null,
+ ctrlKey: null,
+ shiftKey: null,
+ altKey: null,
+ metaKey: null,
+ getModifierState: getEventModifierState,
+ button: function (event) {
+ // Webkit, Firefox, IE9+
+ // which: 1 2 3
+ // button: 0 1 2 (standard)
+ var button = event.button;
+ if ('which' in event) {
+ return button;
+ }
+ // IE<9
+ // which: undefined
+ // button: 0 0 0
+ // button: 1 4 2 (onmouseup)
+ return button === 2 ? 2 : button === 4 ? 1 : 0;
+ },
+ buttons: null,
+ relatedTarget: function (event) {
+ return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
+ },
+ // "Proprietary" Interface.
+ pageX: function (event) {
+ return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
+ },
+ pageY: function (event) {
+ return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
+ }
+};
+/**
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {string} dispatchMarker Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @extends {SyntheticUIEvent}
+ */
+function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
+ return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
+}
-UsernamePane.propTypes = {
- i18n: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
- lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
- placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
- validateFormat: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
- usernameStyle: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['any', 'email', 'username']),
- strictValidation: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired
-};
+SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
-UsernamePane.defaultProps = {
- validateFormat: false,
- usernameStyle: 'username'
-};
+module.exports = SyntheticMouseEvent;
/***/ }),
-/* 73 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["b"] = skipQuickAuth;
-/* harmony export (immutable) */ __webpack_exports__["a"] = hasSkippedQuickAuth;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_data_utils__ = __webpack_require__(20);
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
-var _dataFns = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_data_utils__["a" /* dataFns */])(['quickAuth']),
- tget = _dataFns.tget,
- tset = _dataFns.tset;
-function skipQuickAuth(m, b) {
- return tset(m, 'skipped', b);
-}
+var _prodInvariant = __webpack_require__(5);
-function hasSkippedQuickAuth(m) {
- return tget(m, 'skipped', false);
-}
+var invariant = __webpack_require__(2);
-/***/ }),
-/* 74 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var OBSERVED_ERROR = {};
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IconSvg; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_wrap__ = __webpack_require__(23);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__password_password_strength__ = __webpack_require__(213);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_index__ = __webpack_require__(1);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+/**
+ * `Transaction` creates a black box that is able to wrap any method such that
+ * certain invariants are maintained before and after the method is invoked
+ * (Even if an exception is thrown while invoking the wrapped method). Whoever
+ * instantiates a transaction can provide enforcers of the invariants at
+ * creation time. The `Transaction` class itself will supply one additional
+ * automatic invariant for you - the invariant that any transaction instance
+ * should not be run while it is already being run. You would typically create a
+ * single instance of a `Transaction` for reuse multiple times, that potentially
+ * is used to wrap several different methods. Wrappers are extremely simple -
+ * they only require implementing two methods.
+ *
+ *
+ * wrappers (injected at creation time)
+ * + +
+ * | |
+ * +-----------------|--------|--------------+
+ * | v | |
+ * | +---------------+ | |
+ * | +--| wrapper1 |---|----+ |
+ * | | +---------------+ v | |
+ * | | +-------------+ | |
+ * | | +----| wrapper2 |--------+ |
+ * | | | +-------------+ | | |
+ * | | | | | |
+ * | v v v v | wrapper
+ * | +---+ +---+ +---------+ +---+ +---+ | invariants
+ * perform(anyMethod) | | | | | | | | | | | | maintained
+ * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | | | | | | | | | | | |
+ * | +---+ +---+ +---------+ +---+ +---+ |
+ * | initialize close |
+ * +-----------------------------------------+
+ *
+ *
+ * Use cases:
+ * - Preserving the input selection ranges before/after reconciliation.
+ * Restoring selection even in the event of an unexpected error.
+ * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
+ * while guaranteeing that afterwards, the event system is reactivated.
+ * - Flushing a queue of collected DOM mutations to the main UI thread after a
+ * reconciliation takes place in a worker thread.
+ * - Invoking any collected `componentDidUpdate` callbacks after rendering new
+ * content.
+ * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
+ * to preserve the `scrollTop` (an automatic scroll aware DOM).
+ * - (Future use case): Layout calculations before and after DOM updates.
+ *
+ * Transactional plugin API:
+ * - A module that has an `initialize` method that returns any precomputation.
+ * - and a `close` method that accepts the precomputation. `close` is invoked
+ * when the wrapped process is completed, or has failed.
+ *
+ * @param {Array} transactionWrapper Wrapper modules
+ * that implement `initialize` and `close`.
+ * @return {Transaction} Single transaction for reuse in thread.
+ *
+ * @class Transaction
+ */
+var TransactionImpl = {
+ /**
+ * Sets up this instance so that it is prepared for collecting metrics. Does
+ * so such that this setup method may be used on an instance that is already
+ * initialized, in a way that does not consume additional memory upon reuse.
+ * That can be useful if you decide to make your subclass of this mixin a
+ * "PooledClass".
+ */
+ reinitializeTransaction: function () {
+ this.transactionWrappers = this.getTransactionWrappers();
+ if (this.wrapperInitData) {
+ this.wrapperInitData.length = 0;
+ } else {
+ this.wrapperInitData = [];
+ }
+ this._isInTransaction = false;
+ },
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+ _isInTransaction: false,
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+ /**
+ * @abstract
+ * @return {Array} Array of transaction wrappers.
+ */
+ getTransactionWrappers: null,
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+ isInTransaction: function () {
+ return !!this._isInTransaction;
+ },
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+ /* eslint-disable space-before-function-paren */
+
+ /**
+ * Executes the function within a safety window. Use this for the top level
+ * methods that result in large amounts of computation/mutations that would
+ * need to be safety checked. The optional arguments helps prevent the need
+ * to bind in many cases.
+ *
+ * @param {function} method Member of scope to call.
+ * @param {Object} scope Scope to invoke from.
+ * @param {Object?=} a Argument to pass to the method.
+ * @param {Object?=} b Argument to pass to the method.
+ * @param {Object?=} c Argument to pass to the method.
+ * @param {Object?=} d Argument to pass to the method.
+ * @param {Object?=} e Argument to pass to the method.
+ * @param {Object?=} f Argument to pass to the method.
+ *
+ * @return {*} Return value from `method`.
+ */
+ perform: function (method, scope, a, b, c, d, e, f) {
+ /* eslint-enable space-before-function-paren */
+ !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
+ var errorThrown;
+ var ret;
+ try {
+ this._isInTransaction = true;
+ // Catching errors makes debugging more difficult, so we start with
+ // errorThrown set to true before setting it to false after calling
+ // close -- if it's still set to true in the finally block, it means
+ // one of these calls threw.
+ errorThrown = true;
+ this.initializeAll(0);
+ ret = method.call(scope, a, b, c, d, e, f);
+ errorThrown = false;
+ } finally {
+ try {
+ if (errorThrown) {
+ // If `method` throws, prefer to show that stack trace over any thrown
+ // by invoking `closeAll`.
+ try {
+ this.closeAll(0);
+ } catch (err) {}
+ } else {
+ // Since `method` didn't throw, we don't want to silence the exception
+ // here.
+ this.closeAll(0);
+ }
+ } finally {
+ this._isInTransaction = false;
+ }
+ }
+ return ret;
+ },
+
+ initializeAll: function (startIndex) {
+ var transactionWrappers = this.transactionWrappers;
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
+ var wrapper = transactionWrappers[i];
+ try {
+ // Catching errors makes debugging more difficult, so we start with the
+ // OBSERVED_ERROR state before overwriting it with the real return value
+ // of initialize -- if it's still set to OBSERVED_ERROR in the finally
+ // block, it means wrapper.initialize threw.
+ this.wrapperInitData[i] = OBSERVED_ERROR;
+ this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
+ } finally {
+ if (this.wrapperInitData[i] === OBSERVED_ERROR) {
+ // The initializer for wrapper i threw an error; initialize the
+ // remaining wrappers but silence any exceptions from them to ensure
+ // that the first error is the one to bubble up.
+ try {
+ this.initializeAll(i + 1);
+ } catch (err) {}
+ }
+ }
+ }
+ },
+ /**
+ * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
+ * them the respective return values of `this.transactionWrappers.init[i]`
+ * (`close`rs that correspond to initializers that failed will not be
+ * invoked).
+ */
+ closeAll: function (startIndex) {
+ !this.isInTransaction() ? false ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
+ var transactionWrappers = this.transactionWrappers;
+ for (var i = startIndex; i < transactionWrappers.length; i++) {
+ var wrapper = transactionWrappers[i];
+ var initData = this.wrapperInitData[i];
+ var errorThrown;
+ try {
+ // Catching errors makes debugging more difficult, so we start with
+ // errorThrown set to true before setting it to false after calling
+ // close -- if it's still set to true in the finally block, it means
+ // wrapper.close threw.
+ errorThrown = true;
+ if (initData !== OBSERVED_ERROR && wrapper.close) {
+ wrapper.close.call(this, initData);
+ }
+ errorThrown = false;
+ } finally {
+ if (errorThrown) {
+ // The closer for wrapper i threw an error; close the remaining
+ // wrappers but silence any exceptions from them to ensure that the
+ // first error is the one to bubble up.
+ try {
+ this.closeAll(i + 1);
+ } catch (e) {}
+ }
+ }
+ }
+ this.wrapperInitData.length = 0;
+ }
+};
+module.exports = TransactionImpl;
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * Based on the escape-html library, which is used under the MIT License below:
+ *
+ * Copyright (c) 2012-2013 TJ Holowaychuk
+ * Copyright (c) 2015 Andreas Lubbe
+ * Copyright (c) 2015 Tiancheng "Timothy" Gu
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * 'Software'), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
-var IconSvg = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'svg',
- {
- 'aria-hidden': 'true',
- focusable: 'false',
- width: '11px',
- height: '14px',
- viewBox: '0 0 13 16',
- version: '1.1',
- xmlns: 'http://www.w3.org/2000/svg',
- xmlnsXlink: 'http://www.w3.org/1999/xlink',
- className: 'auth0-lock-icon auth0-lock-icon-box'
- },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'g',
- { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'g',
- { transform: 'translate(-288.000000, -1508.000000)', fill: '#888888' },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M299,1523.998 L290,1523.998 C288.896,1523.998 288,1523.102 288,1521.999 L288,1515.999 C288,1514.895 288.896,1513.998 290,1513.998 L290,1513.998 L290,1512.499 C290,1510.015 292.015,1507.999 294.5,1507.999 C296.985,1507.999 299,1510.015 299,1512.499 L299,1513.999 C300.104,1513.999 301,1514.895 301,1515.999 L301,1521.999 C301,1523.103 300.104,1523.998 299,1523.998 L299,1523.998 Z M298,1512.499 C298,1510.566 296.433,1508.999 294.5,1508.999 C292.567,1508.999 291,1510.566 291,1512.499 L291,1513.998 L298,1513.998 L298,1512.499 L298,1512.499 Z M300,1515.999 C300,1515.446 299.552,1514.998 299,1514.998 L290,1514.998 C289.447,1514.998 289,1515.446 289,1515.999 L289,1521.999 C289,1522.551 289.447,1522.998 290,1522.998 L299,1522.998 C299.552,1522.998 300,1522.551 300,1521.999 L300,1515.999 L300,1515.999 Z M294.5,1520.998 C294.224,1520.998 294,1520.774 294,1520.498 L294,1517.498 C294,1517.223 294.224,1516.999 294.5,1516.999 C294.776,1516.999 295,1517.223 295,1517.498 L295,1520.498 C295,1520.774 294.776,1520.998 294.5,1520.998 L294.5,1520.998 Z' })
- )
- )
-);
+// code copied and modified from escape-html
+/**
+ * Module variables.
+ * @private
+ */
-var PasswordInput = function (_React$Component) {
- _inherits(PasswordInput, _React$Component);
+var matchHtmlRegExp = /["'&<>]/;
- function PasswordInput(props) {
- _classCallCheck(this, PasswordInput);
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
- _this.state = {};
- return _this;
+ if (!match) {
+ return str;
}
- PasswordInput.prototype.focus = function focus() {
- this.refs.input && this.refs.input.focus();
- };
-
- PasswordInput.prototype.hasFocus = function hasFocus() {
- return this.state.focused;
- };
-
- PasswordInput.prototype.render = function render() {
- var _props = this.props,
- invalidHint = _props.invalidHint,
- showPasswordStrengthMessage = _props.showPasswordStrengthMessage,
- isValid = _props.isValid,
- onChange = _props.onChange,
- policy = _props.policy,
- strengthMessages = _props.strengthMessages,
- value = _props.value,
- showPassword = _props.showPassword,
- lock = _props.lock,
- props = _objectWithoutProperties(_props, ['invalidHint', 'showPasswordStrengthMessage', 'isValid', 'onChange', 'policy', 'strengthMessages', 'value', 'showPassword', 'lock']);
-
- var _state = this.state,
- focused = _state.focused,
- changing = _state.changing;
-
-
- var allowPasswordAutocomplete = __WEBPACK_IMPORTED_MODULE_4__core_index__["ui"].allowPasswordAutocomplete(lock);
-
- var passwordStrength = policy && focused && changing && showPasswordStrengthMessage ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__password_password_strength__["a" /* default */], { messages: strengthMessages, password: value, policy: policy }) : null;
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_2__input_wrap__["a" /* default */],
- {
- after: passwordStrength,
- focused: focused,
- invalidHint: invalidHint,
- isValid: isValid,
- name: 'password',
- icon: IconSvg
- },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', _extends({
- ref: 'input',
- type: showPassword ? 'text' : 'password',
- id: __WEBPACK_IMPORTED_MODULE_4__core_index__["id"](lock) + '-password',
- name: 'password',
- className: 'auth0-lock-input',
- autoComplete: allowPasswordAutocomplete ? 'on' : 'off',
- autoCapitalize: 'off',
- onChange: this.handleOnChange.bind(this),
- onFocus: this.handleFocus.bind(this),
- onBlur: this.handleBlur.bind(this),
- value: value,
- 'aria-label': 'Password',
- 'aria-invalid': !isValid,
- 'aria-describedby': !isValid && !policy && invalidHint ? 'auth0-lock-error-msg-password' : undefined
- }, props))
- );
- };
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34:
+ // "
+ escape = '"';
+ break;
+ case 38:
+ // &
+ escape = '&';
+ break;
+ case 39:
+ // '
+ escape = '''; // modified from escape-html; used to be '''
+ break;
+ case 60:
+ // <
+ escape = '<';
+ break;
+ case 62:
+ // >
+ escape = '>';
+ break;
+ default:
+ continue;
+ }
- PasswordInput.prototype.handleOnChange = function handleOnChange(e) {
- var state = this.state;
- state.changing = true;
- this.setState(state);
- if (this.props.onChange) {
- this.props.onChange(e);
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
}
- };
- PasswordInput.prototype.handleFocus = function handleFocus() {
- this.setState({ focused: true });
- };
+ lastIndex = index + 1;
+ html += escape;
+ }
- PasswordInput.prototype.handleBlur = function handleBlur() {
- this.setState({ focused: false });
- };
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
+}
+// end code copied and modified from escape-html
- return PasswordInput;
-}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
+/**
+ * Escapes text to prevent scripting attacks.
+ *
+ * @param {*} text Text value to escape.
+ * @return {string} An escaped string.
+ */
+function escapeTextContentForBrowser(text) {
+ if (typeof text === 'boolean' || typeof text === 'number') {
+ // this shortcircuit helps perf for types that we know will never have
+ // special characters, especially given that this function is used often
+ // for numeric dom ids.
+ return '' + text;
+ }
+ return escapeHtml(text);
+}
-PasswordInput.propTypes = {
- invalidHint: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
- showPasswordStrengthMessage: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
- isValid: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
- onChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
- policy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
- strengthMessages: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
- value: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
- showPassword: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
- lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired
-};
-/* harmony default export */ __webpack_exports__["b"] = (PasswordInput);
+module.exports = escapeTextContentForBrowser;
/***/ }),
-/* 75 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__button_auth_button__ = __webpack_require__(117);
-
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
-var QuickAuthPane = function QuickAuthPane(props) {
- var alternativeLabel = props.alternativeLabel,
- alternativeClickHandler = props.alternativeClickHandler,
- buttonLabel = props.buttonLabel,
- buttonClickHandler = props.buttonClickHandler,
- header = props.header,
- strategy = props.strategy,
- buttonIcon = props.buttonIcon,
- primaryColor = props.primaryColor,
- foregroundColor = props.foregroundColor;
+var ExecutionEnvironment = __webpack_require__(14);
+var DOMNamespaces = __webpack_require__(86);
+var WHITESPACE_TEST = /^[ \r\n\t\f]/;
+var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
- var alternative = alternativeLabel ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'p',
- { className: 'auth0-lock-alternative' },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'a',
- {
- className: 'auth0-lock-alternative-link',
- href: '#',
- onClick: function onClick(e) {
- e.preventDefault();
- alternativeClickHandler(e);
- }
- },
- alternativeLabel
- )
- ) : null;
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(94);
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'div',
- { className: 'auth0-lock-last-login-pane' },
- header,
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__button_auth_button__["a" /* default */], {
- label: buttonLabel,
- onClick: function onClick(e) {
- e.preventDefault();
- buttonClickHandler(e);
- },
- strategy: strategy,
- primaryColor: primaryColor,
- foregroundColor: foregroundColor,
- icon: buttonIcon
- }),
- alternative,
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
- 'div',
- { className: 'auth0-loading-container' },
- __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: 'auth0-loading' })
- )
- );
-};
+// SVG temp container for IE lacking innerHTML
+var reusableSVGContainer;
-QuickAuthPane.propTypes = {
- alternativeLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
- alternativeClickHandler: function alternativeClickHandler(props, propName, component) {
- for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
- rest[_key - 3] = arguments[_key];
+/**
+ * Set the innerHTML property of a node, ensuring that whitespace is preserved
+ * even in IE8.
+ *
+ * @param {DOMElement} node
+ * @param {string} html
+ * @internal
+ */
+var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
+ // IE does not have innerHTML for SVG nodes, so instead we inject the
+ // new markup in a temp node and then move the child nodes across into
+ // the target node
+ if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
+ reusableSVGContainer = reusableSVGContainer || document.createElement('div');
+ reusableSVGContainer.innerHTML = '' + html + ' ';
+ var svgNode = reusableSVGContainer.firstChild;
+ while (svgNode.firstChild) {
+ node.appendChild(svgNode.firstChild);
}
+ } else {
+ node.innerHTML = html;
+ }
+});
- if (props.alternativeLabel !== undefined) {
- var _PropTypes$func;
+if (ExecutionEnvironment.canUseDOM) {
+ // IE8: When updating a just created node with innerHTML only leading
+ // whitespace is removed. When updating an existing node with innerHTML
+ // whitespace in root TextNodes is also collapsed.
+ // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
- return (_PropTypes$func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func).isRequired.apply(_PropTypes$func, [props, propName, component].concat(rest));
- }
- },
- buttonLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
- buttonClickHandler: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- header: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element,
- strategy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired
-};
+ // Feature detection; only IE8 is known to behave improperly like this.
+ var testElement = document.createElement('div');
+ testElement.innerHTML = ' ';
+ if (testElement.innerHTML === '') {
+ setInnerHTML = function (node, html) {
+ // Magic theory: IE8 supposedly differentiates between added and updated
+ // nodes when processing innerHTML, innerHTML on updated nodes suffers
+ // from worse whitespace behavior. Re-adding a node like this triggers
+ // the initial and more favorable whitespace behavior.
+ // TODO: What to do on a detached node?
+ if (node.parentNode) {
+ node.parentNode.replaceChild(node, node);
+ }
-/* harmony default export */ __webpack_exports__["a"] = (QuickAuthPane);
+ // We also implement a workaround for non-visible tags disappearing into
+ // thin air on IE8, this only happens if there is no visible text
+ // in-front of the non-visible tags. Piggyback on the whitespace fix
+ // and simply check if any non-visible tags appear in the source.
+ if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
+ // Recover leading whitespace by temporarily prepending any character.
+ // \uFEFF has the potential advantage of being zero-width/invisible.
+ // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
+ // in hopes that this is preserved even if "\uFEFF" is transformed to
+ // the actual Unicode character (by Babel, for example).
+ // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
+ node.innerHTML = String.fromCharCode(0xfeff) + html;
+
+ // deleteData leaves an empty `TextNode` which offsets the index of all
+ // children. Definitely want to avoid this.
+ var textNode = node.firstChild;
+ if (textNode.data.length === 1) {
+ node.removeChild(textNode);
+ } else {
+ textNode.deleteData(0, 1);
+ }
+ } else {
+ node.innerHTML = html;
+ }
+ };
+ }
+ testElement = null;
+}
+
+module.exports = setInnerHTML;
/***/ }),
-/* 76 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = load;
-/* harmony export (immutable) */ __webpack_exports__["b"] = preload;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_auth0_js__ = __webpack_require__(104);
-
-if (typeof window !== 'undefined' && !window.Auth0) {
- window.Auth0 = {};
-}
-var cbs = {};
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = assertString;
-function load(attrs) {
- var cb = attrs.cb,
- check = attrs.check,
- method = attrs.method,
- url = attrs.url;
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+function assertString(input) {
+ var isString = typeof input === 'string' || input instanceof String;
- if (!cbs[method]) {
- cbs[method] = [];
- window.Auth0[method] = function () {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+ if (!isString) {
+ var invalidType = _typeof(input);
- cbs[method] = cbs[method].filter(function (x) {
- if (x.check.apply(x, args)) {
- setTimeout(function () {
- return x.cb.apply(x, [null].concat(args));
- }, 0);
- return false;
- } else {
- return true;
- }
- });
- };
+ if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;
+ throw new TypeError("Expected a string but received a ".concat(invalidType));
}
+}
- cbs[method].push({ cb: cb, check: check, url: url });
-
- var count = cbs[method].reduce(function (r, x) {
- return r + (x.url === url ? 1 : 0);
- }, 0);
+module.exports = exports.default;
+module.exports.default = exports.default;
- if (count > 1) return;
+/***/ }),
+/* 66 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var script = window.document.createElement('script');
- script.src = url;
- window.document.getElementsByTagName('head')[0].appendChild(script);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- var handleError = function handleError(err) {
- cbs[method] = cbs[method].filter(function (x) {
- if (x.url === url) {
- setTimeout(function () {
- return x.cb(err);
- }, 0);
- return false;
- } else {
- return true;
- }
- });
- };
- var timeoutID = setTimeout(function () {
- return handleError(new Error(url + ' timed out'));
- }, 20000);
+var SignUpTerms = function SignUpTerms(_ref) {
+ var checkHandler = _ref.checkHandler,
+ checked = _ref.checked,
+ children = _ref.children,
+ showCheckbox = _ref.showCheckbox;
- script.addEventListener('load', function () {
- return clearTimeout(timeoutID);
- });
+ return checkHandler ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
+ "span",
+ { className: "auth0-lock-sign-up-terms-agreement" },
+ __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
+ "label",
+ null,
+ showCheckbox && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", { type: "checkbox", onChange: checkHandler, checked: checked }),
+ children
+ )
+ ) : children;
+};
- script.addEventListener('error', function () {
- clearTimeout(timeoutID);
- handleError(new Error(url + ' could not be loaded.'));
- });
-}
+/* harmony default export */ __webpack_exports__["a"] = (SignUpTerms);
-function preload(_ref) {
- var method = _ref.method,
- cb = _ref.cb;
+/***/ }),
+/* 67 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- window.Auth0[method] = cb;
-}
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["a"] = startHRD;
+/* harmony export (immutable) */ __webpack_exports__["c"] = cancelHRD;
+/* harmony export (immutable) */ __webpack_exports__["b"] = logIn;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enterprise__ = __webpack_require__(13);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_email__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_actions__ = __webpack_require__(16);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__captcha__ = __webpack_require__(40);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__database_index__ = __webpack_require__(10);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-/***/ }),
-/* 77 */
-/***/ (function(module, exports, __webpack_require__) {
-/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */
-(function (global, factory) {
- true ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global = global || self, global.DOMPurify = factory());
-}(this, function () { 'use strict';
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
- var hasOwnProperty = Object.hasOwnProperty,
- setPrototypeOf = Object.setPrototypeOf,
- isFrozen = Object.isFrozen,
- getPrototypeOf = Object.getPrototypeOf,
- getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var freeze = Object.freeze,
- seal = Object.seal,
- create = Object.create; // eslint-disable-line import/no-mutable-exports
- var _ref = typeof Reflect !== 'undefined' && Reflect,
- apply = _ref.apply,
- construct = _ref.construct;
- if (!apply) {
- apply = function apply(fun, thisValue, args) {
- return fun.apply(thisValue, args);
- };
- }
- if (!freeze) {
- freeze = function freeze(x) {
- return x;
- };
- }
- if (!seal) {
- seal = function seal(x) {
- return x;
- };
- }
+// TODO: enterprise connections should not depend on database
+// connections. However, we now allow a username input to contain also
+// an email and this information is in the database module. We should
+// make this information flow from the UI (like we do for the startHRD
+// function). Including this dependency here allows us to do that
+// incrementally.
- if (!construct) {
- construct = function construct(Func, args) {
- return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();
- };
- }
- var arrayForEach = unapply(Array.prototype.forEach);
- var arrayPop = unapply(Array.prototype.pop);
- var arrayPush = unapply(Array.prototype.push);
+function startHRD(id, email) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_1__enterprise__["l" /* toggleHRD */], email);
+}
- var stringToLowerCase = unapply(String.prototype.toLowerCase);
- var stringMatch = unapply(String.prototype.match);
- var stringReplace = unapply(String.prototype.replace);
- var stringIndexOf = unapply(String.prototype.indexOf);
- var stringTrim = unapply(String.prototype.trim);
+function cancelHRD(id) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["l" /* toggleHRD */])(m, false);
+ m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["a" /* hideInvalidFields */])(m);
+ return m;
+ });
+}
- var regExpTest = unapply(RegExp.prototype.test);
+function getConnectionScopesFrom(m, connection) {
+ var connectionScopes = __WEBPACK_IMPORTED_MODULE_5__core_index__["auth"].connectionScopes(m);
+ return connectionScopes.get(connection.get('name'));
+}
- var typeErrorCreate = unconstruct(TypeError);
+function logIn(id) {
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
+ var email = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username');
+ var ssoConnection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["m" /* matchConnection */])(m, email);
+ var enterpriseConnection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["n" /* enterpriseActiveFlowConnection */])(m);
+ var connectionScopes = getConnectionScopesFrom(m, ssoConnection || enterpriseConnection);
+ var usernameField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username';
+ var fields = [usernameField, 'password'];
- function unapply(func) {
- return function (thisArg) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
+ var params = {
+ connection_scope: connectionScopes ? connectionScopes.toJS() : undefined
+ };
- return apply(func, thisArg, args);
- };
+ if (ssoConnection && !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["i" /* isHRDActive */])(m)) {
+ return logInSSO(id, ssoConnection, params);
}
- function unconstruct(func) {
- return function () {
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
+ var isCaptchaValid = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["a" /* setCaptchaParams */])(m, params, fields);
- return construct(func, args);
- };
+ if (!isCaptchaValid && !ssoConnection) {
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["b" /* showMissingCaptcha */])(m, id);
}
- /* Add properties to a lookup table */
- function addToSet(set, array) {
- if (setPrototypeOf) {
- // Make 'in' and truthy checks like Boolean(set.constructor)
- // independent of any properties defined on Object.prototype.
- // Prevent prototype setters from intercepting set as a this value.
- setPrototypeOf(set, null);
- }
-
- var l = array.length;
- while (l--) {
- var element = array[l];
- if (typeof element === 'string') {
- var lcElement = stringToLowerCase(element);
- if (lcElement !== element) {
- // Config presets (e.g. tags.js, attrs.js) are immutable.
- if (!isFrozen(array)) {
- array[l] = lcElement;
- }
-
- element = lcElement;
- }
- }
-
- set[element] = true;
- }
-
- return set;
- }
+ logInActiveFlow(id, params);
+}
- /* Shallow clone an object */
- function clone(object) {
- var newObject = create(null);
+function logInActiveFlow(id, params) {
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
+ var usernameField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["i" /* isHRDActive */])(m) || !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'username' : 'email';
- var property = void 0;
- for (property in object) {
- if (apply(hasOwnProperty, object, [property])) {
- newObject[property] = object[property];
- }
- }
+ var originalUsername = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, usernameField);
+ var connection = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__enterprise__["n" /* enterpriseActiveFlowConnection */])(m);
- return newObject;
- }
+ var username = __WEBPACK_IMPORTED_MODULE_5__core_index__["defaultADUsernameFromEmailPrefix"](m) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__field_email__["b" /* emailLocalPart */])(originalUsername) : originalUsername;
- /* IE10 doesn't support __lookupGetter__ so lets'
- * simulate it. It also automatically checks
- * if the prop is function or getter and behaves
- * accordingly. */
- function lookupGetter(object, prop) {
- while (object !== null) {
- var desc = getOwnPropertyDescriptor(object, prop);
- if (desc) {
- if (desc.get) {
- return unapply(desc.get);
- }
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__core_actions__["h" /* logIn */])(id, ['password', usernameField], _extends({}, params, {
+ connection: connection ? connection.get('name') : null,
+ username: username,
+ password: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, 'password'),
+ login_hint: username
+ }), function (id, error, fields, next) {
+ var wasCaptchaInvalid = error && error.code === 'invalid captcha';
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__captcha__["c" /* swapCaptcha */])(id, wasCaptchaInvalid, next);
+ });
+}
- if (typeof desc.value === 'function') {
- return unapply(desc.value);
- }
- }
+function logInSSO(id, connection, params) {
+ var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__store_index__["d" /* read */])(__WEBPACK_IMPORTED_MODULE_0__store_index__["e" /* getEntity */], 'lock', id);
+ var field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__database_index__["l" /* databaseLogInWithEmail */])(m) ? 'email' : 'username';
- object = getPrototypeOf(object);
- }
+ __WEBPACK_IMPORTED_MODULE_5__core_index__["emitEvent"](m, 'sso login', {
+ lockID: id,
+ connection: connection,
+ field: field
+ });
- function fallbackValue(element) {
- console.warn('fallback value for', element);
- return null;
- }
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__core_actions__["h" /* logIn */])(id, [field], _extends({}, params, {
+ connection: connection.get('name'),
+ login_hint: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__field_index__["c" /* getFieldValue */])(m, field)
+ }));
+}
- return fallbackValue;
- }
+/***/ }),
+/* 68 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["c"] = initTenant;
+/* unused harmony export tenantConnections */
+/* harmony export (immutable) */ __webpack_exports__["b"] = defaultDirectory;
+/* harmony export (immutable) */ __webpack_exports__["a"] = defaultDirectoryName;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies__ = __webpack_require__(105);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_auth0_password_policies__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_data_utils__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(1);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- // SVG
- var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
- var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
- // List of SVG elements that are disallowed by default.
- // We still need to know them so that we can do namespace
- // checks properly in case one wants to add them to
- // allow-list.
- var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
- var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);
- // Similarly to SVG, we want to know all MathML elements,
- // even those that we disallow by default.
- var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
- var text = freeze(['#text']);
- var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
+var _dataFns = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_data_utils__["a" /* dataFns */])(['client']),
+ initNS = _dataFns.initNS,
+ get = _dataFns.get;
- var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
+var DEFAULT_CONNECTION_VALIDATION = { username: { min: 1, max: 15 } };
- var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
+function formatConnectionValidation() {
+ var connectionValidation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
+ if (connectionValidation.username == null) {
+ return null;
+ }
- // eslint-disable-next-line unicorn/better-regex
- var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
- var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm);
- var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
- var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
- var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
- );
- var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
- var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
- );
+ var validation = _extends({}, DEFAULT_CONNECTION_VALIDATION, connectionValidation);
+ var defaultMin = DEFAULT_CONNECTION_VALIDATION.username.min;
+ var defaultMax = DEFAULT_CONNECTION_VALIDATION.username.max;
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+ validation.username.min = parseInt(validation.username.min, 10) || defaultMin;
+ validation.username.max = parseInt(validation.username.max, 10) || defaultMax;
- function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+ if (validation.username.min > validation.username.max) {
+ validation.username.min = defaultMin;
+ validation.username.max = defaultMax;
+ }
- var getGlobal = function getGlobal() {
- return typeof window === 'undefined' ? null : window;
- };
+ return validation;
+}
- /**
- * Creates a no-op policy for internal use only.
- * Don't export this function outside this module!
- * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
- * @param {Document} document The document object (to determine policy name suffix)
- * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
- * are not supported).
- */
- var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
- if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
- return null;
- }
+var emptyConnections = __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS({
+ database: [],
+ enterprise: [],
+ passwordless: [],
+ social: [],
+ unknown: [] // TODO: should be oauth2
+});
- // Allow the callers to control the unique policy name
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
- // Policy creation with duplicate names throws in Trusted Types.
- var suffix = null;
- var ATTR_NAME = 'data-tt-policy-suffix';
- if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
- suffix = document.currentScript.getAttribute(ATTR_NAME);
- }
+function initTenant(m, client_id, client) {
+ return initNS(m, formatTenant(client_id, client));
+}
- var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
+function formatTenant(client_id, o) {
+ return new __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS({
+ connections: formatTenantConnections(client_id, o),
+ defaultDirectory: o.defaultDirectory || null
+ });
+}
- try {
- return trustedTypes.createPolicy(policyName, {
- createHTML: function createHTML(html$$1) {
- return html$$1;
- }
- });
- } catch (_) {
- // Policy creation failed (most likely another DOMPurify script has
- // already run). Skip creating the policy, as this will only cause errors
- // if TT are enforced.
- console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
- return null;
- }
- };
+function formatTenantConnections(client_id, o) {
+ var result = emptyConnections.toJS();
+ var connectionTypes = Object.keys(o.connections).filter(function (name) {
+ return name != 'passwordless';
+ }); // disabled until lock supports passwordless connections within the same engine
+ var connections_filter = null;
- function createDOMPurify() {
- var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
+ if (o.clientsConnections && o.clientsConnections[client_id]) {
+ connections_filter = o.clientsConnections[client_id];
+ }
- var DOMPurify = function DOMPurify(root) {
- return createDOMPurify(root);
- };
+ connectionTypes.forEach(function (connectionTypeName) {
+ var _result$connectionTyp;
- /**
- * Version label, exposed for easier checks
- * if DOMPurify is up to date or not
- */
- DOMPurify.version = '2.3.4';
+ var connections = o.connections[connectionTypeName].map(function (connection) {
+ return formatTenantConnection(connectionTypeName, connection);
+ }).filter(function (connection) {
+ return connections_filter === null || connections_filter.includes(connection.name);
+ });
+ (_result$connectionTyp = result[connectionTypeName]).push.apply(_result$connectionTyp, connections);
+ });
- /**
- * Array of elements that DOMPurify removed during sanitation.
- * Empty if nothing was removed.
- */
- DOMPurify.removed = [];
+ return result;
+}
- if (!window || !window.document || window.document.nodeType !== 9) {
- // Not running in a browser, provide a factory function
- // so that you can pass your own Window
- DOMPurify.isSupported = false;
+function formatTenantConnection(connectionType, connection) {
+ var result = {
+ name: connection.name,
+ strategy: connection.strategy,
+ type: connectionType
+ };
- return DOMPurify;
+ if (connectionType === 'database') {
+ if (connection.validation && connection.validation.passwordPolicy) {
+ result.passwordPolicy = connection.validation.passwordPolicy;
}
- var originalDocument = window.document;
+ result.passwordPolicy = __WEBPACK_IMPORTED_MODULE_1_auth0_password_policies___default.a[result.passwordPolicy || 'none'];
- var document = window.document;
- var DocumentFragment = window.DocumentFragment,
- HTMLTemplateElement = window.HTMLTemplateElement,
- Node = window.Node,
- Element = window.Element,
- NodeFilter = window.NodeFilter,
- _window$NamedNodeMap = window.NamedNodeMap,
- NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
- HTMLFormElement = window.HTMLFormElement,
- DOMParser = window.DOMParser,
- trustedTypes = window.trustedTypes;
+ result.allowSignup = typeof connection.allowSignup === 'boolean' ? connection.allowSignup : true;
+ result.allowForgot = typeof connection.allowForgot === 'boolean' ? connection.allowForgot : true;
- var ElementPrototype = Element.prototype;
+ result.requireUsername = typeof connection.requiresUsername === 'boolean' ? connection.requiresUsername : false;
- var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
- var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
- var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
- var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
+ result.validation = formatConnectionValidation(connection.validation);
+ }
- // As per issue #47, the web-components registry is inherited by a
- // new document created via createHTMLDocument. As per the spec
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
- // a new empty registry is used when creating a template contents owner
- // document, so we use that as our parent document to ensure nothing
- // is inherited.
- if (typeof HTMLTemplateElement === 'function') {
- var template = document.createElement('template');
- if (template.content && template.content.ownerDocument) {
- document = template.content.ownerDocument;
- }
- }
+ if (connectionType === 'enterprise') {
+ result.domains = connection.domains;
+ }
- var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
- var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';
+ return result;
+}
- var _document = document,
- implementation = _document.implementation,
- createNodeIterator = _document.createNodeIterator,
- createDocumentFragment = _document.createDocumentFragment,
- getElementsByTagName = _document.getElementsByTagName;
- var importNode = originalDocument.importNode;
+function tenantConnections(m) {
+ return get(m, 'connections', emptyConnections);
+}
+function defaultDirectory(m) {
+ var name = defaultDirectoryName(m);
+ return name && __WEBPACK_IMPORTED_MODULE_3__index__["findConnection"](m, name);
+}
- var documentMode = {};
- try {
- documentMode = clone(document).documentMode ? document.documentMode : {};
- } catch (_) {}
+function defaultDirectoryName(m) {
+ return get(m, 'defaultDirectory', null);
+}
- var hooks = {};
+/***/ }),
+/* 69 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- /**
- * Expose whether this browser supports running the full DOMPurify.
- */
- DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["d"] = changeField;
+/* harmony export (immutable) */ __webpack_exports__["c"] = startOptionSelection;
+/* harmony export (immutable) */ __webpack_exports__["a"] = selectOption;
+/* harmony export (immutable) */ __webpack_exports__["b"] = cancelOptionSelection;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(3);
- var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,
- ERB_EXPR$$1 = ERB_EXPR,
- DATA_ATTR$$1 = DATA_ATTR,
- ARIA_ATTR$$1 = ARIA_ATTR,
- IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,
- ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;
- var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;
- /**
- * We consider the elements and attributes below to be safe. Ideally
- * don't add any new ones but feel free to remove unwanted ones.
- */
- /* allowed element names */
- var ALLOWED_TAGS = null;
- var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));
+function changeField(id, name, value, validationFn) {
+ for (var _len = arguments.length, validationExtraArgs = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
+ validationExtraArgs[_key - 4] = arguments[_key];
+ }
- /* Allowed attribute names */
- var ALLOWED_ATTR = null;
- var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));
+ __WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */].apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, __WEBPACK_IMPORTED_MODULE_2__index__["e" /* setField */], name, value, validationFn].concat(validationExtraArgs));
+}
- /*
- * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
- */
- var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
- tagNameCheck: {
- writable: true,
- configurable: false,
- enumerable: true,
- value: null
- },
- attributeNameCheck: {
- writable: true,
- configurable: false,
- enumerable: true,
- value: null
- },
- allowCustomizedBuiltInElements: {
- writable: true,
- configurable: false,
- enumerable: true,
- value: false
- }
- }));
+function startOptionSelection(id, name, iconUrl, icon) {
+ // TODO: should be transient
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ return m.setIn(['field', 'selecting', 'name'], name).setIn(['field', 'selecting', 'iconUrl'], iconUrl).setIn(['field', 'selecting', 'icon'], icon);
+ });
+}
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
- var FORBID_TAGS = null;
+function selectOption(id, name, option) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__index__["f" /* setOptionField */])(m.deleteIn(['field', 'selecting']), name, option);
+ });
+}
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
- var FORBID_ATTR = null;
+function cancelOptionSelection(id) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_1__store_index__["c" /* updateEntity */], 'lock', id, function (m) {
+ return m.deleteIn(['field', 'selecting']);
+ });
+}
+
+/***/ }),
+/* 70 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- /* Decide if ARIA attributes are okay */
- var ALLOW_ARIA_ATTR = true;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_captcha_input__ = __webpack_require__(209);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_index__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__captcha__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__recaptcha__ = __webpack_require__(189);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /* Decide if custom data attributes are okay */
- var ALLOW_DATA_ATTR = true;
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- /* Decide if unknown protocols are okay */
- var ALLOW_UNKNOWN_PROTOCOLS = false;
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /* Output should be safe for common template engines.
- * This means, DOMPurify removes data attributes, mustaches and ERB
- */
- var SAFE_FOR_TEMPLATES = false;
+/* eslint-disable no-nested-ternary */
- /* Decide if document with ... should be returned */
- var WHOLE_DOCUMENT = false;
- /* Track whether config is already set on this instance of DOMPurify. */
- var SET_CONFIG = false;
- /* Decide if all elements (e.g. style, script) must be children of
- * document.body. By default, browsers might move them to document.head */
- var FORCE_BODY = false;
- /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
- * string (or a TrustedHTML object if Trusted Types are supported).
- * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
- */
- var RETURN_DOM = false;
- /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
- * string (or a TrustedHTML object if Trusted Types are supported) */
- var RETURN_DOM_FRAGMENT = false;
- /* Try to return a Trusted Type object instead of a string, return a string in
- * case Trusted Types are not supported */
- var RETURN_TRUSTED_TYPE = false;
- /* Output should be free from DOM clobbering attacks? */
- var SANITIZE_DOM = true;
- /* Keep element content when removing element? */
- var KEEP_CONTENT = true;
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
- * of importing it into a new Document and returning a sanitized copy */
- var IN_PLACE = false;
- /* Allow usage of profiles like html, svg and mathMl */
- var USE_PROFILES = {};
+var CaptchaPane = function (_React$Component) {
+ _inherits(CaptchaPane, _React$Component);
- /* Tags to ignore content of when KEEP_CONTENT is true */
- var FORBID_CONTENTS = null;
- var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
+ function CaptchaPane() {
+ _classCallCheck(this, CaptchaPane);
- /* Tags that are safe for data: URIs */
- var DATA_URI_TAGS = null;
- var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+ }
- /* Attributes safe for values like "javascript:" */
- var URI_SAFE_ATTRIBUTES = null;
- var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
+ CaptchaPane.prototype.render = function render() {
+ var _props = this.props,
+ i18n = _props.i18n,
+ lock = _props.lock,
+ onReload = _props.onReload;
- var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
- /* Document namespace */
- var NAMESPACE = HTML_NAMESPACE;
- var IS_EMPTY_INPUT = false;
+ var lockId = __WEBPACK_IMPORTED_MODULE_3__core_index__["id"](lock);
+ var captcha = __WEBPACK_IMPORTED_MODULE_3__core_index__["captcha"](lock);
+ var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["c" /* getFieldValue */])(lock, 'captcha');
+ var isValid = !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__index__["k" /* isFieldVisiblyInvalid */])(lock, 'captcha');
+ var provider = captcha.get('provider');
- /* Parsing of strict XHTML documents */
- var PARSER_MEDIA_TYPE = void 0;
- var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
- var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
- var transformCaseFunc = void 0;
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__recaptcha__["a" /* isRecaptcha */])(provider)) {
+ var _handleChange = function _handleChange(value) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', lockId, __WEBPACK_IMPORTED_MODULE_5__captcha__["b" /* set */], value);
+ };
- /* Keep a reference to config to pass to hooks */
- var CONFIG = null;
+ var reset = function reset() {
+ _handleChange();
+ };
- /* Ideally, do not touch anything below this line */
- /* ______________________________________________ */
+ return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__recaptcha__["b" /* ReCAPTCHA */], {
+ provider: provider,
+ sitekey: captcha.get('siteKey'),
+ onChange: _handleChange,
+ onExpired: reset,
+ hl: __WEBPACK_IMPORTED_MODULE_3__core_index__["ui"].language(lock),
+ isValid: isValid,
+ value: value
+ });
+ }
- var formElement = document.createElement('form');
+ function handleChange(e) {
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', lockId, __WEBPACK_IMPORTED_MODULE_5__captcha__["b" /* set */], e.target.value);
+ }
- var isRegexOrFunction = function isRegexOrFunction(testValue) {
- return testValue instanceof RegExp || testValue instanceof Function;
- };
+ var placeholder = captcha.get('type') === 'code' ? i18n.str('captchaCodeInputPlaceholder') : i18n.str('captchaMathInputPlaceholder');
- /**
- * _parseConfig
- *
- * @param {Object} cfg optional config literal
- */
- // eslint-disable-next-line complexity
- var _parseConfig = function _parseConfig(cfg) {
- if (CONFIG && CONFIG === cfg) {
- return;
- }
+ // TODO: blankErrorHint is deprecated.
+ // It is kept for backwards compatibiliy in the code for the customers overwriting
+ // it with languageDictionary. It can be removed in the next major release.
+ return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_captcha_input__["a" /* default */], {
+ lockId: lockId,
+ image: captcha.get('image'),
+ placeholder: placeholder,
+ isValid: isValid,
+ onChange: handleChange,
+ onReload: onReload,
+ value: value,
+ invalidHint: i18n.str('blankErrorHint') || i18n.str('blankCaptchaErrorHint')
+ });
+ };
- /* Shield configuration object from tampering */
- if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {
- cfg = {};
- }
+ return CaptchaPane;
+}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
- /* Shield configuration object from prototype pollution */
- cfg = clone(cfg);
+/* harmony default export */ __webpack_exports__["a"] = (CaptchaPane);
- /* Set configuration parameters */
- ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;
- ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;
- URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;
- DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;
- FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;
- FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};
- FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};
- USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
- RETURN_DOM = cfg.RETURN_DOM || false; // Default false
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
- FORCE_BODY = cfg.FORCE_BODY || false; // Default false
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
- IN_PLACE = cfg.IN_PLACE || false; // Default false
- IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
- }
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
- }
+CaptchaPane.propTypes = {
+ i18n: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired,
+ lock: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired,
+ error: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
+ onReload: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
+};
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
- }
+CaptchaPane.defaultProps = {
+ error: false
+};
- PARSER_MEDIA_TYPE =
- // eslint-disable-next-line unicorn/prefer-includes
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;
+/***/ }),
+/* 71 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
- transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {
- return x;
- } : stringToLowerCase;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_password_input__ = __webpack_require__(75);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__password__ = __webpack_require__(194);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- if (SAFE_FOR_TEMPLATES) {
- ALLOW_DATA_ATTR = false;
- }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- if (RETURN_DOM_FRAGMENT) {
- RETURN_DOM = true;
- }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /* Parse profile info */
- if (USE_PROFILES) {
- ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));
- ALLOWED_ATTR = [];
- if (USE_PROFILES.html === true) {
- addToSet(ALLOWED_TAGS, html);
- addToSet(ALLOWED_ATTR, html$1);
- }
- if (USE_PROFILES.svg === true) {
- addToSet(ALLOWED_TAGS, svg);
- addToSet(ALLOWED_ATTR, svg$1);
- addToSet(ALLOWED_ATTR, xml);
- }
- if (USE_PROFILES.svgFilters === true) {
- addToSet(ALLOWED_TAGS, svgFilters);
- addToSet(ALLOWED_ATTR, svg$1);
- addToSet(ALLOWED_ATTR, xml);
- }
- if (USE_PROFILES.mathMl === true) {
- addToSet(ALLOWED_TAGS, mathMl);
- addToSet(ALLOWED_ATTR, mathMl$1);
- addToSet(ALLOWED_ATTR, xml);
- }
- }
- /* Merge configuration parameters */
- if (cfg.ADD_TAGS) {
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
- }
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);
- }
- if (cfg.ADD_ATTR) {
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
- }
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);
- }
- if (cfg.ADD_URI_SAFE_ATTR) {
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);
- }
+var PasswordPane = function (_React$Component) {
+ _inherits(PasswordPane, _React$Component);
- if (cfg.FORBID_CONTENTS) {
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
- }
+ function PasswordPane() {
+ var _temp, _this, _ret;
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS);
- }
+ _classCallCheck(this, PasswordPane);
- /* Add #text in case KEEP_CONTENT is set to true */
- if (KEEP_CONTENT) {
- ALLOWED_TAGS['#text'] = true;
- }
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
- if (WHOLE_DOCUMENT) {
- addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
- }
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleChange = function (e) {
+ var _this$props = _this.props,
+ lock = _this$props.lock,
+ policy = _this$props.policy;
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
- if (ALLOWED_TAGS.table) {
- addToSet(ALLOWED_TAGS, ['tbody']);
- delete FORBID_TAGS.tbody;
- }
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__password__["a" /* setPassword */], e.target.value, policy);
+ }, _this.handleShowPasswordChange = function (e) {
+ var lock = _this.props.lock;
- // Prevent further manipulation of configuration.
- // Not available in IE8, Safari 5, etc.
- if (freeze) {
- freeze(cfg);
- }
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_4__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_5__core_index__["id"](lock), __WEBPACK_IMPORTED_MODULE_6__password__["b" /* setShowPassword */], e.target.checked);
+ }, _temp), _possibleConstructorReturn(_this, _ret);
+ }
- CONFIG = cfg;
- };
+ PasswordPane.prototype.render = function render() {
+ var _props = this.props,
+ i18n = _props.i18n,
+ lock = _props.lock,
+ placeholder = _props.placeholder,
+ policy = _props.policy,
+ strengthMessages = _props.strengthMessages,
+ hidden = _props.hidden;
- var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
+ var hiddenCss = hidden ? ' auth0-lock-hidden' : '';
- var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);
+ // TODO: invalidErrorHint and blankErrorHint are deprecated.
+ // They are kept for backwards compatibiliy in the code for the customers overwriting
+ // them with languageDictionary. They can be removed in the next major release.
+ var invalidHint = __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'password') ? i18n.str('invalidErrorHint') || i18n.str('invalidPasswordErrorHint') : i18n.str('blankErrorHint') || i18n.str('blankPasswordErrorHint');
+ return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'div',
+ { className: 'auth0-lock-input-block auth0-lock-input-show-password' + hiddenCss },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_password_input__["b" /* default */], {
+ value: __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'password'),
+ invalidHint: invalidHint,
+ showPasswordStrengthMessage: !__WEBPACK_IMPORTED_MODULE_3__index__["i" /* isFieldValid */](lock, 'password'),
+ isValid: !__WEBPACK_IMPORTED_MODULE_3__index__["k" /* isFieldVisiblyInvalid */](lock, 'password'),
+ onChange: this.handleChange,
+ placeholder: placeholder,
+ strengthMessages: strengthMessages,
+ disabled: __WEBPACK_IMPORTED_MODULE_5__core_index__["submitting"](lock),
+ policy: policy,
+ showPassword: __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'showPassword', false),
+ lock: lock
+ }),
+ __WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].allowShowPassword(lock) && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'div',
+ { className: 'auth0-lock-show-password' },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { type: 'checkbox', id: 'slideOne', onChange: this.handleShowPasswordChange }),
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('label', { htmlFor: 'slideOne', title: i18n.str('showPassword') })
+ )
+ );
+ };
- /* Keep track of all possible SVG and MathML tags
- * so that we can perform the namespace checks
- * correctly. */
- var ALL_SVG_TAGS = addToSet({}, svg);
- addToSet(ALL_SVG_TAGS, svgFilters);
- addToSet(ALL_SVG_TAGS, svgDisallowed);
+ return PasswordPane;
+}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- var ALL_MATHML_TAGS = addToSet({}, mathMl);
- addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
+/* harmony default export */ __webpack_exports__["a"] = (PasswordPane);
- /**
- *
- *
- * @param {Element} element a DOM element whose namespace is being checked
- * @returns {boolean} Return false if the element has a
- * namespace that a spec-compliant parser would never
- * return. Return true otherwise.
- */
- var _checkValidNamespace = function _checkValidNamespace(element) {
- var parent = getParentNode(element);
- // In JSDOM, if we're inside shadow DOM, then parentNode
- // can be null. We just simulate parent in this case.
- if (!parent || !parent.tagName) {
- parent = {
- namespaceURI: HTML_NAMESPACE,
- tagName: 'template'
- };
- }
+PasswordPane.propTypes = {
+ i18n: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
+ lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
+ onChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func,
+ placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
+ policy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
+ strengthMessages: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
+ hidden: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool
+};
- var tagName = stringToLowerCase(element.tagName);
- var parentTagName = stringToLowerCase(parent.tagName);
+/***/ }),
+/* 72 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (element.namespaceURI === SVG_NAMESPACE) {
- // The only way to switch from HTML namespace to SVG
- // is via . If it happens via any other tag, then
- // it should be killed.
- if (parent.namespaceURI === HTML_NAMESPACE) {
- return tagName === 'svg';
- }
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["b"] = getUsernameValidation;
+/* harmony export (immutable) */ __webpack_exports__["a"] = setUsername;
+/* harmony export (immutable) */ __webpack_exports__["c"] = usernameLooksLikeEmail;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__email__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connection_database__ = __webpack_require__(10);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_trim__ = __webpack_require__(31);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_trim___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_trim__);
- // The only way to switch from MathML to SVG is via
- // svg if parent is either or MathML
- // text integration points.
- if (parent.namespaceURI === MATHML_NAMESPACE) {
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
- }
- // We only allow elements that are defined in SVG
- // spec. All others are disallowed in SVG namespace.
- return Boolean(ALL_SVG_TAGS[tagName]);
- }
- if (element.namespaceURI === MATHML_NAMESPACE) {
- // The only way to switch from HTML namespace to MathML
- // is via . If it happens via any other tag, then
- // it should be killed.
- if (parent.namespaceURI === HTML_NAMESPACE) {
- return tagName === 'math';
- }
- // The only way to switch from SVG to MathML is via
- // and HTML integration points
- if (parent.namespaceURI === SVG_NAMESPACE) {
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
- }
- // We only allow elements that are defined in MathML
- // spec. All others are disallowed in MathML namespace.
- return Boolean(ALL_MATHML_TAGS[tagName]);
- }
+var DEFAULT_CONNECTION_VALIDATION = { username: { min: 1, max: 15 } };
+var regExp = /^[a-zA-Z0-9_+\-.!#\$\^`~@']*$/;
- if (element.namespaceURI === HTML_NAMESPACE) {
- // The only way to switch from SVG to HTML is via
- // HTML integration points, and from MathML to HTML
- // is via MathML text integration points
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
- return false;
- }
+function validateUsername(str, validateFormat) {
+ var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_CONNECTION_VALIDATION.username;
+ var strictValidation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
- return false;
- }
+ // If the connection does not have validation settings, it should only check if the field is empty.
+ // validateFormat overrides this logic to disable validation on login (login should never validate format)
+ if (!validateFormat || settings == null) {
+ return __WEBPACK_IMPORTED_MODULE_3_trim___default()(str).length > 0;
+ }
- // Certain elements are allowed in both SVG and HTML
- // namespace. We need to specify them explicitly
- // so that they don't get erronously deleted from
- // HTML namespace.
- var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
+ var lowercased = __WEBPACK_IMPORTED_MODULE_3_trim___default()(str.toLowerCase());
- // We disallow tags that are specific for MathML
- // or SVG and should never appear in HTML namespace
- return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);
- }
+ // check min value matched
+ if (lowercased.length < settings.min) {
+ return false;
+ }
- // The code should never reach this place (this means
- // that the element somehow got namespace that is not
- // HTML, SVG or MathML). Return false just in case.
- return false;
- };
+ // check max value matched
+ if (lowercased.length > settings.max) {
+ return false;
+ }
- /**
- * _forceRemove
- *
- * @param {Node} node a DOM node
- */
- var _forceRemove = function _forceRemove(node) {
- arrayPush(DOMPurify.removed, { element: node });
- try {
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
- node.parentNode.removeChild(node);
- } catch (_) {
- try {
- node.outerHTML = emptyHTML;
- } catch (_) {
- node.remove();
- }
- }
- };
+ // check if user name is an email
+ if (strictValidation && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(str) === true) {
+ return false;
+ }
- /**
- * _removeAttribute
- *
- * @param {String} name an Attribute name
- * @param {Node} node a DOM node
- */
- var _removeAttribute = function _removeAttribute(name, node) {
- try {
- arrayPush(DOMPurify.removed, {
- attribute: node.getAttributeNode(name),
- from: node
- });
- } catch (_) {
- arrayPush(DOMPurify.removed, {
- attribute: null,
- from: node
- });
- }
+ // check allowed characters matched
+ var result = regExp.exec(lowercased);
+ return !!(result && result[0]);
+}
- node.removeAttribute(name);
+function getUsernameValidation(m) {
+ var usernameValidation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__connection_database__["r" /* databaseConnection */])(m).getIn(['validation', 'username']);
+ return usernameValidation ? usernameValidation.toJS() : null;
+}
- // We void attribute values for unremovable "is"" attributes
- if (name === 'is' && !ALLOWED_ATTR[name]) {
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
- try {
- _forceRemove(node);
- } catch (_) {}
- } else {
- try {
- node.setAttribute(name, '');
- } catch (_) {}
- }
- }
- };
+function setUsername(m, str) {
+ var usernameStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'username';
+ var validateUsernameFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
+ var strictValidation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
- /**
- * _initDocument
- *
- * @param {String} dirty a string of dirty markup
- * @return {Document} a DOM, filled with the dirty markup
- */
- var _initDocument = function _initDocument(dirty) {
- /* Create a HTML document */
- var doc = void 0;
- var leadingWhitespace = void 0;
+ var usernameValidation = validateUsernameFormat ? getUsernameValidation(m) : null;
- if (FORCE_BODY) {
- dirty = ' ' + dirty;
- } else {
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
- var matches = stringMatch(dirty, /^[\r\n\t ]+/);
- leadingWhitespace = matches && matches[0];
- }
+ var validator = function validator(value) {
+ switch (usernameStyle) {
+ case 'email':
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(value);
+ case 'username':
+ return validateUsername(value, validateUsernameFormat, usernameValidation, strictValidation);
+ default:
+ return usernameLooksLikeEmail(value) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__email__["e" /* validateEmail */])(value) : validateUsername(value, validateUsernameFormat, usernameValidation, strictValidation);
+ }
+ };
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
- dirty = '' + dirty + '';
- }
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__index__["e" /* setField */])(m, 'username', str, validator);
+}
- var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
- /*
- * Use the DOMParser API by default, fallback later if needs be
- * DOMParser not work for svg when has multiple root element.
- */
- if (NAMESPACE === HTML_NAMESPACE) {
- try {
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
- } catch (_) {}
- }
+function usernameLooksLikeEmail(str) {
+ return str.indexOf('@') > -1 && str.indexOf('.') > -1;
+}
- /* Use createHTMLDocument in case DOMParser is not available */
- if (!doc || !doc.documentElement) {
- doc = implementation.createDocument(NAMESPACE, 'template', null);
- try {
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;
- } catch (_) {
- // Syntax error if dirtyPayload is invalid xml
- }
- }
+/***/ }),
+/* 73 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var body = doc.body || doc.documentElement;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_username_input__ = __webpack_require__(215);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(3);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_index__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__username__ = __webpack_require__(72);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__avatar__ = __webpack_require__(107);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- if (dirty && leadingWhitespace) {
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
- }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- /* Work on whole document or just its body */
- if (NAMESPACE === HTML_NAMESPACE) {
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
- }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- return WHOLE_DOCUMENT ? doc.documentElement : body;
- };
- /**
- * _createIterator
- *
- * @param {Document} root document/fragment to create iterator for
- * @return {Iterator} iterator instance
- */
- var _createIterator = function _createIterator(root) {
- return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
- };
- /**
- * _isClobbered
- *
- * @param {Node} elm element to check for clobbering attacks
- * @return {Boolean} true if clobbered, false if safe
- */
- var _isClobbered = function _isClobbered(elm) {
- return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');
- };
- /**
- * _isNode
- *
- * @param {Node} obj object to check whether it's a DOM node
- * @return {Boolean} true is object is a DOM node
- */
- var _isNode = function _isNode(object) {
- return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
- };
- /**
- * _executeHook
- * Execute user configurable hooks
- *
- * @param {String} entryPoint Name of the hook's entry point
- * @param {Node} currentNode node to work on with the hook
- * @param {Object} data additional hook parameters
- */
- var _executeHook = function _executeHook(entryPoint, currentNode, data) {
- if (!hooks[entryPoint]) {
- return;
- }
- arrayForEach(hooks[entryPoint], function (hook) {
- hook.call(DOMPurify, currentNode, data, CONFIG);
- });
- };
- /**
- * _sanitizeElements
- *
- * @protect nodeName
- * @protect textContent
- * @protect removeChild
- *
- * @param {Node} currentNode to check for permission to exist
- * @return {Boolean} true if node was killed, false if left alive
- */
- var _sanitizeElements = function _sanitizeElements(currentNode) {
- var content = void 0;
- /* Execute a hook if present */
- _executeHook('beforeSanitizeElements', currentNode, null);
- /* Check if element is clobbered or can clobber */
- if (_isClobbered(currentNode)) {
- _forceRemove(currentNode);
- return true;
- }
- /* Check if tagname contains Unicode */
- if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) {
- _forceRemove(currentNode);
- return true;
- }
+var UsernamePane = function (_React$Component) {
+ _inherits(UsernamePane, _React$Component);
- /* Now let's check the element's type and name */
- var tagName = transformCaseFunc(currentNode.nodeName);
+ function UsernamePane() {
+ _classCallCheck(this, UsernamePane);
- /* Execute a hook if present */
- _executeHook('uponSanitizeElement', currentNode, {
- tagName: tagName,
- allowedTags: ALLOWED_TAGS
- });
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+ }
- /* Detect mXSS attempts abusing namespace confusion */
- if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
- _forceRemove(currentNode);
- return true;
- }
+ UsernamePane.prototype.componentDidMount = function componentDidMount(e) {
+ var _props = this.props,
+ lock = _props.lock,
+ validateFormat = _props.validateFormat,
+ usernameStyle = _props.usernameStyle,
+ strictValidation = _props.strictValidation;
- /* Mitigate a problem with templates inside select */
- if (tagName === 'select' && regExpTest(/= 0; --i) {
- parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
- }
- }
- }
+ UsernamePane.prototype.render = function render() {
+ var _props3 = this.props,
+ i18n = _props3.i18n,
+ lock = _props3.lock,
+ placeholder = _props3.placeholder,
+ validateFormat = _props3.validateFormat;
- if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
- }
+ var allowAutocomplete = __WEBPACK_IMPORTED_MODULE_5__core_index__["ui"].allowAutocomplete(lock);
+ var value = __WEBPACK_IMPORTED_MODULE_3__index__["c" /* getFieldValue */](lock, 'username');
+ var usernameValidation = validateFormat ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__username__["b" /* getUsernameValidation */])(lock) : {};
- _forceRemove(currentNode);
- return true;
+ // TODO: invalidErrorHint and blankErrorHint are deprecated.
+ // They are kept for backwards compatibiliy in the code for the customers overwriting
+ // them with languageDictionary. They can be removed in the next major release.
+ var invalidHintKey = function invalidHintKey(str) {
+ if (!str) {
+ return i18n.str('blankErrorHint') ? 'blankErrorHint' : 'blankUsernameErrorHint';
}
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__username__["c" /* usernameLooksLikeEmail */])(str) || !validateFormat) return i18n.str('invalidErrorHint') ? 'invalidErrorHint' : 'invalidUsernameErrorHint';
+ return 'usernameFormatErrorHint';
+ };
- /* Check whether element has a valid namespace */
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
- _forceRemove(currentNode);
- return true;
- }
+ var invalidHint = function invalidHint(str) {
+ var hintKey = invalidHintKey(str);
- if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
- _forceRemove(currentNode);
- return true;
+ // only show format info in the error if it should validate the format and
+ // if there is any format restrictions for the connection
+ if ('usernameFormatErrorHint' === hintKey && validateFormat && usernameValidation != null) {
+ return i18n.str(hintKey, usernameValidation.min, usernameValidation.max);
}
- /* Sanitize element content to be template-safe */
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
- /* Get the element's text content */
- content = currentNode.textContent;
- content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');
- content = stringReplace(content, ERB_EXPR$$1, ' ');
- if (currentNode.textContent !== content) {
- arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
- currentNode.textContent = content;
- }
- }
+ return i18n.str(hintKey);
+ };
- /* Execute a hook if present */
- _executeHook('afterSanitizeElements', currentNode, null);
+ return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_input_username_input__["a" /* default */], {
+ value: value,
+ invalidHint: invalidHint(value),
+ isValid: !__WEBPACK_IMPORTED_MODULE_3__index__["k" /* isFieldVisiblyInvalid */](lock, 'username'),
+ onChange: this.handleChange.bind(this),
+ placeholder: placeholder,
+ autoComplete: allowAutocomplete,
+ disabled: __WEBPACK_IMPORTED_MODULE_5__core_index__["submitting"](lock)
+ });
+ };
- return false;
- };
+ return UsernamePane;
+}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- /**
- * _isValidAttribute
- *
- * @param {string} lcTag Lowercase tag name of containing element.
- * @param {string} lcName Lowercase attribute name.
- * @param {string} value Attribute value.
- * @return {Boolean} Returns true if `value` is valid, otherwise false.
- */
- // eslint-disable-next-line complexity
- var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
- /* Make sure attribute cannot clobber */
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
- return false;
- }
+/* harmony default export */ __webpack_exports__["a"] = (UsernamePane);
- /* Allow valid data-* attributes: At least one character after "-"
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
- We don't need to check the value; it's always URI safe. */
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
- if (
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
- _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
- // Alternative, second condition checks if it's an `is`-attribute, AND
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
- lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
- return false;
- }
- /* Check value is safe. First, is attr inert? If so, is safe */
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {
- return false;
- }
- return true;
- };
+UsernamePane.propTypes = {
+ i18n: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
+ lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,
+ placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
+ validateFormat: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
+ usernameStyle: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['any', 'email', 'username']),
+ strictValidation: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired
+};
- /**
- * _basicCustomElementCheck
- * checks if at least one dash is included in tagName, and it's not the first char
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
- * @param {string} tagName name of the tag of the node to sanitize
- */
- var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
- return tagName.indexOf('-') > 0;
- };
+UsernamePane.defaultProps = {
+ validateFormat: false,
+ usernameStyle: 'username'
+};
- /**
- * _sanitizeAttributes
- *
- * @protect attributes
- * @protect nodeName
- * @protect removeAttribute
- * @protect setAttribute
- *
- * @param {Node} currentNode to sanitize
- */
- var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
- var attr = void 0;
- var value = void 0;
- var lcName = void 0;
- var l = void 0;
- /* Execute a hook if present */
- _executeHook('beforeSanitizeAttributes', currentNode, null);
+/***/ }),
+/* 74 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var attributes = currentNode.attributes;
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["b"] = skipQuickAuth;
+/* harmony export (immutable) */ __webpack_exports__["a"] = hasSkippedQuickAuth;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_data_utils__ = __webpack_require__(20);
- /* Check if we have attributes; if not we might have a text node */
- if (!attributes) {
- return;
- }
+var _dataFns = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_data_utils__["a" /* dataFns */])(['quickAuth']),
+ tget = _dataFns.tget,
+ tset = _dataFns.tset;
- var hookEvent = {
- attrName: '',
- attrValue: '',
- keepAttr: true,
- allowedAttributes: ALLOWED_ATTR
- };
- l = attributes.length;
+function skipQuickAuth(m, b) {
+ return tset(m, 'skipped', b);
+}
- /* Go backwards over all attributes; safely remove bad ones */
- while (l--) {
- attr = attributes[l];
- var _attr = attr,
- name = _attr.name,
- namespaceURI = _attr.namespaceURI;
+function hasSkippedQuickAuth(m) {
+ return tget(m, 'skipped', false);
+}
- value = stringTrim(attr.value);
- lcName = transformCaseFunc(name);
+/***/ }),
+/* 75 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- /* Execute a hook if present */
- hookEvent.attrName = lcName;
- hookEvent.attrValue = value;
- hookEvent.keepAttr = true;
- hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
- _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
- value = hookEvent.attrValue;
- /* Did the hooks approve of the attribute? */
- if (hookEvent.forceKeepAttr) {
- continue;
- }
+"use strict";
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IconSvg; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_wrap__ = __webpack_require__(23);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__password_password_strength__ = __webpack_require__(213);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_index__ = __webpack_require__(1);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /* Remove attribute */
- _removeAttribute(name, currentNode);
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- /* Did the hooks approve of the attribute? */
- if (!hookEvent.keepAttr) {
- continue;
- }
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /* Work around a security issue in jQuery 3.0 */
- if (regExpTest(/\/>/i, value)) {
- _removeAttribute(name, currentNode);
- continue;
- }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- /* Sanitize attribute content to be template-safe */
- if (SAFE_FOR_TEMPLATES) {
- value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');
- value = stringReplace(value, ERB_EXPR$$1, ' ');
- }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /* Is `value` valid for this attribute? */
- var lcTag = transformCaseFunc(currentNode.nodeName);
- if (!_isValidAttribute(lcTag, lcName, value)) {
- continue;
- }
- /* Handle invalid data-* attribute set by try-catching it */
- try {
- if (namespaceURI) {
- currentNode.setAttributeNS(namespaceURI, name, value);
- } else {
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
- currentNode.setAttribute(name, value);
- }
- arrayPop(DOMPurify.removed);
- } catch (_) {}
- }
- /* Execute a hook if present */
- _executeHook('afterSanitizeAttributes', currentNode, null);
- };
- /**
- * _sanitizeShadowDOM
- *
- * @param {DocumentFragment} fragment to iterate over recursively
- */
- var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
- var shadowNode = void 0;
- var shadowIterator = _createIterator(fragment);
- /* Execute a hook if present */
- _executeHook('beforeSanitizeShadowDOM', fragment, null);
- while (shadowNode = shadowIterator.nextNode()) {
- /* Execute a hook if present */
- _executeHook('uponSanitizeShadowNode', shadowNode, null);
+var IconSvg = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'svg',
+ {
+ 'aria-hidden': 'true',
+ focusable: 'false',
+ width: '11px',
+ height: '14px',
+ viewBox: '0 0 13 16',
+ version: '1.1',
+ xmlns: 'http://www.w3.org/2000/svg',
+ xmlnsXlink: 'http://www.w3.org/1999/xlink',
+ className: 'auth0-lock-icon auth0-lock-icon-box'
+ },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'g',
+ { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'g',
+ { transform: 'translate(-288.000000, -1508.000000)', fill: '#888888' },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M299,1523.998 L290,1523.998 C288.896,1523.998 288,1523.102 288,1521.999 L288,1515.999 C288,1514.895 288.896,1513.998 290,1513.998 L290,1513.998 L290,1512.499 C290,1510.015 292.015,1507.999 294.5,1507.999 C296.985,1507.999 299,1510.015 299,1512.499 L299,1513.999 C300.104,1513.999 301,1514.895 301,1515.999 L301,1521.999 C301,1523.103 300.104,1523.998 299,1523.998 L299,1523.998 Z M298,1512.499 C298,1510.566 296.433,1508.999 294.5,1508.999 C292.567,1508.999 291,1510.566 291,1512.499 L291,1513.998 L298,1513.998 L298,1512.499 L298,1512.499 Z M300,1515.999 C300,1515.446 299.552,1514.998 299,1514.998 L290,1514.998 C289.447,1514.998 289,1515.446 289,1515.999 L289,1521.999 C289,1522.551 289.447,1522.998 290,1522.998 L299,1522.998 C299.552,1522.998 300,1522.551 300,1521.999 L300,1515.999 L300,1515.999 Z M294.5,1520.998 C294.224,1520.998 294,1520.774 294,1520.498 L294,1517.498 C294,1517.223 294.224,1516.999 294.5,1516.999 C294.776,1516.999 295,1517.223 295,1517.498 L295,1520.498 C295,1520.774 294.776,1520.998 294.5,1520.998 L294.5,1520.998 Z' })
+ )
+ )
+);
+
+var PasswordInput = function (_React$Component) {
+ _inherits(PasswordInput, _React$Component);
+
+ function PasswordInput(props) {
+ _classCallCheck(this, PasswordInput);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _this.state = {};
+ return _this;
+ }
+
+ PasswordInput.prototype.focus = function focus() {
+ this.refs.input && this.refs.input.focus();
+ };
- /* Sanitize tags and elements */
- if (_sanitizeElements(shadowNode)) {
- continue;
- }
+ PasswordInput.prototype.hasFocus = function hasFocus() {
+ return this.state.focused;
+ };
- /* Deep shadow DOM detected */
- if (shadowNode.content instanceof DocumentFragment) {
- _sanitizeShadowDOM(shadowNode.content);
- }
+ PasswordInput.prototype.render = function render() {
+ var _props = this.props,
+ invalidHint = _props.invalidHint,
+ showPasswordStrengthMessage = _props.showPasswordStrengthMessage,
+ isValid = _props.isValid,
+ onChange = _props.onChange,
+ policy = _props.policy,
+ strengthMessages = _props.strengthMessages,
+ value = _props.value,
+ showPassword = _props.showPassword,
+ lock = _props.lock,
+ props = _objectWithoutProperties(_props, ['invalidHint', 'showPasswordStrengthMessage', 'isValid', 'onChange', 'policy', 'strengthMessages', 'value', 'showPassword', 'lock']);
- /* Check attributes, sanitize if necessary */
- _sanitizeAttributes(shadowNode);
- }
+ var _state = this.state,
+ focused = _state.focused,
+ changing = _state.changing;
- /* Execute a hook if present */
- _executeHook('afterSanitizeShadowDOM', fragment, null);
- };
- /**
- * Sanitize
- * Public method providing core sanitation functionality
- *
- * @param {String|Node} dirty string or DOM node
- * @param {Object} configuration object
- */
- // eslint-disable-next-line complexity
- DOMPurify.sanitize = function (dirty, cfg) {
- var body = void 0;
- var importedNode = void 0;
- var currentNode = void 0;
- var oldNode = void 0;
- var returnNode = void 0;
- /* Make sure we have a string to sanitize.
- DO NOT return early, as this will return the wrong type if
- the user has requested a DOM object rather than a string */
- IS_EMPTY_INPUT = !dirty;
- if (IS_EMPTY_INPUT) {
- dirty = '';
- }
+ var allowPasswordAutocomplete = __WEBPACK_IMPORTED_MODULE_4__core_index__["ui"].allowPasswordAutocomplete(lock);
- /* Stringify, in case dirty is an object */
- if (typeof dirty !== 'string' && !_isNode(dirty)) {
- // eslint-disable-next-line no-negated-condition
- if (typeof dirty.toString !== 'function') {
- throw typeErrorCreate('toString is not a function');
- } else {
- dirty = dirty.toString();
- if (typeof dirty !== 'string') {
- throw typeErrorCreate('dirty is not a string, aborting');
- }
- }
- }
+ var passwordStrength = policy && focused && changing && showPasswordStrengthMessage ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__password_password_strength__["a" /* default */], { messages: strengthMessages, password: value, policy: policy }) : null;
- /* Check we can run. Otherwise fall back or ignore */
- if (!DOMPurify.isSupported) {
- if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
- if (typeof dirty === 'string') {
- return window.toStaticHTML(dirty);
- }
+ return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ __WEBPACK_IMPORTED_MODULE_2__input_wrap__["a" /* default */],
+ {
+ after: passwordStrength,
+ focused: focused,
+ invalidHint: invalidHint,
+ isValid: isValid,
+ name: 'password',
+ icon: IconSvg
+ },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', _extends({
+ ref: 'input',
+ type: showPassword ? 'text' : 'password',
+ id: __WEBPACK_IMPORTED_MODULE_4__core_index__["id"](lock) + '-password',
+ name: 'password',
+ className: 'auth0-lock-input',
+ autoComplete: allowPasswordAutocomplete ? 'on' : 'off',
+ autoCapitalize: 'off',
+ onChange: this.handleOnChange.bind(this),
+ onFocus: this.handleFocus.bind(this),
+ onBlur: this.handleBlur.bind(this),
+ value: value,
+ 'aria-label': 'Password',
+ 'aria-invalid': !isValid,
+ 'aria-describedby': !isValid && !policy && invalidHint ? 'auth0-lock-error-msg-password' : undefined
+ }, props))
+ );
+ };
- if (_isNode(dirty)) {
- return window.toStaticHTML(dirty.outerHTML);
- }
- }
+ PasswordInput.prototype.handleOnChange = function handleOnChange(e) {
+ var state = this.state;
+ state.changing = true;
+ this.setState(state);
+ if (this.props.onChange) {
+ this.props.onChange(e);
+ }
+ };
- return dirty;
- }
+ PasswordInput.prototype.handleFocus = function handleFocus() {
+ this.setState({ focused: true });
+ };
- /* Assign config vars */
- if (!SET_CONFIG) {
- _parseConfig(cfg);
- }
+ PasswordInput.prototype.handleBlur = function handleBlur() {
+ this.setState({ focused: false });
+ };
- /* Clean up removed elements */
- DOMPurify.removed = [];
+ return PasswordInput;
+}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
- /* Check if dirty is correctly typed for IN_PLACE */
- if (typeof dirty === 'string') {
- IN_PLACE = false;
- }
+PasswordInput.propTypes = {
+ invalidHint: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
+ showPasswordStrengthMessage: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
+ isValid: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
+ onChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
+ placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
+ policy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
+ strengthMessages: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
+ value: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
+ showPassword: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,
+ lock: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired
+};
+/* harmony default export */ __webpack_exports__["b"] = (PasswordInput);
- if (IN_PLACE) ; else if (dirty instanceof Node) {
- /* If dirty is a DOM element, append to an empty document to avoid
- elements being stripped by the parser */
- body = _initDocument('');
- importedNode = body.ownerDocument.importNode(dirty, true);
- if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
- /* Node is already a body, use as is */
- body = importedNode;
- } else if (importedNode.nodeName === 'HTML') {
- body = importedNode;
- } else {
- // eslint-disable-next-line unicorn/prefer-dom-node-append
- body.appendChild(importedNode);
- }
- } else {
- /* Exit directly if we have nothing to do */
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
- // eslint-disable-next-line unicorn/prefer-includes
- dirty.indexOf('<') === -1) {
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
- }
+/***/ }),
+/* 76 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- /* Initialize the document to work on */
- body = _initDocument(dirty);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__button_auth_button__ = __webpack_require__(117);
- /* Check we have a DOM node from the data */
- if (!body) {
- return RETURN_DOM ? null : emptyHTML;
- }
- }
- /* Remove first element node (ours) if FORCE_BODY is set */
- if (body && FORCE_BODY) {
- _forceRemove(body.firstChild);
- }
- /* Get node iterator */
- var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
- /* Now start iterating over the created document */
- while (currentNode = nodeIterator.nextNode()) {
- /* Fix IE's strange behavior with manipulated textNodes #89 */
- if (currentNode.nodeType === 3 && currentNode === oldNode) {
- continue;
- }
+var QuickAuthPane = function QuickAuthPane(props) {
+ var alternativeLabel = props.alternativeLabel,
+ alternativeClickHandler = props.alternativeClickHandler,
+ buttonLabel = props.buttonLabel,
+ buttonClickHandler = props.buttonClickHandler,
+ header = props.header,
+ strategy = props.strategy,
+ buttonIcon = props.buttonIcon,
+ primaryColor = props.primaryColor,
+ foregroundColor = props.foregroundColor;
- /* Sanitize tags and elements */
- if (_sanitizeElements(currentNode)) {
- continue;
- }
- /* Shadow DOM detected, sanitize it */
- if (currentNode.content instanceof DocumentFragment) {
- _sanitizeShadowDOM(currentNode.content);
+ var alternative = alternativeLabel ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'p',
+ { className: 'auth0-lock-alternative' },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'a',
+ {
+ className: 'auth0-lock-alternative-link',
+ href: '#',
+ onClick: function onClick(e) {
+ e.preventDefault();
+ alternativeClickHandler(e);
}
+ },
+ alternativeLabel
+ )
+ ) : null;
- /* Check attributes, sanitize if necessary */
- _sanitizeAttributes(currentNode);
-
- oldNode = currentNode;
- }
+ return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'div',
+ { className: 'auth0-lock-last-login-pane' },
+ header,
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__button_auth_button__["a" /* default */], {
+ label: buttonLabel,
+ onClick: function onClick(e) {
+ e.preventDefault();
+ buttonClickHandler(e);
+ },
+ strategy: strategy,
+ primaryColor: primaryColor,
+ foregroundColor: foregroundColor,
+ icon: buttonIcon
+ }),
+ alternative,
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
+ 'div',
+ { className: 'auth0-loading-container' },
+ __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: 'auth0-loading' })
+ )
+ );
+};
- oldNode = null;
+QuickAuthPane.propTypes = {
+ alternativeLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
+ alternativeClickHandler: function alternativeClickHandler(props, propName, component) {
+ for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
+ rest[_key - 3] = arguments[_key];
+ }
- /* If we sanitized `dirty` in-place, return it. */
- if (IN_PLACE) {
- return dirty;
- }
+ if (props.alternativeLabel !== undefined) {
+ var _PropTypes$func;
- /* Return sanitized string or DOM */
- if (RETURN_DOM) {
- if (RETURN_DOM_FRAGMENT) {
- returnNode = createDocumentFragment.call(body.ownerDocument);
+ return (_PropTypes$func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func).isRequired.apply(_PropTypes$func, [props, propName, component].concat(rest));
+ }
+ },
+ buttonLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,
+ buttonClickHandler: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
+ header: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element,
+ strategy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired
+};
- while (body.firstChild) {
- // eslint-disable-next-line unicorn/prefer-dom-node-append
- returnNode.appendChild(body.firstChild);
- }
- } else {
- returnNode = body;
- }
+/* harmony default export */ __webpack_exports__["a"] = (QuickAuthPane);
- if (ALLOWED_ATTR.shadowroot) {
- /*
- AdoptNode() is not used because internal state is not reset
- (e.g. the past names map of a HTMLFormElement), this is safe
- in theory but we would rather not risk another attack vector.
- The state that is cloned by importNode() is explicitly defined
- by the specs.
- */
- returnNode = importNode.call(originalDocument, returnNode, true);
- }
+/***/ }),
+/* 77 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- return returnNode;
- }
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["a"] = load;
+/* harmony export (immutable) */ __webpack_exports__["b"] = preload;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_auth0_js__ = __webpack_require__(104);
- var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
- /* Sanitize final string template-safe */
- if (SAFE_FOR_TEMPLATES) {
- serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');
- serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');
- }
+if (typeof window !== 'undefined' && !window.Auth0) {
+ window.Auth0 = {};
+}
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
- };
+var cbs = {};
- /**
- * Public method to set the configuration once
- * setConfig
- *
- * @param {Object} cfg configuration object
- */
- DOMPurify.setConfig = function (cfg) {
- _parseConfig(cfg);
- SET_CONFIG = true;
- };
+function load(attrs) {
+ var cb = attrs.cb,
+ check = attrs.check,
+ method = attrs.method,
+ url = attrs.url;
- /**
- * Public method to remove the configuration
- * clearConfig
- *
- */
- DOMPurify.clearConfig = function () {
- CONFIG = null;
- SET_CONFIG = false;
- };
- /**
- * Public method to check if an attribute value is valid.
- * Uses last set config, if any. Otherwise, uses config defaults.
- * isValidAttribute
- *
- * @param {string} tag Tag name of containing element.
- * @param {string} attr Attribute name.
- * @param {string} value Attribute value.
- * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
- */
- DOMPurify.isValidAttribute = function (tag, attr, value) {
- /* Initialize shared config vars if necessary. */
- if (!CONFIG) {
- _parseConfig({});
+ if (!cbs[method]) {
+ cbs[method] = [];
+ window.Auth0[method] = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
}
- var lcTag = transformCaseFunc(tag);
- var lcName = transformCaseFunc(attr);
- return _isValidAttribute(lcTag, lcName, value);
+ cbs[method] = cbs[method].filter(function (x) {
+ if (x.check.apply(x, args)) {
+ setTimeout(function () {
+ return x.cb.apply(x, [null].concat(args));
+ }, 0);
+ return false;
+ } else {
+ return true;
+ }
+ });
};
+ }
- /**
- * AddHook
- * Public method to add DOMPurify hooks
- *
- * @param {String} entryPoint entry point for the hook to add
- * @param {Function} hookFunction function to execute
- */
- DOMPurify.addHook = function (entryPoint, hookFunction) {
- if (typeof hookFunction !== 'function') {
- return;
- }
+ cbs[method].push({ cb: cb, check: check, url: url });
- hooks[entryPoint] = hooks[entryPoint] || [];
- arrayPush(hooks[entryPoint], hookFunction);
- };
+ var count = cbs[method].reduce(function (r, x) {
+ return r + (x.url === url ? 1 : 0);
+ }, 0);
- /**
- * RemoveHook
- * Public method to remove a DOMPurify hook at a given entryPoint
- * (pops it from the stack of hooks if more are present)
- *
- * @param {String} entryPoint entry point for the hook to remove
- */
- DOMPurify.removeHook = function (entryPoint) {
- if (hooks[entryPoint]) {
- arrayPop(hooks[entryPoint]);
- }
- };
+ if (count > 1) return;
- /**
- * RemoveHooks
- * Public method to remove all DOMPurify hooks at a given entryPoint
- *
- * @param {String} entryPoint entry point for the hooks to remove
- */
- DOMPurify.removeHooks = function (entryPoint) {
- if (hooks[entryPoint]) {
- hooks[entryPoint] = [];
- }
- };
+ var script = window.document.createElement('script');
+ script.src = url;
+ window.document.getElementsByTagName('head')[0].appendChild(script);
- /**
- * RemoveAllHooks
- * Public method to remove all DOMPurify hooks
- *
- */
- DOMPurify.removeAllHooks = function () {
- hooks = {};
- };
+ var handleError = function handleError(err) {
+ cbs[method] = cbs[method].filter(function (x) {
+ if (x.url === url) {
+ setTimeout(function () {
+ return x.cb(err);
+ }, 0);
+ return false;
+ } else {
+ return true;
+ }
+ });
+ };
- return DOMPurify;
- }
+ var timeoutID = setTimeout(function () {
+ return handleError(new Error(url + ' timed out'));
+ }, 20000);
- var purify = createDOMPurify();
+ script.addEventListener('load', function () {
+ return clearTimeout(timeoutID);
+ });
- return purify;
+ script.addEventListener('error', function () {
+ clearTimeout(timeoutID);
+ handleError(new Error(url + ' could not be loaded.'));
+ });
+}
-}));
-//# sourceMappingURL=purify.js.map
+function preload(_ref) {
+ var method = _ref.method,
+ cb = _ref.cb;
+ window.Auth0[method] = cb;
+}
/***/ }),
/* 78 */
@@ -17180,7 +17199,7 @@ var ReactDOMComponentTree = __webpack_require__(9);
var ReactInstrumentation = __webpack_require__(17);
var createMicrosoftUnsafeLocalFunction = __webpack_require__(94);
-var setInnerHTML = __webpack_require__(63);
+var setInnerHTML = __webpack_require__(64);
var setTextContent = __webpack_require__(146);
function getNodeAfter(parentNode, node) {
@@ -19200,7 +19219,7 @@ var Auth0LockPasswordless = function (_Core) {
/* harmony default export */ __webpack_exports__["a"] = (Auth0LockPasswordless);
-Auth0LockPasswordless.version = '11.32.2';
+Auth0LockPasswordless.version = '11.33.0';
/***/ }),
/* 104 */
@@ -19221,7 +19240,7 @@ Auth0LockPasswordless.version = '11.32.2';
var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(fn,module){return fn(module={exports:{}},module.exports),module.exports}var urlJoin=createCommonjsModule((function(module){var context,definition;context=commonjsGlobal,definition=function(){function normalize(strArray){var resultArray=[];if(0===strArray.length)return"";if("string"!=typeof strArray[0])throw new TypeError("Url must be a string. Received "+strArray[0]);if(strArray[0].match(/^[^/:]+:\/*$/)&&strArray.length>1){var first=strArray.shift();strArray[0]=first+strArray[0]}strArray[0].match(/^file:\/\/\//)?strArray[0]=strArray[0].replace(/^([^/:]+):\/*/,"$1:///"):strArray[0]=strArray[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i0&&(component=component.replace(/^[\/]+/,"")),component=i0?"?":"")+parts.join("&")}return function(){return normalize("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},module.exports?module.exports=definition():context.urljoin=definition()})),origSymbol=commonjsGlobal.Symbol,ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr=Object.prototype.toString,functionBind=Function.prototype.bind||function(that){var target=this;if("function"!=typeof target||"[object Function]"!==toStr.call(target))throw new TypeError(ERROR_MESSAGE+target);for(var bound,args=slice.call(arguments,1),binder=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))},boundLength=Math.max(0,target.length-args.length),boundArgs=[],i=0;i1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i=1,isOwn=!0;i=parts.length){var desc=$gOPD(value,part);value=(isOwn=!!desc)&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value[part]}else isOwn=src(value,part),value=value[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value)}}return value},callBind=createCommonjsModule((function(module){var $apply=getIntrinsic("%Function.prototype.apply%"),$call=getIntrinsic("%Function.prototype.call%"),$reflectApply=getIntrinsic("%Reflect.apply%",!0)||functionBind.call($call,$apply),$gOPD=getIntrinsic("%Object.getOwnPropertyDescriptor%",!0),$defineProperty=getIntrinsic("%Object.defineProperty%",!0),$max=getIntrinsic("%Math.max%");if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=null}module.exports=function(originalFunction){var func=$reflectApply(functionBind,$call,arguments);if($gOPD&&$defineProperty){var desc=$gOPD(func,"length");desc.configurable&&$defineProperty(func,"length",{value:1+$max(0,originalFunction.length-(arguments.length-1))})}return func};var applyBind=function(){return $reflectApply(functionBind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind})),$indexOf=(callBind.apply,callBind(getIntrinsic("String.prototype.indexOf"))),callBound=function(name,allowMissing){var intrinsic=getIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBind(intrinsic):intrinsic},require$$0=function(n){return n&&n.default||n}(Object.freeze({__proto__:null,default:{}})),hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,weakMapHas="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,weakSetHas="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,weakRefDeref="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,match=String.prototype.match,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null),inspectCustom=require$$0.custom,inspectSymbol=inspectCustom&&isSymbol(inspectCustom)?inspectCustom:null,toStringTag="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null,objectInspect=function inspect_(obj,options,depth,seen){var opts=options||{};if(has(opts,"quoteStyle")&&"single"!==opts.quoteStyle&&"double"!==opts.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(opts,"maxStringLength")&&("number"==typeof opts.maxStringLength?opts.maxStringLength<0&&opts.maxStringLength!==1/0:null!==opts.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var customInspect=!has(opts,"customInspect")||opts.customInspect;if("boolean"!=typeof customInspect&&"symbol"!==customInspect)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(opts,"indent")&&null!==opts.indent&&"\t"!==opts.indent&&!(parseInt(opts.indent,10)===opts.indent&&opts.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===obj)return"undefined";if(null===obj)return"null";if("boolean"==typeof obj)return obj?"true":"false";if("string"==typeof obj)return function inspectString(str,opts){if(str.length>opts.maxStringLength){var remaining=str.length-opts.maxStringLength,trailer="... "+remaining+" more character"+(remaining>1?"s":"");return inspectString(str.slice(0,opts.maxStringLength),opts)+trailer}return wrapQuotes(str.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,lowbyte),"single",opts)}(obj,opts);if("number"==typeof obj)return 0===obj?1/0/obj>0?"0":"-0":String(obj);if("bigint"==typeof obj)return String(obj)+"n";var maxDepth=void 0===opts.depth?5:opts.depth;if(void 0===depth&&(depth=0),depth>=maxDepth&&maxDepth>0&&"object"==typeof obj)return isArray(obj)?"[Array]":"[Object]";var indent=function(opts,depth){var baseIndent;if("\t"===opts.indent)baseIndent="\t";else{if(!("number"==typeof opts.indent&&opts.indent>0))return null;baseIndent=Array(opts.indent+1).join(" ")}return{base:baseIndent,prev:Array(depth+1).join(baseIndent)}}(opts,depth);if(void 0===seen)seen=[];else if(indexOf(seen,obj)>=0)return"[Circular]";function inspect(value,from,noIndent){if(from&&(seen=seen.slice()).push(from),noIndent){var newOpts={depth:opts.depth};return has(opts,"quoteStyle")&&(newOpts.quoteStyle=opts.quoteStyle),inspect_(value,newOpts,depth+1,seen)}return inspect_(value,opts,depth+1,seen)}if("function"==typeof obj){var name=function(f){if(f.name)return f.name;var m=match.call(functionToString.call(f),/^function\s*([\w$]+)/);if(m)return m[1];return null}(obj),keys=arrObjKeys(obj,inspect);return"[Function"+(name?": "+name:" (anonymous)")+"]"+(keys.length>0?" { "+keys.join(", ")+" }":"")}if(isSymbol(obj)){var symString=hasShammedSymbols?String(obj).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(obj);return"object"!=typeof obj||hasShammedSymbols?symString:markBoxed(symString)}if(function(x){if(!x||"object"!=typeof x)return!1;if("undefined"!=typeof HTMLElement&&x instanceof HTMLElement)return!0;return"string"==typeof x.nodeName&&"function"==typeof x.getAttribute}(obj)){for(var s="<"+String(obj.nodeName).toLowerCase(),attrs=obj.attributes||[],i=0;i",obj.childNodes&&obj.childNodes.length&&(s+="..."),s+=""+String(obj.nodeName).toLowerCase()+">"}if(isArray(obj)){if(0===obj.length)return"[]";var xs=arrObjKeys(obj,inspect);return indent&&!function(xs){for(var i=0;i=0)return!1;return!0}(xs)?"["+indentedJoin(xs,indent)+"]":"[ "+xs.join(", ")+" ]"}if(function(obj){return!("[object Error]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj)){var parts=arrObjKeys(obj,inspect);return 0===parts.length?"["+String(obj)+"]":"{ ["+String(obj)+"] "+parts.join(", ")+" }"}if("object"==typeof obj&&customInspect){if(inspectSymbol&&"function"==typeof obj[inspectSymbol])return obj[inspectSymbol]();if("symbol"!==customInspect&&"function"==typeof obj.inspect)return obj.inspect()}if(function(x){if(!mapSize||!x||"object"!=typeof x)return!1;try{mapSize.call(x);try{setSize.call(x)}catch(s){return!0}return x instanceof Map}catch(e){}return!1}(obj)){var mapParts=[];return mapForEach.call(obj,(function(value,key){mapParts.push(inspect(key,obj,!0)+" => "+inspect(value,obj))})),collectionOf("Map",mapSize.call(obj),mapParts,indent)}if(function(x){if(!setSize||!x||"object"!=typeof x)return!1;try{setSize.call(x);try{mapSize.call(x)}catch(m){return!0}return x instanceof Set}catch(e){}return!1}(obj)){var setParts=[];return setForEach.call(obj,(function(value){setParts.push(inspect(value,obj))})),collectionOf("Set",setSize.call(obj),setParts,indent)}if(function(x){if(!weakMapHas||!x||"object"!=typeof x)return!1;try{weakMapHas.call(x,weakMapHas);try{weakSetHas.call(x,weakSetHas)}catch(s){return!0}return x instanceof WeakMap}catch(e){}return!1}(obj))return weakCollectionOf("WeakMap");if(function(x){if(!weakSetHas||!x||"object"!=typeof x)return!1;try{weakSetHas.call(x,weakSetHas);try{weakMapHas.call(x,weakMapHas)}catch(s){return!0}return x instanceof WeakSet}catch(e){}return!1}(obj))return weakCollectionOf("WeakSet");if(function(x){if(!weakRefDeref||!x||"object"!=typeof x)return!1;try{return weakRefDeref.call(x),!0}catch(e){}return!1}(obj))return weakCollectionOf("WeakRef");if(function(obj){return!("[object Number]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj))return markBoxed(inspect(Number(obj)));if(function(obj){if(!obj||"object"!=typeof obj||!bigIntValueOf)return!1;try{return bigIntValueOf.call(obj),!0}catch(e){}return!1}(obj))return markBoxed(inspect(bigIntValueOf.call(obj)));if(function(obj){return!("[object Boolean]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj))return markBoxed(booleanValueOf.call(obj));if(function(obj){return!("[object String]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj))return markBoxed(inspect(String(obj)));if(!function(obj){return!("[object Date]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj)&&!function(obj){return!("[object RegExp]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}(obj)){var ys=arrObjKeys(obj,inspect),isPlainObject=gPO?gPO(obj)===Object.prototype:obj instanceof Object||obj.constructor===Object,protoTag=obj instanceof Object?"":"null prototype",stringTag=!isPlainObject&&toStringTag&&Object(obj)===obj&&toStringTag in obj?toStr$1(obj).slice(8,-1):protoTag?"Object":"",tag=(isPlainObject||"function"!=typeof obj.constructor?"":obj.constructor.name?obj.constructor.name+" ":"")+(stringTag||protoTag?"["+[].concat(stringTag||[],protoTag||[]).join(": ")+"] ":"");return 0===ys.length?tag+"{}":indent?tag+"{"+indentedJoin(ys,indent)+"}":tag+"{ "+ys.join(", ")+" }"}return String(obj)};function wrapQuotes(s,defaultStyle,opts){var quoteChar="double"===(opts.quoteStyle||defaultStyle)?'"':"'";return quoteChar+s+quoteChar}function quote(s){return String(s).replace(/"/g,""")}function isArray(obj){return!("[object Array]"!==toStr$1(obj)||toStringTag&&"object"==typeof obj&&toStringTag in obj)}function isSymbol(obj){if(hasShammedSymbols)return obj&&"object"==typeof obj&&obj instanceof Symbol;if("symbol"==typeof obj)return!0;if(!obj||"object"!=typeof obj||!symToString)return!1;try{return symToString.call(obj),!0}catch(e){}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(key){return key in this};function has(obj,key){return hasOwn.call(obj,key)}function toStr$1(obj){return objectToString.call(obj)}function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0,l=xs.length;i1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray$1(obj)){for(var compacted=[],j=0;j=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||format===formats.RFC1738&&(40===c||41===c)?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},isBuffer:function(obj){return!(!obj||"object"!=typeof obj)&&!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj))},isRegExp:function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},maybeMap:function(val,fn){if(isArray$1(val)){for(var mapped=[],i=0;i0?obj.join(",")||null:void 0}];else if(isArray$2(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i-1?val.split(","):val},parseKeys=function(givenKey,val,options,valuesParsed){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^.[]+)/g,"[$1]"):givenKey,child=/(\[[^[\]]*])/g,segment=options.depth>0&&/(\[[^[\]]*])/.exec(key),parent=segment?key.slice(0,segment.index):key,keys=[];if(parent){if(!options.plainObjects&&has$3.call(Object.prototype,parent)&&!options.allowPrototypes)return;keys.push(parent)}for(var i=0;options.depth>0&&null!==(segment=child.exec(key))&&i=0;--i){var obj,root=chain[i];if("[]"===root&&options.parseArrays)obj=[].concat(leaf);else{obj=options.plainObjects?Object.create(null):{};var cleanRoot="["===root.charAt(0)&&"]"===root.charAt(root.length-1)?root.slice(1,-1):root,index=parseInt(cleanRoot,10);options.parseArrays||""!==cleanRoot?!isNaN(index)&&root!==cleanRoot&&String(index)===cleanRoot&&index>=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[])[index]=leaf:obj[cleanRoot]=leaf:obj={0:leaf}}leaf=obj}return leaf}(keys,val,options,valuesParsed)}},lib_parse=function(str,opts){var options=function(opts){if(!opts)return defaults$1;if(null!==opts.decoder&&void 0!==opts.decoder&&"function"!=typeof opts.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==opts.charset&&"utf-8"!==opts.charset&&"iso-8859-1"!==opts.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var charset=void 0===opts.charset?defaults$1.charset:opts.charset;return{allowDots:void 0===opts.allowDots?defaults$1.allowDots:!!opts.allowDots,allowPrototypes:"boolean"==typeof opts.allowPrototypes?opts.allowPrototypes:defaults$1.allowPrototypes,allowSparse:"boolean"==typeof opts.allowSparse?opts.allowSparse:defaults$1.allowSparse,arrayLimit:"number"==typeof opts.arrayLimit?opts.arrayLimit:defaults$1.arrayLimit,charset:charset,charsetSentinel:"boolean"==typeof opts.charsetSentinel?opts.charsetSentinel:defaults$1.charsetSentinel,comma:"boolean"==typeof opts.comma?opts.comma:defaults$1.comma,decoder:"function"==typeof opts.decoder?opts.decoder:defaults$1.decoder,delimiter:"string"==typeof opts.delimiter||utils.isRegExp(opts.delimiter)?opts.delimiter:defaults$1.delimiter,depth:"number"==typeof opts.depth||!1===opts.depth?+opts.depth:defaults$1.depth,ignoreQueryPrefix:!0===opts.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof opts.interpretNumericEntities?opts.interpretNumericEntities:defaults$1.interpretNumericEntities,parameterLimit:"number"==typeof opts.parameterLimit?opts.parameterLimit:defaults$1.parameterLimit,parseArrays:!1!==opts.parseArrays,plainObjects:"boolean"==typeof opts.plainObjects?opts.plainObjects:defaults$1.plainObjects,strictNullHandling:"boolean"==typeof opts.strictNullHandling?opts.strictNullHandling:defaults$1.strictNullHandling}}(opts);if(""===str||null==str)return options.plainObjects?Object.create(null):{};for(var tempObj="string"==typeof str?function(str,options){var i,obj={},cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,""):str,limit=options.parameterLimit===1/0?void 0:options.parameterLimit,parts=cleanStr.split(options.delimiter,limit),skipIndex=-1,charset=options.charset;if(options.charsetSentinel)for(i=0;i-1&&(val=isArray$3(val)?[val]:val),has$3.call(obj,key)?obj[key]=utils.combine(obj[key],val):obj[key]=val}return obj}(str,options):str,obj=options.plainObjects?Object.create(null):{},keys=Object.keys(tempObj),i=0;i0?prefix+joined:""},componentEmitter=createCommonjsModule((function(module){function Emitter(obj){if(obj)return function(obj){for(var key in Emitter.prototype)obj[key]=Emitter.prototype[key];return obj}(obj)}module.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){return this._callbacks=this._callbacks||{},(this._callbacks["$"+event]=this._callbacks["$"+event]||[]).push(fn),this},Emitter.prototype.once=function(event,fn){function on(){this.off(event,on),fn.apply(this,arguments)}return on.fn=fn,this.on(event,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var cb,callbacks=this._callbacks["$"+event];if(!callbacks)return this;if(1==arguments.length)return delete this._callbacks["$"+event],this;for(var i=0;ib?1:0}function deterministicStringify(obj,replacer,spacer){var res,tmp=function deterministicDecirc(val,k,stack,parent){var i;if("object"==typeof val&&null!==val){for(i=0;i0)for(var i=0;i=this._maxRetries)return!1;if(this._retryCallback)try{var override=this._retryCallback(err,res);if(!0===override)return!0;if(!1===override)return!1}catch(err_){console.error(err_)}if(res&&res.status&&res.status>=500&&501!==res.status)return!0;if(err){if(err.code&&ERROR_CODES.includes(err.code))return!0;if(err.timeout&&"ECONNABORTED"===err.code)return!0;if(err.crossDomain)return!0}return!1},RequestBase.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},RequestBase.prototype.then=function(resolve,reject){var _this=this;if(!this._fullfilledPromise){var self=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(resolve,reject){self.on("abort",(function(){if(!(_this._maxRetries&&_this._maxRetries>_this._retries))if(_this.timedout&&_this.timedoutError)reject(_this.timedoutError);else{var err=new Error("Aborted");err.code="ABORTED",err.status=_this.status,err.method=_this.method,err.url=_this.url,reject(err)}})),self.end((function(err,res){err?reject(err):resolve(res)}))}))}return this._fullfilledPromise.then(resolve,reject)},RequestBase.prototype.catch=function(cb){return this.then(void 0,cb)},RequestBase.prototype.use=function(fn){return fn(this),this},RequestBase.prototype.ok=function(cb){if("function"!=typeof cb)throw new Error("Callback required");return this._okCallback=cb,this},RequestBase.prototype._isResponseOK=function(res){return!!res&&(this._okCallback?this._okCallback(res):res.status>=200&&res.status<300)},RequestBase.prototype.get=function(field){return this._header[field.toLowerCase()]},RequestBase.prototype.getHeader=RequestBase.prototype.get,RequestBase.prototype.set=function(field,val){if(isObject_1(field)){for(var key in field)Object.prototype.hasOwnProperty.call(field,key)&&this.set(key,field[key]);return this}return this._header[field.toLowerCase()]=val,this.header[field]=val,this},RequestBase.prototype.unset=function(field){return delete this._header[field.toLowerCase()],delete this.header[field],this},RequestBase.prototype.field=function(name,val){if(null==name)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(isObject_1(name)){for(var key in name)Object.prototype.hasOwnProperty.call(name,key)&&this.field(key,name[key]);return this}if(Array.isArray(val)){for(var i in val)Object.prototype.hasOwnProperty.call(val,i)&&this.field(name,val[i]);return this}if(null==val)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof val&&(val=String(val)),this._getFormData().append(name,val),this},RequestBase.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},RequestBase.prototype._auth=function(user,pass,options,base64Encoder){switch(options.type){case"basic":this.set("Authorization","Basic ".concat(base64Encoder("".concat(user,":").concat(pass))));break;case"auto":this.username=user,this.password=pass;break;case"bearer":this.set("Authorization","Bearer ".concat(user))}return this},RequestBase.prototype.withCredentials=function(on){return void 0===on&&(on=!0),this._withCredentials=on,this},RequestBase.prototype.redirects=function(n){return this._maxRedirects=n,this},RequestBase.prototype.maxResponseSize=function(n){if("number"!=typeof n)throw new TypeError("Invalid argument");return this._maxResponseSize=n,this},RequestBase.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},RequestBase.prototype.send=function(data){var isObj=isObject_1(data),type=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(isObj&&!this._data)Array.isArray(data)?this._data=[]:this._isHost(data)||(this._data={});else if(data&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(isObj&&isObject_1(this._data))for(var key in data)Object.prototype.hasOwnProperty.call(data,key)&&(this._data[key]=data[key]);else"string"==typeof data?(type||this.type("form"),type=this._header["content-type"],this._data="application/x-www-form-urlencoded"===type?this._data?"".concat(this._data,"&").concat(data):data:(this._data||"")+data):this._data=data;return!isObj||this._isHost(data)||type||this.type("json"),this},RequestBase.prototype.sortQuery=function(sort){return this._sort=void 0===sort||sort,this},RequestBase.prototype._finalizeQueryString=function(){var query=this._query.join("&");if(query&&(this.url+=(this.url.includes("?")?"&":"?")+query),this._query.length=0,this._sort){var index=this.url.indexOf("?");if(index>=0){var queryArr=this.url.slice(index+1).split("&");"function"==typeof this._sort?queryArr.sort(this._sort):queryArr.sort(),this.url=this.url.slice(0,index)+"?"+queryArr.join("&")}}},RequestBase.prototype._appendQueryString=function(){console.warn("Unsupported")},RequestBase.prototype._timeoutError=function(reason,timeout,errno){if(!this._aborted){var err=new Error("".concat(reason+timeout,"ms exceeded"));err.timeout=timeout,err.code="ECONNABORTED",err.errno=errno,this.timedout=!0,this.timedoutError=err,this.abort(),this.callback(err)}},RequestBase.prototype._setTimeouts=function(){var self=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){self._timeoutError("Timeout of ",self._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){self._timeoutError("Response timeout of ",self._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var utils$1_type=function(str){return str.split(/ *; */).shift()},utils$1_params=function(str){return str.split(/ *; */).reduce((function(obj,str){var parts=str.split(/ *= */),key=parts.shift(),val=parts.shift();return key&&val&&(obj[key]=val),obj}),{})},utils$1_parseLinks=function(str){return str.split(/ *, */).reduce((function(obj,str){var parts=str.split(/ *; */),url=parts[0].slice(1,-1);return obj[parts[1].split(/ *= */)[1].slice(1,-1)]=url,obj}),{})},responseBase=ResponseBase;function ResponseBase(obj){if(obj)return function(obj){for(var key in ResponseBase.prototype)Object.prototype.hasOwnProperty.call(ResponseBase.prototype,key)&&(obj[key]=ResponseBase.prototype[key]);return obj}(obj)}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0||str instanceof Object)?parse(str):null)},Response.prototype.toError=function(){var req=this.req,method=req.method,url=req.url,msg="cannot ".concat(method," ").concat(url," (").concat(this.status,")"),err=new Error(msg);return err.status=this.status,err.method=method,err.url=url,err},request.Response=Response,componentEmitter(Request.prototype),requestBase(Request.prototype),Request.prototype.type=function(type){return this.set("Content-Type",request.types[type]||type),this},Request.prototype.accept=function(type){return this.set("Accept",request.types[type]||type),this},Request.prototype.auth=function(user,pass,options){1===arguments.length&&(pass=""),"object"===_typeof(pass)&&null!==pass&&(options=pass,pass=""),options||(options={type:"function"==typeof btoa?"basic":"auto"});var encoder=function(string){if("function"==typeof btoa)return btoa(string);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(user,pass,options,encoder)},Request.prototype.query=function(val){return"string"!=typeof val&&(val=serialize(val)),val&&this._query.push(val),this},Request.prototype.attach=function(field,file,options){if(file){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(field,file,options||file.name)}return this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(err,res){if(this._shouldRetry(err,res))return this._retry();var fn=this._callback;this.clearTimeout(),err&&(this._maxRetries&&(err.retries=this._retries-1),this.emit("error",err)),fn(err,res)},Request.prototype.crossDomainError=function(){var err=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");err.crossDomain=!0,err.status=this.status,err.method=this.method,err.url=this.url,this.callback(err)},Request.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Request.prototype.ca=Request.prototype.agent,Request.prototype.buffer=Request.prototype.ca,Request.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},Request.prototype.pipe=Request.prototype.write,Request.prototype._isHost=function(obj){return obj&&"object"===_typeof(obj)&&!Array.isArray(obj)&&"[object Object]"!==Object.prototype.toString.call(obj)},Request.prototype.end=function(fn){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=fn||noop,this._finalizeQueryString(),this._end()},Request.prototype._setUploadTimeout=function(){var self=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){self._timeoutError("Upload timeout of ",self._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},Request.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var self=this;this.xhr=request.getXHR();var xhr=this.xhr,data=this._formData||this._data;this._setTimeouts(),xhr.onreadystatechange=function(){var readyState=xhr.readyState;if(readyState>=2&&self._responseTimeoutTimer&&clearTimeout(self._responseTimeoutTimer),4===readyState){var status;try{status=xhr.status}catch(_unused5){status=0}if(!status){if(self.timedout||self._aborted)return;return self.crossDomainError()}self.emit("end")}};var handleProgress=function(direction,e){e.total>0&&(e.percent=e.loaded/e.total*100,100===e.percent&&clearTimeout(self._uploadTimeoutTimer)),e.direction=direction,self.emit("progress",e)};if(this.hasListeners("progress"))try{xhr.addEventListener("progress",handleProgress.bind(null,"download")),xhr.upload&&xhr.upload.addEventListener("progress",handleProgress.bind(null,"upload"))}catch(_unused6){}xhr.upload&&this._setUploadTimeout();try{this.username&&this.password?xhr.open(this.method,this.url,!0,this.username,this.password):xhr.open(this.method,this.url,!0)}catch(err){return this.callback(err)}if(this._withCredentials&&(xhr.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof data&&!this._isHost(data)){var contentType=this._header["content-type"],_serialize=this._serializer||request.serialize[contentType?contentType.split(";")[0]:""];!_serialize&&isJSON(contentType)&&(_serialize=request.serialize["application/json"]),_serialize&&(data=_serialize(data))}for(var field in this.header)null!==this.header[field]&&Object.prototype.hasOwnProperty.call(this.header,field)&&xhr.setRequestHeader(field,this.header[field]);this._responseType&&(xhr.responseType=this._responseType),this.emit("request",this),xhr.send(void 0===data?null:data)},request.agent=function(){return new agentBase},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(method){agentBase.prototype[method.toLowerCase()]=function(url,fn){var req=new request.Request(method,url);return this._setDefaults(req),fn&&req.end(fn),req}})),agentBase.prototype.del=agentBase.prototype.delete,request.get=function(url,data,fn){var req=request("GET",url);return"function"==typeof data&&(fn=data,data=null),data&&req.query(data),fn&&req.end(fn),req},request.head=function(url,data,fn){var req=request("HEAD",url);return"function"==typeof data&&(fn=data,data=null),data&&req.query(data),fn&&req.end(fn),req},request.options=function(url,data,fn){var req=request("OPTIONS",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.del=del,request.delete=del,request.patch=function(url,data,fn){var req=request("PATCH",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.post=function(url,data,fn){var req=request("POST",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.put=function(url,data,fn){var req=request("PUT",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req}})),byteLength_1=(client.Request,function(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}),toByteArray_1=function(b64){var tmp,i,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(function(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}(0,validLen,placeHoldersLen)),curByte=0,len=placeHoldersLen>0?validLen-4:validLen;for(i=0;i>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},fromByteArray_1=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var base64Js={byteLength:byteLength_1,toByteArray:toByteArray_1,fromByteArray:fromByteArray_1};var base64Url={encode:function(str){return base64Js.fromByteArray(function(str){for(var arr=new Array(str.length),a=0;a=65&&code<=90||!wasPrevNumber&&code>=48&&code<=57?(newKey+="_",newKey+=str[index].toLowerCase()):newKey+=str[index].toLowerCase(),wasPrevNumber=code>=48&&code<=57,wasPrevUppercase=code>=65&&code<=90,index++;return newKey}(key):key]=toSnakeCase(object[key]),p}),{}))},toCamelCase:function toCamelCase(object,exceptions,options){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],options=options||{},Object.keys(object).reduce((function(p,key){var parts,newKey=-1===exceptions.indexOf(key)?(parts=key.split("_")).reduce((function(p,c){return p+c.charAt(0).toUpperCase()+c.slice(1)}),parts.shift()):key;return p[newKey]=toCamelCase(object[newKey]||object[key],[],options),options.keepOriginal&&(p[key]=toCamelCase(object[key],[],options)),p}),{}))},blacklist:function(object,blacklistedKeys){return Object.keys(object).reduce((function(p,key){return-1===blacklistedKeys.indexOf(key)&&(p[key]=object[key]),p}),{})},merge:function(object,keys){return{base:keys?pick(object,keys):object,with:function(object2,keys2){return object2=keys2?pick(object2,keys2):object2,extend(this.base,object2)}}},pick:pick,getKeysNotIn:function(obj,allowedKeys){var notAllowed=[];for(var key in obj)-1===allowedKeys.indexOf(key)&¬Allowed.push(key);return notAllowed},extend:extend,getOriginFromUrl:function(url){if(url){var parsed=getLocationFromUrl(url);if(!parsed)return null;var origin=parsed.protocol+"//"+parsed.hostname;return parsed.port&&(origin+=":"+parsed.port),origin}},getLocationFromUrl:getLocationFromUrl,trimUserDetails:function(options){return function(options,keys){return keys.reduce(trim,options)}(options,["username","email","phoneNumber"])},updatePropertyOn:function updatePropertyOn(obj,path,value){"string"==typeof path&&(path=path.split("."));var next=path[0];obj.hasOwnProperty(next)&&(1===path.length?obj[next]=value:updatePropertyOn(obj[next],path.slice(1),value))}};function RequestWrapper(req){this.request=req,this.method=req.method,this.url=req.url,this.body=req._data,this.headers=req._header}function RequestObj(req){this.request=req}function RequestBuilder(options){this._sendTelemetry=!1!==options._sendTelemetry||options._sendTelemetry,this._telemetryInfo=options._telemetryInfo||null,this._timesToRetryFailedRequests=options._timesToRetryFailedRequests,this.headers=options.headers||{},this._universalLoginPage=options.universalLoginPage}function getWindow(){return window}RequestWrapper.prototype.abort=function(){this.request.abort()},RequestWrapper.prototype.getMethod=function(){return this.method},RequestWrapper.prototype.getBody=function(){return this.body},RequestWrapper.prototype.getUrl=function(){return this.url},RequestWrapper.prototype.getHeaders=function(){return this.headers},RequestObj.prototype.set=function(key,value){return this.request=this.request.set(key,value),this},RequestObj.prototype.send=function(body){return this.request=this.request.send(objectHelper.trimUserDetails(body)),this},RequestObj.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},RequestObj.prototype.end=function(cb){return this.request.end(cb),new RequestWrapper(this.request)},RequestBuilder.prototype.setCommonConfiguration=function(ongoingRequest,options){if(options=options||{},this._timesToRetryFailedRequests>0&&(ongoingRequest=ongoingRequest.retry(this._timesToRetryFailedRequests)),options.noHeaders)return ongoingRequest;var headers=this.headers;ongoingRequest=ongoingRequest.set("Content-Type","application/json"),options.xRequestLanguage&&(ongoingRequest=ongoingRequest.set("X-Request-Language",options.xRequestLanguage));for(var keys=Object.keys(this.headers),a=0;a0&&warn.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+notAllowed.join(",")+"]"),params}},t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r=e((function(e,r){e.exports=function(){function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,n=void 0,o=void 0,s=function(t,e){l[i]=t,l[i+1]=e,2===(i+=2)&&(o?o(d):w())},h="undefined"!=typeof window?window:void 0,u=h||{},a=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(d,1)}}var l=new Array(1e3);function d(){for(var t=0;t>>2]|=(r[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new f.init(r,e/2)}},l=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255));return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new f.init(r,e)}},d=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},m=u.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,h=o/(4*s),u=(h=t?e.ceil(h):e.max((0|h)-this._minBufferSize,0))*s,a=e.min(4*u,o);if(u){for(var c=0;c>>7)^(d<<14|d>>>18)^d>>>3)+a[l-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+a[l-16]}var v=i&n^i&o^n&o,y=p+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&f^~h&c)+u[l]+a[l];p=c,c=f,f=h,h=s+y|0,s=o,o=n,n=i,i=y+(((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+v)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+f|0,r[6]=r[6]+c|0,r[7]=r[7]+p|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=t.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(f),e.HmacSHA256=o._createHmacHelper(f)}(Math),r.SHA256)})),s=e((function(t,e){var r,i;t.exports=(i=(r=n).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,h=0;h<4&&o+.75*h>>6*(3-h)&63));var u=i.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=(h|u)<<24-o%4*8,o++}return i.create(n,o)}(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)})),h=e((function(t,e){t.exports=n.enc.Hex})),u=e((function(e,r){(function(){var t;function r(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):this.fromString(t,null==e&&"string"!=typeof t?256:e))}function i(){return new r(null)}var n="undefined"!=typeof navigator;n&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,r,i,n,o){for(var s=32767&e,h=e>>15;--o>=0;){var u=32767&this[t],a=this[t++]>>15,f=h*u+a*s;n=((u=s*u+((32767&f)<<15)+r[i]+(1073741823&n))>>>30)+(f>>>15)+h*a+(n>>>30),r[i++]=1073741823&u}return n},t=30):n&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,i,n,o){for(;--o>=0;){var s=e*this[t++]+r[i]+n;n=Math.floor(s/67108864),r[i++]=67108863&s}return n},t=26):(r.prototype.am=function(t,e,r,i,n,o){for(var s=16383&e,h=e>>14;--o>=0;){var u=16383&this[t],a=this[t++]>>14,f=h*u+a*s;n=((u=s*u+((16383&f)<<14)+r[i]+n)>>28)+(f>>14)+h*a,r[i++]=268435455&u}return n},t=28),r.prototype.DB=t,r.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function p(t){this.m=t}function l(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function T(){}function b(t){return t}function _(t){this.r2=i(),this.q3=i(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}p.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},p.prototype.revert=function(t){return t},p.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},p.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},l.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},l.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},l.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},l.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},l.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var h=8==i?255&t[n]:a(t,n);h<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0==s?this[this.t++]=h:s+i>this.DB?(this[this.t-1]|=(h&(1<>this.DB-s):this[this.t-1]|=h<=this.DB&&(s-=this.DB))}8==i&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>n|h,h=(this[r]&o)<=0;--r)e[r]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,o=(1<>i;for(var s=r+1;s>i;i>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),n=t.abs(),o=i.t;for(e.t=o+n.t;--o>=0;)e[o]=0;for(o=0;o=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,n){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(f,h),s.lShiftTo(f,n)):(o.copyTo(h),s.copyTo(n));var p=h.t,l=h[p-1];if(0!=l){var d=l*(1<1?h[p-2]>>this.F2:0),m=this.FV/d,v=(1<=0&&(n[n.t++]=1,n.subTo(T,n)),r.ONE.dlShiftTo(p,T),T.subTo(h,h);h.t=0;){var b=n[--g]==l?this.DM:Math.floor(n[g]*m+(n[g-1]+y)*v);if((n[g]+=h.am(0,b,n,w,0,p))0&&n.rShiftTo(f,n),u<0&&r.ZERO.subTo(n,n)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var n=i(),o=i(),s=e.convert(this),h=c(t)-1;for(s.copyTo(n);--h>=0;)if(e.sqrTo(n,o),(t&1<0)e.mulTo(o,s,n);else{var u=n;n=o,o=u}return e.revert(n)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<0)for(h>h)>0&&(n=!0,o=u(r));s>=0;)h>(h+=this.DB-e)):(r=this[s]>>(h-=e)&i,h<=0&&(h+=this.DB,--s)),r>0&&(n=!0),n&&(o+=u(r));return n?o:"0"},r.prototype.negate=function(){var t=i();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+c(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=i();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new p(e):new l(e),this.exp(t,r)},r.ZERO=f(0),r.ONE=f(1),T.prototype.convert=b,T.prototype.revert=b,T.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},T.prototype.sqrTo=function(t,e){t.squareTo(e)},_.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},_.prototype.revert=function(t){return t},_.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},_.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},_.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var S,A,D,B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/B[B.length-1];function E(){var t;t=(new Date).getTime(),A[D++]^=255&t,A[D++]^=t>>8&255,A[D++]^=t>>16&255,A[D++]^=t>>24&255,D>=j&&(D-=j)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=f(r),o=i(),s=i(),h="";for(this.divRemTo(n,o,s);o.signum()>0;)h=(r+s.intValue()).toString(t).substr(1)+h,o.divRemTo(n,o,s);return s.intValue().toString(t)+h},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),n=Math.pow(e,i),o=!1,s=0,h=0,u=0;u=i&&(this.dMultiply(n),this.dAddOffset(h,0),s=0,h=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(h,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var n=new Array,o=7&t;n.length=1+(t>>3),e.nextBytes(n),o>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var i,n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(i=r.t-this.t;n=0;)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var o=e.shiftRight(n);(t=t+1>>1)>B.length&&(t=B.length);for(var s=i(),h=0;h>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<=0;)i<8?(r=(this[t]&(1<>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=i();return this.bitwiseTo(t,d,e),e},r.prototype.or=function(t){var e=i();return this.bitwiseTo(t,m,e),e},r.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,v,e),e},r.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,y,e),e},r.prototype.not=function(){for(var t=i(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var m=i();for(n.sqrTo(h[1],m);u<=d;)h[u]=i(),n.mulTo(m,h[u-2],h[u]),u+=2}var v,y,g=t.t-1,w=!0,T=i();for(o=c(t[g])-1;g>=0;){for(o>=a?v=t[g]>>o-a&d:(v=(t[g]&(1<0&&(v|=t[g-1]>>this.DB+o-a)),u=r;0==(1&v);)v>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),w)h[v].copyTo(s),w=!1;else{for(;u>1;)n.sqrTo(s,T),n.sqrTo(T,s),u-=2;u>0?n.sqrTo(s,T):(y=s,s=T,T=y),n.mulTo(T,h[v],s)}for(;g>=0&&0==(t[g]&1<=0?(i.subTo(n,i),e&&o.subTo(h,o),s.subTo(u,s)):(n.subTo(i,n),e&&h.subTo(o,h),u.subTo(s,u))}return 0!=n.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new T)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(n0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=B[B.length-1]){for(e=0;e>>8,A[D++]=255&k;D=0,E()}function R(){if(null==S){for(E(),(S=new O).init(A),D=0;D0&&e.length>0))throw new Error("Invalid key data");this.n=new u.BigInteger(t,16),this.e=parseInt(e,16)}c.prototype.verify=function(t,e){e=e.replace(/[^0-9a-f]|[\s\n]]/gi,"");var r=new u.BigInteger(e,16);if(r.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var i=function(t){for(var e in a){var r=a[e],i=r.length;if(t.substring(0,i)===r)return{alg:e,hash:t.substring(i)}}return[]}(r.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===i.length)return!1;if(!f.hasOwnProperty(i.alg))throw new Error("Hashing algorithm is not supported.");var n=f[i.alg](t).toString();return i.hash===n};for(var p=[],l=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,y=m.length;v0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}(t),n=i[0],o=i[1],s=new d(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),h=0,u=o>0?n-4:n;for(r=0;r>16&255,s[h++]=e>>8&255,s[h++]=255&e;return 2===o&&(e=l[t.charCodeAt(r)]<<2|l[t.charCodeAt(r+1)]>>4,s[h++]=255&e),1===o&&(e=l[t.charCodeAt(r)]<<10|l[t.charCodeAt(r+1)]<<4|l[t.charCodeAt(r+2)]>>2,s[h++]=e>>8&255,s[h++]=255&e),s};function w(t){var e=t.length%4;return 0===e?t:t+new Array(4-e+1).join("=")}function T(t){return t=w(t).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(t){for(var e="",r=0;r1){var r=t.shift();t[0]=r+t[0]}t[0]=t[0].match(/^file:\/\/\//)?t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i0&&(n=n.replace(/^[\/]+/,"")),n=n.replace(/[\/]+$/,i0?"?":"")+s.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=i():r.urljoin=i()}));function S(t,e){return e=e||{},new Promise((function(r,i){var n=new XMLHttpRequest,o=[],s=[],h={},u=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return h[t.toLowerCase()]},has:function(t){return t.toLowerCase()in h}}}};for(var a in n.open(e.method||"get",t,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,r){o.push(e=e.toLowerCase()),s.push([e,r]),h[e]=h[e]?h[e]+","+r:r})),r(u())},n.onerror=i,n.withCredentials="include"==e.credentials,e.headers)n.setRequestHeader(a,e.headers[a]);n.send(e.body||null)}))}function A(t){if(t.ok)return t.json();var e=new Error(t.statusText);return e.response=t,Promise.reject(e)}function D(t){this.name="ConfigurationError",this.message=t||""}function B(t){this.name="TokenValidationError",this.message=t||""}D.prototype=Error.prototype,B.prototype=Error.prototype;var x=function(){function t(){}var e=t.prototype;return e.get=function(){return null},e.has=function(){return null},e.set=function(){return null},t}();r.polyfill();var E=function(t){return"number"==typeof t},k=function(){return new Date};function I(t){var e=t||{};if(this.jwksCache=e.jwksCache||new x,this.expectedAlg=e.expectedAlg||"RS256",this.issuer=e.issuer,this.audience=e.audience,this.leeway=0===e.leeway?0:e.leeway||60,this.jwksURI=e.jwksURI,this.maxAge=e.maxAge,this.__clock="function"==typeof e.__clock?e.__clock:k,this.leeway<0||this.leeway>300)throw new D("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new D('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function PluginHandler(webAuth,plugins){this.plugins=plugins;for(var a=0;a1){if(!d||"string"!=typeof d)return r(new B("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(d!==g.audience)return r(new B('Authorized Party (azp) claim mismatch in the ID token; expected "'+g.audience+'", found "'+d+'"'),null)}if(!c||!E(c))return r(new B("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!l||!E(l))return r(new B("Issued At (iat) claim must be a number present in the ID token"),null);var h=c+g.leeway,w=new Date(0);if(w.setUTCSeconds(h),y>w)return r(new B('Expiration Time (exp) claim error in the ID token; current time "'+y+'" is after expiration time "'+w+'"'),null);if(p&&E(p)){var T=p-g.leeway,b=new Date(0);if(b.setUTCSeconds(T),yS)return r(new B('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+y+'" is after last auth time at "'+S+'"'),null)}return r(null,i.payload)}))},I.prototype.getRsaVerifier=function(t,e,r){var i=this,n=t+e;Promise.resolve(this.jwksCache.has(n)).then((function(r){return r?i.jwksCache.get(n):(o={jwksURI:i.jwksURI,iss:t,kid:e},("undefined"==typeof fetch?S:fetch)(o.jwksURI||_(o.iss,".well-known","jwks.json")).then(A).then((function(t){var e,r,i,n=null;for(e=0;e-1){null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(ua)&&(rv=parseFloat(RegExp.$1))}return rv>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(opts,cb){if(!cb)throw"missing required callback argument";var err,iframe;opts.url||(err="missing required 'url' parameter"),opts.relay_url||(err="missing required 'relay_url' parameter"),err&&setTimeout((function(){cb(err)}),0),opts.window_name||(opts.window_name=null),opts.window_features&&!function(){try{var userAgent=navigator.userAgent;return-1!=userAgent.indexOf("Fennec/")||-1!=userAgent.indexOf("Firefox/")&&-1!=userAgent.indexOf("Android")}catch(e){}return!1}()||(opts.window_features=void 0);var messageTarget,origin=opts.origin||extractOrigin(opts.url);if(origin!==extractOrigin(opts.relay_url))return setTimeout((function(){cb("invalid arguments: origin of url and relay_url must match")}),0);isIE&&((iframe=document.createElement("iframe")).setAttribute("src",opts.relay_url),iframe.style.display="none",iframe.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(iframe),messageTarget=iframe.contentWindow);var w=opts.popup||window.open(opts.url,opts.window_name,opts.window_features);opts.popup&&(w.location.href=opts.url),messageTarget||(messageTarget=w);var closeInterval=setInterval((function(){w&&w.closed&&(cleanup(),cb&&(cb("User closed the popup window"),cb=null))}),500),req=JSON.stringify({a:"request",d:opts.params});function cleanup(){if(iframe&&document.body.removeChild(iframe),iframe=void 0,closeInterval&&(closeInterval=clearInterval(closeInterval)),removeListener(window,"message",onMessage),removeListener(window,"unload",cleanup),w)try{w.close()}catch(securityViolation){messageTarget.postMessage("die",origin)}w=messageTarget=void 0}function onMessage(e){if(e.origin===origin){try{var d=JSON.parse(e.data)}catch(err){if(cb)return cb(err);throw err}"ready"===d.a?messageTarget.postMessage(req,origin):"error"===d.a?(cleanup(),cb&&(cb(d.d),cb=null)):"response"===d.a&&(cleanup(),cb&&(cb(null,d.d),cb=null))}}return addListener(window,"unload",cleanup),addListener(window,"message",onMessage),{originalPopup:w,close:cleanup,focus:function(){if(w)try{w.focus()}catch(e){}}}},onOpen:function(cb){var o="*",msgTarget=isIE?function(){for(var frames=window.opener.frames,i=frames.length-1;i>=0;i--)try{if(frames[i].location.protocol===window.location.protocol&&frames[i].location.host===window.location.host&&"__winchan_relay_frame"===frames[i].name)return frames[i]}catch(e){}}():window.opener;if(!msgTarget)throw"can't find relay frame";function doPost(msg){msg=JSON.stringify(msg),isIE?msgTarget.doPost(msg,o):msgTarget.postMessage(msg,o)}function onDie(e){if("die"===e.data)try{window.close()}catch(o_O){}}addListener(isIE?msgTarget:window,"message",(function onMessage(e){var d;try{d=JSON.parse(e.data)}catch(err){}d&&"request"===d.a&&(removeListener(window,"message",onMessage),o=e.origin,cb&&setTimeout((function(){cb(o,d.d,(function(r){cb=void 0,doPost({a:"response",d:r})}))}),0))})),addListener(isIE?msgTarget:window,"message",onDie);try{doPost({a:"ready"})}catch(e){addListener(msgTarget,"load",(function(e){doPost({a:"ready"})}))}var onUnload=function(){try{removeListener(isIE?msgTarget:window,"message",onDie)}catch(ohWell){}cb&&doPost({a:"error",d:"client closed window"}),cb=void 0;try{window.close()}catch(e){}};return addListener(window,"unload",onUnload),{detach:function(){removeListener(window,"unload",onUnload)}}}}:{open:function(url,winopts,arg,cb){setTimeout((function(){cb("unsupported browser")}),0)},onOpen:function(cb){setTimeout((function(){cb("unsupported browser")}),0)}}}();module.exports&&(module.exports=WinChan)}));var urlHelper={extractOrigin:function(url){/^https?:\/\//.test(url)||(url=window.location.href);var m=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(url);return m?m[1]:url}};function PopupHandler(){this._current_popup=null}function Popup(webAuth,options){this.baseOptions=options,this.baseOptions.popupOrigin=options.popupOrigin,this.client=webAuth.client,this.webAuth=webAuth,this.transactionManager=new TransactionManager(this.baseOptions),this.crossOriginAuthentication=new CrossOriginAuthentication(webAuth,this.baseOptions),this.warn=new Warn({disableWarnings:!!options._disableDeprecationWarnings})}function SilentAuthenticationHandler(options){this.authenticationUrl=options.authenticationUrl,this.timeout=options.timeout||6e4,this.handler=null,this.postMessageDataType=options.postMessageDataType||!1,this.postMessageOrigin=options.postMessageOrigin||windowHelper.getWindow().location.origin||windowHelper.getWindow().location.protocol+"//"+windowHelper.getWindow().location.hostname+(windowHelper.getWindow().location.port?":"+windowHelper.getWindow().location.port:"")}function UsernamePassword(options){this.baseOptions=options,this.request=new RequestBuilder(options),this.transactionManager=new TransactionManager(this.baseOptions)}function HostedPages(client,options){this.baseOptions=options,this.client=client,this.baseOptions.universalLoginPage=!0,this.request=new RequestBuilder(this.baseOptions),this.warn=new Warn({disableWarnings:!!options._disableDeprecationWarnings})}PopupHandler.prototype.calculatePosition=function(options){var width=options.width||500,height=options.height||600,_window=windowHelper.getWindow(),screenX=void 0!==_window.screenX?_window.screenX:_window.screenLeft,screenY=void 0!==_window.screenY?_window.screenY:_window.screenTop,outerWidth=void 0!==_window.outerWidth?_window.outerWidth:_window.document.body.clientWidth,outerHeight=void 0!==_window.outerHeight?_window.outerHeight:_window.document.body.clientHeight;return{width:width,height:height,left:options.left||screenX+(outerWidth-width)/2,top:options.top||screenY+(outerHeight-height)/2}},PopupHandler.prototype.preload=function(options){var _this=this,_window=windowHelper.getWindow(),popupPosition=this.calculatePosition(options.popupOptions||{}),popupOptions=objectHelper.merge(popupPosition).with(options.popupOptions),url=options.url||"about:blank",windowFeatures=lib_stringify(popupOptions,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=_window.open(url,"auth0_signup_popup",windowFeatures),this._current_popup.kill=function(){this.close(),_this._current_popup=null}),this._current_popup},PopupHandler.prototype.load=function(url,relayUrl,options,cb){var _this=this,popupPosition=this.calculatePosition(options.popupOptions||{}),popupOptions=objectHelper.merge(popupPosition).with(options.popupOptions),winchanOptions=objectHelper.merge({url:url,relay_url:relayUrl,window_features:lib_stringify(popupOptions,{delimiter:",",encode:!1}),popup:this._current_popup}).with(options),popup=winchan.open(winchanOptions,(function(err,data){if(!err||"SyntaxError"!==err.name)return _this._current_popup=null,cb(err,data)}));return popup.focus(),popup},Popup.prototype.buildPopupHandler=function(){var pluginHandler=this.baseOptions.plugins.get("popup.getPopupHandler");return pluginHandler?pluginHandler.getPopupHandler():new PopupHandler},Popup.prototype.preload=function(options){options=options||{};var popup=this.buildPopupHandler();return popup.preload(options),popup},Popup.prototype.getPopupHandler=function(options,preload){return options.popupHandler?options.popupHandler:preload?this.preload(options):this.buildPopupHandler()},Popup.prototype.callback=function(options){var _this=this,theWindow=windowHelper.getWindow(),originUrl=(options=options||{}).popupOrigin||this.baseOptions.popupOrigin||windowHelper.getOrigin();theWindow.opener?winchan.onOpen((function(popupOrigin,r,cb){if(popupOrigin!==originUrl)return cb({error:"origin_mismatch",error_description:"The popup's origin ("+popupOrigin+") should match the `popupOrigin` parameter ("+originUrl+")."});_this.webAuth.parseHash(options||{},(function(err,data){return cb(err||data)}))})):theWindow.doPost=function(msg){theWindow.parent&&theWindow.parent.postMessage(msg,originUrl)}},Popup.prototype.authorize=function(options,cb){var url,relayUrl,popOpts={},pluginHandler=this.baseOptions.plugins.get("popup.authorize"),params=objectHelper.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(objectHelper.blacklist(options,["popupHandler"]));return assert.check(params,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),relayUrl=urlJoin(this.baseOptions.rootUrl,"relay.html"),options.owp?params.owp=!0:(popOpts.origin=urlHelper.extractOrigin(params.redirectUri),relayUrl=params.redirectUri),options.popupOptions&&(popOpts.popupOptions=objectHelper.pick(options.popupOptions,["width","height","top","left"])),pluginHandler&&(params=pluginHandler.processParams(params)),(params=this.transactionManager.process(params)).scope=params.scope||"openid profile email",delete params.domain,url=this.client.buildAuthorizeUrl(params),this.getPopupHandler(options).load(url,relayUrl,popOpts,wrapCallback(cb,{keepOriginalCasing:!0}))},Popup.prototype.loginWithCredentials=function(options,cb){options.realm=options.realm||options.connection,options.popup=!0,options=objectHelper.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(objectHelper.blacklist(options,["popupHandler","connection"])),options=this.transactionManager.process(options),this.crossOriginAuthentication.login(options,cb)},Popup.prototype.passwordlessVerify=function(options,cb){var _this=this;return this.client.passwordless.verify(objectHelper.blacklist(options,["popupHandler"]),(function(err){if(err)return cb(err);options.username=options.phoneNumber||options.email,options.password=options.verificationCode,delete options.email,delete options.phoneNumber,delete options.verificationCode,delete options.type,_this.client.loginWithResourceOwner(options,cb)}))},Popup.prototype.signupAndLogin=function(options,cb){var _this=this;return this.client.dbConnection.signup(options,(function(err){if(err)return cb(err);_this.loginWithCredentials(options,cb)}))},SilentAuthenticationHandler.create=function(options){return new SilentAuthenticationHandler(options)},SilentAuthenticationHandler.prototype.login=function(usePostMessage,callback){this.handler=new IframeHandler({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:usePostMessage?"message":"load",callback:this.getCallbackHandler(callback,usePostMessage),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){callback(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:usePostMessage||!1}),this.handler.init()},SilentAuthenticationHandler.prototype.getEventValidator=function(){var _this=this;return{isValid:function(eventData){switch(eventData.event.type){case"message":return eventData.event.origin===_this.postMessageOrigin&&eventData.event.source===_this.handler.iframe.contentWindow&&(!1===_this.postMessageDataType||eventData.event.data.type&&eventData.event.data.type===_this.postMessageDataType);case"load":if("about:"===eventData.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},SilentAuthenticationHandler.prototype.getCallbackHandler=function(callback,usePostMessage){return function(eventData){var callbackValue;callbackValue=usePostMessage?"object"==typeof eventData.event.data&&eventData.event.data.hash?eventData.event.data.hash:eventData.event.data:eventData.sourceObject.contentWindow.location.hash,callback(null,callbackValue)}},UsernamePassword.prototype.login=function(options,cb){var url,body;return url=urlJoin(this.baseOptions.rootUrl,"usernamepassword","login"),options.username=options.username||options.email,options=objectHelper.blacklist(options,["email","onRedirecting"]),body=objectHelper.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(options),body=this.transactionManager.process(body),body=objectHelper.toSnakeCase(body,["auth0Client"]),this.request.post(url).send(body).end(wrapCallback(cb))},UsernamePassword.prototype.callback=function(formHtml){var div,_document=windowHelper.getDocument();(div=_document.createElement("div")).innerHTML=formHtml,_document.body.appendChild(div).children[0].submit()},HostedPages.prototype.login=function(options,cb){if(windowHelper.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var usernamePassword,params=objectHelper.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(options);return assert.check(params,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(usernamePassword=new UsernamePassword(this.baseOptions)).login(params,(function(err,data){if(err)return cb(err);function doAuth(){usernamePassword.callback(data)}if("function"==typeof options.onRedirecting)return options.onRedirecting((function(){doAuth()}));doAuth()}))},HostedPages.prototype.signupAndLogin=function(options,cb){var _this=this;return _this.client.client.dbConnection.signup(options,(function(err){return err?cb(err):_this.login(options,cb)}))},HostedPages.prototype.getSSOData=function(withActiveDirectories,cb){var url,params="";return"function"==typeof withActiveDirectories&&(cb=withActiveDirectories,withActiveDirectories=!1),assert.check(withActiveDirectories,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),withActiveDirectories&&(params="?"+lib_stringify({ldaps:1,client_id:this.baseOptions.clientID})),url=urlJoin(this.baseOptions.rootUrl,"user","ssodata",params),this.request.get(url,{noHeaders:!0}).withCredentials().end(wrapCallback(cb))};var noop=function(){},defaults$2={lang:"en",templates:{auth0:function(challenge){var message="code"===challenge.type?"Enter the code shown above":"Solve the formula shown above";return'\n
\n
↺ \n
\n '},recaptcha_v2:function(){return'
'},recaptcha_enterprise:function(){return'
'},error:function(){return'Error getting the bot detection challenge. Please contact the system administrator.
'}}};function globalForRecaptchaProvider(provider){switch(provider){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}function injectRecaptchaScript(element,opts,callback){var callbackName="recaptchaCallback_"+Math.floor(1000001*Math.random());window[callbackName]=function(){delete window[callbackName],callback()};var script=window.document.createElement("script");script.src=function(provider,lang,callback){switch(provider){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+lang+"&onload="+callback;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+lang+"&onload="+callback;default:throw new Error("Unknown captcha provider")}}(opts.provider,opts.lang,callbackName),script.async=!0,window.document.body.appendChild(script)}var captcha={render:function(auth0Client,element,options,callback){function load(done){done=done||noop,auth0Client.getChallenge((function(err,challenge){return err?(element.innerHTML=options.templates.error(err),done(err)):challenge.required?(element.style.display="","auth0"===challenge.provider?function(element,options,challenge,load){element.innerHTML=options.templates[challenge.provider](challenge),element.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),load()}))}(element,options,challenge,load):"recaptcha_v2"!==challenge.provider&&"recaptcha_enterprise"!==challenge.provider||function(element,options,challenge){var widgetId=element.hasAttribute("data-wid")&&element.getAttribute("data-wid");function setValue(value){element.querySelector('input[name="captcha"]').value=value||""}if(widgetId)return setValue(),void globalForRecaptchaProvider(challenge.provider).reset(widgetId);element.innerHTML=options.templates[challenge.provider](challenge);var recaptchaDiv=element.querySelector(".recaptcha");injectRecaptchaScript(0,{lang:options.lang,provider:challenge.provider},(function(){var global=globalForRecaptchaProvider(challenge.provider);widgetId=global.render(recaptchaDiv,{callback:setValue,"expired-callback":function(){setValue()},"error-callback":function(){setValue()},sitekey:challenge.siteKey}),element.setAttribute("data-wid",widgetId)}))}(element,options,challenge),void done()):(element.style.display="none",void(element.innerHTML=""))}))}return options=objectHelper.merge(defaults$2).with(options||{}),load(callback),{reload:load,getValue:function(){var captchaInput=element.querySelector('input[name="captcha"]');if(captchaInput)return captchaInput.value}}}};function defaultClock(){return new Date}function WebAuth(options){assert.check(options,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},stateExpiration:{optional:!0,type:"number",message:"stateExpiration is not valid"},legacySameSiteCookie:{optional:!0,type:"boolean",message:"legacySameSiteCookie option is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),options.overrides&&assert.check(options.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=options,this.baseOptions.plugins=new PluginHandler(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=options._timesToRetryFailedRequests?parseInt(options._timesToRetryFailedRequests):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,!1!==options.legacySameSiteCookie&&(this.baseOptions.legacySameSiteCookie=!0),this.transactionManager=new TransactionManager(this.baseOptions),this.client=new Authentication(this.baseOptions),this.redirect=new Redirect(this,this.baseOptions),this.popup=new Popup(this,this.baseOptions),this.crossOriginAuthentication=new CrossOriginAuthentication(this,this.baseOptions),this.webMessageHandler=new WebMessageHandler(this),this._universalLogin=new HostedPages(this,this.baseOptions),this.ssodataStorage=new SSODataStorage(this.baseOptions)}function PasswordlessAuthentication(request,options){this.baseOptions=options,this.request=request}function DBConnection(request,options){this.baseOptions=options,this.request=request}function Authentication(auth0,options){2===arguments.length?this.auth0=auth0:options=auth0,assert.check(options,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=options,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new RequestBuilder(this.baseOptions),this.passwordless=new PasswordlessAuthentication(this.request,this.baseOptions),this.dbConnection=new DBConnection(this.request,this.baseOptions),this.warn=new Warn({disableWarnings:!!options._disableDeprecationWarnings}),this.ssodataStorage=new SSODataStorage(this.baseOptions)}function Management(options){assert.check(options,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=options,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new RequestBuilder(this.baseOptions),this.baseOptions.rootUrl=urlJoin("https://"+this.baseOptions.domain,"api","v2")}WebAuth.prototype.parseHash=function(options,cb){var parsedQs,err;cb||"function"!=typeof options?options=options||{}:(cb=options,options={});var hashStr=void 0===options.hash?windowHelper.getWindow().location.hash:options.hash;if(hashStr=hashStr.replace(/^#?\/?/,""),(parsedQs=lib_parse(hashStr)).hasOwnProperty("error"))return err=error.buildResponse(parsedQs.error,parsedQs.error_description),parsedQs.state&&(err.state=parsedQs.state),cb(err);if(!parsedQs.hasOwnProperty("access_token")&&!parsedQs.hasOwnProperty("id_token")&&!parsedQs.hasOwnProperty("refresh_token"))return cb(null,null);var responseTypes=(this.baseOptions.responseType||options.responseType||"").split(" ");return responseTypes.length>0&&-1!==responseTypes.indexOf("token")&&!parsedQs.hasOwnProperty("access_token")?cb(error.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):responseTypes.length>0&&-1!==responseTypes.indexOf("id_token")&&!parsedQs.hasOwnProperty("id_token")?cb(error.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(options,parsedQs,cb)},WebAuth.prototype.validateAuthenticationResponse=function(options,parsedHash,cb){var _this=this;options.__enableIdPInitiatedLogin=options.__enableIdPInitiatedLogin||options.__enableImpersonation;var state=parsedHash.state,transaction=this.transactionManager.getStoredTransaction(state),transactionState=options.state||transaction&&transaction.state||null,transactionStateMatchesState=transactionState===state;if(!(!state&&!transactionState&&options.__enableIdPInitiatedLogin)&&!transactionStateMatchesState)return cb({error:"invalid_token",errorDescription:"`state` does not match."});var transactionNonce=options.nonce||transaction&&transaction.nonce||null,transactionOrganization=transaction&&transaction.organization,appState=options.state||transaction&&transaction.appState||null,callback=function(err,payload){if(err)return cb(err);var sub;transaction&&transaction.lastUsedConnection&&(payload&&(sub=payload.sub),_this.ssodataStorage.set(transaction.lastUsedConnection,sub));return cb(null,function(qsParams,appState,token){return{accessToken:qsParams.access_token||null,idToken:qsParams.id_token||null,idTokenPayload:token||null,appState:appState||null,refreshToken:qsParams.refresh_token||null,state:qsParams.state||null,expiresIn:qsParams.expires_in?parseInt(qsParams.expires_in,10):null,tokenType:qsParams.token_type||null,scope:qsParams.scope||null}}(parsedHash,appState,payload))};return parsedHash.id_token?this.validateToken(parsedHash.id_token,transactionNonce,(function(validationError,payload){if(!validationError){if(transactionOrganization){if(!payload.org_id)return callback(error.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(payload.org_id!==transactionOrganization)return callback(error.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+transactionOrganization+'", found "'+payload.org_id+'"'))}return parsedHash.access_token&&payload.at_hash?(new I).validateAccessToken(parsedHash.access_token,"RS256",payload.at_hash,(function(err){return err?callback(error.invalidToken(err.message)):callback(null,payload)})):callback(null,payload)}if("invalid_token"!==validationError.error||validationError.errorDescription&&validationError.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return callback(validationError);var decodedToken=(new I).decode(parsedHash.id_token);if("HS256"!==decodedToken.header.alg)return callback(validationError);if((decodedToken.payload.nonce||null)!==transactionNonce)return callback({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+transactionNonce+'", found "'+decodedToken.payload.nonce+'"'});if(!parsedHash.access_token){return callback({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})}return _this.client.userInfo(parsedHash.access_token,(function(errUserInfo,profile){return errUserInfo?callback(errUserInfo):callback(null,profile)}))})):callback(null,null)},WebAuth.prototype.validateToken=function(token,nonce,cb){new I({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||defaultClock}).verify(token,nonce,(function(err,payload){if(err)return cb(error.invalidToken(err.message));cb(null,payload)}))},WebAuth.prototype.renewAuth=function(options,cb){var usePostMessage=!!options.usePostMessage,postMessageDataType=options.postMessageDataType||!1,postMessageOrigin=options.postMessageOrigin||windowHelper.getWindow().origin,timeout=options.timeout,_this=this,params=objectHelper.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(options);params.responseType=params.responseType||"token",params.responseMode=params.responseMode||"fragment",params=this.transactionManager.process(params),assert.check(params,{type:"object",message:"options parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),params.prompt="none",params=objectHelper.blacklist(params,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),SilentAuthenticationHandler.create({authenticationUrl:this.client.buildAuthorizeUrl(params),postMessageDataType:postMessageDataType,postMessageOrigin:postMessageOrigin,timeout:timeout}).login(usePostMessage,(function(err,hash){if("object"==typeof hash)return cb(err,hash);_this.parseHash({hash:hash},cb)}))},WebAuth.prototype.checkSession=function(options,cb){var params=objectHelper.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(options);return"code"===params.responseType?cb({error:"error",error_description:"responseType can't be `code`"}):(options.nonce||(params=this.transactionManager.process(params)),params.redirectUri?(assert.check(params,{type:"object",message:"options parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),params=objectHelper.blacklist(params,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(params,wrapCallback(cb,{forceLegacyError:!0,ignoreCasing:!0}))):cb({error:"error",error_description:"redirectUri can't be empty"}))},WebAuth.prototype.changePassword=function(options,cb){return this.client.dbConnection.changePassword(options,cb)},WebAuth.prototype.passwordlessStart=function(options,cb){var authParams=objectHelper.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(options.authParams);return options.authParams=this.transactionManager.process(authParams),this.client.passwordless.start(options,cb)},WebAuth.prototype.signup=function(options,cb){return this.client.dbConnection.signup(options,cb)},WebAuth.prototype.authorize=function(options){var params=objectHelper.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(options);assert.check(params,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(params=this.transactionManager.process(params)).scope=params.scope||"openid profile email",windowHelper.redirect(this.client.buildAuthorizeUrl(params))},WebAuth.prototype.signupAndAuthorize=function(options,cb){var _this=this;return this.client.dbConnection.signup(objectHelper.blacklist(options,["popupHandler"]),(function(err){if(err)return cb(err);options.realm=options.connection,options.username||(options.username=options.email),_this.client.login(options,cb)}))},WebAuth.prototype.login=function(options,cb){var params=objectHelper.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(options);params=this.transactionManager.process(params),windowHelper.getWindow().location.host===this.baseOptions.domain?(params.connection=params.realm,delete params.realm,this._universalLogin.login(params,cb)):this.crossOriginAuthentication.login(params,cb)},WebAuth.prototype.passwordlessLogin=function(options,cb){var params=objectHelper.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(options);if(params=this.transactionManager.process(params),windowHelper.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(params,cb);else{var crossOriginOptions=objectHelper.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:params.connection,username:params.email||params.phoneNumber,otp:params.verificationCode},objectHelper.blacklist(params,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(crossOriginOptions,cb)}},WebAuth.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},WebAuth.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},WebAuth.prototype.logout=function(options){windowHelper.redirect(this.client.buildLogoutUrl(options))},WebAuth.prototype.passwordlessVerify=function(options,cb){var _this=this,params=objectHelper.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(options);return assert.check(params,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),params=this.transactionManager.process(params),this.client.passwordless.verify(params,(function(err){if(err)return cb(err);function doAuth(){windowHelper.redirect(_this.client.passwordless.buildVerifyUrl(params))}if("function"==typeof options.onRedirecting)return options.onRedirecting((function(){doAuth()}));doAuth()}))},WebAuth.prototype.renderCaptcha=function(element,options,callback){return captcha.render(this.client,element,options,callback)},PasswordlessAuthentication.prototype.buildVerifyUrl=function(options){var params,qString;return assert.check(options,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(o){return!o.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(o){return!o.phoneNumber}}}),params=objectHelper.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(options),this.baseOptions._sendTelemetry&&(params.auth0Client=this.request.getTelemetryData()),params=objectHelper.toSnakeCase(params,["auth0Client"]),qString=lib_stringify(params),urlJoin(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+qString)},PasswordlessAuthentication.prototype.start=function(options,cb){var url,body;assert.check(options,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(o){return"code"===o.send||!o.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(o){return"link"===o.send||!o.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"passwordless","start");var xRequestLanguage=options.xRequestLanguage;delete options.xRequestLanguage,(body=objectHelper.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(options)).scope&&(body.authParams=body.authParams||{},body.authParams.scope=body.authParams.scope||body.scope),body.redirectUri&&(body.authParams=body.authParams||{},body.authParams.redirect_uri=body.authParams.redirectUri||body.redirectUri),body.responseType&&(body.authParams=body.authParams||{},body.authParams.response_type=body.authParams.responseType||body.responseType),delete body.redirectUri,delete body.responseType,delete body.scope,body=objectHelper.toSnakeCase(body,["auth0Client","authParams"]);var postOptions=xRequestLanguage?{xRequestLanguage:xRequestLanguage}:void 0;return this.request.post(url,postOptions).send(body).end(wrapCallback(cb))},PasswordlessAuthentication.prototype.verify=function(options,cb){var url,cleanOption;return assert.check(options,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(o){return!o.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(o){return!o.phoneNumber}}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),cleanOption=objectHelper.pick(options,["connection","verificationCode","phoneNumber","email","auth0Client","clientID"]),cleanOption=objectHelper.toSnakeCase(cleanOption,["auth0Client"]),url=urlJoin(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(url).send(cleanOption).end(wrapCallback(cb))},DBConnection.prototype.signup=function(options,cb){var url,body,metadata;return assert.check(options,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"dbconnections","signup"),metadata=(body=objectHelper.merge(this.baseOptions,["clientID","state"]).with(options)).user_metadata||body.userMetadata,body=objectHelper.blacklist(body,["scope","userMetadata","user_metadata"]),body=objectHelper.toSnakeCase(body,["auth0Client"]),metadata&&(body.user_metadata=metadata),this.request.post(url).send(body).end(wrapCallback(cb))},DBConnection.prototype.changePassword=function(options,cb){var url,body;return assert.check(options,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"dbconnections","change_password"),body=objectHelper.merge(this.baseOptions,["clientID"]).with(options,["email","connection"]),body=objectHelper.toSnakeCase(body,["auth0Client"]),this.request.post(url).send(body).end(wrapCallback(cb))},Authentication.prototype.buildAuthorizeUrl=function(options){var params,qString;return assert.check(options,{type:"object",message:"options parameter is not valid"}),params=objectHelper.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(options),assert.check(params,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(o){return-1===o.responseType.indexOf("code")&&-1!==o.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(params.auth0Client=this.request.getTelemetryData()),params.connection_scope&&assert.isArray(params.connection_scope)&&(params.connection_scope=params.connection_scope.join(",")),params=objectHelper.blacklist(params,["username","popupOptions","domain","tenant","timeout","appState"]),params=objectHelper.toSnakeCase(params,["auth0Client"]),params=parametersWhitelist.oauthAuthorizeParams(this.warn,params),qString=lib_stringify(params),urlJoin(this.baseOptions.rootUrl,"authorize","?"+qString)},Authentication.prototype.buildLogoutUrl=function(options){var params,qString;return assert.check(options,{optional:!0,type:"object",message:"options parameter is not valid"}),params=objectHelper.merge(this.baseOptions,["clientID"]).with(options||{}),this.baseOptions._sendTelemetry&&(params.auth0Client=this.request.getTelemetryData()),params=objectHelper.toSnakeCase(params,["auth0Client","returnTo"]),qString=lib_stringify(objectHelper.blacklist(params,["federated"])),options&&void 0!==options.federated&&!1!==options.federated&&"false"!==options.federated&&(qString+="&federated"),urlJoin(this.baseOptions.rootUrl,"v2","logout","?"+qString)},Authentication.prototype.loginWithDefaultDirectory=function(options,cb){return assert.check(options,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),options.grantType="password",this.oauthToken(options,cb)},Authentication.prototype.login=function(options,cb){return assert.check(options,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),options.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(options,cb)},Authentication.prototype.oauthToken=function(options,cb){var url,body;return assert.check(options,{type:"object",message:"options parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"oauth","token"),body=objectHelper.merge(this.baseOptions,["clientID","scope","audience"]).with(options),assert.check(body,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),body=objectHelper.toSnakeCase(body,["auth0Client"]),body=parametersWhitelist.oauthTokenParams(this.warn,body),this.request.post(url).send(body).end(wrapCallback(cb))},Authentication.prototype.loginWithResourceOwner=function(options,cb){var url,body;return assert.check(options,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"oauth","ro"),body=objectHelper.merge(this.baseOptions,["clientID","scope"]).with(options,["username","password","scope","connection","device"]),(body=objectHelper.toSnakeCase(body,["auth0Client"])).grant_type=body.grant_type||"password",this.request.post(url).send(body).end(wrapCallback(cb))},Authentication.prototype.getSSOData=function(withActiveDirectories,cb){if(this.auth0||(this.auth0=new WebAuth(this.baseOptions)),windowHelper.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(withActiveDirectories,cb);"function"==typeof withActiveDirectories&&(cb=withActiveDirectories),assert.check(cb,{type:"function",message:"cb parameter is not valid"});var clientId=this.baseOptions.clientID,ssodataInformation=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:ssodataInformation.lastUsedConnection,timeout:5e3},(function(err,result){return err?"login_required"===err.error?cb(null,{sso:!1}):("consent_required"===err.error&&(err.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),cb(err,{sso:!1})):ssodataInformation.lastUsedSub&&ssodataInformation.lastUsedSub!==result.idTokenPayload.sub?cb(err,{sso:!1}):cb(null,{lastUsedConnection:{name:ssodataInformation.lastUsedConnection},lastUsedUserID:result.idTokenPayload.sub,lastUsedUsername:result.idTokenPayload.email||result.idTokenPayload.name,lastUsedClientID:clientId,sessionClients:[clientId],sso:!0})}))},Authentication.prototype.userInfo=function(accessToken,cb){var url;return assert.check(accessToken,{type:"string",message:"accessToken parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"userinfo"),this.request.get(url).set("Authorization","Bearer "+accessToken).end(wrapCallback(cb,{ignoreCasing:!0}))},Authentication.prototype.getChallenge=function(cb){if(assert.check(cb,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return cb();var url=urlJoin(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(url).send({state:this.baseOptions.state}).end(wrapCallback(cb,{ignoreCasing:!0}))},Authentication.prototype.delegation=function(options,cb){var url,body;return assert.check(options,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"delegation"),body=objectHelper.merge(this.baseOptions,["clientID"]).with(options),body=objectHelper.toSnakeCase(body,["auth0Client"]),this.request.post(url).send(body).end(wrapCallback(cb))},Authentication.prototype.getUserCountry=function(cb){var url;return assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(url).end(wrapCallback(cb))},Management.prototype.getUser=function(userId,cb){var url;return assert.check(userId,{type:"string",message:"userId parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"users",userId),this.request.get(url).end(wrapCallback(cb,{ignoreCasing:!0}))},Management.prototype.patchUserMetadata=function(userId,userMetadata,cb){var url;return assert.check(userId,{type:"string",message:"userId parameter is not valid"}),assert.check(userMetadata,{type:"object",message:"userMetadata parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"users",userId),this.request.patch(url).send({user_metadata:userMetadata}).end(wrapCallback(cb,{ignoreCasing:!0}))},Management.prototype.patchUserAttributes=function(userId,user,cb){var url;return assert.check(userId,{type:"string",message:"userId parameter is not valid"}),assert.check(user,{type:"object",message:"user parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"users",userId),this.request.patch(url).send(user).end(wrapCallback(cb,{ignoreCasing:!0}))},Management.prototype.linkUser=function(userId,secondaryUserToken,cb){var url;return assert.check(userId,{type:"string",message:"userId parameter is not valid"}),assert.check(secondaryUserToken,{type:"string",message:"secondaryUserToken parameter is not valid"}),assert.check(cb,{type:"function",message:"cb parameter is not valid"}),url=urlJoin(this.baseOptions.rootUrl,"users",userId,"identities"),this.request.post(url).send({link_with:secondaryUserToken}).end(wrapCallback(cb,{ignoreCasing:!0}))};var index={Authentication:Authentication,Management:Management,WebAuth:WebAuth,version:version};/* harmony default export */ __webpack_exports__["a"] = (index);
//# sourceMappingURL=auth0.min.esm.js.map
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(101), __webpack_require__(58)))
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(101), __webpack_require__(59)))
/***/ }),
/* 105 */
@@ -19579,7 +19598,7 @@ var LoginSignUpTab = function (_React$Component2) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ui_input_password_input__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ui_input_password_input__ = __webpack_require__(75);
@@ -20226,7 +20245,7 @@ LoadingPane.propTypes = {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__screen__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(75);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quick_auth_actions__ = __webpack_require__(54);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index__ = __webpack_require__(51);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index__ = __webpack_require__(1);
@@ -22575,7 +22594,7 @@ var _prodInvariant = __webpack_require__(5);
var DOMLazyTree = __webpack_require__(35);
var DOMProperty = __webpack_require__(36);
var React = __webpack_require__(38);
-var ReactBrowserEventEmitter = __webpack_require__(59);
+var ReactBrowserEventEmitter = __webpack_require__(60);
var ReactCurrentOwner = __webpack_require__(25);
var ReactDOMComponentTree = __webpack_require__(9);
var ReactDOMContainerInfo = __webpack_require__(280);
@@ -22591,7 +22610,7 @@ var ReactUpdates = __webpack_require__(22);
var emptyObject = __webpack_require__(78);
var instantiateReactComponent = __webpack_require__(144);
var invariant = __webpack_require__(2);
-var setInnerHTML = __webpack_require__(63);
+var setInnerHTML = __webpack_require__(64);
var shouldUpdateReactComponent = __webpack_require__(99);
var warning = __webpack_require__(6);
@@ -23659,8 +23678,8 @@ module.exports = isTextInputElement;
var ExecutionEnvironment = __webpack_require__(14);
-var escapeTextContentForBrowser = __webpack_require__(62);
-var setInnerHTML = __webpack_require__(63);
+var escapeTextContentForBrowser = __webpack_require__(63);
+var setInnerHTML = __webpack_require__(64);
/**
* Set the textContent property of a node, ensuring that whitespace is preserved
@@ -25794,13 +25813,13 @@ if (typeof window !== 'undefined') {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_email_email_pane__ = __webpack_require__(52);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_username_username_pane__ = __webpack_require__(72);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_password_password_pane__ = __webpack_require__(70);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_username_username_pane__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_password_password_pane__ = __webpack_require__(71);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions__ = __webpack_require__(27);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__captcha__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__index__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__field_captcha_captcha_pane__ = __webpack_require__(69);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__field_captcha_captcha_pane__ = __webpack_require__(70);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__engine_classic__ = __webpack_require__(34);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__enterprise__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__database__ = __webpack_require__(10);
@@ -26132,35 +26151,53 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
-var Component = function Component(_ref) {
- var i18n = _ref.i18n,
- model = _ref.model;
-
- var headerText = i18n.html('forgotPasswordInstructions') || null;
- var header = headerText && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- 'p',
- null,
- headerText
- );
- var connectionResolver = __WEBPACK_IMPORTED_MODULE_9__core_index__["connectionResolver"](model);
+var Component = function (_React$Component) {
+ _inherits(Component, _React$Component);
- // When using a custom connection resolver, `usernameStyle` is always 'username' (as opposed to 'email').
- // If the user has entered an email address as the username, and a custom resolver is being used, copy the
- // value from the 'username' field to the 'email' field so that `EmailPane` can render it.
- if (connectionResolver) {
- var field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field__["m" /* getField */])(model, 'username');
- var value = field.get('value', '');
+ function Component() {
+ _classCallCheck(this, Component);
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_10__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_9__core_index__["id"](model), __WEBPACK_IMPORTED_MODULE_11__field_email__["d" /* setEmail */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__field_email__["c" /* isEmail */])(value, false) ? value : '', false);
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__reset_password_pane__["a" /* default */], {
- emailInputPlaceholder: i18n.str('emailInputPlaceholder'),
- header: header,
- i18n: i18n,
- lock: model
- });
-};
+ Component.prototype.componentDidMount = function componentDidMount() {
+ var model = this.props.model;
+
+ var connectionResolver = __WEBPACK_IMPORTED_MODULE_9__core_index__["connectionResolver"](model);
+
+ // When using a custom connection resolver, `usernameStyle` is always 'username' (as opposed to 'email').
+ // If the user has entered an email address as the username, and a custom resolver is being used, copy the
+ // value from the 'username' field to the 'email' field so that `EmailPane` can render it.
+ if (connectionResolver) {
+ var field = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field__["m" /* getField */])(model, 'username');
+ var value = field.get('value', '');
+
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__store_index__["b" /* swap */])(__WEBPACK_IMPORTED_MODULE_10__store_index__["c" /* updateEntity */], 'lock', __WEBPACK_IMPORTED_MODULE_9__core_index__["id"](model), __WEBPACK_IMPORTED_MODULE_11__field_email__["d" /* setEmail */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__field_email__["c" /* isEmail */])(value, false) ? value : '', false);
+ }
+ };
+
+ Component.prototype.render = function render() {
+ var _props = this.props,
+ i18n = _props.i18n,
+ model = _props.model;
+
+ var headerText = i18n.html('forgotPasswordInstructions') || null;
+ var header = headerText && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
+ 'p',
+ null,
+ headerText
+ );
+
+ return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__reset_password_pane__["a" /* default */], {
+ emailInputPlaceholder: i18n.str('emailInputPlaceholder'),
+ header: header,
+ i18n: i18n,
+ lock: model
+ });
+ };
+
+ return Component;
+}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
var ResetPassword = function (_Screen) {
_inherits(ResetPassword, _Screen);
@@ -26365,9 +26402,9 @@ function renderSignedUpConfirmation(m) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_username_username_pane__ = __webpack_require__(72);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_password_password_pane__ = __webpack_require__(70);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_captcha_captcha_pane__ = __webpack_require__(69);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_username_username_pane__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_password_password_pane__ = __webpack_require__(71);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_captcha_captcha_pane__ = __webpack_require__(70);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__captcha__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_index__ = __webpack_require__(1);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -26446,7 +26483,7 @@ HRDPane.propTypes = {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_screen__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hrd_pane__ = __webpack_require__(170);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__actions__ = __webpack_require__(66);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__actions__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enterprise__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__i18n__ = __webpack_require__(12);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -26536,7 +26573,7 @@ var HRDScreen = function (_Screen) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_screen__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(75);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quick_auth_actions__ = __webpack_require__(54);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
@@ -26610,7 +26647,7 @@ var KerberosScreen = function (_Screen) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_screen__ = __webpack_require__(15);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(75);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_pane_quick_auth_pane__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quick_auth_actions__ = __webpack_require__(54);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_index__ = __webpack_require__(1);
@@ -26986,7 +27023,7 @@ function renderEmailSentConfirmation(lock) {
/* harmony export (immutable) */ __webpack_exports__["b"] = syncClientSettingsSuccess;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url_join__ = __webpack_require__(158);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url_join___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_url_join__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_cdn_utils__ = __webpack_require__(76);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_cdn_utils__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(111);
@@ -27136,9 +27173,9 @@ function fetchSSOData(id) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = fetchTenantSettings;
/* harmony export (immutable) */ __webpack_exports__["b"] = syncTenantSettingsSuccess;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_cdn_utils__ = __webpack_require__(76);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_cdn_utils__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(67);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(68);
@@ -27340,7 +27377,7 @@ function trimAuthParams() {
}
function getVersion() {
- return '11.32.2';
+ return '11.33.0';
}
/***/ }),
@@ -27576,7 +27613,7 @@ var Auth0APIClient = function () {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__connection_database_login_sign_up_tabs__ = __webpack_require__(108);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_enterprise_actions__ = __webpack_require__(66);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_enterprise_actions__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__connection_enterprise__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__connection_enterprise_single_sign_on_notice__ = __webpack_require__(109);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__classic__ = __webpack_require__(34);
@@ -27817,11 +27854,11 @@ var MFALoginScreen = function (_Screen) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__field_email_email_pane__ = __webpack_require__(52);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_password_password_pane__ = __webpack_require__(70);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_username_username_pane__ = __webpack_require__(72);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__field_password_password_pane__ = __webpack_require__(71);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__field_username_username_pane__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__field_custom_input__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__connection_database_index__ = __webpack_require__(10);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__field_captcha_captcha_pane__ = __webpack_require__(69);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__field_captcha_captcha_pane__ = __webpack_require__(70);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__connection_captcha__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__connection_enterprise__ = __webpack_require__(13);
@@ -27946,13 +27983,13 @@ var SignUpPane = function (_React$Component) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__connection_database_signed_up_confirmation__ = __webpack_require__(169);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_index__ = __webpack_require__(3);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__connection_enterprise_actions__ = __webpack_require__(66);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__connection_enterprise_actions__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__connection_enterprise__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__i18n__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__sign_up_pane__ = __webpack_require__(184);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__core_pane_separator__ = __webpack_require__(50);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__connection_database_sign_up_terms__ = __webpack_require__(65);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__connection_database_sign_up_terms__ = __webpack_require__(66);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__field_social_social_buttons_pane__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__connection_database_login_sign_up_tabs__ = __webpack_require__(108);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__connection_enterprise_single_sign_on_notice__ = __webpack_require__(109);
@@ -28122,7 +28159,7 @@ var SignUp = function (_Screen) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__connection_passwordless_index__ = __webpack_require__(33);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__sync__ = __webpack_require__(28);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__quick_auth__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__quick_auth__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__core_sso_index__ = __webpack_require__(51);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__field_email__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__field_phone_number__ = __webpack_require__(41);
@@ -28237,7 +28274,7 @@ var Passwordless = function () {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__connection_passwordless_email_sent_confirmation__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_signed_in_confirmation__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__core_index__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_database_sign_up_terms__ = __webpack_require__(65);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_database_sign_up_terms__ = __webpack_require__(66);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -28363,7 +28400,7 @@ var SocialOrEmailLoginScreen = function (_Screen) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__field_index__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__connection_passwordless_index__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_database_sign_up_terms__ = __webpack_require__(65);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__connection_database_sign_up_terms__ = __webpack_require__(66);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -28672,7 +28709,7 @@ ReCAPTCHA.defaultProps = {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actions__ = __webpack_require__(68);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actions__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ui_input_text_input__ = __webpack_require__(119);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ui_input_select_input__ = __webpack_require__(118);
@@ -28869,7 +28906,7 @@ function getMFACodeValidation(m) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ui_list__ = __webpack_require__(217);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__actions__ = __webpack_require__(68);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__actions__ = __webpack_require__(69);
@@ -28948,7 +28985,7 @@ function setShowPassword(m, checked) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_input_phone_number_input__ = __webpack_require__(214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ui_input_select_input__ = __webpack_require__(118);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__actions__ = __webpack_require__(68);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__actions__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_index__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__store_index__ = __webpack_require__(8);
@@ -29395,7 +29432,7 @@ var Auth0Lock = function (_Core) {
/* harmony default export */ __webpack_exports__["a"] = (Auth0Lock);
-Auth0Lock.version = '11.32.2';
+Auth0Lock.version = '11.33.0';
// TODO: should we have different telemetry for classic/passwordless?
// TODO: should we set telemetry info before each request?
@@ -29407,7 +29444,7 @@ Auth0Lock.version = '11.32.2';
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = initSanitizer;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_dompurify__ = __webpack_require__(77);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_dompurify__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_dompurify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_dompurify__);
@@ -29459,7 +29496,7 @@ var ContainerManager = function () {
var container = window.document.getElementById(id);
if (!container && shouldAppend) {
- container = window.document.createElement('div');
+ container = window.document.createElement('main');
container.id = id;
container.className = 'auth0-lock-container';
window.document.body.appendChild(container);
@@ -29554,7 +29591,7 @@ var remove = function remove() {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify__ = __webpack_require__(77);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_dompurify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_dompurify__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_transition_group__ = __webpack_require__(335);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_transition_group___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_transition_group__);
@@ -31149,7 +31186,7 @@ var EmailInput = function (_React$Component) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_wrap__ = __webpack_require__(23);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__password_input__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__password_input__ = __webpack_require__(75);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -35484,7 +35521,7 @@ function localstorage() {
} catch (e) {}
}
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(59)))
/***/ }),
/* 252 */
@@ -36905,7 +36942,7 @@ var parseObject = function (chain, val, options, valuesParsed) {
) {
obj = [];
obj[index] = leaf;
- } else {
+ } else if (cleanRoot !== '__proto__') {
obj[cleanRoot] = leaf;
}
}
@@ -37119,7 +37156,7 @@ var stringify = function stringify(
var tmpSc = sideChannel;
var step = 0;
var findFlag = false;
- while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
// Where object last appeared in the ref tree
var pos = tmpSc.get(object);
step += 1;
@@ -37181,7 +37218,7 @@ var stringify = function stringify(
var objKeys;
if (generateArrayPrefix === 'comma' && isArray(obj)) {
// we need to join elements in
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
} else if (isArray(filter)) {
objKeys = filter;
} else {
@@ -37191,7 +37228,7 @@ var stringify = function stringify(
for (var j = 0; j < objKeys.length; ++j) {
var key = objKeys[j];
- var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
if (skipNulls && value === null) {
continue;
@@ -37231,7 +37268,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
return defaults;
}
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
}
@@ -38475,7 +38512,7 @@ module.exports = DefaultEventPluginOrder;
var EventPropagators = __webpack_require__(44);
var ReactDOMComponentTree = __webpack_require__(9);
-var SyntheticMouseEvent = __webpack_require__(60);
+var SyntheticMouseEvent = __webpack_require__(61);
var eventTypes = {
mouseEnter: {
@@ -39052,7 +39089,7 @@ var ReactChildReconciler = {
};
module.exports = ReactChildReconciler;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(59)))
/***/ }),
/* 276 */
@@ -40130,7 +40167,7 @@ var DOMProperty = __webpack_require__(36);
var DOMPropertyOperations = __webpack_require__(129);
var EventPluginHub = __webpack_require__(43);
var EventPluginRegistry = __webpack_require__(87);
-var ReactBrowserEventEmitter = __webpack_require__(59);
+var ReactBrowserEventEmitter = __webpack_require__(60);
var ReactDOMComponentFlags = __webpack_require__(130);
var ReactDOMComponentTree = __webpack_require__(9);
var ReactDOMInput = __webpack_require__(284);
@@ -40142,7 +40179,7 @@ var ReactMultiChild = __webpack_require__(297);
var ReactServerRenderingTransaction = __webpack_require__(302);
var emptyFunction = __webpack_require__(21);
-var escapeTextContentForBrowser = __webpack_require__(62);
+var escapeTextContentForBrowser = __webpack_require__(63);
var invariant = __webpack_require__(2);
var isEventSupported = __webpack_require__(98);
var shallowEqual = __webpack_require__(79);
@@ -41928,7 +41965,7 @@ var DOMChildrenOperations = __webpack_require__(85);
var DOMLazyTree = __webpack_require__(35);
var ReactDOMComponentTree = __webpack_require__(9);
-var escapeTextContentForBrowser = __webpack_require__(62);
+var escapeTextContentForBrowser = __webpack_require__(63);
var invariant = __webpack_require__(2);
var validateDOMNesting = __webpack_require__(100);
@@ -42391,7 +42428,7 @@ module.exports = {
var _assign = __webpack_require__(7);
var ReactUpdates = __webpack_require__(22);
-var Transaction = __webpack_require__(61);
+var Transaction = __webpack_require__(62);
var emptyFunction = __webpack_require__(21);
@@ -42769,7 +42806,7 @@ var EventPluginHub = __webpack_require__(43);
var EventPluginUtils = __webpack_require__(88);
var ReactComponentEnvironment = __webpack_require__(91);
var ReactEmptyComponent = __webpack_require__(132);
-var ReactBrowserEventEmitter = __webpack_require__(59);
+var ReactBrowserEventEmitter = __webpack_require__(60);
var ReactHostComponent = __webpack_require__(134);
var ReactUpdates = __webpack_require__(22);
@@ -43423,10 +43460,10 @@ var _assign = __webpack_require__(7);
var CallbackQueue = __webpack_require__(128);
var PooledClass = __webpack_require__(30);
-var ReactBrowserEventEmitter = __webpack_require__(59);
+var ReactBrowserEventEmitter = __webpack_require__(60);
var ReactInputSelection = __webpack_require__(135);
var ReactInstrumentation = __webpack_require__(17);
-var Transaction = __webpack_require__(61);
+var Transaction = __webpack_require__(62);
var ReactUpdateQueue = __webpack_require__(93);
/**
@@ -43695,7 +43732,7 @@ module.exports = ReactRef;
var _assign = __webpack_require__(7);
var PooledClass = __webpack_require__(30);
-var Transaction = __webpack_require__(61);
+var Transaction = __webpack_require__(62);
var ReactInstrumentation = __webpack_require__(17);
var ReactServerUpdateQueue = __webpack_require__(303);
@@ -44451,7 +44488,7 @@ var SyntheticClipboardEvent = __webpack_require__(309);
var SyntheticEvent = __webpack_require__(24);
var SyntheticFocusEvent = __webpack_require__(312);
var SyntheticKeyboardEvent = __webpack_require__(314);
-var SyntheticMouseEvent = __webpack_require__(60);
+var SyntheticMouseEvent = __webpack_require__(61);
var SyntheticDragEvent = __webpack_require__(311);
var SyntheticTouchEvent = __webpack_require__(315);
var SyntheticTransitionEvent = __webpack_require__(316);
@@ -44791,7 +44828,7 @@ module.exports = SyntheticCompositionEvent;
-var SyntheticMouseEvent = __webpack_require__(60);
+var SyntheticMouseEvent = __webpack_require__(61);
/**
* @interface DragEvent
@@ -45086,7 +45123,7 @@ module.exports = SyntheticTransitionEvent;
-var SyntheticMouseEvent = __webpack_require__(60);
+var SyntheticMouseEvent = __webpack_require__(61);
/**
* @interface WheelEvent
@@ -45395,7 +45432,7 @@ function flattenChildren(children, selfDebugID) {
}
module.exports = flattenChildren;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(59)))
/***/ }),
/* 322 */
@@ -45752,7 +45789,7 @@ module.exports = getVendorPrefixedEventName;
-var escapeTextContentForBrowser = __webpack_require__(62);
+var escapeTextContentForBrowser = __webpack_require__(63);
/**
* Escapes attribute value to prevent scripting attacks.
@@ -49215,7 +49252,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = isByteLength;
-var _assertString = _interopRequireDefault(__webpack_require__(64));
+var _assertString = _interopRequireDefault(__webpack_require__(65));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -49255,7 +49292,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = isEmail;
-var _assertString = _interopRequireDefault(__webpack_require__(64));
+var _assertString = _interopRequireDefault(__webpack_require__(65));
var _merge = _interopRequireDefault(__webpack_require__(159));
@@ -49458,7 +49495,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = isFQDN;
-var _assertString = _interopRequireDefault(__webpack_require__(64));
+var _assertString = _interopRequireDefault(__webpack_require__(65));
var _merge = _interopRequireDefault(__webpack_require__(159));
@@ -49553,7 +49590,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = isIP;
-var _assertString = _interopRequireDefault(__webpack_require__(64));
+var _assertString = _interopRequireDefault(__webpack_require__(65));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
diff --git a/build/lock.min.js b/build/lock.min.js
index 374b8ba1f..6e210d783 100644
--- a/build/lock.min.js
+++ b/build/lock.min.js
@@ -1,10 +1,10 @@
/*!
- * lock v11.32.2
+ * lock v11.33.0
*
* Author: Auth0 (http://auth0.com)
- * Date: 08/02/2022, 15:03:19
+ * Date: 05/05/2022, 11:36:29
* License: MIT
*
*/
-!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=163)}([function(t,e,n){"use strict";t.exports=n(38)},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){var s=St(t,mt.a.fromJS({clientBaseUrl:O(r,n),tenantBaseUrl:A(r,n),languageBaseUrl:U(r,n),auth:k(r),clientID:e,domain:n,emitEventFn:i,hookRunner:o,useTenantInfo:r.__useTenantInfo||!1,hashCleanup:!1!==r.hashCleanup,allowedConnections:mt.a.fromJS(r.allowedConnections||[]),useCustomPasswordlessConnection:!0===r.useCustomPasswordlessConnection,ui:E(t,r),defaultADUsernameFromEmailPrefix:!1!==r.defaultADUsernameFromEmailPrefix,prefill:r.prefill||{},connectionResolver:r.connectionResolver,handleEventFn:a,hooks:x(r)}));return s=wt.initI18n(s)}function o(t){return t.get("id")}function i(t){return kt(t,"clientID")}function a(t){return kt(t,"domain")}function s(t){return kt(t,"clientBaseUrl")}function u(t){return kt(t,"tenantBaseUrl")}function c(t){return kt(t,"useTenantInfo")}function l(t){return kt(t,"connectionResolver")}function p(t,e){if(!e)return At(t,"resolvedConnection",void 0);if(!e.type||!e.name)throw new Error('Invalid connection object. The resolved connection must look like: `{ type: "database", name: "connection name" }`.');if("database"!==e.type)throw new Error("Invalid connection type. Only database connections can be resolved with a custom resolver.");return At(t,"resolvedConnection",mt.a.fromJS(e))}function d(t){var e=kt(t,"resolvedConnection");if(e)return $(t,e.get("name"))}function f(t){return kt(t,"languageBaseUrl")}function M(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t=_t(t,"submitting",e),t=D(t),t=n&&!e?h(t,n):N(t)}function g(t){return Ut(t,"submitting",!1)}function h(t,e){return _t(t,"globalError",e)}function y(t){return Ut(t,"globalError","")}function N(t){return Yt(t,"globalError")}function m(t,e){return _t(t,"globalSuccess",e)}function j(t){return Ut(t,"globalSuccess","")}function D(t){return Yt(t,"globalSuccess")}function I(t,e){return _t(t,"globalInfo",e)}function w(t){return Ut(t,"globalInfo","")}function v(t){return Yt(t,"globalInfo")}function L(t){return Ut(t,"render",!1)}function b(t){return Yt(t,"render")}function z(t,e){return At(t,"suppressSubmitOverlay",e)}function C(t){return kt(t,"suppressSubmitOverlay")}function T(t){return kt(t,"hooks")}function E(t,e){var r=!e.container&&(void 0===e.closable||!!e.closable),o=e.theme||{},i=o.labeledSubmitButton,a=o.hideMainScreenTitle,s=o.logo,u=o.primaryColor,c=o.authButtons,l=null!==e.avatar,p=e.avatar&&"function"==typeof e.avatar.url&&"function"==typeof e.avatar.displayName&&e.avatar,d=p||bt;return new mt.a.fromJS({containerID:e.container||"auth0-lock-container-"+t,appendContainer:!e.container,autoclose:void 0!==e.autoclose&&(r&&e.autoclose),autofocus:void 0===e.autofocus?!(e.container||n.i(jt.a)()):!!e.autofocus,avatar:l,avatarProvider:d,logo:"string"==typeof s?s:void 0,closable:r,hideMainScreenTitle:!!a,labeledSubmitButton:void 0===i||!!i,language:void 0===e.language?"en":Lt()(e.language||"").toLowerCase(),dict:"object"===Et(e.languageDictionary)?e.languageDictionary:{},disableWarnings:void 0!==e.disableWarnings&&!!e.disableWarnings,mobile:void 0!==e.mobile&&!!e.mobile,popupOptions:void 0===e.popupOptions?{}:e.popupOptions,primaryColor:"string"==typeof u?u:void 0,rememberLastLogin:void 0===e.rememberLastLogin||!!e.rememberLastLogin,allowAutocomplete:!!e.allowAutocomplete,preferConnectionDisplayName:!!e.preferConnectionDisplayName,authButtonsTheme:"object"===(void 0===c?"undefined":Et(c))?c:{},allowShowPassword:!!e.allowShowPassword,allowPasswordAutocomplete:!!e.allowPasswordAutocomplete,scrollGlobalMessagesIntoView:void 0===e.scrollGlobalMessagesIntoView||!!e.scrollGlobalMessagesIntoView,forceAutoHeight:!!e.forceAutoHeight})}function x(t){var e={};return Qt.forEach(function(n){t.hooks&&"function"==typeof t.hooks[n]&&(e[n]=t.hooks[n])}),new mt.a.fromJS(e)}function k(t){var e=t.auth||{},r=e.audience,o=e.connectionScopes,i=e.params,a=e.autoParseHash,s=e.redirect,u=e.redirectUrl,c=e.responseMode,l=e.responseType,p=e.sso,d=e.state,f=e.nonce;return t.auth&&t.auth.redirectUri&&console.warn("You're sending an `auth` option named `redirectUri`. This option will be ignored. Use `redirectUrl` instead."),r="string"==typeof r?r:void 0,o="object"===(void 0===o?"undefined":Et(o))?o:{},i="object"===(void 0===i?"undefined":Et(i))?i:{},u="string"==typeof u&&u?u:null,a="boolean"!=typeof a||a,s="boolean"!=typeof s||s,c="string"==typeof c?c:void 0,d="string"==typeof d?d:void 0,f="string"==typeof f?f:void 0,l="string"==typeof l?l:u?"code":"token",u=u||""+n.i(It.a)(window.location.href)+window.location.pathname,p="boolean"!=typeof p||p,i.scope||(i.scope="openid profile email"),mt.a.fromJS({audience:r,connectionScopes:o,params:i,autoParseHash:a,redirect:s,redirectUrl:u,responseMode:c,responseType:l,sso:p,state:d,nonce:f})}function S(t,e){return mt.a.fromJS(e).merge(kt(t,"auth")).toJS()}function O(t,e){return t.clientBaseUrl&&"string"==typeof t.clientBaseUrl?t.clientBaseUrl:t.configurationBaseUrl&&"string"==typeof t.configurationBaseUrl?t.configurationBaseUrl:t.assetsUrl&&"string"==typeof t.assetsUrl?t.assetsUrl:"https://"+e}function A(t,e){if(t.configurationBaseUrl&&"string"==typeof t.configurationBaseUrl)return t.overrides&&t.overrides.__tenant?yt()(t.configurationBaseUrl,"tenants","v1",t.overrides.__tenant+".js"):yt()(t.configurationBaseUrl,"info-v1.js");if(t.assetsUrl&&"string"==typeof t.assetsUrl)return t.assetsUrl;var r="https://"+e,o=n.i(It.b)(r).hostname;if(n.i(Dt.a)(o,".auth0.com")){var i=o.split("."),a=i[0];return yt()(r,"tenants","v1",a+".js")}return yt()(r,"info-v1.js")}function U(t,e){return t.languageBaseUrl&&"string"==typeof t.languageBaseUrl?t.languageBaseUrl:t.assetsUrl&&"string"==typeof t.assetsUrl?t.assetsUrl:"https://cdn.auth0.com"}function _(t){return _t(t,"render",!0)}function Y(t,e){return _t(t,"loggedIn",e)}function Q(t){return Ut(t,"loggedIn",!1)}function P(t){return kt(t,"defaultADUsernameFromEmailPrefix",!0)}function B(t,e,n){return t=Tt.a(t,n),At(t,"captcha",mt.a.fromJS(e))}function R(t){if("object"===(void 0===t?"undefined":Et(t)))return kt(t,"captcha")}function G(t){return kt(t,"prefill",{})}function Z(t,e){(Nt.Map.isMap(t)?!Wt.disableWarnings(t):!t.disableWarnings)&&console&&console.warn&&console.warn(e)}function W(t,e){(Nt.Map.isMap(t)?!Wt.disableWarnings(t):!t.disableWarnings)&&console&&console.error&&console.error(e)}function H(t){return Ut(t,"allowedConnections")||kt(t,"allowedConnections")}function F(t){for(var e=arguments.length,r=Array(e>2?e-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:void 0;if(1===arguments.length)return Ut(t,"connections",n.i(Nt.Map)()).filter(function(t,e){return"unknown"!==e}).valueSeq().flatten(!0);var a=Ut(t,["connections",i],n.i(Nt.List)());return r.length>0?a.filter(function(t){return~r.indexOf(t.get("strategy"))}):a}function V(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:void 0,n=F(t);return 1===n.count()&&(!e||n.getIn([0,"type"])===e)}function q(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=F(t).count(),r=arguments.length,o=Array(r>2?r-2:0),i=2;i0&&n===a}function X(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o0}function K(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o=0}).sort(function(t,e){return r(t)-r(e)})}))}function nt(t){return kt(t,"useCustomPasswordlessConnection")}function rt(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o2?r-2:0),i=2;i3&&void 0!==arguments[3]?arguments[3]:S(e),i=t.getIn(["field",e,"value"]),a=t.getIn(["field",e,"showInvalid"],!1),s=arguments.length,u=Array(s>4?s-4:0),c=4;c2?r-2:0),i=2;i2&&void 0!==arguments[2]?arguments[2]:new b.Map({});return t.getIn(["field",e],n)}function g(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return M(t,e).get("value",n)}function h(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return M(t,e).get("label",n)}function y(t){return t.getIn(["field","phoneNumber","value"],"")}function N(t){return g(t,"email")}function m(t){return g(t,"vcode")}function j(t){return g(t,"password")}function D(t){return g(t,"username")}function I(t){return!!t.getIn(["field","selecting"])}function w(t){var e=t.getIn(["field","selecting","name"]);return I(t)?L.a.createElement(T.a,{model:t,name:e,icon:t.getIn(["field","selecting","icon"]),iconUrl:t.getIn(["field","selecting","iconUrl"]),items:t.getIn(["field",e,"options"])}):null}e.e=r,e.d=i,e.f=a,e.i=s,e.p=u,e.k=c,e.j=l,e.a=p,e.n=d,e.b=f,e.m=M,e.c=g,e.o=h,e.r=y,e.g=N,e.s=m,e.h=j,e.q=D,e.l=w;var v=n(0),L=n.n(v),b=n(11),z=(n.n(b),n(31)),C=n.n(z),T=n(193),E=n(1),x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k=function(t,e,n){return t.length>=e&&t.length<=n},S=function(t){switch(t){case"family_name":case"given_name":return function(t){return k(C()(t),1,150)};case"name":case"nickname":return function(t){return k(C()(t),1,300)};default:return function(t){return C()(t).length>0}}}},function(t,e,n){t.exports=n(260)()},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r4?o-4:0),a=4;a1?e-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:0;return t.getIn([e,n])}function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t.removeIn([e,n])}function p(t,e){return t.get(e,n.i(f.Map)()).toList()}e.a=r,e.b=i,e.c=a,e.f=s,e.d=u,e.e=c,e.h=l,e.g=p;var d=n(218),f=n(11),M=(n.n(f),n.i(d.a)(new f.Map({})))},function(t,e,n){"use strict";function r(t,e){return 1===t.nodeType&&t.getAttribute(M)===String(e)||8===t.nodeType&&t.nodeValue===" react-text: "+e+" "||8===t.nodeType&&t.nodeValue===" react-empty: "+e+" "}function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[h]=n}function a(t){var e=t._hostNode;e&&(delete e[h],t._hostNode=null)}function s(t,e){if(!(t._flags&g.hasCachedChildNodes)){var n=t._renderedChildren,a=e.firstChild;t:for(var s in n)if(n.hasOwnProperty(s)){var u=n[s],c=o(u)._domID;if(0!==c){for(;null!==a;a=a.nextSibling)if(r(a,c)){i(u,a);continue t}p("32",c)}}t._flags|=g.hasCachedChildNodes}}function u(t){if(t[h])return t[h];for(var e=[];!t[h];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,r;t&&(r=t[h]);t=e.pop())n=r,e.length&&s(r,t);return n}function c(t){var e=u(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode&&p("33"),t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent||p("34"),t=t._hostParent;for(;e.length;t=e.pop())s(t,t._hostNode);return t._hostNode}var p=n(5),d=n(36),f=n(130),M=(n(2),d.ID_ATTRIBUTE_NAME),g=f,h="__reactInternalInstance$"+Math.random().toString(36).slice(2),y={getClosestInstanceFromNode:u,getInstanceFromNode:c,getNodeFromInstance:l,precacheChildNodes:s,precacheNode:i,uncacheNode:a};t.exports=y},function(t,e,n){"use strict";function r(t,e){return t=$(t,R.a.fromJS(u(e))),t=_(t)}function o(t,e){var n=void 0===t[e]||"boolean"==typeof t[e];return n||G.warn(t,"The `"+e+"` option will be ignored, because it is not a booelan."),n}function i(t,e,n){var r=void 0===t[e]||n.indexOf(t[e])>-1;return r||G.warn(t,"The `"+e+"` option will be ignored, because it is not one of the following allowed values: "+n.map(function(t){return JSON.stringify(t)}).join(", ")+"."),r}function a(t,e){var n=void 0===t[e]||"string"==typeof t[e]&&V()(t[e]).length>0;return n||G.warn(t,"The `"+e+"` option will be ignored, because it is not a non-empty string."),n}function s(t,e){var n=void 0===t[e]||window.Array.isArray(t[e]);return n||G.warn(t,"The `"+e+"` option will be ignored, because it is not an array."),n}function u(t){var e=t.additionalSignUpFields,r=t.defaultDatabaseConnection,u=t.forgotPasswordLink,l=t.loginAfterSignUp,p=t.mustAcceptTerms,d=t.showTerms,f=t.signUpLink,M=t.usernameStyle,g=t.signUpFieldsStrictValidation,h=t.signUpHideUsernameField,y=c(t),N=y.initialScreen,m=y.screens;return i(t,"usernameStyle",["email","username"])||(M=void 0),a(t,"defaultDatabaseConnection")||(r=void 0),a(t,"forgotPasswordLink")||(u=void 0),a(t,"signUpLink")||(f=void 0),o(t,"mustAcceptTerms")||(p=void 0),o(t,"showTerms")||(d=!0),o(t,"signUpFieldsStrictValidation")||(g=!1),o(t,"signUpHideUsernameField")||(h=!1),s(t,"additionalSignUpFields")?e&&(e=e.reduce(function(e,n){var r=n.icon,o=n.name,i=n.options,a=n.placeholder,s=n.placeholderHTML,u=n.prefill,c=n.type,l=n.validator,p=n.value,d=n.storage,f=!0,M=["email","username","password"];("string"!=typeof o||!o.match(/^[a-zA-Z0-9_]+$/)||M.indexOf(o)>-1)&&(G.warn(t,"Ignoring an element of `additionalSignUpFields` because it does not contain valid `name` property. Every element of `additionalSignUpFields` must be an object with a `name` property that is a non-empty string consisting of letters, numbers and underscores. The following names are reserved, and therefore, cannot be used: "+M.join(", ")+"."),f=!1),"hidden"===c||"string"==typeof a&&a||"string"==typeof s&&s||(G.warn(t,"Ignoring an element of `additionalSignUpFields` ("+o+") because it does not contain a valid `placeholder` or `placeholderHTML` property. Every element of `additionalSignUpFields` must have a `placeholder` or `placeholderHTML` property that is a non-empty string."),f=!1),s&&a&&G.warn(t,"When provided, the `placeholderHTML` property of an element of `additionalSignUpFields` will override the `placeholder` property of that element"),void 0==r||"string"==typeof r&&r||(G.warn(t,"When provided, the `icon` property of an element of `additionalSignUpFields` must be a non-empty string."),r=void 0),void 0==u||"string"==typeof u&&u||"function"==typeof u||(G.warn(t,"When provided, the `prefill` property of an element of `additionalSignUpFields` must be a non-empty string or a function."),u=void 0);var g=["select","text","checkbox","hidden"];return void 0==c||"string"==typeof c&&-1!==g.indexOf(c)||(G.warn(t,'When provided, the `type` property of an element of `additionalSignUpFields` must be one of the following strings: "'+g.join('", "')+'".'),c=void 0),void 0!=l&&"select"===c&&(G.warn(t,'Elements of `additionalSignUpFields` with a "select" `type` cannot specify a `validator` function, all of its `options` are assumed to be valid.'),l=void 0),void 0!=l&&"function"!=typeof l&&(G.warn(t,"When provided, the `validator` property of an element of `additionalSignUpFields` must be a function."),l=void 0),void 0!=i&&"select"!=c&&(G.warn(t,'The `options` property can only by provided for an element of `additionalSignUpFields` when its `type` equals to "select"'),i=void 0),(void 0!=i&&!window.Array.isArray(i)&&"function"!=typeof i||"select"===c&&void 0===i)&&(G.warn(t,"Ignoring an element of `additionalSignUpFields` ("+o+') because it has a "select" `type` but does not specify an `options` property that is an Array or a function.'),f=!1),"hidden"!==c||p||(G.warn(t,"Ignoring an element of `additionalSignUpFields` ("+o+') because it has a "hidden" `type` but does not specify a `value` string.'),f=!1),f?e.concat([{icon:r,name:o,options:i,placeholder:a,placeholderHTML:s,prefill:u,type:c,validator:l,value:p,storage:d}]):e},[]),e=R.a.fromJS(e).map(function(t){return t.filter(function(t){return void 0!==t})})):e=void 0,l=!1!==l,n.i(B.Map)({additionalSignUpFields:e,defaultConnectionName:r,forgotPasswordLink:u,initialScreen:N,loginAfterSignUp:l,mustAcceptTerms:p,showTerms:d,screens:m,signUpLink:f,usernameStyle:M,signUpFieldsStrictValidation:g,signUpHideUsernameField:h}).filter(function(t){return void 0!==t}).toJS()}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowLogin:!0,allowSignUp:!0,allowForgotPassword:!0,initialScreen:void 0},n=t.allowForgotPassword,r=t.allowLogin,a=t.allowSignUp,s=t.initialScreen,u=[];return(!0===r||!o(t,"allowLogin")&&e.allowLogin||void 0===r&&e.allowLogin)&&u.push("login"),(!0===a||!o(t,"allowSignUp")&&e.allowSignUp||void 0===a&&e.allowSignUp)&&u.push("signUp"),(!0===n||!o(t,"allowForgotPassword")&&e.allowForgotPassword||void 0===n&&e.allowForgotPassword)&&u.push("forgotPassword"),u.push("mfaLogin"),i(t,"initialScreen",u)||(s=void 0),void 0===s&&(s=e.initialScreen||u[0]),{initialScreen:s,screens:new B.List(u)}}function l(t,e){var n=c(e,{allowLogin:m(t).contains("login"),allowSignUp:m(t).contains("signUp"),allowForgotPassword:m(t).contains("forgotPassword"),initialScreen:K(t,"initialScreen")}),r=n.initialScreen,o=n.screens;return t=et(t,"initialScreen",r),t=et(t,"screens",o)}function p(t){var e=d(t);return e&&G.findConnection(t,e)}function d(t){return K(t,"defaultConnectionName")}function f(t){return G.resolvedConnection(t)||n.i(J.b)(t)||p(t)||G.connection(t,"database")}function M(t){return(f(t)||n.i(B.Map)()).get("name")}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return K(t,"forgotPasswordLink",e)}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return K(t,"signUpLink",e)}function y(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t=G.clearGlobalError(t),t=G.clearGlobalSuccess(t),t=n.i(Z.a)(t,r),t=n.i(Z.b)(t,r),et(t,"screen",e)}function N(t){return[tt(t,"screen"),j(t),"login","signUp","forgotPassword","mfaLogin"].filter(function(e){return z(t,e)})[0]}function m(t){return tt(t,"screens")||K(t,"screens",new B.List)}function j(t){return tt(t,"initialScreen")||K(t,"initialScreen")}function D(t,e){return j(t)===e}function I(t){return(f(t)||n.i(B.Map)()).toJS().requireUsername}function w(t){return G.hasSomeConnections(t,"database")?G.connectionResolver(t)?"username":I(t)?K(t,"usernameStyle","any"):"email":G.hasSomeConnections(t,"enterprise")&&n.i(q.j)(t)?"username":"email"}function v(t){return"email"===w(t)}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return v(t)?n.i(Z.c)(t,"email"):e.emailFirst?n.i(Z.c)(t,"email")||n.i(Z.c)(t,"username"):n.i(Z.c)(t,"username")||n.i(Z.c)(t,"email")}function b(t){return I(t)||"username"===K(t,"usernameStyle","email")}function z(t,e){var r=(f(t)||n.i(B.Map)()).toJS(),o=r.allowForgot,i=r.allowSignup;return!(!1===o&&"forgotPassword"===e)&&!(!1===i&&"signUp"===e)&&m(t).contains(e)}function C(t){return K(t,"loginAfterSignUp")}function T(t){return(f(t)||n.i(B.Map)()).get("passwordPolicy","none")}function E(t){return K(t,"additionalSignUpFields",n.i(B.List)())}function x(t){return K(t,"showTerms",!0)}function k(t){return K(t,"signUpFieldsStrictValidation",!1)}function S(t){return K(t,"signUpHideUsernameField",!1)}function O(t){return K(t,"mustAcceptTerms",!1)}function A(t){return!O(t)||tt(t,"termsAccepted",!1)}function U(t){return et(t,"termsAccepted",!A(t))}function _(t){return E(t).reduce(function(t,e){switch(e.get("type")){case"select":return Y(t,e);case"hidden":return P(t,e);default:return Q(t,e)}},t)}function Y(t,e){var r=e.get("name"),o=["additionalSignUpField",r],i=e.get("prefill"),a=e.get("options"),s="function"==typeof i?void 0:i||"",u="function"==typeof a?void 0:a,c=function(t){return void 0!==s&&void 0!==u?n.i(Z.d)(t,r,R.a.fromJS(u),s):t};return void 0===s&&(t=n.i(H.d)(t,o.concat("prefill"),{recoverResult:"",successFn:function(t,e){return s=e,c(t)},syncFn:function(t,e){return i(e)}})),void 0===u&&(t=n.i(H.d)(t,o.concat("options"),{successFn:function(t,e){return u=e,c(t)},syncFn:function(t,e){return a(e)}})),void 0!==s&&void 0!==u&&(t=n.i(Z.d)(t,r,R.a.fromJS(u),s)),t}function Q(t,e){var r=e.get("name"),o=["additionalSignUpField",r,"prefill"],i=e.get("prefill"),a=e.get("validator"),s="function"==typeof i?void 0:i||"";return t=void 0===s?n.i(H.d)(t,o,{recoverResult:"",successFn:function(t,e){return n.i(Z.e)(t,r,e,a)},syncFn:function(t,e){return i(e)}}):n.i(Z.e)(t,r,s,a)}function P(t,e){return n.i(Z.e)(t,e.get("name"),e.get("value"))}e.f=r,e.g=l,e.e=p,e.d=d,e.r=f,e.m=M,e.B=g,e.z=h,e.s=y,e.j=N,e.k=j,e.c=D,e.n=I,e.A=w,e.l=v,e.a=L,e.b=b,e.i=z,e.q=C,e.y=T,e.p=E,e.w=x,e.x=k,e.o=S,e.v=O,e.u=A,e.t=U,e.h=_;var B=n(11),R=n.n(B),G=n(1),Z=n(3),W=n(20),H=n(28),F=n(31),V=n.n(F),J=n(67),q=n(13),X=n.i(W.a)(["database"]),K=X.get,$=X.initNS,tt=X.tget,et=X.tset},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return i(t)?t:T(t)}function n(t){return a(t)?t:E(t)}function r(t){return s(t)?t:x(t)}function o(t){return i(t)&&!u(t)?t:k(t)}function i(t){return!(!t||!t[cn])}function a(t){return!(!t||!t[ln])}function s(t){return!(!t||!t[pn])}function u(t){return a(t)||s(t)}function c(t){return!(!t||!t[dn])}function l(t){return t.value=!1,t}function p(t){t&&(t.value=!0)}function d(){}function f(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),o=0;o>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?M(t)+e:e}function h(){return!0}function y(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function N(t,e){return j(t,e,0)}function m(t,e){return j(t,e,e)}function j(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function D(t){this.next=t}function I(t,e,n,r){var o=0===t?e:1===t?n:[e,n];return r?r.value=o:r={value:o,done:!1},r}function w(){return{value:void 0,done:!0}}function v(t){return!!z(t)}function L(t){return t&&"function"==typeof t.next}function b(t){var e=z(t);return e&&e.call(t)}function z(t){var e=t&&(In&&t[In]||t[wn]);if("function"==typeof e)return e}function C(t){return t&&"number"==typeof t.length}function T(t){return null===t||void 0===t?Y():i(t)?t.toSeq():B(t)}function E(t){return null===t||void 0===t?Y().toKeyedSeq():i(t)?a(t)?t.toSeq():t.fromEntrySeq():Q(t)}function x(t){return null===t||void 0===t?Y():i(t)?a(t)?t.entrySeq():t.toIndexedSeq():P(t)}function k(t){return(null===t||void 0===t?Y():i(t)?a(t)?t.entrySeq():t:P(t)).toSetSeq()}function S(t){this._array=t,this.size=t.length}function O(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function A(t){this._iterable=t,this.size=t.length||t.size}function U(t){this._iterator=t,this._iteratorCache=[]}function _(t){return!(!t||!t[Ln])}function Y(){return bn||(bn=new S([]))}function Q(t){var e=Array.isArray(t)?new S(t).fromEntrySeq():L(t)?new U(t).fromEntrySeq():v(t)?new A(t).fromEntrySeq():"object"==typeof t?new O(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function P(t){var e=R(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function B(t){var e=R(t)||"object"==typeof t&&new O(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function R(t){return C(t)?new S(t):L(t)?new U(t):v(t)?new A(t):void 0}function G(t,e,n,r){var o=t._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===e(s[1],r?s[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function Z(t,e,n,r){var o=t._cache;if(o){var i=o.length-1,a=0;return new D(function(){var t=o[n?i-a:a];return a++>i?w():I(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function W(t,e){return e?H(e,t,"",{"":t}):F(t)}function H(t,e,n,r){return Array.isArray(e)?t.call(r,n,x(e).map(function(n,r){return H(t,n,r,e)})):V(e)?t.call(r,n,E(e).map(function(n,r){return H(t,n,r,e)})):e}function F(t){return Array.isArray(t)?x(t).map(F).toList():V(t)?E(t).map(F).toMap():t}function V(t){return t&&(t.constructor===Object||void 0===t.constructor)}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function q(t,e){if(t===e)return!0;if(!i(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||s(t)!==s(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!u(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var o=r.next().value;return o&&J(o[1],t)&&(n||J(o[0],e))})&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var l=t;t=e,e=l}var p=!0,d=e.__iterate(function(e,r){if(n?!t.has(e):o?!J(e,t.get(r,hn)):!J(t.get(r,hn),e))return p=!1,!1});return p&&t.size===d}function X(t,e){if(!(this instanceof X))return new X(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(zn)return zn;zn=this}}function K(t,e){if(!t)throw new Error(e)}function $(t,e,n){if(!(this instanceof $))return new $(t,e,n);if(K(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e>>1&1073741824|3221225471&t}function it(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return ot(n)}if("string"===e)return t.length>Un?at(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ut(t);if("function"==typeof t.toString)return st(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=Qn[t];return void 0===e&&(e=st(t),Yn===_n&&(Yn=0,Qn={}),Yn++,Qn[t]=e),e}function st(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function lt(t){K(t!==1/0,"Cannot perform this action with an infinite size.")}function pt(t){return null===t||void 0===t?It():dt(t)&&!c(t)?t:It().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function dt(t){return!(!t||!t[Pn])}function ft(t,e){this.ownerID=t,this.entries=e}function Mt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function gt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function ht(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Nt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&jt(t._root)}function mt(t,e){return I(t,e[0],e[1])}function jt(t,e){return{node:t,index:0,__prev:e}}function Dt(t,e,n,r){var o=Object.create(Bn);return o.size=t,o._root=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function It(){return Rn||(Rn=Dt(0))}function wt(t,e,n){var r,o;if(t._root){var i=l(yn),a=l(Nn);if(r=vt(t._root,t.__ownerID,0,void 0,e,n,i,a),!a.value)return t;o=t.size+(i.value?n===hn?-1:1:0)}else{if(n===hn)return t;o=1,r=new ft(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Dt(o,r):It()}function vt(t,e,n,r,o,i,a,s){return t?t.update(e,n,r,o,i,a,s):i===hn?t:(p(s),p(a),new yt(e,r,[o,i]))}function Lt(t){return t.constructor===yt||t.constructor===ht}function bt(t,e,n,r,o){if(t.keyHash===r)return new ht(e,r,[t.entry,o]);var i,a=(0===n?t.keyHash:t.keyHash>>>n)&gn,s=(0===n?r:r>>>n)&gn;return new Mt(e,1<>>=1)a[s]=1&n?e[i++]:void 0;return a[r]=o,new gt(t,i+1,a)}function Et(t,e,r){for(var o=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ut(t,e,n,r){var o=r?t:f(t);return o[e]=n,o}function _t(t,e,n,r){var o=t.length+1;if(r&&e+1===o)return t[e]=n,t;for(var i=new Array(o),a=0,s=0;s0&&oi?0:i-n,c=a-n;return c>Mn&&(c=Mn),function(){if(o===c)return Jn;var t=e?--c:o++;return r&&r[t]}}function o(t,r,o){var s,u=t&&t.array,c=o>i?0:i-o>>r,l=1+(a-o>>r);return l>Mn&&(l=Mn),function(){for(;;){if(s){var t=s();if(t!==Jn)return t;s=null}if(c===l)return Jn;var i=e?--l:c++;s=n(u&&u[i],r-fn,o+(i<=t.size||e<0)return t.withMutations(function(t){e<0?Jt(t,e).set(0,n):Jt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,o=t._root,i=l(Nn);return e>=Xt(t._capacity)?r=Ht(r,t.__ownerID,0,e,n,i):o=Ht(o,t.__ownerID,t._level,e,n,i),i.value?t.__ownerID?(t._root=o,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Gt(t._origin,t._capacity,t._level,o,r):t}function Ht(t,e,n,r,o,i){var a=r>>>n&gn,s=t&&a0){var c=t&&t.array[a],l=Ht(c,e,n-fn,r,o,i);return l===c?t:(u=Ft(t,e),u.array[a]=l,u)}return s&&t.array[a]===o?t:(p(i),u=Ft(t,e),void 0===o&&a===u.array.length-1?u.array.pop():u.array[a]=o,u)}function Ft(t,e){return e&&t&&e===t.ownerID?t:new Bt(t?t.array.slice():[],e)}function Vt(t,e){if(e>=Xt(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&gn],r-=fn;return n}}function Jt(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new d,o=t._origin,i=t._capacity,a=o+e,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,l=0;a+l<0;)c=new Bt(c&&c.array.length?[void 0,c]:[],r),u+=fn,l+=1<=1<p?new Bt([],r):M;if(M&&f>p&&afn;y-=fn){var N=p>>>y&gn;h=h.array[N]=Ft(h.array[N],r)}h.array[p>>>fn&gn]=M}if(s=f)a-=f,s-=f,u=fn,c=null,g=g&&g.removeBefore(r,0,a);else if(a>o||f >>u&gn;if(m!==f>>>u&gn)break;m&&(l+=(1<o&&(c=c.removeBefore(r,u,a-l)),c&&f
a&&(a=c.size),i(u)||(c=c.map(function(t){return W(t)})),o.push(c)}return a>t.size&&(t=t.setSize(a)),St(t,e,o)}function Xt(t){return t>>fn<=Mn&&a.size>=2*i.size?(o=a.filter(function(t,e){return void 0!==t&&s!==e}),r=o.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=i.remove(e),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=i,o=a.set(s,[e,n])}else r=i.set(e,a.size),o=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t):te(r,o)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function se(t){var e=Ce(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Te,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===Dn){var r=t.__iterator(e,n);return new D(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===jn?mn:jn,n)},e}function ue(t,e,n){var r=Ce(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,o){var i=t.get(r,hn);return i===hn?o:e.call(n,i,r,t)},r.__iterateUncached=function(r,o){var i=this;return t.__iterate(function(t,o,a){return!1!==r(e.call(n,t,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=t.__iterator(Dn,o);return new D(function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return I(r,s,e.call(n,a[1],s,t),o)})},r}function ce(t,e){var n=Ce(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=se(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Te,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function le(t,e,n,r){var o=Ce(t);return r&&(o.has=function(r){var o=t.get(r,hn);return o!==hn&&!!e.call(n,o,r,t)},o.get=function(r,o){var i=t.get(r,hn);return i!==hn&&e.call(n,i,r,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return t.__iterate(function(t,i,u){if(e.call(n,t,i,u))return s++,o(t,r?i:s-1,a)},i),s},o.__iteratorUncached=function(o,i){var a=t.__iterator(Dn,i),s=0;return new D(function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,c=u[0],l=u[1];if(e.call(n,l,c,t))return I(o,r?c:s++,l,i)}})},o}function pe(t,e,n){var r=pt().asMutable();return t.__iterate(function(o,i){r.update(e.call(n,o,i,t),0,function(t){return t+1})}),r.asImmutable()}function de(t,e,n){var r=a(t),o=(c(t)?Kt():pt()).asMutable();t.__iterate(function(i,a){o.update(e.call(n,i,a,t),function(t){return t=t||[],t.push(r?[a,i]:i),t})});var i=ze(t);return o.map(function(e){return ve(t,i(e))})}function fe(t,e,n,r){var o=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=o:n|=0),y(e,n,o))return t;var i=N(e,o),a=m(n,o);if(i!==i||a!==a)return fe(t.toSeq().cacheResult(),e,n,r);var s,u=a-i;u===u&&(s=u<0?0:u);var c=Ce(t);return c.size=0===s?s:t.size&&s||void 0,!r&&_(t)&&s>=0&&(c.get=function(e,n){return e=g(this,e),e>=0&&es)return w();var t=o.next();return r||e===jn?t:e===mn?I(e,u-1,void 0,t):I(e,u-1,t.value[1],t)})},c}function Me(t,e,n){var r=Ce(t);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)&&++a&&r(t,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=t.__iterator(Dn,o),s=!0;return new D(function(){if(!s)return w();var t=a.next();if(t.done)return t;var o=t.value,u=o[0],c=o[1];return e.call(n,c,u,i)?r===Dn?t:I(r,u,c,t):(s=!1,w())})},r}function ge(t,e,n,r){var o=Ce(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return t.__iterate(function(t,i,c){if(!s||!(s=e.call(n,t,i,c)))return u++,o(t,r?i:u-1,a)}),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=t.__iterator(Dn,i),u=!0,c=0;return new D(function(){var t,i,l;do{if(t=s.next(),t.done)return r||o===jn?t:o===mn?I(o,c++,void 0,t):I(o,c++,t.value[1],t);var p=t.value;i=p[0],l=p[1],u&&(u=e.call(n,l,i,a))}while(u);return o===Dn?t:I(o,i,l,t)})},o}function he(t,e){var r=a(t),o=[t].concat(e).map(function(t){return i(t)?r&&(t=n(t)):t=r?Q(t):P(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===o.length)return t;if(1===o.length){var u=o[0];if(u===t||r&&a(u)||s(t)&&s(u))return u}var c=new S(o);return r?c=c.toKeyedSeq():s(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=o.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function ye(t,e,n){var r=Ce(t);return r.__iterateUncached=function(r,o){function a(t,c){var l=this;t.__iterate(function(t,o){return(!e||c0}function we(t,n,r){var o=Ce(t);return o.size=new S(r).map(function(t){return t.size}).min(),o.__iterate=function(t,e){for(var n,r=this.__iterator(jn,e),o=0;!(n=r.next()).done&&!1!==t(n.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map(function(t){return t=e(t),b(o?t.reverse():t)}),a=0,s=!1;return new D(function(){var e;return s||(e=i.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?w():I(t,a++,n.apply(null,e.map(function(t){return t.value})))})},o}function ve(t,e){return _(t)?e:t.constructor(e)}function Le(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function be(t){return lt(t.size),M(t)}function ze(t){return a(t)?n:s(t)?r:o}function Ce(t){return Object.create((a(t)?E:s(t)?x:k).prototype)}function Te(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):T.prototype.cacheResult.call(this)}function Ee(t,e){return t>e?1:te?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0;return an(t.__iterate(n?e?function(t,e){r=31*r+sn(it(t),it(e))|0}:function(t,e){r=r+sn(it(t),it(e))|0}:e?function(t){r=31*r+it(t)|0}:function(t){r=r+it(t)|0}),r)}function an(t,e){return e=En(e,3432918353),e=En(e<<15|e>>>-15,461845907),e=En(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=En(e^e>>>16,2246822507),e=En(e^e>>>13,3266489909),e=ot(e^e>>>16)}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var un=Array.prototype.slice;t(n,e),t(r,e),t(o,e),e.isIterable=i,e.isKeyed=a,e.isIndexed=s,e.isAssociative=u,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=o;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",fn=5,Mn=1<r?w():I(t,o,n[e?r-o++:o++])})},t(O,E),O.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},O.prototype.has=function(t){return this._object.hasOwnProperty(t)},O.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[e?o-i:i];if(!1===t(n[a],a,this))return i+1}return i},O.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,o=r.length-1,i=0;return new D(function(){var a=r[e?o-i:i];return i++>o?w():I(t,a,n[a])})},O.prototype[dn]=!0,t(A,x),A.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=b(n),o=0;if(L(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,o++,this););return o},A.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=b(n);if(!L(r))return new D(w);var o=0;return new D(function(){var e=r.next();return e.done?e:I(t,o++,e.value)})},t(U,x),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,o=0;o=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return I(t,o,r[o++])})};var bn;t(X,x),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(t,e){return this.has(t)?this._value:e},X.prototype.includes=function(t){return J(this._value,t)},X.prototype.slice=function(t,e){var n=this.size;return y(t,e,n)?this:new X(this._value,m(e,n)-N(t,n))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(t){return J(this._value,t)?0:-1},X.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},X.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=0&&nn?w():I(t,i++,a)})},$.prototype.equals=function(t){return t instanceof $?this._start===t._start&&this._end===t._end&&this._step===t._step:q(this,t)};var Cn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var Tn,En="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},xn=Object.isExtensible,kn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Sn="function"==typeof WeakMap;Sn&&(Tn=new WeakMap);var On=0,An="__immutablehash__";"function"==typeof Symbol&&(An=Symbol(An));var Un=16,_n=255,Yn=0,Qn={};t(pt,et),pt.of=function(){var t=un.call(arguments,0);return It().withMutations(function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},pt.prototype.toString=function(){return this.__toString("Map {","}")},pt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},pt.prototype.set=function(t,e){return wt(this,t,e)},pt.prototype.setIn=function(t,e){return this.updateIn(t,hn,function(){return e})},pt.prototype.remove=function(t){return wt(this,t,hn)},pt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hn})},pt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},pt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Ot(this,xe(t),e,n);return r===hn?void 0:r},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):It()},pt.prototype.merge=function(){return Et(this,void 0,arguments)},pt.prototype.mergeWith=function(t){return Et(this,t,un.call(arguments,1))},pt.prototype.mergeIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,It(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},pt.prototype.mergeDeep=function(){return Et(this,xt,arguments)},pt.prototype.mergeDeepWith=function(t){var e=un.call(arguments,1);return Et(this,kt(t),e)},pt.prototype.mergeDeepIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,It(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},pt.prototype.sort=function(t){return Kt(je(this,t))},pt.prototype.sortBy=function(t,e){return Kt(je(this,e,t))},pt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},pt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},pt.prototype.asImmutable=function(){return this.__ensureOwner()},pt.prototype.wasAltered=function(){return this.__altered},pt.prototype.__iterator=function(t,e){return new Nt(this,t,e)},pt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Dt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},pt.isMap=dt;var Pn="@@__IMMUTABLE_MAP__@@",Bn=pt.prototype;Bn[Pn]=!0,Bn.delete=Bn.remove,Bn.removeIn=Bn.deleteIn,ft.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i=Gn)return zt(t,u,r,o);var M=t&&t===this.ownerID,g=M?u:f(u);return d?s?c===l-1?g.pop():g[c]=g.pop():g[c]=[r,o]:g.push([r,o]),M?(this.entries=g,this):new ft(t,g)}},Mt.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var o=1<<((0===t?e:e>>>t)&gn),i=this.bitmap;return 0==(i&o)?r:this.nodes[At(i&o-1)].get(t+fn,e,n,r)},Mt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=it(r));var s=(0===e?n:n>>>e)&gn,u=1<=Zn)return Tt(t,d,c,s,M);if(l&&!M&&2===d.length&&Lt(d[1^p]))return d[1^p];if(l&&M&&1===d.length&&Lt(M))return M;var g=t&&t===this.ownerID,h=l?M?c:c^u:c|u,y=l?M?Ut(d,p,M,g):Yt(d,p,g):_t(d,p,M,g);return g?(this.bitmap=h,this.nodes=y,this):new Mt(t,h,y)},gt.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var o=(0===t?e:e>>>t)&gn,i=this.nodes[o];return i?i.get(t+fn,e,n,r):r},gt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=it(r));var s=(0===e?n:n>>>e)&gn,u=o===hn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=vt(l,t,e+fn,n,r,o,i,a);if(p===l)return this;var d=this.count;if(l){if(!p&&--d=0&&t>>e&gn;if(r>=this.array.length)return new Bt([],t);var o,i=0===r;if(e>0){var a=this.array[r];if((o=a&&a.removeBefore(t,e-fn,n))===a&&i)return this}if(i&&!o)return this;var s=Ft(this,t);if(!i)for(var u=0;u>>e&gn;if(r>=this.array.length)return this;var o;if(e>0){var i=this.array[r];if((o=i&&i.removeAfter(t,e-fn,n))===i&&r===this.array.length-1)return this}var a=Ft(this,t);return a.array.splice(r+1),o&&(a.array[r]=o),a};var Vn,Jn={};t(Kt,pt),Kt.of=function(){return this(arguments)},Kt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Kt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Kt.prototype.set=function(t,e){return ne(this,t,e)},Kt.prototype.remove=function(t){return ne(this,t,hn)},Kt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Kt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Kt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Kt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Kt.isOrderedMap=$t,Kt.prototype[dn]=!0,Kt.prototype.delete=Kt.prototype.remove;var qn;t(re,E),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=ue(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?be(this):0,function(o){return t(o,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(jn,e),r=e?be(this):0;return new D(function(){var o=n.next();return o.done?o:I(t,e?--r:r++,o.value,o)})},re.prototype[dn]=!0,t(oe,x),oe.prototype.includes=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(jn,e),r=0;return new D(function(){var e=n.next();return e.done?e:I(t,r++,e.value,e)})},t(ie,k),ie.prototype.has=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(jn,e);return new D(function(){var e=n.next();return e.done?e:I(t,e.value,e.value,e)})},t(ae,E),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Le(e);var r=i(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(jn,e);return new D(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Le(r);var o=i(r);return I(t,o?r.get(0):r[0],o?r.get(1):r[1],e)}}})},oe.prototype.cacheResult=re.prototype.cacheResult=ie.prototype.cacheResult=ae.prototype.cacheResult=Te,t(ke,et),ke.prototype.toString=function(){return this.__toString(Oe(this)+" {","}")},ke.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},ke.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},ke.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Se(this,It()))},ke.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Oe(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Se(this,n)},ke.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Se(this,e)},ke.prototype.wasAltered=function(){return this._map.wasAltered()},ke.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},ke.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},ke.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Se(this,e,t):(this.__ownerID=t,this._map=e,this)};var Xn=ke.prototype;Xn.delete=Xn.remove,Xn.deleteIn=Xn.removeIn=Bn.removeIn,Xn.merge=Bn.merge,Xn.mergeWith=Bn.mergeWith,Xn.mergeIn=Bn.mergeIn,Xn.mergeDeep=Bn.mergeDeep,Xn.mergeDeepWith=Bn.mergeDeepWith,Xn.mergeDeepIn=Bn.mergeDeepIn,Xn.setIn=Bn.setIn,Xn.update=Bn.update,Xn.updateIn=Bn.updateIn,Xn.withMutations=Bn.withMutations,Xn.asMutable=Bn.asMutable,Xn.asImmutable=Bn.asImmutable,t(_e,rt),_e.of=function(){return this(arguments)},_e.fromKeys=function(t){return this(n(t).keySeq())},_e.prototype.toString=function(){return this.__toString("Set {","}")},_e.prototype.has=function(t){return this._map.has(t)},_e.prototype.add=function(t){return Qe(this,this._map.set(t,!0))},_e.prototype.remove=function(t){return Qe(this,this._map.remove(t))},_e.prototype.clear=function(){return Qe(this,this._map.clear())},_e.prototype.union=function(){var t=un.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ve(t,e)},He.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;lt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ve(e,n)},He.prototype.pop=function(){return this.slice(1)},He.prototype.unshift=function(){return this.push.apply(this,arguments)},He.prototype.unshiftAll=function(t){return this.pushAll(t)},He.prototype.shift=function(){return this.pop.apply(this,arguments)},He.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Je()},He.prototype.slice=function(t,e){if(y(t,e,this.size))return this;var n=N(t,this.size);if(m(e,this.size)!==this.size)return nt.prototype.slice.call(this,t,e);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ve(r,o)},He.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ve(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},He.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},He.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new D(function(){if(r){var e=r.value;return r=r.next,I(t,n++,e)}return w()})},He.isStack=Fe;var rr="@@__IMMUTABLE_STACK__@@",or=He.prototype;or[rr]=!0,or.withMutations=Bn.withMutations,or.asMutable=Bn.asMutable,or.asImmutable=Bn.asImmutable,or.wasAltered=Bn.wasAltered;var ir;e.Iterator=D,qe(e,{toArray:function(){lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new oe(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return pt(this.toKeyedSeq())},toObject:function(){lt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Kt(this.toKeyedSeq())},toOrderedSet:function(){return Re(a(this)?this.valueSeq():this)},toSet:function(){return _e(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ie(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return He(a(this)?this.valueSeq():this)},toList:function(){return Qt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return ve(this,he(this,un.call(arguments,0)))},includes:function(t){return this.some(function(e){return J(e,t)})},entries:function(){return this.__iterator(Dn)},every:function(t,e){lt(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!t.call(e,r,o,i))return n=!1,!1}),n},filter:function(t,e){return ve(this,le(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(mn)},map:function(t,e){return ve(this,ue(this,t,e))},reduce:function(t,e,n){lt(this.size);var r,o;return arguments.length<2?o=!0:r=e,this.__iterate(function(e,i,a){o?(o=!1,r=e):r=t.call(n,r,e,i,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return ve(this,ce(this,!0))},slice:function(t,e){return ve(this,fe(this,t,e,!0))},some:function(t,e){return!this.every($e(t),e)},sort:function(t){return ve(this,je(this,t))},values:function(){return this.__iterator(jn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return M(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return pe(this,t,e)},equals:function(t){return q(this,t)},entrySeq:function(){var t=this;if(t._cache)return new S(t._cache);var e=t.toSeq().map(Ke).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter($e(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,o,i){if(t.call(e,n,o,i))return r=[o,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(h)},flatMap:function(t,e){return ve(this,Ne(this,t,e))},flatten:function(t){return ve(this,ye(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return J(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,o=xe(t);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,hn):hn)===hn)return e}return r},groupBy:function(t,e){return de(this,t,e)},has:function(t){return this.get(t,hn)!==hn},hasIn:function(t){return this.getIn(t,hn)!==hn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},keySeq:function(){return this.toSeq().map(Xe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return De(this,t)},maxBy:function(t,e){return De(this,e,t)},min:function(t){return De(this,t?tn(t):rn)},minBy:function(t,e){return De(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return ve(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return ve(this,ge(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile($e(t),e)},sortBy:function(t,e){return ve(this,je(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return ve(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return ve(this,Me(this,t,e))},takeUntil:function(t,e){return this.takeWhile($e(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=e.prototype;ar[cn]=!0,ar[vn]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=en,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,qe(n,{flip:function(){return ve(this,se(this))},mapEntries:function(t,e){var n=this,r=0;return ve(this,this.toSeq().map(function(o,i){return t.call(e,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return ve(this,this.toSeq().flip().map(function(r,o){return t.call(e,r,o,n)}).flip())}});var sr=n.prototype;return sr[ln]=!0,sr[vn]=ar.entries,sr.__toJS=ar.toObject,sr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},qe(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return ve(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ve(this,ce(this,!1))},slice:function(t,e){return ve(this,fe(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=N(t,t<0?this.count():this.size);var r=this.slice(0,t);return ve(this,1===n?r:r.concat(f(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return ve(this,ye(this,t,!1))},get:function(t,e){return t=g(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=g(this,t))>=0&&(void 0!==this.size?this.size===1/0||t2?n-2:0),o=2;o2?o-2:0),a=2;a3&&void 0!==arguments[3]?arguments[3]:"";Object.keys(n).forEach(function(o){e.hasOwnProperty(o)?"object"===I(n[o])&&s(t,e[o],n[o],""+r+o+"."):y.warn(t,"language does not have property "+r+o)})}function u(t,e,r){n.i(D.a)({method:"registerLanguageDictionary",url:y.languageBaseUrl(t)+"/js/lock/11.32.2/"+e+".js",check:function(t){return t&&t===e},cb:function(t,e,n){r(t,n)}})}function c(t,e){b[t]=f.a.fromJS(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.str=r,e.html=o,e.group=i,e.initI18n=a;var l=n(0),p=n.n(l),d=n(11),f=n.n(d),M=n(120),g=n(77),h=(n.n(g),n(28)),y=n(1),N=n(20),m=n(200),j=n.n(m),D=n(76),I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w=n.i(N.a)(["i18n"]),v=w.get,L=w.set,b=[];"undefined"!=typeof window&&n.i(D.b)({method:"registerLanguageDictionary",cb:c})},function(t,e,n){"use strict";function r(t,e){return x(t,w.a.fromJS(o(e)))}function o(t){var e=t.defaultEnterpriseConnection;return void 0!=e&&"string"!=typeof e&&(v.warn(t,"The `defaultEnterpriseConnection` option will be ignored, because it is not a string."),e=void 0),void 0===e?{}:{defaultConnectionName:e}}function i(t){var e=a(t);return e&&f(t,e)}function a(t){return E(t,"defaultConnectionName")}function s(t){if(j(t)){return u(t,k(t,"hrdEmail",""))||M(t)}return i(t)||f(t)}function u(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=n.i(b.a)(e);return!!o&&v.connections.apply(v,[t,"enterprise"].concat(r)).find(function(t){return t.get("domains").contains(o)})}function c(t,e){return!!u(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function l(t){return y(t)?v.connections(t,"enterprise").getIn([0,"domains",0]):n.i(b.a)(k(t,"hrdEmail"))}function p(t){return!d(t)&&v.hasOneConnection(t,"enterprise")?v.connections(t,"enterprise").get(0):null}function d(t){return v.hasSomeConnections(t,"enterprise","ad","auth0-adldap")}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return v.connections(t,"enterprise","ad","auth0-adldap").find(function(t){return t.get("domains").isEmpty()&&(!e||t.get("name")===e)})}function M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return v.connections(t,"enterprise","ad","auth0-adldap").find(function(t){return!e||t.get("name")===e})}function g(t){return void 0!==h(t)}function h(t){var e=t.getIn(["sso","connection"]),n=t.getIn(["sso","strategy"]);return e&&n&&w.a.Map({name:e,strategy:n})}function y(t){return d(t)&&1===v.connections(t).count()}function N(t,e){return c(t,e,["ad","auth0-adldap"])}function m(t,e){if(e){var r=v.defaultADUsernameFromEmailPrefix(t)?n.i(b.b)(e):e;t=n.i(z.a)(t,r,"username",!1),t=O(t,"hrdEmail",e)}else{var o=k(t,"hrdEmail");o&&(t=n.i(z.a)(t,o,"email",!1)),t=S(t,"hrdEmail")}return O(t,"hrd",!!e)}function j(t){return k(t,"hrd",y(t))}function D(t,e){return!!(!n.i(b.c)(e)||v.hasSomeConnections(t,"database")||v.hasSomeConnections(t,"passwordless")||f(t)||n.i(C.a)(t,e))}n.d(e,"a",function(){return U}),e.f=r,e.e=i,e.d=a,e.n=s,e.m=u,e.b=c,e.p=l,e.h=p,e.c=d,e.j=f,e.g=g,e.r=h,e.q=y,e.k=N,e.l=m,e.i=j,e.o=D;var I=n(11),w=n.n(I),v=n(1),L=(n(3),n(20)),b=n(19),z=n(71),C=n(34),T=(n(10),n(8),n.i(L.a)(["enterprise"])),E=T.get,x=T.initNS,k=T.tget,S=T.tremove,O=T.tset,A=n.i(L.a)(["core"]),U=(A.tremove,A.tset,A.tget,{ad:"AD / LDAP",adfs:"ADFS","auth0-adldap":"AD/LDAP","auth0-oidc":"Auth0 OpenID Connect",custom:"Custom Auth","google-apps":"Google Apps",ip:"IP Address",mscrm:"Dynamics CRM",office365:"Office365",pingfederate:"Ping Federate",samlp:"SAML",sharepoint:"SharePoint Apps",waad:"Windows Azure AD",oidc:"OpenID Connect"})},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=(n(1),n(12)),i=n(10),a=function(){function t(e){r(this,t),this.name=e}return t.prototype.backHandler=function(){return null},t.prototype.escHandler=function(){return null},t.prototype.submitButtonLabel=function(t){return o.str(t,["submitLabel"])},t.prototype.isFirstScreen=function(t){var e=n.i(i.k)(t),r=this.name.split("."),o=r[1]||r[0];return!("signUp"!==o||!n.i(i.i)(t,"login"))||-1!==[e,"loading","lastLogin"].indexOf(o)},t.prototype.getTitle=function(t){return"loading"===this.name?"":this.getScreenTitle(t)||o.str(t,"title")},t.prototype.getScreenTitle=function(t){return o.str(t,"title")},t.prototype.submitHandler=function(){return null},t.prototype.isSubmitDisabled=function(t){return!1},t.prototype.renderAuxiliaryPane=function(){return null},t.prototype.renderTabs=function(){return!1},t.prototype.renderTerms=function(){return null},t}();e.a=a},function(t,e,n){"use strict";function r(t,e,r,o,i,a,s){var u=w.setup(t,e,r,o,i,a,s);return u=n.i(I.a)(u),n.i(v.a)(w.ui.logo(u)||L.a.logo),j.a.setupClient(t,e,r,w.withAuthOptions(u,z({},o,{popupOptions:w.ui.popupOptions(u)}))),u=w.runHook(u,"didInitialize",o),n.i(D.b)(D.f,"lock",t,u),u}function o(){var t=n.i(D.d)(D.g,"lock"),e=t.filter(function(t){return!w.hashCleanup(t)}).size>0,r=window.location.href.split("#")[0],o=function(t,n){!(!t&&!n)&&!e&&window.history.replaceState(null,"",r)};i(window.location.hash,o)}function i(t,e){n.i(D.d)(D.g,"lock").forEach(function(n){return w.auth.redirect(n)&&a(n,t,e)})}function a(t,e,n){j.a.parseHash(w.id(t),e,function(e,r){e?w.emitHashParsedEvent(t,e):w.emitHashParsedEvent(t,r),e?w.emitAuthorizationErrorEvent(t,e):r&&w.emitAuthenticatedEvent(t,r),n(e,r)})}function s(t,e){var r=n.i(D.d)(D.e,"lock",t);if(!r)throw new Error("The Lock can't be opened again after it has been destroyed");if(w.rendering(r))return!1;if(e.flashMessage){var o=["error","success","info"];if(!e.flashMessage.type||-1===o.indexOf(e.flashMessage.type))return w.emitUnrecoverableErrorEvent(r,"'flashMessage' must provide a valid type ['error','success','info']");if(!e.flashMessage.text)return w.emitUnrecoverableErrorEvent(r,"'flashMessage' must provide a text")}return w.emitEvent(r,"show"),n.i(D.b)(D.c,"lock",t,function(t){return t=w.overrideOptions(t,e),t=w.filterConnections(t),t=w.runHook(t,"willShow",e),w.render(t)}),!0}function u(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=n.i(D.d)(D.e,"lock",t);(w.ui.closable(o)||e)&&w.rendering(o)&&(w.emitEvent(o,"hide"),w.ui.appendContainer(o)?(n.i(D.b)(D.c,"lock",t,w.stopRendering),setTimeout(function(){n.i(D.b)(D.c,"lock",t,function(t){return t=n.i(b.a)(t),t=w.reset(t),t=n.i(b.b)(t)}),o=n.i(D.d)(D.e,"lock",t),r(o)},1e3)):(n.i(D.b)(D.c,"lock",t,function(t){return t=n.i(b.a)(t),t=w.reset(t),t=n.i(b.b)(t)}),r(o)))}function c(t){n.i(D.b)(D.c,"lock",t,w.stopRendering),n.i(D.b)(D.h,"lock",t)}function l(t,e){return n.i(D.b)(D.c,"lock",t,e)}function p(t){n.i(D.d)(D.e,"lock",t).get("isLoadingPanePinned")||n.i(D.b)(D.c,"lock",t,function(t){return t.set("isLoadingPanePinned",!0)})}function d(t){n.i(D.b)(D.c,"lock",t,function(t){return t.set("isLoadingPanePinned",!1)})}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];n.i(D.b)(D.c,"lock",t,function(t){return e.reduce(function(e,r){return e&&n.i(b.i)(t,r)},!0)?w.setSubmitting(t,!0):e.reduce(function(t,e){return n.i(b.j)(t,e)},t)});var o=n.i(D.d)(D.e,"lock",t);w.submitting(o)&&r(o)}function M(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(t,e,n,r){return r()};f(t,e,function(o){try{w.runHook(o,"loggingIn",null,function(){j.a.logIn(t,n,w.auth.params(o).toJS(),function(n,o){n?setTimeout(function(){return y(t,e,n,r)},250):h(t,o)})})}catch(n){setTimeout(function(){return y(t,e,n,r)},250)}})}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.i(D.d)(D.e,"lock",t);n.i(D.b)(D.c,"lock",t,function(t){return w.setSubmitting(t,!0)}),j.a.checkSession(t,e,function(e,n){return e?y(t,[],e):h(t,n)})}function h(t,e){var r=n.i(D.d)(D.e,"lock",t);w.ui.autoclose(r)?u(t,!1,function(t){return w.emitAuthenticatedEvent(t,e)}):(n.i(D.b)(D.c,"lock",t,function(t){return t=w.setSubmitting(t,!1),w.setLoggedIn(t,!0)}),w.emitAuthenticatedEvent(r,e))}function y(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(t,e,n,r){return r()},i=r.error||r.code;o(t,r,e,function(){return setTimeout(function(){var o=n.i(D.d)(D.e,"lock",t),a=w.loginErrorMessage(o,r,N(e));["blocked_user","rule_error","lock.unauthorized","invalid_user_password","login_required"].indexOf(i)>-1&&w.emitAuthorizationErrorEvent(o,r),n.i(D.b)(D.c,"lock",t,w.setSubmitting,!1,a)},0)}),n.i(D.b)(D.c,"lock",t,w.setSubmitting,!1)}function N(t){if(t)return~t.indexOf("vcode")?"code":~t.indexOf("username")?"username":~t.indexOf("email")?"email":void 0}e.a=r,e.b=o,e.d=i,e.e=s,e.c=u,e.f=c,e.g=l,e.l=p,e.m=d,e.i=f,e.h=M,e.k=g,e.j=h;var m=n(11),j=(n.n(m),n(26)),D=n(8),I=n(177),w=n(1),v=n(121),L=n(116),b=n(3),z=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return e.closeHandler=d.c,e.key="auxiliarypane",e.lock=t,f.loggedIn(t)?l.a.createElement(g,e):null}e.a=a;var s=n(4),u=n.n(s),c=n(0),l=n.n(c),p=n(56),d=n(16),f=n(1),M=n(12),g=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.handleClose=function(){var t=this.props,e=t.closeHandler,n=t.lock;e(f.id(n))},e.prototype.render=function(){var t=this.props.lock,e=f.ui.closable(t)?this.handleClose.bind(this):void 0;return l.a.createElement(p.a,{lock:t,closeHandler:e},l.a.createElement("p",null,M.html(t,["success","logIn"])))},e}(l.a.Component);g.propTypes={closeHandler:u.a.func.isRequired,lock:u.a.object.isRequired}},function(t,e,n){"use strict";function r(t){return o(t,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}function o(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof t)return!1;var n=c()(t);return e?p()(t):n.indexOf("@")>=0&&n.indexOf(".")>=0&&-1===n.indexOf(" ")}function i(t,e){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n.i(d.e)(t,"email",e,function(e){var i=n.i(f.o)(t,e);return{valid:r(e,o)&&i,hint:i?void 0:M.html(t,["error","login","hrd.not_matching_email"])}})}function a(t){return o(t)?t.split("@")[1].toLowerCase():""}function s(t){var e=a(t);return e?t.slice(0,-1-e.length):t}e.e=r,e.c=o,e.d=i,e.a=a,e.b=s;var u=n(31),c=n.n(u),l=n(357),p=n.n(l),d=n(3),f=n(13),M=n(12)},function(t,e,n){"use strict";function r(t){function e(t,e){return t.concat("object"===(void 0===e?"undefined":i(e))?e:[e])}function n(t){return function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return n.getIn(e(t,r),o)}}function r(t){return function(n,r,o){return n.setIn(e(t,r),o)}}function a(t){return function(n,r){return n.removeIn(e(t,r))}}var s=t.concat(["transient"]);return{get:n(t),set:r(t),remove:a(t),tget:n(s),tset:r(s),tremove:a(s),reset:function(t){return t.map(function(t){return o.Map.isMap(t)?t.remove("transient"):t})},init:function(e,n){return new o.Map({id:e}).setIn(t,n)},initNS:function(e,n){return e.setIn(t,n)}}}e.a=r;var o=n(11),i=(n.n(o),"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})},function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o},function(t,e,n){"use strict";function r(){C.ReactReconcileTransaction&&I||l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=C.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,o,i,a){return r(),I.batchedUpdates(t,e,n,o,i,a)}function a(t,e){return t._mountOrder-e._mountOrder}function s(t){var e=t.dirtyComponentsLength;e!==N.length&&l("124",e,N.length),N.sort(a),m++;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2];return this.clients[t].parseHash(e,n)},t.prototype.getUserInfo=function(t,e,n){return this.clients[t].getUserInfo(e,n)},t.prototype.getProfile=function(t,e,n){return this.clients[t].getProfile(e,n)},t.prototype.getChallenge=function(t,e){return this.clients[t].getChallenge(e)},t.prototype.getSSOData=function(t){for(var e,n=arguments.length,r=Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]&&arguments[1],r=n.i(j.d)(j.e,"lock",t),o=n.i(L.l)(r)?"email":"username",i=v.c(r,o),a={connection:n.i(L.m)(r),username:i,password:v.c(r,"password")},s=[o,"password"];if(!n.i(z.a)(r,a,s))return n.i(z.b)(r,t);var u=v.c(r,"mfa_code");e&&(a.mfa_code=u,s.push("mfa_code")),n.i(I.h)(t,s,a,function(t,e,r,o){if("a0.mfa_required"===e.error)return N(t);if(e){var i=e&&"invalid_captcha"===e.code;return n.i(z.c)(t,i,o)}o()})}function o(t){for(var e="",n="abcdefghijklmnopqrstuvwxyz0123456789",r=n.length,o=0;o3?o-3:0),s=3;s1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:["password"];n.i(j.b)(j.c,"lock",t,L.s,"login",e)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["password"];n.i(j.b)(j.c,"lock",t,L.s,"signUp",e)}function M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["password"];n.i(j.b)(j.c,"lock",t,L.s,"forgotPassword",e)}function g(t){return d(t)}function h(t){return d(t)}function y(t){n.i(j.b)(j.c,"lock",t,L.t)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["mfa_code"];n.i(j.b)(j.c,"lock",t,L.s,"mfaLogin",e)}e.a=r,e.c=i,e.e=s,e.i=c,e.f=d,e.g=f,e.j=M,e.h=g,e.b=h,e.d=y;var m=n(11),j=(n.n(m),n(8)),D=n(26),I=n(16),w=n(1),v=n(3),L=n(10),b=n(12),z=n(40)},function(t,e,n){"use strict";function r(t,e){return"ok"===g(t,e)}function o(t){var e=N(d(t,[],n.i(s.Map)()));return e.length>0&&e.reduce(function(e,n){return e&&!i(t,n)},!0)}function i(t,e){return["loading","pending","waiting"].indexOf(g(t,e))>-1}function a(t,e,n){var r=h(t,e,"error");if("sso"!==e){var o=new Error("An error occurred when fetching "+e+" data for Lock: "+n.message);o.code="sync",o.origin=n,r=c.stop(r,o)}return r}n.d(e,"a",function(){return j}),e.b=r,e.c=o;var s=n(11),u=(n.n(s),n(20)),c=n(1),l=n(8),p=n.i(u.a)(["sync"]),d=p.get,f=p.set;e.d=function(t,e,r){if(void 0!==d(t,e))return t;var o=r.waitFn?"waiting":!r.conditionFn||r.conditionFn(t)?"pending":"no";return f(t,e,n.i(s.Map)({conditionFn:r.conditionFn,errorFn:r.errorFn,recoverResult:r.recoverResult,syncStatus:o,successFn:r.successFn,syncFn:r.syncFn,timeout:r.timeout||6e3,waitFn:r.waitFn}))};var M=function(t){return(window.Array.isArray(t)?t:[t]).concat(["syncStatus"])},g=function(t,e){return d(t,M(e))},h=function(t,e,n){return f(t,M(e),n)},y=function(t,e,n){return d(t,e).get(n)},N=function t(e){return e.reduce(function(e,n,r){var o=s.Map.isMap(n)&&n.has("syncStatus")?[r]:[],i=s.Map.isMap(n)?t(n).map(function(t){return[r].concat(t)}):[];return e.concat.apply(e,[o].concat([i]))},[])},m=function(t,e){return N(d(t,[],n.i(s.Map)())).reduce(function(t,r){if("function"!=typeof y(t,r,"syncFn"))return t;if("pending"===g(t,r)){t=h(t,r,"loading");var o=!1;y(t,r,"syncFn")(t,function(i,s){o||(o=!0,setTimeout(function(){n.i(l.b)(l.c,"lock",e,function(e){var n=y(t,r,"errorFn");i&&"function"==typeof n&&setTimeout(function(){return n(e,i)},0);var o=y(e,r,"recoverResult");return i&&void 0===o?a(e,r,i):(e=h(e,r,"ok"),y(e,r,"successFn")(e,i?o:s))})},0))})}else if("waiting"===g(t,r)&&y(t,r,"waitFn")(t)){var i=y(t,r,"conditionFn");t=h(t,r,!i||i(t)?"pending":"no")}return t},t)},j=function(t){n.i(l.a)("sync",t,function(e){setTimeout(function(){return n.i(l.b)(l.c,"lock",t,m,t)},0)})}},function(t,e,n){"use strict";t.exports=n(278)},function(t,e,n){"use strict";var r=n(5),o=(n(2),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},s=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},u=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length-1&&(n="bad.phone_number"),L.html(t,["error","passwordless",n])||L.html(t,["error","passwordless","lock.fallback"])}function o(t){n.i(m.i)(t,["email"],function(t){l(t,i,a)})}function i(t){n.i(N.b)(N.c,"lock",t,function(t){return t=I.setSubmitting(t,!1),n.i(w.h)(t,!0)})}function a(t,e){var o=n.i(N.d)(N.e,"lock",t),i=r(o,e);return n.i(N.b)(N.c,"lock",t,I.setSubmitting,!1,i)}function s(t){n.i(N.b)(N.c,"lock",t,w.i),l(n.i(N.d)(N.e,"lock",t),u,c)}function u(t){n.i(N.b)(N.c,"lock",t,w.j)}function c(t,e){n.i(N.b)(N.c,"lock",t,w.k)}function l(t,e,r){var o=I.connections(t,"passwordless","email"),i=o.size>0&&I.useCustomPasswordlessConnection(t)?o.first().get("name"):"email",a={connection:i,email:D.c(t,"email"),send:n.i(w.l)(t)};n.i(w.c)(t)&&!I.auth.params(t).isEmpty()&&(a.authParams=I.auth.params(t).toJS()),j.a.startPasswordless(I.id(t),a,function(n){n?setTimeout(function(){return r(I.id(t),n)},250):e(I.id(t))})}function p(t){n.i(m.i)(t,["phoneNumber"],function(e){var r=I.connections(e,"passwordless","sms"),o=r.size>0&&I.useCustomPasswordlessConnection(e)?r.first().get("name"):"sms",i={connection:o,phoneNumber:n.i(v.c)(e),send:n.i(w.l)(e)};j.a.startPasswordless(t,i,function(e){e?setTimeout(function(){return f(t,e)},250):d(t)})})}function d(t){n.i(N.b)(N.c,"lock",t,function(t){return t=I.setSubmitting(t,!1),t=n.i(w.h)(t,!0)})}function f(t,e){var o=n.i(N.d)(N.e,"lock",t),i=r(o,e);return I.emitAuthorizationErrorEvent(o,e),n.i(N.b)(N.c,"lock",t,I.setSubmitting,!1,i)}function M(t){var e=n.i(N.d)(N.e,"lock",t),o=I.auth.params(e).toJS(),i=b({verificationCode:D.c(e,"vcode")},o);n.i(w.b)(e)?(i.connection="email",i.email=D.c(e,"email")):(i.connection="sms",i.phoneNumber=n.i(v.c)(e)),n.i(N.b)(N.c,"lock",t,I.setSubmitting,!0),j.a.passwordlessVerify(t,i,function(e,o){var i=void 0;if(e){var a=n.i(N.d)(N.e,"lock",t);return i=r(a,e),e.logToConsole&&console.error(e.description),I.emitAuthorizationErrorEvent(a,e),n.i(N.b)(N.c,"lock",t,I.setSubmitting,!1,i)}return n.i(m.j)(t,o)})}function g(t){n.i(N.b)(N.c,"lock",t,w.m)}function h(t){n.i(N.b)(N.c,"lock",t,w.n)}e.e=o,e.f=s,e.a=p,e.d=M,e.c=g,e.b=h;var y=n(11),N=(n.n(y),n(8)),m=n(16),j=n(26),D=n(3),I=n(1),w=n(33),v=n(41),L=n(12),b=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o1){for(var M=Array(f),g=0;g1){for(var y=Array(h),N=0;N=0&&e<=u},p=["Arguments","Function","String","Number"],d=0;d=o)return t;switch(t){case"%s":return String(r[e++]);case"%d":return Number(r[e++]);case"%j":try{return JSON.stringify(r[e++])}catch(t){return"[Circular]"}default:return t}}),a=r[e];e=0)return o(t,e,r,"none");var a=c.auth.connectionScopes(i),p=(a.get(e.get("name")),l({},c.auth.params(i).toJS(),{connection:e.get("name")}));n.i(u.k)(t,p)}e.c=r,e.a=o,e.b=i;var a=n(73),s=n(8),u=n(16),c=n(1),l=Object.assign||function(t){for(var e=1;e1)for(var n=1;n]/;t.exports=o},function(t,e,n){"use strict";var r,o=n(14),i=n(86),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=n(94),c=u(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML=""+e+" ";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&s.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e,n){"use strict";function r(t){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){if(!("string"==typeof t||t instanceof String)){var e=r(t);throw null===t?e="null":"object"===e&&(e=t.constructor.name),new TypeError("Expected a string but received a ".concat(e))}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,t.exports=e.default,t.exports.default=e.default},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=function(t){var e=t.checkHandler,n=t.checked,r=t.children,i=t.showCheckbox;return e?o.a.createElement("span",{className:"auth0-lock-sign-up-terms-agreement"},o.a.createElement("label",null,i&&o.a.createElement("input",{type:"checkbox",onChange:e,checked:n}),r)):r};e.a=i},function(t,e,n){"use strict";function r(t,e){n.i(c.b)(c.c,"lock",t,l.l,e)}function o(t){n.i(c.b)(c.c,"lock",t,function(t){return t=n.i(l.l)(t,!1),t=n.i(p.a)(t)})}function i(t,e){return M.auth.connectionScopes(t).get(e.get("name"))}function a(t){var e=n.i(c.d)(c.e,"lock",t),r=n.i(p.c)(e,n.i(h.l)(e)?"email":"username"),o=n.i(l.m)(e,r),a=n.i(l.n)(e),d=i(e,o||a),f=n.i(h.l)(e)?"email":"username",M=[f,"password"],y={connection_scope:d?d.toJS():void 0};return o&&!n.i(l.i)(e)?u(t,o,y):n.i(g.a)(e,y,M)||o?void s(t,y):n.i(g.b)(e,t)}function s(t,e){var r=n.i(c.d)(c.e,"lock",t),o=n.i(l.i)(r)||!n.i(h.l)(r)?"username":"email",i=n.i(p.c)(r,o),a=n.i(l.n)(r),s=M.defaultADUsernameFromEmailPrefix(r)?n.i(d.b)(i):i;n.i(f.h)(t,["password",o],y({},e,{connection:a?a.get("name"):null,username:s,password:n.i(p.c)(r,"password"),login_hint:s}),function(t,e,r,o){var i=e&&"invalid captcha"===e.code;n.i(g.c)(t,i,o)})}function u(t,e,r){var o=n.i(c.d)(c.e,"lock",t),i=n.i(h.l)(o)?"email":"username";M.emitEvent(o,"sso login",{lockID:t,connection:e,field:i}),n.i(f.h)(t,[i],y({},r,{connection:e.get("name"),login_hint:n.i(p.c)(o,i)}))}e.a=r,e.c=o,e.b=a;var c=n(8),l=n(13),p=n(3),d=n(19),f=n(16),M=n(1),g=n(40),h=n(10),y=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};if(null==t.username)return null;var e=h({},j,t),n=j.username.min,r=j.username.max;return e.username.min=parseInt(e.username.min,10)||n,e.username.max=parseInt(e.username.max,10)||r,e.username.min>e.username.max&&(e.username.min=n,e.username.max=r),e}function o(t,e,n){return N(t,i(e,n))}function i(t,e){return new p.a.fromJS({connections:a(t,e),defaultDirectory:e.defaultDirectory||null})}function a(t,e){var n=D.toJS(),r=Object.keys(e.connections).filter(function(t){return"passwordless"!=t}),o=null;return e.clientsConnections&&e.clientsConnections[t]&&(o=e.clientsConnections[t]),r.forEach(function(t){var r,i=e.connections[t].map(function(e){return s(t,e)}).filter(function(t){return null===o||o.includes(t.name)});(r=n[t]).push.apply(r,i)}),n}function s(t,e){var n={name:e.name,strategy:e.strategy,type:t};return"database"===t&&(e.validation&&e.validation.passwordPolicy&&(n.passwordPolicy=e.validation.passwordPolicy),n.passwordPolicy=f.a[n.passwordPolicy||"none"],n.allowSignup="boolean"!=typeof e.allowSignup||e.allowSignup,n.allowForgot="boolean"!=typeof e.allowForgot||e.allowForgot,n.requireUsername="boolean"==typeof e.requiresUsername&&e.requiresUsername,n.validation=r(e.validation)),"enterprise"===t&&(n.domains=e.domains),n}function u(t){var e=c(t);return e&&g.findConnection(t,e)}function c(t){return m(t,"defaultDirectory",null)}e.c=o,e.b=u,e.a=c;var l=n(11),p=n.n(l),d=n(105),f=n.n(d),M=n(20),g=n(1),h=Object.assign||function(t){for(var e=1;e4?o-4:0),a=4;a2&&void 0!==arguments[2]?arguments[2]:d.username,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||null==r)return p()(t).length>0;var i=p()(t.toLowerCase());if(i.lengthr.max)return!1;if(o&&!0===n.i(u.e)(t))return!1;var a=f.exec(i);return!(!a||!a[0])}function o(t){var e=n.i(c.r)(t).getIn(["validation","username"]);return e?e.toJS():null}function i(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"username",c=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],p=c?o(t):null,d=function(t){switch(i){case"email":return n.i(u.e)(t);case"username":return r(t,c,p,l);default:return a(t)?n.i(u.e)(t):r(t,c,p,l)}};return n.i(s.e)(t,"username",e,d)}function a(t){return t.indexOf("@")>-1&&t.indexOf(".")>-1}e.b=o,e.a=i,e.c=a;var s=n(3),u=n(19),c=n(10),l=n(31),p=n.n(l),d={username:{min:1,max:15}},f=/^[a-zA-Z0-9_+\-.!#\$\^`~@']*$/},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(4),s=n.n(a),u=n(0),c=n.n(u),l=n(215),p=n(3),d=n(8),f=n(1),M=n(71),g=n(107),h=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.componentDidMount=function(t){var e=this.props,r=e.lock,o=e.validateFormat,i=e.usernameStyle,a=e.strictValidation;f.ui.avatar(r)&&p.q(r)&&n.i(g.a)(f.id(r),p.q(r)),n.i(d.b)(d.c,"lock",f.id(r),M.a,p.q(r),i,o,a)},e.prototype.handleChange=function(t){var e=this.props,r=e.lock,o=e.validateFormat,i=e.usernameStyle,a=e.strictValidation;f.ui.avatar(r)&&n.i(g.b)(f.id(r),t.target.value),n.i(d.b)(d.c,"lock",f.id(r),M.a,t.target.value,i,o,a)},e.prototype.render=function(){var t=this.props,e=t.i18n,r=t.lock,o=t.placeholder,i=t.validateFormat,a=f.ui.allowAutocomplete(r),s=p.c(r,"username"),u=i?n.i(M.b)(r):{},d=function(t){return t?n.i(M.c)(t)||!i?e.str("invalidErrorHint")?"invalidErrorHint":"invalidUsernameErrorHint":"usernameFormatErrorHint":e.str("blankErrorHint")?"blankErrorHint":"blankUsernameErrorHint"};return c.a.createElement(l.a,{value:s,invalidHint:function(t){var n=d(t);return"usernameFormatErrorHint"===n&&i&&null!=u?e.str(n,u.min,u.max):e.str(n)}(s),isValid:!p.k(r,"username"),onChange:this.handleChange.bind(this),placeholder:o,autoComplete:a,disabled:f.submitting(r)})},e}(c.a.Component);e.a=h,h.propTypes={i18n:s.a.object.isRequired,lock:s.a.object.isRequired,placeholder:s.a.string.isRequired,validateFormat:s.a.bool.isRequired,usernameStyle:s.a.oneOf(["any","email","username"]),strictValidation:s.a.bool.isRequired},h.defaultProps={validateFormat:!1,usernameStyle:"username"}},function(t,e,n){"use strict";function r(t,e){return u(t,"skipped",e)}function o(t){return s(t,"skipped",!1)}e.b=r,e.a=o;var i=n(20),a=n.i(i.a)(["quickAuth"]),s=a.tget,u=a.tset},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return g});var s=n(4),u=n.n(s),c=n(0),l=n.n(c),p=n(23),d=n(213),f=n(1),M=Object.assign||function(t){for(var e=1;e3?r-3:0),a=3;a1)){var a=window.document.createElement("script");a.src=o,window.document.getElementsByTagName("head")[0].appendChild(a);var s=function(t){i[r]=i[r].filter(function(e){return e.url!==o||(setTimeout(function(){return e.cb(t)},0),!1)})},u=setTimeout(function(){return s(new Error(o+" timed out"))},2e4);a.addEventListener("load",function(){return clearTimeout(u)}),a.addEventListener("error",function(){clearTimeout(u),s(new Error(o+" could not be loaded."))})}}function o(t){var e=t.method,n=t.cb;window.Auth0[e]=n}e.a=r,e.b=o;n(104);"undefined"==typeof window||window.Auth0||(window.Auth0={});var i={}},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:F(),e=function(t){return a(t)};if(e.version="2.3.4",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var s=t.document,u=t.document,c=t.DocumentFragment,l=t.HTMLTemplateElement,p=t.Node,f=t.Element,M=t.NodeFilter,g=t.NamedNodeMap,h=void 0===g?t.NamedNodeMap||t.MozNamedAttrMap:g,y=t.HTMLFormElement,J=t.DOMParser,q=t.trustedTypes,X=f.prototype,K=o(X,"cloneNode"),$=o(X,"nextSibling"),tt=o(X,"childNodes"),et=o(X,"parentNode");if("function"==typeof l){var nt=u.createElement("template");nt.content&&nt.content.ownerDocument&&(u=nt.content.ownerDocument)}var rt=V(q,s),ot=rt&&Ut?rt.createHTML(""):"",it=u,at=it.implementation,st=it.createNodeIterator,ut=it.createDocumentFragment,ct=it.getElementsByTagName,lt=s.importNode,pt={};try{pt=r(u).documentMode?u.documentMode:{}}catch(t){}var dt={};e.isSupported="function"==typeof et&&at&&void 0!==at.createHTMLDocument&&9!==pt;var ft=Q,Mt=P,gt=B,ht=R,yt=Z,Nt=W,mt=G,jt=null,Dt=n({},[].concat(i(C),i(T),i(E),i(k),i(O))),It=null,wt=n({},[].concat(i(A),i(U),i(_),i(Y))),vt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Lt=null,bt=null,zt=!0,Ct=!0,Tt=!1,Et=!1,xt=!1,kt=!1,St=!1,Ot=!1,At=!1,Ut=!1,_t=!0,Yt=!0,Qt=!1,Pt={},Bt=null,Rt=n({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Gt=null,Zt=n({},["audio","video","img","source","image","track"]),Wt=null,Ht=n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ft="http://www.w3.org/1998/Math/MathML",Vt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml",qt=Jt,Xt=!1,Kt=void 0,$t=["application/xhtml+xml","text/html"],te=void 0,ee=null,ne=u.createElement("form"),re=function(t){return t instanceof RegExp||t instanceof Function},oe=function(t){ee&&ee===t||(t&&"object"===(void 0===t?"undefined":H(t))||(t={}),t=r(t),jt="ALLOWED_TAGS"in t?n({},t.ALLOWED_TAGS):Dt,It="ALLOWED_ATTR"in t?n({},t.ALLOWED_ATTR):wt,Wt="ADD_URI_SAFE_ATTR"in t?n(r(Ht),t.ADD_URI_SAFE_ATTR):Ht,Gt="ADD_DATA_URI_TAGS"in t?n(r(Zt),t.ADD_DATA_URI_TAGS):Zt,Bt="FORBID_CONTENTS"in t?n({},t.FORBID_CONTENTS):Rt,Lt="FORBID_TAGS"in t?n({},t.FORBID_TAGS):{},bt="FORBID_ATTR"in t?n({},t.FORBID_ATTR):{},Pt="USE_PROFILES"in t&&t.USE_PROFILES,zt=!1!==t.ALLOW_ARIA_ATTR,Ct=!1!==t.ALLOW_DATA_ATTR,Tt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=t.SAFE_FOR_TEMPLATES||!1,xt=t.WHOLE_DOCUMENT||!1,Ot=t.RETURN_DOM||!1,At=t.RETURN_DOM_FRAGMENT||!1,Ut=t.RETURN_TRUSTED_TYPE||!1,St=t.FORCE_BODY||!1,_t=!1!==t.SANITIZE_DOM,Yt=!1!==t.KEEP_CONTENT,Qt=t.IN_PLACE||!1,mt=t.ALLOWED_URI_REGEXP||mt,qt=t.NAMESPACE||Jt,t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&re(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Kt=Kt=-1===$t.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,te="application/xhtml+xml"===Kt?function(t){return t}:D,Et&&(Ct=!1),At&&(Ot=!0),Pt&&(jt=n({},[].concat(i(O))),It=[],!0===Pt.html&&(n(jt,C),n(It,A)),!0===Pt.svg&&(n(jt,T),n(It,U),n(It,Y)),!0===Pt.svgFilters&&(n(jt,E),n(It,U),n(It,Y)),!0===Pt.mathMl&&(n(jt,k),n(It,_),n(It,Y))),t.ADD_TAGS&&(jt===Dt&&(jt=r(jt)),n(jt,t.ADD_TAGS)),t.ADD_ATTR&&(It===wt&&(It=r(It)),n(It,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&n(Wt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(Bt===Rt&&(Bt=r(Bt)),n(Bt,t.FORBID_CONTENTS)),Yt&&(jt["#text"]=!0),xt&&n(jt,["html","head","body"]),jt.table&&(n(jt,["tbody"]),delete Lt.tbody),d&&d(t),ee=t)},ie=n({},["mi","mo","mn","ms","mtext"]),ae=n({},["foreignobject","desc","title","annotation-xml"]),se=n({},T);n(se,E),n(se,x);var ue=n({},k);n(ue,S);var ce=function(t){var e=et(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});var r=D(t.tagName),o=D(e.tagName);if(t.namespaceURI===Vt)return e.namespaceURI===Jt?"svg"===r:e.namespaceURI===Ft?"svg"===r&&("annotation-xml"===o||ie[o]):Boolean(se[r]);if(t.namespaceURI===Ft)return e.namespaceURI===Jt?"math"===r:e.namespaceURI===Vt?"math"===r&&ae[o]:Boolean(ue[r]);if(t.namespaceURI===Jt){if(e.namespaceURI===Vt&&!ae[o])return!1;if(e.namespaceURI===Ft&&!ie[o])return!1;var i=n({},["title","style","font","a","script"]);return!ue[r]&&(i[r]||!se[r])}return!1},le=function(t){j(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=ot}catch(e){t.remove()}}},pe=function(t,n){try{j(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(t){j(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!It[t])if(Ot||At)try{le(n)}catch(t){}else try{n.setAttribute(t,"")}catch(t){}},de=function(t){var e=void 0,n=void 0;if(St)t=" "+t;else{var r=I(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Kt&&(t=''+t+"");var o=rt?rt.createHTML(t):t;if(qt===Jt)try{e=(new J).parseFromString(o,Kt)}catch(t){}if(!e||!e.documentElement){e=at.createDocument(qt,"template",null);try{e.documentElement.innerHTML=Xt?"":o}catch(t){}}var i=e.body||e.documentElement;return t&&n&&i.insertBefore(u.createTextNode(n),i.childNodes[0]||null),qt===Jt?ct.call(e,xt?"html":"body")[0]:xt?e.documentElement:i},fe=function(t){return st.call(t.ownerDocument||t,t,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null,!1)},Me=function(t){return t instanceof y&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},ge=function(t){return"object"===(void 0===p?"undefined":H(p))?t instanceof p:t&&"object"===(void 0===t?"undefined":H(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},he=function(t,n,r){dt[t]&&N(dt[t],function(t){t.call(e,n,r,ee)})},ye=function(t){var n=void 0;if(he("beforeSanitizeElements",t,null),Me(t))return le(t),!0;if(I(t.nodeName,/[\u0080-\uFFFF]/))return le(t),!0;var r=te(t.nodeName);if(he("uponSanitizeElement",t,{tagName:r,allowedTags:jt}),!ge(t.firstElementChild)&&(!ge(t.content)||!ge(t.content.firstElementChild))&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return le(t),!0;if("select"===r&&b(/=0;--s)o.insertBefore(K(i[s],!0),$(t))}if(!Lt[r]&&me(r)){if(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,r))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))return!1}return le(t),!0}return t instanceof f&&!ce(t)?(le(t),!0):"noscript"!==r&&"noembed"!==r||!b(/<\/no(script|embed)/i,t.innerHTML)?(Et&&3===t.nodeType&&(n=t.textContent,n=w(n,ft," "),n=w(n,Mt," "),t.textContent!==n&&(j(e.removed,{element:t.cloneNode()}),t.textContent=n)),he("afterSanitizeElements",t,null),!1):(le(t),!0)},Ne=function(t,e,n){if(_t&&("id"===e||"name"===e)&&(n in u||n in ne))return!1;if(Ct&&!bt[e]&&b(gt,e));else if(zt&&b(ht,e));else if(!It[e]||bt[e]){if(!(me(t)&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&b(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&b(vt.tagNameCheck,n)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(n))))return!1}else if(Wt[e]);else if(b(mt,w(n,Nt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(n,"data:")||!Gt[t]){if(Tt&&!b(yt,w(n,Nt,"")));else if(n)return!1}else;return!0},me=function(t){return t.indexOf("-")>0},je=function(t){var n=void 0,r=void 0,o=void 0,i=void 0;he("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:It};for(i=a.length;i--;){n=a[i];var u=n,c=u.name,l=u.namespaceURI;if(r=L(n.value),o=te(c),s.attrName=o,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,he("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(pe(c,t),s.keepAttr))if(b(/\/>/i,r))pe(c,t);else{Et&&(r=w(r,ft," "),r=w(r,Mt," "));var p=te(t.nodeName);if(Ne(p,o,r))try{l?t.setAttributeNS(l,c,r):t.setAttribute(c,r),m(e.removed)}catch(t){}}}he("afterSanitizeAttributes",t,null)}},De=function t(e){var n=void 0,r=fe(e);for(he("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)he("uponSanitizeShadowNode",n,null),ye(n)||(n.content instanceof c&&t(n.content),je(n));he("afterSanitizeShadowDOM",e,null)};return e.sanitize=function(n,r){var o=void 0,i=void 0,a=void 0,u=void 0,l=void 0;if(Xt=!n,Xt&&(n="\x3c!--\x3e"),"string"!=typeof n&&!ge(n)){if("function"!=typeof n.toString)throw z("toString is not a function");if("string"!=typeof(n=n.toString()))throw z("dirty is not a string, aborting")}if(!e.isSupported){if("object"===H(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof n)return t.toStaticHTML(n);if(ge(n))return t.toStaticHTML(n.outerHTML)}return n}if(kt||oe(r),e.removed=[],"string"==typeof n&&(Qt=!1),Qt);else if(n instanceof p)o=de("\x3c!----\x3e"),i=o.ownerDocument.importNode(n,!0),1===i.nodeType&&"BODY"===i.nodeName?o=i:"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Ot&&!Et&&!xt&&-1===n.indexOf("<"))return rt&&Ut?rt.createHTML(n):n;if(!(o=de(n)))return Ot?null:ot}o&&St&&le(o.firstChild);for(var d=fe(Qt?n:o);a=d.nextNode();)3===a.nodeType&&a===u||ye(a)||(a.content instanceof c&&De(a.content),je(a),u=a);if(u=null,Qt)return n;if(Ot){if(At)for(l=ut.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return It.shadowroot&&(l=lt.call(s,l,!0)),l}var f=xt?o.outerHTML:o.innerHTML;return Et&&(f=w(f,ft," "),f=w(f,Mt," ")),rt&&Ut?rt.createHTML(f):f},e.setConfig=function(t){oe(t),kt=!0},e.clearConfig=function(){ee=null,kt=!1},e.isValidAttribute=function(t,e,n){ee||oe({});var r=te(t),o=te(e);return Ne(r,o,n)},e.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],j(dt[t],e))},e.removeHook=function(t){dt[t]&&m(dt[t])},e.removeHooks=function(t){dt[t]&&(dt[t]=[])},e.removeAllHooks=function(){dt={}},e}var s=Object.hasOwnProperty,u=Object.setPrototypeOf,c=Object.isFrozen,l=Object.getPrototypeOf,p=Object.getOwnPropertyDescriptor,d=Object.freeze,f=Object.seal,M=Object.create,g="undefined"!=typeof Reflect&&Reflect,h=g.apply,y=g.construct;h||(h=function(t,e,n){return t.apply(e,n)}),d||(d=function(t){return t}),f||(f=function(t){return t}),y||(y=function(e,n){return new(Function.prototype.bind.apply(e,[null].concat(t(n))))});var N=e(Array.prototype.forEach),m=e(Array.prototype.pop),j=e(Array.prototype.push),D=e(String.prototype.toLowerCase),I=e(String.prototype.match),w=e(String.prototype.replace),v=e(String.prototype.indexOf),L=e(String.prototype.trim),b=e(RegExp.prototype.test),z=function(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r/gm),B=f(/^data-[\-\w.\u00B7-\uFFFF]/),R=f(/^aria-[\-\w]+$/),G=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=f(/^(?:\w+script|data):/i),W=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F=function(){return"undefined"==typeof window?null:window},V=function(t,e){if("object"!==(void 0===t?"undefined":H(t))||"function"!=typeof t.createPolicy)return null;var n=null;e.currentScript&&e.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=e.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return a()})},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!==t&&e!==e}function o(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a1&&"boolean"!=typeof e)throw new i('"allowMissing" argument must be a boolean');var n=L(t),o=n.length>0?n[0]:"",a=b("%"+o+"%",e),u=a.name,c=a.value,l=!1,p=a.alias;p&&(o=p[0],j(n,m([0,1],p)));for(var d=1,f=!0;d=n.length){var D=s(c,g);f=!!D,c=f&&"get"in D&&!("originalValue"in D.get)?D.get:c[g]}else f=N(c,g),c=c[g];f&&!l&&(M[u]=c)}}return c}},function(t,e,n){function r(t){return"string"==typeof t||t instanceof String}function o(t,e){function n(t,e){var n=new Array(e+1).join(" "),r=n+"* ";return t.format?r+=a.apply(null,[t.message].concat(t.format)):r+=t.message,t.items&&(r+="\n"+n+o(t.items,e+1)),r}if(!t.length)return"";var r=n(t[0],e);return t=t.slice(1).reduce(function(t,r){return t+="\n"+n(r,e)},r)}function i(t,e){this.rules=t,this.ruleset=e||u,this._reduce(function(t,e,n){n.validate(e)})}var a=n(42).format,s=n(256),u={length:n(259),contains:n(83),containsAtLeast:n(257),identicalChars:n(258)};i.prototype={},i.prototype._reduce=function(t,e){var n=this;return Object.keys(this.rules).reduce(function(e,r){var o=n.rules[r],i=n.ruleset[r];return t(e,o,i)},e)},i.prototype._applyRules=function(t){return this._reduce(function(e,n,r){return!!e&&(!!r&&r.assert(n,t))},!0)},i.prototype.missing=function(t){return this._reduce(function(e,n,r){var o=r.missing(n,t);return e.rules.push(o),e.verified=e.verified&&!!o.verified,e},{rules:[],verified:!0})},i.prototype.explain=function(){return this._reduce(function(t,e,n){return t.push(n.explain(e)),t},[])},i.prototype.missingAsMarkdown=function(t){return o(this.missing(t),1)},i.prototype.toString=function(){return o(this.explain(),0)},i.prototype.check=function(t){return!!r(t)&&this._applyRules(t)},i.prototype.assert=function(t){if(!this.check(t))throw new s("Password does not meet password policy")},t.exports=i},function(t,e,n){var r=n(42),o=[" ","!",'"',"#","\\$","%","&","'","\\(","\\)","\\*","\\+",",","-","\\.","/",":",";","<","=",">","\\?","@","\\[","\\\\","\\]","\\^","_","`","{","\\|","}","~"].join("|"),i=new RegExp(o);t.exports={validate:function(t){if(!r.isObject(t))throw new Error("options should be an object");if(!r.isArray(t.expressions)||r.isEmpty(t.expressions))throw new Error("contains expects expressions to be a non-empty array");if(!t.expressions.every(function(t){return r.isFunction(t.explain)&&r.isFunction(t.test)}))throw new Error("contains expressions are invalid: An explain and a test function should be provided");return!0},explain:function(t){return{message:"Should contain:",code:"shouldContain",items:t.expressions.map(function(t){return t.explain()})}},missing:function(t,e){var n=t.expressions.map(function(t){var n=t.explain();return n.verified=t.test(e),n});return{message:"Should contain:",code:"shouldContain",verified:n.every(function(t){return t.verified}),items:n}},assert:function(t,e){return!!e&&t.expressions.every(function(t){return t.test(e)})},charsets:{upperCase:{explain:function(){return{message:"upper case letters (A-Z)",code:"upperCase"}},test:function(t){return/[A-Z]/.test(t)}},lowerCase:{explain:function(){return{message:"lower case letters (a-z)",code:"lowerCase"}},test:function(t){return/[a-z]/.test(t)}},specialCharacters:{explain:function(){return{message:"special characters (e.g. !@#$%^&*)",code:"specialCharacters"}},test:function(t){return i.test(t)}},numbers:{explain:function(){return{message:"numbers (i.e. 0-9)",code:"numbers"}},test:function(t){return/\d/.test(t)}}}}},function(t,e,n){"use strict";var r=String.prototype.replace,o=/%20/g,i={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:i.RFC3986,formatters:{RFC1738:function(t){return r.call(t,o,"+")},RFC3986:function(t){return String(t)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}},function(t,e,n){"use strict";function r(t,e){return Array.isArray(e)&&(e=e[1]),e?e.nextSibling:t.firstChild}function o(t,e,n){l.insertTreeBefore(t,e,n)}function i(t,e,n){Array.isArray(e)?s(t,e[0],e[1],n):g(t,e,n)}function a(t,e){if(Array.isArray(e)){var n=e[1];e=e[0],u(t,e,n),t.removeChild(n)}t.removeChild(e)}function s(t,e,n,r){for(var o=e;;){var i=o.nextSibling;if(g(t,o,r),o===n)break;o=i}}function u(t,e,n){for(;;){var r=e.nextSibling;if(r===n)break;t.removeChild(r)}}function c(t,e,n){var r=t.parentNode,o=t.nextSibling;o===e?n&&g(r,document.createTextNode(n),o):n?(M(o,n),u(r,o,e)):u(r,t,e)}var l=n(35),p=n(270),d=(n(9),n(17),n(94)),f=n(63),M=n(146),g=d(function(t,e,n){t.insertBefore(e,n)}),h=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:c,processUpdates:function(t,e){for(var n=0;n-1||a("96",t),!c.plugins[n]){e.extractEvents||a("97",t),c.plugins[n]=e;var r=e.eventTypes;for(var i in r)o(r[i],e,i)||a("98",i,t)}}}function o(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){c.registrationNameModules[t]&&a("100",t),c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(5),s=(n(2),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){s&&a("101"),s=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]&&a("102",n),u[n]=o,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){s=null;for(var t in u)u.hasOwnProperty(t)&&delete u[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=c},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var o=t.type||"unknown-event";t.currentTarget=y.getNodeFromInstance(r),e?g.invokeGuardedCallbackWithCatch(o,n,t):g.invokeGuardedCallback(o,n,t),t.currentTarget=null}function s(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(t,e){var n=s.get(t);if(!n){return null}return n}var a=n(5),s=(n(25),n(45)),u=(n(17),n(22)),c=(n(2),n(6),{isMounted:function(t){var e=s.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var o=i(t);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],r(o)},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e,n){var o=i(t,"replaceState");o&&(o._pendingStateQueue=[e],o._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),o._pendingCallbacks?o._pendingCallbacks.push(n):o._pendingCallbacks=[n]),r(o))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!=typeof t&&a("122",e,o(t))}});t.exports=c},function(t,e,n){"use strict";var r=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t};t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?0===(e=t.charCode)&&13===n&&(e=13):e=n,e>=32||13===e?e:0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=i[t];return!!r&&!!n[r]}function o(t){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!i.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(14);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null===t||!1===t,r=null===e||!1===e;if(n||r)return n===r;var o=typeof t,i=typeof e;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&t.type===e.type&&t.key===e.key}t.exports=r},function(t,e,n){"use strict";var r=(n(7),n(21)),o=(n(6),r);t.exports=o},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(201),o=n(103);o.a,r.a;e.a=r.a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(110),s=n(186),u=function(t){function e(i,u,c){r(this,e);var l=o(this,t.call(this,i,u,c,s.a));return n.i(a.a)(),n.i(a.b)(),window.addEventListener("resize",function(){n.i(a.b)()}),l}return i(e,t),e}(a.c);e.a=u,u.version="11.32.2"},function(t,e,n){"use strict";(function(t,n){function r(t,e){return t(e={exports:{}},e.exports),e.exports}function o(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function i(t){return String(t).replace(/"/g,""")}function a(t){return!("[object Array]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}function s(t){if(Le)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!ve)return!1;try{return ve.call(t),!0}catch(t){}return!1}function u(t,e){return ke.call(t,e)}function c(t){return me.call(t)}function l(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne?1:0}function m(t,e,n){var r,o=function t(e,n,r,o){var i;if("object"==typeof e&&null!==e){for(i=0;i0)for(var r=0;rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function T(t,e,n){for(var r,o,i=[],a=e;a>18&63]+kn[o>>12&63]+kn[o>>6&63]+kn[63&o]);return i.join("")}function E(t,e,n,r){if(n="array"===n?"object":n,t&&typeof t[e]!==n)throw new Error(r)}function x(t,e,n){if(typeof t!==e)throw new Error(n)}function k(t,e,n){if(-1===e.indexOf(t))throw new Error(n)}function S(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),n=1;n0&&e.length>0))throw new Error("Invalid key data");this.n=new or.BigInteger(t,16),this.e=parseInt(e,16)}function tt(t){var e=t.length%4;return 0===e?t:t+new Array(4-e+1).join("=")}function et(t){return t=tt(t).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(t){for(var e="",n=0;n300)throw new it("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new it('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function ut(t,e){this.plugins=e;for(var n=0;n1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=r0?"?":"")+a.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()}),Et=Ct.Symbol,xt=Array.prototype.slice,kt=Object.prototype.toString,St=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==kt.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,r=xt.call(arguments,1),o=function(){if(this instanceof n){var o=e.apply(this,r.concat(xt.call(arguments)));return Object(o)===o?o:this}return e.apply(t,r.concat(xt.call(arguments)))},i=Math.max(0,e.length-r.length),a=[],s=0;s1&&"boolean"!=typeof e)throw new _t('"allowMissing" argument must be a boolean');var n=te(t),r=n.length>0?n[0]:"",o=ee("%"+r+"%",e),i=o.name,a=o.value,s=!1,u=o.alias;u&&(r=u[0],Jt(n,Vt([0,1],u)));for(var c=1,l=!0;c=n.length){var M=Qt(a,p);a=(l=!!M)&&"get"in M&&!("originalValue"in M.get)?M.get:a[p]}else l=Ot(a,p),a=a[p];l&&!s&&(Ht[i]=a)}}return a},re=r(function(t){var e=ne("%Function.prototype.apply%"),n=ne("%Function.prototype.call%"),r=ne("%Reflect.apply%",!0)||St.call(n,e),o=ne("%Object.getOwnPropertyDescriptor%",!0),i=ne("%Object.defineProperty%",!0),a=ne("%Math.max%");if(i)try{i({},"a",{value:1})}catch(t){i=null}t.exports=function(t){var e=r(St,n,arguments);if(o&&i){o(e,"length").configurable&&i(e,"length",{value:1+a(0,t.length-(arguments.length-1))})}return e};var s=function(){return r(St,e,arguments)};i?i(t.exports,"apply",{value:s}):t.exports.apply=s}),oe=(re.apply,re(ne("String.prototype.indexOf"))),ie=function(t,e){var n=ne(t,!!e);return"function"==typeof n&&oe(t,".prototype.")>-1?re(n):n},ae=function(t){return t&&t.default||t}(Object.freeze({__proto__:null,default:{}})),se="function"==typeof Map&&Map.prototype,ue=Object.getOwnPropertyDescriptor&&se?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ce=se&&ue&&"function"==typeof ue.get?ue.get:null,le=se&&Map.prototype.forEach,pe="function"==typeof Set&&Set.prototype,de=Object.getOwnPropertyDescriptor&&pe?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fe=pe&&de&&"function"==typeof de.get?de.get:null,Me=pe&&Set.prototype.forEach,ge="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,he="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,ye="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Ne=Boolean.prototype.valueOf,me=Object.prototype.toString,je=Function.prototype.toString,De=String.prototype.match,Ie="function"==typeof BigInt?BigInt.prototype.valueOf:null,we=Object.getOwnPropertySymbols,ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Le="function"==typeof Symbol&&"object"==typeof Symbol.iterator,be=Object.prototype.propertyIsEnumerable,ze=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),Ce=ae.custom,Te=Ce&&s(Ce)?Ce:null,Ee="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null,xe=function t(e,n,r,y){function N(e,n,o){if(n&&(y=y.slice()).push(n),o){var i={depth:m.depth};return u(m,"quoteStyle")&&(i.quoteStyle=m.quoteStyle),t(e,i,r+1,y)}return t(e,m,r+1,y)}var m=n||{};if(u(m,"quoteStyle")&&"single"!==m.quoteStyle&&"double"!==m.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(u(m,"maxStringLength")&&("number"==typeof m.maxStringLength?m.maxStringLength<0&&m.maxStringLength!==1/0:null!==m.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var j=!u(m,"customInspect")||m.customInspect;if("boolean"!=typeof j&&"symbol"!==j)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(u(m,"indent")&&null!==m.indent&&"\t"!==m.indent&&!(parseInt(m.indent,10)===m.indent&&m.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(e.slice(0,n.maxStringLength),n)+i}return o(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,p),"single",n)}(e,m);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var D=void 0===m.depth?5:m.depth;if(void 0===r&&(r=0),r>=D&&D>0&&"object"==typeof e)return a(e)?"[Array]":"[Object]";var I=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=Array(t.indent+1).join(" ")}return{base:n,prev:Array(e+1).join(n)}}(m,r);if(void 0===y)y=[];else if(l(y,e)>=0)return"[Circular]";if("function"==typeof e){var w=function(t){if(t.name)return t.name;var e=De.call(je.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),v=h(e,N);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(v.length>0?" { "+v.join(", ")+" }":"")}if(s(e)){var L=Le?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):ve.call(e);return"object"!=typeof e||Le?L:d(L)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var b="<"+String(e.nodeName).toLowerCase(),z=e.attributes||[],C=0;C",e.childNodes&&e.childNodes.length&&(b+="..."),b+=""+String(e.nodeName).toLowerCase()+">"}if(a(e)){if(0===e.length)return"[]";var T=h(e,N);return I&&!function(t){for(var e=0;e=0)return!1;return!0}(T)?"["+g(T,I)+"]":"[ "+T.join(", ")+" ]"}if(function(t){return!("[object Error]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e)){var E=h(e,N);return 0===E.length?"["+String(e)+"]":"{ ["+String(e)+"] "+E.join(", ")+" }"}if("object"==typeof e&&j){if(Te&&"function"==typeof e[Te])return e[Te]();if("symbol"!==j&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!ce||!t||"object"!=typeof t)return!1;try{ce.call(t);try{fe.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var x=[];return le.call(e,function(t,n){x.push(N(n,e,!0)+" => "+N(t,e))}),M("Map",ce.call(e),x,I)}if(function(t){if(!fe||!t||"object"!=typeof t)return!1;try{fe.call(t);try{ce.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var k=[];return Me.call(e,function(t){k.push(N(t,e))}),M("Set",fe.call(e),k,I)}if(function(t){if(!ge||!t||"object"!=typeof t)return!1;try{ge.call(t,ge);try{he.call(t,he)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return f("WeakMap");if(function(t){if(!he||!t||"object"!=typeof t)return!1;try{he.call(t,he);try{ge.call(t,ge)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return f("WeakSet");if(function(t){if(!ye||!t||"object"!=typeof t)return!1;try{return ye.call(t),!0}catch(t){}return!1}(e))return f("WeakRef");if(function(t){return!("[object Number]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e))return d(N(Number(e)));if(function(t){if(!t||"object"!=typeof t||!Ie)return!1;try{return Ie.call(t),!0}catch(t){}return!1}(e))return d(N(Ie.call(e)));if(function(t){return!("[object Boolean]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e))return d(Ne.call(e));if(function(t){return!("[object String]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e))return d(N(String(e)));if(!function(t){return!("[object Date]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e)&&!function(t){return!("[object RegExp]"!==c(t)||Ee&&"object"==typeof t&&Ee in t)}(e)){var S=h(e,N),O=ze?ze(e)===Object.prototype:e instanceof Object||e.constructor===Object,A=e instanceof Object?"":"null prototype",U=!O&&Ee&&Object(e)===e&&Ee in e?c(e).slice(8,-1):A?"Object":"",_=(O||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(U||A?"["+[].concat(U||[],A||[]).join(": ")+"] ":"");return 0===S.length?_+"{}":I?_+"{"+g(S,I)+"}":_+"{ "+S.join(", ")+" }"}return String(e)},ke=Object.prototype.hasOwnProperty||function(t){return t in this},Se=ne("%TypeError%"),Oe=ne("%WeakMap%",!0),Ae=ne("%Map%",!0),Ue=ie("WeakMap.prototype.get",!0),_e=ie("WeakMap.prototype.set",!0),Ye=ie("WeakMap.prototype.has",!0),Qe=ie("Map.prototype.get",!0),Pe=ie("Map.prototype.set",!0),Be=ie("Map.prototype.has",!0),Re=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},Ge=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new Se("Side channel does not contain "+xe(t))},get:function(r){if(Oe&&r&&("object"==typeof r||"function"==typeof r)){if(t)return Ue(t,r)}else if(Ae){if(e)return Qe(e,r)}else if(n)return function(t,e){var n=Re(t,e);return n&&n.value}(n,r)},has:function(r){if(Oe&&r&&("object"==typeof r||"function"==typeof r)){if(t)return Ye(t,r)}else if(Ae){if(e)return Be(e,r)}else if(n)return function(t,e){return!!Re(t,e)}(n,r);return!1},set:function(r,o){Oe&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new Oe),_e(t,r,o)):Ae?(e||(e=new Ae),Pe(e,r,o)):(n||(n={key:{},next:null}),function(t,e,n){var r=Re(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,o))}};return r},Ze=String.prototype.replace,We=/%20/g,He={default:"RFC3986",formatters:{RFC1738:function(t){return Ze.call(t,We,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},Fe=Object.prototype.hasOwnProperty,Ve=Array.isArray,Je=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),qe=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r1;){var e=t.pop(),n=e.obj[e.prop];if(Ve(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===He.RFC1738&&(40===u||41===u)?a+=i.charAt(s):u<128?a+=Je[u]:u<2048?a+=Je[192|u>>6]+Je[128|63&u]:u<55296||u>=57344?a+=Je[224|u>>12]+Je[128|u>>6&63]+Je[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(s)),a+=Je[240|u>>18]+Je[128|u>>12&63]+Je[128|u>>6&63]+Je[128|63&u])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(Ve(t)){for(var n=[],r=0;r0?h.join(",")||null:void 0}];else if(tn(s))y=s;else{var m=Object.keys(h);y=u?m.sort(u):m}for(var j=0;j-1?t.split(","):t},fn=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,u=[];if(s){if(!n.plainObjects&&un.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}for(var c=0;n.depth>0&&null!==(a=i.exec(o))&&c=0;--i){var a,s=t[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=o:a[u]=o:a={0:o}}o=a}return o}(u,e,n,r)}},Mn=function(t,e){var n=function(t){if(!t)return ln;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?ln.charset:t.charset;return{allowDots:void 0===t.allowDots?ln.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:ln.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:ln.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:ln.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:ln.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:ln.comma,decoder:"function"==typeof t.decoder?t.decoder:ln.decoder,delimiter:"string"==typeof t.delimiter||Xe.isRegExp(t.delimiter)?t.delimiter:ln.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:ln.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:ln.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:ln.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:ln.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:ln.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof t?function(t,e){var n,r={},o=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=e.parameterLimit===1/0?void 0:e.parameterLimit,a=o.split(e.delimiter,i),s=-1,u=e.charset;if(e.charsetSentinel)for(n=0;n-1&&(l=cn(l)?[l]:l),un.call(r,c)?r[c]=Xe.combine(r[c],l):r[c]=l}return r}(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a0?d+p:""},hn=r(function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&In.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},w.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},w.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){r.on("abort",function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}}),r.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},w.prototype.catch=function(t){return this.then(void 0,t)},w.prototype.use=function(t){return t(this),this},w.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},w.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},w.prototype.get=function(t){return this._header[t.toLowerCase()]},w.prototype.getHeader=w.prototype.get,w.prototype.set=function(t,e){if(jn(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},w.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},w.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(jn(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},w.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},w.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},w.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},w.prototype.redirects=function(t){return this._maxRedirects=t,this},w.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},w.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},w.prototype.send=function(t){var e=jn(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&jn(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},w.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},w.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},w.prototype._appendQueryString=function(){console.warn("Unsupported")},w.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},w.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};var wn=function(t){return t.split(/ *; */).shift()},vn=function(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})},Ln=function(t){return t.split(/ *, */).reduce(function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t},{})},bn=v;v.prototype.get=function(t){return this.header[t.toLowerCase()]},v.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=wn(e);var n=vn(e);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{t.link&&(this.links=Ln(t.link))}catch(t){}},v.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){z.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r0||t instanceof Object)?e(t):null)},u.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},d.Response=u,hn(c.prototype),Dn(c.prototype),c.prototype.type=function(t){return this.set("Content-Type",d.types[t]||t),this},c.prototype.accept=function(t){return this.set("Accept",d.types[t]||t),this},c.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"===n(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,o)},c.prototype.query=function(t){return"string"!=typeof t&&(t=o(t)),t&&this._query.push(t),this},c.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},c.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},c.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},c.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},c.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},c.prototype.ca=c.prototype.agent,c.prototype.buffer=c.prototype.ca,c.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},c.prototype.pipe=c.prototype.write,c.prototype._isHost=function(t){return t&&"object"===n(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},c.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||r,this._finalizeQueryString(),this._end()},c.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},c.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=d.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||d.serialize[o?o.split(";")[0]:""];!i&&s(o)&&(i=d.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},d.agent=function(){return new zn},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){zn.prototype[t.toLowerCase()]=function(e,n){var r=new d.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}}),zn.prototype.del=zn.prototype.delete,d.get=function(t,e,n){var r=d("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},d.head=function(t,e,n){var r=d("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},d.options=function(t,e,n){var r=d("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.del=l,d.delete=l,d.patch=function(t,e,n){var r=d("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.post=function(t,e,n){var r=d("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.put=function(t,e,n){var r=d("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}}),Tn=(Cn.Request,function(t){var e=C(t),n=e[0],r=e[1];return 3*(n+r)/4-r}),En=function(t){var e,n,r=C(t),o=r[0],i=r[1],a=new On(function(t,e,n){return 3*(e+n)/4-n}(0,o,i)),s=0,u=i>0?o-4:o;for(n=0;n>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===i&&(e=Sn[t.charCodeAt(n)]<<2|Sn[t.charCodeAt(n+1)]>>4,a[s++]=255&e),1===i&&(e=Sn[t.charCodeAt(n)]<<10|Sn[t.charCodeAt(n+1)]<<4|Sn[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},xn=function(t){for(var e,n=t.length,r=n%3,o=[],i=0,a=n-r;ia?a:i+16383));return 1===r?(e=t[n-1],o.push(kn[e>>2]+kn[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(kn[e>>10]+kn[e>>4&63]+kn[e<<2&63]+"=")),o.join("")},kn=[],Sn=[],On="undefined"!=typeof Uint8Array?Uint8Array:Array,An="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Un=0,_n=An.length;Un<_n;++Un)kn[Un]=An[Un],Sn[An.charCodeAt(Un)]=Un;Sn["-".charCodeAt(0)]=62,Sn["_".charCodeAt(0)]=63;var Yn={byteLength:Tn,toByteArray:En,fromByteArray:xn},Qn={encode:function(t){return Yn.fromByteArray(function(t){for(var e=new Array(t.length),n=0;n=65&&e<=90||!o&&e>=48&&e<=57?(n+="_",n+=t[r].toLowerCase()):n+=t[r].toLowerCase(),o=e>=48&&e<=57,i=e>=65&&e<=90,r++;return n}(o):o]=t(e[o]),r},{}))},toCamelCase:function t(e,n,r){return"object"!=typeof e||Rn.isArray(e)||null===e?e:(n=n||[],r=r||{},Object.keys(e).reduce(function(o,i){var a,s=-1===n.indexOf(i)?(a=i.split("_")).reduce(function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},a.shift()):i;return o[s]=t(e[s]||e[i],[],r),r.keepOriginal&&(o[i]=t(e[i],[],r)),o},{}))},blacklist:function(t,e){return Object.keys(t).reduce(function(n,r){return-1===e.indexOf(r)&&(n[r]=t[r]),n},{})},merge:function(t,e){return{base:e?O(t,e):t,with:function(t,e){return t=e?O(t,e):t,U(this.base,t)}}},pick:O,getKeysNotIn:function(t,e){var n=[];for(var r in t)-1===e.indexOf(r)&&n.push(r);return n},extend:U,getOriginFromUrl:function(t){if(t){var e=_(t);if(!e)return null;var n=e.protocol+"//"+e.hostname;return e.port&&(n+=":"+e.port),n}},getLocationFromUrl:_,trimUserDetails:function(t){return function(t,e){return e.reduce(Y,t)}(t,["username","email","phoneNumber"])},updatePropertyOn:function t(e,n,r){"string"==typeof n&&(n=n.split("."));var o=n[0];e.hasOwnProperty(o)&&(1===n.length?e[o]=r:t(e[o],n.slice(1),r))}};Q.prototype.abort=function(){this.request.abort()},Q.prototype.getMethod=function(){return this.method},Q.prototype.getBody=function(){return this.body},Q.prototype.getUrl=function(){return this.url},Q.prototype.getHeaders=function(){return this.headers},P.prototype.set=function(t,e){return this.request=this.request.set(t,e),this},P.prototype.send=function(t){return this.request=this.request.send(Zn.trimUserDetails(t)),this},P.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},P.prototype.end=function(t){return this.request.end(t),new Q(this.request)},B.prototype.setCommonConfiguration=function(t,e){if(e=e||{},this._timesToRetryFailedRequests>0&&(t=t.retry(this._timesToRetryFailedRequests)),e.noHeaders)return t;var n=this.headers;t=t.set("Content-Type","application/json"),e.xRequestLanguage&&(t=t.set("X-Request-Language",e.xRequestLanguage));for(var r=Object.keys(this.headers),o=0;o0&&t.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),e}},Xn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},Kn=K(function(t,e){t.exports=function(){function t(t){return"function"==typeof t}function e(){var t=setTimeout;return function(){return t(r,1)}}function r(){for(var t=0;t>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else for(var a=0;a>>2]=n[a>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(n,e/2)}},p=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255));return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(n,e)}},d=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},f=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,l=t.min(4*c,i);if(c){for(var p=0;p>>7)^(M<<14|M>>>18)^M>>>3)+c[f-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+c[f-16]}var h=r&o^r&i^o&i,y=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&p)+u[f]+c[f];d=p,p=l,l=s,s=a+y|0,a=i,i=o,o=r,r=y+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+h)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+p|0,n[7]=n[7]+d|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=t.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(l),e.HmacSHA256=i._createHmacHelper(l)}(Math),n.SHA256)}),nr=K(function(t,e){var n,r;t.exports=(r=(n=tr).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(t){var e=t.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i>>6-a%4*2;o[i>>>2]|=(s|u)<<24-i%4*8,i++}return r.create(o,i)}(t,e,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}),rr=K(function(t,e){t.exports=tr.enc.Hex}),or=K(function(t,e){(function(){function e(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):this.fromString(t,null==e&&"string"!=typeof t?256:e))}function n(){return new e(null)}function r(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function o(t,e){var n=b[t.charCodeAt(e)];return null==n?-1:n}function i(t){var e=n();return e.fromInt(t),e}function a(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function s(t){this.m=t}function u(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function M(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function g(){}function h(t){return t}function y(t){this.r2=n(),this.q3=n(),e.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function N(){var t;t=(new Date).getTime(),C[T++]^=255&t,C[T++]^=t>>8&255,C[T++]^=t>>16&255,C[T++]^=t>>24&255,T>=A&&(T-=A)}function m(){if(null==z){for(N(),(z=new D).init(C),T=0;T>15;--i>=0;){var u=32767&this[t],c=this[t++]>>15,l=s*u+c*a;o=((u=a*u+((32767&l)<<15)+n[r]+(1073741823&o))>>>30)+(l>>>15)+s*c+(o>>>30),n[r++]=1073741823&u}return o},I=30):w&&"Netscape"!=navigator.appName?(e.prototype.am=function(t,e,n,r,o,i){for(;--i>=0;){var a=e*this[t++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},I=26):(e.prototype.am=function(t,e,n,r,o,i){for(var a=16383&e,s=e>>14;--i>=0;){var u=16383&this[t],c=this[t++]>>14,l=s*u+c*a;o=((u=a*u+((16383&l)<<14)+n[r]+o)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return o},I=28),e.prototype.DB=I,e.prototype.DM=(1<=0?t.mod(this.m):t},s.prototype.revert=function(t){return t},s.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},s.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},s.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},u.prototype.convert=function(t){var r=n();return t.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),t.s<0&&r.compareTo(e.ZERO)>0&&this.m.subTo(r,r),r},u.prototype.revert=function(t){var e=n();return t.copyTo(e),this.reduce(e),e},u.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},u.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},u.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},e.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},e.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,a=!1,s=0;--i>=0;){var u=8==r?255&t[i]:o(t,i);u<0?"-"==t.charAt(i)&&(a=!0):(a=!1,0==s?this[this.t++]=u:s+r>this.DB?(this[this.t-1]|=(u&(1<>this.DB-s):this[this.t-1]|=u<=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},e.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},e.prototype.drShiftTo=function(t,e){for(var n=t;n=0;--n)e[n+a+1]=this[n]>>o|s,s=(this[n]&i)<=0;--n)e[n]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},e.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,o=this.DB-r,i=(1<>r;for(var a=n+1;a>r;r>0&&(e[this.t-n-1]|=(this.s&i)<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),o=t.abs(),i=r.t;for(n.t=i+o.t;--i>=0;)n[i]=0;for(i=0;i=0;)t[n]=0;for(n=0;n=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},e.prototype.divRemTo=function(t,r,o){var i=t.abs();if(!(i.t<=0)){var s=this.abs();if(s.t0?(i.lShiftTo(p,u),s.lShiftTo(p,o)):(i.copyTo(u),s.copyTo(o));var d=u.t,f=u[d-1];if(0!=f){var M=f*(1<1?u[d-2]>>this.F2:0),g=this.FV/M,h=(1<=0&&(o[o.t++]=1,o.subTo(j,o)),e.ONE.dlShiftTo(d,j),j.subTo(u,u);u.t=0;){var D=o[--N]==f?this.DM:Math.floor(o[N]*g+(o[N-1]+y)*h);if((o[N]+=u.am(0,D,o,m,0,d))0&&o.rShiftTo(p,o),c<0&&e.ZERO.subTo(o,o)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,r){if(t>4294967295||t<1)return e.ONE;var o=n(),i=n(),s=r.convert(this),u=a(t)-1;for(s.copyTo(o);--u>=0;)if(r.sqrTo(o,i),(t&1<0)r.mulTo(i,s,o);else{var c=o;o=i,i=c}return r.revert(o)},e.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,o=(1<0)for(u>u)>0&&(i=!0,a=r(n));s>=0;)u>(u+=this.DB-e)):(n=this[s]>>(u-=e)&o,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(a+=r(n));return i?a:"0"},e.prototype.negate=function(){var t=n();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+a(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=n();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r},e.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new s(e):new u(e),this.exp(t,n)},e.ZERO=i(0),e.ONE=i(1),g.prototype.convert=h,g.prototype.revert=h,g.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},g.prototype.sqrTo=function(t,e){t.squareTo(e)},y.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=n();return t.copyTo(e),this.reduce(e),e},y.prototype.revert=function(t){return t},y.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},y.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var z,C,T,E=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/E[E.length-1];if(e.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},e.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),o=i(r),a=n(),s=n(),u="";for(this.divRemTo(o,a,s);a.signum()>0;)u=(r+s.intValue()).toString(t).substr(1)+u,a.divRemTo(o,a,s);return s.intValue().toString(t)+u},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),a=!1,s=0,u=0,c=0;c=r&&(this.dMultiply(i),this.dAddOffset(u,0),s=0,u=0))}s>0&&(this.dMultiply(Math.pow(n,s)),this.dAddOffset(u,0)),a&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=new Array,i=7&t;o.length=1+(t>>3),n.nextBytes(o),i>0?o[0]&=(1<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},e.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},e.prototype.multiplyLowerTo=function(t,e,n){var r,o=Math.min(this.t+t.t,e);for(n.s=0,n.t=o;o>0;)n[--o]=0;for(r=n.t-this.t;o=0;)n[r]=0;for(r=Math.max(e-this.t,0);r0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},e.prototype.millerRabin=function(t){var r=this.subtract(e.ONE),o=r.getLowestSetBit();if(o<=0)return!1;var i=r.shiftRight(o);(t=t+1>>1)>E.length&&(t=E.length);for(var a=n(),s=0;s>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,o=0;if(t-- >0)for(r>r)!=(this.s&this.DM)>>r&&(e[o++]=n|this.s<=0;)r<8?(n=(this[t]&(1<>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(e[o++]=n);return e},e.prototype.equals=function(t){return 0==this.compareTo(t)},e.prototype.min=function(t){return this.compareTo(t)<0?this:t},e.prototype.max=function(t){return this.compareTo(t)>0?this:t},e.prototype.and=function(t){var e=n();return this.bitwiseTo(t,c,e),e},e.prototype.or=function(t){var e=n();return this.bitwiseTo(t,l,e),e},e.prototype.xor=function(t){var e=n();return this.bitwiseTo(t,p,e),e},e.prototype.andNot=function(t){var e=n();return this.bitwiseTo(t,d,e),e},e.prototype.not=function(){for(var t=n(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var g=n();for(o.sqrTo(p[1],g);d<=M;)p[d]=n(),o.mulTo(g,p[d-2],p[d]),d+=2}var h,N,m=t.t-1,j=!0,D=n();for(c=a(t[m])-1;m>=0;){for(c>=f?h=t[m]>>c-f&M:(h=(t[m]&(1<0&&(h|=t[m-1]>>this.DB+c-f)),d=r;0==(1&h);)h>>=1,--d;if((c-=d)<0&&(c+=this.DB,--m),j)p[h].copyTo(l),j=!1;else{for(;d>1;)o.sqrTo(l,D),o.sqrTo(D,l),d-=2;d>0?o.sqrTo(l,D):(N=l,l=D,D=N),o.mulTo(D,p[h],l)}for(;m>=0&&0==(t[m]&1<=0?(r.subTo(o,r),n&&a.subTo(u,a),s.subTo(c,s)):(o.subTo(r,o),n&&u.subTo(a,u),c.subTo(s,c))}return 0!=o.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},e.prototype.pow=function(t){return this.exp(t,new g)},e.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var o=e.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return e;for(o0&&(e.rShiftTo(i,e),n.rShiftTo(i,n));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},e.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=E[E.length-1]){for(e=0;e>>8,C[T++]=255&k;T=0,N()}j.prototype.nextBytes=function(t){var e;for(e=0;ethis.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(t){for(var e in ir){var n=ir[e],r=n.length;if(t.substring(0,r)===n)return{alg:e,hash:t.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!ar.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var o=ar[r.alg](t).toString();return r.hash===o};for(var sr=[],ur=[],cr="undefined"!=typeof Uint8Array?Uint8Array:Array,lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pr=0,dr=lr.length;pr0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}(t),o=r[0],i=r[1],a=new cr(function(t,e,n){return 3*(e+n)/4-n}(0,o,i)),s=0,u=i>0?o-4:o;for(n=0;n>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===i&&(e=ur[t.charCodeAt(n)]<<2|ur[t.charCodeAt(n+1)]>>4,a[s++]=255&e),1===i&&(e=ur[t.charCodeAt(n)]<<10|ur[t.charCodeAt(n+1)]<<4|ur[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},Mr=K(function(t){var e,n;e=Xn,n=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0]=t[0].match(/^file:\/\/\//)?t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=o.replace(/[\/]+$/,r0?"?":"")+a.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()});it.prototype=Error.prototype,at.prototype=Error.prototype;var gr=function(){function t(){}var e=t.prototype;return e.get=function(){return null},e.has=function(){return null},e.set=function(){return null},t}();Kn.polyfill();var hr=function(t){return"number"==typeof t},yr=function(){return new Date};st.prototype.verify=function(t,e,n){if(!n&&e&&"function"==typeof e&&(n=e,e=void 0),!t)return n(new at("ID token is required but missing"),null);var r=this.decode(t);if(r instanceof Error)return n(new at("ID token could not be decoded"),null);var o=r.encoded.header+"."+r.encoded.payload,i=nt(r.encoded.signature),a=r.header.alg,s=r.header.kid,u=r.payload.aud,c=r.payload.sub,l=r.payload.iss,p=r.payload.exp,d=r.payload.nbf,f=r.payload.iat,M=r.payload.azp,g=r.payload.auth_time,h=r.payload.nonce,y=this.__clock(),N=this;if(N.expectedAlg!==a)return n(new at('Signature algorithm of "'+a+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(l,s,function(t,a){if(t)return n(t,null);if(!a.verify(o,i))return n(new at("Invalid ID token signature."),null);if(!l||"string"!=typeof l)return n(new at("Issuer (iss) claim must be a string present in the ID token"),null);if(N.issuer!==l)return n(new at('Issuer (iss) claim mismatch in the ID token, expected "'+N.issuer+'", found "'+l+'"'),null);if(!c||"string"!=typeof c)return n(new at("Subject (sub) claim must be a string present in the ID token"),null);if(!u||"string"!=typeof u&&!Array.isArray(u))return n(new at("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(u)&&!u.includes(N.audience))return n(new at('Audience (aud) claim mismatch in the ID token; expected "'+N.audience+'" but was not one of "'+u.join(", ")+'"'),null);if("string"==typeof u&&N.audience!==u)return n(new at('Audience (aud) claim mismatch in the ID token; expected "'+N.audience+'" but found "'+u+'"'),null);if(e){if(!h||"string"!=typeof h)return n(new at("Nonce (nonce) claim must be a string present in the ID token"),null);if(h!==e)return n(new at('Nonce (nonce) claim value mismatch in the ID token; expected "'+e+'", found "'+h+'"'),null)}if(Array.isArray(u)&&u.length>1){if(!M||"string"!=typeof M)return n(new at("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(M!==N.audience)return n(new at('Authorized Party (azp) claim mismatch in the ID token; expected "'+N.audience+'", found "'+M+'"'),null)}if(!p||!hr(p))return n(new at("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!f||!hr(f))return n(new at("Issued At (iat) claim must be a number present in the ID token"),null);var s=p+N.leeway,m=new Date(0);if(m.setUTCSeconds(s),y>m)return n(new at('Expiration Time (exp) claim error in the ID token; current time "'+y+'" is after expiration time "'+m+'"'),null);if(d&&hr(d)){var j=d-N.leeway,D=new Date(0);if(D.setUTCSeconds(j),y