index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/6427.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[6427],{448:function(e,t,n){n.d(t,{a:function(){return f},b:function(){return s},g:function(){return l}});var r=n(4942),o=n(885);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var i=t,a=(0,o.Z)(i,2),u=a[0],s=a[1];if(Array.isArray(s)||s&&s.constructor===Object){var l,f=c(Object.entries(s).reverse());try{for(f.s();!(l=f.n()).done;){var d=(0,o.Z)(l.value,2),p=d[0],h=d[1];r.unshift(["".concat(u,"[").concat(p,"]"),h])}}catch(e){f.e(e)}finally{f.f()}}else void 0!==s&&(null===s&&(s=""),n+="&"+[u,s].map(encodeURIComponent).join("="))}return n.substr(1)}function l(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(decodeURIComponent),r=(0,o.Z)(n,2),i=r[0],c=r[1],u=void 0===c?"":c;return i&&function(e,t,n){for(var r=t.length,o=r-1,i=0;i<r;i++){var c=t[i];!c&&Array.isArray(e)&&(c=e.length.toString());var u=!isNaN(Number(t[i+1]));e[c]=i===o?n:e[c]||(u?[]:{}),Array.isArray(e[c])&&!u&&(e[c]=a({},e[c])),e=e[c]}}(e,i.replace(/\]/g,"").split("["),u),e}),{})}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(l(e),t),n=n.substr(0,r)),n+"?"+s(t)}},930:function(e,t,n){n.d(t,{a:function(){return G},h:function(){return V}});var r=n(5861),o=n(5987),i=n(885),a=n(4942),c=n(1284),u=n.n(c),s=n(448),l=["rest_route"],f=["path","url"],d=["url","path","data","parse"];function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t){var n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),o=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(m(m({},e),{},{path:o}))};function g(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var o=t,a=(0,i.Z)(o,2),c=a[0],u=a[1];if(Array.isArray(u)||u&&u.constructor===Object){var s,l=p(Object.entries(u).reverse());try{for(l.s();!(s=l.n()).done;){var f=(0,i.Z)(s.value,2),d=f[0],h=f[1];r.unshift(["".concat(c,"[").concat(d,"]"),h])}}catch(e){l.e(e)}finally{l.f()}}else void 0!==u&&(null===u&&(u=""),n+="&"+[c,u].map(encodeURIComponent).join("="))}return n.substr(1)}function y(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(decodeURIComponent),r=(0,i.Z)(n,2),o=r[0],a=r[1],c=void 0===a?"":a;return o&&function(e,t,n){for(var r=t.length,o=r-1,i=0;i<r;i++){var a=t[i];!a&&Array.isArray(e)&&(a=e.length.toString()),a=["__proto__","constructor","prototype"].includes(a)?a.toUpperCase():a;var c=!isNaN(Number(t[i+1]));e[a]=i===o?n:e[a]||(c?[]:{}),Array.isArray(e[a])&&!c&&(e[a]=m({},e[a])),e=e[a]}}(e,o.replace(/\]/g,"").split("["),c),e}),Object.create(null))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(y(e),t),n=n.substr(0,r)),n+"?"+g(t)}function O(e,t){return void 0!==function(e,t){return y(e)[t]}(e,t)}function _(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).map((function(e){return e.map(decodeURIComponent)})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.map(encodeURIComponent)})).map((function(e){return e.join("=")})).join("&"):r}function x(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}var j=function(e){return e.json?e.json():Promise.reject(e)},k=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},S=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},P=function(){var e=(0,r.Z)(u().mark((function e(t,n){var r,i,a,c,s,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(S(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,G(m(m({},(d={per_page:100},void 0,void 0,p=(u=t).path,h=u.url,m(m({},(0,o.Z)(u,f)),{},{url:h&&b(h,d),path:p&&b(p,d)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,j(r);case 9:if(i=e.sent,Array.isArray(i)){e.next=12;break}return e.abrupt("return",i);case 12:if(a=k(r)){e.next=15;break}return e.abrupt("return",i);case 15:c=[].concat(i);case 16:if(!a){e.next=27;break}return e.next=19,G(m(m({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,j(s);case 22:l=e.sent,c=c.concat(l),a=k(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var u,d,p,h}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),C=new Set(["PATCH","PUT","DELETE"]),A=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(A(e,t)).catch((function(e){return I(e,t)}))};function I(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:wp.i18n.__("An unknown error occurred.")};throw e||t}))}var Z,D,M,U,L,N,R,F={Accept:"application/json, */*;q=0.1"},z={credentials:"include"},H=[function(e,t){return"string"!=typeof e.url||O(e.url,"_locale")||(e.url=b(e.url,{_locale:"user"})),"string"!=typeof e.path||O(e.path,"_locale")||(e.path=b(e.path,{_locale:"user"})),t(e)},w,function(e,t){var n=e.method,r=void 0===n?"GET":n;return C.has(r.toUpperCase())&&(e=m(m({},e),{},{headers:m(m({},e.headers),{},{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e)},P],q=function(e){if(e.status>=200&&e.status<300)return e;throw e},J=function(e){var t=e.url,n=e.path,r=e.data,i=e.parse,a=void 0===i||i,c=(0,o.Z)(e,d),u=e.body,s=e.headers;return s=m(m({},F),s),r&&(u=JSON.stringify(r),s["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,m(m(m({},z),c),{},{body:u,headers:s})).then((function(e){return Promise.resolve(e).then(q).catch((function(e){return I(e,a)})).then((function(e){return T(e,a)}))}),(function(e){if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:wp.i18n.__("You are probably offline.")}}))};function G(e){return H.reduceRight((function(e,t){return function(n){return t(n,e)}}),J)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(G.nonceEndpoint).then(q).then((function(e){return e.text()})).then((function(t){return G.nonceMiddleware.nonce=t,G(e)}))}))}G.use=function(e){H.unshift(e)},G.setFetchHandler=function(e){J=e},G.createNonceMiddleware=function(e){var t=function e(t,n){var r=t.headers,o=void 0===r?{}:r;for(var i in o)if("x-wp-nonce"===i.toLowerCase()&&o[i]===e.nonce)return n(t);return n(m(m({},t),{},{headers:m(m({},o),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t},G.createPreloadingMiddleware=function(e){var t=Object.fromEntries(Object.entries(e).map((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];return[_(n),r]})));return function(e,n){var r=e.parse,i=void 0===r||r,a=e.path;if(!a&&e.url){var c=y(e.url),u=c.rest_route,s=(0,o.Z)(c,l);"string"==typeof u&&(a=b(u,s))}if("string"!=typeof a)return n(e);var f=e.method||"GET",d=_(a);if("GET"===f&&t[d]){var p=t[d];return delete t[d],x(p,!!i)}if("OPTIONS"===f&&t[f]&&t[f][d]){var h=t[f][d];return delete t[f][d],x(h,!!i)}return n(e)}},G.createRootURLMiddleware=function(e){return function(t,n){return w(t,(function(t){var r,o=t.url,i=t.path;return"string"==typeof i&&(r=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(i=i.replace("?","&")),o=r+i),n(m(m({},t),{},{url:o}))}))}},G.fetchAllMiddleware=P,G.mediaUploadMiddleware=function(e,t){if(!function(e){var t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);var n=0,r=function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(m(m({},e),{},{parse:!1})).catch((function(t){var n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:wp.i18n.__("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):I(t,e.parse)})).then((function(t){return T(t,e.parse)}))},G.fetchAllMiddleware=null,G.use(G.createRootURLMiddleware((null===(D=null===(Z=null===window||void 0===window?void 0:window.parent)||void 0===Z?void 0:Z.scData)||void 0===D?void 0:D.root_url)||(null===(M=null===window||void 0===window?void 0:window.scData)||void 0===M?void 0:M.root_url))),(null===(U=null===window||void 0===window?void 0:window.scData)||void 0===U?void 0:U.nonce)&&(G.nonceMiddleware=G.createNonceMiddleware(null===(L=null===window||void 0===window?void 0:window.scData)||void 0===L?void 0:L.nonce),G.use(G.nonceMiddleware)),(null===(N=null===window||void 0===window?void 0:window.scData)||void 0===N?void 0:N.nonce_endpoint)&&(G.nonceEndpoint=null===(R=null===window||void 0===window?void 0:window.scData)||void 0===R?void 0:R.nonce_endpoint),G.use((function(e,t){return e.path=(0,s.a)(e.path,{t:Date.now()}),t(e)}));var K=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.","surecart")};if((null==e?void 0:e.code)&&(null==e?void 0:e.message))throw e;if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},V=function(){var e=(0,r.Z)(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K(t);case 2:if("rest_cookie_invalid_nonce"===(n=e.sent).code){e.next=5;break}throw n;case 5:return e.abrupt("return",window.fetch(G.nonceEndpoint).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return e.text()})).then((function(e){G.nonceMiddleware.nonce=e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},6427:function(e,t,n){n.r(t),n.d(t,{sc_login_form:function(){return l}});var r=n(5861),o=n(5671),i=n(3144),a=n(1284),c=n.n(a),u=n(8860),s=n(930),l=function(){function e(t){(0,o.Z)(this,e),(0,u.r)(this,t),this.step=0,this.email="",this.password="",this.verifyCode="",this.loading=void 0,this.error=void 0}var t,n,a,l;return(0,i.Z)(e,[{key:"handleStepChange",value:function(){var e=this;1===this.step&&setTimeout((function(){var t,n;null===(n=null===(t=e.passwordInput)||void 0===t?void 0:t.triggerFocus)||void 0===n||n.call(t)}),50),2===this.step&&setTimeout((function(){var t,n;null===(n=null===(t=e.codeInput)||void 0===t?void 0:t.triggerFocus)||void 0===n||n.call(t)}),50)}},{key:"handleLoadingChange",value:function(e){e&&(this.error=null)}},{key:"handleVerifyCodeChange",value:function(e){(null==e?void 0:e.length)>=6&&this.submitCode()}},{key:"handleError",value:function(e){console.error(this.error),this.error=e||{message:wp.i18n.__("Something went wrong","surecart")}}},{key:"createLoginCode",value:(l=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,s.a)({method:"POST",path:"surecart/v1/verification_codes",data:{login:this.email}});case 4:this.step=this.step+1,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this.handleError(e.t0);case 10:return e.prev=10,this.loading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,7,10,13]])}))),function(){return l.apply(this,arguments)})},{key:"submitCode",value:(a=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,s.a)({method:"POST",path:"surecart/v1/verification_codes/verify",data:{login:this.email,code:this.verifyCode}});case 4:if(e.sent.verified){e.next=8;break}throw{message:wp.i18n.__("Verification code is not valid. Please try again.","surecart")};case 8:window.location.reload(),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),this.handleError(e.t0),this.loading=!1;case 15:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return a.apply(this,arguments)})},{key:"login",value:(n=(0,r.Z)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,s.a)({method:"POST",path:"surecart/v1/login",data:{login:this.email,password:this.password}});case 4:t=e.sent,(n=t.redirect_url)?window.location.replace(n):window.location.reload(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),this.handleError(e.t0),this.loading=!1;case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(){return n.apply(this,arguments)})},{key:"checkEmail",value:(t=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,s.a)({method:"POST",path:"surecart/v1/check_email",data:{login:this.email}});case 4:this.step=this.step+1,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this.handleError(e.t0);case 10:return e.prev=10,this.loading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,7,10,13]])}))),function(){return t.apply(this,arguments)})},{key:"renderInner",value:function(){var e=this;return 2===this.step?(0,u.h)(u.F,null,(0,u.h)("div",{class:"login-form__title",part:"title"},wp.i18n.__("Check your email for a confirmation code","surecart")),(0,u.h)("div",null,(0,u.h)("sc-form",{onScFormSubmit:function(){return e.submitCode()}},(0,u.h)("sc-input",{label:wp.i18n.__("Confirmation code","surecart"),type:"text",ref:function(t){return e.codeInput=t},autofocus:!0,required:!0,onScInput:function(t){return e.verifyCode=t.target.value}}),(0,u.h)("sc-button",{type:"primary",submit:!0,full:!0},(0,u.h)("sc-icon",{name:"lock",slot:"prefix"}),wp.i18n.__("Login with Code","surecart"))))):1===this.step&&this.email?(0,u.h)(u.F,null,(0,u.h)("div",{class:"login-form__title",part:"title"},(0,u.h)("div",null,wp.i18n.__("Welcome","surecart")),(0,u.h)("sc-button",{style:{fontSize:"18px"},size:"small",pill:!0,caret:!0,onClick:function(){return e.step=e.step-1}},(0,u.h)("sc-icon",{name:"user",slot:"prefix"}),this.email)),(0,u.h)("sc-flex",{flexDirection:"column",style:{"--sc-flex-column-gap":"var(--sc-spacing-large)"}},(0,u.h)("div",null,(0,u.h)("sc-form",{onScFormSubmit:function(){return e.createLoginCode()}},(0,u.h)("sc-button",{class:"login-code",type:"primary",submit:!0,full:!0},(0,u.h)("sc-icon",{name:"mail",slot:"prefix"}),wp.i18n.__("Send a login code","surecart"))),(0,u.h)("sc-divider",{style:{"--spacing":"0.5em"}},wp.i18n.__("or","surecart")),(0,u.h)("sc-form",{onScFormSubmit:function(){return e.login()}},(0,u.h)("sc-input",{label:wp.i18n.__("Enter your password","surecart"),type:"password",ref:function(t){return e.passwordInput=t},onKeyDown:function(t){return"Enter"===t.key&&e.login()},autofocus:!0,required:!0,onScInput:function(t){return e.password=t.target.value}}),(0,u.h)("sc-button",{type:"primary",outline:!0,submit:!0,full:!0},(0,u.h)("sc-icon",{name:"lock",slot:"prefix"}),wp.i18n.__("Login","surecart")))))):(0,u.h)(u.F,null,(0,u.h)("div",{class:"login-form__title",part:"title"},(0,u.h)("slot",{name:"title"})),(0,u.h)("sc-form",{onScFormSubmit:function(){return e.checkEmail()}},(0,u.h)("sc-input",{type:"text",value:this.email,label:wp.i18n.__("Username or Email Address","surecart"),onScInput:function(t){return e.email=t.target.value},onKeyDown:function(t){return"Enter"===t.key&&e.checkEmail()},required:!0,autofocus:!0}),(0,u.h)("sc-button",{type:"primary",submit:!0,full:!0},(0,u.h)("sc-icon",{name:"arrow-right",slot:"suffix"}),wp.i18n.__("Next","surecart"))))}},{key:"render",value:function(){var e,t,n=this;return(0,u.h)("div",{class:"login-form"},(0,u.h)("sc-card",null,!!this.error&&(0,u.h)("sc-alert",{open:!0,type:"danger",closable:!0,onScHide:function(){return n.error=null}},(0,u.h)("span",{slot:"title",innerHTML:null===(e=this.error)||void 0===e?void 0:e.message}),((null===(t=this.error)||void 0===t?void 0:t.additional_errors)||[]).map((function(e){var t=e.message;return(0,u.h)("div",{innerHTML:t})}))),this.renderInner()),this.loading&&(0,u.h)("sc-block-ui",{spinner:!0,style:{zIndex:"9","--sc-block-ui-opacity":"0.5"}}))}}],[{key:"watchers",get:function(){return{step:["handleStepChange"],loading:["handleLoadingChange"],verifyCode:["handleVerifyCodeChange"]}}}]),e}();l.style=".login-form{font-size:16px;margin:var(--sc-spacing-xx-large) auto;max-width:400px;position:relative}.login-form__title{margin-bottom:var(--sc-spacing-medium);font-size:var(--sc-font-size-xx-large);font-weight:var(--sc-font-weight-bold);line-height:var(--sc-line-height-dense);text-align:var(--sc-login-text-align, center)}.login-form__back{text-align:center;font-size:var(--sc-font-size-small)}sc-card{--sc-card-padding:var(--sc-spacing-xx-large)}"},4942:function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},5987:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(3366);function o(e,t){if(null==e)return{};var n,o,i=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},3366:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})}}]);