PageSourceSearch

https://www.vectorstock.com/cache/v2/js/dlg-auth-reauth.b06d4a7a9b79566482c8.min.js

js vectorstock.com collected 2026-09-27 20:55:37 UTC 16,856 bytes, 2 lines download raw bytes

vendor: 4,803 bytes, lines 1-2
1/*! For license information please see dlg-auth-reauth.b06d4a7a9b79566482c8.min.js.LICENSE.txt */
2"use strict";(self.webpackChunkVectorStockWebsite=self.webpackChunkVectorStockWebsite||[]).push([[8307],{8324(t,e,o){o.r(e),o.d(e,{default:()=>$});var n=o(22340),i=o(83546),r=o(95745),a=o(61087),s=o(24793),l=o(16919),c=o(9914),u=o(15297),f=o(72709),d=o(7546),p=o(20307),b=o(90413),v=o(22451),h=o(3411);function y(t){return y="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},y(t)}function g(){var t,e,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function r(o,n,i,r){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return m(c,"_invoke",function(o,n,i){var r,s,l,c=0,u=i||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,o){return r=e,s=0,l=t,d.n=o,a}};function p(o,n){for(s=o,l=n,e=0;!f&&c&&!i&&e<u.length;e++){var i,r=u[e],p=d.p,b=r[2];o>3?(i=b===n)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=p&&((i=o<2&&p<r[1])?(s=0,d.v=n,d.n=r[1]):p<b&&(i=o<3||r[0]>n||n>b)&&(r[4]=o,r[5]=n,d.n=b,s=0))}if(i||o>1)return a;throw f=!0,n}return function(i,u,b){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,b),s=u,l=b;(e=s<2?t:l)||!f;){r||(s?s<3?(s>1&&(d.n=-1),p(s,l)):d.n=l:d.v=l);try{if(c=2,r){if(s||(i="next"),e=r[i]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=t}else if((e=(f=d.n<0)?l:o.call(n,d))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:f}}}(o,i,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][n]?e(e([][n]())):(m(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,m(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=c,m(f,"constructor",c),m(c,"constructor",l),l.displayName="GeneratorFunction",m(c,i,"GeneratorFunction"),m(f),m(f,i,"Generator"),m(f,n,function(){return this}),m(f,"toString",function(){return"[object Generator]"}),(g=function(){return{w:r,m:d}})()}function m(t,e,o,n){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}m=function(t,e,o,n){function r(e,o){m(t,e,function(t){return this._invoke(e,o,t)})}e?i?i(t,e,{value:o,enumerable:!n,configurable:!n,writable:!n}):t[e]=o:(r("next",0),r("throw",1),r("return",2))},m(t,e,o,n)}function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,i,r,a,s=[],l=!0,c=!1;try{if(r=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;l=!1}else for(;!(l=(n=r.call(o)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?S(t,e):void 0}}(t,e)||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.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function k(t,e,o,n,i,r,a){try{var s=t[r](a),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(n,i)}function _(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P(n.key),n)}}function P(t){var e=function(t){if("object"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}function O(t,e,o){return e=j(e),function(t,e){if(e&&("object"==y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,T()?Reflect.construct(e,o||[],j(t).constructor):e.apply(t,o))}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(T=function(){return!!t})()}
2function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}var L=function(t){function e(t){var o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=O(this,e)).settings=n,o.populated=!1,o.container=t,o.apiService=l.apiService,o.pageState=p.B,o.form=document.createElement("form"),o.form.className="authentication",o.form.dataset.id="login",o.container.appendChild(o.form),o.form.dataset.skeleton=1,o.form.innerHTML='<div class="fields"> <div class="row"> <div class="textfield"> <span></span> </div> </div> <div class="button" data-action="submit"><span></span></div> </div> <div class="actions"> <div class="divider" data-id="social"> <div class="h4"> <span></span> </div> <div class="options"> <div class="button"><span></span></div> <div class="button"><span></span></div> </div> </div> </div>',o._load(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(e,t),o=e,n=[{key:"_load",value:(i=g().m(function t(){var e,o,n,i,r,a;return g().w(function(t){for(;;)switch(t.p=t.n){case 0:return e=window.getLanguage(),t.p=1,t.n=2,Promise.all([this.apiService.getTranslation(e,"form-authentication").catch(function(t){return s.A.log("ReAuth Dialog","Failed to load translation (form-authentication)",{error:t}),{}}),(0,f.V)().catch(function(t){return s.A.log("ReAuth Dialog","Failed to load user profile before init",{error:t}),{update:function(){},rememberUser:function(){}}})]);case 2:o=t.v,n=w(o,2),i=n[0],r=n[1],this.translation=i||{},this.profile=r,t.n=4;break;case 3:t.p=3,a=t.v,s.A.log("ReAuth Dialog","Login init loader failed",{error:a}),this.translation=this.translation||{},this.profile=this.profile||{update:function(){},rememberUser:function(){}};case 4:return t.p=4,this._init(),t.f(4);case 5:return t.a(2)}},t,this,[[1,3,4,5]])}),a=function(){var t=this,e=arguments;return new Promise(function(o,n){var r=i.apply(t,e);function a(t){k(r,o,n,a,s,"next",t)}function s(t){k(r,o,n,a,s,"throw",t)}a(void 0)})},function(){return a.apply(this,arguments)})},{key:"_init",value:function(){var t,e,o=this;this.langLogin=null!==(t=null===(e=this.translation)||void 0===e?void 0:e.login)&&void 0!==t?t:{},this.t=(0,r.E)(this.langLogin);var n=d.H.populateHTMLTemplate('<div class="form-fields"> <div class="row" data-columns="2"> <div class="field"> <fieldset id="f-login-password" class="textinput" data-active="" data-filled="" data-shown=""> <label for="vs-login-password"><span>${sectionFieldsPassword}</span></label> <input type="password" id="vs-login-password" name="login-password" spellcheck="false" autocomplete="current-password" autocorrect="off" autocapitalize="off" required minlength="6" maxlength="72" placeholder="${sectionFieldsPassword}"> </fieldset> </div> </div> <button type="submit" class="button featured" data-action="submit"> <span class="label">${sectionFieldsSubmit}</span> <span class="icon">${sectionFieldsSubmitSVG}</span> </button> </div> <div class="form-actions form-actions-social"> <div class="divider" data-id="social"> <h4>${sectionActionsSocialTitle}</h4> <div class="options"> <button type="button" class="btn btn--default" data-action="google"> <span class="label">${sectionActionsSocialGoogle}</span> <span class="icon">${sectionActionsSocialGoogleSVG}</span> </button> <button type="button" class="btn btn--default" data-action="facebook"> <span class="label">${sectionActionsSocialFacebook}</span> <span class="icon">${sectionActionsSocialFacebookSVG}</span> </button> </div> </div> </div>',{sectionFieldsPassword:this.t("section.fields.password"),sectionFieldsSubmit:this.t("section.fields.submit"),sectionFieldsSubmitSVG:{value:d.H.generateSVGIcon("global","arrow-right"),isHTML:!0},sectionActionsSocialTitle:this.t("section.social.title"),sectionActionsSocialGoogle:this.t("section.social.google"),sectionActionsSocialGoogleSVG:{value:d.H.generateSVGIcon("global","logo-colour-google"),isHTML:!0},sectionActionsSocialFacebook:this.t("section.social.facebook"),sectionActionsSocialFacebookSVG:{value:d.H.generateSVGIcon("global","logo-colour-facebook"),isHTML:!0}});this.form.innerHTML=n,this.form.removeAttribute("data-skeleton"),this.inputPassword=new h.a(this.form.querySelector("#f-login-password")),this.buttonSubmit=this.form.querySelector('button[data-action="submit"]'),this.buttonSocialGoogle=this.form.querySelector('.form-actions button[data-action="google"]'),this.buttonSocialFacebook=this.form.querySelector('.form-actions button[data-action="facebook"]'),this.buttonSubmitRef=this.buttonSubmit?new c.$(this.buttonSubmit):null,this.buttonSocialRef={google:this.buttonSocialGoogle?new c.$(this.buttonSocialGoogle):null,facebook:this.buttonSocialFacebook?new c.$(this.buttonSocialFacebook):null}
2,this._validateForm=this._validateForm.bind(this),this.buttonSocialGoogle.addEventListener("click",function(){var t=window.open("","_blank");t&&(t.opener=null),o._socialLogin("google",t)}),this.buttonSocialFacebook.addEventListener("click",function(){var t=window.open("","_blank");t&&(t.opener=null),o._socialLogin("facebook",t)}),this.form.addEventListener("submit",function(t){t.preventDefault(),o._validateForm()}),this.populated=!0,this.triggerEvent("populated"),d.H.preloadModule(function(){d.H.loadDialogAuthenticationPassword()})}},{key:"_validateForm",value:function(){var t=[],e=this.inputPassword.value.trim(),o=this.inputPassword.input.minLength||0;(0===e.length||e.length<o)&&(this.inputPassword.showError(this.t("warnings.password")),t.push(this.inputPassword)),t.length?t[0].focus():this._login()}},{key:"_disable",value:function(){this.inputPassword.disable(),this.buttonSubmit.disabled=!0,this.buttonSocialGoogle.disabled=!0,this.buttonSocialFacebook.disabled=!0}},{key:"_enable",value:function(){this.inputPassword.enable(),this.buttonSubmit.disabled=!1,this.buttonSocialGoogle.disabled=!1,this.buttonSocialFacebook.disabled=!1}},{key:"_login",value:function(){var t,e=this;null===(t=this.buttonSubmitRef)||void 0===t||t.setLoading(this.t("processing.submit")),this._disable();var o={login_password:this.inputPassword.value};this.apiService.post(v.Routes.API.AUTH.REAUTH,o).then(function(t){e.settings.callback?(e.settings.callback(!0),e.triggerEvent("validated")):window.location.reload(!0)}).catch(function(t){var o;s.A.log("ReAuth Dialog","ReAuth form error",{error:t}),null===(o=e.buttonSubmitRef)||void 0===o||o.revert(),e._enable(),b.PromptModule.alert(e.t("warnings.reauth.title"),e.t("warnings.reauth.description")).addEventListener("response",function(){e.inputPassword.focus()})})}},{key:"_socialLogin",value:function(t,e){var o,n=this,i=null===(o=this.buttonSocialRef)||void 0===o?void 0:o[t];null==i||i.setLoading(this.t("processing.social")),this._disable(),this.apiService.get(v.Routes.API.AUTH.LOGIN_SOCIAL(t)+"?reauth=1").then(function(o){if(window.addEventListener("storage",function(t){"social-login-complete"===t.key&&(n.settings.callback?(n.settings.callback(!0),n.triggerEvent("validated")):window.location.reload(!0))}),e)e.location.href=o.data.url;else{null==i||i.revert(),n._enable();var r=n.t("warnings.social.".concat(t,".title")),a=n.t("warnings.social.".concat(t,".description"));b.PromptModule.alert(r,a)}}).catch(function(e){null==i||i.revert(),n._enable(),s.A.log("ReAuth Dialog","Failed social log in (".concat(t,")"),{error:e});var o=n.t("warnings.social.".concat(t,".title")),r=n.t("warnings.social.".concat(t,".description"));b.PromptModule.alert(o,r)})}},{key:"focus",value:function(){this.inputPassword&&this.inputPassword.focus()}}],n&&_(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,n,i,a}(u.b);function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function G(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,E(n.key),n)}}function E(t){var e=function(t){if("object"!=H(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=H(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==H(e)?e:e+""}function F(t,e,o){return e=V(e),function(t,e){if(e&&("object"==H(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,R()?Reflect.construct(e,o||[],V(t).constructor):e.apply(t,o))}function R(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(R=function(){return!!t})()}function M(){return M="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=V(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:o):i.value}},M.apply(null,arguments)}
2function V(t){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(t)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}var $=function(t){function e(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=F(this,e,[o])).settings=o;var i=d.H.populateHTMLTemplate(n.A,{logoSVG:{value:d.H.generateSVGIcon("global","logo-grayscale-vectorstock"),isHTML:!0},asideSkeletonHeaderPrimary:{value:"<span></span>".repeat(2),isHTML:!0},asideSkeletonHeaderSecondary:{value:"<span></span>".repeat(3),isHTML:!0}});return t.container.dataset.id="reauth",t.container.innerHTML=i,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(e,t),o=e,a=[{key:"_init",value:function(){var t=this;(0,f.V)().then(function(e){t._build(e.hasLoggedIn()?"returning":"new")}).catch(function(){s.A.log("Auth Signup","Failed to load user profile"),t._build("new")})}},{key:"_build",value:function(){var t,o,n=this,a=null!==(t=null===(o=this.translation)||void 0===o?void 0:o.reauth)&&void 0!==t?t:{},s=(0,r.E)(a),l=d.H.convertMarkdown(s("aside.byline"),!0),c=d.H.populateHTMLTemplate(i.A,{logoSVG:{value:d.H.generateSVGIcon("global","logo-grayscale-vectorstock"),isHTML:!0},asideTitle:s("aside.title"),asideByline:{value:l,isHTML:!0},sectionHeaderTitle:s("header.title"),sectionHeaderSwitchHidden:"hidden",sectionHeaderClose:this.isLocked?s("header.close.locked"):s("header.close.default"),sectionFormClass:""});this.container.innerHTML=c,function(t,e,o){var n=M(V(t.prototype),"_init",o);return"function"==typeof n?function(t){return n.apply(o,t)}:n}(e,0,this)([]),this.form=new L(this.container.querySelector('[data-slot="form"]'),this.settings),this.form.addEventListener("request_sent",function(){n.close()}),this.form.addEventListener("validated",function(){n.forceClose()}),this.isBuilt=!0,this._focusWhenReady()}},{key:"focus",value:function(){var t;null===(t=this.form)||void 0===t||t.focus()}}],a&&G(o.prototype,a),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,a}(a.V)}}]);

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.