(this["webpackJsonp@timely/clients-web"]=this["webpackJsonp@timely/clients-web"]||[]).push([[6],[,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return Z})),n.d(t,"c",(function(){return $})),n.d(t,"b",(function(){return X}));var i=n(4),c=n(9),r=n(34),s=n(17),o=n(0),a=n(33),u=n(7),l=n(3),d=n(6),b=n(10),f=n(15),m=n(1),j=function(e){var t,n,i=Object(o.useContext)(b.a).isLoggedIn,r=Object(o.useContext)(f.a).businessSettings,s=Object(u.h)(),a=!!s.search,l=(null===(t=e.match)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.bbtype)||"book";return i&&!a&&"book"===l&&r.clientLoginStatus!==c.ClientLoginStatus.Disabled?Object(m.jsx)(u.a,{to:"/".concat($)}):Object(m.jsx)(u.a,{to:{pathname:"/".concat($,"/").concat(l),search:s.search}})},p=n(53),h=function(e){var t=Object(o.useContext)(b.a).clientProfile;return Object(m.jsxs)("div",{className:"container text-center my-3",children:[Object(m.jsx)("h3",{children:"Bookings unavailable"}),!!t&&Object(m.jsx)("p",{children:t.blockedMessage})]})},v=Object(o.lazy)((function(){return M((function(){return Promise.all([n.e(0),n.e(2),n.e(13),n.e(4)]).then(n.bind(null,419)).then((function(e){return{default:e.ConsultForWebContainer}}))}))})),g=Object(o.lazy)((function(){return M((function(){return Promise.resolve().then(n.bind(null,103)).then((function(e){return{default:e.ErrorComponent}}))}))})),O=Object(o.lazy)((function(){return M((function(){return Promise.all([n.e(2),n.e(15),n.e(8)]).then(n.bind(null,424)).then((function(e){return{default:e.MyDetailsContainer}}))}))})),x=Object(o.lazy)((function(){return M((function(){return Promise.all([n.e(0),n.e(14),n.e(7)]).then(n.bind(null,422)).then((function(e){return{default:e.MyCardsContainer}}))}))})),_=Object(o.lazy)((function(){return M((function(){return n.e(11).then(n.bind(null,420)).then((function(e){return{default:e.WaitlistContainer}}))}))})),k=Object(o.lazy)((function(){return M((function(){return n.e(3).then(n.bind(null,423)).then((function(e){return{default:e.BookContainer}}))}))})),y=Object(o.lazy)((function(){return M((function(){return n.e(1).then(n.bind(null,426)).then((function(e){return{default:e.FeedbackFinalPage}}))}))})),w=Object(o.lazy)((function(){return M((function(){return n.e(1).then(n.bind(null,426)).then((function(e){return{default:e.FeedbackPage}}))}))})),S=Object(o.lazy)((function(){return M((function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,421)).then((function(e){return{default:e.HomeContainer}}))}))})),N=Object(o.lazy)((function(){return M((function(){return Promise.resolve().then(n.bind(null,99)).then((function(e){return{default:e.LoginContainer}}))}))})),C=function(e){var t=e.businessSettingsError,n=e.loadingState,i=Object(o.useContext)(b.a),c=i.isLoggedIn,r=i.clientProfile,s=Object(o.useContext)(f.a).businessSettings;function a(e){return s?r&&r.isBlocked?h:e:t?g:p.a}return Object(m.jsx)(o.Suspense,{fallback:n,children:Object(m.jsxs)(u.d,{children:[false,Object(m.jsx)(u.b,{path:"/:businessId/bb/:bbtype",component:a(j)}),Object(m.jsx)(u.b,{path:"/:businessId/errors/cb",component:a(h)}),Object(m.jsx)(u.b,{path:"/:businessId/feedback",component:a(w)}),Object(m.jsx)(u.b,{path:"/:businessId/feedbackfinal",component:a(y)}),Object(m.jsx)(b.b,{isLoggedIn:c,path:"/:businessId/consultations",component:a(v)}),Object(m.jsx)(b.b,{isLoggedIn:c,path:"/:businessId/details",component:a(O)}),Object(m.jsx)(b.b,{isLoggedIn:c,path:"/:businessId/cards",component:a(x)}),Object(m.jsx)(u.b,{path:"/:businessId/waitlist",component:a(_)}),Object(m.jsx)(u.b,{path:"/:businessId/book",component:a(k)}),Object(m.jsx)(u.b,{path:"/:businessId/purchase",component:a(k)}),Object(m.jsx)(u.b,{path:"/:businessId/login",component:a(N)}),Object(m.jsx)(b.b,{path:"/:businessId",exact:!0,component:a(S),isLoggedIn:c}),Object(m.jsx)(b.b,{path:"/:businessId/loggedinbook",exact:!0,component:a(k),isLoggedIn:c}),Object(m.jsx)(u.b,{component:p.a})]})})};function M(e){return L.apply(this,arguments)}function L(){return(L=Object(d.a)(Object(l.a)().mark((function e(t){var n,i,c;return Object(l.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=1;case 1:if(!(n>=0)){e.next=17;break}return e.prev=2,e.next=5,t();case 5:return e.abrupt("return",e.sent);case 8:if(e.prev=8,e.t0=e.catch(2),i=e.t0,! --n){e.next=15;break}return e.next=15,I(1e3);case 15:e.next=1;break;case 17:return e.prev=17,e.next=20,fetch("/appversion.json");case 20:return c=e.sent,e.next=23,c.json();case 23:if(e.sent.rev===Z){e.next=29;break}return console.info("App is out of date, reloading!"),window.location.reload(),e.next=29,I(1e6);case 29:e.next=33;break;case 31:e.prev=31,e.t1=e.catch(17);case 33:throw console.error("Failed to load chunk, failed to check appversion."),i||new Error("Failed to load chunk");case 35:case"end":return e.stop()}}),e,null,[[2,8],[17,31]])})))).apply(this,arguments)}function I(e){return P.apply(this,arguments)}function P(){return(P=Object(d.a)(Object(l.a)().mark((function e(t){return Object(l.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){return setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E=n(48),R=n(41),A=n(42),B=n(71),T=n(70),F=n(103),V=function(e){function t(e){var n;return Object(R.a)(this,t),(n=Object(B.a)(this,t,[e])).state={},n}return Object(T.a)(t,e),Object(A.a)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(m.jsx)(F.ErrorComponent,{error:this.state.error,errorInfo:this.state.errorInfo}):this.props.children}}])}(o.Component),q=n(31),z=n(40),D=n(26),W=n(51),U=n(32),H=n(14),G=n(18),K=null,Y=function(e){var t=["/book","/purchase"];return Object(m.jsx)(a.a,{onChangeClientState:function(e){var n=e.metaTags;K!==window.location.pathname&&n.filter((function(e){return"page-loaded"===e.name&&"true"===e.content})).length>0&&(t.find((function(e){return window.location.pathname.endsWith(e)}))||Object(G.g)(window.location.href,document.title),K=window.location.pathname)},children:Object(m.jsx)("meta",{name:"page-loaded",content:"false"})})},J=Object(s.a)(),Z="#[Build.BuildNumber]#",$=function(){if(window.location.pathname){var e=window.location.pathname.split("/");if(e&&e[1])return e[1]}return""}(),X=function(){Object(o.useEffect)((function(){Object(c.initApiSdk)({businessSubdomain:$,loggedIn:!1}),Object(H.k)(window),window.location.search.includes("__throw-error")&&setTimeout((function(){throw new Error("Testing 123 this is a test error!!1! Thrown at: "+(new Date).toISOString())}),5e3),Object(D.d)(window),Object(z.b)(),Object(D.a)("timely:client-login:navigate-to-my-appointments",(function(e){return J.push("/".concat($,"/"))})),Object(D.a)("timely:client-login:navigate-to-feedback",(function(e){return J.push("/".concat($,"/feedback?url=").concat(encodeURIComponent(e.data.url)))})),Object(D.a)("timely:client-login:navigate-to-join-waitlist",(function(e){return J.push({pathname:"/".concat($,"/waitlist/join/").concat(e.data.obg),state:{returnUrl:e.data.returnUrl}})})),Object(D.a)("timely:client-login:has-modal-wrapper",(function(e){S(!0)})),Object(D.a)("timely:client-login:close-modal",(function(){return Object(D.b)()})),Object(z.a)("timely:client-login:logout",(function(e){h()}))}),[]);var e=Object(b.c)(),t=e.isLoggedIn,n=e.isLoading,s=e.clientProfile,l=e.setIsLoggedIn,d=e.refreshProfile,j=e.checkLoggedIn,p=e.logoutUser,h=Object(o.useCallback)((function(){p(),J.push("/".concat($,"/login"))}),[p]);Object(o.useEffect)((function(){Object(c.initApiSdk)({businessSubdomain:$,loggedIn:null!=s})}),[s]);var v=Object(f.b)(),g=v.businessSettings,O=v.isLoading,x=v.error,_=n||O,k=Object(o.useState)(!1),y=Object(i.a)(k,2),w=y[0],S=y[1];Object(o.useEffect)((function(){g&&Object(q.c)(g.clientConfig.raygunThrottleLimitMs)}),[g]);var N=Object(m.jsx)("div",{className:"d-flex align-items-center justify-content-center h-100",children:Object(m.jsx)(r.c,{size:"SIZE_XXLARGE",hasOutline:!1,"aria-label":"Loading, please wait"})});return _?N:Object(m.jsxs)(a.b,{children:[Object(m.jsx)(u.c,{history:J,children:Object(m.jsx)(b.a.Provider,{value:{isLoggedIn:t,setIsLoggedIn:l,clientProfile:s,refreshProfile:d,checkLoggedIn:j,needsFrameBreak:Object(W.b)(g)},children:Object(m.jsx)(E.a.Provider,{value:{config:g&&g.clientConfig},children:Object(m.jsx)(f.a.Provider,{value:{businessSettings:g},children:Object(m.jsx)(U.c,{showModalCloseButton:w,children:Object(m.jsx)(V,{children:Object(m.jsx)(C,{businessSettingsError:x,loadingState:N})})})})})})}),Object(m.jsx)(Y,{})]})}},,,,function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};t.__esModule=!0,t.initApiSdk=void 0;var r=n(24);c(n(115),t),c(n(173),t),c(n(178),t),c(n(74),t),c(n(24),t),t.initApiSdk=function(e){(0,r.setBusinessSubdomain)(e.businessSubdomain),(0,r.setIsLoggedIn)(e.loggedIn)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return g}));var i=n(3),c=n(6),r=n(0),s=Object(r.createContext)({isLoggedIn:!1,clientProfile:null,setIsLoggedIn:function(){var e=Object(c.a)(Object(i.a)().mark((function e(t){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),refreshProfile:function(){var e=Object(c.a)(Object(i.a)().mark((function e(){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),checkLoggedIn:function(){var e=Object(c.a)(Object(i.a)().mark((function e(){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),needsFrameBreak:!1}),o=n(11),a=n(75),u=n(7),l=n(5),d=n(1),b=["component","isLoggedIn","location"],f=function(e){var t=e,n=t.component,i=t.isLoggedIn,c=t.location,r=Object(a.a)(t,b);return Object(d.jsx)(u.b,Object(o.a)(Object(o.a)({},r),{},{render:function(e){return!0===i?Object(d.jsx)(n,Object(o.a)({},e)):Object(d.jsx)(u.a,{to:{pathname:"/".concat(l.c,"/login"),state:{from:c},search:c.search}})}}))},m=n(4),j=n(9),p=n(31),h=n(40),v=n(14);function g(){var e=Object(r.useState)(!1),t=Object(m.a)(e,2),n=t[0],s=t[1],o=Object(r.useState)(!0),a=Object(m.a)(o,2),u=a[0],l=a[1],d=Object(r.useState)(null),b=Object(m.a)(d,2),f=b[0],g=b[1],O=Object(r.useCallback)(Object(c.a)(Object(i.a)().mark((function e(){var t;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,j.AccountService.getProfile();case 3:_(t=e.sent),Object(v.o)(window,t),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),401===e.t0.status&&console.error("You are probably not logged in."),_(null);case 12:l(!1);case 13:case"end":return e.stop()}}),e,null,[[0,8]])}))),[]);function x(){return(x=Object(c.a)(Object(i.a)().mark((function e(){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,j.AccountService.getCheckSession();case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:l(!1);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))).apply(this,arguments)}function _(e){s(!!e),g(e),Object(p.d)(e),Object(v.n)(e)}function k(){return(k=Object(c.a)(Object(i.a)().mark((function e(t){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,O();case 3:e.next=7;break;case 5:y(),Object(h.c)("timely:client-login:logout");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(){_(null)}return Object(r.useEffect)((function(){O()}),[O]),{isLoggedIn:n,setIsLoggedIn:function(e){return k.apply(this,arguments)},isLoading:u,clientProfile:f,refreshProfile:O,logoutUser:y,checkLoggedIn:function(){return x.apply(this,arguments)}}}},,,,function(e,t,n){"use strict";n.d(t,"j",(function(){return i.a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"f",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"i",(function(){return m})),n.d(t,"h",(function(){return j})),n.d(t,"g",(function(){return p})),n.d(t,"l",(function(){return c.c})),n.d(t,"o",(function(){return c.f})),n.d(t,"k",(function(){return c.a})),n.d(t,"p",(function(){return c.g})),n.d(t,"m",(function(){return c.d})),n.d(t,"n",(function(){return c.e}));var i=n(16),c=n(18),r="login",s="login|sms-number-submitted";i.a.sub(s,(function(){Object(c.b)("submit",r,"submit-sms-number")}));var o="login|code-submitted";i.a.sub(o,(function(){Object(c.b)("submit",r,"submit-code")}));var a="login|code-rejected";i.a.sub(a,(function(){Object(c.b)("submit",r,"code-rejected")}));var u="login|stay-signed-in";i.a.sub(u,(function(e){Object(c.b)("submit",r,"stay-signed-in",e)}));var l="cards",d="cards|stored-card-saved";i.a.sub(d,(function(){Object(c.b)("submit",l,"card-saved")}));var b="cards|stored-card-used";i.a.sub(b,(function(){Object(c.b)("submit",l,"stored-card-used")}));var f="my-cards",m="my-cards|card-saved";i.a.sub(m,(function(){Object(c.b)("submit",f,"card-saved")}));var j="my-cards|card-error";i.a.sub(j,(function(e){Object(c.b)("submit",f,"card-error",e)}));var p="my-cards|card-delete";i.a.sub(p,(function(e){Object(c.b)("submit",f,"card-delete",e)}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i.b})),n.d(t,"a",(function(){return r}));var i=n(72),c=n(0),r=Object(c.createContext)({businessSettings:null})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(41),c=n(42),r=new(function(){return Object(c.a)((function e(){Object(i.a)(this,e),this._subscriptions=new Map}),[{key:"pub",value:function(e,t){if(this._subscriptions.has(e)){var n=this._subscriptions.get(e);if(n&&n.length)for(var i=0,c=n.length;i<c;i++)n[i]&&n[i](t)}}},{key:"sub",value:function(e,t){this._subscriptions.has(e)||this._subscriptions.set(e,[]),this._subscriptions.get(e).push(t)}}])}())},,function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"f",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return m}));var i=n(4),c=n(9),r=n(5),s=n(51),o=n(16);function a(e,t){e.timely=e.timely||{},e.timely.businessSettings=t}function u(e,t){e.timely=e.timely||{},e.timely.profileSettings=t}function l(e){e.dataLayer=e.dataLayer||[],o.a.pub("tracking-init"),function(e){var t="data-gtm";e.document.addEventListener("click",(function(e){var n=e.target;if(n&&n.hasAttribute(t)){var c=(n.getAttribute(t)||"").split("|"),r=Object(i.a)(c,4),s=r[0],o=r[1],a=r[2],u=r[3];(s||o)&&b("data-gtm_click",s,o,a,u)}}))}(e),d(window.location.href,document.title),function(e){var t=e.self!==e.top,n=!!document.cookie.split(";").find((function(e){return-1!==e.indexOf(s.a)})),i=navigator.userAgent,o=function(){var t=((e.location!==e.parent.location?document.referrer:document.location)||"").toString();if(t)return new URL(t).origin;var n=document.location;return n.ancestorOrigins&&n.ancestorOrigins.length?n.ancestorOrigins[0]:""}();if(!t)return;try{c.BusinessService.getTempFrameLogging(t,n,o,i,r.c)}catch(a){}}(e)}function d(e,t){window.dataLayer=window.dataLayer||[],window.dataLayer.push({pageTitle:t,pageUrl:e,event:"PageView"})}function b(e,t,n,i,c){window.dataLayer=window.dataLayer||[];var r={event:e,category:t,action:n};i&&(r.label=i),c&&(r.value=c),window.dataLayer.push(r)}function f(e){j((function(){var t=window.ga;if(t){t("set","dimension1",e.businessId.toString());t("set","dimension2",e.category)}}),0)}function m(e){j((function(){var t=window.ga;if(t){t("set","dimension3",(!!e).toString());t("set","userId",(e||{}).uid||"")}}),0)}function j(e,t){if(!window.ga){if(10===t)return;setTimeout((function(){j(e,t+1)}),10)}e()}},,,,,,function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};t.__esModule=!0,c(n(114),t)},,function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s})),n.d(t,"h",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"g",(function(){return b})),n.d(t,"e",(function(){return f})),n.d(t,"b",(function(){return j}));var i=n(11),c=new Map;function r(e){e.addEventListener("message",(function(e){if(e&&e.data&&e.data.type&&c.has(e.data.type)){var t=c.get(e.data.type);t&&t(e)}}))}function s(e,t){c.has(e)&&c.delete(e),c.set(e,t)}function o(e,t,n,i){m(t,e,"timely:client-login:set-client-login-mode-flag",{profile:n,business:i})}function a(e,t){e&&m(t,e,"timely:client-login:trigger-back-button-click")}function u(e,t,n){e&&m(t,e,"timely:client-login:confirm-payment-selection",n)}function l(e,t,n){e&&m(t,e,"timely:client-login:save-payment-method-callback",n)}function d(e,t,n){e&&m(t,e,"timely:client-login:submit-code-callback",n)}function b(e,t,n){e&&m(t,e,"timely:client-login:send-sms-callback",n)}function f(e,t,n,i){e&&m(t,e,"timely:client-login:profile-changed",{profile:n,business:i})}function m(e,t,n,c){var r=t.contentWindow;r&&e.bookingsUrl&&p(r,Object(i.a)({type:n},c||{}),e.bookingsUrl)}function j(){var e=window.parent;e&&p(e,{type:"timely:client-login:close-modal"},"*")}function p(e,t,n){e.postMessage(t,n)}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return u}));var i=n(27),c=n.n(i),r="qKL8wc0v3K0z3VlEcVuRw";function s(e){c()("apiKey",r),c()("setVersion",e),c()("enableCrashReporting",!0),c()("options",{ignore3rdPartyErrors:!0,disablePulse:!0,setCookieAsSecure:!0}),c()("saveIfOffline",!0),c()("filterSensitiveData",["password",/credit.*card/i]),u()}function o(e){c()("withTags",["env:"+e])}function a(e){var t;if(e){var n=(e.firstName+" "+e.lastName).trim();t={identifier:""+(e.email||e.smsNumber),email:e.email,firstName:e.firstName,fullName:n,isAnonymous:!1,uuid:l()}}else t={identifier:"",isAnonymous:!0,uuid:l()};c()("setUser",t)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;c()("onBeforeSend",function(e,t,n){var i=!1;return function(c){return i?t.apply(this,arguments):(i=!0,setTimeout((function(){i=!1}),n),e.apply(this,arguments))}}((function(e){return function(e){var t,n,i,c,r=["ChunkLoadError"],s=!(null===e||void 0===e||null===(t=e.Details)||void 0===t||null===(n=t.Error)||void 0===n||!n.ClassName)&&r.includes(e.Details.Error.ClassName),o=s||function(e){var t,n;if(null===e||void 0===e||null===(t=e.Details)||void 0===t||null===(n=t.Error)||void 0===n||!n.ClassName)return!1;var i=e.Details.Error,c=i.ClassName,r=i.Message;if("RangeError"===c&&"Maximum call stack size exceeded."===r)return!0;if("Error"===c&&"Script error."===r)return!0;return!1}(e)||function(e){var t;if(null===e||void 0===e||null===(t=e.Details)||void 0===t||!t.Error)return!1;var n=e.Details.Error,i=n.ClassName,c=n.Message,r=n.StackTrace;if("TypeError"===i&&"Type error"===c&&r.length){var s=r[0];if("[native code]"===s.FileName&&"fetch"===s.MethodName)return!0}return!1}(e);if(o)return!1;null!==e&&void 0!==e&&null!==(i=e.Details)&&void 0!==i&&null!==(c=i.Tags)&&void 0!==c&&c.find((function(e){return e.startsWith("env:")}))||e.Details.Tags.push("env:unknown");return e}(e)}),(function(){return!1}),e))}function l(){try{var e="timely:raygun:uuid",t=localStorage&&localStorage.getItem(e);return t||(t=n(),localStorage&&localStorage.setItem(e,t)),t}catch(i){}return n();function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return M})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return d})),n.d(t,"d",(function(){return f}));var i=n(0),c=n(10),r=n(15),s=n(36),o=n(4),a=n(45),u=n.n(a),l=n(1),d=function(e){return e.xs="xs",e.sm="sm",e.md="md",e.lg="lg",e.xl="xl",e}({}),b=function(e){var t=!1;return Object(l.jsxs)("div",{id:"breakpoint",style:{position:"fixed",top:-6,left:-2,opacity:.3},title:"",children:[Object(l.jsx)("span",{id:"xs",className:"".concat(""," d-inline-block d-sm-none"),children:t}),Object(l.jsx)("span",{id:"sm",className:"".concat(""," d-none d-sm-inline-block d-md-none"),children:t}),Object(l.jsx)("span",{id:"md",className:"".concat(""," d-none d-md-inline-block d-lg-none"),children:t}),Object(l.jsx)("span",{id:"lg",className:"".concat(""," d-none d-lg-inline-block d-xl-none"),children:t}),Object(l.jsx)("span",{id:"xl",className:"".concat(""," d-none d-xl-inline-block"),children:t})]})};function f(){var e=Object(i.useState)(r()),t=Object(o.a)(e,2),n=t[0],c=t[1];function r(){var e=document.querySelectorAll("#breakpoint > span"),t=Array.from(e).find((function(e){return e&&!!e.offsetParent})),n=t&&t.getAttribute("id");return d[n||"xs"]}return Object(i.useEffect)((function(){var e=u()((function(){return c(r())}),700);return c(r()),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),{breakpoint:n}}var m=n(3),j=n(6),p=n(9),h=n(7),v=n(5),g=n(26),O=Object(i.createContext)({areNavEntriesVisible:!1,breakpoint:d.xs,isLoggedInNavVisible:!1,navLinkVisibility:{bookButton:void 0,loginLink:!1,appointments:!1,modalCloseButton:!1,rewards:!1},pageNavArrowPath:void 0,pageNavOnArrowClick:void 0,pageNavTitle:void 0,setBookButtonVisible:function(e){},setPageNavArrowPath:function(e){},setPageNavOnArrowClick:function(e){},setPageNavTitle:function(e){}}),x=n(8),_=n(77),k=(n(199),function(e){var t=e.areNavEntriesVisible,n=e.businessSettings,c=e.navLinkVisibility,r=e.clientProfile,s=e.onCloseModalClick,a=e.onLogOutClick,u=Object(i.useRef)(null),d=Object(i.useState)(!1),b=Object(o.a)(d,2),f=b[0],m=b[1],j=Object(i.useState)(!1),p=Object(o.a)(j,2),h=p[0],g=p[1];Object(_.a)(u,(function(){return m(!1)}));var O=r?r.firstName||r.email||r.smsNumber:"",k="dropdown-menu ".concat(f?"dropdown-menu--is-visible":"dropdown-menu--is-hidden"),y="hamburger-menu ".concat(h?"hamburger-menu--is-visible":"hamburger-menu--is-hidden");return Object(l.jsx)("nav",{className:"main-nav navbar navbar-expand navbar-dark","data-testid":"main-nav",children:Object(l.jsxs)("ul",{className:"navbar-nav w-100 justify-content-end",children:[t&&Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)("li",{className:"nav-item mr-3 d-none d-lg-block",children:Object(l.jsx)("span",{className:"main-nav__business-name nav-link text-uppercase",children:null===n||void 0===n?void 0:n.businessName})}),c.appointments&&Object(l.jsx)("li",{className:"nav-item nav-item--slab d-none d-lg-block",children:Object(l.jsx)(x.b,{to:"/".concat(v.c,"/"),exact:!0,activeClassName:"nav-link--active-slab",className:"nav-link nav-link--slab",children:"My appointments"})}),c.rewards&&Object(l.jsx)("li",{className:"nav-item nav-item--slab d-none d-lg-block mr-3",children:Object(l.jsx)(x.b,{to:"/".concat(v.c,"/rewards"),exact:!0,activeClassName:"nav-link--active-slab",className:"nav-link nav-link--slab",children:"My rewards"})}),Object(l.jsx)("li",{className:"nav-item nav-item--slab d-none d-lg-block mr-auto",children:Object(l.jsx)(x.b,{to:"/".concat(v.c,"/consultations"),exact:!0,activeClassName:"nav-link--active-slab",className:"nav-link nav-link--slab",children:"My forms"})}),Object(l.jsxs)("li",{className:"nav-item d-lg-none mr-auto",children:[Object(l.jsxs)("button",{className:"nav__hamburger-button btn btn-link nav-link d-flex align-items-center",type:"button",id:"navbarHamburgerMenuLink","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":h,onClick:function(){return g(!h)},"data-testid":"nav__hamburger__toggle-button",children:[Object(l.jsx)("div",{className:"nav__hamburger-icon".concat(h?" nav__hamburger-icon--expanded":""),children:Object(l.jsxs)("div",{className:"nav__hamburger-icon__stripes",children:[Object(l.jsx)("div",{}),Object(l.jsx)("div",{}),Object(l.jsx)("div",{})]})}),Object(l.jsx)("span",{className:"ml-3",children:"Menu"})]}),Object(l.jsxs)("div",{className:y,"aria-labelledby":"navbarHamburgerMenuLink",children:[Object(l.jsx)("div",{className:"hamburger-menu__overlay",onClick:function(){return g(!1)}}),Object(l.jsx)("div",{className:"hamburger-menu__wrapper h-100",children:Object(l.jsx)("div",{className:"container h-100",children:Object(l.jsxs)("ul",{className:"hamburger-menu-nav nav flex-column h-100 w-100",children:[c.appointments&&Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/"),className:"nav-link",children:"My appointments"})}),c.rewards&&Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/rewards"),className:"nav-link",children:"My rewards"})}),Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/consultations"),className:"nav-link",children:"My forms"})}),c.details&&Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/details"),className:"nav-link",children:"My details"})}),c.cards&&Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/cards"),className:"nav-link",children:"My cards"})}),Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)("button",{type:"button",className:"btn btn-link btn-block nav-link text-left","data-testid":"nav__hamburger__sign-out-button",onClick:a,children:"Sign out"})}),Object(l.jsx)("li",{className:"main-nav__business-name mt-auto p-3 text-center text-uppercase",children:null===n||void 0===n?void 0:n.businessName})]})})})]})]})]}),c.bookButton&&Object(l.jsx)("li",{className:"nav-item",onClick:function(){return g(!1)},children:Object(l.jsx)(x.a,{to:"/".concat(v.c,"/book"),className:"main-nav__book-button btn nav-link btn-outline-light","data-testid":"nav__new-booking-button","data-gtm":"nav|click-link|new-booking",children:"Book now"})}),t&&Object(l.jsxs)("li",{className:"nav-item dropdown d-none d-lg-block",ref:u,children:[Object(l.jsx)("button",{type:"button",className:"btn btn-link nav-link dropdown-toggle",id:"navbarDropdownMenuLink","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":f,onClick:function(){return m(!f)},"data-testid":"nav__dropdown__toggle-button",children:O}),Object(l.jsxs)("div",{className:k,"aria-labelledby":"navbarDropdownMenuLink",onClick:function(){return m(!1)},children:[c.details&&Object(l.jsx)(x.a,{className:"dropdown-item","data-testid":"nav__dropdown__my-details-button",to:"/".concat(v.c,"/details"),children:"My details"}),c.cards&&Object(l.jsx)(x.a,{className:"dropdown-item","data-testid":"nav__dropdown__my-cards-button",to:"/".concat(v.c,"/cards"),children:"My cards"}),Object(l.jsx)("button",{className:"dropdown-item",onClick:a,"data-testid":"nav__dropdown__sign-out-button",children:"Sign out"})]})]}),c.modalCloseButton&&Object(l.jsx)("li",{className:"nav-item",children:Object(l.jsx)("button",{className:"modal-close-button btn nav-link ml-3 p-0",onClick:s,"aria-label":"Close online booking modal",children:Object(l.jsx)("span",{children:"\xd7"})})})]})})}),y=n(29),w=n.n(y),S=n(99),N=(n(263),function(e){var t=e.arrowPath,n=e.breakpoint,i=e.isLoginLinkVisible,c=e.isModalCloseButtonVisible,r=e.onArrowClick,o=e.onCloseModalClick,a=e.title,u=!!v.c&&(i||c||!!a||!!r||!!t);return Object(s.b)("page-nav--".concat(u?"visible":"hidden")),Object(l.jsx)(l.Fragment,{children:u&&Object(l.jsxs)("div",{className:"page-nav d-flex p-2 pr-0 align-items-center border-bottom","data-testid":"page-nav",children:[Object(l.jsxs)("div",{className:"page-nav__left",children:[!!r&&Object(l.jsx)("button",{onClick:r,className:"btn p-0",children:Object(l.jsx)("svg",{width:"37px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:Object(l.jsx)("path",{d:"M18.807 23l-6.67-6.67a.466.466 0 0 1 0-.66L18.807 9",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"#39464e"})})}),!!t&&Object(l.jsx)(x.b,{to:t,className:"btn p-0",children:Object(l.jsx)("svg",{width:"37px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:Object(l.jsx)("path",{d:"M18.807 23l-6.67-6.67a.466.466 0 0 1 0-.66L18.807 9",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"#39464e"})})})]}),Object(l.jsx)("h5",{className:"font-weight-bold p-2 text-center mb-0 pl-3 pr-3",children:a}),Object(l.jsxs)("div",{className:"page-nav__right",children:[i&&Object(l.jsx)(S.LoginLink,{className:w()("login-button btn",{"btn-outline-dark":n!==d.xs&&n!==d.sm}),"data-testid":"nav__log-in-button","data-gtm":"nav|click-link|log-in",children:"Log in"}),c&&Object(l.jsx)("button",{className:"modal-close-button btn nav-link p-0",onClick:o,"aria-label":"Close online booking modal",children:Object(l.jsx)("span",{className:"pl-2 pr-2",children:"\xd7"})})]})]})})}),C=function(e){var t=Object(i.useContext)(c.a),n=t.setIsLoggedIn,o=t.clientProfile,a=Object(i.useContext)(r.a).businessSettings,u=Object(i.useContext)(O),d=u.areNavEntriesVisible,b=u.breakpoint,f=u.navLinkVisibility,x=u.isLoggedInNavVisible,_=u.pageNavArrowPath,y=u.pageNavOnArrowClick,w=u.pageNavTitle;Object(s.b)("main-nav--".concat(x?"visible":"hidden"));var S=Object(h.g)();function C(){return(C=Object(j.a)(Object(m.a)().mark((function e(){return Object(m.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,p.AccountService.getLogout(),e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),console.error("Error logging out",e.t0),e.abrupt("return");case 8:return e.next=10,n(!1);case 10:S.push("/".concat(v.c,"/login"));case 11:case"end":return e.stop()}}),e,null,[[0,4]])})))).apply(this,arguments)}function M(){Object(g.b)()}var L=!x&&f.modalCloseButton;return Object(l.jsxs)(l.Fragment,{children:[x&&Object(l.jsx)(k,{areNavEntriesVisible:d,businessSettings:a,navLinkVisibility:f,clientProfile:o,onCloseModalClick:M,onLogOutClick:function(){return C.apply(this,arguments)}}),Object(l.jsx)(N,{arrowPath:_,breakpoint:b,isModalCloseButtonVisible:L,isLoginLinkVisible:f.loginLink,onArrowClick:y,onCloseModalClick:M,title:w})]})},M=(n(264),function(e){var t=e.showModalCloseButton,n=Object(i.useContext)(c.a).isLoggedIn,a=function(e,t,n){var c=Object(i.useState)(),r=Object(o.a)(c,2),s=r[0],a=r[1],u=Object(i.useState)(),l=Object(o.a)(u,2),d=l[0],b=l[1],m=Object(i.useState)(),j=Object(o.a)(m,2),g=j[0],O=j[1],x=Object(i.useState)(),_=Object(o.a)(x,2),k=_[0],y=_[1],w=f().breakpoint,S=Object(h.h)().pathname;Object(i.useEffect)((function(){y(void 0),b(void 0),O(void 0)}),[S]);var N=S.replace("/".concat(v.c,"/"),""),C=N.startsWith("book")||N.startsWith("purchase"),M=N.startsWith("login"),L=e&&e.clientLoginStatus===p.ClientLoginStatus.Disabled,I=t,P=e&&e.timelyPayEnabled;return{navLinkVisibility:{bookButton:s&&t&&!C&&e&&e.onlineBookingEnabled,loginLink:!t&&!M&&!L,appointments:!0,details:!0,cards:P,modalCloseButton:n,rewards:!1},areNavEntriesVisible:t,breakpoint:w,isLoggedInNavVisible:I,pageNavArrowPath:d,pageNavOnArrowClick:g,pageNavTitle:k,setBookButtonVisible:function(e){return a(e)},setPageNavArrowPath:function(e){return b(e)},setPageNavOnArrowClick:function(e){O((function(){return e}))},setPageNavTitle:function(e){return y(e)}}}(Object(i.useContext)(r.a).businessSettings,n,t);return Object(s.a)(t?"modal":""),Object(l.jsxs)(O.Provider,{value:a,children:[Object(l.jsxs)("header",{className:"f-0",children:[Object(l.jsx)(C,{}),Object(l.jsx)(b,{})]}),Object(l.jsx)("main",{role:"main",className:"main d-flex flex-column f-1",children:Object(l.jsx)("div",{className:"main__container container d-flex flex-column f-1 px-0",children:Object(l.jsx)("div",{className:"main__content col-xl-8 mx-auto d-flex flex-column f-1",children:e.children})})})]})})},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return r}));var i=n(0);function c(e){s(document.body,e)}function r(e){s(document.documentElement,e)}function s(e,t){Object(i.useEffect)((function(){var n=function(t){return e.classList.add(t)},i=function(t){return e.classList.remove(t)};if(t)return t instanceof Array?t.map(n):n(t),function(){t instanceof Array?t.map(i):i(t)}}),[e,t])}},,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s}));var i=null;function c(){"undefined"!==typeof BroadcastChannel&&(i=new BroadcastChannel("timely:client-login"))}function r(e,t){i&&(i.onmessage=function(n){n.data.eventType===e&&t(n.data)})}function s(e){i&&i.postMessage({eventType:e})}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(0),c=Object(i.createContext)({config:null})},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var i="timely-cookie-check";function c(e){try{if(window.self===window.top)return!1}catch(n){}var t=navigator.userAgent.toLowerCase().indexOf("chrome")>-1||navigator.userAgent.toLowerCase().indexOf("chromium")>-1;return!!(navigator.userAgent.toLowerCase().indexOf("safari")>-1&&!t&&e&&e.cardCaptureEnabled)||!document.cookie.split(";").find((function(e){return e.trimStart().startsWith(i)}))}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(0),n(5);var i=n(1),c=function(e){return Object(i.jsxs)("div",{className:"container text-center my-3",children:[Object(i.jsx)("h3",{children:"Whoops... we can't find that page"}),Object(i.jsx)("p",{children:"Please double check that you have the correct address and try again"}),Object(i.jsx)("p",{className:"text-muted",children:"Error code 404"}),!1]})}},,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return b}));var i=n(3),c=n(6),r=n(4),s=n(9),o=n(0),a=n(5),u=n(31),l=n(14);function d(){var e=Object(o.useState)(!0),t=Object(r.a)(e,2),n=t[0],d=t[1],b=Object(o.useState)(null),f=Object(r.a)(b,2),m=f[0],j=f[1],p=Object(o.useState)(null),h=Object(r.a)(p,2),v=h[0],g=h[1];return Object(o.useEffect)((function(){function e(){return(e=Object(c.a)(Object(i.a)().mark((function e(){var t;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.BusinessService.getSettings();case 3:t=e.sent,j(t),Object(l.m)(t),Object(u.b)(t.clientConfig.env),Object(l.l)(window,t),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),j(null),404!==e.t0.status&&g(e.t0);case 14:d(!1);case 15:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}a.c?function(){e.apply(this,arguments)}():d(!1)}),[]),{isLoading:n,businessSettings:m,error:v}}function b(){var e=Object(o.useState)(!1),t=Object(r.a)(e,2),n=t[0],a=t[1],u=Object(o.useState)(),l=Object(r.a)(u,2),d=l[0],b=l[1],f=Object(o.useState)(null),m=Object(r.a)(f,2),j=m[0],p=m[1];function h(){return(h=Object(c.a)(Object(i.a)().mark((function e(){var t;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),e.prev=1,e.next=4,s.BusinessService.getPrivacyPolicy();case 4:t=e.sent,b(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),404!==e.t0.status&&p(e.t0);case 11:return e.prev=11,a(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,8,11,14]])})))).apply(this,arguments)}return{isLoading:n,getPolicyText:function(){return h.apply(this,arguments)},policyText:d,error:j}}},,function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();t.__esModule=!0,t.ResponseError=void 0;var c=function(e){function t(t,n){var i=this.constructor,c=e.call(this,t)||this;c.status=n;var r=i.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(c,r):c.__proto__=r,c}return i(t,e),t}(Error);t.ResponseError=c},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(0);function c(e,t){function n(n){e&&e.current&&!e.current.contains(n.target)&&t(n)}Object(i.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c}));var i=window.location,c=window.history},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"LoginContainer",(function(){return A})),n.d(t,"LoginLink",(function(){return B})),n.d(t,"getReturnUrl",(function(){return T}));var i=n(3),c=n(11),r=n(6),s=n(4),o=n(9),a=n(0),u=n(33),l=n(7),d=n(5),b=n(10),f=n(78),m=n(15),j=n(14),p=n(23),h=n(34),v=n(45),g=n.n(v),O=n(43),x=n(32),_=(n(250),n(8)),k=n(1),y=function(e){var t=e.smsNumber,n=e.onFormSubmit,i=e.serverErrorState,r=e.stillWaitingPromptIsVisible,o=e.guestButtonIsVisible,u=Object(l.g)(),b=Object(a.useContext)(m.a).businessSettings,f=b.stillWaitingHint,j=b.countryName,v=b.businessName,y=Object(a.useRef)(null),w=/^[0-9]*$/,S=Object(s.a)(i,2),N=S[0],C=S[1],M={code:"",staySignedIn:!1},L=Object(a.useState)(M),I=Object(s.a)(L,2),P=I[0],E=I[1],R=Object(a.useState)(0),A=Object(s.a)(R,2),T=A[0],F=A[1],V=Object(a.useState)(0),q=Object(s.a)(V,2),z=q[0],D=q[1],W=Object(a.useState)("2rem"),U=Object(s.a)(W,2),H=U[0],G=U[1],K=Object(a.useContext)(x.b).breakpoint,Y=Object(O.b)({mode:"onSubmit",defaultValues:{code:"",staySignedIn:!1}}),J=Y.register,Z=Y.errors,$=Y.handleSubmit,X=Y.formState,Q=Y.setValue,ee=Z.code||N?"is-invalid":"";Object(a.useEffect)((function(){function e(){var e=document.querySelector(".code-input__box "),t=document.getElementById("code");if(!e||!t||!document.defaultView)return"2em";var n=e.offsetWidth/4;return K===x.a.xl?n=e.offsetWidth/3:K===x.a.xs&&(n=0),t.offsetWidth/12+n+"px"}var t=g()((function(){return G(e())}),1e3);return G(e()),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[K]),Object(a.useEffect)((function(){if(!N&&P.code&&6===P.code.toString().length){if(X.isSubmitting)return;y.current&&y.current.click()}}),[P.code,N,X.isSubmitting]);var te=function(){C(void 0)};function ne(e){var t=P.code;if(!t)return"\xa0";var n=t.toString();return n.length<e?"\xa0":n[e]}function ie(e){var t="";return T===e&&(t+=" code-input__box--active"),null!==T&&null!==z&&T!==z&&e>=T&&e<z&&(t+=" code-input__box--selected"),t.trim()}var ce=Object(a.useState)(),re=Object(s.a)(ce,2);re[0],re[1];return Object(k.jsx)("section",{className:"d-flex flex-column h-100 mx-md-5 text-center",children:Object(k.jsxs)("div",{className:"flex-grow-1 d-flex flex-column",children:[Object(k.jsx)("div",{className:"d-flex flex-column justify-content-center f-1",children:Object(k.jsx)("div",{className:"card",children:Object(k.jsxs)("div",{className:"card-body",children:[Object(k.jsx)("div",{className:"m-3",children:Object(k.jsx)("svg",{width:"36",height:"43",xmlns:"http://www.w3.org/2000/svg",children:Object(k.jsxs)("g",{fillRule:"nonzero",fill:"none",children:[Object(k.jsx)("circle",{fill:"#999",cx:"12.5",cy:"38.5",r:"1.5"}),Object(k.jsx)("path",{d:"M4.643 43C2.082 43 0 40.99 0 38.52V4.48C0 2.007 2.082 0 4.643 0h5.571c.513 0 .929.401.929.896 0 .494-.416.896-.929.896H4.643c-1.536 0-2.786 1.205-2.786 2.687v29.563h22.286V27.77c0-.495.416-.896.928-.896.513 0 .929.401.929.896v10.75C26 40.99 23.916 43 21.357 43H4.643zm-2.786-4.48c0 1.483 1.25 2.688 2.786 2.688h16.714c1.536 0 2.786-1.205 2.786-2.687v-2.688H1.857v2.688z",fill:"#999"}),Object(k.jsx)("path",{d:"M14.77 23C13.241 23 12 21.81 12 20.346V2.654C12 1.19 13.242 0 14.77 0h18.46C34.759 0 36 1.19 36 2.654v17.692C36 21.81 34.758 23 33.23 23H14.77zm0-21.23c-.51 0-.924.396-.924.884v17.692c0 .488.414.885.923.885h18.462c.51 0 .923-.397.923-.885V2.654c0-.488-.414-.885-.923-.885H14.769z",fill:"#FF616A"}),Object(k.jsx)("path",{d:"M18.857 8C18.384 8 18 7.552 18 7s.384-1 .857-1h10.286c.473 0 .857.448.857 1s-.384 1-.857 1H18.857zM18.857 12c-.473 0-.857-.448-.857-1s.384-1 .857-1h10.286c.473 0 .857.448.857 1s-.384 1-.857 1H18.857zM18.923 18c-.51 0-.923-.448-.923-1s.414-1 .923-1h4.154c.51 0 .923.448.923 1s-.414 1-.923 1h-4.154z",fill:"#FF616A"})]})})}),"Great! We've sent a SMS to ",Object(k.jsx)("span",{className:"text-bold",children:t})," with a code to enter below"]})})}),r&&Object(k.jsxs)(p.a,{title:"Still waiting?",dataTestId:"still-waiting-prompt",type:p.a.TYPE_INFO,icon:!1,children:["Try"," ",Object(k.jsx)(B,{"data-gtm":"login|click-link|resend-code|still-waiting-prompt",onClick:te,children:"resend the code"}),o?Object(k.jsxs)(k.Fragment,{children:[" ","or"," ",Object(k.jsx)(_.a,{to:{pathname:"/".concat(d.c,"/book"),search:u.location.search},"data-gtm":"login|click-link|continue-as-guest","data-testid":"code-form_continue-as-guest-link",children:"continue as guest"})]}):"",".",Object(k.jsx)("p",{className:"code-form--still-waiting-hint",children:f||Object(k.jsxs)(k.Fragment,{children:["Please note: code can only be sent to mobile numbers from ",j,".",Object(k.jsx)("br",{}),"If you cannot log in, please contact ",v,"."]})})]}),!!N&&Object(k.jsx)("div",{className:"text-left",children:Object(k.jsxs)(p.a,{title:N.message,type:p.a.TYPE_ERROR,description:"",dataTestId:"server-error-prompt",children:["Check that the code entered is correct or"," ",Object(k.jsx)(B,{"data-gtm":"login|click-link|resend-code|server-error-prompt",onClick:te,children:"resend code"}),"."]})}),Object(k.jsxs)("form",{onSubmit:$(n),className:"f-2","data-testid":"code-form",children:[Object(k.jsx)("div",{className:"d-flex flex-column justify-content-center f-1",children:Object(k.jsx)(p.a,{type:p.a.TYPE_INFO,icon:!1,dataTestId:"stay-signed-in",children:Object(k.jsxs)("label",{htmlFor:"staySignedIn",className:"d-block mb-0 text-left",children:[Object(k.jsx)("input",{type:"checkbox",name:"staySignedIn",id:"staySignedIn",onChange:function(e){Q("staySignedIn",e.target.checked),E(Object(c.a)(Object(c.a)({},P),{},{staySignedIn:e.target.checked}))},className:"mr-2",ref:J}),"Stay signed in for 90 days and reduce the need to keep logging in"]})})}),Object(k.jsxs)("div",{className:"form-group text-left",children:[Object(k.jsx)("label",{htmlFor:"code",children:"Enter code from SMS"}),Object(k.jsxs)("div",{className:"code-input__wrapper ".concat(ee),children:[Object(k.jsx)("input",{ref:J({required:"Please enter the 6-digit code sent to you by SMS",minLength:{value:6,message:"Code entered must be 6 digits"}}),onKeyPress:function(e){return function(e){if(!w.test(e.key))return e.preventDefault(),void e.stopPropagation();!function(e){(e.currentTarget.value||"").toString().length>=6&&(e.preventDefault(),e.stopPropagation())}(e)}(e)},onPaste:function(e){return function(e){var t=e.clipboardData.getData("Text").trim();if(!w.test(t))return e.preventDefault(),void e.stopPropagation();if(t.length>6){e.preventDefault(),e.stopPropagation();var n=t.substring(0,6);Q("code",n,{shouldValidate:!0,shouldDirty:!0}),E(Object(c.a)(Object(c.a)({},P),{},{code:n}))}}(e)},onSelect:function(e){return function(e){var t=e.target;t.selectionStart!==T&&F(t.selectionStart),t.selectionEnd!==z&&D(t.selectionEnd)}(e)},onChange:function(e){return E(Object(c.a)(Object(c.a)({},P),{},{code:e.target.value}))},autoFocus:!0,autoComplete:"one-time-code",type:"tel",pattern:"[0-9]*",size:3,name:"code",className:"form-control code-input__input",style:{letterSpacing:H},id:"code","data-testid":"code-form_input"}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(0)),children:ne(0)}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(1)),children:ne(1)}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(2)),children:ne(2)}),Object(k.jsx)("div",{className:"code-input__box-divider text-muted",children:Object(k.jsx)("span",{children:"-"})}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(3)),children:ne(3)}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(4)),children:ne(4)}),Object(k.jsx)("div",{className:"code-input__box ".concat(ie(5)),children:ne(5)})]}),Z.code&&Object(k.jsx)("div",{className:"invalid-feedback d-block",children:Z.code.message})]}),Object(k.jsx)("button",{ref:y,type:"submit",className:"btn btn-dark btn-block","data-testid":"code-form_submit",disabled:X.isSubmitting,children:X.isSubmitting?Object(k.jsx)(h.c,{size:"SIZE_MEDIUM",hasOutline:!1}):"Sign in"}),Object(k.jsx)("p",{className:"mt-3",children:Object(k.jsx)(B,{className:"text-dark","data-testid":"code-form__resend-code","data-gtm":"login|click-link|resend-code",onClick:te,children:"Resend code"})}),null]})]})})},w=function(e){var t,n=e.smsNumber,c=e.onCodeSubmitted,u=e.serverErrorState,b=e.guestButtonIsVisible,f=Object(l.g)(),m=Object(l.h)(),p=Object(a.useState)(!1),h=Object(s.a)(p,2),v=h[0],g=h[1],O=Object(s.a)(u,2)[1];if(Object(a.useEffect)((function(){var e=setTimeout((function(){return g(!0)}),1e4);return function(){return clearTimeout(e)}}),[g]),!n)return null!==(t=m.state)&&void 0!==t&&t.from?Object(k.jsx)(l.a,{to:m.state.from}):Object(k.jsx)(l.a,{to:"/".concat(d.c,"/login")});function x(){return(x=Object(r.a)(Object(i.a)().mark((function e(t){var r,s;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!1),r=t.code,s=t.staySignedIn,e.prev=2,O(void 0),e.next=6,o.AccountService.postLogin({smsNumber:n,code:""+r,staySignedIn:s});case 6:return e.next=8,c();case 8:j.j.pub(j.f,s.toString()),e.next=19;break;case 11:if(e.prev=11,e.t0=e.catch(2),j.j.pub(j.c,n),O(e.t0),!(e.t0 instanceof o.ResponseError)){e.next=19;break}if(!(429===e.t0.status)){e.next=19;break}return e.abrupt("return",f.push({pathname:"/".concat(d.c,"/login"),state:m.state}));case 19:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}return Object(k.jsx)(y,{onFormSubmit:function(e){return x.apply(this,arguments)},smsNumber:n,serverErrorState:u,stillWaitingPromptIsVisible:v,guestButtonIsVisible:b})},S=n(29),N=n.n(S),C=n(105),M=n.n(C),L=n(106),I=n(48),P=function(e){var t=e.onFormSubmit,n=e.smsNumber,i=e.callingCode,c=e.serverErrorState,r=e.guestButtonIsVisible,o=Object(l.g)(),u=Object(a.useContext)(I.a).config,b=Object(a.useContext)(m.a).businessSettings,f=Object(a.useState)(),j=Object(s.a)(f,2),v=j[0],g=j[1],x=Object(O.b)({mode:"onSubmit",defaultValues:{smsNumber:n||""}}),y=x.register,w=x.errors,S=x.handleSubmit,C=x.formState,P=x.setValue,E=c[0];return Object(a.useEffect)((function(){null===v||void 0===v||v.reset()}),[null===E||void 0===E?void 0:E.message,v]),Object(k.jsxs)("section",{className:"d-flex flex-column h-100 mt-3 mx-md-5 text-center",children:[Object(k.jsxs)("div",{className:"flex-grow-1 d-flex flex-column",children:[Object(k.jsx)("div",{className:"d-flex flex-column justify-content-center f-1",children:Object(k.jsx)("div",{className:"card",children:Object(k.jsxs)("div",{className:"card-body",children:[Object(k.jsx)("div",{className:"m-3",children:Object(k.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"67",height:"35",children:[Object(k.jsx)("defs",{}),Object(k.jsxs)("g",{fill:"none",fillRule:"nonzero",children:[Object(k.jsx)("path",{fill:"#999",d:"M56.93 1c3.155 0 5.713 2.52 5.713 5.628v.734l-.001.046v4.358a5.569 5.569 0 01-1.689 3.995c3.2 1.356 5.497 4.245 6.041 7.674a.49.49 0 01-.414.56.496.496 0 01-.568-.409c-.518-3.268-2.8-5.991-5.943-7.119a5.74 5.74 0 01-3.14.927 5.749 5.749 0 01-3.136-.923l.229-.081a9.202 9.202 0 00-4.144 2.784.502.502 0 01-.7.062.484.484 0 01-.062-.69 10.179 10.179 0 013.792-2.784 5.563 5.563 0 01-1.692-3.996V6.628C51.216 3.52 53.774 1 56.93 1zm-4.72 9.962v.804c0 2.567 2.113 4.649 4.72 4.649 2.606 0 4.72-2.082 4.72-4.65v-.8c-.449.922-.991 1.69-1.5 1.964-.399.215-.807.178-1.2-.05a2.56 2.56 0 01-.36-.258l-.098-.084a7.958 7.958 0 01-.147-.133l-.257-.24c-.495-.459-.806-.643-1.157-.643-.328 0-.621.16-1.061.554l-.354.328c-.055.051-.1.093-.146.133-.167.147-.31.257-.457.342-.394.23-.803.266-1.203.051-.51-.275-1.052-1.043-1.5-1.967zm.366-6.132l-.07.175a4.577 4.577 0 00-.296 1.623v.734c0 1.432 1.193 4.286 1.977 4.708.055.03.095.031.177-.01l.121-.07c.08-.05.149-.115.608-.54.666-.617 1.159-.907 1.838-.907s1.171.29 1.837.907l.474.435c.108.096.129.103.212.151.112.065.155.069.219.035.778-.42 1.96-3.234 1.977-4.677v-.768a9.252 9.252 0 01-2.98.491 9.232 9.232 0 01-6.094-2.287zM56.93 1.98a4.735 4.735 0 00-3.858 1.97 8.267 8.267 0 008.467 1.677c-.466-2.087-2.353-3.647-4.61-3.647zM11.934 17.523l.268.092c.04.01.078.025.113.043a10.706 10.706 0 014.128 2.819.482.482 0 01-.035.682.487.487 0 01-.686-.035 9.714 9.714 0 00-3.15-2.308v.076a4.11 4.11 0 01-2.548 3.795 4.141 4.141 0 01-4.497-.89.482.482 0 010-.683.487.487 0 01.686 0 3.167 3.167 0 003.44.68 3.144 3.144 0 001.945-2.776l.003-.126v-.46a9.756 9.756 0 00-5.183-.282.484.484 0 11-.208-.945 10.73 10.73 0 015.724.318zM9.349 1.04c4.371.544 7.642 4.24 7.651 8.6l-.001.165v.31c0 2.644-2.101 4.8-4.733 4.903a5.605 5.605 0 01-7.009.415 5.558 5.558 0 01-1.656-1.86l-.148-.002c.276.465.436 1.058.436 1.694 0 .846-.283 1.617-.745 2.108.452.353.741.902.741 1.519 0 .382-.191.882-.532 1.524-.08.151-.168.308-.262.47a19.53 19.53 0 01-.598.958l-.15.224a.487.487 0 01-.8 0l-.151-.224-.259-.4c-.116-.184-.23-.371-.339-.559a13.515 13.515 0 01-.262-.47C.192 19.776 0 19.277 0 18.894c0-.619.292-1.17.745-1.523-.46-.492-.741-1.26-.741-2.104 0-.843.282-1.612.741-2.104a1.926 1.926 0 01-.743-1.426L0 11.639V9.463a8.448 8.448 0 012.793-6.272 8.531 8.531 0 016.556-2.15zM1.943 17.926a.97.97 0 00-.972.967c0 .17.153.569.42 1.072.074.14.156.286.243.436l.079.133.08.133.15.242.15-.242.158-.266c.088-.15.17-.296.243-.436.267-.503.42-.901.42-1.072a.97.97 0 00-.971-.967zm.004-4.352c-.486 0-.972.726-.972 1.692s.486 1.693.972 1.693c.485 0 .971-.727.971-1.693 0-.966-.486-1.692-.971-1.692zm6.556-6.7l-.096.155c-.21.323-.45.64-.724.944-.944 1.044-2.117 1.74-3.529 1.925L4 9.915l-.019.087a4.584 4.584 0 001.729 4.563l.113.083a4.63 4.63 0 005.363 0 4.585 4.585 0 001.841-4.646l-.019-.087-.155-.018c-1.354-.177-2.489-.826-3.412-1.8l-.114-.124A7.479 7.479 0 018.6 7.03l-.098-.155zM3.445 3.909A7.483 7.483 0 00.974 9.27l-.003.192v2.176c0 .51.397.928.9.965l.072.002h1.241a5.53 5.53 0 01-.033-3.286.485.485 0 01.446-.345c1.359-.054 2.47-.66 3.363-1.649.334-.368.612-.765.837-1.16.133-.236.217-.414.255-.508a.486.486 0 01.902 0c.038.094.123.272.256.507.225.396.504.792.837 1.161.894.988 2.005 1.594 3.363 1.65a.485.485 0 01.446.344 5.54 5.54 0 01-.635 4.567 3.947 3.947 0 002.805-3.651l.001-.12v-.318c.067-3.946-2.865-7.308-6.786-7.795a7.551 7.551 0 00-5.796 1.905z"}),Object(k.jsx)("path",{fill:"#FF616A",d:"M33.5 0c6.963 0 12.622 5.69 12.735 12.753l.001.215v3.136c0 .782.143 1.556.421 2.283l.08.197 2.041 4.85c.587 1.388-.029 3-1.39 3.623a21.857 21.857 0 01-4.016 1.33 16.252 16.252 0 014.636 5.894.508.508 0 01-.236.67.49.49 0 01-.658-.24c-2.49-5.358-7.792-8.776-13.614-8.776-5.823 0-11.125 3.418-13.615 8.777a.49.49 0 01-.658.24.508.508 0 01-.236-.671 16.272 16.272 0 014.636-5.896 21.765 21.765 0 01-4.022-1.33c-1.32-.606-1.938-2.151-1.426-3.514l.043-.107 2.04-4.85c.303-.718.471-1.487.497-2.267l.004-.213v-3.136C20.763 5.806 26.465 0 33.499 0zm0 1.007c-6.424 0-11.643 5.248-11.746 11.763l-.002.198v3.136c0 .913-.168 1.817-.495 2.666l-.085.21-2.04 4.851c-.375.884.017 1.91.873 2.302 1.514.67 3.1 1.157 4.726 1.452a15.816 15.816 0 018.768-2.657c3.178 0 6.21.955 8.77 2.654l-.192.036a20.854 20.854 0 004.912-1.482 1.774 1.774 0 00.916-2.213l-.036-.092-2.042-4.85a7.414 7.414 0 01-.577-2.649l-.003-.228v-3.136c0-6.606-5.26-11.96-11.748-11.96zm-.46 5.605a.491.491 0 01.919 0l.044.104.103.224a10.55 10.55 0 001.568 2.354c1.406 1.59 3.16 2.57 5.305 2.66.211.008.393.152.454.358 1.017 3.455-.236 7.186-3.118 9.284a8.165 8.165 0 01-9.637 0c-2.882-2.098-4.135-5.83-3.118-9.284a.496.496 0 01.454-.359c2.149-.088 3.906-1.068 5.312-2.659a10.536 10.536 0 001.67-2.578zm.46 1.314l-.135.237c-.36.616-.794 1.228-1.303 1.805-1.477 1.671-3.328 2.754-5.57 2.962l-.075.006-.038.165c-.63 2.84.433 5.812 2.737 7.573l.137.102a7.19 7.19 0 008.487 0c2.399-1.746 3.516-4.778 2.874-7.675l-.039-.165-.074-.006c-2.166-.203-3.966-1.223-5.418-2.802l-.144-.16a11.547 11.547 0 01-1.436-2.036l-.004-.006z"})]})]})}),"Book appointments faster, see your booking history, and change upcoming appointments."]})})}),E&&Object(k.jsx)(p.a,{type:p.a.TYPE_ERROR,description:E.message,dataTestId:"sms-form__server-error"}),Object(k.jsxs)("form",{onSubmit:S(t),className:"f-2 d-flex flex-column","data-testid":"sms-form",children:[Object(k.jsxs)("div",{className:"text-left",children:[Object(k.jsx)("label",{htmlFor:"smsNumber",children:"Enter your mobile number"}),Object(k.jsxs)("div",{className:"input-group mb-3",children:[""===i?Object(k.jsx)("span",{}):Object(k.jsx)("div",{className:"input-group-prepend",children:Object(k.jsx)("span",{className:"input-group-text",id:"callingcode",children:"+".concat(i)})}),Object(k.jsx)("input",{ref:y({required:"Please enter valid SMS number",pattern:{value:/^(\+\d{1,3}[- ]?)?\d{8,14}$/,message:"Please enter valid SMS number"}}),name:"smsNumber",autoComplete:"tel",autoFocus:!0,type:"tel",className:function(e){return N()({"form-control":!0,"is-invalid":e})}(w),id:"smsNumber","aria-describedby":"sms-hint","data-testid":"sms-form__input"}),Object(k.jsx)("input",{type:"hidden",name:"turnstileCaptchaResponse",id:"turnstileCaptchaResponse","data-testid":"turnstilecaptcha__input",ref:y({required:!1})}),Object(k.jsx)("input",{type:"hidden",name:"recaptchaResponse",id:"recaptchaResponse","data-testid":"recaptcha__input",ref:y({required:!1})})]}),w.smsNumber&&Object(k.jsx)("p",{className:"mt-2 mb-0 small text-danger","data-testid":"sms-form__input-validation",children:w.smsNumber.message})]}),b.isTurnstileCaptchaRequired&&u.turnstileCaptchaSiteKey?Object(k.jsx)("div",{className:"form-group captcha-container",children:Object(k.jsx)(M.a,{onLoad:function(e,t){return g(t)},sitekey:u.turnstileCaptchaSiteKey,onVerify:function(e){P("turnstileCaptchaResponse",e)}})}):b.isRecaptchaRequired?Object(k.jsx)("div",{className:"form-group captcha-container",children:Object(k.jsx)(L.a,{sitekey:u.googleEnterpriseRepcaptchaSiteKeyMedium,onChange:function(e){return P("recaptchaResponse",e)}})}):null,Object(k.jsx)("button",{type:"submit",className:"btn btn-dark btn-block mb-3","data-testid":"sms-form__submit",disabled:C.isSubmitting,children:C.isSubmitting?Object(k.jsx)(h.c,{size:"SIZE_MEDIUM",hasOutline:!1}):"Send code"}),Object(k.jsx)("small",{id:"sms-hint",className:"form-text text-muted",children:"We'll send you a secure code to sign in with, no password needed."}),Object(k.jsx)("span",{className:"flex-grow-1"}),r&&Object(k.jsx)("span",{className:"flex-grow-1 border-top"})]})]}),r?Object(k.jsx)("div",{className:"mb-5",children:Object(k.jsx)(_.a,{to:{pathname:"/".concat(d.c,"/book"),search:o.location.search},className:"mt-2 btn btn-outline-dark","data-gtm":"login|click-link|continue-as-guest","data-testid":"sms-form_continue-as-guest-link",children:"Or, continue as guest"})}):""]})},E=function(e){var t=e.smsNumber,n=e.callingCode,c=e.onSmsNumberSubmitted,a=e.serverErrorState,u=e.guestButtonIsVisible,l=Object(s.a)(a,2)[1];function d(){return d=Object(r.a)(Object(i.a)().mark((function e(t){var n,r,s;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.smsNumber,r=t.recaptchaResponse,s=t.turnstileCaptchaResponse,e.prev=1,l(void 0),e.next=5,o.AccountService.postCreateToken({smsNumber:n,recaptchaResponse:r,turnstileCaptchaResponse:s});case 5:c(n),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),l(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),d.apply(this,arguments)}return Object(k.jsx)(P,{smsNumber:t,callingCode:n,onFormSubmit:function(e){return d.apply(this,arguments)},serverErrorState:a,guestButtonIsVisible:u})},R="frameBreakSms",A=function(e){var t,n=Object(a.useContext)(b.a),p=n.isLoggedIn,h=n.setIsLoggedIn,v=n.needsFrameBreak,g=Object(a.useContext)(m.a).businessSettings,O=Object(a.useState)(""),x=Object(s.a)(O,2),_=x[0],y=x[1],S=Object(a.useState)(!1),N=Object(s.a)(S,2),C=N[0],M=N[1],L=Object(a.useRef)(null),I=Object(l.g)(),P=Object(l.h)(),A=g.callingCode||"",B=g.clientLoginStatus!==o.ClientLoginStatus.Required&&(!P.state||!P.state.from||!P.state.from.pathname||P.state.from.pathname.includes("book")||P.state.from.pathname.includes("purchase")),T=Object(a.useState)();function F(e){if(v){var t;if(!L.current)return void console.error("Failed to break out of the frame! Login will probably fail.");var n=(P.search?"&":"?")+"".concat(R,"=").concat(e),i=P.pathname+P.search+n;return null===(t=L.current)||void 0===t||t.setAttribute("href",i),void L.current.click()}y(e),j.j.pub(j.e,e),I.push({pathname:"/".concat(d.c,"/login/code"),search:P.search,state:P.state})}function V(){return q.apply(this,arguments)}function q(){return(q=Object(r.a)(Object(i.a)().mark((function e(){var t;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,h(!0);case 3:if(j.j.pub(j.d),null===(t=P.state)||void 0===t||!t.from){e.next=6;break}return e.abrupt("return",I.push(P.state.from));case 6:return e.abrupt("return",I.push({pathname:"/".concat(d.c,"/"),search:P.search}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(a.useEffect)((function(){var e=new URLSearchParams(P.search).get(R);e&&(f.a.replaceState(P.state,document.title,P.pathname+P.search.replace("".concat(R,"=").concat(e),"")),F(e))}),[]);var z=new URLSearchParams(P.search||"");if(z.has("returnUrl"))return Object(k.jsx)(l.a,{to:{pathname:P.pathname,state:{from:{pathname:z.get("returnUrl"),search:"?"+P.search.replace(/^\?/,"").split("&").filter((function(e){return!e.startsWith("returnUrl")})).join("&")}}},push:!1});var D=p&&!C?null!==(t=P.state)&&void 0!==t&&t.from?Object(k.jsx)(l.a,{to:P.state.from}):Object(k.jsx)(l.a,{to:{pathname:"/".concat(d.c,"/"),search:P.search}}):null;return Object(k.jsxs)(k.Fragment,{children:[Object(k.jsxs)(u.a,{children:[Object(k.jsx)("title",{children:"Log in to continue"}),Object(k.jsx)("meta",{name:"page-loaded",content:"true"})]}),Object(k.jsxs)(l.d,{children:[Object(k.jsx)(l.b,{path:"/".concat(d.c,"/login/code"),render:function(e){return Object(k.jsx)(w,Object(c.a)(Object(c.a)({},e),{},{onCodeSubmitted:V,smsNumber:_||"",serverErrorState:T,guestButtonIsVisible:B}))}}),Object(k.jsx)(l.b,{path:"/".concat(d.c,"/login"),exact:!0,render:function(e){return Object(k.jsx)(E,Object(c.a)(Object(c.a)({},e),{},{onSmsNumberSubmitted:F,smsNumber:_,callingCode:A,serverErrorState:T,guestButtonIsVisible:B}))}})]}),D,Object(k.jsx)("a",{ref:L,className:"sr-only",target:"_top"})]})},B=function(e){var t=Object(l.h)(),n=Object(a.useContext)(b.a).needsFrameBreak;return Object(k.jsx)(_.a,Object(c.a)(Object(c.a)({to:{pathname:"/".concat(d.c,"/login"),search:T(t.pathname,t.search,n),state:{from:{pathname:t.pathname,search:t.search}}},target:n?"_top":void 0},e),{},{children:e.children}))};function T(e,t,n){if(n)return"?returnUrl=".concat(encodeURIComponent(e),"&").concat(t.replace(/^\?/,""))}},,,,function(e,t,n){"use strict";n.r(t),n.d(t,"ErrorComponent",(function(){return r}));var i=n(9),c=(n(0),n(1)),r=function(e){var t=e.error,n=(e.errorInfo,null);return t instanceof i.ResponseError&&(n=t.status),Object(c.jsxs)("div",{className:"container text-center my-3",children:[Object(c.jsx)("h3",{children:"Something went wrong"}),Object(c.jsx)("p",{children:"Sorry, but there was a problem while loading the page for you."}),Object(c.jsx)("p",{children:"Please try again."}),!!n&&Object(c.jsxs)("p",{className:"text-muted",children:["Error code ",n]}),!1]})}},,,,,,,,,,,function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(c,r){function s(e){try{a(i.next(e))}catch(t){r(t)}}function o(e){try{a(i.throw(e))}catch(t){r(t)}}function a(e){var t;e.done?c(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}a((i=i.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,i,c,r,s={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(c=2&r[0]?i.return:r[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,r[1])).done)return c;switch(i=0,c&&(r=[2&r[0],c.value]),r[0]){case 0:case 1:c=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(c=(c=s.trys).length>0&&c[c.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!c||r[1]>c[0]&&r[1]<c[3])){s.label=r[1];break}if(6===r[0]&&s.label<c[1]){s.label=c[1],c=r;break}if(c&&s.label<c[2]){s.label=c[2],s.ops.push(r);break}c[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(o){r=[6,o],i=0}finally{n=c=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}};t.__esModule=!0,t.makeAbsoluteUrl=t.patchRequest=t.postRequest=t.deleteRequest=t.getRequest=t.setIsLoggedIn=t.setBusinessSubdomain=void 0;var r,s=n(74);t.setBusinessSubdomain=function(e){r=e};var o=!1;function a(e,t,n){return i(this,void 0,void 0,(function(){var i,s,a,u,b;return c(this,(function(c){switch(c.label){case 0:return i=function(e){if(!e)return;return JSON.stringify(e)}(n),s=l(t),[4,fetch(s,{credentials:"include",redirect:"manual",mode:"cors",method:e,body:i,headers:{"Content-Type":"application/json",Accept:"application/json","x-timely-business-subdomain":r}})];case 1:return(a=c.sent()).ok?[3,3]:(401===a.status&&o&&window.location.reload(),[4,d(a)]);case 2:throw c.sent();case 3:return u=a.clone(),[4,a.text()];case 4:return c.sent()?[4,u.json()]:[3,6];case 5:return b=c.sent(),[3,7];case 6:b={},c.label=7;case 7:return[2,b]}}))}))}function u(e){return e?"?"+Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]||""))})).join("&"):""}function l(e){var t=e.startsWith("/")?"":"/";return window.location.origin+t+e}function d(e){return i(this,void 0,void 0,(function(){var t,n;return c(this,(function(i){switch(i.label){case 0:return t=e.statusText||"A problem occurred, please try again.",[4,e.clone().text()];case 1:return!!i.sent()?[4,e.json()]:[3,3];case 2:(n=i.sent())&&n.message&&(t=n.message),i.label=3;case 3:return[2,new s.ResponseError(t,e.status)]}}))}))}t.setIsLoggedIn=function(e){o=e},t.getRequest=function(e,t){return i(this,void 0,void 0,(function(){return c(this,(function(n){return[2,a("GET",e+u(t))]}))}))},t.deleteRequest=function(e,t){return i(this,void 0,void 0,(function(){return c(this,(function(n){return[2,a("DELETE",e+u(t))]}))}))},t.postRequest=function(e,t,n){return i(this,void 0,void 0,(function(){return c(this,(function(i){return[2,a("POST",e+u(n),t)]}))}))},t.patchRequest=function(e,t,n){return i(this,void 0,void 0,(function(){return c(this,(function(i){return[2,a("PATCH",e+u(n),t)]}))}))},t.makeAbsoluteUrl=l},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};t.__esModule=!0,c(n(116),t),c(n(117),t),c(n(118),t),c(n(119),t),c(n(120),t),c(n(121),t),c(n(122),t),c(n(123),t),c(n(124),t),c(n(125),t),c(n(126),t),c(n(127),t),c(n(128),t),c(n(129),t),c(n(130),t),c(n(131),t),c(n(132),t),c(n(133),t),c(n(134),t),c(n(135),t),c(n(136),t),c(n(137),t),c(n(138),t),c(n(139),t),c(n(140),t),c(n(141),t),c(n(142),t),c(n(143),t),c(n(144),t),c(n(145),t),c(n(146),t),c(n(147),t),c(n(148),t),c(n(149),t),c(n(150),t),c(n(151),t),c(n(152),t),c(n(153),t),c(n(154),t),c(n(155),t),c(n(156),t),c(n(157),t),c(n(158),t),c(n(159),t),c(n(160),t),c(n(161),t),c(n(162),t),c(n(163),t),c(n(164),t),c(n(165),t),c(n(166),t),c(n(167),t),c(n(168),t),c(n(169),t),c(n(170),t),c(n(171),t),c(n(172),t)},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};t.__esModule=!0,c(n(174),t),c(n(175),t),c(n(176),t),c(n(177),t)},function(e,t,n){"use strict";t.__esModule=!0,t.ClientLoginStatus=void 0,function(e){e.Disabled="Disabled",e.Optional="Optional",e.Required="Required"}(t.ClientLoginStatus||(t.ClientLoginStatus={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ConsultationStatus=void 0,function(e){e.New="New",e.Draft="Draft",e.Submitted="Submitted",e.Reviewed="Reviewed"}(t.ConsultationStatus||(t.ConsultationStatus={}))},function(e,t,n){"use strict";t.__esModule=!0,t.GenderEnum=void 0,function(e){e.PreferNotToSay="PreferNotToSay",e.Male="Male",e.Female="Female",e.SelfDescribed="SelfDescribed"}(t.GenderEnum||(t.GenderEnum={}))},function(e,t,n){"use strict";t.__esModule=!0,t.TypeEnum=void 0,function(e){e.addressPhysical="addressPhysical",e.booleanChoice="booleanChoice",e.dateOfBirth="dateOfBirth",e.datePicker="datePicker",e.drawing="drawing",e.email="email",e.gender="gender",e.label="label",e.longAnswer="longAnswer",e.multipleSelection="multipleSelection",e.name="name",e.referred="referred",e.shortAnswer="shortAnswer",e.signature="signature",e.smsNumber="smsNumber",e.telephone="telephone",e.textBlock="textBlock",e.contactBlock="contactBlock",e.addressPostal="addressPostal",e.occupation="occupation",e.company="company",e.marketingSMS="marketingSMS",e.marketingEmail="marketingEmail"}(t.TypeEnum||(t.TypeEnum={}))},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};t.__esModule=!0,c(n(179),t),c(n(180),t),c(n(181),t),c(n(182),t),c(n(183),t),c(n(184),t),c(n(185),t),c(n(186),t)},function(e,t,n){"use strict";t.__esModule=!0,t.AccountService=void 0;var i=n(24);!function(e){e.postCreateToken=function(e){return(0,i.postRequest)("/api/Account/CreateToken",e)},e.getLogout=function(){return(0,i.getRequest)("/api/Account/Logout")},e.getCheckSession=function(){return(0,i.getRequest)("/api/Account/CheckSession")},e.getProfile=function(){return(0,i.getRequest)("/api/Account/Profile")},e.postProfile=function(e){return(0,i.postRequest)("/api/Account/Profile",e)},e.postLogin=function(e){return(0,i.postRequest)("/api/Account/Login",e)},e.getCheckIfBlockingCardDeletion=function(e){return(0,i.getRequest)("/api/Account/CheckIfBlockingCardDeletion",{paymentMethodToken:e})}}(t.AccountService||(t.AccountService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.AppointmentsService=void 0;var i=n(24);!function(e){e.getAppointments=function(){return(0,i.getRequest)("/api/Appointments")},e.getPast=function(e,t){return(0,i.getRequest)("/api/Appointments/Past",{dateTime:e,excludeAppointmentId:t})},e.getFuture=function(e,t){return(0,i.getRequest)("/api/Appointments/Future",{dateTime:e,excludeAppointmentId:t})}}(t.AppointmentsService||(t.AppointmentsService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.BusinessService=void 0;var i=n(24);!function(e){e.getSettings=function(){return(0,i.getRequest)("/api/Business/Settings")},e.getPrivacyPolicy=function(){return(0,i.getRequest)("/api/Business/PrivacyPolicy")},e.getTempFrameLogging=function(e,t,n,c,r){return(0,i.getRequest)("/api/Business/TempFrameLogging",{IsInIframe:e,CookiesAreWorking:t,AncestorOrigin:n,UserAgent:c,BusinessSubdomain:r})}}(t.BusinessService||(t.BusinessService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ConsultationsService=void 0;var i=n(24);!function(e){e.getConsultationsByGuid=function(e){return(0,i.getRequest)("/api/Consultations/".concat(e))},e.getConsultations=function(){return(0,i.getRequest)("/api/Consultations")},e.postConsultations=function(e){return(0,i.postRequest)("/api/Consultations",e)}}(t.ConsultationsService||(t.ConsultationsService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.FeedbackService=void 0;var i=n(24);!function(e){e.postSend=function(e){return(0,i.postRequest)("/api/Feedback/Send",e)}}(t.FeedbackService||(t.FeedbackService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.PaymentMethodService=void 0;var i=n(24);!function(e){e.postSelect=function(e){return(0,i.postRequest)("/api/PaymentMethod/Select",e)},e.patchSetDefault=function(e){return(0,i.patchRequest)("/api/PaymentMethod/SetDefault",e)},e.deleteDelete=function(e){return(0,i.deleteRequest)("/api/PaymentMethod/Delete",{paymentMethodToken:e})},e.postAdd=function(e){return(0,i.postRequest)("/api/PaymentMethod/Add",e)},e.getSetupIntent=function(){return(0,i.getRequest)("/api/PaymentMethod/SetupIntent")}}(t.PaymentMethodService||(t.PaymentMethodService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ServicesService=void 0;var i=n(24);!function(e){e.getBookable=function(e){return(0,i.getRequest)("/Bookable",{locationId:e})}}(t.ServicesService||(t.ServicesService={}))},function(e,t,n){"use strict";t.__esModule=!0,t.WaitlistService=void 0;var i=n(24);!function(e){e.getWaitlist=function(e){return(0,i.getRequest)("/api/Waitlist",{onlineBookingGuid:e})},e.postWaitlist=function(e){return(0,i.postRequest)("/api/Waitlist",e)}}(t.WaitlistService||(t.WaitlistService={}))},,,,,,,,,,,,,function(e,t,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){},,,,,,,,,,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(0);var i=n(69),c=n.n(i),r=n(5),s=n(31);n(265),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var o=n(1);Object(s.a)(r.a),c.a.render(Object(o.jsx)(r.b,{}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready&&navigator.serviceWorker.ready.then&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}],[[266,10,12]],[0,5,3]]);
//# sourceMappingURL=main.417e2c57.chunk.js.map