PageSourceSearch

https://www.hobbyconsolas.com/assets/global.bundle.js?1790695433

js hobbyconsolas.com collected 2026-10-02 02:17:36 UTC 110,644 bytes, 2 lines download raw bytes

1/*! For license information please see global.bundle.js.LICENSE.txt */
2(()=>{var t={5366:()=>{var t=function(){document.querySelectorAll('[data-type="menu"]').forEach((function(t){t.addEventListener("click",(function(){document.body.classList.contains("open-navigation")?document.body.classList.remove("open-navigation"):document.body.classList.add("open-navigation")}))}))},e=function(){window.innerWidth>992&&document.body.classList.remove("open-navigation")},r=function(){t(),function(){var t,e=2===(t="; ".concat(document.cookie).split("; ".concat("edition","="))).length?t.pop().split(";").shift():null,r=document.querySelector("nav.c-header__select.u-show-lg-only > strong");if(r)switch(e){case"cat":r.textContent="EDICIÓN CATALUÑA";break;case"mad":r.textContent="EDICIÓN MADRID";break;case"":r.textContent="EDICIÓN ESPAÑA"}}()};"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?r():document.addEventListener("DOMContentLoaded",r),window.addEventListener("resize",(function(){e()}))},5694:(t,e,r)=>{"use strict";r.r(e);const n=function(){var t=window.location.hostname.toLowerCase(),e=null;switch(!0){case t.includes("businessinsider"):e="businessinsider";break;case t.includes("hobbyconsolas"):e="hobbyconsolas";break;case t.includes("topgear"):e="topgear";break;case t.includes("computerhoy"):e="computerhoy";break;case t.includes("autobild"):e="autobild";break;default:e="20minutos"}return e};var o=function(t,e,r,n){if(!function(t){for(var e="".concat(t,"="),r=decodeURIComponent(document.cookie).split(";"),n=0;n<r.length;n++){var o=r[n].trim();if(0===o.indexOf(e))return o.substring(e.length)}return""}(t)){var o=new Date;o.setTime(o.getTime()+24*r*60*60*1e3);var i="expires=".concat(o.toUTCString());n||(n=window.location.hostname);var a="domain=".concat(n);document.cookie="".concat(t,"=").concat(e,";").concat(i,";").concat(a,";path=/")}};function i(t){return 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},i(t)}function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:O(t,r,u)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",y="executing",g="completed",v={};function m(){}function w(){}function b(){}var L={};f(L,c,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(U([])));S&&S!==r&&n.call(S,c)&&(L=S);var E=b.prototype=m.prototype=Object.create(L);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,u,c){var s=d(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=d(e,r,n);if("normal"===s.type){if(o=n.done?g:"suspendedYield",s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&
2(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function U(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},k(_.prototype),f(_.prototype,s,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(E),f(E,l,"Generator"),f(E,c,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=U,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:U(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function s(t){var e=(t||"").match(/^\/user\/(login|register|profile|reset-password|verify|logout)\/?$/);return e?e[1]:null}function l(){return window.location.pathname.includes("/area-usuario/")}function f(){var t=new URLSearchParams(window.location.search),e=s(window.location.pathname)||"login";["login","register","profile","reset-password","verify","logout"].includes(e)||(e="login"),l()&&(e="profile");var r=t.get("back")||"/";return""===r&&(r="/"),/^https?:\/\//i.test(r)||("/"!==r[0]&&(r="/"+r.replace(/^\/+/,"")),r=window.location.origin+r),{mode:e,backUrl:r,regSource:t.get("regSource")||""}}var h="gigya-loading";function d(){var t=document.getElementById(h);t&&(t.hidden=!1,t.setAttribute("aria-busy","true"))}function p(){var t=document.getElementById(h);t&&(t.hidden=!0,t.setAttribute("aria-busy","false"))}function y(t,e){void 0===e&&(e={}),e.screenSet=t,d();var r=e.onAfterScreenLoad;e.onAfterScreenLoad=function(t){p(),"function"==typeof r&&r(t)};var n=e.onError;e.onError=function(t){p(),"function"==typeof n&&n(t)},gigya.accounts.showScreenSet(e)}function g(t,e){HenneoAuth.ready().then(function(){var r=c(a().mark((function r(n){return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.login(t.id_token);case 2:r.sent,"/user/login"==window.location.pathname&&(window.location.href=e||"/"),"/user/register"==window.location.pathname&&(window.location.href=e||"/");case 7:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}())}function v(t){t.selectors.deleteUser&&document.addEventListener("click",function(){var e=c(a().mark((function e(r){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.target.matches(t.selectors.deleteUser)){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,HenneoAuth.ready().then(function(){var e=c(a().mark((function e(r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.deleteUser();case 2:"anonymous"===e.sent.sessionStatus&&(t&&t.profileUpdateScreenset&&t.deleteUserDestinationScreen?((n={}).startScreen=t.deleteUserDestinationScreen,y(t.profileUpdateScreenset,n)):alert("Usuario eliminado"));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function m(t){t.selectors.deleteUserButton&&document.addEventListener("click",(function(e){e.target.matches(t.selectors.deleteUserButton)&&y(t.profileUpdateScreenset,{startScreen:t.deleteUserScreen})}))}function w(t){var e=t.selectors.resetPasswordTab;if(e){var r=!1;document.addEventListener("click",(function(n){if(n.target.matches(e)&&!r){r=!0;var o={startScreen:t.resetPasswordStartScreen};t.selectors.resetPasswordContainer&&(o.containerID=t.selectors.resetPasswordContainer),o.onAfterSubmit=function(t){t&&0===t.response.errorCode&&HenneoAuth.resetPassword().then((function(t){window.alert("Contraseña actualizada correctamente")}))},y(t.resetPasswordScreenset,o)}}))}}function b(t){return L.apply(this,arguments)}function L(){return L=c(a().mark((function t(e){var r,n,o,i,u,s,l,h;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=f(),n=r.mode,o=r.backUrl,i=r.regSource,s={containerID:"gigya-container"},"verify"!==n){t.next=9;break}return l=new Promise((function(t){var e;gigya.accounts.getJWT({callback:(e=c(a().mark((function e(r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&0===r.errorCode){e.next=2;break}return e.abrupt("return",t("/"));case 2:return e.next=4,HenneoAuth.ready();case 4:return n=e.sent,e.next=7,n.login(r.id_token);case 7:gigya.accounts.getAccountInfo({include:"regSource",callback:function(e){return t(0===e.errorCode&&e.regSource||"/")}});case 8:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})})})),h=new Promise((function(t){return setTimeout((function(){return t("/")}),5e3)})),t.next=7,Promise.race([l,h]);case 7:return window.location.href=t.sent,t.abrupt("return");case 9:if("profile"===n?(u=e.profileUpdateScreenset,s.onAfterSubmit=function(t){t&&0===t.response.errorCode&&("gigya-change-password-screen"==t.screen?HenneoAuth.resetPassword().then((function(t){window.alert("Contraseña actualizada correctamente")})):gigya.accounts.setAccountInfo({data:{jwtCoralToken:null,jwtLogoraToken:null},callback:function(t){HenneoAuth.ready().then(function(){var t=c(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.refresh();case 2:window.alert("Perfil actualizado correctamente");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}))},v(e),m(e),w(e)):u=e.registrationLoginScreenset,"register"===n&&(s.startScreen=e.registrationLoginStartScreen,o&&(s.regSource=o),i&&(s.regSource=i)),"reset-password"===n&&(u=e.resetForgottenPasswordScreenset,s.startScreen=e.resetForgottenPasswordStartScreen),"logout"!==n){t.next=15;break}return HenneoAuth.ready().then(function(){var t=c(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.logout();case 2:window.location.href=o||"/";case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return");case 15:gigya.accounts.addEventHandlers({onLogin:function(){gigya.accounts.getJWT({callback:function(t){t&&0===t.errorCode&&(p(),g(t,o))}})},onLogout:function(){HenneoAuth.ready().then(function(){var t=c(a().mark((function t(e){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.logout();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}),HenneoAuth.ready().then(function(){var t=c(a().mark((function t(e){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.isAuthenticated();case 2:r=t.sent,["login","register"].includes(n)&&!r?gigya.accounts.getJWT({callback:function(t){t&&0===t.errorCode?(p(),g(t,o)):y(u,s)}}):y(u,s);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 17:case"end":return t.stop()}}),t)}))),L.apply(this,arguments)}function x(t){return 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},x(t)}function S(){S=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:O(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(U([])));L&&L!==r&&n.call(L,a)&&(w=L);var E=m.prototype=g.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==x(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}
vendor: 4,472 bytes, line 2
2for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function U(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(x(e)+" is not iterable")}return v.prototype=m,o(E,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},k(_.prototype),s(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(E),s(E,c,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=U,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}}
vendor: 4,658 bytes, line 2
2,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:U(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function E(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function k(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){E(i,n,o,a,u,"next",t)}function u(t){E(i,n,o,a,u,"throw",t)}a(void 0)}))}}var _=function(t){return{errorCode:0,UID:t.id,profile:{email:t.email,firstName:t.firstName,lastName:t.lastName,age:t.age,birthDay:t.birthDay,birthMonth:t.birthMonth,birthYear:t.birthYear,username:t.username,thumbnailURL:t.thumbnailURL,phones:t.phones,zip:t.zip,gender:t.gender},data:t.customData,status:"OK",errorMessage:"",statusMessage:"",operation:"/accounts.getAccountInfo"}},O=Date.now(),P=window.location.search.includes("lm_debug=true");function A(t,e,r){if(P){var n="color: #fff;background: darkblue;display: inline-block;padding: 1px 4px;border-radius: 3px;",o=" ⏲ ".concat(Date.now()-O,"ms - ").concat(e);return r?console.log("%c".concat(t),n,o,r):console.log("%c".concat(t),n,o)}}function j(t){return j="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},j(t)}function T(){T=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(U([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==j(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function U(e){if(e||""===e){var r=e[a];if(r)return r.call(e);
2if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(j(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=U,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:U(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function U(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function C(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){U(i,n,o,a,u,"next",t)}function u(t){U(i,n,o,a,u,"throw",t)}a(void 0)}))}}function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function N(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,D(n.key),n)}}function M(t,e,r){return(e=D(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t){var e=function(t,e){if("object"!=j(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==j(e)?e:e+""}var G=function(){return t=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),M(this,"loggedUser",void 0),M(this,"gigyaConfig",void 0),M(this,"userMenuUtils",void 0),this.gigyaConfig=e,this.userMenuUtils=r,this.prometeoUtils=n,window.gigyaRegistrationLoginScreenset=e.registrationLoginScreenset},e=[{key:"emitEvent",value:function(t,e){A("LoginManager","Emitting event ".concat(t," with payload"),e);var r=new CustomEvent(t,{detail:e});document.dispatchEvent(r)}},{key:"pushDataLayer",value:function(t){(window.dataLayer=window.dataLayer||[]).push(t)}},{key:"setGlobalVars",value:function(t){var e=window.dataLayer=window.dataLayer||[];e[0]||(e[0]={}),e[0].user_id=t.id,e[0].user_logged="1",this.pushDataLayer({user_logged:1,user_id:t.id}),window.gigyaProfile=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
2e%2?I(Object(r),!0).forEach((function(e){M(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({UID:t.id},t),window.gigyaData=t.customData,window.userUID=t.id}},{key:"removeGlobalVars",value:function(){var t=window.dataLayer=window.dataLayer||[];t[0]||(t[0]={}),t[0].user_id="",t[0].user_logged="0",this.pushDataLayer({user_logged:0,user_id:""}),window.gigyaProfile=null,window.gigyaData=null,window.userUID=null}},{key:"getSession",value:function(){return this.loggedUser}},{key:"resetLoginBar",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?this.userMenuUtils.setUserIconAsLogged(t):this.userMenuUtils.setDefaultIcon()}},{key:"loggedInActions",value:(i=C(T().mark((function t(e){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A("LoginManager","User logged in",e),this.loggedUser=e,this.setGlobalVars(e),this.resetLoginBar(e),o(this.gigyaConfig.cookieName,e.id,365,this.gigyaConfig.domain),A("LoginManager","Prometeo data updated on login",this.prometeoUtils.updatePrometeoData(e,this.gigyaConfig.cookieName)),this.sendUserInteractionToMarfeel(),this.emitEvent("ciam.getaccountinfo",_(e));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"loggedOutActions",value:(n=C(T().mark((function t(){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loggedUser=null,this.pushDataLayer({event:"gigya",category:"gigya",action:"logout"}),this.emitEvent("ciam.getaccountinfo",{status:"FAIL",errorMessage:"Unauthorized user",statusMessage:"Unauthorized user",errorCode:403005,requestParams:{connectWithoutLoginBehavior:"loginExistingUser",defaultRegScreenSet:"20minutos.es-RegistrationLogin",defaultMobileRegScreenSet:"20minutos.es-RegistrationLogin",sessionExpiration:-2,rememberSessionExpiration:0,apiDomain:"eu1.gigya.com",enabledProviders:"*",lang:"es",customEventMap:{eventMap:[{events:"*",args:[null]}]}},operation:"/accounts.getAccountInfo"}),this.resetLoginBar(),this.removeGlobalVars(),e=this.gigyaConfig.cookieName,(r=this.gigyaConfig.domain)||(r=window.location.hostname),document.cookie="".concat(e,"=;domain=").concat(r,";path=/;max-age=0"),A("LoginManager","Prometeo data updated on logout",this.prometeoUtils.updatePrometeoData(null,this.gigyaConfig.cookieName)),this.sendUserInteractionToMarfeel(),A("LoginManager","User logged out");case 10:case"end":return t.stop()}var e,r}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getRoleForMarfeel",value:function(){return this.loggedUser?["logged"]:["0"]}},{key:"sendUserInteractionToMarfeel",value:function(){var t=this.getRoleForMarfeel(),e=this.loggedUser?this.loggedUser.id:void 0;A("LoginManager","User roles for Marfeel",t),e&&A("LoginManager","User UID for Marfeel",e),window.marfeel.cmd.push(["compass",function(r){t&&t.forEach((function(t){r.setUserType(t)})),e&&r.setSiteUserId(e)}])}},{key:"getBackUrl",value:function(){return window.location.pathname+window.location.search+window.location.hash}},{key:"redirectToLogin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";["login","register","profile"].includes(t)||(t="login");var r=new URLSearchParams;"login"!==t&&"register"!==t||r.set("back",this.getBackUrl()),e&&r.set("regSource",e);var n="/user/"+t,o=r.toString();window.location.href=o?n+"?"+o:n}},{key:"onLogoutHandler",value:(r=C(T().mark((function t(){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,HenneoAuth.ready().then(function(){var t=C(T().mark((function t(e){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.logout();case 2:"/user/profile"==window.location.pathname&&window.location.assign("/");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"setupUIEventsHandlers",value:function(){var t,e,r,n=this,o=this.gigyaConfig.selectors;
2o.loginHookClass&&document.querySelectorAll(o.loginHookClass).forEach((function(t){t.addEventListener("click",(function(e){if(!n.loggedUser){var r=t.classList.contains("c-nav__link")?window.location.href+"#hamburger":void 0;n.redirectToLogin("login",r)}}))})),o.logoutHookClass&&(null===(t=document.querySelector(o.logoutHookClass))||void 0===t||t.addEventListener("click",function(){var t=C(T().mark((function t(e){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.onLogoutHandler();case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),o.editProfileHookClass&&(null===(e=document.querySelector(o.editProfileHookClass))||void 0===e||e.addEventListener("click",(function(t){null!==n.loggedUser&&n.redirectToLogin("profile")}))),o.registerHookClass&&(null===(r=document.querySelector(o.registerHookClass))||void 0===r||r.addEventListener("click",(function(t){if(!n.loggedUser){var e=window.location.href+"#hamburger";n.redirectToLogin("register",e)}})))}},{key:"initGigya",value:function(){void 0===window.__gigyaConf?(A("LoginManager","Gigya not found, initializing Gigya fake"),function(){var t={onLogin:[],onLogout:[]},e="function"==typeof window.onGigyaServiceReady?window.onGigyaServiceReady:null,r=function(t){if("function"==typeof t)try{t()}catch(t){console.error("gigyaFake onGigyaServiceReady handler failed",t)}},n=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(t[e]||[]).forEach((function(t){try{t(r)}catch(t){console.error("gigyaFake ".concat(e," handler failed"),t)}}))},o=function(t){return{eventName:"login",provider:"site",loginMode:"standard",UID:t.user.id,profile:{email:t.user.email,firstName:t.user.firstName,lastName:t.user.lastName,age:t.user.age,birthDay:t.user.birthDay,birthMonth:t.user.birthMonth,birthYear:t.user.birthYear,username:t.user.username,thumbnailURL:t.user.thumbnailURL,phones:t.user.phones,zip:t.user.zip,gender:t.user.gender},data:t.user.customData,isGlobal:!0,fullEventName:"accounts.login",source:"showScreenSet",context:{}}},i=function(){var t=k(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,HenneoAuth.ready().then((function(t){t.getSession().then((function(t){t.isAuthenticated?n("onLogin",o(t)):"anonymous"===t.sessionStatus&&n("onLogout")})),t.onLogin((function(t){n("onLogin",o(t))})),t.onLogout((function(){n("onLogout")}))}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),a=function(){var t=k(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=k(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,HenneoAuth.ready().then(function(){var t=k(S().mark((function t(r){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.getSession();case 2:(n=t.sent).isAuthenticated&&e(_(n.user)),e({status:"FAIL",errorMessage:"Unauthorized user",statusMessage:"Unauthorized user",errorCode:403005,requestParams:{connectWithoutLoginBehavior:"loginExistingUser",defaultRegScreenSet:"20minutos.es-RegistrationLogin",defaultMobileRegScreenSet:"20minutos.es-RegistrationLogin",sessionExpiration:-2,rememberSessionExpiration:0,apiDomain:"eu1.gigya.com",enabledProviders:"*",lang:"es",customEventMap:{eventMap:[{events:"*",args:[null]}]}},operation:"/accounts.getAccountInfo"});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),u=function(){var t=k(S().mark((function t(){var e,r,n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,HenneoAuth.ready();case 3:return e=t.sent,t.next=6,e.getSession();case 6:if((r=t.sent)&&r.isAuthenticated){t.next=9;break}return t.abrupt("return",{errorCode:403005,operation:"/accounts.getJWT"});case 9:return t.next=11,fetch("/post/user/gigya-jwt-token",{method:"POST",credentials:"include"});case 11:if((n=t.sent).ok){t.next=14;break}return t.abrupt("return",{callId:"1b0f125b7b904a2582340cfa89922ade",errorCode:403005,apiVersion:2,statusCode:403,statusReason:"Unauthorized"});case 14:return t.next=16,n.json();case 16:return o=t.sent,t.abrupt("return",{callId:"1b0f125b7b904a2582340cfa89922ade",errorCode:0,apiVersion:2,statusCode:200,statusReason:"OK",t
2ime:"2016-12-18T11:23:36.315Z",ignoredFields:"",id_token:o.jwt});case 20:return t.prev=20,t.t0=t.catch(0),t.abrupt("return",{callId:"1b0f125b7b904a2582340cfa89922ade",errorCode:403005,apiVersion:2,statusCode:403,statusReason:"Unauthorized"});case 23:case"end":return t.stop()}}),t,null,[[0,20]])})));return function(){return t.apply(this,arguments)}}(),c={getAccountInfo:function(t){var e=t.callback;a().then((function(t){e(t)}))},addEventHandlers:function(e){var r=e.onLogin,n=e.onLogout;"function"==typeof r&&t.onLogin.push(r),"function"==typeof n&&t.onLogout.push(n)},getJWT:function(t){t.fields;var e=t.callback;u().then((function(t){e(t)}))}},s={getUserInfo:function(t){var e=t.callback;a().then((function(t){e(t)}))},addEventHandlers:function(e){var r=e.onLogin,n=e.onLogout;"function"==typeof r&&t.onLogin.push(r),"function"==typeof n&&t.onLogout.push(n)}};window.gigya={isFake:!0,accounts:c,socialize:s};try{Object.defineProperty(window,"onGigyaServiceReady",{configurable:!0,enumerable:!0,get:function(){return e},set:function(t){e=t,r(t)}})}catch(t){console.error("gigyaFake could not redefine onGigyaServiceReady",t)}r(e),i()}(),A("LoginManager","Gigya fake initialized")):(A("LoginManager","Gigya found, initializing Gigya"),function(t){var e=s(window.location.pathname);if(l()||document.getElementById("gigya-container")||"verify"===e)if(d(),window.gigya&&window.gigya.isGigya)b(t);else{var r=window.onGigyaServiceReady;window.onGigyaServiceReady=function(){if("function"==typeof r)try{r()}catch(t){}b(t)}}}(this.gigyaConfig),A("LoginManager","Gigya initialized"))}},{key:"checkRoute",value:function(t){t.isAuthenticated||"/user/profile"!=window.location.pathname||window.location.assign("/"),t.isAuthenticated&&"/user/login"==window.location.pathname&&window.location.assign("/"),t.isAuthenticated&&"/user/register"==window.location.pathname&&window.location.assign("/")}},{key:"resolveLoginContext",value:function(){for(var t=new URLSearchParams(window.location.search),e=t.get("back"),r=t.get("regSource"),n=t.get("newsletter"),o=0,i=[e,r];o<i.length;o++){var a=i[o];if(a){var u=a.indexOf("#");if(-1!==u){var c=a.slice(u+1);if("comentarios"===c)return{type:"comentarios"};if("qualifio"===c)return{type:"qualifio"};if("mis-noticias"===c)return{type:"misNoticias"};var s=c.match(/^newsletter(?:=(.*))?$/);if(s)return s[1],{type:"newsletter",name:n?decodeURIComponent(n):null}}}}return null}},{key:"getLoginMessage",value:function(){var t=this.resolveLoginContext();return t?"newsletter"===t.type&&t.name?this.gigyaConfig.messages.newsletterWithTitle.replace("{{title}}",t.name):this.gigyaConfig.messages[t.type]:this.gigyaConfig.messages.default}},{key:"setupLoginMessage",value:function(){var t=document.querySelector(".o-login__message");if(t){var e=this.getLoginMessage();e&&(t.textContent=e,t.hidden=!1)}}},{key:"setupUILoginPage",value:function(){if("/user/login"===window.location.pathname){this.setupLoginMessage();var t=document.querySelector(".o-login__register-link a"),e=document.querySelector(".cablogin h3:last-child a");if(t){var r=new URLSearchParams(window.location.search),n=r.get("back"),o=r.get("regSource"),i=new URLSearchParams;n&&i.set("back",n),o&&i.set("regSource",o);var a=i.toString();t.href=a?"/user/register?".concat(a):"/user/register",e.href=a?"/user/register?".concat(a):"/user/register"}}}},{key:"init",value:function(){var t=this;A("LoginManager","Initializing LoginManager"),this.initGigya(),A("LoginManager","Setting up login handlers and updating login status"),this.setupUIEventsHandlers(),this.setupUILoginPage(),this.userMenuUtils.setUserDropDownMenuBehaviour(),HenneoAuth.ready().then((function(e){e.getSession().then((function(e){A("LoginManager","Initial session loaded",e),"authenticated"===e.sessionStatus?t.loggedInActions(e.user):"anonymous"!==e.sessionStatus&&"error"!==e.sessionStatus&&"unknown"!==e.sessionStatus||t.loggedOutActions(),t.checkRoute(e)})),e.onLogin((function(e){A("LoginManager","Login event received",e),e.isAuthenticated&&t.loggedInActions(e.user)})),e.onLogout((function(e){A("LoginManager","Logout event received",e),t.loggedOutActions()})),A("LoginManager","LoginManager initialized")}))}}],e&&N(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n,i}();function R(t){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},R(t)}function F(){F=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(j([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==R(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}
vendor: 4,472 bytes, line 2
2for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(R(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}}
2,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function q(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){q(i,n,o,a,u,"next",t)}function u(t){q(i,n,o,a,u,"throw",t)}a(void 0)}))}}function z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,V(n.key),n)}}function Y(t,e,r){return e&&z(t.prototype,e),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function B(t,e,r){return(e=V(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function V(t){var e=function(t,e){if("object"!=R(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==R(e)?e:e+""}var W=Y((function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),B(this,"gigyaConfig",void 0),B(this,"loginDisplay",void 0),B(this,"fakeLoginDisplay",void 0),B(this,"menu",document.querySelector(".c-header__options nav.c-header__user__nav")),B(this,"createOrUpdateUserThumbnail",(function(t){var e=document.getElementById(o.gigyaConfig.selectors.loggedIcon);e||((e=document.createElement("img")).id=o.gigyaConfig.selectors.loggedIcon,e.width=35,e.height=35,e.className="c-header__user__img",o.loginDisplay.appendChild(e)),e.src=t.thumbnailURL||t.photoURL,e.alt=t.firstName||"Nombre usuario"})),B(this,"setUserIconAsLogged",(function(t){if(this.loginDisplay){this.loginDisplay.classList.add("c-header__user--logged");var e=this.loginDisplay.querySelector(".c-header__user__icon");if(e&&"svg"===e.tagName.toLowerCase()){e&&(e.style.display="none");var r=document.getElementById(this.gigyaConfig.selectors.loggedIcon);if(r&&r.remove(),t.thumbnailURL||t.photoURL)this.createOrUpdateUserThumbnail(t);else{var n=document.createElement("span");n.id=this.gigyaConfig.selectors.loggedIcon,n.className="c-header__user__icon";var o=t.firstName||t.nickName||t.email||"?";n.textContent=o.charAt(0).toUpperCase(),this.loginDisplay.appendChild(n)}}else{if(e){var i=t.firstName||t.nickName||"Usuario";e.textContent="Hola, ".concat(i)}(t.thumbnailURL||t.photoURL)&&(this.createOrUpdateUserThumbnail(t),this.fakeLoginDisplay&&(this.fakeLoginDisplay.style.display="none"))}}else console.warn("Login display not found.")})),B(this,"setDefaultIcon",(function(){if(this.loginDisplay){this.loginDisplay.classList.remove("c-header__user--logged");var t=this.loginDisplay.querySelector(".c-header__user__icon");t&&"svg"===t.tagName.toLowerCase()?t&&(t.style.display=""):(t&&(t.textContent="Inicia sesión"),this.fakeLoginDisplay&&(this.fakeLoginDisplay.style.display=""));var e=document.getElementById(this.gigyaConfig.selectors.loggedIcon);e&&e.remove()}})),B(this,"showUserMenu",(function(){this.menu?(this.menu.style.display="block",this.menu.style.backgroundColor="white",this.menu.style.visibility="visible"):console.warn("User menu container not found.")})),B(this,"hideMenu",(function(){document.querySelector("body").classList.remove("open-user")})),B(this,"setUserDropDownMenuBehaviour",(function(){var t=document.querySelector("body"),e=document.querySelector(".c-header__user");e&&(e.addEventListener("click",function(){var e=H(F().mark((function e(r){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,HenneoAuth.ready().then(function(){var e=H(F().mark((function e(n){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.isAuthenticated();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:r.stopPropagation(),t.classList.toggle("open-user");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),document.addEventListener("click",(function(r){e.contains(r.target)||document.querySelector(".open-user .c-user-menu")||t.classList.remove("open-user")})))}
2)),this.gigyaConfig=e,this.loginDisplay=document.querySelector(null===(r=this.gigyaConfig.selectors)||void 0===r?void 0:r.loginDisplay),this.fakeLoginDisplay=document.querySelector(null===(n=this.gigyaConfig.selectors)||void 0===n?void 0:n.fakeLoginDisplay)}));function J(t){return J="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},J(t)}function K(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Q(n.key),n)}}function Q(t){var e=function(t,e){if("object"!=J(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=J(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==J(e)?e:e+""}var Z=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getAgeRange",value:function(t){return"number"!=typeof t||t<18?"":t<25?"18-24":t<35?"25-34":t<45?"35-44":t<55?"45-54":t<65?"55-64":"65+"}},{key:"getQualifioTags",value:function(t){return t&&Array.isArray(t.participaciones)?t.participaciones.map((function(t){return t.tag})):[]}},{key:"buildUserData",value:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cuser";return t?{reg_id:t.id,email:t.email,nickName:t.username||"",firstName:t.firstName||"",lastName:t.lastName||"",ageRange:this.getAgeRange(t.age),gender:t.gender||"",gameTags:this.getQualifioTags(null!==(e=null===(r=t.customData)||void 0===r?void 0:r.qualifio)&&void 0!==e?e:[]),city:t.city||"",geoCity:t.city||"",geoRegion:"",geoCountry:"",zip:t.zip||"",lastModify:t.lastUpdated||"",cookieKey:n,dateCreate:t.registered?t.registered.split("T")[0]:""}:{}}},{key:"sendToPrometeo",value:function(t){window._PROMETEO_MEDIA_CONFIG&&window._PROMETEO_MEDIA_CONFIG.setClientEncrypt?window._PROMETEO_MEDIA_CONFIG.setClientEncrypt(t):document.addEventListener("setClientEncrypt",(function(){window._PROMETEO_MEDIA_CONFIG.setClientEncrypt(t)}))}},{key:"updatePrometeoData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cuser",r=this.buildUserData(t,e);return this.sendToPrometeo(r),r}}],e&&K(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function $(t){return t&&(t.authenticated||t.user)?{sessionStatus:"authenticated",isAuthenticated:!0,user:t.user||null,error:null,source:"network"}:{sessionStatus:"anonymous",isAuthenticated:!1,user:null,error:null,source:"network"}}function X(t){return 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},X(t)}function tt(){tt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(j([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==X(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}
vendor: 4,472 bytes, line 2
2for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(X(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}}
2,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function et(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,u,"next",t)}function u(t){et(i,n,o,a,u,"throw",t)}a(void 0)}))}}function nt(t){return new Promise((function(e){setTimeout(e,t)}))}function ot(t,e){var r=new Error(t+" timed out after "+e+"ms");return r.code="TIMEOUT_ERROR",r.timeoutMs=e,r}function it(t,e,r){return at.apply(this,arguments)}function at(){return(at=rt(tt().mark((function t(e,r,n){var o,i,a,u;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="undefined"!=typeof AbortController?new AbortController:null,i=null,t.prev=2,a=e(o),u=new Promise((function(t,e){i=setTimeout((function(){if(o)try{o.abort()}catch(t){}e(ot(n,r))}),r)})),t.next=7,Promise.race([a,u]);case 7:return t.abrupt("return",t.sent);case 8:return t.prev=8,i&&clearTimeout(i),t.finish(8);case 11:case"end":return t.stop()}}),t,null,[[2,,8,11]])})))).apply(this,arguments)}function ut(t,e,r){return ct.apply(this,arguments)}function ct(){return(ct=rt(tt().mark((function t(e,r,n){var o,i;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=0,i=null;case 2:if(!(o<=r)){t.next=19;break}return t.prev=3,t.next=6,e(o);case 6:return t.abrupt("return",t.sent);case 9:if(t.prev=9,t.t0=t.catch(3),i=t.t0,!(o>=r)){t.next=14;break}return t.abrupt("break",19);case 14:return t.next=16,nt(n*(o+1));case 16:o++;case 17:t.next=2;break;case 19:throw i;case 20:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function st(t){return st="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},st(t)}function lt(){lt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(j([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==st(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&
vendor: 6,723 bytes, line 2
2(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(st(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function ft(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ht(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ft(i,n,o,a,u,"next",t)}function u(t){ft(i,n,o,a,u,"throw",t)}a(void 0)}))}}function dt(t){return dt="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},dt(t)}function pt(t){return pt="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},pt(t)}function yt(){yt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(j([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==pt(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}
vendor: 4,473 bytes, line 2
2for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(pt(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}}
vendor: 4,824 bytes, line 2
2,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function gt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function vt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gt(i,n,o,a,u,"next",t)}function u(t){gt(i,n,o,a,u,"throw",t)}a(void 0)}))}}function mt(t){return mt="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},mt(t)}function wt(){wt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(j([])));L&&L!==r&&n.call(L,a)&&(w=L);var x=m.prototype=g.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==mt(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?p:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(mt(e)+" is not iterable")}return v.prototype=m,o(x,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,c,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function bt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Lt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){bt(i,n,o,a,u,"next",t)}function u(t){bt(i,n,o,a,u,"throw",t)}a(void 0)}))}}var xt,St,Et={previous:xt=window.HenneoAuth||{},queue:xt._queue||[],readyResolvers:xt._readyResolvers||[]},kt=(St=window.HenneoAuthConfig||{},Object.assign({},{sessionEndpoint:"/get/user/session",loginEndpoint:"/post/user/login",logoutEndpoint:"/post/user/logout",deleteUserEndpoint:"/post/user/delete",oneTapEndpoint:"/post/user/google-one-tap",resetPasswordEndpoint:"/post/user/reset-password",fetchTimeoutMs:8e3,initTimeoutMs:1e4,retries:1,retryDelayMs:250,autoInit:!0,useCredentials:!0,debug:!1,cacheEnabled:!0,cacheStorage:"localStorage",cacheKey:"henneoauth.session",cacheTtlMs:36e5,revalidateOnInit:!1,revalidateIfOlderThanMs:36e5},St||{})),_t=function(){var t={sdkStatus:"booting",sessionStatus:"unknown",isAuthenticated:!1,user:null,error:null,source:"none",cacheExpiresAt:0,lastValidatedAt:0,lastUpdatedAt:0},e=new Set;function r(){return function(t){return{sdkStatus:t.sdkStatus,sessionStatus:t.sessionStatus,isAuthenticated:t.isAuthenticated,user:t.user,error:t.error,source:t.source,cacheExpiresAt:t.cacheExpiresAt,lastValidatedAt:t.lastValidatedAt,lastUpdatedAt:t.lastUpdatedAt}}(t)}return{getState:r,setState:function(n){t=Object.assign({},t,n,{lastUpdatedAt:Date.now()});var o=r();e.forEach((function(t){try{t(o)}catch(t){console.error("[HenneoAuth] listener error",t)}}))},subscribe:function(t){e.add(t);try{t(r())}catch(t){console.error("[HenneoAuth] listener error",t)}return function(){e.delete(t)}}}}(),Ot=function(t){function e(e,r,n){var o={method:e,headers:{Accept:"application/json"}};return t.useCredentials&&(o.credentials="include"),r&&r.signal&&(o.signal=r.signal),null!=n&&(o.headers["Content-Type"]="application/json",o.body=JSON.stringify(n)),o}function r(t,e){return n.apply(this,arguments)}function n(){return(n=ht(lt().mark((function t(e,r){var n,o,i;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,r);case 2:if(n=t.sent,-1===(n.headers.get("content-type")||"").indexOf("application/json")){t.next=11;break}return t.next=8,n.json();case 8:t.t0=t.sent,t.next=14;break;case 11:return t.next=13,n.text();case 13:t.t0=t.sent;case 14:if(o=t.t0,n.ok){t.next=21;break}throw(i=new Error("Request failed with status "+n.status)).code="HTTP_ERROR",i.status=n.status,i.payload=o,i;case 21:return t.abrupt("return",o);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function o(){return o=ht(lt().mark((function n(o,i){var a,u,c,s,l;return lt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=(i=i||{}).method||"GET",u=null!=i.body?i.body:null,c=i.timeoutMs||t.fetchTimeoutMs,s=null!=i.retries?i.retries:t.retries,l=i.label||"request",n.abrupt("return",ut(ht(lt().mark((function t(){return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",it(function(){var t=ht(lt().mark((function t(n){return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r(o,e(a,n,u)));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),c,l));case 1:case"end":return t.stop()}}),t)}))),s,t.retryDelayMs));case 7:case"end":return n.stop()}}),n)}))),o.apply(this,arguments)}return{request:function(t,e){return o.apply(this,arguments)}}}(kt),Pt=function(t){var e="sessionStorage"===t.cacheStorage?window.sessionStorage:window.localStorage,r=t.cacheKey;function n(){return Date.now()}function o(){try{e.removeItem(r)}catch(t){}}return{read:function(i){var a=!!(i=i||{}).allowStale;if(!t.cacheEnabled)return null;try{var u=e.getItem(r);if(!u)return null;var c=function(t){try{return JSON.parse(t)}catch(t){return null}}(u);return c&&"object"===dt(c)&&(c.exp&&!(c.exp<=n())||a)?c:(o(),null)}catch(t){return null}},exists:function(){return!!t.cacheEnabled&&null!==e.getItem(r)}
2,writeFromState:function(o){if(t.cacheEnabled)try{var i={v:1,exp:n()+t.cacheTtlMs,cachedAt:n(),isAuthenticated:!!o.isAuthenticated,user:o.user?o.user:null};e.setItem(r,JSON.stringify(i))}catch(t){}},clear:o}}(kt),At=function(t,e,r,n){var o=null;function i(){return Date.now()}function a(){return e.getState()}function u(t){return!t||!t.exp||t.exp<=i()}function c(e){return!e||!!t.revalidateOnInit||i()-(e.cachedAt||0)>=t.revalidateIfOlderThanMs}function s(t){t=t||{};var r=n.read({allowStale:!!t.allowStale});if(!r)return null;var o={sessionStatus:r.isAuthenticated?"authenticated":"anonymous",isAuthenticated:!!r.isAuthenticated,user:r.user||null,error:null,source:"cache",cacheExpiresAt:r.exp||0};return e.setState(o),r}function l(t){e.setState({sessionStatus:t.isAuthenticated?"authenticated":"anonymous",isAuthenticated:!!t.isAuthenticated,user:t.user||null,error:null,source:"cache",cacheExpiresAt:t.exp||0})}function f(t){if(function(t){return t&&"HTTP_ERROR"===t.code&&401===t.status}(t))return n.clear(),void e.setState({sessionStatus:"anonymous",isAuthenticated:!1,user:null,error:null,source:"network",cacheExpiresAt:0});var r=n.read({allowStale:!0});r?l(r):e.setState({sessionStatus:"error",isAuthenticated:!1,user:null,error:t,source:"none"})}function h(t){return d.apply(this,arguments)}function d(){return(d=vt(yt().mark((function e(n){return yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},e.abrupt("return",r.request(t.sessionEndpoint,{method:"GET",timeoutMs:n.timeoutMs||t.fetchTimeoutMs,retries:n.retries,label:"session request"}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(t){return y.apply(this,arguments)}function y(){return(y=vt(yt().mark((function r(u){return yt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u=u||{},!o||u.force){r.next=3;break}return r.abrupt("return",o);case 3:return e.setState({sessionStatus:"loading",error:null}),o=vt(yt().mark((function r(){var c,s;return yt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,h(u);case 3:c=r.sent,s=$(c),e.setState(Object.assign({},s,{source:"network",lastValidatedAt:i(),cacheExpiresAt:i()+t.cacheTtlMs})),n.writeFromState(e.getState()),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),f(r.t0);case 12:return r.prev=12,o=null,r.finish(12);case 15:return r.abrupt("return",a());case 16:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))(),r.abrupt("return",o);case 6:case"end":return r.stop()}}),r)})))).apply(this,arguments)}function g(t){return v.apply(this,arguments)}function v(){return(v=vt(yt().mark((function t(e){var r;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=e||{}).force){t.next=11;break}if(r=s({allowStale:!0})){t.next=6;break}return t.abrupt("return",a());case 6:if(c(r)){t.next=8;break}return t.abrupt("return",a());case 8:if(u(r)){t.next=11;break}return p({force:!0,timeoutMs:e.timeoutMs,retries:e.retries}),t.abrupt("return",a());case 11:return t.abrupt("return",p({force:!0,timeoutMs:e.timeoutMs,retries:e.retries}));case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(){return(m=vt(yt().mark((function e(){var r;return yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,it(vt(yt().mark((function t(){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",g({force:!1}));case 1:case"end":return t.stop()}}),t)}))),t.initTimeoutMs,"init");case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!(r=n.read({allowStale:!0}))){e.next=12;break}return l(r),e.abrupt("return",a());case 12:throw e.t0;case 13:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function w(){return(w=vt(yt().mark((function t(e){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e||{},t.abrupt("return",p({force:!0,timeoutMs:e.timeoutMs,retries:e.retries}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return{loadSession:g,loadSessionWithInitTimeout:function(){return m.apply(this,arguments)},loadSessionFromLoginResponse:function(r){try{var o=$(r);e.setState(Object.assign({},o,{source:"network",lastValidatedAt:i(),cacheExpiresAt:i()+t.cacheTtlMs})),n.writeFromState(e.getState())}catch(t){e.setState({sessionStatus:"error",isAuthenticated:!1,user:null,error:t,source:"none"})}return a()},refresh:function(t){return w.apply(this,arguments)},clearCache:function(){n.clear()},patchUserCustomData:function(r){var o=a();if(!o.user)return o;var u=Object.assign({},o.user,{customData:Object.assign({},o.user.customData||{},r||{})});return e.setState({user:u,isAuthenticated:!0,sessionStatus:"authenticated",cacheExpiresAt:i()+t.cacheTtlMs}),n.writeFromState(e.getState()),a()}}}(kt,_t,Ot,Pt),jt=function(t,e,r,n){var o=null,i=new Set,a=new Set;function u(){return e.getState()}function c(t,e){t.forEach((function(t){try{t(e)}catch(t){console.error("[HenneoAuth] listener error",t)}}))}function s(){return l.apply(this,arguments)}function l(){return(l=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o||(o=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.loadSessionWithInitTimeout();case 3:t.next=9;break;case 5:t.prev=5,t.t0=t.catch(0),"unknown"===u().sessionStatus&&e.setState({sessionStatus:"error",isAuthenticated:!1,user:null,error:t.t0,source:"none"});case 9:return t.prev=9,"ready"!==u().sdkStatus&&e.setState({sdkStatus:"ready"}),t.finish(9);case 12:return t.abrupt("return",S);case 13:case"end":return t.stop()}}),t,null,[[0,5,9,12]])})))()),t.abrupt("return",o);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var f,h,d,p,y,g,v,m,w,b,L,x,S={configure:function(e){return Object.assign(t,e||{}),S},ready:function(){return Promise.resolve(S)},onReady:function(t){t(S)},init:function(){return s()},getState:function(){return u()},onAuthStateChange:function(t){return e.subscribe(t)},onLogin:function(t){return i.add(t),function(){i.delete(t)}},onLogout:function(t){return a.add(t),function(){a.delete(t)}},checkSession:(x=Lt(wt().mark((function t(e){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",r.refresh(e));case 3:case"end":return t.stop()}}),t)}))),function(t){return x.apply(this,arguments)}),refresh:(L=Lt(wt().mark((function t(e){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",r.refresh(e));case 3:case"end":return t.stop()}}),t)}))),function(t){return L.apply(this,arguments)}),isLoading:(b=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return","loading"===u().sessionStatus);case 3:case"end":return t.stop()}}),t)}))),function(){return b.apply(this,arguments)}),isAuthenticated:(w=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",u().isAuthenticated);case 3:case"end":return t.stop()}}),t)}))),function(){return w.apply(this,arguments)}),getUser:(m=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",u().user);case 3:case"end":return t.stop()}}),t)}))),function(){return m.apply(this,arguments)}),getSession:(v=Lt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",u());case 3:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)}),patchUserCustomData:(g=Lt(wt().mark((function t(e){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:return t.abrupt("return",r.patchUserCustomData(e));case 3:case"end":return t.stop()}}),t)}))),function(t){return g.apply(this,arguments)}),login:(y=Lt(wt().mark((function e(o){var a,u;return wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.request(t.loginEndpoint,{method:"POST",body:{jwt:o},timeoutMs:t.fetchTimeoutMs,retries:t.retries});
2case 2:return a=e.sent,u=r.loadSessionFromLoginResponse(a),c(i,u),e.abrupt("return",u);case 6:case"end":return e.stop()}}),e)}))),function(t){return y.apply(this,arguments)}),oneTap:(p=Lt(wt().mark((function e(o){var a,u;return wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.request(t.oneTapEndpoint,{method:"POST",body:{credential:o},timeoutMs:t.fetchTimeoutMs,retries:t.retries});case 2:return a=e.sent,u=r.loadSessionFromLoginResponse(a),c(i,u),e.abrupt("return",u);case 6:case"end":return e.stop()}}),e)}))),function(t){return p.apply(this,arguments)}),resetPassword:(d=Lt(wt().mark((function e(){var o,i;return wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.request(t.resetPasswordEndpoint,{method:"POST",body:{},timeoutMs:t.fetchTimeoutMs,retries:t.retries});case 2:return o=e.sent,i=r.loadSessionFromLoginResponse(o),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)}),logout:(h=Lt(wt().mark((function o(i){var s,l;return wt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=(i=i||{}).returnTo||null,o.prev=2,o.next=5,n.request(t.logoutEndpoint,{method:"POST",body:s?{returnTo:s}:{},timeoutMs:i.timeoutMs||t.fetchTimeoutMs,retries:i.retries,label:"logout request"});case 5:o.next=10;break;case 7:o.prev=7,o.t0=o.catch(2),e.setState({sessionStatus:"error",isAuthenticated:!1,user:null,error:o.t0,source:"none"});case 10:return r.clearCache(),e.setState({sessionStatus:"anonymous",isAuthenticated:!1,user:null,error:null,source:"network",cacheExpiresAt:0}),l=u(),c(a,l),s&&!1!==i.redirect&&window.location.assign(s),o.abrupt("return",l);case 16:case"end":return o.stop()}}),o,null,[[2,7]])}))),function(t){return h.apply(this,arguments)}),deleteUser:(f=Lt(wt().mark((function o(){var i;return wt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.request(t.deleteUserEndpoint,{method:"POST",body:{},timeoutMs:t.fetchTimeoutMs,retries:t.retries,label:"delete user request"});case 3:o.next=8;break;case 5:o.prev=5,o.t0=o.catch(0),e.setState({sessionStatus:"error",isAuthenticated:!1,user:null,error:o.t0,source:"none"});case 8:return r.clearCache(),e.setState({sessionStatus:"anonymous",isAuthenticated:!1,user:null,error:null,source:"network",cacheExpiresAt:0}),i=u(),c(a,i),o.abrupt("return",i);case 13:case"end":return o.stop()}}),o,null,[[0,5]])}))),function(){return f.apply(this,arguments)})};return S}(kt,_t,At,Ot);window.HenneoAuth=jt,function(t,e,r,n){e.forEach((function(e){if("onReady"===e.type)try{e.cb(t)}catch(t){console.error("[HenneoAuth] queue callback error",t)}})),r.forEach((function(e){e(t)}));try{window.dispatchEvent(new CustomEvent("henneoauth:ready",{detail:t}))}catch(t){}}(jt,Et.queue,Et.readyResolvers),_t.setState({sdkStatus:"ready"}),kt.autoInit&&jt.init();const Tt=jt;var Ut={default:{cookieName:"cuser",screenSets:{registrationLogin:"Default-RegistrationLogin",profileLogin:"Default-ProfileUpdate",deleteUserScreen:"deleteUser",deleteUserDestinationScreen:"UserDeleted"},messages:{default:"Únete a nuestra comunidad.",comentarios:"Para comentar, únete a nuestra comunidad.",newsletter:"Para suscribirte a las newsletters, únete a nuestra comunidad.",newsletterWithTitle:"Para suscribirte a {{title}}, únete a nuestra comunidad.",qualifio:"Para participar en el juego, únete a nuestra comunidad.",misNoticias:"Para guardar noticias, únete a nuestra comunidad."}},"20minutos":{cookieName:"20M_USER",screenSets:{registrationLogin:"Newsletters",profileLogin:"20minutos.es-ProfileUpdate",deleteUserScreen:"Delete_user_verify",deleteUserDestinationScreen:"UserDeleted"},messages:{default:"Únete a Ciudadano20, la comunidad de lectores de 20minutos.",comentarios:"Para comentar, únete a Ciudadano20, la comunidad de lectores de 20minutos.",newsletter:"Para suscribirte a las newsletters, únete a Ciudadano20, la comunidad de lectores de 20minutos.",newsletterWithTitle:"Para suscribirte a '{{title}}' únete a Ciudadano20, la comunidad de lectores de 20minutos.",qualifio:"Para participar en el juego, únete a Ciudadano20, la comunidad de lectores de 20minutos.",misNoticias:"Para guardar noticias, únete a Ciudadano20, la comunidad de lectores de 20minutos."}}},Ct=Ut[n()]||Ut.default,It={domain:window.location.hostname,cookieName:Ct.cookieName,registrationLoginScreenset:Ct.screenSets.registrationLogin,registrationLoginStartScreen:"gigya-register-screen",profileUpdateScreenset:Ct.screenSets.profileLogin,profileUpdateStartScreen:"gigya-update-profile-screen",resetPasswordScreenset:Ct.screenSets.profileLogin,resetPasswordStartScreen:"gigya-change-password-screen",resetForgottenPasswordScreenset:Ct.screenSets.registrationLogin,resetForgottenPasswordStartScreen:"gigya-reset-password-screen",deleteUserScreen:Ct.screenSets.deleteUserScreen,deleteUserDestinationScreen:Ct.screenSets.deleteUserDestinationScreen||null,selectors:{loginHookClass:".loginGigya",registerHookClass:".registerGigya",logoutHookClass:".logoutGigya",editProfileHookClass:".profileGigya",loginDisplay:".loginGigya",fakeLoginDisplay:"svg.c-header__user__icon",loggedIcon:"ui_logged_icon",deleteUserButton:"#deleteUserButton",deleteUser:"#gigyaDeleteUser",resetPasswordTab:"#tab-password",resetPasswordContainer:"gigya-password-container"},messages:Ct.messages};Tt.init(),new G(It,new W(It),new Z).init()},9808:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}
2r.r(e),r.d(e,{LoadStrategy:()=>a,cache:()=>g,consent:()=>v,default:()=>b,loadScript:()=>y});var o=new Map,i=new Map,a={IDLE:"idle",AFTER_INTERACTIVE:"afterInteractive",LAZY_ONLOAD:"lazyOnload",IMMEDIATE:"immediate"},u=void 0!==window.requestIdleCallback?window.requestIdleCallback.bind(window):function(t,e){null==e||e.timeout;var r=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-r))}})}),1)},c=function(){return"complete"===document.readyState||"interactive"===document.readyState},s=function(t){if(c())t();else{var e=function(){c()&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}},l=function(){return void 0!==window.Didomi},f=function(t){window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(t)},h=function(t){window.__tcfapi&&window.__tcfapi("addEventListener",2,(function(e,r){!r||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||(t(),window.__tcfapi("removeEventListener",2,(function(t){}),e.listenerId))}))},d=function(t){if(!l())return!1;try{var e,r=window.Didomi.getCurrentUserStatus(),n=null==r||null===(e=r.vendors)||void 0===e?void 0:e[t];return!0===(null==n?void 0:n.enabled)}catch(t){return console.warn("Error checking vendor consent:",t),!1}},p=function(t){if(!t)return!0;var e=t.vendor;return d(e)},y=function(t){var e=t.src,r=t.id,n=t.onLoad,c=void 0===n?null:n,d=t.onReady,y=void 0===d?null:d,g=t.onError,v=void 0===g?null:g,m=t.onConsentDenied,w=void 0===m?null:m,b=t.strategy,L=void 0===b?a.AFTER_INTERACTIVE:b,x=t.cacheKey,S=void 0===x?null:x,E=t.async,k=t.defer,_=t.crossOrigin,O=t.integrity,P=t.consent,A=void 0===P?null:P,j=S||e||r;if(j&&o.has(j)&&o.get(j).loaded)return null==c||c(),void(null==y||y());if(r){var T=document.getElementById(r);if("true"===(null==T?void 0:T.dataset.loaded))return null==c||c(),void(null==y||y())}if(e){var U=document.querySelector('script[src="'.concat(e,'"]'));if("true"===(null==U?void 0:U.dataset.loaded))return null==c||c(),void(null==y||y())}var C=function(){if(j&&o.has(j)&&o.get(j).loaded)return null==c||c(),void(null==y||y());var t=document.createElement("script");r&&(t.id=r),e&&(t.src=e),void 0!==E&&(t.async=E),void 0!==k&&(t.defer=k),_&&(t.crossOrigin=_),O&&(t.integrity=O),t.onload=function(){t.dataset.loaded="true",j&&(o.set(j,{loaded:!0,script:t}),i.delete(j)),null==c||c(),null==y||y()},t.onerror=function(t){v?v(t):console.error("Error loading script:",e||r,t)},document.head.appendChild(t)},I=function(){switch(L){case a.IMMEDIATE:C();break;case a.AFTER_INTERACTIVE:s((function(){C()}));break;case a.LAZY_ONLOAD:t=function(){C()},"complete"!==document.readyState?window.addEventListener("load",t,{once:!0}):t();break;case a.IDLE:s((function(){u((function(){C()}),{timeout:2e3})}));break;default:s((function(){C()}))}var t};A?(j&&i.set(j,t),f((function(){if(A.waitUserAction)h((function(){I()}));else if(p(A))I();else{var t=!1;!function(e,r){if(e){var n=e.vendor;(e.vendors||(n?[n]:[])).forEach((function(r){l()&&window.Didomi.addVendorStatusListener&&window.Didomi.addVendorStatusListener(r,(function(r){r.enabled&&p(e)&&(t||(t=!0,I()))}))}))}}(A),w&&!p(A)&&w()}}))):I()},g={has:function(t){return o.has(t)},get:function(t){return o.get(t)},clear:function(){return o.clear()},getPending:function(){return Array.from(i.keys())},hasPending:function(t){return i.has(t)}},v={hasVendor:d,isReady:l,onReady:f,onUserAction:h},m=function(t){if(Array.isArray(t)&&0!==t.length){var e=function(t){if(Array.isArray(t))return t}(i=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=e[0],o=e.slice(1);"load"===r?o[0]&&y(o[0]):console.warn("ScriptLoader: Unknown command:",r)}var i},w={load:y,strategy:a,cache:g,consent:v};const b=w;"undefined"!=typeof window&&(window.ScriptLoader=w,(window.scriptLoaderQueue||[]).forEac
2h((function(t){m(t)})),window.scriptLoaderQueue={push:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.forEach((function(t){m(t)})),e.length}})}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(5366),r(5694),r(9808)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.