diff --git a/api/get_index.js b/api/get_index.js index 171ac56d..7fd835ac 100644 --- a/api/get_index.js +++ b/api/get_index.js @@ -53,7 +53,8 @@ module.exports = () => ({ fetchUsersFromToken(token) .then(({ currentUser, matchingUsers }) => { getSettings().then((settings) => { - const locale = matchingUsers[0].user_metadata.locale || settings.locale; + const userMetadata = (matchingUsers[0] && matchingUsers[0].user_metadata) || {}; + const locale = userMetadata.locale || settings.locale; resolveLocale(locale).then((t) => { const rawIdentities = matchingUsers.length > 0 ? matchingUsers[0].identities : []; const identities = rawIdentities diff --git a/build/bundle.js b/build/bundle.js index 432d6858..93ed7e04 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -1 +1 @@ -module.exports=function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:r})},e.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e.w={},e(e.s=0)}([function(n,t,e){"use strict";var r=e(1),o=e(2),i=e(10),a=e(5),s=r.createServer(function(n,t){return i.info("Starting Account Link Extension - Version:","2.3.2"),i.info(" > WT_URL:",n("WT_URL")),i.info(" > PUBLIC_WT_URL:",a("PUBLIC_WT_URL")),o(n,t)});n.exports=function(n,t,e){a.setValue("PUBLIC_WT_URL",r.urlHelpers.getWebtaskUrl(t)),s(n,t,e)}},function(n,t){n.exports=require("auth0-extension-hapi-tools@1.2.2")},function(n,t,e){"use strict";(function(t){var r=e(3),o=e(4),i=o.FileStorageContext,a=o.WebtaskStorageContext,s=e(5),c=e(6),u=e(10),l=e(124).init,f=function(n){n?(u.error("Hapi initialization failed."),u.error(n)):u.info("Hapi initialization completed.")};n.exports=function(n,e,o){return s.setProvider(function(t){return n(t)||Object({NODE_ENV:"production",CLIENT_VERSION:"2.3.2"})[t]}),l(e?new a(e,{force:1}):new i(r.join(t,"../data.json"))),c(o||f)}}).call(this,"/")},function(n,t){n.exports=require("path")},function(n,t){n.exports=require("auth0-extension-tools@1.3.1")},function(n,t,e){"use strict";var r=e(4).config;n.exports=r()},function(n,t,e){"use strict";(function(t){var r=e(3),o=e(7),i=e(8),a=e(9),s=e(5),c=e(10),u=e(12),l=e(179),f=e(180);n.exports=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,d=new o.Server;return d.connection({host:"localhost",port:s("PORT"),routes:{cors:!0,validate:{},files:{relativeTo:r.join(t,"../public")}}}),d.register([a,i],function(){}),d.route({method:"GET",path:"/js/{file*}",config:{auth:!1},handler:{directory:{path:r.join(t,"../public/js")}}}),d.route({method:"GET",path:"/css/{file*}",config:{auth:!1},handler:{directory:{path:r.join(t,"../public/css")}}}),d.register([f,e,u],function(t){c.debug=function(){for(var n=arguments.length,t=new Array(n),e=0;e0?r[0].identities:[]).map(function(n){return n.provider}).map(l),a=f(i,n("or"));t(s({dynamicSettings:y,stylesheetTag:m,currentUser:e,matchingUsers:r,customCSSTag:g,locale:o,identities:a}))})})}).catch(function(r){var o=n.query.state;c.error("An error was encountered: ",r),c.info(`Redirecting to failed link to /continue: ${e.iss}continue?state=${n.query.state}`),t.redirect(`${e.iss}continue?state=${o}`)})}).catch(function(n){c.error("An invalid token was provided",n),s({dynamicSettings:y,stylesheetTag:m,currentUser:null,matchingUsers:[],customCSSTag:g}).then(function(n){t(n).code(400)})})}else t.redirect(`${i("PUBLIC_WT_URL")}/admin`).state("account-linking-admin-state","")}}}},function(n,t){n.exports=function(n){return n&&n.__esModule?n:{default:n}}},function(n,t,e){n.exports=e(16)},function(n,t,e){e(17),e(18),e(62),e(66),e(83),e(84),n.exports=e(26).Promise},function(n,t){},function(n,t,e){"use strict";var r=e(19)(!0);e(22)(String,"String",function(n){this._t=String(n),this._i=0},function(){var n,t=this._t,e=this._i;return e>=t.length?{value:void 0,done:!0}:(n=r(t,e),this._i+=n.length,{value:n,done:!1})})},function(n,t,e){var r=e(20),o=e(21);n.exports=function(n){return function(t,e){var i,a,s=String(o(t)),c=r(e),u=s.length;return c<0||c>=u?n?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?n?s.charAt(c):i:n?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(n,t){var e=Math.ceil,r=Math.floor;n.exports=function(n){return isNaN(n=+n)?0:(n>0?r:e)(n)}},function(n,t){n.exports=function(n){if(void 0==n)throw TypeError("Can't call method on "+n);return n}},function(n,t,e){"use strict";var r=e(23),o=e(24),i=e(40),a=e(29),s=e(41),c=e(42),u=e(58),l=e(60),f=e(59)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};n.exports=function(n,t,e,p,v,m,g){c(e,t,p);var y,b,x,w=function(n){if(!d&&n in S)return S[n];switch(n){case"keys":case"values":return function(){return new e(this,n)}}return function(){return new e(this,n)}},k=t+" Iterator",_="values"==v,L=!1,S=n.prototype,j=S[f]||S["@@iterator"]||v&&S[v],T=j||w(v),E=v?_?w("entries"):T:void 0,C="Array"==t&&S.entries||j;if(C&&(x=l(C.call(new n)))!==Object.prototype&&x.next&&(u(x,k,!0),r||"function"==typeof x[f]||a(x,f,h)),_&&j&&"values"!==j.name&&(L=!0,T=function(){return j.call(this)}),r&&!g||!d&&!L&&S[f]||a(S,f,T),s[t]=T,s[k]=h,v)if(y={values:_?T:w("values"),keys:m?T:w("keys"),entries:E},g)for(b in y)b in S||i(S,b,y[b]);else o(o.P+o.F*(d||L),t,y);return y}},function(n,t){n.exports=!0},function(n,t,e){var r=e(25),o=e(26),i=e(27),a=e(29),s=e(39),c=function(n,t,e){var u,l,f,d=n&c.F,h=n&c.G,p=n&c.S,v=n&c.P,m=n&c.B,g=n&c.W,y=h?o:o[t]||(o[t]={}),b=y.prototype,x=h?r:p?r[t]:(r[t]||{}).prototype;for(u in h&&(e=t),e)(l=!d&&x&&void 0!==x[u])&&s(y,u)||(f=l?x[u]:e[u],y[u]=h&&"function"!=typeof x[u]?e[u]:m&&l?i(f,r):g&&x[u]==f?function(n){var t=function(t,e,r){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,r)}return n.apply(this,arguments)};return t.prototype=n.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[u]=f,n&c.R&&b&&!b[u]&&a(b,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,n.exports=c},function(n,t){var e=n.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(n,t){var e=n.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)},function(n,t,e){var r=e(28);n.exports=function(n,t,e){if(r(n),void 0===t)return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,o){return n.call(t,e,r,o)}}return function(){return n.apply(t,arguments)}}},function(n,t){n.exports=function(n){if("function"!=typeof n)throw TypeError(n+" is not a function!");return n}},function(n,t,e){var r=e(30),o=e(38);n.exports=e(34)?function(n,t,e){return r.f(n,t,o(1,e))}:function(n,t,e){return n[t]=e,n}},function(n,t,e){var r=e(31),o=e(33),i=e(37),a=Object.defineProperty;t.f=e(34)?Object.defineProperty:function(n,t,e){if(r(n),t=i(t,!0),r(e),o)try{return a(n,t,e)}catch(n){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(n[t]=e.value),n}},function(n,t,e){var r=e(32);n.exports=function(n){if(!r(n))throw TypeError(n+" is not an object!");return n}},function(n,t){n.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},function(n,t,e){n.exports=!e(34)&&!e(35)(function(){return 7!=Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a})},function(n,t,e){n.exports=!e(35)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(n,t){n.exports=function(n){try{return!!n()}catch(n){return!0}}},function(n,t,e){var r=e(32),o=e(25).document,i=r(o)&&r(o.createElement);n.exports=function(n){return i?o.createElement(n):{}}},function(n,t,e){var r=e(32);n.exports=function(n,t){if(!r(n))return n;var e,o;if(t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;if("function"==typeof(e=n.valueOf)&&!r(o=e.call(n)))return o;if(!t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;throw TypeError("Can't convert object to primitive value")}},function(n,t){n.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},function(n,t){var e={}.hasOwnProperty;n.exports=function(n,t){return e.call(n,t)}},function(n,t,e){n.exports=e(29)},function(n,t){n.exports={}},function(n,t,e){"use strict";var r=e(43),o=e(38),i=e(58),a={};e(29)(a,e(59)("iterator"),function(){return this}),n.exports=function(n,t,e){n.prototype=r(a,{next:o(1,e)}),i(n,t+" Iterator")}},function(n,t,e){var r=e(31),o=e(44),i=e(56),a=e(53)("IE_PROTO"),s=function(){},c=function(){var n,t=e(36)("iframe"),r=i.length;for(t.style.display="none",e(57).appendChild(t),t.src="javascript:",(n=t.contentWindow.document).open(),n.write(" \n \n \n {{ Auth0Widget }}\n {{ ExtensionScripts }}\n \n\n'},function(n,t,e){"use strict";var r=null;n.exports.init=function(n){r=n},n.exports.get=function(){if(!r)throw new Error("The DB has not been initialized.");return r}},function(n,t,e){"use strict";var r=e(14)(e(126)),o=e(130).resolveLocale,i=e(132).getSettings,a=e(133),s=e(134),c=e(134).lockOutlineClass,u=new RegExp(/\{\{(\s+)?identities(\s+)?\}\}/);n.exports=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return i().then(function(i){var l=(0,r.default)(i,n);return o(e).then(function(n){return`\n
\n
\n ${s(l.removeOverlay)}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(n){return""!==n.logoPath?``:`\n `}(l)}\n
${function(n,t){return""!==n.title?n.title:t("accountLinking")}(l,n)}
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n

\n ${n("introduction")} ${n("identities").replace(u,t)}.\n

\n

\n \n

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(n,t){var e="";return""!==n.color&&(e=`style="background-color: ${n.color}"`),`\n `}(l,n)}\n
\n
\n
\n
\n
\n
\n
\n \n\n\n${o(e)}\n\n
\n
\n

Custom Hosted Page

\n\n \n\n

Widget Settings

\n\n
\n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n Remove widget's overlay\n
\n\n \n
\n
\n\n\n${r}\n\n\n`}},function(n,t,e){"use strict";var r=e(163);n.exports=`\n \n\n\n${o(e)}\n\n
\n
\n
\n
\n
\n
\n

Add new locale \n ?\n
\n
\n
Adding a new locale
\n

You can add custom locales for your users to use. You will need to specify the following data:

\n
    \n
  • ISO Code: ISO 639-1 Complaint Locale Code. i.e.: es, en, pt.
  • \n
  • Name: A friendly name for the locale. i.e.: Spanish, English, Portuguese.
  • \n
\n
\n
\n

\n
\n \n \n \n \n \n
\n
\n
\n \n \n
\n

\n\n \n \n \n
NameMessage
\n\n \n \n
\n \n
\n
Remove locale
\n
\n

Once removed, you cannot undo this change.

\n Remove locale\n
\n

\n
\n
\n
\n\n\n${r}\n\n\n`}},function(n,t,e){"use strict";var r=e(132).getLocales;n.exports=function(){return{method:"GET",config:{auth:"jwt"},path:"/admin/locales",handler:function(n,t){return r().then(t)}}}},function(n,t,e){"use strict";var r=e(132).setLocales;n.exports=function(){return{method:"PUT",config:{auth:"jwt"},path:"/admin/locales",handler:function(n,t){return r(n.payload).then(t)}}}},function(n,t,e){"use strict";var r=e(14),o=r(e(170)),i=r(e(88)),a=r(e(106)),s=r(e(173)),c=e(132),u=c.getSettings,l=c.getLocales;n.exports=function(){return{method:"GET",config:{auth:"jwt"},path:"/admin/settings",handler:(n=(0,s.default)(o.default.mark(function n(t,e){var r,s;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l();case 2:r=n.sent,s=(0,a.default)(r).map(function(n){return{code:n,name:r[n]._name}}),u().then(function(n){e((0,i.default)({},n,{availableLocales:s}))});case 5:case"end":return n.stop()}},n,this)})),function(t,e){return n.apply(this,arguments)})};var n}},function(n,t,e){n.exports=e(171)},function(n,t,e){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,n.exports=e(172),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(n){r.regeneratorRuntime=void 0}},function(n,t){!function(t){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof n,l=t.regeneratorRuntime;if(l)u&&(n.exports=l);else{(l=t.regeneratorRuntime=u?n.exports:{}).wrap=x;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={},m={};m[a]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(A([])));y&&y!==r&&o.call(y,a)&&(m=y);var b=L.prototype=k.prototype=Object.create(m);_.prototype=b.constructor=L,L.constructor=_,L[c]=_.displayName="GeneratorFunction",l.isGeneratorFunction=function(n){var t="function"==typeof n&&n.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,L):(n.__proto__=L,c in n||(n[c]="GeneratorFunction")),n.prototype=Object.create(b),n},l.awrap=function(n){return{__await:n}},S(j.prototype),j.prototype[s]=function(){return this},l.AsyncIterator=j,l.async=function(n,t,e,r){var o=new j(x(n,t,e,r));return l.isGeneratorFunction(t)?o:o.next().then(function(n){return n.done?n.value:o.next()})},S(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(n){var t=[];for(var e in n)t.push(e);return t.reverse(),function e(){for(;t.length;){var r=t.pop();if(r in n)return e.value=r,e.done=!1,e}return e.done=!0,e}},l.values=A,O.prototype={constructor:O,reset:function(n){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!n)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var n=this.tryEntries[0].completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var t=this;function r(r,o){return s.type="throw",s.arg=n,t.next=r,o&&(t.method="next",t.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===n)return this.complete(e.completion,e.afterLoc),C(e),v}},catch:function(n){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===n){var r=e.completion;if("throw"===r.type){var o=r.arg;C(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(n,t,r){return this.delegate={iterator:A(n),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=e),v}}}function x(n,t,e,r){var o=t&&t.prototype instanceof k?t:k,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(n,t,e){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var s=T(a,e);if(s){if(s===v)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===f)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=w(n,t,e);if("normal"===c.type){if(r=e.done?p:d,c.arg===v)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=p,e.method="throw",e.arg=c.arg)}}}(n,e,a),i}function w(n,t,e){try{return{type:"normal",arg:n.call(t,e)}}catch(n){return{type:"throw",arg:n}}}function k(){}function _(){}function L(){}function S(n){["next","throw","return"].forEach(function(t){n[t]=function(n){return this._invoke(t,n)}})}function j(n){var t;this._invoke=function(e,r){function i(){return new Promise(function(t,i){!function t(e,r,i,a){var s=w(n[e],n,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(n){t("next",n,i,a)},function(n){t("throw",n,i,a)}):Promise.resolve(u).then(function(n){c.value=n,i(c)},a)}a(s.arg)}(e,r,t,i)})}return t=t?t.then(i,i):i()}}function T(n,t){var r=n.iterator[t.method];if(r===e){if(t.delegate=null,"throw"===t.method){if(n.iterator.return&&(t.method="return",t.arg=e,T(n,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=w(r,n.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[n.resultName]=i.value,t.next=n.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function E(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]),2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]),this.tryEntries.push(t)}function C(n){var t=n.completion||{};t.type="normal",delete t.arg,n.completion=t}function O(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(E,this),this.reset(!0)}function A(n){if(n){var t=n[a];if(t)return t.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var r=-1,i=function t(){for(;++r WT_URL:",n("WT_URL")),i.info(" > PUBLIC_WT_URL:",a("PUBLIC_WT_URL")),o(n,t)});n.exports=function(n,t,e){a.setValue("PUBLIC_WT_URL",r.urlHelpers.getWebtaskUrl(t)),s(n,t,e)}},function(n,t){n.exports=require("auth0-extension-hapi-tools@1.2.2")},function(n,t,e){"use strict";(function(t){var r=e(3),o=e(4),i=o.FileStorageContext,a=o.WebtaskStorageContext,s=e(5),c=e(6),u=e(10),l=e(125).init,f=function(n){n?(u.error("Hapi initialization failed."),u.error(n)):u.info("Hapi initialization completed.")};n.exports=function(n,e,o){return s.setProvider(function(t){return n(t)||Object({NODE_ENV:"production",CLIENT_VERSION:"2.3.3"})[t]}),l(e?new a(e,{force:1}):new i(r.join(t,"../data.json"))),c(o||f)}}).call(this,"/")},function(n,t){n.exports=require("path")},function(n,t){n.exports=require("auth0-extension-tools@1.3.1")},function(n,t,e){"use strict";var r=e(4).config;n.exports=r()},function(n,t,e){"use strict";(function(t){var r=e(3),o=e(7),i=e(8),a=e(9),s=e(5),c=e(10),u=e(12),l=e(180),f=e(181);n.exports=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,d=new o.Server;return d.connection({host:"localhost",port:s("PORT"),routes:{cors:!0,validate:{},files:{relativeTo:r.join(t,"../public")}}}),d.register([a,i],function(){}),d.route({method:"GET",path:"/js/{file*}",config:{auth:!1},handler:{directory:{path:r.join(t,"../public/js")}}}),d.route({method:"GET",path:"/css/{file*}",config:{auth:!1},handler:{directory:{path:r.join(t,"../public/css")}}}),d.register([f,e,u],function(t){c.debug=function(){for(var n=arguments.length,t=new Array(n),e=0;e0?r[0].identities:[]).map(function(n){return n.provider}).map(l),a=f(i,n("or"));t(s({dynamicSettings:y,stylesheetTag:m,currentUser:e,matchingUsers:r,customCSSTag:g,locale:o,identities:a}))})})}).catch(function(r){var o=n.query.state;c.error("An error was encountered: ",r),c.info(`Redirecting to failed link to /continue: ${e.iss}continue?state=${n.query.state}`),t.redirect(`${e.iss}continue?state=${o}`)})}).catch(function(n){c.error("An invalid token was provided",n),s({dynamicSettings:y,stylesheetTag:m,currentUser:null,matchingUsers:[],customCSSTag:g}).then(function(n){t(n).code(400)})})}else t.redirect(`${i("PUBLIC_WT_URL")}/admin`).state("account-linking-admin-state","")}}}},function(n,t){n.exports=function(n){return n&&n.__esModule?n:{default:n}}},function(n,t,e){n.exports=e(16)},function(n,t,e){e(17),e(18),e(62),e(66),e(84),e(85),n.exports=e(26).Promise},function(n,t){},function(n,t,e){"use strict";var r=e(19)(!0);e(22)(String,"String",function(n){this._t=String(n),this._i=0},function(){var n,t=this._t,e=this._i;return e>=t.length?{value:void 0,done:!0}:(n=r(t,e),this._i+=n.length,{value:n,done:!1})})},function(n,t,e){var r=e(20),o=e(21);n.exports=function(n){return function(t,e){var i,a,s=String(o(t)),c=r(e),u=s.length;return c<0||c>=u?n?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?n?s.charAt(c):i:n?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(n,t){var e=Math.ceil,r=Math.floor;n.exports=function(n){return isNaN(n=+n)?0:(n>0?r:e)(n)}},function(n,t){n.exports=function(n){if(void 0==n)throw TypeError("Can't call method on "+n);return n}},function(n,t,e){"use strict";var r=e(23),o=e(24),i=e(40),a=e(29),s=e(41),c=e(42),u=e(58),l=e(60),f=e(59)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};n.exports=function(n,t,e,p,v,m,g){c(e,t,p);var y,b,x,w=function(n){if(!d&&n in S)return S[n];switch(n){case"keys":case"values":return function(){return new e(this,n)}}return function(){return new e(this,n)}},k=t+" Iterator",_="values"==v,L=!1,S=n.prototype,j=S[f]||S["@@iterator"]||v&&S[v],T=j||w(v),O=v?_?w("entries"):T:void 0,E="Array"==t&&S.entries||j;if(E&&(x=l(E.call(new n)))!==Object.prototype&&x.next&&(u(x,k,!0),r||"function"==typeof x[f]||a(x,f,h)),_&&j&&"values"!==j.name&&(L=!0,T=function(){return j.call(this)}),r&&!g||!d&&!L&&S[f]||a(S,f,T),s[t]=T,s[k]=h,v)if(y={values:_?T:w("values"),keys:m?T:w("keys"),entries:O},g)for(b in y)b in S||i(S,b,y[b]);else o(o.P+o.F*(d||L),t,y);return y}},function(n,t){n.exports=!0},function(n,t,e){var r=e(25),o=e(26),i=e(27),a=e(29),s=e(39),c=function(n,t,e){var u,l,f,d=n&c.F,h=n&c.G,p=n&c.S,v=n&c.P,m=n&c.B,g=n&c.W,y=h?o:o[t]||(o[t]={}),b=y.prototype,x=h?r:p?r[t]:(r[t]||{}).prototype;for(u in h&&(e=t),e)(l=!d&&x&&void 0!==x[u])&&s(y,u)||(f=l?x[u]:e[u],y[u]=h&&"function"!=typeof x[u]?e[u]:m&&l?i(f,r):g&&x[u]==f?function(n){var t=function(t,e,r){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,r)}return n.apply(this,arguments)};return t.prototype=n.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[u]=f,n&c.R&&b&&!b[u]&&a(b,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,n.exports=c},function(n,t){var e=n.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(n,t){var e=n.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)},function(n,t,e){var r=e(28);n.exports=function(n,t,e){if(r(n),void 0===t)return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,o){return n.call(t,e,r,o)}}return function(){return n.apply(t,arguments)}}},function(n,t){n.exports=function(n){if("function"!=typeof n)throw TypeError(n+" is not a function!");return n}},function(n,t,e){var r=e(30),o=e(38);n.exports=e(34)?function(n,t,e){return r.f(n,t,o(1,e))}:function(n,t,e){return n[t]=e,n}},function(n,t,e){var r=e(31),o=e(33),i=e(37),a=Object.defineProperty;t.f=e(34)?Object.defineProperty:function(n,t,e){if(r(n),t=i(t,!0),r(e),o)try{return a(n,t,e)}catch(n){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(n[t]=e.value),n}},function(n,t,e){var r=e(32);n.exports=function(n){if(!r(n))throw TypeError(n+" is not an object!");return n}},function(n,t){n.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},function(n,t,e){n.exports=!e(34)&&!e(35)(function(){return 7!=Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a})},function(n,t,e){n.exports=!e(35)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(n,t){n.exports=function(n){try{return!!n()}catch(n){return!0}}},function(n,t,e){var r=e(32),o=e(25).document,i=r(o)&&r(o.createElement);n.exports=function(n){return i?o.createElement(n):{}}},function(n,t,e){var r=e(32);n.exports=function(n,t){if(!r(n))return n;var e,o;if(t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;if("function"==typeof(e=n.valueOf)&&!r(o=e.call(n)))return o;if(!t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;throw TypeError("Can't convert object to primitive value")}},function(n,t){n.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},function(n,t){var e={}.hasOwnProperty;n.exports=function(n,t){return e.call(n,t)}},function(n,t,e){n.exports=e(29)},function(n,t){n.exports={}},function(n,t,e){"use strict";var r=e(43),o=e(38),i=e(58),a={};e(29)(a,e(59)("iterator"),function(){return this}),n.exports=function(n,t,e){n.prototype=r(a,{next:o(1,e)}),i(n,t+" Iterator")}},function(n,t,e){var r=e(31),o=e(44),i=e(56),a=e(53)("IE_PROTO"),s=function(){},c=function(){var n,t=e(36)("iframe"),r=i.length;for(t.style.display="none",e(57).appendChild(t),t.src="javascript:",(n=t.contentWindow.document).open(),n.write(" \n \n \n {{ Auth0Widget }}\n {{ ExtensionScripts }}\n \n\n'},function(n,t,e){"use strict";var r=null;n.exports.init=function(n){r=n},n.exports.get=function(){if(!r)throw new Error("The DB has not been initialized.");return r}},function(n,t,e){"use strict";var r=e(14)(e(127)),o=e(131).resolveLocale,i=e(133).getSettings,a=e(134),s=e(135),c=e(135).lockOutlineClass,u=new RegExp(/\{\{(\s+)?identities(\s+)?\}\}/);n.exports=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return i().then(function(i){var l=(0,r.default)(i,n);return o(e).then(function(n){return`\n
\n
\n ${s(l.removeOverlay)}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(n){return""!==n.logoPath?``:`\n `}(l)}\n
${function(n,t){return""!==n.title?n.title:t("accountLinking")}(l,n)}
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n

\n ${n("introduction")} ${n("identities").replace(u,t)}.\n

\n

\n \n

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ${function(n,t){var e="";return""!==n.color&&(e=`style="background-color: ${n.color}"`),`\n `}(l,n)}\n
\n
\n
\n
\n
\n
\n
\n \n\n\n${o(e)}\n\n
\n
\n

Custom Hosted Page

\n\n \n\n

Widget Settings

\n\n
\n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n Remove widget's overlay\n
\n\n \n
\n
\n\n\n${r}\n\n\n`}},function(n,t,e){"use strict";var r=e(164);n.exports=`\n \n\n\n${o(e)}\n\n
\n
\n
\n
\n
\n
\n

Add new locale \n ?\n
\n
\n
Adding a new locale
\n

You can add custom locales for your users to use. You will need to specify the following data:

\n
    \n
  • ISO Code: ISO 639-1 Complaint Locale Code. i.e.: es, en, pt.
  • \n
  • Name: A friendly name for the locale. i.e.: Spanish, English, Portuguese.
  • \n
\n
\n
\n

\n
\n \n \n \n \n \n
\n
\n
\n \n \n
\n

\n\n \n \n \n
NameMessage
\n\n \n \n
\n \n
\n
Remove locale
\n
\n

Once removed, you cannot undo this change.

\n Remove locale\n
\n

\n
\n
\n
\n\n\n${r}\n\n\n`}},function(n,t,e){"use strict";var r=e(133).getLocales;n.exports=function(){return{method:"GET",config:{auth:"jwt"},path:"/admin/locales",handler:function(n,t){return r().then(t)}}}},function(n,t,e){"use strict";var r=e(133).setLocales;n.exports=function(){return{method:"PUT",config:{auth:"jwt"},path:"/admin/locales",handler:function(n,t){return r(n.payload).then(t)}}}},function(n,t,e){"use strict";var r=e(14),o=r(e(171)),i=r(e(89)),a=r(e(107)),s=r(e(174)),c=e(133),u=c.getSettings,l=c.getLocales;n.exports=function(){return{method:"GET",config:{auth:"jwt"},path:"/admin/settings",handler:(n=(0,s.default)(o.default.mark(function n(t,e){var r,s;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l();case 2:r=n.sent,s=(0,a.default)(r).map(function(n){return{code:n,name:r[n]._name}}),u().then(function(n){e((0,i.default)({},n,{availableLocales:s}))});case 5:case"end":return n.stop()}},n,this)})),function(t,e){return n.apply(this,arguments)})};var n}},function(n,t,e){n.exports=e(172)},function(n,t,e){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,n.exports=e(173),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(n){r.regeneratorRuntime=void 0}},function(n,t){!function(t){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof n,l=t.regeneratorRuntime;if(l)u&&(n.exports=l);else{(l=t.regeneratorRuntime=u?n.exports:{}).wrap=x;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={},m={};m[a]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(A([])));y&&y!==r&&o.call(y,a)&&(m=y);var b=L.prototype=k.prototype=Object.create(m);_.prototype=b.constructor=L,L.constructor=_,L[c]=_.displayName="GeneratorFunction",l.isGeneratorFunction=function(n){var t="function"==typeof n&&n.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,L):(n.__proto__=L,c in n||(n[c]="GeneratorFunction")),n.prototype=Object.create(b),n},l.awrap=function(n){return{__await:n}},S(j.prototype),j.prototype[s]=function(){return this},l.AsyncIterator=j,l.async=function(n,t,e,r){var o=new j(x(n,t,e,r));return l.isGeneratorFunction(t)?o:o.next().then(function(n){return n.done?n.value:o.next()})},S(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(n){var t=[];for(var e in n)t.push(e);return t.reverse(),function e(){for(;t.length;){var r=t.pop();if(r in n)return e.value=r,e.done=!1,e}return e.done=!0,e}},l.values=A,C.prototype={constructor:C,reset:function(n){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!n)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var n=this.tryEntries[0].completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var t=this;function r(r,o){return s.type="throw",s.arg=n,t.next=r,o&&(t.method="next",t.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===n)return this.complete(e.completion,e.afterLoc),E(e),v}},catch:function(n){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===n){var r=e.completion;if("throw"===r.type){var o=r.arg;E(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(n,t,r){return this.delegate={iterator:A(n),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=e),v}}}function x(n,t,e,r){var o=t&&t.prototype instanceof k?t:k,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(n,t,e){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var s=T(a,e);if(s){if(s===v)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===f)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=w(n,t,e);if("normal"===c.type){if(r=e.done?p:d,c.arg===v)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=p,e.method="throw",e.arg=c.arg)}}}(n,e,a),i}function w(n,t,e){try{return{type:"normal",arg:n.call(t,e)}}catch(n){return{type:"throw",arg:n}}}function k(){}function _(){}function L(){}function S(n){["next","throw","return"].forEach(function(t){n[t]=function(n){return this._invoke(t,n)}})}function j(n){var t;this._invoke=function(e,r){function i(){return new Promise(function(t,i){!function t(e,r,i,a){var s=w(n[e],n,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(n){t("next",n,i,a)},function(n){t("throw",n,i,a)}):Promise.resolve(u).then(function(n){c.value=n,i(c)},a)}a(s.arg)}(e,r,t,i)})}return t=t?t.then(i,i):i()}}function T(n,t){var r=n.iterator[t.method];if(r===e){if(t.delegate=null,"throw"===t.method){if(n.iterator.return&&(t.method="return",t.arg=e,T(n,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=w(r,n.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[n.resultName]=i.value,t.next=n.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function O(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]),2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]),this.tryEntries.push(t)}function E(n){var t=n.completion||{};t.type="normal",delete t.arg,n.completion=t}function C(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(O,this),this.reset(!0)}function A(n){if(n){var t=n[a];if(t)return t.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var r=-1,i=function t(){for(;++r