"use strict";(()=>{var _=Object.defineProperty,tt=Object.defineProperties;var et=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable;var V=(c,o,t)=>o in c?_(c,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[o]=t,i=(c,o)=>{for(var t in o||(o={}))st.call(o,t)&&V(c,t,o[t]);if(G)for(var t of G(o))nt.call(o,t)&&V(c,t,o[t]);return c},T=(c,o)=>tt(c,et(o));var O=(c,o,t)=>new Promise((f,m)=>{var h=a=>{try{v(t.next(a))}catch(r){m(r)}},p=a=>{try{v(t.throw(a))}catch(r){m(r)}},v=a=>a.done?f(a.value):Promise.resolve(a.value).then(h,p);v((t=t.apply(c,o)).next())});(self.webpackChunkecom_website=self.webpackChunkecom_website||[]).push([[87237],{46967:(c,o,t)=>{t.d(o,{Z:()=>I});var f=function(){var e=this,d=e._self._c;return d(e.component,e._b({tag:"component",class:e.componentClasses,style:e.componentStyle,on:{click:e.onClick},scopedSlots:e._u([e.hasLink?{key:"content",fn:function(){return[e.showPlaceholder?[e._v(` `+e._s(e.placeholder)+` `)]:e._e(),e._v(" "),d("legacy-text",{ref:"text",staticClass:"text",attrs:{"text-style":e.TEXTSTYLE_BUTTON_LABEL,contents:e.label,formats:[],"event-bus":e.eventBus,mode:e.LEGACY_TEXT_MODE_BUTTON,"debounce-duration":2500,placeholder:""},on:{input:e.onInput}}),e._v(" "),d("span")]},proxy:!0}:null],null,!0)},"component",e.props,!1),[e.hasLink?e._e():[d("legacy-text",{ref:"text",staticClass:"text",attrs:{"text-style":e.TEXTSTYLE_BUTTON_LABEL,contents:e.label,formats:[],"event-bus":e.eventBus,mode:e.LEGACY_TEXT_MODE_BUTTON,"debounce-duration":2500,placeholder:""},on:{input:e.onInput}}),e._v(" "),d("span")]],2)},m=[],h=t(60598),p=t(11043),v=t(22535),a=t(91751),r=t(54526),y=t(68469),B=t(1507),L=t(39238).Z;const E={placeholder:L("elements.button.placeholder")},Z={name:"ButtonElement",components:{MButton:v.MButton,MTextButton:a.MTextButton},extends:y.Z,props:{link:{type:Object,default:()=>({})},placeholder:{type:String,default:E.placeholder}},data(){return{LEGACY_TEXT_MODE_BUTTON:p.aM,TEXTSTYLE_BUTTON_LABEL:B.iT,focused:!1}},computed:T(i({},(0,r.mapState)(["environment"])),{eventBus(){return this.isEditor?new h.Z:null},input(){return this.label.trim()},classlist(){return i({"w-button":!0,empty:!this.hasContent},this.classes)},componentClasses(){return this.hasLink&&this.presetStyle!=="text"?{}:this.classlist},componentStyle(){return!this.hasLink||this.presetStyle!=="text"?{}:{color:this.buttonProps.color}},hasContent(){return!!this.input.length},hasLink(){const{type:S,link:e}=this.link;return e?!!e[S]:!1},component(){return this.hasLink?"w-link":this.presetStyle==="text"?"m-text-button":"m-button"},props(){const{link:S,buttonProps:e,classlist:d}=this;return this.hasLink?{link:S,isButton:this.presetStyle!=="text",buttonProps:T(i({},e),{tag:"a",class:d})}:e},showPlaceholder(){return this.isEditor&&!this.hasContent&&!this.focused},isEditor(){return!this.environment.published}}),beforeMount(){this.isEditor&&this.eventBus.$on("blur",this.onBlur)},methods:{onClick(){this.isEditor?(this.focused=!0,this.eventBus.$emit("focus")):this.$emit("click")},onBlur(){this.focused=!1},onInput(S){let{quill:e}=S;this.isEditor&&(this.input=e.trim())}}};var F=t(51900),x=(0,F.Z)(Z,f,m,!1,null,"e2a9ea0a",null);const I=x.exports},56265:(c,o,t)=>{t.d(o,{Z:()=>e});var f=function(){var l=this,A=l._self._c;return A("div",{staticClass:"page"},[A("div",{staticClass:"col"},[l.code?A("text-component-with-maker",{attrs:{"font-size":7,color:"--primary-color",tag:"h1"}},[l._v(` `+l._s(l.code)+` `)]):l._e(),l._v(" "),A("text-component-with-maker",{staticClass:"error-msg",attrs:{"font-size":3,tag:"h2"}},[l._v(` `+l._s(l.error)+` `)]),l._v(" "),A("button-element",{attrs:{label:"Go Home"},on:{click:l.goHome}},[l._v(` `+l._s(l.translations.homeBtn)+` `)])],1)])},m=[],h=t(24145),p=t(30501),v=t(27558),a=t(42847),r=t(46967),y=t(25766),B=t(1330),L=t(39038),E=t(22200),P=t(39238).Z;const Z={homeBtn:P("error.published.404.button")},x={name:"ErrorPage",components:{ButtonElement:r.Z},provide(){return{backdrop:()=>y.Wd,colorProfile:()=>this.colorProfile}},inject:["ASSETS_PUBLIC_PATH"],data(){return{translations:Z}},metaInfo(){return{title:this.title,style:[{type:"text/css",cssText:this.style}],link:[...this.fontLinks],meta:[{name:"robots",content:"noindex"}]}},computed:T(i(i(i({},(0,h.rn)(p.Z,["style"])),(0,h.rn)(v.Z,["getColorProfile"])),(0,h.rn)(a.Z,["textStylesToFontFamilies"])),{title(){return this.code?`${this.code} ${this.error}`:`${this.error}`},fontLinks(){return(0,B.Z)(this.ASSETS_PUBLIC_PATH,this.textStylesToFontFamilies)},colorProfile(){return this.getColorProfile()}}),created(){this.stopSiteLoadingAnimation()},methods:T(i({},(0,h.nv)(E.Z,["stopSiteLoadingAnimation"])),{goHome(){const d=L.Z.getConfig("URL_BASE");window.location.pathname=d?`${d}/`:"/"}})};var I=t(51900),S=(0,I.Z)(x,f,m,!1,null,"029babf7",null);const e=S.exports},41903:(c,o,t)=>{t.d(o,{Z:()=>E});var f=t(54526),m=t(94632),h=t(56265),p=t(39238).Z;const a={name:"NotFound404",extends:h.Z,computed:T(i({},(0,f.mapGetters)(["route"])),{isAppointmentsPage(){var P;return((P=this.route)===null||P===void 0?void 0:P.name)===m.n0},code(){return this.isAppointmentsPage?0:404},error(){return this.isAppointmentsPage?p("appointment-modal.appointments-not-setup"):p("error.published.404.subtitle")}})};var r=t(51900),y,B,L=(0,r.Z)(a,y,B,!1,null,null,null);const E=L.exports},94341:(c,o,t)=>{t.d(o,{Z:()=>B});var f=t(56265),m=t(39238).Z;const p={name:"ServerError500",extends:f.Z,data(){return{code:500,error:m("error.published.500.error")}}};var v=t(51900),a,r,y=(0,v.Z)(p,a,r,!1,null,null,null);const B=y.exports},87237:(c,o,t)=>{t.d(o,{Z:()=>J});var f=function(){var s=this,u=s._self._c,g=s._self._setupProxy;return u("div",[s.error.code<300?u("page",s._g({staticClass:"reset-z-index",attrs:{id:s.id,page:s.page,styles:s.style,"framework-options":s.frameworkOptions}},s.$listeners)):s.error.code<500?u("not-found-404"):u("server-error-500")],1)},m=[],h=t(58848),p=t.n(h),v=t(55999),a=t(54526),r=t(24145),y=t(69216),B=t(71382),L=t.n(B),E=t(44442),P=t(79430),Z=t(99087),F=t(40619),x=t(30501),I=t(36552),S=t(25198),e=t(85251),d=t(36868),l=t(53902),A=t(41903),R=t(94341),z=t(1967),X=t(86263),$=t(94632),Y=t(43669),H=t(21558),j=t(79271);const Q="square-go-popups",W=(0,v.defineComponent)({name:"BasePage",components:{NotFound404:A.Z,ServerError500:R.Z},inject:{SUBDOMAIN_BASE:"SUBDOMAIN_BASE",siteEventBus:"siteEventBus",modalApi:Y.modalApi},metaInfo(){return this.error.code<300&&this.$options.metaData?this.$options.metaData.call(this):{}},asyncData(n){return O(this,null,function*(){var s;let{store:u,route:g}=n;const N=(0,E.ZP)(),k=(0,Z.Z)(),C=(0,P.Z)();u.getters.isPublishedSite||(yield N.fetchStoreInfo(u.getters.isPublishedPreviewEnvironment));function w(){return O(this,null,function*(){yield N.initializeSiteLocationData(g),yield k.setDefaultSiteFulfillmentSelection(g)})}function q(D){return O(this,null,function*(){yield C.pingBuyerService(),D&&(yield C.verifyAndLoginBuyerUsingPasetoToken(D),delete g.query.id_token),C.hasCustomerAccountsEnabled&&(yield p().all([C.fetchCustomerAccount({updateSqCustomers:!0}),C.fetchSellerSubscriptionPlans()]))})}const M=[w()],U=g==null||(s=g.query)===null||s===void 0?void 0:s.id_token;(C.hasCustomerAccountsEnabled||U)&&M.push(q(U)),u.state.environment.published||M.push(N.fetchStoreLinkMap(),(0,e.ZP)().fetchDraftBlogLinkMap()),yield p().all(M)})},data(){return{watchers:[],frameworkOptions:{}}},computed:T(i(i(i(i(i(i(i(i({},(0,a.mapState)(["environment","error"])),(0,a.mapGetters)(["route","getFullPage","pageIdFromRoute","getResourceId","isPublishedSite"])),(0,r.rn)(I.ZP,{getSiteProperty:"getProperty"})),(0,r.rn)(S.Z,{getSnapshotProperty:"getProperty"})),(0,r.rn)(x.Z,["style"])),(0,r.rn)(E.ZP,["isDineInOrder"])),(0,r.rn)(d.ZP,["isSquareGoView"])),(0,r.rn)(P.Z,["hasCustomerAccountsEnabled","isLoggedIn"])),{id(){return this.pageIdFromRoute},page(){const n=this.id,s=this.getResourceId(n);return this.getFullPage(n,s)},siteNav(){return this.getSnapshotProperty("navigation")},metaLink(){const{published:n,draft:s}=this.environment;if(n&&!s){const u=this.route.path;return[{rel:"canonical",href:this.route.name===$.XX?this.hostname:L()(this.hostname,u)}]}return[]},hostname(){const{custom_domain:n,subdomain:s}=this.getSiteProperty("domain");return n?`https://${n}`:`https://${s}.${this.SUBDOMAIN_BASE}`}}),watch:{isDineInOrder(){this.togglePopUp()}},mounted(){this.togglePopUp(),this.watchBreakpoints(),this.siteEventBus.$on("popups:hide",this.tempTogglePopups),this.siteEventBus.$on("customer-account:open",this.openCustomerAccountModal),this.toggleSquareGoPopups(),this.trackSiteVisit()},beforeDestroy(){this.unWatchBreakpoints(),this.siteEventBus.$off("popups:hide",this.tempTogglePopups),this.siteEventBus.$off("customer-account:open",this.openCustomerAccountModal)},methods:T(i(i(i({},(0,a.mapActions)(["setViewportSize"])),(0,r.nv)(E.ZP,["fetchStoreLinkMap"])),(0,r.nv)(F.Z,{submitSiteVisit:"trackSiteVisit"})),{watchBreakpoints(){this.watchers=Object.keys(z.Y5).map(n=>{const s=(0,X.aK)(n),u=window.matchMedia(s),g=N=>this.onBreakpointChange(N,n);return g(u),u.addListener(g),{mq:u,onchange:g}})},unWatchBreakpoints(){this.watchers.forEach(n=>{let{mq:s,onchange:u}=n;return s.removeListener(u)})},onBreakpointChange(n,s){n.matches&&this.setViewportSize(s)},togglePopUp(){document.body.classList.toggle("show-all-popups",!this.isDineInOrder)},toggleSquareGoPopups(){this.isSquareGoView&&document.body.classList.add(Q)},tempTogglePopups(n){document.body.classList.toggle("temp-hide-popups",n)},trackSiteVisit(){this.isPublishedSite&&(this.$consent.statistics(()=>this.fireSiteVisitTrackingEvent()),(0,H.O2)())},fireSiteVisitTrackingEvent(){let n=(0,l.GQ)(j.w);const s=!n;s&&((0,l.A6)(j.w,(0,y.v4)()),n=(0,l.GQ)(j.w)),this.submitSiteVisit(s)},openCustomerAccountModal(){return O(this,arguments,function*(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.hasCustomerAccountsEnabled)if(this.isLoggedIn)this.$router.push({name:$.vR});else{const{default:s}=yield Promise.all([t.e(57725),t.e(7132),t.e(49688)]).then(t.bind(t,67212));this.modalApi.open(u=>u(s,{props:n}),{closeOnClickOutside:!0})}})}})});var b=t(51900),K=(0,b.Z)(W,f,m,!1,null,null,null);const J=K.exports}}]);})();