@tabres/react 1.0.19 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawerDetails.d.ts +2 -2
- package/dist/components/PublicMenu/ProductVariants/ProductVariants.d.ts +1 -1
- package/dist/constants/constants/env.d.ts +1 -1
- package/dist/constants/env.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/constants/env.d.ts +1 -1
- package/dist/models/index.esm.js.map +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/modules/addon/models.d.ts +7 -0
- package/dist/models/modules/customer/services.d.ts +3 -1
- package/dist/models/modules/order/constants.d.ts +2 -5
- package/dist/models/modules/order/hooks.d.ts +3 -7
- package/dist/models/modules/order/models.d.ts +55 -18
- package/dist/models/modules/order/services.d.ts +2 -1
- package/dist/models/modules/order/utils/item-price.d.ts +3 -0
- package/dist/models/modules/order/utils.d.ts +3 -19
- package/dist/models/modules/product/models.d.ts +13 -1
- package/dist/models/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/models/modules/product/utils/order-price.d.ts +11 -0
- package/dist/models/modules/product/utils.d.ts +2 -42
- package/dist/models/services/api/client.d.ts +3 -0
- package/dist/modules/addon/models.d.ts +7 -0
- package/dist/modules/addon/utils.d.ts +0 -9
- package/dist/modules/customer/services.d.ts +3 -1
- package/dist/modules/order/constants.d.ts +2 -5
- package/dist/modules/order/hooks.d.ts +3 -7
- package/dist/modules/order/hooks.price.test.d.ts +1 -0
- package/dist/modules/order/models.d.ts +55 -18
- package/dist/modules/order/preview.d.ts +8 -0
- package/dist/modules/order/preview.test.d.ts +1 -0
- package/dist/modules/order/services.d.ts +2 -1
- package/dist/modules/order/utils/item-price.d.ts +3 -0
- package/dist/modules/order/utils/item-price.test.d.ts +1 -0
- package/dist/modules/order/utils.d.ts +3 -19
- package/dist/modules/product/models.d.ts +13 -1
- package/dist/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/modules/product/utils/listing-price.test.d.ts +1 -0
- package/dist/modules/product/utils/order-price.d.ts +11 -0
- package/dist/modules/product/utils/order-price.test.d.ts +1 -0
- package/dist/modules/product/utils.d.ts +2 -42
- package/dist/services/api/client.d.ts +3 -0
- package/dist/styles/ui.css +1 -1
- package/dist/styles/ui.css.map +1 -1
- package/dist/utils/components/PublicMenu/OrderMethods/OrderMethods.types.d.ts +9 -0
- package/dist/utils/components/PublicMenu/ProductsGridItem/ProductsGridItem.types.d.ts +13 -0
- package/dist/utils/constants/env.d.ts +1 -0
- package/dist/utils/hooks/translation.d.ts +5 -0
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/models/index.d.ts +16 -0
- package/dist/utils/modules/addon/models.d.ts +7 -0
- package/dist/utils/modules/addon/utils.d.ts +0 -9
- package/dist/utils/modules/branch/hooks.d.ts +16 -0
- package/dist/utils/modules/branch/utils.d.ts +7 -0
- package/dist/utils/modules/business/constants.d.ts +2 -0
- package/dist/utils/modules/business/hooks.d.ts +15 -0
- package/dist/utils/modules/common/services.d.ts +1 -0
- package/dist/utils/modules/customer/hooks.d.ts +5 -0
- package/dist/utils/modules/customer/services.d.ts +11 -0
- package/dist/utils/modules/menu/hooks.d.ts +1 -0
- package/dist/utils/modules/menu/index.d.ts +3 -0
- package/dist/utils/modules/order/constants.d.ts +2 -5
- package/dist/utils/modules/order/hooks.d.ts +14 -0
- package/dist/utils/modules/order/index.d.ts +5 -0
- package/dist/utils/modules/order/models.d.ts +55 -18
- package/dist/utils/modules/order/services.d.ts +5 -0
- package/dist/utils/modules/order/utils/item-price.d.ts +3 -0
- package/dist/utils/modules/order/utils.d.ts +3 -19
- package/dist/utils/modules/product/hooks.d.ts +9 -0
- package/dist/utils/modules/product/index.d.ts +3 -0
- package/dist/utils/modules/product/models.d.ts +13 -1
- package/dist/utils/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/utils/modules/product/utils/order-price.d.ts +11 -0
- package/dist/utils/modules/product/utils.d.ts +3 -43
- package/dist/utils/modules/store/hooks.d.ts +6 -0
- package/dist/utils/modules/table/hooks.d.ts +4 -0
- package/dist/utils/modules/view/hooks.d.ts +2 -0
- package/dist/utils/modules/view/index.d.ts +4 -0
- package/dist/utils/modules/view/models.d.ts +7 -0
- package/dist/utils/modules/view/services.d.ts +2 -0
- package/dist/utils/services/api/client.d.ts +3 -0
- package/dist/utils/services/translation/index.d.ts +3 -0
- package/dist/utils/services/translation/locales/az/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/az/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/az/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/az/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/az/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/az/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/az/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/az/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/az/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/en/auth.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/branch.d.ts +10 -0
- package/dist/utils/services/translation/locales/en/common.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/customer.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/error.d.ts +17 -0
- package/dist/utils/services/translation/locales/en/events.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/index.d.ts +34 -0
- package/dist/utils/services/translation/locales/en/order.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/pricing.d.ts +2 -0
- package/dist/utils/services/translation/locales/et/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/et/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/et/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/et/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/et/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/et/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/et/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/et/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/et/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/hr/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/hr/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/hr/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/hr/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/hr/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/hr/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/hr/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/hr/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/hr/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/index.d.ts +1212 -0
- package/dist/utils/services/translation/locales/nl/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/nl/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/nl/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/nl/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/nl/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/nl/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/nl/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/nl/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/nl/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/pl/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/pl/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/pl/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/pl/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/pl/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/pl/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/pl/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/pl/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/pl/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/pt/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/pt/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/pt/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/pt/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/pt/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/pt/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/pt/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/pt/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/pt/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/ru/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/ru/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/ru/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/ru/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/ru/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/ru/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/ru/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/ru/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/ru/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/tr/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/tr/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/tr/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/tr/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/tr/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/tr/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/tr/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/tr/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/tr/pricing.d.ts +35 -0
- package/dist/utils/store/index.d.ts +7 -0
- package/dist/utils/store/order.d.ts +42 -0
- package/package.json +1 -1
- package/dist/components/Pricing/Pricing.d.ts +0 -11
- package/dist/components/Pricing/PricingPlanAmount.d.ts +0 -9
- package/dist/components/Pricing/index.d.ts +0 -1
- package/dist/models/modules/addon/utils.d.ts +0 -14
- package/dist/models/services/api/index.d.ts +0 -5
- package/dist/services/api/index.d.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/ui"),a=require("react"),i=require("@sorocraft/js-utils"),r=require("@sorocraft/ui/icons"),n="PublicMenu-module_container__QLN6U",o="PublicMenu-module_footer__6G3DQ";const l="ADD_UPDATE_NOTES",s="AUTH",d="ADD_UPDATE_ADDRESS",u="BRANCH_BUSINESS_HOURS",c="PRODUCT_DETAILS",m=["en","az","nl","et","tr","ru","pl","pt","hr"],p=[{name:"Azerbaijan",code:"AZ",phoneCode:"+994"}],_="tabres.com",E=_,v="https://images.tabres.com",g=new i.Storage("tabres_cst_act","tabres_cst_rft"),h=(e,t)=>{const a=t||"en";return"localhost:3000"===e?{url:`http://localhost:3000/${a}`,domain:_}:{url:`https://${_}/${a}`,domain:_}},y=(e,t)=>`https://app.tabres.com/auth/register?lang=${e}&utm_source=${t}`,I=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${v}/${e}`:"",T=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${v}/${e}`:"https://images.tabres.com/no-photo-128.webp",b=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${v}/${e}`:"https://images.tabres.com/tabres-doodle.webp",f=(e,t)=>{const a=parseInt(e.replace("#",""),16),i=(a>>16&255)/255,r=(a>>8&255)/255,n=(255&a)/255,o=Math.max(i,r,n),l=Math.min(i,r,n),s=(o+l)/2;let d=0,u=0;if(o!==l){const e=o-l;switch(u=s>.5?e/(2-o-l):e/(o+l),o){case i:d=(r-n)/e+(r<n?6:0);break;case r:d=(n-i)/e+2;break;case n:d=(i-r)/e+4}d/=6}const c=Math.max(0,Math.min(1,s+t/100)),m=(e,t,a)=>(a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e);let p=c,_=c,E=c;if(0!==u){const e=c<.5?c*(1+u):c+u-c*u,t=2*c-e;p=m(t,e,d+1/3),_=m(t,e,d),E=m(t,e,d-1/3)}const v=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${v(p)}${v(_)}${v(E)}`},A=a.createContext({}),P=({children:t,value:a})=>{var i,r,n,o,l,s,d,u,c,m,p,_,E,v,g,h,y,I,T,b;return e.jsx(A.Provider,{value:a,children:e.jsx("div",{style:{"--sorocraft-color-primary":null===(i=a.menuDesign)||void 0===i?void 0:i.primaryColor,"--sorocraft-color-primary-light":(null===(r=a.menuDesign)||void 0===r?void 0:r.primaryColor)&&f(a.menuDesign.primaryColor,37.5),"--sorocraft-color-primary-active":(null===(n=a.menuDesign)||void 0===n?void 0:n.primaryColor)&&f(a.menuDesign.primaryColor,-7.5),"--tabres-menu-category-background-color":null===(o=a.menuDesign)||void 0===o?void 0:o.categoryBackgroundColor,"--tabres-menu-category-text-color":null===(l=a.menuDesign)||void 0===l?void 0:l.categoryTextColor,"--tabres-menu-product-card-background-color":null===(s=a.menuDesign)||void 0===s?void 0:s.productCardBackgroundColor,"--tabres-menu-product-card-text-color":null===(d=a.menuDesign)||void 0===d?void 0:d.productCardTextColor,"--tabres-menu-product-card-description-text-color":null===(u=a.menuDesign)||void 0===u?void 0:u.productCardDescriptionTextColor,"--tabres-menu-product-card-volume-text-color":null===(c=a.menuDesign)||void 0===c?void 0:c.productCardVolumeTextColor,"--tabres-menu-product-card-price-text-color":null===(m=a.menuDesign)||void 0===m?void 0:m.productCardPriceTextColor,"--tabres-menu-product-card-block-padding":null===(p=a.menuDesign)||void 0===p?void 0:p.productCardBlockPadding,"--tabres-menu-category-title-font-size":null===(_=a.menuDesign)||void 0===_?void 0:_.categoryTitleFontSize,"--tabres-menu-product-name-font-size":null===(E=a.menuDesign)||void 0===E?void 0:E.productNameFontSize,"--tabres-menu-product-price-font-size":null===(v=a.menuDesign)||void 0===v?void 0:v.productPriceFontSize,"--tabres-menu-distance-between-category-title-and-products":null===(g=a.menuDesign)||void 0===g?void 0:g.distanceBetweenCategoryTitleAndProducts,"--tabres-menu-product-description-font-size":null===(h=a.menuDesign)||void 0===h?void 0:h.productDescriptionFontSize,"--tabres-menu-product-volume-font-size":null===(y=a.menuDesign)||void 0===y?void 0:y.productVolumeFontSize,"--tabres-menu-product-separator-color":null===(I=a.menuDesign)||void 0===I?void 0:I.productSeparatorColor,"--tabres-menu-page-background-color":null===(T=a.menuDesign)||void 0===T?void 0:T.menuPageBackgroundColor,"--tabres-menu-page-text-color":null===(b=a.menuDesign)||void 0===b?void 0:b.menuPageTextColor},children:t})})},S=()=>a.useContext(A),D=()=>{const{hostname:e}=S();return e||E},x=()=>{const{isInDashboard:e}=S();return e||!1};function j(e,t,a,i){return new(a||(a=Promise))(function(r,n){function o(e){try{s(i.next(e))}catch(e){n(e)}}function l(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(o,l)}s((i=i.apply(e,t||[])).next())})}var C,O,R,N,k;"function"==typeof SuppressedError&&SuppressedError,function(e){e.DINE_IN="DINE_IN",e.PICK_UP="PICK_UP",e.DELIVERY="DELIVERY"}(C||(C={})),function(e){e.DRAFT="DRAFT",e.PENDING="PENDING",e.CONFIRMED="CONFIRMED",e.PREPARING="PREPARING",e.READY="READY",e.OUT_FOR_DELIVERY="OUT_FOR_DELIVERY",e.DELIVERED="DELIVERED",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e.FAILED="FAILED"}(O||(O={})),function(e){e.PENDING="PENDING",e.PREPARING="PREPARING",e.READY="READY",e.SERVED="SERVED"}(R||(R={})),function(e){e.CASH="CASH",e.CARD="CARD",e.WALLET="WALLET",e.TERMINAL="TERMINAL"}(N||(N={})),function(e){e.CART="CART",e.DETAILS="DETAILS",e.COMPLETED="COMPLETED"}(k||(k={}));const L={orderType:null,totalPriceWithTax:0,totalPriceWithoutTax:0,totalTax:0,vat:0,paymentMethod:N.CASH},M=[k.CART,k.DETAILS,k.COMPLETED];var w;!function(e){e.FIELD_REQUIRED_ERROR="This field is required",e.TABLE_NOT_SELECTED="Please select a table",e.ADDRESS_IS_EMPTY="Please enter an address",e.EMPTY_ITEMS="Please choose product",e.BRANCH_NOT_SELECTED="Please select a branch"}(w||(w={}));const z=(e,t,a)=>{if(!e)throw new Error("Product ID is required");let r=`${e}`;t&&(r+=`-${t}`);const n=Object.entries(a||{}).map(([e,t])=>{if(!e||!t)return null;const a=Array.isArray(t)?i.sortNumbers(t).filter(Boolean).join("-"):`${t}`;return a?`${e}-${a}`:null}).filter(Boolean).join("-");return n&&(r+=`-${n}`),r},U=e=>{var t;const{price:a,variant:i,addons:r,quantity:n,vat:o}=e||{},l=null!==(t=null==i?void 0:i.price)&&void 0!==t?t:a,s=function(e=[],t=1){return t*e.reduce((e,t)=>{const a=(e=>e.options.reduce((e,t)=>e+t.price,0))(t);return e+a},0)}(r,1),d=l+s,u=l*(o/100),c=d+u;return{totalGross:c*n,totalNet:d*n,totalTax:u*n,itemGrossPrice:c,itemNetPrice:d,itemTax:u}},B=e=>{switch(e){case"customer":return w.ADDRESS_IS_EMPTY;case"tableId":return w.TABLE_NOT_SELECTED;case"items":return w.EMPTY_ITEMS;case"branchId":return w.BRANCH_NOT_SELECTED;default:return w.FIELD_REQUIRED_ERROR}},W="https://api.tabres.com/api/v1",V=(e,t,a)=>j(void 0,void 0,void 0,function*(){const{accessToken:i}=g.getAuthToken(),r=`${W}/${t}`,n=yield fetch(r,{method:e,headers:{"Content-Type":"application/json",Authorization:i},credentials:"include",body:JSON.stringify(a)}),o=yield n.json();if(!n.ok)throw o;return o}),F=(e,t)=>V("POST",e,t),G=(e,t)=>V("PATCH",e,t),Y=e=>V("GET",e),H=(...e)=>j(void 0,[...e],void 0,function*(e=null,t={}){try{return i.trackEvent("error",{message:null==e?void 0:e.message}),yield fetch(`${W}/log`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(Object.assign({message:(null==e?void 0:e.message)||JSON.stringify(e)},t))})}catch(e){console.error(e)}}),K=(e,t)=>{var a;return null===(a=((null==e?void 0:e.days)||[]).find(({day:e})=>e===t))||void 0===a?void 0:a.hours},Q=e=>(e||"").split(":").map(Number),q=e=>{if(!e)return!1;const t=new Date,[a,i]=Q(e.openAt),[r,n]=Q(e.closeAt),o=new Date(t);o.setHours(a,i,0,0);const l=new Date(t);return l.setHours(r,n,0,0),l<=o&&(t<l?o.setDate(o.getDate()-1):l.setDate(l.getDate()+1)),t>=o&&t<=l},Z=()=>{const{branches:e}=S();return(e||[]).length<=1},$=()=>{const{branches:e,branchId:t}=S(),a=Z();return i.isEmpty(e)?{}:a?e[0]:e.find(e=>e.id===Number(t))||{}},X=()=>{const e=$();return{latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude}},J=()=>{const e=$(),{openingHours:t,deliveryHours:a}=e||{};if(!(null==t?void 0:t.days)||!(null==a?void 0:a.days))return{isOpen:!1,isDelivering:!1};const i=((new Date).getUTCDay()+6)%7,r=K(t,i),n=K(a,i);return{isOpen:q(r),isDelivering:q(n)}},ee=()=>{const e=$();return(null==e?void 0:e.settings)||{}},te=()=>{const e=ee();if(i.isEmpty(e))return!1;const{deliveryOrderEnabled:t,dineInOrderEnabled:a,pickupOrderEnabled:r}=e;return t||a||r},ae=()=>{const{branchId:e}=S();return e},ie=()=>{const{onBranchSelect:e}=S();return e},re=({defaultOrderType:e,defaultPaymentMethod:t,defaultBranchId:a})=>{const i=(()=>{const{tableId:e}=S();return e})(),{isOpen:r,isDelivering:n}=J(),o=ee(),l=e||((e,t,a)=>{if(!e)return null;const{deliveryOrderEnabled:i,dineInOrderEnabled:r,pickupOrderEnabled:n}=e;return i&&a?C.DELIVERY:r&&t?C.DINE_IN:n&&t?C.PICK_UP:null})(o,r,n);return{branchId:a,orderType:l,tableId:i?Number(i):void 0,totalPriceWithTax:0,totalPriceWithoutTax:0,totalTax:0,vat:0,paymentMethod:t||N.CASH}},ne=a.createContext({order:L,orderStep:k.CART,orderItems:{},isOrderOpen:!1,customer:{},trackingId:"",errors:{},updateOrder:()=>{},setOrderStep:()=>{},addProduct:()=>{},updateProduct:()=>{},removeAllProductVariants:()=>{},setIsOrderOpen:()=>{},getCustomer:()=>{},resetOrder:()=>{},setTrackingId:()=>{},updateOrderErrors:()=>{},resetErrors:()=>{}}),oe=({children:t,defaultOrderType:r,defaultPaymentMethod:n,defaultBranchId:o,isOrderDefaultOpen:l=!1})=>{const s=re({defaultOrderType:r,defaultPaymentMethod:n,defaultBranchId:o}),[d,u]=a.useState({}),[c,m]=a.useState(s),[p,_]=a.useState(k.CART),[E,v]=a.useState({}),[h,y]=a.useState(l),[I,T]=a.useState(""),[b,f]=a.useState({}),A=a.useCallback(e=>{m(t=>Object.assign(Object.assign({},t),e)),["branchId","tableId"].forEach(t=>{e[t]&&f(e=>(null==e?void 0:e[t])?Object.assign(Object.assign({},e),{[t]:null}):e)})},[]),P=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:r,note:n,isAddOperation:o})=>{if(i.isEmpty(e))return;const{id:l,vat:s=0,variants:d,addons:u,price:c,sellUnitType:m}=e,p=z(l,a,r);v(e=>{const _=e[p],E=parseFloat((o?((null==_?void 0:_.quantity)||0)+t:t).toFixed(3));if(E<=0){const t=e,a=p;t[a];return function(e,t){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(a[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(a[i[r]]=e[i[r]])}return a}(t,["symbol"==typeof a?a:a+""])}const v=d.find(({id:e})=>e===a),g=((e=[],t={})=>Object.entries(t).map(([t,a])=>{const r=Number(t),n=Array.isArray(a)?a:[a],o=e.find(e=>e.id===r);if(i.isEmpty(o))return{addonId:r,options:[]};const l=(o.options||[]).filter(e=>n.includes(e.id)).map(e=>({optionId:e.id,price:e.price}));return{addonId:r,options:l}}))(u,r);return Object.assign(Object.assign({},e),{[p]:Object.assign(Object.assign({productId:l,quantity:E,price:c,note:n,vat:s},!i.isEmpty(v)&&{variant:{variantId:v.id,price:v.price}}),{addons:g,sellUnitType:m})})}),o&&f(e=>(null==e?void 0:e.items)?Object.assign(Object.assign({},e),{items:null}):e)},[]),S=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:i,note:r})=>P({product:e,quantity:t,variantId:a,selectedAddons:i,note:r,isAddOperation:!0}),[P]),D=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:i,note:r})=>P({product:e,quantity:t,variantId:a,selectedAddons:i,note:r,isAddOperation:!1}),[P]),x=a.useCallback(e=>{e&&v(t=>{if(i.isEmpty(t))return t;return Object.entries(t).reduce((t,[a,i])=>(i.productId!==e&&(t[a]=i),t),{})})},[]),C=a.useCallback(()=>j(void 0,void 0,void 0,function*(){try{const{accessToken:e}=g.getAuthToken();if(!e)return;const t=yield j(void 0,void 0,void 0,function*(){return Y("customer")});if(!(null==t?void 0:t.id))throw new Error("SOMETHING_WENT_WRONG");u(t)}catch(e){H(e,{file:"src/store/order.tsx",method:"getCustomer"})}}),[]),O=a.useCallback((e=!1,t=!0)=>{t&&y(!1),(p===k.COMPLETED||e)&&(m(s),v({}),_(k.CART),T(""))},[s,p]),R=a.useCallback(e=>{f(t=>Object.assign(Object.assign({},t),{[e]:B(e)}))},[]),N=a.useCallback(()=>{f({})},[]),L=a.useMemo(()=>({order:c,orderStep:p,orderItems:E,isOrderOpen:h,customer:d,trackingId:I,errors:b,updateOrder:A,setOrderStep:_,addProduct:S,updateProduct:D,removeAllProductVariants:x,setIsOrderOpen:y,getCustomer:C,resetOrder:O,setTrackingId:T,updateOrderErrors:R,resetErrors:N}),[c,p,E,h,d,I,b,A,S,D,x,C,O,T,R,N]);return e.jsx(ne.Provider,{value:L,children:t})},le=()=>a.useContext(ne);var se,de,ue,ce,me;!function(e){e.MAX_DELIVERY_DISTANCE="maxDeliveryDistance",e.DELIVERY_ORDER_ENABLED="deliveryOrderEnabled",e.PICKUP_ORDER_ENABLED="pickupOrderEnabled",e.DINE_IN_ORDER_ENABLED="dineInOrderEnabled",e.MIN_DELIVERY_AMOUNT="minDeliveryAmount",e.DELIVERY_FEE_AMOUNT="deliveryFeeAmount",e.SERVICE_CHARGE_ENABLED="serviceChargeEnabled",e.SERVICE_CHARGE_PERCENTAGE="serviceChargePercentage",e.ADD_TO_ORDER_ENABLED="addToOrderEnabled"}(se||(se={})),function(e){e.PERCENTAGE="percentage",e.FIXED_AMOUNT="fixed"}(de||(de={})),function(e){e.ENTIRE_MENU="entire_menu",e.CLASS="class"}(ue||(ue={})),function(e){e.DELIVERY="delivery",e.TAKEAWAY="takeaway",e.DINE_IN="dine_in",e.ALL="ALL"}(ce||(ce={})),function(e){e.MAX_DELIVERY_DISTANCE="maxDeliveryDistance",e.DELIVERY_ORDER_ENABLED="deliveryOrderEnabled",e.PICKUP_ORDER_ENABLED="pickupOrderEnabled",e.DINE_IN_ORDER_ENABLED="dineInOrderEnabled",e.MIN_DELIVERY_AMOUNT="minDeliveryAmount"}(me||(me={}));const pe=()=>{const{business:e}=S();return e||{}},_e=()=>{const{currency:e}=pe();return e||"AZN"},Ee=()=>{const{language:e}=S();return e||"en"},ve=()=>{const e=D(),t=Ee();return a.useMemo(()=>h(e,t),[e,t])},ge=()=>{const{url:e}=ve(),t=(()=>{const{username:e}=pe();return e||""})();return a.useMemo(()=>`${e}/${t}`,[e,t])},he=()=>{const{videoId:e}=S();return e},ye=()=>{const{videos:e}=S();return a.useMemo(()=>e||[],[e])},Ie=()=>{const e=ye(),t=he();return a.useMemo(()=>t&&e.find(e=>e.productId===Number(t))||{},[e,t])};const Te=e=>{const t=ge(),a=ae();let i=t;return a&&(i+=`/${a}`),e&&(i+=`/videos/${e}`),i},be=()=>{const e=(()=>{const e=ye();return a.useMemo(()=>e[0],[e])})(),t=Te(null==e?void 0:e.productId);return i.isEmpty(e)?"":t};var fe="BusinessHeader-module_container__X22c3",Ae="BusinessHeader-module_cover__l-1W8",Pe="BusinessHeader-module_content__sjiqO",Se="BusinessHeader-module_logo__DWaaU",De="BusinessHeader-module_info__6RQFI",xe="BusinessHeader-module_name__Ynpex",je={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f",rotation:"Languages-module_rotation__gp8P5",pulse:"Languages-module_pulse__h9hxJ"};const Ce=()=>{const[i,r]=a.useState(!1),n=pe().languages||[],o=Ee(),l=(()=>{const{onLanguageSelect:e}=S();return e})(),s=n.length>1,d=n.filter(({code:e})=>e!==o)||[],u=e=>`https://images.tabres.com/languages/${e}.svg`;return s?e.jsx("div",{className:je.container,onClick:()=>r(!i),children:e.jsxs(t.Row,{alignItems:"center",gap:0,children:[e.jsx(t.Row,{alignItems:"center",className:t.classNames(je,{options:!0,isOpen:i}),children:d.map(({code:t})=>e.jsx("img",{src:u(t),className:je.option,onClick:()=>null==l?void 0:l(t),alt:t},t))}),e.jsx("img",{src:u(o),alt:o,className:je.currentLanguage})]})}):null},Oe=()=>{const{coverPhoto:a,avatar256:i,name:r}=pe();return e.jsxs("div",{className:fe,children:[e.jsx("img",{src:b(a),alt:r,className:Ae,width:1024,height:400}),e.jsx("div",{className:Pe,children:e.jsxs(t.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:.5,className:fe,children:[e.jsx("img",{src:T(i),alt:r,className:Se,width:96,height:96}),e.jsx("div",{className:De,children:e.jsx(t.Text,{variant:"h1",color:"white",className:xe,align:"center",children:r})})]})}),e.jsx(Ce,{})]})};var Re="BranchHeader-module_container__Ol56f",Ne="BranchHeader-module_cover__DGWZX",ke="BranchHeader-module_content__O8E27",Le="BranchHeader-module_logo__DL7Si",Me="BranchHeader-module_info__Ym-ln",we="BranchHeader-module_name__91VkO",ze="BranchHeader-module_address__Y140r",Ue="BranchHeader-module_addressText__ofVQQ",Be="BackIcon-module_container__uknWc";const We=({onClick:a,size:i,theme:n})=>{const o=ge(),l=x(),s=ie();return e.jsx("div",{className:Be,onClick:a||(()=>{if(l)return null==s?void 0:s("");"undefined"!=typeof window&&(window.location.href=o)}),children:e.jsx(t.SVGIcon,{icon:r.ChevronLeft,size:i,theme:n})})};var Ve="HeaderLinks-module_container__wfIXS",Fe="HeaderLinks-module_links__S5qXC",Ge="HeaderLinks-module_wifiPassword__j4cgP",Ye="HeaderLinks-module_businessHours__qVA-Q",He="HeaderLinks-module_icon__cQpBK",Ke={az:{error:{SOMETHING_WRONG:"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.",FIELD_REQUIRED:"Bu xananı doldurmaq mütləqdir","Unsupported country code":"Ölkə kodu düzgün deyil","Invalid OTP":"Təsdiq kodu düzgün deyil",INVALID_OTP:"Təsdiq kodu düzgün deyil",OTP_RATE_LIMIT_EXCEEDED:"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın","Invalid Email Address":"Email ünvanı düzgün deyil",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Bu funksiya mövcud tarif planınıza daxil deyil.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Bu sifariş növü aktiv deyil",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Bu sifariş növü indi aktiv deyil",COUNTRY_REQUIRED:"Ölkə daxil edilməlidir.",CITY_REQUIRED:"Şəhər daxil edilməlidir.",STREET_REQUIRED:"Küçə adı daxil edilməlidir.",STREET_NUMBER_REQUIRED:"Ev nömrəsi daxil edilməlidir.",OUT_OF_DELIVERY_RANGE:"Bu filial sizin ünvana çatdırılma etmir.",NO_ORDER_TYPE:"Zəhmət olmazsa, sifariş növünü seçin.",INVALID_ADDRESS:"Ünvan düzgün deyil"},common:{Save:"Yadda saxla",Cancel:"Ləğv et",Continue:"Davam et"},order:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et",Add:"Əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et","Add an order note":"Restoran üçün qeyd","Specify any allergies, special requests, or ingredients you want to add or remove":"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.","Your Order is Completed!":"Sifarişiniz tamamlandı!","Thank you! We've received your order and it will be delivered shortly.":"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.",Delivery:"Çatdırılma","Dine in":"Masaya",Pickup:"Al-apar",Cash:"Nağd","POS Terminal":"POS Terminal","Order summary":"Sifarişdəki məhsullar",Items:"Məhsullar",Tax:"Vergi",Total:"Cəm","Special instructions, allergies, etc.":"Xüsusi istəklər, allergiya və s.","Go to checkout":"Ödənişə keç","Place order":"Sifariş et",Continue:"Davam et","Not available":"Mövcud deyil","In order":"Sifarişdə","Product choices":"Seçimlər","Track order":"Sifarişi izlə","Minimum order amount for delivery is {{amount}}":"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır","This field is required":"Bu xana mütləq doldurulmalıdır","Please select a table":"Zəhmət olmazsa, masanı seçin","Please enter an address":"Zəhmət olmazsa, ünvanı daxil edin","Please choose product":"Zəhmət olmazsa, məhsul seçin",Table:"Masa","Select Table":"Masanı seçin",Card:"Kart ilə","Closed Now":"Hazırda bağlıdır","Delivery Fee":"Çatdırılma","Play video":"Videonu izlə"," / kg":" / kq"," / l":" / l"},customer:{"Unknown address":"Ünvan əlavə edilməyib","No address available":"Ünvan əlavə edilməyib","Update Delivery Address":"Çatdırılma ünvanını dəyişin",Country:"Ölkə",City:"Şəhər","Baker Street":"Nizami küçəsi",Address:"Ünvan","House number":"Ev nömrəsi","Additional number":"Mənzil","Example: Door code is 555":"Nümunə: Qapı kodu 555","Delivery Instructions":"Kuryer üçün təlimatlar",Floor:"Mərtəbə","Enter address":"Ünvanı daxil edin","House No.":"Ev nömrəsi"},auth:{"Create an account or log in":"Hesab yarat və ya daxil ol","Phone number":"Mobil nömrə","I don't have an email":"Email ünvanım yoxdur","We sent a confirmation code to {{address}}":"{{address}} üçün təsdiq kodunu göndərdik"},events:{Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Order":"Sifarişə əlavə edildi"},pricing:{"Get Started":"İndi başla","Choose Plan":"Planı seçin","Smart QR Menu":"Ağıllı QR Menyu","Link-in-bio":"Bio üçün link","Menu Analytics":"Menyu analitikası","Unlimited Products":"Limitsiz məhsul","Unlimited Categories":"Limitsiz kateqoriya","Product variants":"Məhsul variantları","Product options":"Məhsul əlavələri","Sales reports":"Satış hesabatı","24/7 Support":"24/7 dəstək","Multiple Branches":"Şöbələr","Order Management":"Sifarişlərin idarə edilməsi","Table Management":"Masaların idarə edilməsi","Mobile App for Owners & Staff":"Rəhbərlik və ofisiantlar üçün Mobil tətbiq","Point of Sale (POS)":"POS-kassa","Delivery Management":"Çatdırılmaların idarə edilməsi","Third-Party Delivery Integrations":"Çatdırılma partnyorlarının inteqrasiyası","TabresPay with Mobile":"TabresPay ilə ödəniş","Event management":"Tədbirlərin idarəsi","Unlimited Users":"Limitsiz istifadəçi","/ month":"/ Ay",monthly:"Aylıq plan",annually:"İllik plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!","Unlimited Languages":"Limitsiz dil seçimi","30-day money-back guarantee":"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.","Limited Time Only":"Məhdud müddətə","/ lifetime":"/ birdəfəlik","Try for free":"Pulsuz yoxla","No credit card needed":"Kart tələb olunmur"},branch:{"WEEKDAY-0":"Bazar ertəsi","WEEKDAY-1":"Çərşənbə axşamı","WEEKDAY-2":"Çərşənbə","WEEKDAY-3":"Cümə axşamı","WEEKDAY-4":"Cümə","WEEKDAY-5":"Şənbə","WEEKDAY-6":"Bazar",Closed:"Bağlıdır","Opening Hours":"İş saatları","Delivery Hours":"Çatdırılma saatları",Feedback:"Rəy bildir"}},en:{error:{SOMETHING_WRONG:"Something went wrong! Please try again later",FIELD_REQUIRED:"This field is required",INVALID_OTP:"Invalid OTP",OTP_RATE_LIMIT_EXCEEDED:"OTP limit has exceeded. Please try again later",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"This feature is not available for your current plan.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"This order type is not available for this business.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"This order type is not available right now.",COUNTRY_REQUIRED:"Country is required.",CITY_REQUIRED:"City is required.",STREET_REQUIRED:"Street is required.",STREET_NUMBER_REQUIRED:"Street number is required.",OUT_OF_DELIVERY_RANGE:"This branch doesn't deliver to your address.",NO_ORDER_TYPE:"Please select an order type.",INVALID_ADDRESS:"Invalid address"},common:{},order:{},customer:{},auth:{},events:{},pricing:{},branch:{"WEEKDAY-0":"Monday","WEEKDAY-1":"Tuesday","WEEKDAY-2":"Wednesday","WEEKDAY-3":"Thursday","WEEKDAY-4":"Friday","WEEKDAY-5":"Saturday","WEEKDAY-6":"Sunday"}},ru:{error:{SOMETHING_WRONG:"Что-то пошло не так! Пожалуйста, попробуйте позже",FIELD_REQUIRED:"Это поле обязательно для заполнения","Unsupported country code":"Неподдерживаемый код страны","Invalid OTP":"Неверный код подтверждения",INVALID_OTP:"Неверный код подтверждения",OTP_RATE_LIMIT_EXCEEDED:"Превышен лимит кодов. Попробуйте позже","Invalid Email Address":"Неверный адрес электронной почты",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Эта функция недоступна в вашем текущем тарифе.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Этот тип заказа недоступен для этого заведения.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Этот тип заказа сейчас недоступен.",COUNTRY_REQUIRED:"Страна обязательна.",CITY_REQUIRED:"Город обязателен.",STREET_REQUIRED:"Улица обязательна.",STREET_NUMBER_REQUIRED:"Номер дома обязателен.",OUT_OF_DELIVERY_RANGE:"Этот филиал не доставляет по вашему адресу.",NO_ORDER_TYPE:"Пожалуйста, выберите тип заказа.",INVALID_ADDRESS:"Неверный адрес"},common:{Save:"Сохранить",Cancel:"Отменить",Continue:"Продолжить"},order:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ",Add:"Добавить","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет продуктов","Add items":"Добавить продукты",Subtotal:"Итого",Events:"События","Product choices":"Варианты продукта","In order":"В заказе","Not available":"Не доступен","Specify any allergies, special requests, or ingredients you want to add or remove":"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.","Thank you! We've received your order and it will be delivered shortly.":"Спасибо! Мы получили ваш заказ и скоро доставим его.","Go to checkout":"Перейти к оплате","Add an order note":"Добавить примечание к заказу","Your Order is Completed!":"Ваш заказ завершен!",Delivery:"Доставка","Dine in":"На месте",Pickup:"Самовывоз",Cash:"Наличные","POS Terminal":"POS-терминал","Order summary":"Обзор заказа",Items:"Продукты",Tax:"Налог",Total:"Итого","Special instructions, allergies, etc.":"Особые инструкции, аллергии и т.д.","Place order":"Оформить заказ",Continue:"Продолжить","Track order":"Отследить заказ","Minimum order amount for delivery is {{amount}}":"Минимальная сумма заказа для доставки — {{amount}}","This field is required":"Это поле обязательно для заполнения","Please select a table":"Пожалуйста, выберите столик","Please enter an address":"Пожалуйста, введите адрес","Please choose product":"Пожалуйста, выберите продукт",Table:"Стол","Select Table":"Выбрать столик",Card:"Картой","Closed Now":"Сейчас закрыто","Delivery Fee":"Доставка","Play video":"Смотреть видео"},customer:{"Unknown address":"Неизвестный адрес","No address available":"Адрес не доступен","Update Delivery Address":"Обновить адрес доставки",Country:"Страна",City:"Город","Baker Street":"Улица Низами",Address:"Адрес","House number":"Номер дома","Additional number":"Квартира","Example: Door code is 555":"Пример: Код двери 555","Delivery Instructions":"Инструкции по доставке",Floor:"Этаж","Enter address":"Введите адрес","House No.":"Дом №"},auth:{"Create an account or log in":"Создайте аккаунт или войдите","Phone number":"Номер телефона","I don't have an email":"У меня нет электронной почты","We sent a confirmation code to {{address}}":"Мы отправили код подтверждения на {{address}}"},events:{Events:"События","Scrolled to Category":"Прокрутил до категории","Category Selected":"Категория выбрана","Product Details":"Детали продукта","Product Added to Order":"Продукт добавлен в заказ"},pricing:{"Get Started":"Начать","Choose Plan":"Выберите план","Smart QR Menu":"Умное меню по QR-коду","Link-in-bio":"Ссылка в био","Menu Analytics":"Аналитика меню","Unlimited Users":"Неограниченные пользователи","Unlimited Products":"Неограниченные продукты","Unlimited Categories":"Неограниченные категории","Product variants":"Варианты продуктов","Product options":"Дополнения к продукту","Sales reports":"Отчеты о продажах","24/7 Support":"24/7 техническая поддержка","Multiple Branches":"Многочисленные филиалы","Table Management":"Управление столами","Order Management":"Управление заказами","Mobile App for Owners & Staff":"Мобильное приложение для владельцев и персонала","Point of Sale (POS)":"POS-касса","Delivery Management":"Управление доставкой","Third-Party Delivery Integrations":"Интеграция со сторонними поставщиками","TabresPay with Mobile":"«TabresPay» с мобильного","Event management":"Управление мероприятиями","/ month":"/ месяц",monthly:"Ежемесячный план",annually:"Годовой план","Flexible Plans for Every Business - Simple Pricing, More Value!":"Тарифы для любого бизнеса - Простой прайс, больше возможностей!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!","Unlimited Languages":"Неограниченное количество языков","30-day money-back guarantee":"Гарантия возврата денег в течение 30 дней","Limited Time Only":"Только ограниченное время","/ lifetime":"/ разово","Try for free":"Попробуйте бесплатно","No credit card needed":"Кредитная карта не требуется"},branch:{"WEEKDAY-0":"Понедельник","WEEKDAY-1":"Вторник","WEEKDAY-2":"Среда","WEEKDAY-3":"Четверг","WEEKDAY-4":"Пятница","WEEKDAY-5":"Суббота","WEEKDAY-6":"Воскресенье",Closed:"Закрыто","Opening Hours":"Часы работы","Delivery Hours":"Время доставки"}},tr:{error:{SOMETHING_WRONG:"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin",FIELD_REQUIRED:"Bu alan zorunludur","Unsupported country code":"Desteklenmeyen ülke kodu","Invalid OTP":"Geçersiz doğrulama kodu",INVALID_OTP:"Geçersiz doğrulama kodu",OTP_RATE_LIMIT_EXCEEDED:"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin","Invalid Email Address":"Geçersiz e-posta adresi",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Bu özellik mevcut planınızda yer almıyor.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Bu sipariş türü bu işletmede aktif değil.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Bu sipariş türü şu anda aktif değil.",COUNTRY_REQUIRED:"Ülke zorunludur.",CITY_REQUIRED:"Şehir zorunludur.",STREET_REQUIRED:"Sokak adı zorunludur.",STREET_NUMBER_REQUIRED:"Bina numarası zorunludur.",OUT_OF_DELIVERY_RANGE:"Bu şube sizin adrese teslimat yapmıyor.",NO_ORDER_TYPE:"Lütfen bir sipariş türü seçin.",INVALID_ADDRESS:"Geçersiz adres"},common:{Save:"Kaydet",Cancel:"İptal et",Continue:"Devam et"},order:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle",Add:"Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte","Not available":"Mevcut değil","Specify any allergies, special requests, or ingredients you want to add or remove":"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.","Thank you! We've received your order and it will be delivered shortly.":"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.","Go to checkout":"Ödemeye geç","Add an order note":"Sipariş notu ekle","Your Order is Completed!":"Siparişiniz tamamlandı!",Delivery:"Teslimat","Dine in":"Masaya",Pickup:"Al götür",Cash:"Nakit","POS Terminal":"POS Terminali","Order summary":"Sipariş özeti",Items:"Ürünler",Tax:"Vergi",Total:"Toplam","Special instructions, allergies, etc.":"Özel talimatlar, alerjiler vb.","Place order":"Sipariş ver",Continue:"Devam et","Track order":"Siparişi takip et","Minimum order amount for delivery is {{amount}}":"Teslimat için minimum sipariş tutarı {{amount}} olmalı","This field is required":"Bu alan zorunludur","Please select a table":"Lütfen bir masa seçin","Please enter an address":"Lütfen bir adres girin","Please choose product":"Lütfen bir ürün seçin",Table:"Masa","Select Table":"Masa seçin",Card:"Kart ile","Closed Now":"Şu anda kapalı","Delivery Fee":"Teslimat ücreti","Play video":"Videoyu izle"},customer:{"Unknown address":"Bilinmeyen adres","No address available":"Adres mevcut değil","Update Delivery Address":"Teslimat adresini güncelle",Country:"Ülke",City:"Şehir","Baker Street":"Istiklal Caddesi",Address:"Adres","House number":"Ev numarası","Additional number":"Daire numarası","Example: Door code is 555":"Örnek: Kapı kodu 555","Delivery Instructions":"Teslimat talimatları",Floor:"Kat","Enter address":"Adres girin","House No.":"Ev No."},auth:{"Create an account or log in":"Hesap oluştur veya giriş yap","Phone number":"Telefon numarası","I don't have an email":"E-posta adresim yok","We sent a confirmation code to {{address}}":"{{address}} için doğrulama kodu gönderdik"},events:{Events:"Etkinlikler","Scrolled to Category":"Kategoriye kaydırıldı","Category Selected":"Kategori seçildi","Product Details":"Ürün Detayları","Product Added to Order":"Ürün siparişe eklendi"},pricing:{"Get Started":"Hemen Başla","Choose Plan":"Planı seçin","Smart QR Menu":"Akıllı QR Menü","Link-in-bio":"Bio için link","Menu Analytics":"Menü Analitiği","Unlimited Users":"Sınırsız kullanıcı","Unlimited Products":"Sınırsız ürün","Unlimited Categories":"Sınırsız kategori","Product variants":"Ürün çeşitleri","Product options":"Ürün seçenekleri","Sales reports":"Satış raporu","24/7 Support":"24/7 Teknik Destek","Multiple Branches":"Şube Yönetimi","Table Management":"Masa Yönetimi","Order Management":"Sipariş Yönetimi","Mobile App for Owners & Staff":"Patron ve Personel için Mobil Uygulama","Point of Sale (POS)":"POS Adisyon Sistemi","Delivery Management":"Paket sipariş yönetimi","Third-Party Delivery Integrations":"Üçüncü Parti Teslimat Entegrasyonları","TabresPay with Mobile":"Mobil ile TabresPay","Event management":"Etkinlik yönetimi","/ month":"/ Ay",monthly:"Aylık",annually:"Yıllık","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!","Unlimited Languages":"Sınırsız dil seçeneği","30-day money-back guarantee":"30 gün içinde memnun kalmazsanız, paranız iade.","Limited Time Only":"Sınırlı süreyle","/ lifetime":"/ tek seferlik","Try for free":"Ücretsiz dene","No credit card needed":"Kredi kartı gerekmez"},branch:{"WEEKDAY-0":"Pazartesi","WEEKDAY-1":"Salı","WEEKDAY-2":"Çarşamba","WEEKDAY-3":"Perşembe","WEEKDAY-4":"Cuma","WEEKDAY-5":"Cumartesi","WEEKDAY-6":"Pazar",Closed:"Kapalı","Opening Hours":"Çalışma saatleri","Delivery Hours":"Teslimat saatleri"}},nl:{error:{SOMETHING_WRONG:"Er is iets misgegaan! Probeer het later opnieuw",FIELD_REQUIRED:"Dit veld is verplicht","Unsupported country code":"Niet-ondersteunde landcode","Invalid OTP":"Ongeldige verificatiecode",INVALID_OTP:"Ongeldige verificatiecode",OTP_RATE_LIMIT_EXCEEDED:"Te veel pogingen. Probeer het later opnieuw","Invalid Email Address":"Ongeldig e-mailadres",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Deze functie is niet beschikbaar in je huidige pakket.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Dit type bestelling is niet beschikbaar bij dit bedrijf.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Dit besteltype is op dit moment niet beschikbaar.",COUNTRY_REQUIRED:"Land is verplicht.",CITY_REQUIRED:"Stad is verplicht.",STREET_REQUIRED:"Straat is verplicht.",STREET_NUMBER_REQUIRED:"Huisnummer is verplicht.",OUT_OF_DELIVERY_RANGE:"Deze vestiging bezorgt niet op jouw adres.",NO_ORDER_TYPE:"Selecteer een besteltype.",INVALID_ADDRESS:"Ongeldig adres"},common:{Save:"Opslaan",Cancel:"Annuleren",Continue:"Doorgaan"},order:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen",Add:"Toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling","Not available":"Niet beschikbaar","Specify any allergies, special requests, or ingredients you want to add or remove":"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.","Thank you! We've received your order and it will be delivered shortly.":"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.","Go to checkout":"Ga naar afrekenen","Add an order note":"Voeg een bestelopmerking toe","Your Order is Completed!":"Je bestelling is voltooid!",Delivery:"Levering","Dine in":"Ter plaatse",Pickup:"Meenemen",Cash:"Contant","POS Terminal":"POS Terminal","Order summary":"Bestellingsoverzicht",Items:"Items",Tax:"Belasting",Total:"Totaal","Special instructions, allergies, etc.":"Speciale instructies, allergieën, enz.","Place order":"Plaats bestelling",Continue:"Doorgaan","Track order":"Volg je bestelling","Minimum order amount for delivery is {{amount}}":"Minimale bestelbedrag voor bezorging is {{amount}}","This field is required":"Dit veld is verplicht","Please select a table":"Selecteer alstublieft een tafel","Please enter an address":"Vul alstublieft een adres in","Please choose product":"Kies alstublieft een product",Table:"Tafel","Select Table":"Kies tafel",Card:"Met je Betaalpas","Closed Now":"Nu gesloten","Delivery Fee":"Bezorgkosten","Play video":"Bekijk video"},customer:{"Unknown address":"Onbekend adres","No address available":"Geen adres beschikbaar","Update Delivery Address":"Werk het afleveradres bij",Country:"Land",City:"Stad","Baker Street":"Dam straat",Address:"Adres","House number":"Huisnummer","Additional number":"Appartementnummer","Example: Door code is 555":"Voorbeeld: Deurcode is 555","Delivery Instructions":"Leveringsinstructies",Floor:"Verdieping","Enter address":"Voer adres in","House No.":"Huis nr."},auth:{"Create an account or log in":"Maak een account aan of log in","Phone number":"Telefoonnummer","I don't have an email":"Ik heb geen e-mailadres","We sent a confirmation code to {{address}}":"We hebben een bevestigingscode gestuurd naar {{address}}"},events:{Events:"Gebeurtenissen","Scrolled to Category":"Gescrld naar categorie","Category Selected":"Categorie geselecteerd","Product Details":"Productdetails","Product Added to Order":"Product aan bestelling toegevoegd"},pricing:{"Get Started":"Start nu","Choose Plan":"Kies een plan","Smart QR Menu":"Slimme QR-menu","Link-in-bio":"Link-in-bio","Menu Analytics":"Menu analyse","Unlimited Products":"Onbeperkte producten","Unlimited Categories":"Onbeperkte categorieën","Unlimited Users":"Onbeperkte gebruikers","Product variants":"Productvarianten","Product options":"Productopties","Sales reports":"Verkooprapporten","24/7 Support":"24/7 ondersteuning","Multiple Branches":"Meerdere vestigingen","Table Management":"Tafelbeheer","Order Management":"Orderbeheer","Mobile App for Owners & Staff":"Mobiele app voor eigenaren en personeel","Point of Sale (POS)":"Kassasysteem (POS)","Delivery Management":"Leveringsbeheer","Third-Party Delivery Integrations":"Integraties van derden","TabresPay with Mobile":"TabresPay met mobiel","Event management":"Beheer van evenementen","/ month":"/ maand",monthly:"Maandelijks",annually:"Jaarlijks","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!","Unlimited Languages":"Onbeperkt aantal talen","30-day money-back guarantee":"30 dagen niet-goed-geld-terug garantie","Limited Time Only":"Beperkte tijd","/ lifetime":"/ eenmalig","Try for free":"Probeer gratis","No credit card needed":"Geen creditcard nodig"},branch:{"WEEKDAY-0":"Maandag","WEEKDAY-1":"Dinsdag","WEEKDAY-2":"Woensdag","WEEKDAY-3":"Donderdag","WEEKDAY-4":"Vrijdag","WEEKDAY-5":"Zaterdag","WEEKDAY-6":"Zondag",Closed:"Gesloten","Opening Hours":"Openingstijden","Delivery Hours":"Bezorgtijden"}},et:{error:{SOMETHING_WRONG:"Midagi läks valesti! Palun proovi hiljem uuesti",FIELD_REQUIRED:"See väli on kohustuslik","Unsupported country code":"Riigikood ei ole toetatud","Invalid OTP":"Vale kinnituskood",INVALID_OTP:"Vale kinnituskood",OTP_RATE_LIMIT_EXCEEDED:"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti","Invalid Email Address":"Vigane e-posti aadress",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"See funktsioon ei ole sinu praeguse paketiga saadaval.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"See tellimuse tüüp ei ole selles ettevõttes saadaval.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"See tellimuse tüüp ei ole praegu saadaval.",COUNTRY_REQUIRED:"Riik on kohustuslik.",CITY_REQUIRED:"Linn on kohustuslik.",STREET_REQUIRED:"Tänav on kohustuslik.",STREET_NUMBER_REQUIRED:"Maja number on kohustuslik.",OUT_OF_DELIVERY_RANGE:"See filiaal ei toimeta sellele aadressile.",NO_ORDER_TYPE:"Palun vali tellimuse tüüp.",INVALID_ADDRESS:"Vigane aadress"},common:{Save:"Salvesta",Cancel:"Tühista",Continue:"Jätka"},order:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele",Add:"Lisa","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses","Not available":"Ei ole saadaval","Specify any allergies, special requests, or ingredients you want to add or remove":"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.","Thank you! We've received your order and it will be delivered shortly.":"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.","Go to checkout":"Mine kassasse","Add an order note":"Lisa tellimuse märkus","Your Order is Completed!":"Teie tellimus on lõpetatud!",Delivery:"Kohaletoimetamine","Dine in":"Sööma jäämine",Pickup:"Eemaldamine",Cash:"Sularaha","POS Terminal":"POS terminal","Order summary":"Tellimuse kokkuvõte",Items:"Tooted",Tax:"Maks",Total:"Kokku","Special instructions, allergies, etc.":"Erisoovid, allergiad jne.","Place order":"Esita tellimus",Continue:"Jätka","Track order":"Jälgi tellimust","Minimum order amount for delivery is {{amount}}":"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}","This field is required":"See väli on kohustuslik","Please select a table":"Palun vali laud","Please enter an address":"Palun sisesta aadress","Please choose product":"Palun vali toode",Table:"Laud","Select Table":"Vali laud",Card:"Kaardiga","Closed Now":"Praegu suletud","Delivery Fee":"Kohaletoimetamise tasu","Play video":"Vaata videot"},customer:{"Unknown address":"Tundmatu aadress","No address available":"Aadress puudub","Update Delivery Address":"Uuenda kohaletoimetamise aadress",Country:"Riik",City:"Linn","Baker Street":"Nizami tänav",Address:"Aadress","House number":"Majanumber","Additional number":"Korteri number","Example: Door code is 555":"Näide: Uksekood on 555","Delivery Instructions":"Kohaletoimetamise juhised",Floor:"Põrand","Enter address":"Sisesta aadress","House No.":"Maja nr."},auth:{"Create an account or log in":"Loo konto või logi sisse","Phone number":"Telefoninumber","I don't have an email":"Mul ei ole e-posti aadressi","We sent a confirmation code to {{address}}":"Saatsime kinnituskoodi aadressile {{address}}"},events:{Events:"Sündmused","Scrolled to Category":"Keriti kategooriasse","Category Selected":"Kategooria valitud","Product Details":"Toote detailid","Product Added to Order":"Toode lisatud tellimusele"},pricing:{"Get Started":"Alustage","Choose Plan":"Vali plaan","Smart QR Menu":"Nutikas QR-menüü","Link-in-bio":"Link-in-bio","Menu Analytics":"Menüü Analüütika","Unlimited Products":"Piiramata tooted","Unlimited Categories":"Piiramata kategooriad","Product variants":"Tootevariandid","Product options":"Toote valikud","Sales reports":"Müügiaruanded","24/7 Support":"24/7 tugi","Multiple Branches":"Mitu filiaali","Table Management":"Tabelite haldamine","Order Management":"Tellimuste haldamine","Mobile App for Owners & Staff":"Mobiilirakendus omanikele ja töötajatele","Point of Sale (POS)":"Müügipunkt (POS)","Delivery Management":"Tarnejuhtimine","Third-Party Delivery Integrations":"Kolmanda osapoole tarneintegratsioonid","TabresPay with Mobile":"TabresPay koos mobiiliga","Event management":"Sündmuste haldamine","Unlimited Users":"Piiramatu arv kasutajaid","/ month":"/ kuus",monthly:"Igakuine",annually:"Igal aastal","Flexible Plans for Every Business - Simple Pricing, More Value!":"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!","Unlimited Languages":"Piiramatu arv keeli","30-day money-back guarantee":"30-päevane raha tagasi garantii","Limited Time Only":"Ainult piiratud ajaks","/ lifetime":"/ eluaegne","Try for free":"Proovi tasuta","No credit card needed":"Krediitkaarti pole vaja"},branch:{"WEEKDAY-0":"Esmaspäev","WEEKDAY-1":"Teisipäev","WEEKDAY-2":"Kolmapäev","WEEKDAY-3":"Neljapäev","WEEKDAY-4":"Reede","WEEKDAY-5":"Laupäev","WEEKDAY-6":"Pühapäev",Closed:"Suletud","Opening Hours":"Lahtiolekuajad","Delivery Hours":"Kohaletoimetamise ajad"}},pl:{error:{SOMETHING_WRONG:"Coś poszło nie tak! Spróbuj ponownie później.",FIELD_REQUIRED:"To pole jest wymagane","Unsupported country code":"Nieobsługiwany numer kierunkowy","Invalid OTP":"Nieprawidłowy kod weryfikacyjny",INVALID_OTP:"Nieprawidłowy kod weryfikacyjny",OTP_RATE_LIMIT_EXCEEDED:"Przekroczono limit kodów. Spróbuj ponownie za chwilę.","Invalid Email Address":"Nieprawidłowy adres e-mail",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Ta funkcja nie jest dostępna w Twoim obecnym planie.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Ten typ zamówienia nie jest dostępny w tym lokalu.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Ten typ zamówienia jest teraz niedostępny.",COUNTRY_REQUIRED:"Kraj jest wymagany.",CITY_REQUIRED:"Miasto jest wymagane.",STREET_REQUIRED:"Ulica jest wymagana.",STREET_NUMBER_REQUIRED:"Numer domu jest wymagany.",OUT_OF_DELIVERY_RANGE:"Ten lokal nie dostarcza pod Twój adres.",NO_ORDER_TYPE:"Wybierz typ zamówienia.",INVALID_ADDRESS:"Nieprawidłowy adres"},common:{Save:"Zapisz",Cancel:"Anuluj",Continue:"Dalej"},order:{"View order":"Zobacz zamówienie","Remove from order":"Usuń z zamówienia","Update order":"Zmień zamówienie","Add to order":"Dodaj do zamówienia",Add:"Dodaj","Your order":"Twoje zamówienie",Subtotal:"Suma","Empty order":"Puste zamówienie","You don't have any items in your order":"Nie masz jeszcze nic w zamówieniu","Add items":"Dodaj produkty","Add an order note":"Notatka dla restauracji","Specify any allergies, special requests, or ingredients you want to add or remove":"Napisz o alergiach, specjalnych prośbach lub składnikach, które chcesz dodać albo usunąć.","Your Order is Completed!":"Zamówienie przyjęte!","Thank you! We've received your order and it will be delivered shortly.":"Dziękujemy! Otrzymaliśmy Twoje zamówienie i niedługo je dostarczymy.",Delivery:"Dostawa","Dine in":"Na miejscu",Pickup:"Na wynos",Cash:"Gotówka","POS Terminal":"Terminal płatniczy","Order summary":"Podsumowanie zamówienia",Items:"Produkty",Tax:"Podatek",Total:"Razem","Special instructions, allergies, etc.":"Uwagi, alergie itp.","Go to checkout":"Przejdź do płatności","Place order":"Złóż zamówienie",Continue:"Dalej","Not available":"Niedostępne","In order":"W zamówieniu","Product choices":"Opcje","Track order":"Śledź zamówienie","Minimum order amount for delivery is {{amount}}":"Minimalna kwota zamówienia na dostawę to {{amount}}","This field is required":"To pole jest wymagane","Please select a table":"Wybierz stolik","Please enter an address":"Podaj adres","Please choose product":"Wybierz produkt",Table:"Stolik","Select Table":"Wybierz stolik",Card:"Kartą","Closed Now":"Teraz zamknięte","Delivery Fee":"Koszt dostawy","Play video":"Odtwórz wideo"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Adres nie został podany","No address available":"Brak adresu","Update Delivery Address":"Zmień adres dostawy",Country:"Kraj",City:"Miasto","Baker Street":"ul. Marszałkowska",Address:"Adres","House number":"Numer domu","Additional number":"Numer mieszkania","Example: Door code is 555":"Np. kod do drzwi: 555","Delivery Instructions":"Wskazówki dla kuriera",Floor:"Piętro","Enter address":"Wpisz adres","House No.":"Nr domu"},auth:{"Create an account or log in":"Załóż konto lub zaloguj się","Phone number":"Numer telefonu","I don't have an email":"Nie mam adresu e-mail","We sent a confirmation code to {{address}}":"Wysłaliśmy kod potwierdzający na {{address}}"},events:{Events:"Aktywność","Scrolled to Category":"Przewinięto do kategorii","Category Selected":"Wybrano kategorię","Product Details":"Szczegóły produktu","Product Added to Order":"Dodano do zamówienia"},pricing:{"Get Started":"Zacznij teraz","Choose Plan":"Wybierz plan","Smart QR Menu":"Inteligentne menu QR","Link-in-bio":"Link w bio","Menu Analytics":"Analityka menu","Unlimited Products":"Bez limitu produktów","Unlimited Categories":"Bez limitu kategorii","Product variants":"Warianty produktów","Product options":"Dodatki do produktów","Sales reports":"Raporty sprzedaży","24/7 Support":"Wsparcie 24/7","Multiple Branches":"Wiele lokali","Order Management":"Zarządzanie zamówieniami","Table Management":"Zarządzanie stolikami","Mobile App for Owners & Staff":"Aplikacja mobilna dla właścicieli i personelu","Point of Sale (POS)":"System kasowy (POS)","Delivery Management":"Zarządzanie dostawami","Third-Party Delivery Integrations":"Integracje z firmami kurierskimi","TabresPay with Mobile":"TabresPay na telefonie","Event management":"Zarządzanie wydarzeniami","Unlimited Users":"Bez limitu użytkowników","/ month":"/ mies.",monthly:"Plan miesięczny",annually:"Plan roczny","Flexible Plans for Every Business - Simple Pricing, More Value!":"Elastyczne plany dla każdego biznesu — proste ceny, więcej korzyści!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Wybierz plan, który pasuje do Twojego biznesu. Subskrybuj miesięcznie lub rocznie i oszczędzaj więcej!","Unlimited Languages":"Bez limitu języków","30-day money-back guarantee":"Gwarancja zwrotu pieniędzy w ciągu 30 dni.","Limited Time Only":"Oferta czasowa","/ lifetime":"/ jednorazowo","Try for free":"Wypróbuj za darmo","No credit card needed":"Bez karty kredytowej"},branch:{"WEEKDAY-0":"Poniedziałek","WEEKDAY-1":"Wtorek","WEEKDAY-2":"Środa","WEEKDAY-3":"Czwartek","WEEKDAY-4":"Piątek","WEEKDAY-5":"Sobota","WEEKDAY-6":"Niedziela",Closed:"Zamknięte","Opening Hours":"Godziny otwarcia","Delivery Hours":"Godziny dostawy",Feedback:"Zostaw opinię"}},pt:{error:{SOMETHING_WRONG:"Algo correu mal! Por favor, tente novamente mais tarde.",FIELD_REQUIRED:"Este campo é obrigatório","Unsupported country code":"Código de país não suportado","Invalid OTP":"Código de confirmação inválido",INVALID_OTP:"Código de confirmação inválido",OTP_RATE_LIMIT_EXCEEDED:"Excedeu o limite de códigos. Por favor, tente novamente mais tarde.","Invalid Email Address":"Endereço de e-mail inválido",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Esta funcionalidade não está disponível no seu plano.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Este tipo de pedido não está disponível para este estabelecimento.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Este tipo de pedido não está disponível de momento.",COUNTRY_REQUIRED:"O país é obrigatório.",CITY_REQUIRED:"A cidade é obrigatória.",STREET_REQUIRED:"A rua é obrigatória.",STREET_NUMBER_REQUIRED:"O número da porta é obrigatório.",OUT_OF_DELIVERY_RANGE:"Este estabelecimento não faz entregas para a sua morada.",NO_ORDER_TYPE:"Por favor, selecione um tipo de pedido.",INVALID_ADDRESS:"Morada inválida"},common:{Save:"Guardar",Cancel:"Cancelar",Continue:"Continuar"},order:{"View order":"Ver pedido","Remove from order":"Remover do pedido","Update order":"Atualizar pedido","Add to order":"Adicionar ao pedido",Add:"Adicionar","Your order":"O seu pedido",Subtotal:"Subtotal","Empty order":"Pedido vazio","You don't have any items in your order":"Ainda não tem itens no seu pedido","Add items":"Adicionar itens","Add an order note":"Adicionar nota ao pedido","Specify any allergies, special requests, or ingredients you want to add or remove":"Indique alergias, pedidos especiais ou ingredientes que queira adicionar ou retirar.","Your Order is Completed!":"O seu pedido está concluído!","Thank you! We've received your order and it will be delivered shortly.":"Obrigado! Recebemos o seu pedido e será entregue em breve.",Delivery:"Entrega","Dine in":"No local",Pickup:"Takeaway",Cash:"Dinheiro","POS Terminal":"Multibanco","Order summary":"Resumo do pedido",Items:"Itens",Tax:"Impostos",Total:"Total","Special instructions, allergies, etc.":"Instruções especiais, alergias, etc.","Go to checkout":"Finalizar pedido","Place order":"Confirmar pedido",Continue:"Continuar","Not available":"Indisponível","In order":"No pedido","Product choices":"Opções do produto","Track order":"Acompanhar pedido","Minimum order amount for delivery is {{amount}}":"O valor mínimo para entrega é {{amount}}","This field is required":"Este campo é obrigatório","Please select a table":"Por favor, selecione uma mesa","Please enter an address":"Por favor, introduza uma morada","Please choose product":"Por favor, escolha o produto",Table:"Mesa","Select Table":"Selecionar mesa",Card:"Cartão","Closed Now":"Fechado agora","Delivery Fee":"Taxa de entrega","Play video":"Ver vídeo"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Endereço não definido","No address available":"Sem endereço disponível","Update Delivery Address":"Atualizar endereço de entrega",Country:"País",City:"Cidade","Baker Street":"Rua da Liberdade",Address:"Morada","House number":"Número da porta","Additional number":"Andar / Apartamento","Example: Door code is 555":"Exemplo: Código da porta é 555","Delivery Instructions":"Instruções de entrega",Floor:"Piso","Enter address":"Introduzir morada","House No.":"Nº da porta"},auth:{"Create an account or log in":"Crie a sua conta ou entre","Phone number":"Número de telemóvel","I don't have an email":"Não tenho e-mail","We sent a confirmation code to {{address}}":"Enviámos um código de confirmação para {{address}}"},events:{Events:"Eventos","Scrolled to Category":"Navegou até à categoria","Category Selected":"Categoria selecionada","Product Details":"Detalhes do produto","Product Added to Order":"Produto adicionado ao pedido"},pricing:{"Get Started":"Começar agora","Choose Plan":"Escolher plano","Smart QR Menu":"Menu QR Inteligente","Link-in-bio":"Link na bio","Menu Analytics":"Análise do menu","Unlimited Products":"Produtos ilimitados","Unlimited Categories":"Categorias ilimitadas","Product variants":"Variantes de produto","Product options":"Opções de produto","Sales reports":"Relatórios de vendas","24/7 Support":"Suporte 24/7","Multiple Branches":"Vários estabelecimentos","Order Management":"Gestão de pedidos","Table Management":"Gestão de mesas","Mobile App for Owners & Staff":"App para gestores e equipa","Point of Sale (POS)":"Software de faturação (POS)","Delivery Management":"Gestão de entregas","Third-Party Delivery Integrations":"Integração com parceiros de entrega","TabresPay with Mobile":"TabresPay via Telemóvel","Event management":"Gestão de eventos","Unlimited Users":"Utilizadores ilimitados","/ month":"/ mês",monthly:"mensal",annually:"anual","Flexible Plans for Every Business - Simple Pricing, More Value!":"Planos flexíveis para cada negócio - Preços simples, mais valor!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Escolha o plano que melhor se adapta ao seu negócio. Adira mensal ou anualmente e poupe mais com os planos de longo prazo!","Unlimited Languages":"Idiomas ilimitados","30-day money-back guarantee":"Garantia de reembolso de 30 dias","Limited Time Only":"Apenas por tempo limitado","/ lifetime":"/ vitalício","Try for free":"Experimentar grátis","No credit card needed":"Sem necessidade de cartão"},branch:{"WEEKDAY-0":"Segunda-feira","WEEKDAY-1":"Terça-feira","WEEKDAY-2":"Quarta-feira","WEEKDAY-3":"Quinta-feira","WEEKDAY-4":"Sexta-feira","WEEKDAY-5":"Sábado","WEEKDAY-6":"Domingo",Closed:"Fechado","Opening Hours":"Horário de funcionamento","Delivery Hours":"Horário de entrega",Feedback:"Dar opinião"}},hr:{error:{SOMETHING_WRONG:"Nešto je pošlo po zlu! Molimo pokušajte ponovno.",FIELD_REQUIRED:"Ovo polje je obavezno","Unsupported country code":"Nepodržani pozivni broj zemlje","Invalid OTP":"Nevažeći kod",INVALID_OTP:"Nevažeći kod",OTP_RATE_LIMIT_EXCEEDED:"Previše pokušaja. Molimo pričekajte malo i pokušajte ponovno.","Invalid Email Address":"Nevažeća adresa epošte",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Ova značajka nije dostupna u vašem planu.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Ova vrsta narudžbe trenutno nije omogućena.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Ova vrsta narudžbe trenutno nije dostupna.",COUNTRY_REQUIRED:"Država je obavezna.",CITY_REQUIRED:"Grad je obavezan.",STREET_REQUIRED:"Ulica je obavezna.",STREET_NUMBER_REQUIRED:"Kućni broj je obavezan.",OUT_OF_DELIVERY_RANGE:"Nažalost, nismo u mogućnosti dostaviti na vašu adresu.",NO_ORDER_TYPE:"Molimo odaberite vrstu narudžbe.",INVALID_ADDRESS:"Nevažeća adresa"},common:{Save:"Spremi",Cancel:"Odustani",Continue:"Nastavi"},order:{"View order":"Pregled narudžbe","Remove from order":"Ukloni iz narudžbe","Update order":"Ažuriraj narudžbu","Add to order":"Dodaj u narudžbu",Add:"Dodaj","Your order":"Vaša narudžba",Subtotal:"Međuzbroj","Empty order":"Prazna narudžba","You don't have any items in your order":"Vaša narudžba je prazna","Add items":"Dodajte stavke","Add an order note":"Dodaj napomenu","Specify any allergies, special requests, or ingredients you want to add or remove":"Navedite alergije, posebne želje ili sastojke koje želite dodati ili izbaciti","Your Order is Completed!":"Vaša narudžba je dovršena!","Thank you! We've received your order and it will be delivered shortly.":"Hvala vam! Primili smo vašu narudžbu i bit će vam dostavljena uskoro.",Delivery:"Dostava","Dine in":"Za stolom",Pickup:"Preuzimanje",Cash:"Gotovina","POS Terminal":"Kartica (POS)","Order summary":"Sažetak narudžbe",Items:"Stavke",Tax:"Porez",Total:"Ukupno","Special instructions, allergies, etc.":"Posebne upute, alergije itd.","Go to checkout":"Na plaćanje","Place order":"Naruči",Continue:"Nastavi","Not available":"Nije dostupno","In order":"U narudžbi","Product choices":"Opcije proizvoda","Track order":"Prati narudžbu","Minimum order amount for delivery is {{amount}}":"Minimalni iznos za dostavu je {{amount}}","This field is required":"Ovo polje je obavezno","Please select a table":"Molimo odaberite stol","Please enter an address":"Molimo unesite adresu","Please choose product":"Molimo odaberite proizvod",Table:"Stol","Select Table":"Odaberi stol",Card:"Kartica","Closed Now":"Trenutno zatvoreno","Delivery Fee":"Naknada za dostavu","Play video":"Pogledaj video"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Nepoznata adresa","No address available":"Adresa nije dostupna","Update Delivery Address":"Ažurirajte adresu dostave",Country:"Država",City:"Grad","Baker Street":"Ulica",Address:"Adresa","House number":"Kućni broj","Additional number":"Dodatni broj / Stan","Example: Door code is 555":"Primjer: Kod za vrata je 555","Delivery Instructions":"Upute za dostavu",Floor:"Kat","Enter address":"Unesite adresu","House No.":"Kućni br."},auth:{"Create an account or log in":"Izradite račun ili se prijavite","Phone number":"Broj telefona","I don't have an email":"Nemam e-poštu","We sent a confirmation code to {{address}}":"Poslali smo potvrdni kod na {{address}}"},events:{Events:"Događaji","Scrolled to Category":"Pomaknuto do kategorije","Category Selected":"Odabrana kategorija","Product Details":"Detalji proizvoda","Product Added to Order":"Proizvod dodan u narudžbu"},pricing:{"Get Started":"Započnite","Choose Plan":"Odaberite plan","Smart QR Menu":"Pametni QR jelovnik","Link-in-bio":"Link za bio","Menu Analytics":"Analitika jelovnika","Unlimited Products":"Neograničeno proizvoda","Unlimited Categories":"Neograničeno kategorija","Product variants":"Varijante proizvoda","Product options":"Dodaci proizvodima","Sales reports":"Izvještaji o prodaji","24/7 Support":"Podrška 24/7","Multiple Branches":"Više poslovnica","Order Management":"Upravljanje narudžbama","Table Management":"Upravljanje stolovima","Mobile App for Owners & Staff":"Mobilna aplikacija za vlasnike i osoblje","Point of Sale (POS)":"POS sustav (blagajna)","Delivery Management":"Upravljanje dostavom","Third-Party Delivery Integrations":"Integracije s dostavnim službama","TabresPay with Mobile":"TabresPay mobilno plaćanje","Event management":"Upravljanje događajima","Unlimited Users":"Neograničeno korisnika","/ month":"/ mj.",monthly:"Mjesečni plan",annually:"Godišnji plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Fleksibilni planovi za svaki posao - Jednostavne cijene, više vrijednosti!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Odaberite plan koji vam odgovara. Pretplatite se mjesečno ili godišnje i uštedite uz dugoročne planove!","Unlimited Languages":"Neograničeno jezika","30-day money-back guarantee":"Jamstvo povrata novca 30 dana","Limited Time Only":"Samo ograničeno vrijeme","/ lifetime":"/ doživotno","Try for free":"Isprobajte besplatno","No credit card needed":"Nije potrebna kartica"},branch:{"WEEKDAY-0":"Ponedjeljak","WEEKDAY-1":"Utorak","WEEKDAY-2":"Srijeda","WEEKDAY-3":"Četvrtak","WEEKDAY-4":"Petak","WEEKDAY-5":"Subota","WEEKDAY-6":"Nedjelja",Closed:"Zatvoreno","Opening Hours":"Radno vrijeme","Delivery Hours":"Vrijeme dostave",Feedback:"Povratne informacije"}}};const Qe=(e="common",t)=>{const a=Ee(),i=(null==t?void 0:t.language)||a,{t:r}=((e,t)=>{try{const a=m.includes(e)?e:"en",i=Ke[a][t]||{};return{t:(e,t)=>{try{const a=i[e]||e;return t?Object.keys(t).reduce((e,a)=>e.replace(`{{${a}}}`,t[a]),a):a}catch(t){return console.error(t),e}}}}catch(e){return console.error(e),{t:e=>e}}})(i,e);return{t:r}},qe=()=>{const{setModal:a}=t.useModalContext(),{t:n}=Qe("branch"),{phone:o,wifiPassword:l,whatsApp:s,telegram:d,openingHours:c,deliveryHours:m}=$(),{instagram:p,tiktok:_,facebook:E,username:v}=pe(),g=!i.isEmpty(null==c?void 0:c.days)||!i.isEmpty(null==m?void 0:m.days),h="dgkmenu"===v;return e.jsx("div",{className:Ve,children:e.jsx("div",{className:Fe,children:e.jsx(t.Row,{gap:2,alignItems:"center",children:e.jsxs(t.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!o&&e.jsx(t.IconLink,{icon:r.Phone,href:`tel:+${o}`,size:"sm",shape:"circle",theme:"light"}),!!s&&e.jsx(t.IconLink,{icon:r.Whatsapp,href:`https://wa.me/${s}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!p&&e.jsx(t.IconLink,{icon:r.Instagram,href:p,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e.jsx(t.IconLink,{icon:r.Telegram,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!_&&e.jsx(t.IconLink,{icon:r.Tiktok,href:_,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!E&&e.jsx(t.IconLink,{icon:r.Facebook,href:E,size:"sm",shape:"circle",theme:"light",target:"_blank"}),h&&e.jsx(t.Tooltip,{hint:n("Feedback"),children:e.jsx(t.IconLink,{icon:r.MessageHeartSquare,href:"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform",size:"sm",shape:"circle",theme:"light",target:"_blank"})}),!!l&&e.jsx(t.Tooltip,{hint:l,children:e.jsx("div",{className:Ge,children:e.jsx(t.SVGIcon,{icon:r.Wifi,size:"sm",className:He})})}),g&&e.jsx("div",{className:Ye,onClick:()=>{a({id:u,params:{openingHours:c,deliveryHours:m}})},children:e.jsx(t.SVGIcon,{icon:r.Clock,size:"sm",className:He})})]})})})})},Ze=()=>{const{coverPhoto:a,avatar256:i}=pe(),n=(()=>{const{business:e}=S(),t=$(),a=Z(),i=(null==e?void 0:e.name)||"Tabres";return a?i:(null==t?void 0:t.name)?`${i} ${t.name}`:i})(),o=$().address||"",l=Z(),{latitude:s,longitude:d}=X(),u=`https://www.google.com/maps/place/${s},${d}`;return e.jsxs("div",{className:Re,children:[e.jsx("img",{src:b(a),alt:n,className:Ne,width:1024,height:400}),e.jsx("div",{className:ke,children:e.jsxs(t.Column,{justifyContent:l?"flex-end":"space-between",fullHeight:!0,fullWidth:!0,gap:0,children:[!l&&e.jsx(We,{size:"lg",theme:"dark-theme"}),e.jsxs(t.Flex,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e.jsx(t.Flex.Item,{children:e.jsx("img",{src:T(i),alt:n,className:Le,width:96,height:96})}),e.jsx(t.Flex.Item,{shrink:!0,className:Me,children:e.jsxs(t.Column,{gap:.5,children:[e.jsx(t.Text,{className:we,variant:"h1",size:"xl",color:"white",weight:"bold",noMargin:!0,children:n}),e.jsx("a",{className:ze,href:u,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(t.Row,{alignItems:"center",gap:.5,children:[e.jsx(t.SVGIcon,{icon:r.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:Ue,children:o})]})})]})})]})]})}),e.jsx(Ce,{}),e.jsx(qe,{})]})},$e=()=>{const t=$();return Z()||!i.isEmpty(t)?e.jsx(Ze,{}):e.jsx(Oe,{})};var Xe={};var Je={content:"Auth-module_content__1ATBc",terms:"Auth-module_terms__OH3th"};const et=()=>{var e,t;const{customer:a}=le();return(null===(e=null==a?void 0:a.addresses)||void 0===e?void 0:e[(null===(t=null==a?void 0:a.addresses)||void 0===t?void 0:t.length)-1])||{}};var tt,at;!function(e){e.PHONE="PHONE",e.OTP="OTP",e.EMAIL="EMAIL"}(tt||(tt={})),function(e){e.HOME="HOME",e.WORK="WORK",e.TRAVEL="TRAVEL"}(at||(at={}));const it=e=>{const t={},{countryCode:a,cityName:i,street:r,houseNumber:n}=e||{};return a||(t.countryCode="COUNTRY_REQUIRED"),i||(t.cityName="CITY_REQUIRED"),r||(t.street="STREET_REQUIRED"),n||(t.houseNumber="STREET_NUMBER_REQUIRED"),t},rt=(e,t,a)=>[e,[t,a].filter(Boolean).join("/")].filter(Boolean).join(" ");var nt,ot;!function(e){e.LIST="list",e.GRID="grid"}(nt||(nt={})),function(e){e.PIECE="PIECE",e.WEIGHT="WEIGHT",e.VOLUME="VOLUME"}(ot||(ot={}));const lt=()=>{const{orderItems:e,order:t}=le(),{deliveryFeeAmount:a}=ee(),i=Object.values(e||{}).reduce((e,t)=>{const{totalGross:a,totalNet:i,totalTax:r}=U(t),n=e.totalPriceWithTax+a;return{totalPriceWithTax:n,totalPriceWithoutTax:e.totalPriceWithoutTax+i,totalTax:e.totalTax+r,totalPriceWithTaxAndFees:n}},{totalPriceWithTax:0,totalPriceWithoutTax:0,totalTax:0,totalPriceWithTaxAndFees:0});return(null==t?void 0:t.orderType)===C.DELIVERY&&a>0&&(i.totalPriceWithTaxAndFees+=a),i},st=(e={})=>{const t=(()=>{const{id:e}=pe();return e})(),a=$(),i=Ee(),{order:r,orderItems:n}=le(),{totalPriceWithTax:o,totalPriceWithoutTax:l,totalTax:s,totalPriceWithTaxAndFees:d}=lt(),u=et(),c=(()=>{const{customer:e}=le();return null==e?void 0:e.id})(),{deliveryFeeAmount:m}=ee(),{workingDayId:p,tableId:_,employeeId:E,orderType:v,paymentMethod:g,note:h,vat:y=0}=Object.assign(Object.assign({},r),e);return{branchId:null==a?void 0:a.id,businessId:t,workingDayId:p,tableId:_,customerId:c,customerAddressId:u.id,employeeId:E,orderType:v,totalPriceWithTax:o,totalPriceWithTaxAndFees:d,totalPriceWithoutTax:l,totalTax:s,language:i,items:Object.values(n||{}),vat:y,paymentMethod:g,note:h,deliveryFee:v===C.DELIVERY?m:void 0}},dt=()=>{const{orderItems:e}=le();return Object.values(e||{}).reduce((e,t)=>e+(t.sellUnitType===ot.WEIGHT||t.sellUnitType===ot.VOLUME?1:t.quantity),0)},ut=()=>{const{t:e}=Qe("error"),t=X(),r=ee().maxDeliveryDistance,{latitude:n,longitude:o}=et(),[l,s]=a.useState(null);return a.useEffect(()=>{const e=!!n&&!!o,a=!i.isEmpty(t);j(void 0,void 0,void 0,function*(){if(!e||!a)return s("INVALID_ADDRESS");try{const e=yield((e,t)=>j(void 0,void 0,void 0,function*(){const{spherical:a}=yield google.maps.importLibrary("geometry"),i=new google.maps.LatLng(e.latitude,e.longitude),r=new google.maps.LatLng(t.latitude,t.longitude);return a.computeDistanceBetween(i,r)}))(t,{latitude:n,longitude:o});s(!e||e>r?"OUT_OF_DELIVERY_RANGE":null)}catch(e){s("OUT_OF_DELIVERY_RANGE")}})},[n,o,t,r]),l?e(l):null},ct=()=>{const{t:e}=Qe("order"),t=Ee(),a=_e(),r=ee().minDeliveryAmount,{totalPriceWithTax:n}=lt();if(n<r){return e("Minimum order amount for delivery is {{amount}}",{amount:i.priceFormatter(r,a,t)})}return null},mt=({address:a,errorMessage:i,onChange:r})=>{const{t:n}=Qe("auth"),{t:o}=Qe("error");return e.jsxs(t.Column,{gap:2,children:[e.jsx(t.Text,{fullWidth:!0,align:"center",color:"muted",children:n("We sent a confirmation code to {{address}}",{address:a})}),e.jsx(t.OTPInput,{onChangeOTP:e=>{queueMicrotask(()=>{r(e)})},errorMessage:i?o(i):void 0,inputMode:"numeric"})]})},pt=({formErrors:i,onChange:r})=>{const[n,o]=a.useState(""),{t:l}=Qe("error"),s=D(),d=Ee(),{url:u}=h(s,d),c=a.useCallback(e=>{var t,a;const i=null!==(a=null===(t=e.target)||void 0===t?void 0:t.value)&&void 0!==a?a:"";o(i),r(i)},[r]);return e.jsxs(t.Column,{className:Je.container,alignItems:"center",gap:0,children:[e.jsx(t.Input,{name:"email",type:t.InputType.EMAIL,placeholder:"Email",fullWidth:!0,value:n,onChange:c,errorMessage:i.email?l(i.email):void 0}),e.jsx("div",{className:Je.terms,children:e.jsxs("div",{children:["By clicking the button above, you agree to our"," ",e.jsx("a",{href:`${u}/terms`,target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:`${u}/privacy`,target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})]})})]})};var _t={};var Et={},vt="HoursList-module_container__wYX5G",gt="HoursList-module_title__D7Q8u";const ht=({title:a,days:r})=>{const{t:n}=Qe("branch");return i.isEmpty(r)?null:e.jsxs(t.Column,{className:vt,gap:.5,fullWidth:!0,children:[a&&e.jsx(t.Text,{weight:"medium",className:gt,children:n(a)}),r.map(({day:a,hours:i})=>{const r=!i,o=r?n("Closed"):`${i.openAt} - ${i.closeAt}`;return e.jsxs(t.Row,{justifyContent:"space-between",fullWidth:!0,children:[e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",children:n(`WEEKDAY-${a}`)}),e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",color:r?t.UIElementType.DANGER:"normal",children:o})]},a)})]})},yt=({openingHours:a,deliveryHours:r})=>{const n=(null==a?void 0:a.days)||[],o=(null==r?void 0:r.days)||[],l=(()=>{const e=ee();return null==e?void 0:e.deliveryOrderEnabled})();return i.isEmpty(n)?null:e.jsxs(t.Column,{className:Et.container,gap:2,children:[e.jsx(ht,{days:n}),l&&e.jsx(ht,{title:"Delivery Hours",days:o})]})};var It={container:"ScrollToTop-module_container__fY2Wr",visible:"ScrollToTop-module_visible__4c1xZ",flexWide:"ScrollToTop-module_flexWide__ISFJo",slidein:"ScrollToTop-module_slidein__ciJNw",fadeInOut:"ScrollToTop-module_fadeInOut__TVbp7",heightAnimation:"ScrollToTop-module_heightAnimation__ouHY-",fadein:"ScrollToTop-module_fadein__-3ySu",floatAnimation:"ScrollToTop-module_floatAnimation__6Gg6O",bottomSheet:"ScrollToTop-module_bottomSheet__XjARU",slideRightToLeft:"ScrollToTop-module_slideRightToLeft__YUoyD",rotation:"ScrollToTop-module_rotation__z-fUd",pulse:"ScrollToTop-module_pulse__59P93"};const Tt=({size:n,zIndex:o=100})=>{const[l,s]=a.useState(!1),d=a.useCallback(()=>{const e=window.scrollY>100;e!==l&&s(e)},[l]);return a.useEffect(()=>(window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}),[d]),e.jsx("div",{className:i.classNames(It,{container:!0,visible:l}),style:{zIndex:o},children:e.jsx(t.IconButton,{icon:r.ChevronUp,size:n,onClick:()=>{window.scrollTo({left:0,top:0,behavior:"smooth"})}})})};var bt="Branches-module_branches__sOuoV",ft="Branches-module_container__Ppa6v",At={item:"BranchCard-module_item__Uowu3",content:"BranchCard-module_content__tua5H",info:"BranchCard-module_info__GWCyI",name:"BranchCard-module_name__3f4c-",address:"BranchCard-module_address__X2UdI",imageContainer:"BranchCard-module_imageContainer__cZcxc",image:"BranchCard-module_image__Wb44-",notAvailable:"BranchCard-module_notAvailable__hM-C5",noImage:"BranchCard-module_noImage__TnVYT",flexWide:"BranchCard-module_flexWide__Z8Ly-",slidein:"BranchCard-module_slidein__iNE--",fadeInOut:"BranchCard-module_fadeInOut__W8YYr",heightAnimation:"BranchCard-module_heightAnimation__xVD3c",fadein:"BranchCard-module_fadein__u5kBh",floatAnimation:"BranchCard-module_floatAnimation__X2M2D",bottomSheet:"BranchCard-module_bottomSheet__jQn-M",slideRightToLeft:"BranchCard-module_slideRightToLeft__7lAiW",rotation:"BranchCard-module_rotation__bTyhC",pulse:"BranchCard-module_pulse__4w1oB"};const Pt=({children:t,id:a})=>{const i=ie(),r=ge();return i?e.jsx("div",{className:At.item,onClick:()=>i(a),children:t}):e.jsx("a",{href:`${r}/${a}`,className:At.item,children:t})},St=({branch:a})=>{const{id:n,address:o,coverPhoto:l,name:s}=a||{},d=`${pe().name} ${s}`;return e.jsx(Pt,{id:n,children:e.jsxs("div",{className:i.classNames(At,{content:!0,noImage:!l}),children:[l&&e.jsx("div",{className:At.imageContainer,children:e.jsx("img",{src:b(l),alt:d,className:At.image,width:1024,height:400})}),e.jsxs(t.Column,{justifyContent:"flex-end",alignItems:"center",fullHeight:!0,className:At.info,gap:.5,children:[e.jsx(t.Text,{variant:"h2",className:At.name,align:"center",weight:"bold",size:"lg",noMargin:!0,color:"white",children:d}),e.jsxs(t.Row,{alignItems:"center",gap:.5,justifyContent:"center",fullWidth:!0,children:[e.jsx(t.SVGIcon,{icon:r.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:At.address,children:o})]})]})]})})},Dt=()=>{const a=(()=>{const{branches:e}=S();return e||[]})();return e.jsx("div",{className:bt,children:e.jsx(t.Container,{className:ft,children:a.map(t=>e.jsx(St,{branch:t},t.id))})})};var xt,jt={};!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(xt||(xt={}));const Ct=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},Ot=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},Rt=(e,t)=>{var a;return(null===(a=((null==e?void 0:e.options)||[]).find(({id:e})=>e===t))||void 0===a?void 0:a.price)||0},Nt=(e=0,t=1,a=0)=>e*t*(1+a/100),kt=(e,t)=>{var a;return(null===(a=null==e?void 0:e.translations)||void 0===a?void 0:a[t])||{}},Lt=(e,t=1)=>{const{price:a=0,vat:i=0}=e||{};return Nt(a,t,i)},Mt=(e,t,a,r=1)=>{const n=Lt(e,r);return{totalPrice:n,formattedTotalPrice:i.priceFormatter(n,t,a)}},wt=(e,t)=>{var a,i;return(null===(i=null===(a=null==e?void 0:e.variants)||void 0===a?void 0:a.find)||void 0===i?void 0:i.call(a,e=>e.id===t))||{}},zt=(e,t,a)=>{const i=wt(t,e),{vat:r}=t||{},{price:n}=i||{};return Nt(n,a,r)},Ut=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},Bt=({product:e,variantId:t,quantity:a=1,selectedAddons:r,noVat:n=!1})=>{if(i.isEmpty(e))return{price:0,optionsPrice:0,total:0};const o=Object.assign(Object.assign({},e),{vat:n?0:e.vat}),l=((e,t={},a)=>((null==e?void 0:e.addons)||[]).filter(e=>Object.prototype.hasOwnProperty.call(t,e.id)).reduce((e,a)=>{const{id:i,selectType:r}=a;if(r===xt.SINGLE){const r=t[i];return e+Rt(a,r)}return e+(t[i]||[]).reduce((e,t)=>e+Rt(a,t),0)},0)*a)(o,r,a),s=t?zt(t,o,a):Lt(o,a);return{price:s,optionsPrice:l,total:s+l}},Wt=e=>{var t;const{products:a}=S();return(null===(t=null==a?void 0:a.find)||void 0===t?void 0:t.call(a,({id:t})=>t===e))||{}},Vt=(e,t)=>{var a,i;return(null===(i=null===(a=null==e?void 0:e.translations)||void 0===a?void 0:a.find)||void 0===i?void 0:i.call(a,e=>e.language===t))||{}},Ft=()=>{const e=ge(),t=ae();return t?`${e}/${t}`:e},Gt="digital_menu",Yt=`${Gt}_category_select`,Ht=`${Gt}_category_scroll`,Kt=`${Gt}_product_details`,Qt=`${Gt}_product_add_cart`,qt=`${Gt}_product_view_changed`,Zt=[Yt,Ht,Kt,Qt];var $t="Categories-module_categories__Hh8hl";const Xt=({categoryProductMap:r=[],language:n,selectedCategoryId:o,skipTracking:l=!1,onSelectCategory:s})=>{const d=a.useRef({}),u=a.useRef(null),c=a.useCallback(()=>{var e;const t=null===(e=null==d?void 0:d.current)||void 0===e?void 0:e[o];if(!t||!u.current)return;const a=u.current.clientWidth,i=t.offsetLeft-a/2+t.offsetWidth/2;u.current.scrollTo({left:i,behavior:"smooth"})},[o]);return a.useEffect(()=>{o&&c()},[o,c]),e.jsx("div",{className:$t,children:e.jsx(t.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(u.current=e.current)},paddingInline:1,children:(r||[]).map(({id:a,translations:r})=>{const{name:u}=r.find(e=>e.language===n)||{};return e.jsx(t.CarouselItem,{children:e.jsx(t.Chip,{onClick:()=>((e,t)=>{e!==o&&(s(e),l||i.trackEvent(Yt,{name:t}))})(a,u),type:t.UIElementType.BORDERED_PRIMARY,active:a===o,children:e.jsx("div",{ref:e=>{e&&(d.current[a]=e)},children:u})})},a)})})})};var Jt="Products-module_container__bF2LF",ea="Products-module_view__l857X",ta="Products-module_products__AoDrY",aa="Products-module_category__Sp7dE",ia="Products-module_list__LH4v5",ra={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",volume:"ProductsListItem-module_volume__rcwdd",image:"ProductsListItem-module_image__h6Wbi",notAvailable:"ProductsListItem-module_notAvailable__TeMCr",addToOrder:"ProductsListItem-module_addToOrder__6KqZn",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26",rotation:"ProductsListItem-module_rotation__ZMvMz",pulse:"ProductsListItem-module_pulse__yy4Wc"};const na=({product:n,currency:o,language:l,onClick:s})=>{const{addProduct:d}=le(),{image160:u,volume:c,available:m,sellUnitType:p,variants:_,addons:E}=n||{},{name:v,description:g}=a.useMemo(()=>kt(n,l),[n,l]),{formattedTotalPrice:h}=a.useMemo(()=>Mt(n,o,l),[n,o,l]),{t:y}=Qe("order"),{addToOrderEnabled:T}=ee(),b=T&&m,f=(null==_?void 0:_.length)>0,A=(null==E?void 0:E.length)>0,P=p===ot.WEIGHT||p===ot.VOLUME||f||A,S=!!u;return e.jsxs("div",{className:i.classNames(ra,{container:!0,isClickable:!!s,noImage:!S}),onClick:s,children:[e.jsxs(t.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:ra.info,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:ra.name,children:v}),e.jsx("p",{className:ra.description,children:g}),e.jsxs(t.Row,{className:ra.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:h}),!!c&&e.jsx("div",{className:ra.volume,children:c})]}),!m&&e.jsx(t.Text,{size:"xs",color:"danger",className:ra.notAvailableText,children:y("Not available")})]})}),S&&e.jsx("img",{src:I(u),alt:v||"menu",className:i.classNames(ra,{image:!0,notAvailable:!m}),loading:"lazy",width:160,height:90})]}),b&&e.jsx("div",{className:ra.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),P&&s)return s();d({product:n}),i.trackEvent(Qt,{name:v,quantity:1})},icon:r.Plus,type:t.UIElementType.DEFAULT})})]})};var oa={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",notAvailable:"ProductsGridItem-module_notAvailable__i4-HA",addToOrder:"ProductsGridItem-module_addToOrder__PhQhg",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",notAvailableText:"ProductsGridItem-module_notAvailableText__9G0yj",hasBackgroundColor:"ProductsGridItem-module_hasBackgroundColor__PnUA1",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5",rotation:"ProductsGridItem-module_rotation__npCfA",pulse:"ProductsGridItem-module_pulse__whBaS"};const la=({product:n,currency:o,language:l,defaultImage:s="",isDashboard:d=!1,backgroundColor:u,onClick:c,onAddProduct:m})=>{const{volume:p,image580:_,image160:E,image1024:v,available:g,sellUnitType:h,variants:y,addons:T}=n||{},b=_||v||E||s,{name:f,description:A}=a.useMemo(()=>kt(n,l),[n,l]),{formattedTotalPrice:P}=a.useMemo(()=>Mt(n,o,l),[n,o,l]),{t:S}=Qe("order",{language:l}),{addToOrderEnabled:D}=ee(),x=D&&g,j=(null==y?void 0:y.length)>0,C=(null==T?void 0:T.length)>0,O=h===ot.WEIGHT||h===ot.VOLUME||j||C;return e.jsx("div",{className:oa.container,children:e.jsxs("div",{className:i.classNames(oa,{content:!0,isClickable:!!c,noImage:!b,hasBackgroundColor:!b&&Boolean(u)}),onClick:c,style:{backgroundColor:u},children:[b&&e.jsx("div",{className:oa.imageContainer,children:e.jsx("img",{src:I(b),alt:f||"menu",className:i.classNames(oa,{image:!0,notAvailable:!g}),loading:"lazy",width:580,height:326})}),e.jsx("div",{className:oa.info,children:e.jsx("div",{className:oa.data,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:oa.name,children:f}),!d&&e.jsx("p",{className:oa.description,children:A}),e.jsxs(t.Row,{className:oa.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:P}),!!p&&e.jsx(t.Text,{color:"white",className:oa.volume,children:p})]}),!g&&e.jsx(t.Text,{color:"white",size:"xs",className:oa.notAvailableText,children:S("Not available")})]})})}),x&&e.jsx("div",{className:oa.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),O&&c)return c();m({product:n}),i.trackEvent(Qt,{name:f,quantity:1})},icon:r.Plus,type:t.UIElementType.DEFAULT})})]})})},sa=({product:t,currency:a,language:i,onClick:r})=>{const{addProduct:n}=le();return e.jsx(la,{onAddProduct:n,product:t,currency:a,language:i,onClick:r})},da=a.memo(({categoryProductMap:n=[],currency:o,language:l,productBlocksRef:s,containerRef:d,onCategoryInView:u})=>{const[m,p]=a.useState(nt.LIST),{setModal:_}=t.useModalContext(),E=be(),v=[{icon:r.List,type:nt.LIST},{icon:r.Grid,type:nt.GRID}],g=e=>{const{name:t}=kt(e,l);i.trackEvent(Kt,{name:t}),_({id:c,params:{product:e}})};return a.useEffect(()=>{const e=new IntersectionObserver(e=>{var t;const a=((null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let i=null,r=1/0;e.forEach(e=>{if(e.isIntersecting){const t=e.boundingClientRect,n=t.top+t.height/2,o=Math.abs(n-a);o<r&&(r=o,i=e.target.getAttribute("data-category-id"))}}),i&&u(Number(i))},{threshold:.1});return Object.entries(s.current||{}).forEach(([t,a])=>{a&&(a.setAttribute("data-category-id",t),e.observe(a))}),()=>{e.disconnect()}},[s,d,u]),e.jsxs("div",{className:Jt,children:[e.jsxs(t.Row,{className:ea,alignItems:"center",children:[v.map(({icon:a,type:r})=>e.jsx(t.IconButton,{icon:a,onClick:()=>(e=>{p(e),i.trackEvent(qt,{name:e})})(r),type:r===m?t.UIElementType.PRIMARY:t.UIElementType.DEFAULT},r)),!i.isEmpty(E)&&e.jsx("a",{href:E,children:e.jsx(t.IconButton,{icon:r.PlaySquare,onClick:()=>{},type:t.UIElementType.DEFAULT})})]}),e.jsx(t.Column,{gap:0,children:(n||[]).map(a=>{const{name:i}=Vt(a,l),{id:r,products:n}=a;return e.jsxs("div",{className:ta,ref:e=>{e&&(s.current[r]=e)},"data-category-id":r,children:[e.jsx("h2",{className:aa,children:i}),e.jsx("div",{className:ia,children:e.jsx(t.Column,{gap:0,children:(n||[]).map(t=>m===nt.GRID?e.jsx(sa,{product:t,currency:o,language:l,onClick:()=>g(t)},t.id):e.jsx(na,{product:t,currency:o,language:l,onClick:()=>g(t)},t.id))})})]},r)})})]})},(e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language);da.displayName="Products";var ua={container:"OrderFAB-module_container__YeERy",count:"OrderFAB-module_count__7ZQN5",isVisible:"OrderFAB-module_isVisible__-0j7W",animate:"OrderFAB-module_animate__Wx4O-",pulse:"OrderFAB-module_pulse__yF8uk",isInPublicMenu:"OrderFAB-module_isInPublicMenu__qwIrS",flexWide:"OrderFAB-module_flexWide__FfcIV",slidein:"OrderFAB-module_slidein__dniBn",fadeInOut:"OrderFAB-module_fadeInOut__BhXGd",heightAnimation:"OrderFAB-module_heightAnimation__B-TR3",fadein:"OrderFAB-module_fadein__DO09i",floatAnimation:"OrderFAB-module_floatAnimation__gOJf0",bottomSheet:"OrderFAB-module_bottomSheet__NRqrj",slideRightToLeft:"OrderFAB-module_slideRightToLeft__O8uj3",rotation:"OrderFAB-module_rotation__dOOw-"};const ca=({totalCount:n,isVisible:o,onClick:l,isInPublicMenu:s=!1})=>{const d=a.useRef(null),u=a.useRef(!1),c=n%1==0?n:n.toFixed(2);return a.useEffect(()=>{if(!u.current)return;const e=d.current;e&&(e.classList.remove(ua.animate),e.offsetWidth,e.classList.add(ua.animate))},[n]),a.useEffect(()=>{u.current=!0},[]),e.jsxs("div",{className:i.classNames(ua,{container:!0,isVisible:o,isInPublicMenu:s}),onClick:l,ref:d,children:[e.jsx(t.SVGIcon,{icon:r.ShoppingBag,color:t.UIElementType.DEFAULT,size:"md"}),e.jsx("div",{className:ua.count,children:c})]})},ma=({alwaysVisible:t=!1,isInPublicMenu:a=!1})=>{const i=dt(),{setIsOrderOpen:r,isOrderOpen:n}=le();return i<=0&&!t?null:e.jsx(ca,{totalCount:i,isVisible:!n,onClick:()=>r(!n),isInPublicMenu:a})},pa=({containerRef:t})=>{var r;const n=(()=>{const{products:e}=S();return e||[]})(),o=(()=>{const{categories:e}=S();return e||[]})(),l=Ee(),s=_e(),d=((e,t)=>{const a=t.reduce((e,t)=>{if(!t.visible)return e;const a=Number(t.categoryId);return e[a]||(e[a]=[]),e[a].push(t),e},{});return e.map(e=>Object.assign(Object.assign({},e),{products:a[Number(e.id)]||[]})).filter(e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0})})(o,n),[u,c]=a.useState(null===(r=null==o?void 0:o[0])||void 0===r?void 0:r.id),m=a.useRef({}),p=a.useRef(!0),_=a.useCallback(e=>j(void 0,void 0,void 0,function*(){p.current=!1,c(e),(e=>{var t;const a=null===(t=null==m?void 0:m.current)||void 0===t?void 0:t[e];a&&(setTimeout(()=>{a.scrollIntoView({behavior:"smooth",block:"start"})},100),setTimeout(()=>{p.current=!0},1e3))})(e)}),[]),E=a.useCallback(e=>{if(!(null==p?void 0:p.current))return;const t=((e,t,a)=>{var r;const n=null===(r=null==t?void 0:t.find)||void 0===r?void 0:r.call(t,({id:t})=>t===e);if(i.isEmpty(n))return"";const{name:o}=Vt(n,a);return o||""})(e,o,l);i.trackEvent(Ht,{name:t}),c(e)},[o,l]),v=a.useCallback(()=>j(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search),t=Number(e.get("category"));if(!t)return;const a=(o||[]).find(({id:e})=>e===t);i.isEmpty(a)||_(t)}),[o,_]);return a.useEffect(()=>{v()},[v]),e.jsxs("div",{className:jt.container,children:[e.jsx(Xt,{categoryProductMap:d,language:l,selectedCategoryId:u,onSelectCategory:_}),e.jsx(da,{categoryProductMap:d,language:l,currency:s,productBlocksRef:m,containerRef:t,onCategoryInView:E}),e.jsx(ma,{isInPublicMenu:!0})]})};var _a="VideoFeed-module_container__6tYYs",Ea="VideoFeed-module_videos__6KjGc",va="Video-module_container__HT89i",ga="Video-module_videoContainer__GE-7a",ha="Video-module_video__36hFc",ya="Video-module_top__SIvSk",Ia="Video-module_actionIcon__F6Ze1",Ta="Video-module_play__XCToT",ba="Video-module_bottom__DNzui",fa="Video-module_actions__cOh-0",Aa="Actions-module_container__K2DUX",Pa="Actions-module_action__u-Mvu",Sa="Actions-module_animate__Y2p0y";const Da=({video:n})=>{const{setModal:o}=t.useModalContext(),{addProduct:l,setIsOrderOpen:s}=le(),d=a.useRef(null),{productId:u,productName:m}=n||{},p=dt(),_=Wt(u),{addToOrderEnabled:E}=ee(),{sellUnitType:v,variants:g,addons:h,available:y}=_,I=(null==g?void 0:g.length)>0,T=(null==h?void 0:h.length)>0,b=v===ot.WEIGHT||v===ot.VOLUME||I||T,f=E&&y,A=a.useCallback(()=>{o({id:c,params:{product:_}})},[_,o]),P=a.useCallback(()=>{if(b)return A();l({product:_}),i.trackEvent(Qt,{name:m,quantity:1})},[l,A,_,m,b]),S=[{icon:r.Eye,onClick:A},...f?[{icon:r.Plus,onClick:P}]:[],{icon:r.ShoppingBag,onClick:()=>s(!0),value:p,ref:d}];return a.useEffect(()=>{const e=d.current;e&&(e.classList.remove(Sa),e.offsetWidth,e.classList.add(Sa))},[p]),e.jsx(t.Column,{className:Aa,fullWidth:!0,gap:.5,children:S.map(({icon:a,onClick:r,value:n,ref:o},l)=>e.jsxs(t.Column,{alignItems:"center",gap:.375,children:[e.jsx("div",{className:Pa,onClick:r,ref:o,children:e.jsx(t.SVGIcon,{icon:a,size:"md",color:t.UIElementType.DEFAULT})}),!i.isNil(n)&&e.jsx(t.Text,{size:"xs",weight:"bold",color:"white",fullWidth:!0,align:"center",children:n})]},l))})};var xa={container:"VideoData-module_container__H-DjR",business:"VideoData-module_business__gYhgS",productName:"VideoData-module_productName__vBGba",businessName:"VideoData-module_businessName__refS2",description:"VideoData-module_description__LTbgV",noAvatar:"VideoData-module_noAvatar__ZwPv7",flexWide:"VideoData-module_flexWide__eoJyv",slidein:"VideoData-module_slidein__Rx56q",fadeInOut:"VideoData-module_fadeInOut__7WQqD",heightAnimation:"VideoData-module_heightAnimation__0aEX0",fadein:"VideoData-module_fadein__BB4dW",floatAnimation:"VideoData-module_floatAnimation__sbOmx",bottomSheet:"VideoData-module_bottomSheet__Ag-e1",slideRightToLeft:"VideoData-module_slideRightToLeft__-eS9s",rotation:"VideoData-module_rotation__77Eig",pulse:"VideoData-module_pulse__HMgCB"};const ja=({video:r})=>{const[n,o]=a.useState(!1),l=Ft();if(i.isEmpty(r))return null;const{businessAvatar:s,businessName:d,productName:u,productDescription:c,productPrice:m}=r,p=Boolean(s);return e.jsxs(t.Column,{className:i.classNames(xa,{container:!0,noAvatar:!p}),gap:.75,fullWidth:!1,children:[e.jsxs("a",{className:xa.business,href:l,children:[p&&e.jsx(t.Avatar,{source:I(s),size:"sm"}),e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{weight:"medium",color:"white",whiteSpace:"nowrap",className:xa.productName,children:u}),e.jsx(t.Text,{color:"white",whiteSpace:"nowrap",className:xa.businessName,weight:"light",children:d})]})]}),e.jsx(t.Text,{color:"white",className:xa.price,children:m}),Boolean(c)&&e.jsx(t.Row,{onClick:()=>o(e=>!e),children:e.jsx(t.Text,{color:"white",size:"sm",whiteSpace:n?"wrap":"nowrap",className:xa.description,children:c})})]})},Ca=({video:n,isActive:o=!1,shouldLoad:l=!1,isMuted:s=!0,registerVideo:d,setIsMuted:u})=>{const[c,m]=a.useState(!0),p=a.useRef(null),_=a.useRef(!1),E=Ft(),g=(e=>e?e.includes("base64")||e.startsWith("https://")?e:`${v}/${e}`:"")(null==n?void 0:n.videoUrl),h=a.useCallback(()=>{var e;const t=p.current;t&&(t.paused?null===(e=t.play())||void 0===e||e.catch(()=>{}):t.pause(),m(t.paused))},[]),y=a.useCallback(()=>{_.current=!0},[]);return a.useEffect(()=>{var e;const t=p.current;t&&(l&&!t.src&&(t.muted=!0,t.playsInline=!0,t.src=g,t.load()),l&&o&&(null===(e=t.play())||void 0===e||e.catch(()=>{})),o||t.paused||t.pause(),!l&&t.src&&(t.pause(),t.removeAttribute("src"),t.load()),m(t.paused))},[l,o,g]),a.useEffect(()=>{p.current&&!c&&p.current.muted!==s&&(p.current.muted=s)},[s,c]),i.isEmpty(n)?null:e.jsx("div",{className:va,ref:e=>d(n.productId,e),children:e.jsxs("div",{className:ga,children:[e.jsx("video",{ref:p,className:ha,muted:!0,autoPlay:!0,playsInline:!0,preload:"none",loop:!0,controlsList:"nodownload nofullscreen noplaybackrate",controls:!1,disablePictureInPicture:!0,poster:I(n.thumbnail),onClick:h,onPlay:y}),e.jsxs(t.Row,{className:ya,justifyContent:"space-between",children:[e.jsx("div",{className:Ia,onClick:e=>{e.stopPropagation(),p.current&&_.current&&(p.current.muted=!p.current.muted,u(p.current.muted))},"data-testid":"mute-button",children:e.jsx(t.SVGIcon,{icon:s?r.VolumeX:r.VolumeMax,size:"md",color:t.UIElementType.DEFAULT})}),e.jsx("a",{className:Ia,href:E,children:e.jsx(t.SVGIcon,{icon:r.Close,size:"md",color:t.UIElementType.DEFAULT})})]}),c&&e.jsx("div",{className:Ta,children:e.jsx(t.SVGIcon,{icon:r.Play,size:"xxxl",color:t.UIElementType.DEFAULT})}),e.jsxs(t.Row,{className:ba,alignItems:"flex-end",gap:1,children:[e.jsx(ja,{video:n}),e.jsx(t.Column,{className:fa,justifyContent:"flex-end",fullWidth:!1,fullHeight:!1,children:e.jsx(Da,{video:n})})]})]})})},Oa=()=>{const[t,i]=a.useState(!0),r=Ie(),n=(()=>{const e=he(),t=ye();return a.useMemo(()=>t.filter(t=>t.productId!==Number(e)),[t,e])})(),o=a.useRef(null),{activeId:l,register:s}=function(e){const[t,i]=a.useState(null),r=a.useRef(new Map);return a.useEffect(()=>{const t=e.current;if(!t)return;let a;const n=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio)[0];t&&(cancelAnimationFrame(a),a=requestAnimationFrame(()=>{i(e=>{var a,i;const n=null!==(i=null===(a=[...r.current.entries()].find(([,e])=>e===t.target))||void 0===a?void 0:a[0])&&void 0!==i?i:null;return e===n?e:n})}))},{root:t,threshold:[.6,.75,1]});return r.current.forEach(e=>n.observe(e)),()=>{cancelAnimationFrame(a),n.disconnect()}},[e]),{activeId:t,register:(e,t)=>{t&&r.current.set(e,t)}}}(o);return e.jsx("div",{className:_a,children:e.jsxs("div",{className:Ea,tabIndex:0,ref:o,children:[e.jsx(Ca,{video:r,registerVideo:s,isActive:l===r.productId,shouldLoad:!0,setIsMuted:i,isMuted:t}),n.map(a=>e.jsx(Ca,{video:a,registerVideo:s,isActive:l===a.productId,shouldLoad:l===a.productId,setIsMuted:i,isMuted:t},a.productId))]})})};var Ra={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",media:"ProductDetails-module_media__Wy8ai",play:"ProductDetails-module_play__-4H6b",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",stickyBottom:"ProductDetails-module_stickyBottom__17IWN",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW"},Na={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",focused:"Quantity-module_focused__Vfnh5",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk",rotation:"Quantity-module_rotation__dn0J8",pulse:"Quantity-module_pulse__6kl4q"};const ka=({isDecreaseDisabled:a=!1,quantity:n=1,size:o="md",focusedSection:l,onIncrease:s,onDecrease:d})=>e.jsxs(t.Row,{className:i.classNames(Na,{container:!0,focused:"quantity"===l},[Na[o]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:i.classNames(Na,{quantityAction:!0,isDisabled:a}),onClick:d,children:e.jsx(t.SVGIcon,{icon:r.Minus})}),e.jsx("div",{className:Na.quantityValue,children:n}),e.jsx("div",{className:Na.quantityAction,onClick:s,children:e.jsx(t.SVGIcon,{icon:r.Plus})})]});var La="ProductInOrder-module_container__0N57G",Ma="ProductInOrder-module_title__TWjM9";const wa=({productId:a,quantity:i,isInPublicMenu:n=!0,language:o,removeAllProductVariants:l,onModalClose:s})=>{const{setIsOrderOpen:d}=le(),{t:u}=Qe("order",{language:o});return i<=0?null:e.jsxs(t.Flex,{className:La,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(t.Flex.Item,{flex:1,className:Ma,children:[u("In order")," (",i,")"]}),e.jsx(t.Flex.Item,{flex:0,children:e.jsxs(t.Row,{children:[e.jsx(t.IconButton,{icon:r.Trash,onClick:()=>{l(a)},type:t.UIElementType.DANGER,tooltip:u("Remove from order")}),n&&e.jsx(t.IconButton,{icon:r.ShoppingBag,onClick:()=>{d(!0),s&&s()},type:t.UIElementType.SUCCESS,tooltip:u("View order")})]})})]})};var za={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ",rotation:"ProductVariants-module_rotation__iJPfC",pulse:"ProductVariants-module_pulse__xzh2J"};const Ua=({product:r,selectedVariant:n,focusedSection:o,language:l,currency:s,onSelectVariant:d})=>{const{t:u}=Qe("order",{language:l}),c=a.useRef(null),{variants:m}=r||{},p="variant"===o;return a.useEffect(()=>{p&&c.current&&c.current.scrollIntoView({behavior:"smooth"})},[o,p]),e.jsxs(t.Column,{className:i.classNames(za,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:za.variantsTitle,ref:c,children:u("Product choices")}),(m||[]).map(a=>{const{id:o}=a||{},{formattedTotalPrice:u}=(({variantId:e,currency:t="USD",language:a="en",product:r,quantity:n=1})=>{const o=zt(e,r,n);return{totalPrice:o,formattedTotalPrice:i.priceFormatter(o,t,a)}})({variantId:o,language:l,currency:s,product:r}),c=Ut(a,l);return e.jsxs(t.Row,{justifyContent:"space-between",onClick:()=>d(o),className:za.variant,children:[e.jsx(t.Input,{label:c,name:"variant",onChange:()=>d(o),checked:n===o,type:t.InputType.RADIO,size:"small",noMargin:!0}),e.jsx("div",{className:za.variantPrice,children:u})]},o)})]})};var Ba={container:"ProductAddons-module_container__DRnT7"};const Wa=({product:a,selectedAddons:r,language:n,currency:o,onOptionSelect:l})=>{const{addons:s}=a||{};return e.jsx(t.Column,{className:Ba.container,gap:1.5,fullWidth:!0,children:(s||[]).map(a=>{const{id:s,options:d,selectType:u}=a||{},c=Ct(a,n);return e.jsxs(t.Column,{children:[e.jsx(t.Text,{variant:"bold",children:c}),e.jsx(t.Column,{gap:1,fullWidth:!0,children:(d||[]).map(a=>{const{id:d}=a||{},{formattedTotalPrice:c}=(({option:e,currency:t,language:a})=>{const{price:r}=e||{};return{totalPrice:r,formattedTotalPrice:i.priceFormatter(r,t||"USD",a||"en")}})({option:a,language:n,currency:o}),m=Ot(a,n),p=u===xt.SINGLE,_=p?r[s]===d:(r[s]||[]).includes(d);return e.jsxs(t.Row,{justifyContent:"space-between",className:Ba.option,children:[e.jsx(t.Input,{label:m,name:`option-${s}`,onChange:()=>l({addonId:s,optionId:d,isSingle:p,isRemove:!p&&_}),checked:_,type:p?t.InputType.RADIO:t.InputType.CHECKBOX,size:"small",noMargin:!0}),e.jsx("div",{className:Ba.optionPrice,children:c})]},d)})})]},s)})})},Va=({product:n,language:o,currency:l,selectedVariant:s,focusedSection:d,selectedAddons:u,isDecreaseDisabled:c,quantity:m,actionTitle:p,isInPublicMenu:_,productQuantityInOrderWithAllVariants:E,modalRef:v,videoUrl:g,addToOrderEnabled:h=!0,onClose:y,setSelectedVariant:T,onOptionSelect:b,adjustQuantity:f,onSubmit:A,removeAllProductVariants:P,onQuantityChange:S})=>{const{t:D}=Qe("order",{language:o}),{name:x,description:j}=a.useMemo(()=>kt(n,o),[n,o]),{formattedTotalPrice:C}=a.useMemo(()=>Mt(n,l,o),[n,l,o]),{formattedTotalPrice:O}=a.useMemo(()=>(({product:e,variantId:t,quantity:a=1,currency:r,language:n,selectedAddons:o,noVat:l=!1})=>{const{total:s}=Bt({product:e,variantId:t,quantity:a,selectedAddons:o,noVat:l});return{totalPrice:s,formattedTotalPrice:i.priceFormatter(s,r,n)}})({product:n,quantity:m,language:o,currency:l,variantId:s,selectedAddons:u}),[n,m,o,l,s,u]),R=a.useMemo(()=>(e=>{switch(e){case ot.WEIGHT:return" / kg";case ot.VOLUME:return" / l";default:return""}})(null==n?void 0:n.sellUnitType),[n]),N=a.useMemo(()=>(e=>{switch(e){case ot.WEIGHT:return{"50gr":.05,"100gr":.1,"150gr":.15,"200gr":.2,"250gr":.25,"300gr":.3,"350gr":.35,"400gr":.4,"450gr":.45,"500gr":.5,"600gr":.6,"700gr":.7,"750gr":.75,"800gr":.8,"850gr":.85,"900gr":.9,"950gr":.95,"1kg":1,"2kg":2,"5kg":5,"10kg":10,"20kg":20};case ot.VOLUME:return{"50ml":.05,"100ml":.1,"150ml":.15,"200ml":.2,"250ml":.25,"300ml":.3,"350ml":.35,"400ml":.4,"450ml":.45,"500ml":.5,"600ml":.6,"700ml":.7,"750ml":.75,"800ml":.8,"850ml":.85,"900ml":.9,"950ml":.95,"1l":1,"2l":2,"5l":5,"10l":10,"20l":20};default:return{}}})(null==n?void 0:n.sellUnitType),[n]),k=a.useCallback(e=>{var t,a;(null===(a=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.contains)||void 0===a?void 0:a.call(t,null==e?void 0:e.target))||y&&y()},[v,y]);if(i.isEmpty(n))return null;const{image1024:L,volume:M,variants:w,addons:z,available:U,sellUnitType:B}=n,W=(null==w?void 0:w.length)>0,V=(null==z?void 0:z.length)>0,F=B===ot.WEIGHT||B===ot.VOLUME;return e.jsx("div",{className:Ra.container,onClick:k,children:e.jsx(t.Modal,{onClose:y,ref:v,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:Ra.content,children:[e.jsxs(t.Column,{gap:0,children:[e.jsxs("div",{className:Ra.media,children:[L&&e.jsx("img",{src:I(L),width:1024,height:400,alt:x||"product",className:Ra.image}),Boolean(g)&&e.jsxs("a",{href:g,className:Ra.play,children:[e.jsx(t.SVGIcon,{icon:r.PlayCircle,color:t.UIElementType.DEFAULT}),e.jsx(t.Text,{color:"white",children:D("Play video")})]})]}),e.jsxs(t.Column,{className:Ra.details,gap:1,children:[e.jsx("h2",{className:Ra.name,children:x}),e.jsxs(t.Row,{justifyContent:"space-between",children:[e.jsxs("div",{className:Ra.price,children:[C,Boolean(R)&&D(R)]}),e.jsx("div",{className:Ra.volume,children:M})]}),e.jsx("div",{className:Ra.description,children:j})]}),(W||V)&&e.jsxs(t.Column,{gap:0,className:Ra.choices,children:[W&&e.jsx(Ua,{product:n,selectedVariant:s,focusedSection:d,language:o,currency:l,onSelectVariant:T}),V&&e.jsx(Wa,{product:n,selectedAddons:u,language:o,currency:l,onOptionSelect:b})]}),e.jsxs(t.Column,{gap:0,fullWidth:!0,className:Ra.stickyBottom,children:[F&&e.jsx(t.Numpad,{onChange:S,value:m,shortcuts:N}),e.jsx(wa,{productId:null==n?void 0:n.id,onModalClose:y,isInPublicMenu:_,removeAllProductVariants:P,quantity:E,language:o})]})]}),e.jsx("div",{className:Ra.close,children:e.jsx(t.IconButton,{onClick:y,icon:r.Close})})]}),footer:h?e.jsxs(t.Row,{className:Ra.addToOrder,gap:.5,children:[e.jsx(ka,{focusedSection:d,isDecreaseDisabled:c,onDecrease:()=>f(-1),onIncrease:()=>f(1),quantity:m}),e.jsx(t.Button,{className:Ra.addAction,label:U?e.jsxs(t.Row,{fullWidth:!0,justifyContent:"space-between",gap:.5,children:[e.jsx("span",{className:Ra.actionTitle,children:p}),e.jsx("span",{children:O})]}):D("Not available"),onClick:A,size:"xl",fullWidth:!0,disabled:!U,paddingBlock:.5})]}):null})})};var Fa="OrderDrawer-module_container__DymQj",Ga="OrderDrawer-module_content__khduX",Ya="OrderDrawer-module_paymentMethods__9i-sb",Ha="OrderDrawer-module_footer__8XfD9",Ka="OrderDrawer-module_noteButton__M8BVx",Qa={container:"OrderStepper-module_container__GVnVU",count:"OrderStepper-module_count__u13tM",actionText:"OrderStepper-module_actionText__CZsVe",totalPrice:"OrderStepper-module_totalPrice__R9Mni",isClickable:"OrderStepper-module_isClickable__M3rWK",isLoading:"OrderStepper-module_isLoading__FkS16",isDisabled:"OrderStepper-module_isDisabled__xipwc",flexWide:"OrderStepper-module_flexWide__oIpQi",slidein:"OrderStepper-module_slidein__P6YJD",fadeInOut:"OrderStepper-module_fadeInOut__OVRav",heightAnimation:"OrderStepper-module_heightAnimation__bDpZh",fadein:"OrderStepper-module_fadein__526L2",floatAnimation:"OrderStepper-module_floatAnimation__rjwmv",bottomSheet:"OrderStepper-module_bottomSheet__777sc",slideRightToLeft:"OrderStepper-module_slideRightToLeft__UjVx6",rotation:"OrderStepper-module_rotation__PedNC",pulse:"OrderStepper-module_pulse__mOlOg"};const qa=({actionText:a,isLoading:r=!1,isDisabled:n=!1,onClick:o})=>{const{orderStep:l}=le(),s=dt(),{totalPriceWithTax:d,totalPriceWithTaxAndFees:u}=(()=>{const{totalPriceWithTax:e,totalPriceWithoutTax:t,totalTax:a,totalPriceWithTaxAndFees:r}=lt(),n=Ee(),o=_e();return{totalPriceWithTax:i.priceFormatter(e,o,n),totalPriceWithoutTax:i.priceFormatter(t,o,n),totalTax:i.priceFormatter(a,o,n),totalPriceWithTaxAndFees:i.priceFormatter(r,o,n)}})();return e.jsxs(t.Flex,{className:i.classNames(Qa,{container:!0,isLoading:r,isClickable:!!o,isDisabled:n}),justifyContent:"space-between",alignItems:"center",onClick:r||n?null:o,children:[e.jsx(t.Flex.Item,{flex:1,children:e.jsxs(t.Row,{alignItems:"center",children:[e.jsx("div",{className:Qa.count,children:s}),e.jsx("div",{className:Qa.actionText,children:r?e.jsx(t.Loading,{}):a})]})}),e.jsx(t.Flex.Item,{className:Qa.totalPrice,flex:1,children:l===k.DETAILS?u:d})]})},Za=({isOrderItemsEmpty:n=!1,orderError:o})=>{const{t:d}=Qe("order"),{t:u}=Qe("error"),{order:c,orderStep:m,orderItems:p,setOrderStep:_,setIsOrderOpen:E,setTrackingId:v,updateOrderErrors:g,resetErrors:h}=le(),{setModal:y}=t.useModalContext(),I=te(),T=(()=>{const{customer:e}=le();return e||{}})(),{isOpen:b,isDelivering:f}=J(),A=st(),[P,S]=a.useState(!1),[D,x]=a.useState(""),O=null==c?void 0:c.note,R=!!O,N=I&&m===k.CART,L=b||f,w=!!o||!L,z=()=>j(void 0,void 0,void 0,function*(){try{x(""),S(!0);const e=yield(e=>j(void 0,void 0,void 0,function*(){return F("customer/order",e)}))(A);return e.trackingId}catch(e){return x((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),H(e,{file:"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx",method:"handleSubmit"}),""}finally{S(!1)}}),U=I&&L?()=>j(void 0,void 0,void 0,function*(){if(i.isEmpty(T))return y({id:s});if(h(),m===k.DETAILS){if(c.orderType===C.DELIVERY&&i.isEmpty(null==T?void 0:T.addresses))return g("customer");if(c.orderType===C.DINE_IN&&!(null==c?void 0:c.tableId))return g("tableId");if(i.isEmpty(p))return g("items");const e=yield z();if(!e)return;v(e)}const e=(M.findIndex(e=>e===m)||0)+1;if(e>=M.length)return;const t=M[e];_(t)}):null;return e.jsxs(t.Column,{className:Ha,fullWidth:!0,children:[!!D&&e.jsx(t.AlertBox,{message:u(D),type:"error",onClear:()=>x("")}),!!o&&e.jsx(t.TextBanner,{text:o,type:t.UIElementType.DANGER,fullWidth:!0}),N&&e.jsx(t.Button,{label:R?e.jsx(t.Text,{children:c.note}):e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{children:d("Add an order note")}),e.jsx(t.Text,{size:"sm",color:"muted",children:d("Special instructions, allergies, etc.")})]}),onClick:()=>{y({id:l,params:{note:O}})},size:"xxxl",fullWidth:!0,type:t.UIElementType.LIGHT,className:Ka,icon:R?r.Edit:r.Plus,iconSize:"md"}),n?e.jsx(t.Button,{label:d("Add items"),onClick:()=>E(!1),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):m!==k.COMPLETED?e.jsx(qa,{actionText:d((()=>{if(!I)return"Subtotal";if(!L)return"Closed Now";switch(m){case k.CART:return"Go to checkout";case k.DETAILS:return"Place order";default:return"Continue"}})()),onClick:U,isLoading:P,isDisabled:w}):null]})};var $a={},Xa="OrderListItem-module_container__Tj4RI",Ja="OrderListItem-module_image__o3PIC",ei="OrderListItem-module_data__BLzxw",ti="OrderListItem-module_name__QEzuZ",ai="OrderListItem-module_price__-V2qL",ii="ProductQuantity-module_quantity__PzTpj";const ri=({productId:t,variantId:a,min:i=1,size:r="md",selectedAddons:n,isDisabled:o=!1})=>{const l=(({productId:e,variantId:t,selectedAddons:a})=>{const{orderItems:i}=le(),r=i[z(e,t,a)];return(null==r?void 0:r.quantity)||1})({productId:t,variantId:a,selectedAddons:n}),s=Wt(t),{updateProduct:d}=le(),u=l===i;return o?e.jsx("div",{className:ii,children:l}):e.jsx(ka,{isDecreaseDisabled:u,onDecrease:()=>d({product:s,quantity:l-1,variantId:a,selectedAddons:n}),onIncrease:()=>d({product:s,quantity:l+1,variantId:a,selectedAddons:n}),quantity:l,size:r})},ni=({item:a,product:r,language:n})=>e.jsx(e.Fragment,{children:(a.addons||[]).map(({addonId:a,options:o})=>{const l=((e,t)=>((null==e?void 0:e.addons)||[]).find(({id:e})=>e===t)||{})(r,a),s=((null==l?void 0:l.options)||[]).filter(e=>null==o?void 0:o.some(({optionId:t})=>t===e.id));if(i.isEmpty(l)||i.isEmpty(s))return null;const d=Ct(l,n),u=s.map(e=>Ot(e,n)).filter(Boolean).join(", ");return d&&u?e.jsxs(t.Text,{color:"muted",size:"xs",children:[d,": ",u]},a):null})}),oi=({item:r,isDisabled:n=!1})=>{var o;const{productId:l}=r||{},s=null===(o=null==r?void 0:r.variant)||void 0===o?void 0:o.variantId,d=(e=>{const t={};for(const{addonId:a,options:i=[]}of e.addons||[]){const e=i.map(({optionId:e})=>e);t[a]=1===e.length?e[0]:e}return t})(r),u=Wt(l),c=wt(u,s),m=Ee(),{image160:p}=u,_=Ut(c,m),{name:E}=a.useMemo(()=>kt(u,m),[u,m]),{formattedTotalPrice:v}=(e=>{const t=Ee(),a=_e(),{totalGross:r}=U(e);return{totalPrice:r,formattedTotalPrice:i.priceFormatter(r,a,t)}})(r);return e.jsxs(t.Row,{className:Xa,gap:1,alignItems:"flex-start",children:[p&&e.jsx("img",{src:I(p),alt:E||"menu",className:Ja,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:ei,children:[e.jsx("div",{className:ti,children:E}),e.jsxs(t.Column,{gap:0,children:[!!_&&e.jsx(t.Text,{color:"muted",size:"xs",children:_}),e.jsx(ni,{item:r,product:u,language:m})]}),e.jsx("div",{className:ai,children:v})]}),e.jsx(ri,{productId:l,variantId:s,selectedAddons:d,size:"sm",min:0,isDisabled:n})]})},li=()=>{const{t:a}=Qe("order");return e.jsxs(t.Column,{className:$a.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(t.Text,{variant:"h2",children:a("Empty order")}),e.jsx(t.Description,{text:a("You don't have any items in your order")})]})},si=({isDisabled:t=!1})=>{const{orderItems:a}=le(),r=i.isEmpty(a);return e.jsx("div",{className:$a.container,children:r?e.jsx(li,{}):e.jsx("div",{className:$a.items,children:Object.entries(a||{}).map(([a,i])=>e.jsx(oi,{item:i,isDisabled:t},a))})})},di=()=>e.jsx("div",{className:Ga,children:e.jsx(si,{})});var ui="CustomerAddress-module_container__TGYRV";const ci=()=>{const{t:a}=Qe("customer");return e.jsx(t.Text,{color:t.UIElementType.DANGER,children:a("No address available")})},mi=()=>{const a=et(),{t:i}=Qe("customer"),{additionalNumber:r,street:n,houseNumber:o,cityName:l,countryCode:s}=a,d=rt(n,o,r),u=([l,s]||[]).filter(Boolean).join(", ");return e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{children:d||i("Unknown address")}),u&&e.jsx(t.Text,{size:"sm",color:"muted",children:u})]})},pi=()=>{const a=et(),{setModal:n}=t.useModalContext();return e.jsx("div",{className:ui,onClick:()=>{n({id:d})},children:e.jsxs(t.Row,{fullWidth:!0,alignItems:"center",children:[e.jsx(t.SVGIcon,{icon:r.MarkerPin,size:"md"}),e.jsx(t.Column,{gap:0,fullWidth:!0,children:i.isEmpty(a)?e.jsx(ci,{}):e.jsx(mi,{})}),e.jsx(t.SVGIcon,{icon:r.Edit,size:"sm"})]})})};var _i,Ei,vi;!function(e){e.SQUARE="SQUARE",e.CIRCLE="CIRCLE",e.RECTANGLE="RECTANGLE",e.RECTANGLE_VERTICAL="RECTANGLE_VERTICAL",e.SINGLE_AT_BAR="SINGLE_AT_BAR",e.OTHER="OTHER"}(_i||(_i={})),function(e){e.VACANT="VACANT",e.RESERVED="RESERVED",e.OCCUPIED="OCCUPIED",e.BLOCKED="BLOCKED",e.NEEDS_CLEANING="NEEDS_CLEANING",e.OUT_OF_SERVICE="OUT_OF_SERVICE",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e.NO_SHOW="NO_SHOW"}(Ei||(Ei={})),function(e){e.MAIN_HALL="MAIN_HALL",e.PRIVATE_DINING="PRIVATE_DINING",e.VIP_ROOM="VIP_ROOM",e.BANQUET_HALL="BANQUET_HALL",e.BAR_AREA="BAR_AREA",e.LOUNGE="LOUNGE",e.OPEN_KITCHEN="OPEN_KITCHEN",e.BOOTH_SECTION="BOOTH_SECTION",e.MEZZANINE="MEZZANINE",e.WINE_CELLAR="WINE_CELLAR",e.TERRACE="TERRACE",e.PATIO="PATIO",e.GARDEN="GARDEN",e.COURTYARD="COURTYARD",e.ROOFTOP="ROOFTOP",e.BALCONY="BALCONY",e.SIDEWALK="SIDEWALK",e.POOLSIDE="POOLSIDE",e.SMOKING_AREA="SMOKING_AREA",e.NON_SMOKING="NON_SMOKING",e.FAMILY_SECTION="FAMILY_SECTION",e.KIDS_AREA="KIDS_AREA",e.WAITING_AREA="WAITING_AREA",e.DANCE_FLOOR="DANCE_FLOOR"}(vi||(vi={}));var gi={};const hi=({preDefinedTable:r,tableOptions:n,selectedTableId:o,error:l,disableIfPreDefined:s,language:d,onChange:u})=>{const{t:c}=Qe("order",{language:d}),m=!i.isEmpty(r),p=a.useCallback(e=>{var t;u(Number(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)||null)},[u]);return e.jsxs(t.Column,{className:gi.table,fullWidth:!0,gap:.5,children:[e.jsx(t.Row,{fullWidth:!0,children:m&&s?e.jsx(t.Text,{variant:"bold",children:r.name}):e.jsx(t.Input,{name:"tableId",options:n,type:t.InputType.SELECT,className:gi.tableInput,value:o,onChange:p,isDisabled:m,fullWidth:!0,noMargin:!0,size:"small",placeholder:c("Select Table")})}),l&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:c(l)})]})},yi=()=>{const t=(()=>{const{tableId:e,tables:t}=S();return!e||i.isEmpty(t)?{}:t.find(t=>Number(t.id)===Number(e))||{}})(),a=(()=>{const{tables:e}=S();return e})(),{order:r,updateOrder:n,errors:o}=le(),l=Ee(),s=a.map(({id:e,name:t})=>({label:t,value:e}));return e.jsx(hi,{onChange:e=>n({tableId:e}),preDefinedTable:t,tableOptions:s,selectedTableId:null==r?void 0:r.tableId,error:null==o?void 0:o.tableId,language:l,disableIfPreDefined:!0})};var Ii="OrderMethods-module_container__KSwfa";const Ti=({orderTypes:a,orderType:i,size:r,onSelect:n})=>{const{t:o}=Qe("error"),l=e=>0===e?"right":e+1===a.length?"left":"bottom",s=a.reduce((a,r,n)=>r.isVisible?(a.push((({type:a,icon:r,title:n,isDisabled:s},d)=>({value:a,isDisabled:s,label:e.jsx(t.Tooltip,{hint:s?o("ORDER_TYPE_DISABLED_AT_THIS_TIME"):null,position:l(d),children:e.jsxs(t.Row,{gap:.5,flexWrap:"nowrap",children:[e.jsx(t.SVGIcon,{icon:r}),e.jsx(t.Text,{color:a!==i||s?"normal":"white",whiteSpace:"nowrap",children:n})]})})}))(r,n)),a):a,[]);return e.jsx("div",{className:Ii,children:e.jsx(t.MethodSelection,{methods:s,onSelect:n,selectedMethod:i,fullWidth:!0,size:r,gap:.5})})};var bi="OrderPaymentSummary-module_container__HF7-X",fi="OrderPaymentSummary-module_row__eikWa";const Ai=({textSize:a,totalPriceWithoutTax:r=0,totalPriceWithTax:n=0,deliveryFee:o=0,totalTax:l,currency:s,language:d,orderType:u})=>{const{t:c}=Qe("order",{language:d}),m=i.priceFormatter(r,s,d),p=i.priceFormatter(n,s,d),_=i.priceFormatter(l,s,d),E=i.priceFormatter(o,s,d);return e.jsxs(t.Column,{className:bi,fullWidth:!0,gap:0,children:[e.jsxs(t.Row,{justifyContent:"space-between",className:fi,children:[e.jsx(t.Text,{size:a,children:c("Items")}),e.jsx(t.Text,{size:a,children:m})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:fi,children:[e.jsx(t.Text,{size:a,children:c("Tax")}),e.jsx(t.Text,{size:a,children:_})]}),u===C.DELIVERY&&e.jsxs(t.Row,{justifyContent:"space-between",className:fi,children:[e.jsx(t.Text,{size:a,children:c("Delivery Fee")}),e.jsx(t.Text,{size:a,children:E})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:fi,children:[e.jsx(t.Text,{size:a,color:"bold",children:c("Total")}),e.jsx(t.Text,{size:a,color:"bold",children:p})]})]})},Pi=()=>{const a=Ee(),i=_e(),{order:{orderType:n,paymentMethod:o},updateOrder:l}=le(),{totalPriceWithTaxAndFees:s,totalPriceWithoutTax:d,totalTax:u}=lt(),{isOpen:c,isDelivering:m}=J(),{deliveryOrderEnabled:p,dineInOrderEnabled:_,pickupOrderEnabled:E,deliveryFeeAmount:v}=ee(),{t:g}=Qe("order"),h=[{type:C.DELIVERY,icon:r.Delivery,title:g("Delivery"),isDisabled:!m,isVisible:p},{type:C.DINE_IN,icon:r.Grid,title:g("Dine in"),isDisabled:!c,isVisible:_},{type:C.PICK_UP,icon:r.ShoppingBag,title:g("Pickup"),isDisabled:!c,isVisible:E}],y=[{value:N.CASH,label:g("Cash")},{value:N.CARD,label:g("Card")}];return e.jsxs(t.Column,{className:Ga,gap:1,children:[e.jsx(Ti,{orderTypes:h,orderType:n,size:"small",onSelect:e=>l({orderType:e})}),n===C.DELIVERY&&e.jsx(pi,{}),n===C.DINE_IN&&e.jsx(t.Padding,{paddingInline:1,fullWidth:!0,children:e.jsx(yi,{})}),e.jsx(t.Row,{className:Ya,children:y.map(({label:a,value:i})=>e.jsx(t.Input,{label:a,name:"paymentMethod",onChange:()=>l({paymentMethod:i}),checked:o===i,type:t.InputType.RADIO,size:"small",noMargin:!0},i))}),e.jsx(t.Accordion,{title:g("Order summary"),content:e.jsx(si,{isDisabled:!0}),fullWidth:!0,style:"no-shadow",noPadding:!0,headerPaddingInline:1,headerPaddingBlock:1,titleVariant:"h5"}),e.jsx(Ai,{textSize:"sm",totalPriceWithoutTax:d,totalPriceWithTax:s,totalTax:u,language:a,currency:i,deliveryFee:v,orderType:n})]})},Si=()=>{const{t:a}=Qe("order"),{trackingId:i}=le(),n=Ee(),o=D();return e.jsxs(t.Column,{className:Ga,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(t.SVGIcon,{icon:r.Check,size:"xxl",color:t.UIElementType.SUCCESS}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{variant:"h1",align:"center",children:a("Your Order is Completed!")})}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{align:"center",children:a("Thank you! We've received your order and it will be delivered shortly.")})}),e.jsx(t.Padding,{paddingInline:5,paddingBlock:2,fullWidth:!0,children:e.jsx(t.Link,{href:`https://${o}/${n}/order/${i}`,title:a("Track order"),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0,target:"_blank"})})]})},Di=()=>{const{isOrderOpen:r,orderItems:n}=le(),{orderStep:o,setOrderStep:l,resetOrder:s}=le(),d=a.useRef(null),{t:u}=Qe("order"),c=(()=>{const{order:e,orderStep:t}=le(),a=ut(),i=ct(),{t:r}=Qe("error");return t!==k.DETAILS?null:(null==e?void 0:e.orderType)?e.orderType===C.DELIVERY?i||a:null:r("NO_ORDER_TYPE")})(),m=!!c,p=te()&&(o===k.CART||m),_=i.isEmpty(n),E=()=>{s()};return r?e.jsx("div",{className:Fa,onClick:e=>{var t,a;(null===(a=null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.contains)||void 0===a?void 0:a.call(t,null==e?void 0:e.target))||E()},children:e.jsx(t.Drawer,{ref:d,onClose:E,isOpen:r,title:u("Your order"),onBack:o===k.CART?void 0:()=>{l(k.CART)},content:(()=>{switch(o){case k.DETAILS:return e.jsx(Pi,{});case k.COMPLETED:return e.jsx(Si,{});default:return e.jsx(di,{})}})(),footer:e.jsx(Za,{isOrderItemsEmpty:_,orderError:c}),hasLargeFooter:p})}):null},xi={[l]:({params:i})=>{const{modalRef:r,note:n}=i,[o,l]=a.useState(n||""),{setModal:s}=t.useModalContext(),{updateOrder:d}=le(),{t:u}=Qe("order"),{t:c}=Qe("common");return e.jsx(t.Modal,{ref:r,header:e.jsx("div",{children:u("Add an order note")}),content:e.jsx("div",{className:Xe.container,children:e.jsx(t.Input,{type:t.InputType.TEXT_AREA,placeholder:u("Specify any allergies, special requests, or ingredients you want to add or remove"),value:o,onChange:e=>{var t;return l(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)}})}),footer:e.jsxs(t.Row,{justifyContent:"flex-end",children:[e.jsx(t.Button,{label:c("Cancel"),onClick:()=>s(null),type:t.UIElementType.DEFAULT,size:"md"}),e.jsx(t.Button,{label:c("Save"),onClick:()=>{d({note:o}),s(null)},size:"md"})]})})},[s]:({params:r})=>{const{t:n}=Qe("auth"),{t:o}=Qe("error"),{t:l}=Qe("common"),{setModal:s}=t.useModalContext(),{setOrderStep:d,getCustomer:u}=le(),[c,m]=a.useState({otp:"",email:""}),[p,_]=a.useState({}),[E,v]=a.useState(""),[h,y]=a.useState(tt.EMAIL),I=[tt.EMAIL,tt.OTP],{modalRef:T}=r,b=()=>{const e=I.indexOf(h),t=I[e+1];if(t)return y(t);d(k.DETAILS),s(null)},f=a.useCallback(e=>t=>{m(a=>Object.assign(Object.assign({},a),{[e]:t}))},[]);return e.jsx(t.Modal,{ref:T,title:n("Create an account or log in"),onClose:()=>s(null),content:e.jsxs(t.Column,{className:Je.content,fullWidth:!0,children:[!!E&&e.jsx(t.AlertBox,{message:o(E),type:"error",onClear:()=>v(""),inline:!0}),h===tt.OTP?e.jsx(mt,{address:c.email,errorMessage:null==p?void 0:p.otp,onChange:f("otp")}):e.jsx(pt,{onChange:f("email"),formErrors:p})]}),footer:e.jsx(t.Button,{label:l("Continue"),onClick:()=>j(void 0,void 0,void 0,function*(){v("");try{const a=((e,t)=>{const a={},{email:r,otp:n}=e||{};switch(t){case tt.OTP:r&&i.checkIsValidEmail(r)||(a.email="Invalid Email Address"),n&&6===n.length||(a.otp="Invalid OTP");break;case tt.EMAIL:r&&i.checkIsValidEmail(r)||(a.email="Invalid Email Address")}return a})(c,h);if(!i.isEmpty(a))return _(a);switch(_({}),h){case tt.OTP:{const a=yield(e=c.otp,t=c.email,j(void 0,void 0,void 0,function*(){return F("otp/verify",{otp:e,email:t})}));if(!(null==a?void 0:a.accessToken))throw new Error("SOMETHING_WRONG");g.saveAuthToken(a);break}case tt.EMAIL:{const e=yield(e=>j(void 0,void 0,void 0,function*(){return F("customer",{email:e})}))(c.email);if(200!==(null==e?void 0:e.status))throw new Error("SOMETHING_WRONG");break}}yield u(),b()}catch(e){v((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),H(e,{file:"src/components/PublicMenu/Modals/Auth/Auth.tsx",method:"handleSubmit",payload:c})}var e,t}),size:"lg",fullWidth:!0})})},[d]:({params:r})=>{const n=p[0].code,{getCustomer:o}=le(),l=Ee(),s=$(),{id:d,countryCode:u=n,cityName:c="",street:m="",houseNumber:_="",floor:E,additionalNumber:v="",instructions:g="",longitude:h,latitude:y,postCode:I}=et(),T={addressId:d,countryCode:u,cityName:c,street:m,houseNumber:_,additionalNumber:v,instructions:g,floor:E,latitude:y,longitude:h,postCode:I},{modalRef:b}=r,{t:f}=Qe("customer"),{t:A}=Qe("error"),{t:P}=Qe("common"),{setModal:S}=t.useModalContext(),[D,x]=a.useState(T),[C,O]=a.useState({}),[R,N]=a.useState(""),[k,L]=a.useState(!1),[M,w]=a.useState(!1),z=C.countryCode||C.cityName||C.street,U=rt(T.street,T.houseNumber,void 0),B=e=>{var t,a;const i=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.name,r=null===(a=null==e?void 0:e.target)||void 0===a?void 0:a.value;x(e=>{const t=Object.assign(Object.assign({},e),{[i]:r}),a=it(t);return O(a),t})},W=()=>S(null),V=a.useCallback(e=>{const t=Object.assign(Object.assign({},D),{countryCode:e.countryCode,cityName:e.cityName,street:e.street,houseNumber:e.houseNumber||"",latitude:e.lat,longitude:e.long,postCode:e.postCode}),a=it(t);x(t),O(a),w(!e.houseNumber)},[D]);return e.jsx(t.Modal,{ref:b,title:f("Update Delivery Address"),onClose:W,content:e.jsx("div",{className:_t.content,children:e.jsxs(t.Column,{fullWidth:!0,children:[!!R&&e.jsx(t.AlertBox,{message:A(R),type:"error",onClear:()=>N(""),inline:!0}),e.jsxs(t.Column,{fullWidth:!0,gap:.5,children:[e.jsx(t.AddressAutocomplete,{onSelect:V,language:l,origin:{lat:null==s?void 0:s.latitude,lng:null==s?void 0:s.longitude},noMargin:!0,defaultAdressText:U,placeHolder:f("Enter address"),inputLabel:f("Address")}),z&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:A(z)})]}),e.jsxs(t.Flex,{gap:1,children:[M&&e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"houseNumber",label:f("House No."),placeholder:"221B",type:t.InputType.TEXT,value:D.houseNumber,onChange:B,errorMessage:A(C.houseNumber)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"floor",label:f("Floor"),placeholder:"7",type:t.InputType.TEXT,value:D.floor,onChange:B,errorMessage:A(C.floor)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"additionalNumber",label:f("Additional number"),placeholder:"17",type:t.InputType.TEXT,value:D.additionalNumber,onChange:B,errorMessage:A(C.additionalNumber)})})]}),e.jsx(t.Input,{name:"instructions",placeholder:f("Example: Door code is 555"),label:f("Delivery Instructions"),type:t.InputType.TEXT,fullWidth:!0,value:D.instructions,onChange:B,errorMessage:A(C.instructions)})]})}),footer:e.jsx(t.Button,{label:P("Save"),onClick:()=>j(void 0,void 0,void 0,function*(){N("");try{const t=it(D);if(!i.isEmpty(t))return O(t);O({}),L(!0);const a=yield(e={address:D},j(void 0,void 0,void 0,function*(){return G("customer",e)}));if(200!==(null==a?void 0:a.status))throw new Error("SOMETHING_WRONG");o(),W()}catch(e){N((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),H(e,{file:"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx",method:"handleSubmit",payload:D})}finally{L(!1)}var e}),size:"lg",fullWidth:!0,isLoading:k})})},[u]:({params:a})=>{const{setModal:i}=t.useModalContext(),{t:r}=Qe("branch"),{modalRef:n,openingHours:o,deliveryHours:l}=a;return e.jsx(t.Modal,{ref:n,onClose:()=>i(null),content:e.jsx(yt,{openingHours:o,deliveryHours:l}),title:r("Opening Hours")})},[c]:({params:t})=>{const{product:r={},modalRef:n,closeModal:o}=t,l=(null==r?void 0:r.sellUnitType)===ot.WEIGHT||(null==r?void 0:r.sellUnitType)===ot.VOLUME?0:1,s=Ee(),d=_e(),{addToOrderEnabled:u}=ee(),{addProduct:c,updateProduct:m,removeAllProductVariants:p}=le(),[_,E]=a.useState(l),[v,g]=a.useState(!1),[h,y]=a.useState(null),[I,T]=a.useState(null),[b,f]=a.useState({}),{t:A}=Qe("order"),P=(({productId:e,variantId:t,selectedAddons:a})=>{var r;const{orderItems:n}=le();return i.isEmpty(n)||!e?0:(null===(r=n[z(e,t,a)])||void 0===r?void 0:r.quantity)||0})({productId:null==r?void 0:r.id,variantId:h,selectedAddons:b}),S=(e=>{const{orderItems:t}=le();return i.isEmpty(t)||!e?0:Object.values(t).filter(t=>t.productId===e).reduce((e,t)=>e+t.quantity,0)})(null==r?void 0:r.id),{name:D}=a.useMemo(()=>kt(r,s),[r,s]),x=v?0===_:1===_,C=a.useMemo(()=>A(v?0===_?"Remove from order":"Update order":"Add"),[v,_]),O=Te(null==r?void 0:r.id),R=Boolean(r.videoUrl);a.useEffect(()=>{j(void 0,void 0,void 0,function*(){E(P>0?P+1:l),g(P>0)})},[P,r,l]),a.useEffect(()=>{j(void 0,void 0,void 0,function*(){y(null),f({})})},[r]);const N=a.useCallback(e=>{T(e),setTimeout(()=>{T(null)},200)},[]),k=a.useCallback(()=>{var e;return(null===(e=null==r?void 0:r.variants)||void 0===e?void 0:e.length)>0&&!h?N("variant"):_<=0?N("quantity"):(v?m({product:r,quantity:_,variantId:h,selectedAddons:b}):(c({product:r,quantity:_,variantId:h,selectedAddons:b}),i.trackEvent(Qt,{name:D,quantity:_})),void(null==o||o()))},[c,o,N,v,D,r,_,b,h,m]),L=a.useCallback(e=>{-1===e&&x||E(t=>Math.max(0,t+e))},[x]),M=a.useCallback(({addonId:e,optionId:t,isSingle:a,isRemove:i=!1})=>{f(r=>{if(a)return Object.assign(Object.assign({},r),{[e]:t});const n=r[e]||[],o=i?n.filter(e=>e!==t):[...new Set([...n,t])];return Object.assign(Object.assign({},r),{[e]:o})})},[]);return e.jsx(Va,{modalRef:n,product:r,language:s,currency:d,selectedVariant:h,focusedSection:I,selectedAddons:b,isDecreaseDisabled:x,quantity:_,actionTitle:C,videoUrl:R?O:void 0,addToOrderEnabled:u,onClose:o,setSelectedVariant:y,onOptionSelect:M,adjustQuantity:L,onSubmit:k,removeAllProductVariants:p,productQuantityInOrderWithAllVariants:S,onQuantityChange:e=>E(e),isInPublicMenu:!0})}},ji=()=>{const{getCustomer:t}=le(),r=a.useRef(null),l=x(),s=ae(),d=Z()||s,u=Ie(),{url:c,domain:m}=ve();return a.useEffect(()=>{l||t()},[t,l]),i.isEmpty(u)?e.jsxs("div",{className:n,ref:r,children:[e.jsx($e,{}),d?e.jsx(pa,{containerRef:r}):e.jsx(Dt,{}),e.jsx(Tt,{size:"md",zIndex:10}),!!m&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:c,className:o,children:m})]}):e.jsx(Oa,{})};var Ci={};const Oi=({currentGoal:i,language:r,setGoal:n})=>{const{t:o}=Qe("events",{language:r}),l=a.useRef({}),s=e=>{switch(e){case Ht:return o("Scrolled to Category");case Yt:return o("Category Selected");case Kt:return o("Product Details");case Qt:return o("Product Added to Order");default:return""}},d=a.useCallback(e=>{var t,a;n(e),null===(a=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.close)||void 0===a||a.call(t)},[n]);return e.jsx(t.DropDown,{action:s(i),actionSize:"large",type:t.UIElementType.BORDERED_PRIMARY,closeRef:l,menu:e.jsx("div",{className:Ci.toolbarMenu,children:Zt.map(a=>e.jsx(t.DropDownMenuItem,{onClick:()=>d(a),children:s(a)},a))})})};var Ri,Ni,ki={container:"Pricing-module_container__86ns8",intervals:"Pricing-module_intervals__YOrns",interval:"Pricing-module_interval__perjd",active:"Pricing-module_active__BRQhl",plans:"Pricing-module_plans__hbRn5",plan:"Pricing-module_plan__pGWAl",title:"Pricing-module_title__rMUDX",price:"Pricing-module_price__TKBkb",originalPrice:"Pricing-module_originalPrice__klyhF",discountedPrice:"Pricing-module_discountedPrice__qS7GB",action:"Pricing-module_action__08XLt",benefits:"Pricing-module_benefits__OjGx8",moneyBack:"Pricing-module_moneyBack__iEpmd",benefit:"Pricing-module_benefit__-oBt1",hasRibbon:"Pricing-module_hasRibbon__siI3P",flexWide:"Pricing-module_flexWide__mXSDX",slidein:"Pricing-module_slidein__tTiof",fadeInOut:"Pricing-module_fadeInOut__rYI0L",heightAnimation:"Pricing-module_heightAnimation__WKFZx",fadein:"Pricing-module_fadein__HeFT0",floatAnimation:"Pricing-module_floatAnimation__1VcsO",bottomSheet:"Pricing-module_bottomSheet__v4vTu",slideRightToLeft:"Pricing-module_slideRightToLeft__GpKCA",rotation:"Pricing-module_rotation__2tW8V",pulse:"Pricing-module_pulse__lxgYz"};!function(e){e.APPETIZER="appetizer",e.MAIN_COURSE="mainCourse",e.CHEFS_SPECIAL="chefsSpecial",e.LIFETIME="lifeTime"}(Ri||(Ri={})),function(e){e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.CANCELLED="CANCELLED"}(Ni||(Ni={}));const Li={appetizer:{title:"Appetizer",price:{monthly:9,annually:7}},mainCourse:{title:"Main Course",price:{monthly:19,annually:15}},chefsSpecial:{title:"Chef's Special",price:{monthly:49,annually:39}},lifeTime:{title:"Lifetime",price:{monthly:49,annually:49},ribbonText:"Limited Time Only"}},Mi=[{title:"Smart QR Menu",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Link-in-bio",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Menu Analytics",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Unlimited Users",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Unlimited Products",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Unlimited Categories",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Unlimited Languages",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Product variants",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Product options",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Premium Support",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"SEO",[Ri.APPETIZER]:!0,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Sales reports",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Table Management",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Order Management",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Delivery Management",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!0,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Multiple Branches",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!1,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!0},{title:"Point of Sale (POS)",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!1,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!1},{title:"Mobile App for Owners & Staff",[Ri.APPETIZER]:!1,[Ri.MAIN_COURSE]:!1,[Ri.CHEFS_SPECIAL]:!0,[Ri.LIFETIME]:!1}],wi=({plan:a,language:r,interval:n,currency:o})=>{const{t:l}=Qe("pricing",{language:r}),{price:s,discountedPrice:d}=Li[a],u=s[n],c=a===Ri.LIFETIME?"/ lifetime":"/ month";return void 0!==d?e.jsxs(t.Column,{gap:0,children:[e.jsxs(t.Row,{children:[e.jsx("span",{className:ki.discountedPrice,children:i.priceFormatter(d,o,r)}),e.jsx("span",{className:ki.originalPrice,children:i.priceFormatter(u,o,r)})]}),e.jsx(t.Text,{size:"sm",children:l(c)})]}):e.jsxs(t.Row,{gap:.5,children:[e.jsx(t.Text,{size:"xxl",variant:"bold",children:i.priceFormatter(u,o,r)}),e.jsx(t.Text,{size:"sm",children:l(c)})]})};exports.Categories=Xt,exports.Events=({data:a,isLoading:i=!1,language:r,goal:n,setGoal:o})=>{const{t:l}=Qe("events",{language:r});return e.jsx(t.Card,{title:l("Events"),toolbar:e.jsx(Oi,{language:r,currentGoal:n,setGoal:o}),children:i?e.jsx(t.Loading,{}):e.jsx(t.BarChart,{data:a})})},exports.OrderFAB=ca,exports.OrderMethods=Ti,exports.OrderPaymentSummary=Ai,exports.OrderProvider=oe,exports.OrderTableUI=hi,exports.Pricing=({currency:n,language:o,isLoading:l=!1,onPlanSelect:s,onIntervalSelect:d})=>{const[u,c]=a.useState("annually"),{t:m}=Qe("pricing",{language:o}),p=[Ri.APPETIZER,Ri.MAIN_COURSE,Ri.CHEFS_SPECIAL],_=Boolean(s),E=_?"Choose Plan":"Try for free",v=({children:t,plan:a})=>{const{ribbonText:r}=Li[a],n=Boolean(r),d={className:i.classNames(ki,{plan:!0,hasRibbon:n}),"data-ribbon":m(r)};return s?e.jsx("div",Object.assign({},d,{onClick:()=>!l&&s(a),children:t})):e.jsx("a",Object.assign({},d,{href:y(o,`pricing-${a}`),target:"_blank",rel:"noreferrer noopener",children:t}))};return e.jsxs("div",{className:ki.container,children:[e.jsx("div",{className:ki.intervals,children:["annually","monthly"].map(t=>e.jsx("div",{className:i.classNames(ki,{interval:!0,active:u===t}),onClick:()=>(e=>{c(e),d&&d(e)})(t),children:m(t)},t))}),e.jsx("div",{className:ki.plans,children:p.map(a=>e.jsx(v,{plan:a,children:e.jsxs(t.Card,{children:[e.jsx("div",{className:ki.title,children:m(Li[a].title)}),e.jsx("div",{className:ki.price,children:e.jsx(wi,{plan:a,language:o,interval:u,currency:n})}),e.jsx("div",{className:ki.action,children:e.jsx(t.Button,{label:m(E),fullWidth:!0,size:"xl",type:a===Ri.MAIN_COURSE?t.UIElementType.PRIMARY:t.UIElementType.BORDERED_PRIMARY,onClick:()=>{},isLoading:l})}),e.jsxs("div",{className:ki.benefits,children:[!_&&e.jsxs(t.Row,{className:ki.moneyBack,gap:.5,children:[e.jsx(t.SVGIcon,{icon:r.ShieldDollar,size:"sm",color:t.UIElementType.SUCCESS}),e.jsx("span",{children:m("No credit card needed")})]}),Mi.map(i=>e.jsxs("div",{className:ki.benefit,children:[e.jsx(t.SVGIcon,{icon:i[a]?r.Check:r.Minus,size:"md"})," ",e.jsx("span",{children:m(i.title)})]},i.title))]})]})},a))})]})},exports.ProductDetailsUI=Va,exports.ProductsGridItem=la,exports.PublicMenu=({data:a})=>e.jsx(P,{value:a||{},children:e.jsx(oe,{children:e.jsxs(t.ModalProvider,{modalsMap:xi,children:[e.jsx(ji,{}),e.jsx(Di,{})]})})}),exports.Quantity=ka,exports.useOrderContext=le;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/ui"),a=require("react"),r=require("@sorocraft/js-utils"),n=require("@sorocraft/ui/icons"),i="PublicMenu-module_container__QLN6U",o="PublicMenu-module_footer__6G3DQ";const s="ADD_UPDATE_NOTES",l="AUTH",d="ADD_UPDATE_ADDRESS",u="BRANCH_BUSINESS_HOURS",c="PRODUCT_DETAILS",m=["en","az","nl","et","tr","ru","pl","pt","hr"],p=[{name:"Azerbaijan",code:"AZ",phoneCode:"+994"}],_="tabres.com",v=_,g="https://images.tabres.com",E=new r.Storage("tabres_cst_act","tabres_cst_rft"),h=(e,t)=>{const a=t||"en";return"localhost:3000"===e?{url:`http://localhost:3000/${a}`,domain:_}:{url:`https://${_}/${a}`,domain:_}},y=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"",I=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"https://images.tabres.com/no-photo-128.webp",b=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"https://images.tabres.com/tabres-doodle.webp",T=(e,t)=>{const a=parseInt(e.replace("#",""),16),r=(a>>16&255)/255,n=(a>>8&255)/255,i=(255&a)/255,o=Math.max(r,n,i),s=Math.min(r,n,i),l=(o+s)/2;let d=0,u=0;if(o!==s){const e=o-s;switch(u=l>.5?e/(2-o-s):e/(o+s),o){case r:d=(n-i)/e+(n<i?6:0);break;case n:d=(i-r)/e+2;break;case i:d=(r-n)/e+4}d/=6}const c=Math.max(0,Math.min(1,l+t/100)),m=(e,t,a)=>(a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e);let p=c,_=c,v=c;if(0!==u){const e=c<.5?c*(1+u):c+u-c*u,t=2*c-e;p=m(t,e,d+1/3),_=m(t,e,d),v=m(t,e,d-1/3)}const g=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${g(p)}${g(_)}${g(v)}`},f=a.createContext({}),D=({children:t,value:a})=>{var r,n,i,o,s,l,d,u,c,m,p,_,v,g,E,h,y,I,b,D;return e.jsx(f.Provider,{value:a,children:e.jsx("div",{style:{"--sorocraft-color-primary":null===(r=a.menuDesign)||void 0===r?void 0:r.primaryColor,"--sorocraft-color-primary-light":(null===(n=a.menuDesign)||void 0===n?void 0:n.primaryColor)&&T(a.menuDesign.primaryColor,37.5),"--sorocraft-color-primary-active":(null===(i=a.menuDesign)||void 0===i?void 0:i.primaryColor)&&T(a.menuDesign.primaryColor,-7.5),"--tabres-menu-category-background-color":null===(o=a.menuDesign)||void 0===o?void 0:o.categoryBackgroundColor,"--tabres-menu-category-text-color":null===(s=a.menuDesign)||void 0===s?void 0:s.categoryTextColor,"--tabres-menu-product-card-background-color":null===(l=a.menuDesign)||void 0===l?void 0:l.productCardBackgroundColor,"--tabres-menu-product-card-text-color":null===(d=a.menuDesign)||void 0===d?void 0:d.productCardTextColor,"--tabres-menu-product-card-description-text-color":null===(u=a.menuDesign)||void 0===u?void 0:u.productCardDescriptionTextColor,"--tabres-menu-product-card-volume-text-color":null===(c=a.menuDesign)||void 0===c?void 0:c.productCardVolumeTextColor,"--tabres-menu-product-card-price-text-color":null===(m=a.menuDesign)||void 0===m?void 0:m.productCardPriceTextColor,"--tabres-menu-product-card-block-padding":null===(p=a.menuDesign)||void 0===p?void 0:p.productCardBlockPadding,"--tabres-menu-category-title-font-size":null===(_=a.menuDesign)||void 0===_?void 0:_.categoryTitleFontSize,"--tabres-menu-product-name-font-size":null===(v=a.menuDesign)||void 0===v?void 0:v.productNameFontSize,"--tabres-menu-product-price-font-size":null===(g=a.menuDesign)||void 0===g?void 0:g.productPriceFontSize,"--tabres-menu-distance-between-category-title-and-products":null===(E=a.menuDesign)||void 0===E?void 0:E.distanceBetweenCategoryTitleAndProducts,"--tabres-menu-product-description-font-size":null===(h=a.menuDesign)||void 0===h?void 0:h.productDescriptionFontSize,"--tabres-menu-product-volume-font-size":null===(y=a.menuDesign)||void 0===y?void 0:y.productVolumeFontSize,"--tabres-menu-product-separator-color":null===(I=a.menuDesign)||void 0===I?void 0:I.productSeparatorColor,"--tabres-menu-page-background-color":null===(b=a.menuDesign)||void 0===b?void 0:b.menuPageBackgroundColor,"--tabres-menu-page-text-color":null===(D=a.menuDesign)||void 0===D?void 0:D.menuPageTextColor},children:t})})},A=()=>a.useContext(f),j=()=>{const{hostname:e}=A();return e||v},S=()=>{const{isInDashboard:e}=A();return e||!1};function O(e,t,a,r){return new(a||(a=Promise))(function(n,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}var x,P,C,k,R;"function"==typeof SuppressedError&&SuppressedError,function(e){e.DINE_IN="DINE_IN",e.PICK_UP="PICK_UP",e.DELIVERY="DELIVERY"}(x||(x={})),function(e){e.DRAFT="DRAFT",e.PENDING="PENDING",e.CONFIRMED="CONFIRMED",e.PREPARING="PREPARING",e.READY="READY",e.OUT_FOR_DELIVERY="OUT_FOR_DELIVERY",e.DELIVERED="DELIVERED",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e.FAILED="FAILED"}(P||(P={})),function(e){e.PENDING="PENDING",e.PREPARING="PREPARING",e.READY="READY",e.SERVED="SERVED"}(C||(C={})),function(e){e.CASH="CASH",e.CARD="CARD",e.WALLET="WALLET",e.TERMINAL="TERMINAL"}(k||(k={})),function(e){e.CART="CART",e.DETAILS="DETAILS",e.COMPLETED="COMPLETED"}(R||(R={}));const N={orderType:null,paymentMethod:k.CASH},L=[R.CART,R.DETAILS,R.COMPLETED],M={data:null,isLoading:!1,error:null};var w;!function(e){e.FIELD_REQUIRED_ERROR="This field is required",e.TABLE_NOT_SELECTED="Please select a table",e.ADDRESS_IS_EMPTY="Please enter an address",e.EMPTY_ITEMS="Please choose product",e.BRANCH_NOT_SELECTED="Please select a branch"}(w||(w={}));const z=e=>{var t,a;const{price:r,variant:n,addons:i,quantity:o}=e||{},s=null!==(a=null!==(t=null==n?void 0:n.price)&&void 0!==t?t:r)&&void 0!==a?a:0,l=(i||[]).reduce((e,t)=>e+((null==t?void 0:t.options)||[]).reduce((e,t)=>{var a;return e+(null!==(a=null==t?void 0:t.price)&&void 0!==a?a:0)},0),0);return(s+l)*(null!=o?o:1)},U=(e,t,a)=>{if(!e)throw new Error("Product ID is required");let n=`${e}`;t&&(n+=`-${t}`);const i=Object.entries(a||{}).map(([e,t])=>{if(!e||!t)return null;const a=Array.isArray(t)?r.sortNumbers(t).filter(Boolean).join("-"):`${t}`;return a?`${e}-${a}`:null}).filter(Boolean).join("-");return i&&(n+=`-${i}`),n},B=e=>{switch(e){case"customer":return w.ADDRESS_IS_EMPTY;case"tableId":return w.TABLE_NOT_SELECTED;case"items":return w.EMPTY_ITEMS;case"branchId":return w.BRANCH_NOT_SELECTED;default:return w.FIELD_REQUIRED_ERROR}},V="https://api.tabres.com/api/v2",W=new r.HttpClient({baseURL:V,headers:{"Content-Type":"application/json"},credentials:"include"});W.onRequest(e=>{const{accessToken:t=""}=E.getAuthToken();return e.headers.Authorization=t,e}),W.onResponse(e=>O(void 0,void 0,void 0,function*(){return yield e.json().catch(()=>null)}));const G=(...e)=>O(void 0,[...e],void 0,function*(e=null,t={}){try{return r.trackEvent("error",{message:null==e?void 0:e.message}),yield fetch(`${V}/log/client`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(Object.assign({message:(null==e?void 0:e.message)||JSON.stringify(e)},t))})}catch(e){console.error(e)}}),Y=(e,t)=>{var a;return null===(a=((null==e?void 0:e.days)||[]).find(({day:e})=>e===t))||void 0===a?void 0:a.hours},F=e=>(e||"").split(":").map(Number),H=e=>{if(!e)return!1;const t=new Date,[a,r]=F(e.openAt),[n,i]=F(e.closeAt),o=new Date(t);o.setHours(a,r,0,0);const s=new Date(t);return s.setHours(n,i,0,0),s<=o&&(t<s?o.setDate(o.getDate()-1):s.setDate(s.getDate()+1)),t>=o&&t<=s},K=()=>{const{branches:e}=A();return(e||[]).length<=1},q=()=>{const{branches:e,branchId:t}=A(),a=K();return r.isEmpty(e)?{}:a?e[0]:e.find(e=>e.id===Number(t))||{}},Q=()=>{const e=q();return{latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude}},$=()=>{const e=q(),{openingHours:t,deliveryHours:a}=e||{};if(!(null==t?void 0:t.days)||!(null==a?void 0:a.days))return{isOpen:!1,isDelivering:!1};const r=((new Date).getUTCDay()+6)%7,n=Y(t,r),i=Y(a,r);return{isOpen:H(n),isDelivering:H(i)}},Z=()=>{const e=q();return(null==e?void 0:e.settings)||{}},X=()=>{const e=Z();if(r.isEmpty(e))return!1;const{deliveryOrderEnabled:t,dineInOrderEnabled:a,pickupOrderEnabled:n}=e;return t||a||n},J=()=>{const{branchId:e}=A();return e},ee=()=>{const{onBranchSelect:e}=A();return e},te=({defaultOrderType:e,defaultPaymentMethod:t,defaultBranchId:a})=>{const r=(()=>{const{tableId:e}=A();return e})(),{isOpen:n,isDelivering:i}=$(),o=Z(),s=e||((e,t,a)=>{if(!e)return null;const{deliveryOrderEnabled:r,dineInOrderEnabled:n,pickupOrderEnabled:i}=e;return r&&a?x.DELIVERY:n&&t?x.DINE_IN:i&&t?x.PICK_UP:null})(o,n,i);return{branchId:a,orderType:s,tableId:r?Number(r):void 0,paymentMethod:t||k.CASH}},ae=a.createContext({order:N,orderStep:R.CART,orderItems:{},isOrderOpen:!1,customer:{},trackingId:"",errors:{},updateOrder:()=>{},setOrderStep:()=>{},addProduct:()=>{},updateProduct:()=>{},removeAllProductVariants:()=>{},setIsOrderOpen:()=>{},getCustomer:()=>{},resetOrder:()=>{},setTrackingId:()=>{},updateOrderErrors:()=>{},resetErrors:()=>{}}),re=({children:t,defaultOrderType:n,defaultPaymentMethod:i,defaultBranchId:o,isOrderDefaultOpen:s=!1})=>{const l=te({defaultOrderType:n,defaultPaymentMethod:i,defaultBranchId:o}),[d,u]=a.useState({}),[c,m]=a.useState(l),[p,_]=a.useState(R.CART),[v,g]=a.useState({}),[h,y]=a.useState(s),[I,b]=a.useState(""),[T,f]=a.useState({}),D=a.useCallback(e=>{m(t=>Object.assign(Object.assign({},t),e)),["branchId","tableId"].forEach(t=>{e[t]&&f(e=>(null==e?void 0:e[t])?Object.assign(Object.assign({},e),{[t]:null}):e)})},[]),A=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:n,note:i,isAddOperation:o})=>{if(r.isEmpty(e))return;const{id:s,variants:l,addons:d,price:u,listingPrice:c,sellUnitType:m}=e,p=null!=c?c:u,_=U(s,a,n);g(e=>{var u;const c=e[_],v=parseFloat((o?((null==c?void 0:c.quantity)||0)+t:t).toFixed(3));if(v<=0){const t=e,a=_;t[a];return function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}(t,["symbol"==typeof a?a:a+""])}const g=l.find(({id:e})=>e===a),E=((e=[],t={})=>Object.entries(t).map(([t,a])=>{const n=Number(t),i=Array.isArray(a)?a:[a],o=e.find(e=>e.id===n);if(r.isEmpty(o))return{addonId:n,options:[]};const s=(o.options||[]).filter(e=>i.includes(e.id)).map(e=>{var t;return{optionId:e.id,price:null!==(t=e.listingPrice)&&void 0!==t?t:e.price}});return{addonId:n,options:s}}))(d,n);return Object.assign(Object.assign({},e),{[_]:Object.assign(Object.assign({productId:s,quantity:v,price:p,note:i},!r.isEmpty(g)&&{variant:{variantId:g.id,price:null!==(u=g.listingPrice)&&void 0!==u?u:g.price}}),{addons:E,sellUnitType:m})})}),o&&f(e=>(null==e?void 0:e.items)?Object.assign(Object.assign({},e),{items:null}):e)},[]),j=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:r,note:n})=>A({product:e,quantity:t,variantId:a,selectedAddons:r,note:n,isAddOperation:!0}),[A]),S=a.useCallback(({product:e,quantity:t=1,variantId:a,selectedAddons:r,note:n})=>A({product:e,quantity:t,variantId:a,selectedAddons:r,note:n,isAddOperation:!1}),[A]),x=a.useCallback(e=>{e&&g(t=>{if(r.isEmpty(t))return t;return Object.entries(t).reduce((t,[a,r])=>(r.productId!==e&&(t[a]=r),t),{})})},[]),P=a.useCallback(()=>O(void 0,void 0,void 0,function*(){try{const{accessToken:e}=E.getAuthToken();if(!e)return;const t=yield O(void 0,void 0,void 0,function*(){return W.get("/customer")});if(!(null==t?void 0:t.id))throw new Error("SOMETHING_WENT_WRONG");u(t)}catch(e){G(e,{file:"src/store/order.tsx",method:"getCustomer"})}}),[]),C=a.useCallback((e=!1,t=!0)=>{t&&y(!1),(p===R.COMPLETED||e)&&(m(l),g({}),_(R.CART),b(""))},[l,p]),k=a.useCallback(e=>{f(t=>Object.assign(Object.assign({},t),{[e]:B(e)}))},[]),N=a.useCallback(()=>{f({})},[]),L=a.useMemo(()=>({order:c,orderStep:p,orderItems:v,isOrderOpen:h,customer:d,trackingId:I,errors:T,updateOrder:D,setOrderStep:_,addProduct:j,updateProduct:S,removeAllProductVariants:x,setIsOrderOpen:y,getCustomer:P,resetOrder:C,setTrackingId:b,updateOrderErrors:k,resetErrors:N}),[c,p,v,h,d,I,T,D,j,S,x,P,C,b,k,N]);return e.jsx(ae.Provider,{value:L,children:t})},ne=()=>a.useContext(ae);var ie,oe,se,le,de;!function(e){e.MAX_DELIVERY_DISTANCE="maxDeliveryDistance",e.DELIVERY_ORDER_ENABLED="deliveryOrderEnabled",e.PICKUP_ORDER_ENABLED="pickupOrderEnabled",e.DINE_IN_ORDER_ENABLED="dineInOrderEnabled",e.MIN_DELIVERY_AMOUNT="minDeliveryAmount",e.DELIVERY_FEE_AMOUNT="deliveryFeeAmount",e.SERVICE_CHARGE_ENABLED="serviceChargeEnabled",e.SERVICE_CHARGE_PERCENTAGE="serviceChargePercentage",e.ADD_TO_ORDER_ENABLED="addToOrderEnabled"}(ie||(ie={})),function(e){e.PERCENTAGE="percentage",e.FIXED_AMOUNT="fixed"}(oe||(oe={})),function(e){e.ENTIRE_MENU="entire_menu",e.CLASS="class"}(se||(se={})),function(e){e.DELIVERY="delivery",e.TAKEAWAY="takeaway",e.DINE_IN="dine_in",e.ALL="ALL"}(le||(le={})),function(e){e.MAX_DELIVERY_DISTANCE="maxDeliveryDistance",e.DELIVERY_ORDER_ENABLED="deliveryOrderEnabled",e.PICKUP_ORDER_ENABLED="pickupOrderEnabled",e.DINE_IN_ORDER_ENABLED="dineInOrderEnabled",e.MIN_DELIVERY_AMOUNT="minDeliveryAmount"}(de||(de={}));const ue=()=>{const{business:e}=A();return e||{}},ce=()=>{const{currency:e}=ue();return e||"AZN"},me=()=>{const{id:e}=ue();return e},pe=()=>{const{language:e}=A();return e||"en"},_e=()=>{const e=j(),t=pe();return a.useMemo(()=>h(e,t),[e,t])},ve=()=>{const{url:e}=_e(),t=(()=>{const{username:e}=ue();return e||""})();return a.useMemo(()=>`${e}/${t}`,[e,t])},ge=()=>{const{videoId:e}=A();return e},Ee=()=>{const{videos:e}=A();return a.useMemo(()=>e||[],[e])},he=()=>{const e=Ee(),t=ge();return a.useMemo(()=>t&&e.find(e=>e.productId===Number(t))||{},[e,t])};const ye=e=>{const t=ve(),a=J();let r=t;return a&&(r+=`/${a}`),e&&(r+=`/videos/${e}`),r},Ie=()=>{const e=(()=>{const e=Ee();return a.useMemo(()=>e[0],[e])})(),t=ye(null==e?void 0:e.productId);return r.isEmpty(e)?"":t};var be="BusinessHeader-module_container__X22c3",Te="BusinessHeader-module_cover__l-1W8",fe="BusinessHeader-module_content__sjiqO",De="BusinessHeader-module_logo__DWaaU",Ae="BusinessHeader-module_info__6RQFI",je="BusinessHeader-module_name__Ynpex",Se={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f",rotation:"Languages-module_rotation__gp8P5",pulse:"Languages-module_pulse__h9hxJ"};const Oe=()=>{const[r,n]=a.useState(!1),i=ue().languages||[],o=pe(),s=(()=>{const{onLanguageSelect:e}=A();return e})(),l=i.length>1,d=i.filter(({code:e})=>e!==o)||[],u=e=>`https://images.tabres.com/languages/${e}.svg`;return l?e.jsx("div",{className:Se.container,onClick:()=>n(!r),children:e.jsxs(t.Row,{alignItems:"center",gap:0,children:[e.jsx(t.Row,{alignItems:"center",className:t.classNames(Se,{options:!0,isOpen:r}),children:d.map(({code:t})=>e.jsx("img",{src:u(t),className:Se.option,onClick:()=>null==s?void 0:s(t),alt:t},t))}),e.jsx("img",{src:u(o),alt:o,className:Se.currentLanguage})]})}):null},xe=()=>{const{coverPhoto:a,avatar256:r,name:n}=ue();return e.jsxs("div",{className:be,children:[e.jsx("img",{src:b(a),alt:n,className:Te,width:1024,height:400}),e.jsx("div",{className:fe,children:e.jsxs(t.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:.5,className:be,children:[e.jsx("img",{src:I(r),alt:n,className:De,width:96,height:96}),e.jsx("div",{className:Ae,children:e.jsx(t.Text,{variant:"h1",color:"white",className:je,align:"center",children:n})})]})}),e.jsx(Oe,{})]})};var Pe="BranchHeader-module_container__Ol56f",Ce="BranchHeader-module_cover__DGWZX",ke="BranchHeader-module_content__O8E27",Re="BranchHeader-module_logo__DL7Si",Ne="BranchHeader-module_info__Ym-ln",Le="BranchHeader-module_name__91VkO",Me="BranchHeader-module_address__Y140r",we="BranchHeader-module_addressText__ofVQQ",ze="BackIcon-module_container__uknWc";const Ue=({onClick:a,size:r,theme:i})=>{const o=ve(),s=S(),l=ee();return e.jsx("div",{className:ze,onClick:a||(()=>{if(s)return null==l?void 0:l("");"undefined"!=typeof window&&(window.location.href=o)}),children:e.jsx(t.SVGIcon,{icon:n.ChevronLeft,size:r,theme:i})})};var Be="HeaderLinks-module_container__wfIXS",Ve="HeaderLinks-module_links__S5qXC",We="HeaderLinks-module_wifiPassword__j4cgP",Ge="HeaderLinks-module_businessHours__qVA-Q",Ye="HeaderLinks-module_icon__cQpBK",Fe={az:{error:{SOMETHING_WRONG:"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.",FIELD_REQUIRED:"Bu xananı doldurmaq mütləqdir","Unsupported country code":"Ölkə kodu düzgün deyil","Invalid OTP":"Təsdiq kodu düzgün deyil",INVALID_OTP:"Təsdiq kodu düzgün deyil",OTP_RATE_LIMIT_EXCEEDED:"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın","Invalid Email Address":"Email ünvanı düzgün deyil",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Bu funksiya mövcud tarif planınıza daxil deyil.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Bu sifariş növü aktiv deyil",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Bu sifariş növü indi aktiv deyil",COUNTRY_REQUIRED:"Ölkə daxil edilməlidir.",CITY_REQUIRED:"Şəhər daxil edilməlidir.",STREET_REQUIRED:"Küçə adı daxil edilməlidir.",STREET_NUMBER_REQUIRED:"Ev nömrəsi daxil edilməlidir.",OUT_OF_DELIVERY_RANGE:"Bu filial sizin ünvana çatdırılma etmir.",NO_ORDER_TYPE:"Zəhmət olmazsa, sifariş növünü seçin.",INVALID_ADDRESS:"Ünvan düzgün deyil"},common:{Save:"Yadda saxla",Cancel:"Ləğv et",Continue:"Davam et"},order:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et",Add:"Əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et","Add an order note":"Restoran üçün qeyd","Specify any allergies, special requests, or ingredients you want to add or remove":"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.","Your Order is Completed!":"Sifarişiniz tamamlandı!","Thank you! We've received your order and it will be delivered shortly.":"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.",Delivery:"Çatdırılma","Dine in":"Masaya",Pickup:"Al-apar",Cash:"Nağd","POS Terminal":"POS Terminal","Order summary":"Sifarişdəki məhsullar",Items:"Məhsullar",Tax:"Vergi",Total:"Cəm","Special instructions, allergies, etc.":"Xüsusi istəklər, allergiya və s.","Go to checkout":"Ödənişə keç","Place order":"Sifariş et",Continue:"Davam et","Not available":"Mövcud deyil","In order":"Sifarişdə","Product choices":"Seçimlər","Track order":"Sifarişi izlə","Minimum order amount for delivery is {{amount}}":"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır","This field is required":"Bu xana mütləq doldurulmalıdır","Please select a table":"Zəhmət olmazsa, masanı seçin","Please enter an address":"Zəhmət olmazsa, ünvanı daxil edin","Please choose product":"Zəhmət olmazsa, məhsul seçin",Table:"Masa","Select Table":"Masanı seçin",Card:"Kart ilə","Closed Now":"Hazırda bağlıdır","Delivery Fee":"Çatdırılma","Play video":"Videonu izlə"," / kg":" / kq"," / l":" / l"},customer:{"Unknown address":"Ünvan əlavə edilməyib","No address available":"Ünvan əlavə edilməyib","Update Delivery Address":"Çatdırılma ünvanını dəyişin",Country:"Ölkə",City:"Şəhər","Baker Street":"Nizami küçəsi",Address:"Ünvan","House number":"Ev nömrəsi","Additional number":"Mənzil","Example: Door code is 555":"Nümunə: Qapı kodu 555","Delivery Instructions":"Kuryer üçün təlimatlar",Floor:"Mərtəbə","Enter address":"Ünvanı daxil edin","House No.":"Ev nömrəsi"},auth:{"Create an account or log in":"Hesab yarat və ya daxil ol","Phone number":"Mobil nömrə","I don't have an email":"Email ünvanım yoxdur","We sent a confirmation code to {{address}}":"{{address}} üçün təsdiq kodunu göndərdik"},events:{Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Order":"Sifarişə əlavə edildi"},pricing:{"Get Started":"İndi başla","Choose Plan":"Planı seçin","Smart QR Menu":"Ağıllı QR Menyu","Link-in-bio":"Bio üçün link","Menu Analytics":"Menyu analitikası","Unlimited Products":"Limitsiz məhsul","Unlimited Categories":"Limitsiz kateqoriya","Product variants":"Məhsul variantları","Product options":"Məhsul əlavələri","Sales reports":"Satış hesabatı","24/7 Support":"24/7 dəstək","Multiple Branches":"Şöbələr","Order Management":"Sifarişlərin idarə edilməsi","Table Management":"Masaların idarə edilməsi","Mobile App for Owners & Staff":"Rəhbərlik və ofisiantlar üçün Mobil tətbiq","Point of Sale (POS)":"POS-kassa","Delivery Management":"Çatdırılmaların idarə edilməsi","Third-Party Delivery Integrations":"Çatdırılma partnyorlarının inteqrasiyası","TabresPay with Mobile":"TabresPay ilə ödəniş","Event management":"Tədbirlərin idarəsi","Unlimited Users":"Limitsiz istifadəçi","/ month":"/ Ay",monthly:"Aylıq plan",annually:"İllik plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!","Unlimited Languages":"Limitsiz dil seçimi","30-day money-back guarantee":"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.","Limited Time Only":"Məhdud müddətə","/ lifetime":"/ birdəfəlik","Try for free":"Pulsuz yoxla","No credit card needed":"Kart tələb olunmur"},branch:{"WEEKDAY-0":"Bazar ertəsi","WEEKDAY-1":"Çərşənbə axşamı","WEEKDAY-2":"Çərşənbə","WEEKDAY-3":"Cümə axşamı","WEEKDAY-4":"Cümə","WEEKDAY-5":"Şənbə","WEEKDAY-6":"Bazar",Closed:"Bağlıdır","Opening Hours":"İş saatları","Delivery Hours":"Çatdırılma saatları",Feedback:"Rəy bildir"}},en:{error:{SOMETHING_WRONG:"Something went wrong! Please try again later",FIELD_REQUIRED:"This field is required",INVALID_OTP:"Invalid OTP",OTP_RATE_LIMIT_EXCEEDED:"OTP limit has exceeded. Please try again later",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"This feature is not available for your current plan.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"This order type is not available for this business.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"This order type is not available right now.",COUNTRY_REQUIRED:"Country is required.",CITY_REQUIRED:"City is required.",STREET_REQUIRED:"Street is required.",STREET_NUMBER_REQUIRED:"Street number is required.",OUT_OF_DELIVERY_RANGE:"This branch doesn't deliver to your address.",NO_ORDER_TYPE:"Please select an order type.",INVALID_ADDRESS:"Invalid address"},common:{},order:{},customer:{},auth:{},events:{},pricing:{},branch:{"WEEKDAY-0":"Monday","WEEKDAY-1":"Tuesday","WEEKDAY-2":"Wednesday","WEEKDAY-3":"Thursday","WEEKDAY-4":"Friday","WEEKDAY-5":"Saturday","WEEKDAY-6":"Sunday"}},ru:{error:{SOMETHING_WRONG:"Что-то пошло не так! Пожалуйста, попробуйте позже",FIELD_REQUIRED:"Это поле обязательно для заполнения","Unsupported country code":"Неподдерживаемый код страны","Invalid OTP":"Неверный код подтверждения",INVALID_OTP:"Неверный код подтверждения",OTP_RATE_LIMIT_EXCEEDED:"Превышен лимит кодов. Попробуйте позже","Invalid Email Address":"Неверный адрес электронной почты",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Эта функция недоступна в вашем текущем тарифе.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Этот тип заказа недоступен для этого заведения.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Этот тип заказа сейчас недоступен.",COUNTRY_REQUIRED:"Страна обязательна.",CITY_REQUIRED:"Город обязателен.",STREET_REQUIRED:"Улица обязательна.",STREET_NUMBER_REQUIRED:"Номер дома обязателен.",OUT_OF_DELIVERY_RANGE:"Этот филиал не доставляет по вашему адресу.",NO_ORDER_TYPE:"Пожалуйста, выберите тип заказа.",INVALID_ADDRESS:"Неверный адрес"},common:{Save:"Сохранить",Cancel:"Отменить",Continue:"Продолжить"},order:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ",Add:"Добавить","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет продуктов","Add items":"Добавить продукты",Subtotal:"Итого",Events:"События","Product choices":"Варианты продукта","In order":"В заказе","Not available":"Не доступен","Specify any allergies, special requests, or ingredients you want to add or remove":"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.","Thank you! We've received your order and it will be delivered shortly.":"Спасибо! Мы получили ваш заказ и скоро доставим его.","Go to checkout":"Перейти к оплате","Add an order note":"Добавить примечание к заказу","Your Order is Completed!":"Ваш заказ завершен!",Delivery:"Доставка","Dine in":"На месте",Pickup:"Самовывоз",Cash:"Наличные","POS Terminal":"POS-терминал","Order summary":"Обзор заказа",Items:"Продукты",Tax:"Налог",Total:"Итого","Special instructions, allergies, etc.":"Особые инструкции, аллергии и т.д.","Place order":"Оформить заказ",Continue:"Продолжить","Track order":"Отследить заказ","Minimum order amount for delivery is {{amount}}":"Минимальная сумма заказа для доставки — {{amount}}","This field is required":"Это поле обязательно для заполнения","Please select a table":"Пожалуйста, выберите столик","Please enter an address":"Пожалуйста, введите адрес","Please choose product":"Пожалуйста, выберите продукт",Table:"Стол","Select Table":"Выбрать столик",Card:"Картой","Closed Now":"Сейчас закрыто","Delivery Fee":"Доставка","Play video":"Смотреть видео"},customer:{"Unknown address":"Неизвестный адрес","No address available":"Адрес не доступен","Update Delivery Address":"Обновить адрес доставки",Country:"Страна",City:"Город","Baker Street":"Улица Низами",Address:"Адрес","House number":"Номер дома","Additional number":"Квартира","Example: Door code is 555":"Пример: Код двери 555","Delivery Instructions":"Инструкции по доставке",Floor:"Этаж","Enter address":"Введите адрес","House No.":"Дом №"},auth:{"Create an account or log in":"Создайте аккаунт или войдите","Phone number":"Номер телефона","I don't have an email":"У меня нет электронной почты","We sent a confirmation code to {{address}}":"Мы отправили код подтверждения на {{address}}"},events:{Events:"События","Scrolled to Category":"Прокрутил до категории","Category Selected":"Категория выбрана","Product Details":"Детали продукта","Product Added to Order":"Продукт добавлен в заказ"},pricing:{"Get Started":"Начать","Choose Plan":"Выберите план","Smart QR Menu":"Умное меню по QR-коду","Link-in-bio":"Ссылка в био","Menu Analytics":"Аналитика меню","Unlimited Users":"Неограниченные пользователи","Unlimited Products":"Неограниченные продукты","Unlimited Categories":"Неограниченные категории","Product variants":"Варианты продуктов","Product options":"Дополнения к продукту","Sales reports":"Отчеты о продажах","24/7 Support":"24/7 техническая поддержка","Multiple Branches":"Многочисленные филиалы","Table Management":"Управление столами","Order Management":"Управление заказами","Mobile App for Owners & Staff":"Мобильное приложение для владельцев и персонала","Point of Sale (POS)":"POS-касса","Delivery Management":"Управление доставкой","Third-Party Delivery Integrations":"Интеграция со сторонними поставщиками","TabresPay with Mobile":"«TabresPay» с мобильного","Event management":"Управление мероприятиями","/ month":"/ месяц",monthly:"Ежемесячный план",annually:"Годовой план","Flexible Plans for Every Business - Simple Pricing, More Value!":"Тарифы для любого бизнеса - Простой прайс, больше возможностей!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!","Unlimited Languages":"Неограниченное количество языков","30-day money-back guarantee":"Гарантия возврата денег в течение 30 дней","Limited Time Only":"Только ограниченное время","/ lifetime":"/ разово","Try for free":"Попробуйте бесплатно","No credit card needed":"Кредитная карта не требуется"},branch:{"WEEKDAY-0":"Понедельник","WEEKDAY-1":"Вторник","WEEKDAY-2":"Среда","WEEKDAY-3":"Четверг","WEEKDAY-4":"Пятница","WEEKDAY-5":"Суббота","WEEKDAY-6":"Воскресенье",Closed:"Закрыто","Opening Hours":"Часы работы","Delivery Hours":"Время доставки"}},tr:{error:{SOMETHING_WRONG:"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin",FIELD_REQUIRED:"Bu alan zorunludur","Unsupported country code":"Desteklenmeyen ülke kodu","Invalid OTP":"Geçersiz doğrulama kodu",INVALID_OTP:"Geçersiz doğrulama kodu",OTP_RATE_LIMIT_EXCEEDED:"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin","Invalid Email Address":"Geçersiz e-posta adresi",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Bu özellik mevcut planınızda yer almıyor.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Bu sipariş türü bu işletmede aktif değil.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Bu sipariş türü şu anda aktif değil.",COUNTRY_REQUIRED:"Ülke zorunludur.",CITY_REQUIRED:"Şehir zorunludur.",STREET_REQUIRED:"Sokak adı zorunludur.",STREET_NUMBER_REQUIRED:"Bina numarası zorunludur.",OUT_OF_DELIVERY_RANGE:"Bu şube sizin adrese teslimat yapmıyor.",NO_ORDER_TYPE:"Lütfen bir sipariş türü seçin.",INVALID_ADDRESS:"Geçersiz adres"},common:{Save:"Kaydet",Cancel:"İptal et",Continue:"Devam et"},order:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle",Add:"Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte","Not available":"Mevcut değil","Specify any allergies, special requests, or ingredients you want to add or remove":"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.","Thank you! We've received your order and it will be delivered shortly.":"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.","Go to checkout":"Ödemeye geç","Add an order note":"Sipariş notu ekle","Your Order is Completed!":"Siparişiniz tamamlandı!",Delivery:"Teslimat","Dine in":"Masaya",Pickup:"Al götür",Cash:"Nakit","POS Terminal":"POS Terminali","Order summary":"Sipariş özeti",Items:"Ürünler",Tax:"Vergi",Total:"Toplam","Special instructions, allergies, etc.":"Özel talimatlar, alerjiler vb.","Place order":"Sipariş ver",Continue:"Devam et","Track order":"Siparişi takip et","Minimum order amount for delivery is {{amount}}":"Teslimat için minimum sipariş tutarı {{amount}} olmalı","This field is required":"Bu alan zorunludur","Please select a table":"Lütfen bir masa seçin","Please enter an address":"Lütfen bir adres girin","Please choose product":"Lütfen bir ürün seçin",Table:"Masa","Select Table":"Masa seçin",Card:"Kart ile","Closed Now":"Şu anda kapalı","Delivery Fee":"Teslimat ücreti","Play video":"Videoyu izle"},customer:{"Unknown address":"Bilinmeyen adres","No address available":"Adres mevcut değil","Update Delivery Address":"Teslimat adresini güncelle",Country:"Ülke",City:"Şehir","Baker Street":"Istiklal Caddesi",Address:"Adres","House number":"Ev numarası","Additional number":"Daire numarası","Example: Door code is 555":"Örnek: Kapı kodu 555","Delivery Instructions":"Teslimat talimatları",Floor:"Kat","Enter address":"Adres girin","House No.":"Ev No."},auth:{"Create an account or log in":"Hesap oluştur veya giriş yap","Phone number":"Telefon numarası","I don't have an email":"E-posta adresim yok","We sent a confirmation code to {{address}}":"{{address}} için doğrulama kodu gönderdik"},events:{Events:"Etkinlikler","Scrolled to Category":"Kategoriye kaydırıldı","Category Selected":"Kategori seçildi","Product Details":"Ürün Detayları","Product Added to Order":"Ürün siparişe eklendi"},pricing:{"Get Started":"Hemen Başla","Choose Plan":"Planı seçin","Smart QR Menu":"Akıllı QR Menü","Link-in-bio":"Bio için link","Menu Analytics":"Menü Analitiği","Unlimited Users":"Sınırsız kullanıcı","Unlimited Products":"Sınırsız ürün","Unlimited Categories":"Sınırsız kategori","Product variants":"Ürün çeşitleri","Product options":"Ürün seçenekleri","Sales reports":"Satış raporu","24/7 Support":"24/7 Teknik Destek","Multiple Branches":"Şube Yönetimi","Table Management":"Masa Yönetimi","Order Management":"Sipariş Yönetimi","Mobile App for Owners & Staff":"Patron ve Personel için Mobil Uygulama","Point of Sale (POS)":"POS Adisyon Sistemi","Delivery Management":"Paket sipariş yönetimi","Third-Party Delivery Integrations":"Üçüncü Parti Teslimat Entegrasyonları","TabresPay with Mobile":"Mobil ile TabresPay","Event management":"Etkinlik yönetimi","/ month":"/ Ay",monthly:"Aylık",annually:"Yıllık","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!","Unlimited Languages":"Sınırsız dil seçeneği","30-day money-back guarantee":"30 gün içinde memnun kalmazsanız, paranız iade.","Limited Time Only":"Sınırlı süreyle","/ lifetime":"/ tek seferlik","Try for free":"Ücretsiz dene","No credit card needed":"Kredi kartı gerekmez"},branch:{"WEEKDAY-0":"Pazartesi","WEEKDAY-1":"Salı","WEEKDAY-2":"Çarşamba","WEEKDAY-3":"Perşembe","WEEKDAY-4":"Cuma","WEEKDAY-5":"Cumartesi","WEEKDAY-6":"Pazar",Closed:"Kapalı","Opening Hours":"Çalışma saatleri","Delivery Hours":"Teslimat saatleri"}},nl:{error:{SOMETHING_WRONG:"Er is iets misgegaan! Probeer het later opnieuw",FIELD_REQUIRED:"Dit veld is verplicht","Unsupported country code":"Niet-ondersteunde landcode","Invalid OTP":"Ongeldige verificatiecode",INVALID_OTP:"Ongeldige verificatiecode",OTP_RATE_LIMIT_EXCEEDED:"Te veel pogingen. Probeer het later opnieuw","Invalid Email Address":"Ongeldig e-mailadres",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Deze functie is niet beschikbaar in je huidige pakket.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Dit type bestelling is niet beschikbaar bij dit bedrijf.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Dit besteltype is op dit moment niet beschikbaar.",COUNTRY_REQUIRED:"Land is verplicht.",CITY_REQUIRED:"Stad is verplicht.",STREET_REQUIRED:"Straat is verplicht.",STREET_NUMBER_REQUIRED:"Huisnummer is verplicht.",OUT_OF_DELIVERY_RANGE:"Deze vestiging bezorgt niet op jouw adres.",NO_ORDER_TYPE:"Selecteer een besteltype.",INVALID_ADDRESS:"Ongeldig adres"},common:{Save:"Opslaan",Cancel:"Annuleren",Continue:"Doorgaan"},order:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen",Add:"Toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling","Not available":"Niet beschikbaar","Specify any allergies, special requests, or ingredients you want to add or remove":"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.","Thank you! We've received your order and it will be delivered shortly.":"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.","Go to checkout":"Ga naar afrekenen","Add an order note":"Voeg een bestelopmerking toe","Your Order is Completed!":"Je bestelling is voltooid!",Delivery:"Levering","Dine in":"Ter plaatse",Pickup:"Meenemen",Cash:"Contant","POS Terminal":"POS Terminal","Order summary":"Bestellingsoverzicht",Items:"Items",Tax:"Belasting",Total:"Totaal","Special instructions, allergies, etc.":"Speciale instructies, allergieën, enz.","Place order":"Plaats bestelling",Continue:"Doorgaan","Track order":"Volg je bestelling","Minimum order amount for delivery is {{amount}}":"Minimale bestelbedrag voor bezorging is {{amount}}","This field is required":"Dit veld is verplicht","Please select a table":"Selecteer alstublieft een tafel","Please enter an address":"Vul alstublieft een adres in","Please choose product":"Kies alstublieft een product",Table:"Tafel","Select Table":"Kies tafel",Card:"Met je Betaalpas","Closed Now":"Nu gesloten","Delivery Fee":"Bezorgkosten","Play video":"Bekijk video"},customer:{"Unknown address":"Onbekend adres","No address available":"Geen adres beschikbaar","Update Delivery Address":"Werk het afleveradres bij",Country:"Land",City:"Stad","Baker Street":"Dam straat",Address:"Adres","House number":"Huisnummer","Additional number":"Appartementnummer","Example: Door code is 555":"Voorbeeld: Deurcode is 555","Delivery Instructions":"Leveringsinstructies",Floor:"Verdieping","Enter address":"Voer adres in","House No.":"Huis nr."},auth:{"Create an account or log in":"Maak een account aan of log in","Phone number":"Telefoonnummer","I don't have an email":"Ik heb geen e-mailadres","We sent a confirmation code to {{address}}":"We hebben een bevestigingscode gestuurd naar {{address}}"},events:{Events:"Gebeurtenissen","Scrolled to Category":"Gescrld naar categorie","Category Selected":"Categorie geselecteerd","Product Details":"Productdetails","Product Added to Order":"Product aan bestelling toegevoegd"},pricing:{"Get Started":"Start nu","Choose Plan":"Kies een plan","Smart QR Menu":"Slimme QR-menu","Link-in-bio":"Link-in-bio","Menu Analytics":"Menu analyse","Unlimited Products":"Onbeperkte producten","Unlimited Categories":"Onbeperkte categorieën","Unlimited Users":"Onbeperkte gebruikers","Product variants":"Productvarianten","Product options":"Productopties","Sales reports":"Verkooprapporten","24/7 Support":"24/7 ondersteuning","Multiple Branches":"Meerdere vestigingen","Table Management":"Tafelbeheer","Order Management":"Orderbeheer","Mobile App for Owners & Staff":"Mobiele app voor eigenaren en personeel","Point of Sale (POS)":"Kassasysteem (POS)","Delivery Management":"Leveringsbeheer","Third-Party Delivery Integrations":"Integraties van derden","TabresPay with Mobile":"TabresPay met mobiel","Event management":"Beheer van evenementen","/ month":"/ maand",monthly:"Maandelijks",annually:"Jaarlijks","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!","Unlimited Languages":"Onbeperkt aantal talen","30-day money-back guarantee":"30 dagen niet-goed-geld-terug garantie","Limited Time Only":"Beperkte tijd","/ lifetime":"/ eenmalig","Try for free":"Probeer gratis","No credit card needed":"Geen creditcard nodig"},branch:{"WEEKDAY-0":"Maandag","WEEKDAY-1":"Dinsdag","WEEKDAY-2":"Woensdag","WEEKDAY-3":"Donderdag","WEEKDAY-4":"Vrijdag","WEEKDAY-5":"Zaterdag","WEEKDAY-6":"Zondag",Closed:"Gesloten","Opening Hours":"Openingstijden","Delivery Hours":"Bezorgtijden"}},et:{error:{SOMETHING_WRONG:"Midagi läks valesti! Palun proovi hiljem uuesti",FIELD_REQUIRED:"See väli on kohustuslik","Unsupported country code":"Riigikood ei ole toetatud","Invalid OTP":"Vale kinnituskood",INVALID_OTP:"Vale kinnituskood",OTP_RATE_LIMIT_EXCEEDED:"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti","Invalid Email Address":"Vigane e-posti aadress",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"See funktsioon ei ole sinu praeguse paketiga saadaval.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"See tellimuse tüüp ei ole selles ettevõttes saadaval.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"See tellimuse tüüp ei ole praegu saadaval.",COUNTRY_REQUIRED:"Riik on kohustuslik.",CITY_REQUIRED:"Linn on kohustuslik.",STREET_REQUIRED:"Tänav on kohustuslik.",STREET_NUMBER_REQUIRED:"Maja number on kohustuslik.",OUT_OF_DELIVERY_RANGE:"See filiaal ei toimeta sellele aadressile.",NO_ORDER_TYPE:"Palun vali tellimuse tüüp.",INVALID_ADDRESS:"Vigane aadress"},common:{Save:"Salvesta",Cancel:"Tühista",Continue:"Jätka"},order:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele",Add:"Lisa","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses","Not available":"Ei ole saadaval","Specify any allergies, special requests, or ingredients you want to add or remove":"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.","Thank you! We've received your order and it will be delivered shortly.":"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.","Go to checkout":"Mine kassasse","Add an order note":"Lisa tellimuse märkus","Your Order is Completed!":"Teie tellimus on lõpetatud!",Delivery:"Kohaletoimetamine","Dine in":"Sööma jäämine",Pickup:"Eemaldamine",Cash:"Sularaha","POS Terminal":"POS terminal","Order summary":"Tellimuse kokkuvõte",Items:"Tooted",Tax:"Maks",Total:"Kokku","Special instructions, allergies, etc.":"Erisoovid, allergiad jne.","Place order":"Esita tellimus",Continue:"Jätka","Track order":"Jälgi tellimust","Minimum order amount for delivery is {{amount}}":"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}","This field is required":"See väli on kohustuslik","Please select a table":"Palun vali laud","Please enter an address":"Palun sisesta aadress","Please choose product":"Palun vali toode",Table:"Laud","Select Table":"Vali laud",Card:"Kaardiga","Closed Now":"Praegu suletud","Delivery Fee":"Kohaletoimetamise tasu","Play video":"Vaata videot"},customer:{"Unknown address":"Tundmatu aadress","No address available":"Aadress puudub","Update Delivery Address":"Uuenda kohaletoimetamise aadress",Country:"Riik",City:"Linn","Baker Street":"Nizami tänav",Address:"Aadress","House number":"Majanumber","Additional number":"Korteri number","Example: Door code is 555":"Näide: Uksekood on 555","Delivery Instructions":"Kohaletoimetamise juhised",Floor:"Põrand","Enter address":"Sisesta aadress","House No.":"Maja nr."},auth:{"Create an account or log in":"Loo konto või logi sisse","Phone number":"Telefoninumber","I don't have an email":"Mul ei ole e-posti aadressi","We sent a confirmation code to {{address}}":"Saatsime kinnituskoodi aadressile {{address}}"},events:{Events:"Sündmused","Scrolled to Category":"Keriti kategooriasse","Category Selected":"Kategooria valitud","Product Details":"Toote detailid","Product Added to Order":"Toode lisatud tellimusele"},pricing:{"Get Started":"Alustage","Choose Plan":"Vali plaan","Smart QR Menu":"Nutikas QR-menüü","Link-in-bio":"Link-in-bio","Menu Analytics":"Menüü Analüütika","Unlimited Products":"Piiramata tooted","Unlimited Categories":"Piiramata kategooriad","Product variants":"Tootevariandid","Product options":"Toote valikud","Sales reports":"Müügiaruanded","24/7 Support":"24/7 tugi","Multiple Branches":"Mitu filiaali","Table Management":"Tabelite haldamine","Order Management":"Tellimuste haldamine","Mobile App for Owners & Staff":"Mobiilirakendus omanikele ja töötajatele","Point of Sale (POS)":"Müügipunkt (POS)","Delivery Management":"Tarnejuhtimine","Third-Party Delivery Integrations":"Kolmanda osapoole tarneintegratsioonid","TabresPay with Mobile":"TabresPay koos mobiiliga","Event management":"Sündmuste haldamine","Unlimited Users":"Piiramatu arv kasutajaid","/ month":"/ kuus",monthly:"Igakuine",annually:"Igal aastal","Flexible Plans for Every Business - Simple Pricing, More Value!":"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!","Unlimited Languages":"Piiramatu arv keeli","30-day money-back guarantee":"30-päevane raha tagasi garantii","Limited Time Only":"Ainult piiratud ajaks","/ lifetime":"/ eluaegne","Try for free":"Proovi tasuta","No credit card needed":"Krediitkaarti pole vaja"},branch:{"WEEKDAY-0":"Esmaspäev","WEEKDAY-1":"Teisipäev","WEEKDAY-2":"Kolmapäev","WEEKDAY-3":"Neljapäev","WEEKDAY-4":"Reede","WEEKDAY-5":"Laupäev","WEEKDAY-6":"Pühapäev",Closed:"Suletud","Opening Hours":"Lahtiolekuajad","Delivery Hours":"Kohaletoimetamise ajad"}},pl:{error:{SOMETHING_WRONG:"Coś poszło nie tak! Spróbuj ponownie później.",FIELD_REQUIRED:"To pole jest wymagane","Unsupported country code":"Nieobsługiwany numer kierunkowy","Invalid OTP":"Nieprawidłowy kod weryfikacyjny",INVALID_OTP:"Nieprawidłowy kod weryfikacyjny",OTP_RATE_LIMIT_EXCEEDED:"Przekroczono limit kodów. Spróbuj ponownie za chwilę.","Invalid Email Address":"Nieprawidłowy adres e-mail",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Ta funkcja nie jest dostępna w Twoim obecnym planie.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Ten typ zamówienia nie jest dostępny w tym lokalu.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Ten typ zamówienia jest teraz niedostępny.",COUNTRY_REQUIRED:"Kraj jest wymagany.",CITY_REQUIRED:"Miasto jest wymagane.",STREET_REQUIRED:"Ulica jest wymagana.",STREET_NUMBER_REQUIRED:"Numer domu jest wymagany.",OUT_OF_DELIVERY_RANGE:"Ten lokal nie dostarcza pod Twój adres.",NO_ORDER_TYPE:"Wybierz typ zamówienia.",INVALID_ADDRESS:"Nieprawidłowy adres"},common:{Save:"Zapisz",Cancel:"Anuluj",Continue:"Dalej"},order:{"View order":"Zobacz zamówienie","Remove from order":"Usuń z zamówienia","Update order":"Zmień zamówienie","Add to order":"Dodaj do zamówienia",Add:"Dodaj","Your order":"Twoje zamówienie",Subtotal:"Suma","Empty order":"Puste zamówienie","You don't have any items in your order":"Nie masz jeszcze nic w zamówieniu","Add items":"Dodaj produkty","Add an order note":"Notatka dla restauracji","Specify any allergies, special requests, or ingredients you want to add or remove":"Napisz o alergiach, specjalnych prośbach lub składnikach, które chcesz dodać albo usunąć.","Your Order is Completed!":"Zamówienie przyjęte!","Thank you! We've received your order and it will be delivered shortly.":"Dziękujemy! Otrzymaliśmy Twoje zamówienie i niedługo je dostarczymy.",Delivery:"Dostawa","Dine in":"Na miejscu",Pickup:"Na wynos",Cash:"Gotówka","POS Terminal":"Terminal płatniczy","Order summary":"Podsumowanie zamówienia",Items:"Produkty",Tax:"Podatek",Total:"Razem","Special instructions, allergies, etc.":"Uwagi, alergie itp.","Go to checkout":"Przejdź do płatności","Place order":"Złóż zamówienie",Continue:"Dalej","Not available":"Niedostępne","In order":"W zamówieniu","Product choices":"Opcje","Track order":"Śledź zamówienie","Minimum order amount for delivery is {{amount}}":"Minimalna kwota zamówienia na dostawę to {{amount}}","This field is required":"To pole jest wymagane","Please select a table":"Wybierz stolik","Please enter an address":"Podaj adres","Please choose product":"Wybierz produkt",Table:"Stolik","Select Table":"Wybierz stolik",Card:"Kartą","Closed Now":"Teraz zamknięte","Delivery Fee":"Koszt dostawy","Play video":"Odtwórz wideo"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Adres nie został podany","No address available":"Brak adresu","Update Delivery Address":"Zmień adres dostawy",Country:"Kraj",City:"Miasto","Baker Street":"ul. Marszałkowska",Address:"Adres","House number":"Numer domu","Additional number":"Numer mieszkania","Example: Door code is 555":"Np. kod do drzwi: 555","Delivery Instructions":"Wskazówki dla kuriera",Floor:"Piętro","Enter address":"Wpisz adres","House No.":"Nr domu"},auth:{"Create an account or log in":"Załóż konto lub zaloguj się","Phone number":"Numer telefonu","I don't have an email":"Nie mam adresu e-mail","We sent a confirmation code to {{address}}":"Wysłaliśmy kod potwierdzający na {{address}}"},events:{Events:"Aktywność","Scrolled to Category":"Przewinięto do kategorii","Category Selected":"Wybrano kategorię","Product Details":"Szczegóły produktu","Product Added to Order":"Dodano do zamówienia"},pricing:{"Get Started":"Zacznij teraz","Choose Plan":"Wybierz plan","Smart QR Menu":"Inteligentne menu QR","Link-in-bio":"Link w bio","Menu Analytics":"Analityka menu","Unlimited Products":"Bez limitu produktów","Unlimited Categories":"Bez limitu kategorii","Product variants":"Warianty produktów","Product options":"Dodatki do produktów","Sales reports":"Raporty sprzedaży","24/7 Support":"Wsparcie 24/7","Multiple Branches":"Wiele lokali","Order Management":"Zarządzanie zamówieniami","Table Management":"Zarządzanie stolikami","Mobile App for Owners & Staff":"Aplikacja mobilna dla właścicieli i personelu","Point of Sale (POS)":"System kasowy (POS)","Delivery Management":"Zarządzanie dostawami","Third-Party Delivery Integrations":"Integracje z firmami kurierskimi","TabresPay with Mobile":"TabresPay na telefonie","Event management":"Zarządzanie wydarzeniami","Unlimited Users":"Bez limitu użytkowników","/ month":"/ mies.",monthly:"Plan miesięczny",annually:"Plan roczny","Flexible Plans for Every Business - Simple Pricing, More Value!":"Elastyczne plany dla każdego biznesu — proste ceny, więcej korzyści!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Wybierz plan, który pasuje do Twojego biznesu. Subskrybuj miesięcznie lub rocznie i oszczędzaj więcej!","Unlimited Languages":"Bez limitu języków","30-day money-back guarantee":"Gwarancja zwrotu pieniędzy w ciągu 30 dni.","Limited Time Only":"Oferta czasowa","/ lifetime":"/ jednorazowo","Try for free":"Wypróbuj za darmo","No credit card needed":"Bez karty kredytowej"},branch:{"WEEKDAY-0":"Poniedziałek","WEEKDAY-1":"Wtorek","WEEKDAY-2":"Środa","WEEKDAY-3":"Czwartek","WEEKDAY-4":"Piątek","WEEKDAY-5":"Sobota","WEEKDAY-6":"Niedziela",Closed:"Zamknięte","Opening Hours":"Godziny otwarcia","Delivery Hours":"Godziny dostawy",Feedback:"Zostaw opinię"}},pt:{error:{SOMETHING_WRONG:"Algo correu mal! Por favor, tente novamente mais tarde.",FIELD_REQUIRED:"Este campo é obrigatório","Unsupported country code":"Código de país não suportado","Invalid OTP":"Código de confirmação inválido",INVALID_OTP:"Código de confirmação inválido",OTP_RATE_LIMIT_EXCEEDED:"Excedeu o limite de códigos. Por favor, tente novamente mais tarde.","Invalid Email Address":"Endereço de e-mail inválido",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Esta funcionalidade não está disponível no seu plano.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Este tipo de pedido não está disponível para este estabelecimento.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Este tipo de pedido não está disponível de momento.",COUNTRY_REQUIRED:"O país é obrigatório.",CITY_REQUIRED:"A cidade é obrigatória.",STREET_REQUIRED:"A rua é obrigatória.",STREET_NUMBER_REQUIRED:"O número da porta é obrigatório.",OUT_OF_DELIVERY_RANGE:"Este estabelecimento não faz entregas para a sua morada.",NO_ORDER_TYPE:"Por favor, selecione um tipo de pedido.",INVALID_ADDRESS:"Morada inválida"},common:{Save:"Guardar",Cancel:"Cancelar",Continue:"Continuar"},order:{"View order":"Ver pedido","Remove from order":"Remover do pedido","Update order":"Atualizar pedido","Add to order":"Adicionar ao pedido",Add:"Adicionar","Your order":"O seu pedido",Subtotal:"Subtotal","Empty order":"Pedido vazio","You don't have any items in your order":"Ainda não tem itens no seu pedido","Add items":"Adicionar itens","Add an order note":"Adicionar nota ao pedido","Specify any allergies, special requests, or ingredients you want to add or remove":"Indique alergias, pedidos especiais ou ingredientes que queira adicionar ou retirar.","Your Order is Completed!":"O seu pedido está concluído!","Thank you! We've received your order and it will be delivered shortly.":"Obrigado! Recebemos o seu pedido e será entregue em breve.",Delivery:"Entrega","Dine in":"No local",Pickup:"Takeaway",Cash:"Dinheiro","POS Terminal":"Multibanco","Order summary":"Resumo do pedido",Items:"Itens",Tax:"Impostos",Total:"Total","Special instructions, allergies, etc.":"Instruções especiais, alergias, etc.","Go to checkout":"Finalizar pedido","Place order":"Confirmar pedido",Continue:"Continuar","Not available":"Indisponível","In order":"No pedido","Product choices":"Opções do produto","Track order":"Acompanhar pedido","Minimum order amount for delivery is {{amount}}":"O valor mínimo para entrega é {{amount}}","This field is required":"Este campo é obrigatório","Please select a table":"Por favor, selecione uma mesa","Please enter an address":"Por favor, introduza uma morada","Please choose product":"Por favor, escolha o produto",Table:"Mesa","Select Table":"Selecionar mesa",Card:"Cartão","Closed Now":"Fechado agora","Delivery Fee":"Taxa de entrega","Play video":"Ver vídeo"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Endereço não definido","No address available":"Sem endereço disponível","Update Delivery Address":"Atualizar endereço de entrega",Country:"País",City:"Cidade","Baker Street":"Rua da Liberdade",Address:"Morada","House number":"Número da porta","Additional number":"Andar / Apartamento","Example: Door code is 555":"Exemplo: Código da porta é 555","Delivery Instructions":"Instruções de entrega",Floor:"Piso","Enter address":"Introduzir morada","House No.":"Nº da porta"},auth:{"Create an account or log in":"Crie a sua conta ou entre","Phone number":"Número de telemóvel","I don't have an email":"Não tenho e-mail","We sent a confirmation code to {{address}}":"Enviámos um código de confirmação para {{address}}"},events:{Events:"Eventos","Scrolled to Category":"Navegou até à categoria","Category Selected":"Categoria selecionada","Product Details":"Detalhes do produto","Product Added to Order":"Produto adicionado ao pedido"},pricing:{"Get Started":"Começar agora","Choose Plan":"Escolher plano","Smart QR Menu":"Menu QR Inteligente","Link-in-bio":"Link na bio","Menu Analytics":"Análise do menu","Unlimited Products":"Produtos ilimitados","Unlimited Categories":"Categorias ilimitadas","Product variants":"Variantes de produto","Product options":"Opções de produto","Sales reports":"Relatórios de vendas","24/7 Support":"Suporte 24/7","Multiple Branches":"Vários estabelecimentos","Order Management":"Gestão de pedidos","Table Management":"Gestão de mesas","Mobile App for Owners & Staff":"App para gestores e equipa","Point of Sale (POS)":"Software de faturação (POS)","Delivery Management":"Gestão de entregas","Third-Party Delivery Integrations":"Integração com parceiros de entrega","TabresPay with Mobile":"TabresPay via Telemóvel","Event management":"Gestão de eventos","Unlimited Users":"Utilizadores ilimitados","/ month":"/ mês",monthly:"mensal",annually:"anual","Flexible Plans for Every Business - Simple Pricing, More Value!":"Planos flexíveis para cada negócio - Preços simples, mais valor!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Escolha o plano que melhor se adapta ao seu negócio. Adira mensal ou anualmente e poupe mais com os planos de longo prazo!","Unlimited Languages":"Idiomas ilimitados","30-day money-back guarantee":"Garantia de reembolso de 30 dias","Limited Time Only":"Apenas por tempo limitado","/ lifetime":"/ vitalício","Try for free":"Experimentar grátis","No credit card needed":"Sem necessidade de cartão"},branch:{"WEEKDAY-0":"Segunda-feira","WEEKDAY-1":"Terça-feira","WEEKDAY-2":"Quarta-feira","WEEKDAY-3":"Quinta-feira","WEEKDAY-4":"Sexta-feira","WEEKDAY-5":"Sábado","WEEKDAY-6":"Domingo",Closed:"Fechado","Opening Hours":"Horário de funcionamento","Delivery Hours":"Horário de entrega",Feedback:"Dar opinião"}},hr:{error:{SOMETHING_WRONG:"Nešto je pošlo po zlu! Molimo pokušajte ponovno.",FIELD_REQUIRED:"Ovo polje je obavezno","Unsupported country code":"Nepodržani pozivni broj zemlje","Invalid OTP":"Nevažeći kod",INVALID_OTP:"Nevažeći kod",OTP_RATE_LIMIT_EXCEEDED:"Previše pokušaja. Molimo pričekajte malo i pokušajte ponovno.","Invalid Email Address":"Nevažeća adresa epošte",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Ova značajka nije dostupna u vašem planu.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Ova vrsta narudžbe trenutno nije omogućena.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Ova vrsta narudžbe trenutno nije dostupna.",COUNTRY_REQUIRED:"Država je obavezna.",CITY_REQUIRED:"Grad je obavezan.",STREET_REQUIRED:"Ulica je obavezna.",STREET_NUMBER_REQUIRED:"Kućni broj je obavezan.",OUT_OF_DELIVERY_RANGE:"Nažalost, nismo u mogućnosti dostaviti na vašu adresu.",NO_ORDER_TYPE:"Molimo odaberite vrstu narudžbe.",INVALID_ADDRESS:"Nevažeća adresa"},common:{Save:"Spremi",Cancel:"Odustani",Continue:"Nastavi"},order:{"View order":"Pregled narudžbe","Remove from order":"Ukloni iz narudžbe","Update order":"Ažuriraj narudžbu","Add to order":"Dodaj u narudžbu",Add:"Dodaj","Your order":"Vaša narudžba",Subtotal:"Međuzbroj","Empty order":"Prazna narudžba","You don't have any items in your order":"Vaša narudžba je prazna","Add items":"Dodajte stavke","Add an order note":"Dodaj napomenu","Specify any allergies, special requests, or ingredients you want to add or remove":"Navedite alergije, posebne želje ili sastojke koje želite dodati ili izbaciti","Your Order is Completed!":"Vaša narudžba je dovršena!","Thank you! We've received your order and it will be delivered shortly.":"Hvala vam! Primili smo vašu narudžbu i bit će vam dostavljena uskoro.",Delivery:"Dostava","Dine in":"Za stolom",Pickup:"Preuzimanje",Cash:"Gotovina","POS Terminal":"Kartica (POS)","Order summary":"Sažetak narudžbe",Items:"Stavke",Tax:"Porez",Total:"Ukupno","Special instructions, allergies, etc.":"Posebne upute, alergije itd.","Go to checkout":"Na plaćanje","Place order":"Naruči",Continue:"Nastavi","Not available":"Nije dostupno","In order":"U narudžbi","Product choices":"Opcije proizvoda","Track order":"Prati narudžbu","Minimum order amount for delivery is {{amount}}":"Minimalni iznos za dostavu je {{amount}}","This field is required":"Ovo polje je obavezno","Please select a table":"Molimo odaberite stol","Please enter an address":"Molimo unesite adresu","Please choose product":"Molimo odaberite proizvod",Table:"Stol","Select Table":"Odaberi stol",Card:"Kartica","Closed Now":"Trenutno zatvoreno","Delivery Fee":"Naknada za dostavu","Play video":"Pogledaj video"," / kg":" / kg"," / l":" / l"},customer:{"Unknown address":"Nepoznata adresa","No address available":"Adresa nije dostupna","Update Delivery Address":"Ažurirajte adresu dostave",Country:"Država",City:"Grad","Baker Street":"Ulica",Address:"Adresa","House number":"Kućni broj","Additional number":"Dodatni broj / Stan","Example: Door code is 555":"Primjer: Kod za vrata je 555","Delivery Instructions":"Upute za dostavu",Floor:"Kat","Enter address":"Unesite adresu","House No.":"Kućni br."},auth:{"Create an account or log in":"Izradite račun ili se prijavite","Phone number":"Broj telefona","I don't have an email":"Nemam e-poštu","We sent a confirmation code to {{address}}":"Poslali smo potvrdni kod na {{address}}"},events:{Events:"Događaji","Scrolled to Category":"Pomaknuto do kategorije","Category Selected":"Odabrana kategorija","Product Details":"Detalji proizvoda","Product Added to Order":"Proizvod dodan u narudžbu"},pricing:{"Get Started":"Započnite","Choose Plan":"Odaberite plan","Smart QR Menu":"Pametni QR jelovnik","Link-in-bio":"Link za bio","Menu Analytics":"Analitika jelovnika","Unlimited Products":"Neograničeno proizvoda","Unlimited Categories":"Neograničeno kategorija","Product variants":"Varijante proizvoda","Product options":"Dodaci proizvodima","Sales reports":"Izvještaji o prodaji","24/7 Support":"Podrška 24/7","Multiple Branches":"Više poslovnica","Order Management":"Upravljanje narudžbama","Table Management":"Upravljanje stolovima","Mobile App for Owners & Staff":"Mobilna aplikacija za vlasnike i osoblje","Point of Sale (POS)":"POS sustav (blagajna)","Delivery Management":"Upravljanje dostavom","Third-Party Delivery Integrations":"Integracije s dostavnim službama","TabresPay with Mobile":"TabresPay mobilno plaćanje","Event management":"Upravljanje događajima","Unlimited Users":"Neograničeno korisnika","/ month":"/ mj.",monthly:"Mjesečni plan",annually:"Godišnji plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Fleksibilni planovi za svaki posao - Jednostavne cijene, više vrijednosti!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Odaberite plan koji vam odgovara. Pretplatite se mjesečno ili godišnje i uštedite uz dugoročne planove!","Unlimited Languages":"Neograničeno jezika","30-day money-back guarantee":"Jamstvo povrata novca 30 dana","Limited Time Only":"Samo ograničeno vrijeme","/ lifetime":"/ doživotno","Try for free":"Isprobajte besplatno","No credit card needed":"Nije potrebna kartica"},branch:{"WEEKDAY-0":"Ponedjeljak","WEEKDAY-1":"Utorak","WEEKDAY-2":"Srijeda","WEEKDAY-3":"Četvrtak","WEEKDAY-4":"Petak","WEEKDAY-5":"Subota","WEEKDAY-6":"Nedjelja",Closed:"Zatvoreno","Opening Hours":"Radno vrijeme","Delivery Hours":"Vrijeme dostave",Feedback:"Povratne informacije"}}};const He=(e="common",t)=>{const a=pe(),r=(null==t?void 0:t.language)||a,{t:n}=((e,t)=>{try{const a=m.includes(e)?e:"en",r=Fe[a][t]||{};return{t:(e,t)=>{try{const a=r[e]||e;return t?Object.keys(t).reduce((e,a)=>e.replace(`{{${a}}}`,t[a]),a):a}catch(t){return console.error(t),e}}}}catch(e){return console.error(e),{t:e=>e}}})(r,e);return{t:n}},Ke=()=>{const{setModal:a}=t.useModalContext(),{t:i}=He("branch"),{phone:o,wifiPassword:s,whatsApp:l,telegram:d,openingHours:c,deliveryHours:m}=q(),{instagram:p,tiktok:_,facebook:v,username:g}=ue(),E=!r.isEmpty(null==c?void 0:c.days)||!r.isEmpty(null==m?void 0:m.days),h="dgkmenu"===g;return e.jsx("div",{className:Be,children:e.jsx("div",{className:Ve,children:e.jsx(t.Row,{gap:2,alignItems:"center",children:e.jsxs(t.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!o&&e.jsx(t.IconLink,{icon:n.Phone,href:`tel:+${o}`,size:"sm",shape:"circle",theme:"light"}),!!l&&e.jsx(t.IconLink,{icon:n.Whatsapp,href:`https://wa.me/${l}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!p&&e.jsx(t.IconLink,{icon:n.Instagram,href:p,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e.jsx(t.IconLink,{icon:n.Telegram,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!_&&e.jsx(t.IconLink,{icon:n.Tiktok,href:_,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!v&&e.jsx(t.IconLink,{icon:n.Facebook,href:v,size:"sm",shape:"circle",theme:"light",target:"_blank"}),h&&e.jsx(t.Tooltip,{hint:i("Feedback"),children:e.jsx(t.IconLink,{icon:n.MessageHeartSquare,href:"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform",size:"sm",shape:"circle",theme:"light",target:"_blank"})}),!!s&&e.jsx(t.Tooltip,{hint:s,children:e.jsx("div",{className:We,children:e.jsx(t.SVGIcon,{icon:n.Wifi,size:"sm",className:Ye})})}),E&&e.jsx("div",{className:Ge,onClick:()=>{a({id:u,params:{openingHours:c,deliveryHours:m}})},children:e.jsx(t.SVGIcon,{icon:n.Clock,size:"sm",className:Ye})})]})})})})},qe=()=>{const{coverPhoto:a,avatar256:r}=ue(),i=(()=>{const{business:e}=A(),t=q(),a=K(),r=(null==e?void 0:e.name)||"Tabres";return a?r:(null==t?void 0:t.name)?`${r} ${t.name}`:r})(),o=q().address||"",s=K(),{latitude:l,longitude:d}=Q(),u=`https://www.google.com/maps/place/${l},${d}`;return e.jsxs("div",{className:Pe,children:[e.jsx("img",{src:b(a),alt:i,className:Ce,width:1024,height:400}),e.jsx("div",{className:ke,children:e.jsxs(t.Column,{justifyContent:s?"flex-end":"space-between",fullHeight:!0,fullWidth:!0,gap:0,children:[!s&&e.jsx(Ue,{size:"lg",theme:"dark-theme"}),e.jsxs(t.Flex,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e.jsx(t.Flex.Item,{children:e.jsx("img",{src:I(r),alt:i,className:Re,width:96,height:96})}),e.jsx(t.Flex.Item,{shrink:!0,className:Ne,children:e.jsxs(t.Column,{gap:.5,children:[e.jsx(t.Text,{className:Le,variant:"h1",size:"xl",color:"white",weight:"bold",noMargin:!0,children:i}),e.jsx("a",{className:Me,href:u,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(t.Row,{alignItems:"center",gap:.5,children:[e.jsx(t.SVGIcon,{icon:n.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:we,children:o})]})})]})})]})]})}),e.jsx(Oe,{}),e.jsx(Ke,{})]})},Qe=()=>{const t=q();return K()||!r.isEmpty(t)?e.jsx(qe,{}):e.jsx(xe,{})};var $e={};var Ze={content:"Auth-module_content__1ATBc",terms:"Auth-module_terms__OH3th"};const Xe=()=>{var e,t;const{customer:a}=ne();return(null===(e=null==a?void 0:a.addresses)||void 0===e?void 0:e[(null===(t=null==a?void 0:a.addresses)||void 0===t?void 0:t.length)-1])||{}};var Je,et;!function(e){e.PHONE="PHONE",e.OTP="OTP",e.EMAIL="EMAIL"}(Je||(Je={})),function(e){e.HOME="HOME",e.WORK="WORK",e.TRAVEL="TRAVEL"}(et||(et={}));const tt=e=>{const t={},{countryCode:a,cityName:r,street:n,houseNumber:i}=e||{};return a||(t.countryCode="COUNTRY_REQUIRED"),r||(t.cityName="CITY_REQUIRED"),n||(t.street="STREET_REQUIRED"),i||(t.houseNumber="STREET_NUMBER_REQUIRED"),t},at=(e,t,a)=>[e,[t,a].filter(Boolean).join("/")].filter(Boolean).join(" ");var rt,nt;!function(e){e.LIST="list",e.GRID="grid"}(rt||(rt={})),function(e){e.PIECE="PIECE",e.WEIGHT="WEIGHT",e.VOLUME="VOLUME"}(nt||(nt={}));const it=()=>{const{orderItems:e}=ne();return Object.values(e||{}).reduce((e,t)=>e+z(t),0)},ot=(e={})=>{const t=me(),a=q(),r=pe(),{order:n}=ne(),i=(()=>{const{orderItems:e}=ne();return Object.values(e||{}).map(({productId:e,quantity:t,variant:a,addons:r,note:n,sellUnitType:i})=>({productId:e,quantity:t,variant:a,addons:r,note:n,sellUnitType:i}))})(),o=Xe(),s=(()=>{const{customer:e}=ne();return null==e?void 0:e.id})(),{workingDayId:l,tableId:d,employeeId:u,orderType:c,paymentMethod:m,note:p}=Object.assign(Object.assign({},n),e);return{branchId:null==a?void 0:a.id,businessId:t,workingDayId:l,tableId:d,customerId:s,customerAddressId:o.id,employeeId:u,orderType:c,language:r,items:i,paymentMethod:m,note:p}},st=()=>{const{orderItems:e}=ne();return Object.values(e||{}).reduce((e,t)=>e+(t.sellUnitType===nt.WEIGHT||t.sellUnitType===nt.VOLUME?1:t.quantity),0)},lt=()=>{const{t:e}=He("error"),t=Q(),n=Z().maxDeliveryDistance,{latitude:i,longitude:o}=Xe(),[s,l]=a.useState(null);return a.useEffect(()=>{const e=!!i&&!!o,a=!r.isEmpty(t);O(void 0,void 0,void 0,function*(){if(!e||!a)return l("INVALID_ADDRESS");try{const e=yield((e,t)=>O(void 0,void 0,void 0,function*(){const{spherical:a}=yield google.maps.importLibrary("geometry"),r=new google.maps.LatLng(e.latitude,e.longitude),n=new google.maps.LatLng(t.latitude,t.longitude);return a.computeDistanceBetween(r,n)}))(t,{latitude:i,longitude:o});l(!e||e>n?"OUT_OF_DELIVERY_RANGE":null)}catch(e){l("OUT_OF_DELIVERY_RANGE")}})},[i,o,t,n]),s?e(s):null},dt=()=>{const{t:e}=He("order"),t=pe(),a=ce(),n=Z().minDeliveryAmount;if(it()<n){return e("Minimum order amount for delivery is {{amount}}",{amount:r.priceFormatter(n,a,t)})}return null},ut=({address:a,errorMessage:r,onChange:n})=>{const{t:i}=He("auth"),{t:o}=He("error");return e.jsxs(t.Column,{gap:2,children:[e.jsx(t.Text,{fullWidth:!0,align:"center",color:"muted",children:i("We sent a confirmation code to {{address}}",{address:a})}),e.jsx(t.OTPInput,{onChangeOTP:e=>{queueMicrotask(()=>{n(e)})},errorMessage:r?o(r):void 0,inputMode:"numeric"})]})},ct=({formErrors:r,onChange:n})=>{const[i,o]=a.useState(""),{t:s}=He("error"),l=j(),d=pe(),{url:u}=h(l,d),c=a.useCallback(e=>{var t,a;const r=null!==(a=null===(t=e.target)||void 0===t?void 0:t.value)&&void 0!==a?a:"";o(r),n(r)},[n]);return e.jsxs(t.Column,{className:Ze.container,alignItems:"center",gap:0,children:[e.jsx(t.Input,{name:"email",type:t.InputType.EMAIL,placeholder:"Email",fullWidth:!0,value:i,onChange:c,errorMessage:r.email?s(r.email):void 0}),e.jsx("div",{className:Ze.terms,children:e.jsxs("div",{children:["By clicking the button above, you agree to our"," ",e.jsx("a",{href:`${u}/terms`,target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:`${u}/privacy`,target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})]})})]})};var mt={};var pt={},_t="HoursList-module_container__wYX5G",vt="HoursList-module_title__D7Q8u";const gt=({title:a,days:n})=>{const{t:i}=He("branch");return r.isEmpty(n)?null:e.jsxs(t.Column,{className:_t,gap:.5,fullWidth:!0,children:[a&&e.jsx(t.Text,{weight:"medium",className:vt,children:i(a)}),n.map(({day:a,hours:r})=>{const n=!r,o=n?i("Closed"):`${r.openAt} - ${r.closeAt}`;return e.jsxs(t.Row,{justifyContent:"space-between",fullWidth:!0,children:[e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",children:i(`WEEKDAY-${a}`)}),e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",color:n?t.UIElementType.DANGER:"normal",children:o})]},a)})]})},Et=({openingHours:a,deliveryHours:n})=>{const i=(null==a?void 0:a.days)||[],o=(null==n?void 0:n.days)||[],s=(()=>{const e=Z();return null==e?void 0:e.deliveryOrderEnabled})();return r.isEmpty(i)?null:e.jsxs(t.Column,{className:pt.container,gap:2,children:[e.jsx(gt,{days:i}),s&&e.jsx(gt,{title:"Delivery Hours",days:o})]})};var ht={container:"ScrollToTop-module_container__fY2Wr",visible:"ScrollToTop-module_visible__4c1xZ",flexWide:"ScrollToTop-module_flexWide__ISFJo",slidein:"ScrollToTop-module_slidein__ciJNw",fadeInOut:"ScrollToTop-module_fadeInOut__TVbp7",heightAnimation:"ScrollToTop-module_heightAnimation__ouHY-",fadein:"ScrollToTop-module_fadein__-3ySu",floatAnimation:"ScrollToTop-module_floatAnimation__6Gg6O",bottomSheet:"ScrollToTop-module_bottomSheet__XjARU",slideRightToLeft:"ScrollToTop-module_slideRightToLeft__YUoyD",rotation:"ScrollToTop-module_rotation__z-fUd",pulse:"ScrollToTop-module_pulse__59P93"};const yt=({size:i,zIndex:o=100})=>{const[s,l]=a.useState(!1),d=a.useCallback(()=>{const e=window.scrollY>100;e!==s&&l(e)},[s]);return a.useEffect(()=>(window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}),[d]),e.jsx("div",{className:r.classNames(ht,{container:!0,visible:s}),style:{zIndex:o},children:e.jsx(t.IconButton,{icon:n.ChevronUp,size:i,onClick:()=>{window.scrollTo({left:0,top:0,behavior:"smooth"})}})})};var It="Branches-module_branches__sOuoV",bt="Branches-module_container__Ppa6v",Tt={item:"BranchCard-module_item__Uowu3",content:"BranchCard-module_content__tua5H",info:"BranchCard-module_info__GWCyI",name:"BranchCard-module_name__3f4c-",address:"BranchCard-module_address__X2UdI",imageContainer:"BranchCard-module_imageContainer__cZcxc",image:"BranchCard-module_image__Wb44-",notAvailable:"BranchCard-module_notAvailable__hM-C5",noImage:"BranchCard-module_noImage__TnVYT",flexWide:"BranchCard-module_flexWide__Z8Ly-",slidein:"BranchCard-module_slidein__iNE--",fadeInOut:"BranchCard-module_fadeInOut__W8YYr",heightAnimation:"BranchCard-module_heightAnimation__xVD3c",fadein:"BranchCard-module_fadein__u5kBh",floatAnimation:"BranchCard-module_floatAnimation__X2M2D",bottomSheet:"BranchCard-module_bottomSheet__jQn-M",slideRightToLeft:"BranchCard-module_slideRightToLeft__7lAiW",rotation:"BranchCard-module_rotation__bTyhC",pulse:"BranchCard-module_pulse__4w1oB"};const ft=({children:t,id:a})=>{const r=ee(),n=ve();return r?e.jsx("div",{className:Tt.item,onClick:()=>r(a),children:t}):e.jsx("a",{href:`${n}/${a}`,className:Tt.item,children:t})},Dt=({branch:a})=>{const{id:i,address:o,coverPhoto:s,name:l}=a||{},d=`${ue().name} ${l}`;return e.jsx(ft,{id:i,children:e.jsxs("div",{className:r.classNames(Tt,{content:!0,noImage:!s}),children:[s&&e.jsx("div",{className:Tt.imageContainer,children:e.jsx("img",{src:b(s),alt:d,className:Tt.image,width:1024,height:400})}),e.jsxs(t.Column,{justifyContent:"flex-end",alignItems:"center",fullHeight:!0,className:Tt.info,gap:.5,children:[e.jsx(t.Text,{variant:"h2",className:Tt.name,align:"center",weight:"bold",size:"lg",noMargin:!0,color:"white",children:d}),e.jsxs(t.Row,{alignItems:"center",gap:.5,justifyContent:"center",fullWidth:!0,children:[e.jsx(t.SVGIcon,{icon:n.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:Tt.address,children:o})]})]})]})})},At=()=>{const a=(()=>{const{branches:e}=A();return e||[]})();return e.jsx("div",{className:It,children:e.jsx(t.Container,{className:bt,children:a.map(t=>e.jsx(Dt,{branch:t},t.id))})})};var jt={};const St=e=>{var t,a;return null!==(a=null!==(t=null==e?void 0:e.listingPrice)&&void 0!==t?t:null==e?void 0:e.price)&&void 0!==a?a:0},Ot=(e,t,a)=>{const n=St(e);return r.priceFormatter(n,t,a)};var xt;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(xt||(xt={}));const Pt=({product:e,quantity:t,language:a,currency:n,variantId:i,selectedAddons:o})=>{if(!e||0===Object.keys(e).length)return r.priceFormatter(0,n,a);const s=i?(e.variants||[]).find(({id:e})=>e===i):void 0,l=St(i?s:e),d=((e,t={})=>{let a=0;for(const r of(null==e?void 0:e.addons)||[]){const{id:e,selectType:n,options:i}=r;if(!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e],s=n===xt.SINGLE?[o]:o||[];for(const e of s){const t=(i||[]).find(({id:t})=>t===e);t&&(a+=St(t))}}return a})(e,o),u=(l+d)*t;return r.priceFormatter(u,n,a)},Ct=(e,t)=>{var a;return(null===(a=null==e?void 0:e.translations)||void 0===a?void 0:a[t])||{}},kt=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},Rt=e=>{var t;const{products:a}=A();return(null===(t=null==a?void 0:a.find)||void 0===t?void 0:t.call(a,({id:t})=>t===e))||{}},Nt=(e,t)=>{var a,r;return(null===(r=null===(a=null==e?void 0:e.translations)||void 0===a?void 0:a.find)||void 0===r?void 0:r.call(a,e=>e.language===t))||{}},Lt=()=>{const e=ve(),t=J();return t?`${e}/${t}`:e},Mt="digital_menu",wt=`${Mt}_category_select`,zt=`${Mt}_category_scroll`,Ut=`${Mt}_product_details`,Bt=`${Mt}_product_add_cart`,Vt=`${Mt}_product_view_changed`,Wt=[wt,zt,Ut,Bt];var Gt="Categories-module_categories__Hh8hl";const Yt=({categoryProductMap:n=[],language:i,selectedCategoryId:o,skipTracking:s=!1,onSelectCategory:l})=>{const d=a.useRef({}),u=a.useRef(null),c=a.useCallback(()=>{var e;const t=null===(e=null==d?void 0:d.current)||void 0===e?void 0:e[o];if(!t||!u.current)return;const a=u.current.clientWidth,r=t.offsetLeft-a/2+t.offsetWidth/2;u.current.scrollTo({left:r,behavior:"smooth"})},[o]);return a.useEffect(()=>{o&&c()},[o,c]),e.jsx("div",{className:Gt,children:e.jsx(t.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(u.current=e.current)},paddingInline:1,children:(n||[]).map(({id:a,translations:n})=>{const{name:u}=n.find(e=>e.language===i)||{};return e.jsx(t.CarouselItem,{children:e.jsx(t.Chip,{onClick:()=>((e,t)=>{e!==o&&(l(e),s||r.trackEvent(wt,{name:t}))})(a,u),type:t.UIElementType.BORDERED_PRIMARY,active:a===o,children:e.jsx("div",{ref:e=>{e&&(d.current[a]=e)},children:u})})},a)})})})};var Ft="Products-module_container__bF2LF",Ht="Products-module_view__l857X",Kt="Products-module_products__AoDrY",qt="Products-module_category__Sp7dE",Qt="Products-module_list__LH4v5",$t={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",volume:"ProductsListItem-module_volume__rcwdd",image:"ProductsListItem-module_image__h6Wbi",notAvailable:"ProductsListItem-module_notAvailable__TeMCr",addToOrder:"ProductsListItem-module_addToOrder__6KqZn",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26",rotation:"ProductsListItem-module_rotation__ZMvMz",pulse:"ProductsListItem-module_pulse__yy4Wc"};const Zt=({product:i,currency:o,language:s,onClick:l})=>{const{addProduct:d}=ne(),{image160:u,volume:c,available:m,sellUnitType:p,variants:_,addons:v}=i||{},{name:g,description:E}=a.useMemo(()=>Ct(i,s),[i,s]),h=a.useMemo(()=>Ot(i,o,s),[i,o,s]),{t:I}=He("order"),{addToOrderEnabled:b}=Z(),T=b&&m,f=(null==_?void 0:_.length)>0,D=(null==v?void 0:v.length)>0,A=p===nt.WEIGHT||p===nt.VOLUME||f||D,j=!!u;return e.jsxs("div",{className:r.classNames($t,{container:!0,isClickable:!!l,noImage:!j}),onClick:l,children:[e.jsxs(t.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:$t.info,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:$t.name,children:g}),e.jsx("p",{className:$t.description,children:E}),e.jsxs(t.Row,{className:$t.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:h}),!!c&&e.jsx("div",{className:$t.volume,children:c})]}),!m&&e.jsx(t.Text,{size:"xs",color:"danger",className:$t.notAvailableText,children:I("Not available")})]})}),j&&e.jsx("img",{src:y(u),alt:g||"menu",className:r.classNames($t,{image:!0,notAvailable:!m}),loading:"lazy",width:160,height:90})]}),T&&e.jsx("div",{className:$t.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),A&&l)return l();d({product:i}),r.trackEvent(Bt,{name:g,quantity:1})},icon:n.Plus,type:t.UIElementType.DEFAULT})})]})};var Xt={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",notAvailable:"ProductsGridItem-module_notAvailable__i4-HA",addToOrder:"ProductsGridItem-module_addToOrder__PhQhg",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",notAvailableText:"ProductsGridItem-module_notAvailableText__9G0yj",hasBackgroundColor:"ProductsGridItem-module_hasBackgroundColor__PnUA1",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5",rotation:"ProductsGridItem-module_rotation__npCfA",pulse:"ProductsGridItem-module_pulse__whBaS"};const Jt=({product:i,currency:o,language:s,defaultImage:l="",isDashboard:d=!1,backgroundColor:u,onClick:c,onAddProduct:m})=>{const{volume:p,image580:_,image160:v,image1024:g,available:E,sellUnitType:h,variants:I,addons:b}=i||{},T=_||g||v||l,{name:f,description:D}=a.useMemo(()=>Ct(i,s),[i,s]),A=a.useMemo(()=>Ot(i,o,s),[i,o,s]),{t:j}=He("order",{language:s}),{addToOrderEnabled:S}=Z(),O=S&&E,x=(null==I?void 0:I.length)>0,P=(null==b?void 0:b.length)>0,C=h===nt.WEIGHT||h===nt.VOLUME||x||P;return e.jsx("div",{className:Xt.container,children:e.jsxs("div",{className:r.classNames(Xt,{content:!0,isClickable:!!c,noImage:!T,hasBackgroundColor:!T&&Boolean(u)}),onClick:c,style:{backgroundColor:u},children:[T&&e.jsx("div",{className:Xt.imageContainer,children:e.jsx("img",{src:y(T),alt:f||"menu",className:r.classNames(Xt,{image:!0,notAvailable:!E}),loading:"lazy",width:580,height:326})}),e.jsx("div",{className:Xt.info,children:e.jsx("div",{className:Xt.data,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:Xt.name,children:f}),!d&&e.jsx("p",{className:Xt.description,children:D}),e.jsxs(t.Row,{className:Xt.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:A}),!!p&&e.jsx(t.Text,{color:"white",className:Xt.volume,children:p})]}),!E&&e.jsx(t.Text,{color:"white",size:"xs",className:Xt.notAvailableText,children:j("Not available")})]})})}),O&&e.jsx("div",{className:Xt.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),C&&c)return c();m({product:i}),r.trackEvent(Bt,{name:f,quantity:1})},icon:n.Plus,type:t.UIElementType.DEFAULT})})]})})},ea=({product:t,currency:a,language:r,onClick:n})=>{const{addProduct:i}=ne();return e.jsx(Jt,{onAddProduct:i,product:t,currency:a,language:r,onClick:n})},ta=a.memo(({categoryProductMap:i=[],currency:o,language:s,productBlocksRef:l,containerRef:d,onCategoryInView:u})=>{const[m,p]=a.useState(rt.LIST),{setModal:_}=t.useModalContext(),v=Ie(),g=[{icon:n.List,type:rt.LIST},{icon:n.Grid,type:rt.GRID}],E=e=>{const{name:t}=Ct(e,s);r.trackEvent(Ut,{name:t}),_({id:c,params:{product:e}})};return a.useEffect(()=>{const e=new IntersectionObserver(e=>{var t;const a=((null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let r=null,n=1/0;e.forEach(e=>{if(e.isIntersecting){const t=e.boundingClientRect,i=t.top+t.height/2,o=Math.abs(i-a);o<n&&(n=o,r=e.target.getAttribute("data-category-id"))}}),r&&u(Number(r))},{threshold:.1});return Object.entries(l.current||{}).forEach(([t,a])=>{a&&(a.setAttribute("data-category-id",t),e.observe(a))}),()=>{e.disconnect()}},[l,d,u]),e.jsxs("div",{className:Ft,children:[e.jsxs(t.Row,{className:Ht,alignItems:"center",children:[g.map(({icon:a,type:n})=>e.jsx(t.IconButton,{icon:a,onClick:()=>(e=>{p(e),r.trackEvent(Vt,{name:e})})(n),type:n===m?t.UIElementType.PRIMARY:t.UIElementType.DEFAULT},n)),!r.isEmpty(v)&&e.jsx("a",{href:v,children:e.jsx(t.IconButton,{icon:n.PlaySquare,onClick:()=>{},type:t.UIElementType.DEFAULT})})]}),e.jsx(t.Column,{gap:0,children:(i||[]).map(a=>{const{name:r}=Nt(a,s),{id:n,products:i}=a;return e.jsxs("div",{className:Kt,ref:e=>{e&&(l.current[n]=e)},"data-category-id":n,children:[e.jsx("h2",{className:qt,children:r}),e.jsx("div",{className:Qt,children:e.jsx(t.Column,{gap:0,children:(i||[]).map(t=>m===rt.GRID?e.jsx(ea,{product:t,currency:o,language:s,onClick:()=>E(t)},t.id):e.jsx(Zt,{product:t,currency:o,language:s,onClick:()=>E(t)},t.id))})})]},n)})})]})},(e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language);ta.displayName="Products";var aa={container:"OrderFAB-module_container__YeERy",count:"OrderFAB-module_count__7ZQN5",isVisible:"OrderFAB-module_isVisible__-0j7W",animate:"OrderFAB-module_animate__Wx4O-",pulse:"OrderFAB-module_pulse__yF8uk",isInPublicMenu:"OrderFAB-module_isInPublicMenu__qwIrS",flexWide:"OrderFAB-module_flexWide__FfcIV",slidein:"OrderFAB-module_slidein__dniBn",fadeInOut:"OrderFAB-module_fadeInOut__BhXGd",heightAnimation:"OrderFAB-module_heightAnimation__B-TR3",fadein:"OrderFAB-module_fadein__DO09i",floatAnimation:"OrderFAB-module_floatAnimation__gOJf0",bottomSheet:"OrderFAB-module_bottomSheet__NRqrj",slideRightToLeft:"OrderFAB-module_slideRightToLeft__O8uj3",rotation:"OrderFAB-module_rotation__dOOw-"};const ra=({totalCount:i,isVisible:o,onClick:s,isInPublicMenu:l=!1})=>{const d=a.useRef(null),u=a.useRef(!1),c=i%1==0?i:i.toFixed(2);return a.useEffect(()=>{if(!u.current)return;const e=d.current;e&&(e.classList.remove(aa.animate),e.offsetWidth,e.classList.add(aa.animate))},[i]),a.useEffect(()=>{u.current=!0},[]),e.jsxs("div",{className:r.classNames(aa,{container:!0,isVisible:o,isInPublicMenu:l}),onClick:s,ref:d,children:[e.jsx(t.SVGIcon,{icon:n.ShoppingBag,color:t.UIElementType.DEFAULT,size:"md"}),e.jsx("div",{className:aa.count,children:c})]})},na=({alwaysVisible:t=!1,isInPublicMenu:a=!1})=>{const r=st(),{setIsOrderOpen:n,isOrderOpen:i}=ne();return r<=0&&!t?null:e.jsx(ra,{totalCount:r,isVisible:!i,onClick:()=>n(!i),isInPublicMenu:a})},ia=({containerRef:t})=>{var n;const i=(()=>{const{products:e}=A();return e||[]})(),o=(()=>{const{categories:e}=A();return e||[]})(),s=pe(),l=ce(),d=((e,t)=>{const a=t.reduce((e,t)=>{if(!t.visible)return e;const a=Number(t.categoryId);return e[a]||(e[a]=[]),e[a].push(t),e},{});return e.map(e=>Object.assign(Object.assign({},e),{products:a[Number(e.id)]||[]})).filter(e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0})})(o,i),[u,c]=a.useState(null===(n=null==o?void 0:o[0])||void 0===n?void 0:n.id),m=a.useRef({}),p=a.useRef(!0),_=a.useCallback(e=>O(void 0,void 0,void 0,function*(){p.current=!1,c(e),(e=>{var t;const a=null===(t=null==m?void 0:m.current)||void 0===t?void 0:t[e];a&&(setTimeout(()=>{a.scrollIntoView({behavior:"smooth",block:"start"})},100),setTimeout(()=>{p.current=!0},1e3))})(e)}),[]),v=a.useCallback(e=>{if(!(null==p?void 0:p.current))return;const t=((e,t,a)=>{var n;const i=null===(n=null==t?void 0:t.find)||void 0===n?void 0:n.call(t,({id:t})=>t===e);if(r.isEmpty(i))return"";const{name:o}=Nt(i,a);return o||""})(e,o,s);r.trackEvent(zt,{name:t}),c(e)},[o,s]),g=a.useCallback(()=>O(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search),t=Number(e.get("category"));if(!t)return;const a=(o||[]).find(({id:e})=>e===t);r.isEmpty(a)||_(t)}),[o,_]);return a.useEffect(()=>{g()},[g]),e.jsxs("div",{className:jt.container,children:[e.jsx(Yt,{categoryProductMap:d,language:s,selectedCategoryId:u,onSelectCategory:_}),e.jsx(ta,{categoryProductMap:d,language:s,currency:l,productBlocksRef:m,containerRef:t,onCategoryInView:v}),e.jsx(na,{isInPublicMenu:!0})]})};var oa="VideoFeed-module_container__6tYYs",sa="VideoFeed-module_videos__6KjGc",la="Video-module_container__HT89i",da="Video-module_videoContainer__GE-7a",ua="Video-module_video__36hFc",ca="Video-module_top__SIvSk",ma="Video-module_actionIcon__F6Ze1",pa="Video-module_play__XCToT",_a="Video-module_bottom__DNzui",va="Video-module_actions__cOh-0",ga="Actions-module_container__K2DUX",Ea="Actions-module_action__u-Mvu",ha="Actions-module_animate__Y2p0y";const ya=({video:i})=>{const{setModal:o}=t.useModalContext(),{addProduct:s,setIsOrderOpen:l}=ne(),d=a.useRef(null),{productId:u,productName:m}=i||{},p=st(),_=Rt(u),{addToOrderEnabled:v}=Z(),{sellUnitType:g,variants:E,addons:h,available:y}=_,I=(null==E?void 0:E.length)>0,b=(null==h?void 0:h.length)>0,T=g===nt.WEIGHT||g===nt.VOLUME||I||b,f=v&&y,D=a.useCallback(()=>{o({id:c,params:{product:_}})},[_,o]),A=a.useCallback(()=>{if(T)return D();s({product:_}),r.trackEvent(Bt,{name:m,quantity:1})},[s,D,_,m,T]),j=[{icon:n.Eye,onClick:D},...f?[{icon:n.Plus,onClick:A}]:[],{icon:n.ShoppingBag,onClick:()=>l(!0),value:p,ref:d}];return a.useEffect(()=>{const e=d.current;e&&(e.classList.remove(ha),e.offsetWidth,e.classList.add(ha))},[p]),e.jsx(t.Column,{className:ga,fullWidth:!0,gap:.5,children:j.map(({icon:a,onClick:n,value:i,ref:o},s)=>e.jsxs(t.Column,{alignItems:"center",gap:.375,children:[e.jsx("div",{className:Ea,onClick:n,ref:o,children:e.jsx(t.SVGIcon,{icon:a,size:"md",color:t.UIElementType.DEFAULT})}),!r.isNil(i)&&e.jsx(t.Text,{size:"xs",weight:"bold",color:"white",fullWidth:!0,align:"center",children:i})]},s))})};var Ia={container:"VideoData-module_container__H-DjR",business:"VideoData-module_business__gYhgS",productName:"VideoData-module_productName__vBGba",businessName:"VideoData-module_businessName__refS2",description:"VideoData-module_description__LTbgV",noAvatar:"VideoData-module_noAvatar__ZwPv7",flexWide:"VideoData-module_flexWide__eoJyv",slidein:"VideoData-module_slidein__Rx56q",fadeInOut:"VideoData-module_fadeInOut__7WQqD",heightAnimation:"VideoData-module_heightAnimation__0aEX0",fadein:"VideoData-module_fadein__BB4dW",floatAnimation:"VideoData-module_floatAnimation__sbOmx",bottomSheet:"VideoData-module_bottomSheet__Ag-e1",slideRightToLeft:"VideoData-module_slideRightToLeft__-eS9s",rotation:"VideoData-module_rotation__77Eig",pulse:"VideoData-module_pulse__HMgCB"};const ba=({video:n})=>{const[i,o]=a.useState(!1),s=Lt();if(r.isEmpty(n))return null;const{businessAvatar:l,businessName:d,productName:u,productDescription:c,productPrice:m}=n,p=Boolean(l);return e.jsxs(t.Column,{className:r.classNames(Ia,{container:!0,noAvatar:!p}),gap:.75,fullWidth:!1,children:[e.jsxs("a",{className:Ia.business,href:s,children:[p&&e.jsx(t.Avatar,{source:y(l),size:"sm"}),e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{weight:"medium",color:"white",whiteSpace:"nowrap",className:Ia.productName,children:u}),e.jsx(t.Text,{color:"white",whiteSpace:"nowrap",className:Ia.businessName,weight:"light",children:d})]})]}),e.jsx(t.Text,{color:"white",className:Ia.price,children:m}),Boolean(c)&&e.jsx(t.Row,{onClick:()=>o(e=>!e),children:e.jsx(t.Text,{color:"white",size:"sm",whiteSpace:i?"wrap":"nowrap",className:Ia.description,children:c})})]})},Ta=({video:i,isActive:o=!1,shouldLoad:s=!1,isMuted:l=!0,registerVideo:d,setIsMuted:u})=>{const[c,m]=a.useState(!0),p=a.useRef(null),_=a.useRef(!1),v=Lt(),E=(e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"")(null==i?void 0:i.videoUrl),h=a.useCallback(()=>{var e;const t=p.current;t&&(t.paused?null===(e=t.play())||void 0===e||e.catch(()=>{}):t.pause(),m(t.paused))},[]),I=a.useCallback(()=>{_.current=!0},[]);return a.useEffect(()=>{var e;const t=p.current;t&&(s&&!t.src&&(t.muted=!0,t.playsInline=!0,t.src=E,t.load()),s&&o&&(null===(e=t.play())||void 0===e||e.catch(()=>{})),o||t.paused||t.pause(),!s&&t.src&&(t.pause(),t.removeAttribute("src"),t.load()),m(t.paused))},[s,o,E]),a.useEffect(()=>{p.current&&!c&&p.current.muted!==l&&(p.current.muted=l)},[l,c]),r.isEmpty(i)?null:e.jsx("div",{className:la,ref:e=>d(i.productId,e),children:e.jsxs("div",{className:da,children:[e.jsx("video",{ref:p,className:ua,muted:!0,autoPlay:!0,playsInline:!0,preload:"none",loop:!0,controlsList:"nodownload nofullscreen noplaybackrate",controls:!1,disablePictureInPicture:!0,poster:y(i.thumbnail),onClick:h,onPlay:I}),e.jsxs(t.Row,{className:ca,justifyContent:"space-between",children:[e.jsx("div",{className:ma,onClick:e=>{e.stopPropagation(),p.current&&_.current&&(p.current.muted=!p.current.muted,u(p.current.muted))},"data-testid":"mute-button",children:e.jsx(t.SVGIcon,{icon:l?n.VolumeX:n.VolumeMax,size:"md",color:t.UIElementType.DEFAULT})}),e.jsx("a",{className:ma,href:v,children:e.jsx(t.SVGIcon,{icon:n.Close,size:"md",color:t.UIElementType.DEFAULT})})]}),c&&e.jsx("div",{className:pa,children:e.jsx(t.SVGIcon,{icon:n.Play,size:"xxxl",color:t.UIElementType.DEFAULT})}),e.jsxs(t.Row,{className:_a,alignItems:"flex-end",gap:1,children:[e.jsx(ba,{video:i}),e.jsx(t.Column,{className:va,justifyContent:"flex-end",fullWidth:!1,fullHeight:!1,children:e.jsx(ya,{video:i})})]})]})})},fa=()=>{const[t,r]=a.useState(!0),n=he(),i=(()=>{const e=ge(),t=Ee();return a.useMemo(()=>t.filter(t=>t.productId!==Number(e)),[t,e])})(),o=a.useRef(null),{activeId:s,register:l}=function(e){const[t,r]=a.useState(null),n=a.useRef(new Map);return a.useEffect(()=>{const t=e.current;if(!t)return;let a;const i=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio)[0];t&&(cancelAnimationFrame(a),a=requestAnimationFrame(()=>{r(e=>{var a,r;const i=null!==(r=null===(a=[...n.current.entries()].find(([,e])=>e===t.target))||void 0===a?void 0:a[0])&&void 0!==r?r:null;return e===i?e:i})}))},{root:t,threshold:[.6,.75,1]});return n.current.forEach(e=>i.observe(e)),()=>{cancelAnimationFrame(a),i.disconnect()}},[e]),{activeId:t,register:(e,t)=>{t&&n.current.set(e,t)}}}(o);return e.jsx("div",{className:oa,children:e.jsxs("div",{className:sa,tabIndex:0,ref:o,children:[e.jsx(Ta,{video:n,registerVideo:l,isActive:s===n.productId,shouldLoad:!0,setIsMuted:r,isMuted:t}),i.map(a=>e.jsx(Ta,{video:a,registerVideo:l,isActive:s===a.productId,shouldLoad:s===a.productId,setIsMuted:r,isMuted:t},a.productId))]})})};var Da={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",media:"ProductDetails-module_media__Wy8ai",play:"ProductDetails-module_play__-4H6b",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",stickyBottom:"ProductDetails-module_stickyBottom__17IWN",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW"},Aa={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",focused:"Quantity-module_focused__Vfnh5",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk",rotation:"Quantity-module_rotation__dn0J8",pulse:"Quantity-module_pulse__6kl4q"};const ja=({isDecreaseDisabled:a=!1,quantity:i=1,size:o="md",focusedSection:s,onIncrease:l,onDecrease:d})=>e.jsxs(t.Row,{className:r.classNames(Aa,{container:!0,focused:"quantity"===s},[Aa[o]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:r.classNames(Aa,{quantityAction:!0,isDisabled:a}),onClick:d,children:e.jsx(t.SVGIcon,{icon:n.Minus})}),e.jsx("div",{className:Aa.quantityValue,children:i}),e.jsx("div",{className:Aa.quantityAction,onClick:l,children:e.jsx(t.SVGIcon,{icon:n.Plus})})]});var Sa="ProductInOrder-module_container__0N57G",Oa="ProductInOrder-module_title__TWjM9";const xa=({productId:a,quantity:r,isInPublicMenu:i=!0,language:o,removeAllProductVariants:s,onModalClose:l})=>{const{setIsOrderOpen:d}=ne(),{t:u}=He("order",{language:o});return r<=0?null:e.jsxs(t.Flex,{className:Sa,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(t.Flex.Item,{flex:1,className:Oa,children:[u("In order")," (",r,")"]}),e.jsx(t.Flex.Item,{flex:0,children:e.jsxs(t.Row,{children:[e.jsx(t.IconButton,{icon:n.Trash,onClick:()=>{s(a)},type:t.UIElementType.DANGER,tooltip:u("Remove from order")}),i&&e.jsx(t.IconButton,{icon:n.ShoppingBag,onClick:()=>{d(!0),l&&l()},type:t.UIElementType.SUCCESS,tooltip:u("View order")})]})})]})};var Pa={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ",rotation:"ProductVariants-module_rotation__iJPfC",pulse:"ProductVariants-module_pulse__xzh2J"};const Ca=({product:n,selectedVariant:i,focusedSection:o,language:s,currency:l,onSelectVariant:d})=>{const{t:u}=He("order",{language:s}),c=a.useRef(null),{variants:m}=n||{},p="variant"===o;return a.useEffect(()=>{p&&c.current&&c.current.scrollIntoView({behavior:"smooth"})},[o,p]),e.jsxs(t.Column,{className:r.classNames(Pa,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:Pa.variantsTitle,ref:c,children:u("Product choices")}),(m||[]).map(a=>{const{id:n}=a||{},o=kt(a,s),u=((e,t,a)=>{const n=St(e);return r.priceFormatter(n,t,a)})(a,l,s);return e.jsxs(t.Row,{justifyContent:"space-between",onClick:()=>d(n),className:Pa.variant,children:[e.jsx(t.Input,{label:o,name:"variant",onChange:()=>d(n),checked:i===n,type:t.InputType.RADIO,size:"small",noMargin:!0}),e.jsx("div",{className:Pa.variantPrice,children:u})]},n)})]})};var ka={container:"ProductAddons-module_container__DRnT7"};const Ra=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},Na=(e,t)=>{var a;return(null===(a=null==e?void 0:e.title)||void 0===a?void 0:a[t])||""},La=({product:a,selectedAddons:n,language:i,currency:o,onOptionSelect:s})=>{const{addons:l}=a||{};return e.jsx(t.Column,{className:ka.container,gap:1.5,fullWidth:!0,children:(l||[]).map(a=>{const{id:l,options:d,selectType:u}=a||{},c=Ra(a,i);return e.jsxs(t.Column,{children:[e.jsx(t.Text,{variant:"bold",children:c}),e.jsx(t.Column,{gap:1,fullWidth:!0,children:(d||[]).map(a=>{const{id:d}=a||{},c=((e,t,a)=>{const n=St(e);return r.priceFormatter(n,t,a)})(a,o,i),m=Na(a,i),p=u===xt.SINGLE,_=p?n[l]===d:(n[l]||[]).includes(d);return e.jsxs(t.Row,{justifyContent:"space-between",className:ka.option,children:[e.jsx(t.Input,{label:m,name:`option-${l}`,onChange:()=>s({addonId:l,optionId:d,isSingle:p,isRemove:!p&&_}),checked:_,type:p?t.InputType.RADIO:t.InputType.CHECKBOX,size:"small",noMargin:!0}),e.jsx("div",{className:ka.optionPrice,children:c})]},d)})})]},l)})})},Ma=({product:i,language:o,currency:s,selectedVariant:l,focusedSection:d,selectedAddons:u,isDecreaseDisabled:c,quantity:m,actionTitle:p,isInPublicMenu:_,productQuantityInOrderWithAllVariants:v,modalRef:g,videoUrl:E,addToOrderEnabled:h=!0,onClose:I,setSelectedVariant:b,onOptionSelect:T,adjustQuantity:f,onSubmit:D,removeAllProductVariants:A,onQuantityChange:j})=>{const{t:S}=He("order",{language:o}),{name:O,description:x}=a.useMemo(()=>Ct(i,o),[i,o]),P=a.useMemo(()=>Ot(i,s,o),[i,s,o]),C=a.useMemo(()=>(e=>{switch(e){case nt.WEIGHT:return" / kg";case nt.VOLUME:return" / l";default:return""}})(null==i?void 0:i.sellUnitType),[i]),k=a.useMemo(()=>Pt({product:i,quantity:m,language:o,currency:s,variantId:l,selectedAddons:u}),[i,m,o,s,l,u]),R=a.useMemo(()=>(e=>{switch(e){case nt.WEIGHT:return{"50gr":.05,"100gr":.1,"150gr":.15,"200gr":.2,"250gr":.25,"300gr":.3,"350gr":.35,"400gr":.4,"450gr":.45,"500gr":.5,"600gr":.6,"700gr":.7,"750gr":.75,"800gr":.8,"850gr":.85,"900gr":.9,"950gr":.95,"1kg":1,"2kg":2,"5kg":5,"10kg":10,"20kg":20};case nt.VOLUME:return{"50ml":.05,"100ml":.1,"150ml":.15,"200ml":.2,"250ml":.25,"300ml":.3,"350ml":.35,"400ml":.4,"450ml":.45,"500ml":.5,"600ml":.6,"700ml":.7,"750ml":.75,"800ml":.8,"850ml":.85,"900ml":.9,"950ml":.95,"1l":1,"2l":2,"5l":5,"10l":10,"20l":20};default:return{}}})(null==i?void 0:i.sellUnitType),[i]),N=a.useCallback(e=>{var t,a;(null===(a=null===(t=null==g?void 0:g.current)||void 0===t?void 0:t.contains)||void 0===a?void 0:a.call(t,null==e?void 0:e.target))||I&&I()},[g,I]);if(r.isEmpty(i))return null;const{image1024:L,volume:M,variants:w,addons:z,available:U,sellUnitType:B}=i,V=(null==w?void 0:w.length)>0,W=(null==z?void 0:z.length)>0,G=B===nt.WEIGHT||B===nt.VOLUME;return e.jsx("div",{className:Da.container,onClick:N,children:e.jsx(t.Modal,{onClose:I,ref:g,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:Da.content,children:[e.jsxs(t.Column,{gap:0,children:[e.jsxs("div",{className:Da.media,children:[L&&e.jsx("img",{src:y(L),width:1024,height:400,alt:O||"product",className:Da.image}),Boolean(E)&&e.jsxs("a",{href:E,className:Da.play,children:[e.jsx(t.SVGIcon,{icon:n.PlayCircle,color:t.UIElementType.DEFAULT}),e.jsx(t.Text,{color:"white",children:S("Play video")})]})]}),e.jsxs(t.Column,{className:Da.details,gap:1,children:[e.jsx("h2",{className:Da.name,children:O}),e.jsxs(t.Row,{justifyContent:"space-between",children:[e.jsxs("div",{className:Da.price,children:[P,Boolean(C)&&S(C)]}),e.jsx("div",{className:Da.volume,children:M})]}),e.jsx("div",{className:Da.description,children:x})]}),(V||W)&&e.jsxs(t.Column,{gap:0,className:Da.choices,children:[V&&e.jsx(Ca,{product:i,selectedVariant:l,focusedSection:d,language:o,currency:s,onSelectVariant:b}),W&&e.jsx(La,{product:i,selectedAddons:u,language:o,currency:s,onOptionSelect:T})]}),e.jsxs(t.Column,{gap:0,fullWidth:!0,className:Da.stickyBottom,children:[G&&e.jsx(t.Numpad,{onChange:j,value:m,shortcuts:R}),e.jsx(xa,{productId:null==i?void 0:i.id,onModalClose:I,isInPublicMenu:_,removeAllProductVariants:A,quantity:v,language:o})]})]}),e.jsx("div",{className:Da.close,children:e.jsx(t.IconButton,{onClick:I,icon:n.Close})})]}),footer:h?e.jsxs(t.Row,{className:Da.addToOrder,gap:.5,children:[e.jsx(ja,{focusedSection:d,isDecreaseDisabled:c,onDecrease:()=>f(-1),onIncrease:()=>f(1),quantity:m}),e.jsx(t.Button,{className:Da.addAction,label:U?e.jsxs(t.Row,{fullWidth:!0,justifyContent:"space-between",gap:.5,children:[e.jsx("span",{className:Da.actionTitle,children:p}),e.jsx("span",{children:k})]}):S("Not available"),onClick:D,size:"xl",fullWidth:!0,disabled:!U,paddingBlock:.5})]}):null})})};var wa="OrderDrawer-module_container__DymQj",za="OrderDrawer-module_content__khduX",Ua="OrderDrawer-module_paymentMethods__9i-sb",Ba="OrderDrawer-module_footer__8XfD9",Va="OrderDrawer-module_noteButton__M8BVx",Wa={container:"OrderStepper-module_container__GVnVU",count:"OrderStepper-module_count__u13tM",actionText:"OrderStepper-module_actionText__CZsVe",totalPrice:"OrderStepper-module_totalPrice__R9Mni",isClickable:"OrderStepper-module_isClickable__M3rWK",isLoading:"OrderStepper-module_isLoading__FkS16",isDisabled:"OrderStepper-module_isDisabled__xipwc",inDetails:"OrderStepper-module_inDetails__VdC2G",flexWide:"OrderStepper-module_flexWide__oIpQi",slidein:"OrderStepper-module_slidein__P6YJD",fadeInOut:"OrderStepper-module_fadeInOut__OVRav",heightAnimation:"OrderStepper-module_heightAnimation__bDpZh",fadein:"OrderStepper-module_fadein__526L2",floatAnimation:"OrderStepper-module_floatAnimation__rjwmv",bottomSheet:"OrderStepper-module_bottomSheet__777sc",slideRightToLeft:"OrderStepper-module_slideRightToLeft__UjVx6",rotation:"OrderStepper-module_rotation__PedNC",pulse:"OrderStepper-module_pulse__mOlOg"};const Ga=({actionText:a,isLoading:n=!1,isDisabled:i=!1,onClick:o})=>{const{orderStep:s}=ne(),l=st(),d=(()=>{const e=it(),t=pe(),a=ce();return r.priceFormatter(e,a,t)})(),u=s===R.DETAILS;return e.jsxs(t.Flex,{className:r.classNames(Wa,{container:!0,isLoading:n,isClickable:!!o,isDisabled:i,inDetails:u}),justifyContent:"space-between",alignItems:"center",onClick:n||i?null:o,children:[e.jsx(t.Flex.Item,{flex:1,children:e.jsxs(t.Row,{alignItems:"center",children:[e.jsx("div",{className:Wa.count,children:l}),e.jsx("div",{className:Wa.actionText,children:n?e.jsx(t.Loading,{}):a})]})}),!u&&e.jsx(t.Flex.Item,{className:Wa.totalPrice,flex:1,children:d})]})},Ya=({isOrderItemsEmpty:i=!1,orderError:o})=>{const{t:d}=He("order"),{t:u}=He("error"),{order:c,orderStep:m,orderItems:p,setOrderStep:_,setIsOrderOpen:v,setTrackingId:g,updateOrderErrors:E,resetErrors:h}=ne(),{setModal:y}=t.useModalContext(),I=X(),b=(()=>{const{customer:e}=ne();return e||{}})(),{isOpen:T,isDelivering:f}=$(),D=ot(),[A,j]=a.useState(!1),[S,P]=a.useState(""),C=null==c?void 0:c.note,k=!!C,N=I&&m===R.CART,M=T||f,w=!!o||!M,z=()=>O(void 0,void 0,void 0,function*(){try{P(""),j(!0);const e=yield(e=>O(void 0,void 0,void 0,function*(){return W.post("/customer/order",e)}))(D);return e.trackingId}catch(e){return P((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),G(e,{file:"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx",method:"handleSubmit"}),""}finally{j(!1)}}),U=I&&M?()=>O(void 0,void 0,void 0,function*(){if(r.isEmpty(b))return y({id:l});if(h(),m===R.DETAILS){if(c.orderType===x.DELIVERY&&r.isEmpty(null==b?void 0:b.addresses))return E("customer");if(c.orderType===x.DINE_IN&&!(null==c?void 0:c.tableId))return E("tableId");if(r.isEmpty(p))return E("items");const e=yield z();if(!e)return;g(e)}const e=(L.findIndex(e=>e===m)||0)+1;if(e>=L.length)return;const t=L[e];_(t)}):null;return e.jsxs(t.Column,{className:Ba,fullWidth:!0,children:[!!S&&e.jsx(t.AlertBox,{message:u(S),type:"error",onClear:()=>P("")}),!!o&&e.jsx(t.TextBanner,{text:o,type:t.UIElementType.DANGER,fullWidth:!0}),N&&e.jsx(t.Button,{label:k?e.jsx(t.Text,{children:c.note}):e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{children:d("Add an order note")}),e.jsx(t.Text,{size:"sm",color:"muted",children:d("Special instructions, allergies, etc.")})]}),onClick:()=>{y({id:s,params:{note:C}})},size:"xxxl",fullWidth:!0,type:t.UIElementType.LIGHT,className:Va,icon:k?n.Edit:n.Plus,iconSize:"md"}),i?e.jsx(t.Button,{label:d("Add items"),onClick:()=>v(!1),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):m!==R.COMPLETED?e.jsx(Ga,{actionText:d((()=>{if(!I)return"Subtotal";if(!M)return"Closed Now";switch(m){case R.CART:return"Go to checkout";case R.DETAILS:return"Place order";default:return"Continue"}})()),onClick:U,isLoading:A,isDisabled:w}):null]})};var Fa={},Ha="OrderListItem-module_container__Tj4RI",Ka="OrderListItem-module_image__o3PIC",qa="OrderListItem-module_data__BLzxw",Qa="OrderListItem-module_name__QEzuZ",$a="OrderListItem-module_price__-V2qL",Za="ProductQuantity-module_quantity__PzTpj";const Xa=({productId:t,variantId:a,min:r=1,size:n="md",selectedAddons:i,isDisabled:o=!1})=>{const s=(({productId:e,variantId:t,selectedAddons:a})=>{const{orderItems:r}=ne(),n=r[U(e,t,a)];return(null==n?void 0:n.quantity)||1})({productId:t,variantId:a,selectedAddons:i}),l=Rt(t),{updateProduct:d}=ne(),u=s===r;return o?e.jsx("div",{className:Za,children:s}):e.jsx(ja,{isDecreaseDisabled:u,onDecrease:()=>d({product:l,quantity:s-1,variantId:a,selectedAddons:i}),onIncrease:()=>d({product:l,quantity:s+1,variantId:a,selectedAddons:i}),quantity:s,size:n})},Ja=({item:a,product:n,language:i})=>e.jsx(e.Fragment,{children:(a.addons||[]).map(({addonId:a,options:o})=>{const s=((e,t)=>((null==e?void 0:e.addons)||[]).find(({id:e})=>e===t)||{})(n,a),l=((null==s?void 0:s.options)||[]).filter(e=>null==o?void 0:o.some(({optionId:t})=>t===e.id));if(r.isEmpty(s)||r.isEmpty(l))return null;const d=Ra(s,i),u=l.map(e=>Na(e,i)).filter(Boolean).join(", ");return d&&u?e.jsxs(t.Text,{color:"muted",size:"xs",children:[d,": ",u]},a):null})}),er=({item:n,isDisabled:i=!1})=>{var o;const{productId:s}=n||{},l=null===(o=null==n?void 0:n.variant)||void 0===o?void 0:o.variantId,d=(e=>{const t={};for(const{addonId:a,options:r=[]}of e.addons||[]){const e=r.map(({optionId:e})=>e);t[a]=1===e.length?e[0]:e}return t})(n),u=Rt(s),c=((e,t)=>{var a,r;return(null===(r=null===(a=null==e?void 0:e.variants)||void 0===a?void 0:a.find)||void 0===r?void 0:r.call(a,e=>e.id===t))||{}})(u,l),m=pe(),p=ce(),{image160:_}=u,v=kt(c,m),{name:g}=a.useMemo(()=>Ct(u,m),[u,m]),E=a.useMemo(()=>((e,t,a)=>{const n=z(e);return r.priceFormatter(n,t,a)})(n,p,m),[n,p,m]);return e.jsxs(t.Row,{className:Ha,gap:1,alignItems:"flex-start",children:[_&&e.jsx("img",{src:y(_),alt:g||"menu",className:Ka,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:qa,children:[e.jsx("div",{className:Qa,children:g}),e.jsxs(t.Column,{gap:0,children:[!!v&&e.jsx(t.Text,{color:"muted",size:"xs",children:v}),e.jsx(Ja,{item:n,product:u,language:m})]}),e.jsx("div",{className:$a,children:E})]}),e.jsx(Xa,{productId:s,variantId:l,selectedAddons:d,size:"sm",min:0,isDisabled:i})]})},tr=()=>{const{t:a}=He("order");return e.jsxs(t.Column,{className:Fa.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(t.Text,{variant:"h2",children:a("Empty order")}),e.jsx(t.Description,{text:a("You don't have any items in your order")})]})},ar=({isDisabled:t=!1})=>{const{orderItems:a}=ne(),n=r.isEmpty(a);return e.jsx("div",{className:Fa.container,children:n?e.jsx(tr,{}):e.jsx("div",{className:Fa.items,children:Object.entries(a||{}).map(([a,r])=>e.jsx(er,{item:r,isDisabled:t},a))})})},rr=()=>e.jsx("div",{className:za,children:e.jsx(ar,{})}),nr=a.createContext(M),ir=({children:t})=>{const{order:r,orderItems:n}=ne(),i=q(),o=me(),s=null==i?void 0:i.id,l=null==r?void 0:r.orderType,[d,u]=a.useState(M);return a.useEffect(()=>{const e=(e=>Object.entries(e||{}).map(([e,t])=>{var a;return Object.assign(Object.assign({orderItemsId:e,productId:t.productId,quantity:t.quantity},(null===(a=t.variant)||void 0===a?void 0:a.variantId)?{variant:{variantId:t.variant.variantId}}:{}),t.addons&&t.addons.length>0?{addons:t.addons.map(e=>({addonId:e.addonId,options:(e.options||[]).map(e=>({optionId:e.optionId}))}))}:{})}))(n);if(!o||!s||!l||0===e.length)return void u(M);const t=new AbortController;return u({data:null,isLoading:!0,error:null}),O(void 0,void 0,void 0,function*(){try{const n=yield(a={businessId:o,branchId:s,orderType:l,items:e},r=t.signal,W.post("/customer/order/calculate",a,{signal:r}));if(t.signal.aborted)return;if(!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"number"==typeof t.totalPriceWithoutTax&&"number"==typeof t.totalPriceWithTax&&"number"==typeof t.totalPriceWithTaxAndFees&&"number"==typeof t.totalTax&&"number"==typeof t.deliveryFee&&"number"==typeof t.serviceFee&&Array.isArray(t.items)&&Array.isArray(t.taxes)})(n))return void u({data:null,isLoading:!1,error:"We couldn't refresh order totals. Please try again."});u({data:n,isLoading:!1,error:null})}catch(e){if(t.signal.aborted)return;if("AbortError"===(null==e?void 0:e.name))return;u({data:null,isLoading:!1,error:"We couldn't refresh order totals. Please try again."})}var a,r}),()=>{t.abort()}},[]),e.jsx(nr.Provider,{value:d,children:t})};var or="CustomerAddress-module_container__TGYRV";const sr=()=>{const{t:a}=He("customer");return e.jsx(t.Text,{color:t.UIElementType.DANGER,children:a("No address available")})},lr=()=>{const a=Xe(),{t:r}=He("customer"),{additionalNumber:n,street:i,houseNumber:o,cityName:s,countryCode:l}=a,d=at(i,o,n),u=([s,l]||[]).filter(Boolean).join(", ");return e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{children:d||r("Unknown address")}),u&&e.jsx(t.Text,{size:"sm",color:"muted",children:u})]})},dr=()=>{const a=Xe(),{setModal:i}=t.useModalContext();return e.jsx("div",{className:or,onClick:()=>{i({id:d})},children:e.jsxs(t.Row,{fullWidth:!0,alignItems:"center",children:[e.jsx(t.SVGIcon,{icon:n.MarkerPin,size:"md"}),e.jsx(t.Column,{gap:0,fullWidth:!0,children:r.isEmpty(a)?e.jsx(sr,{}):e.jsx(lr,{})}),e.jsx(t.SVGIcon,{icon:n.Edit,size:"sm"})]})})};var ur,cr,mr;!function(e){e.SQUARE="SQUARE",e.CIRCLE="CIRCLE",e.RECTANGLE="RECTANGLE",e.RECTANGLE_VERTICAL="RECTANGLE_VERTICAL",e.SINGLE_AT_BAR="SINGLE_AT_BAR",e.OTHER="OTHER"}(ur||(ur={})),function(e){e.VACANT="VACANT",e.RESERVED="RESERVED",e.OCCUPIED="OCCUPIED",e.BLOCKED="BLOCKED",e.NEEDS_CLEANING="NEEDS_CLEANING",e.OUT_OF_SERVICE="OUT_OF_SERVICE",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e.NO_SHOW="NO_SHOW"}(cr||(cr={})),function(e){e.MAIN_HALL="MAIN_HALL",e.PRIVATE_DINING="PRIVATE_DINING",e.VIP_ROOM="VIP_ROOM",e.BANQUET_HALL="BANQUET_HALL",e.BAR_AREA="BAR_AREA",e.LOUNGE="LOUNGE",e.OPEN_KITCHEN="OPEN_KITCHEN",e.BOOTH_SECTION="BOOTH_SECTION",e.MEZZANINE="MEZZANINE",e.WINE_CELLAR="WINE_CELLAR",e.TERRACE="TERRACE",e.PATIO="PATIO",e.GARDEN="GARDEN",e.COURTYARD="COURTYARD",e.ROOFTOP="ROOFTOP",e.BALCONY="BALCONY",e.SIDEWALK="SIDEWALK",e.POOLSIDE="POOLSIDE",e.SMOKING_AREA="SMOKING_AREA",e.NON_SMOKING="NON_SMOKING",e.FAMILY_SECTION="FAMILY_SECTION",e.KIDS_AREA="KIDS_AREA",e.WAITING_AREA="WAITING_AREA",e.DANCE_FLOOR="DANCE_FLOOR"}(mr||(mr={}));var pr={};const _r=({preDefinedTable:n,tableOptions:i,selectedTableId:o,error:s,disableIfPreDefined:l,language:d,onChange:u})=>{const{t:c}=He("order",{language:d}),m=!r.isEmpty(n),p=a.useCallback(e=>{var t;u(Number(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)||null)},[u]);return e.jsxs(t.Column,{className:pr.table,fullWidth:!0,gap:.5,children:[e.jsx(t.Row,{fullWidth:!0,children:m&&l?e.jsx(t.Text,{variant:"bold",children:n.name}):e.jsx(t.Input,{name:"tableId",options:i,type:t.InputType.SELECT,className:pr.tableInput,value:o,onChange:p,isDisabled:m,fullWidth:!0,noMargin:!0,size:"small",placeholder:c("Select Table")})}),s&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:c(s)})]})},vr=()=>{const t=(()=>{const{tableId:e,tables:t}=A();return!e||r.isEmpty(t)?{}:t.find(t=>Number(t.id)===Number(e))||{}})(),a=(()=>{const{tables:e}=A();return e})(),{order:n,updateOrder:i,errors:o}=ne(),s=pe(),l=a.map(({id:e,name:t})=>({label:t,value:e}));return e.jsx(_r,{onChange:e=>i({tableId:e}),preDefinedTable:t,tableOptions:l,selectedTableId:null==n?void 0:n.tableId,error:null==o?void 0:o.tableId,language:s,disableIfPreDefined:!0})};var gr="OrderMethods-module_container__KSwfa";const Er=({orderTypes:a,orderType:r,size:n,onSelect:i})=>{const{t:o}=He("error"),s=e=>0===e?"right":e+1===a.length?"left":"bottom",l=a.reduce((a,n,i)=>n.isVisible?(a.push((({type:a,icon:n,title:i,isDisabled:l},d)=>({value:a,isDisabled:l,label:e.jsx(t.Tooltip,{hint:l?o("ORDER_TYPE_DISABLED_AT_THIS_TIME"):null,position:s(d),children:e.jsxs(t.Row,{gap:.5,flexWrap:"nowrap",children:[e.jsx(t.SVGIcon,{icon:n}),e.jsx(t.Text,{color:a!==r||l?"normal":"white",whiteSpace:"nowrap",children:i})]})})}))(n,i)),a):a,[]);return e.jsx("div",{className:gr,children:e.jsx(t.MethodSelection,{methods:l,onSelect:i,selectedMethod:r,fullWidth:!0,size:n,gap:.5})})};var hr="OrderPaymentSummary-module_container__HF7-X",yr="OrderPaymentSummary-module_row__eikWa";const Ir=({textSize:a,totalPriceWithoutTax:n=0,totalPriceWithTax:i=0,deliveryFee:o=0,totalTax:s,currency:l,language:d,orderType:u})=>{const{t:c}=He("order",{language:d}),m=r.priceFormatter(n,l,d),p=r.priceFormatter(i,l,d),_=r.priceFormatter(s,l,d),v=r.priceFormatter(o,l,d);return e.jsxs(t.Column,{className:hr,fullWidth:!0,gap:0,children:[e.jsxs(t.Row,{justifyContent:"space-between",className:yr,children:[e.jsx(t.Text,{size:a,children:c("Items")}),e.jsx(t.Text,{size:a,children:m})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:yr,children:[e.jsx(t.Text,{size:a,children:c("Tax")}),e.jsx(t.Text,{size:a,children:_})]}),u===x.DELIVERY&&e.jsxs(t.Row,{justifyContent:"space-between",className:yr,children:[e.jsx(t.Text,{size:a,children:c("Delivery Fee")}),e.jsx(t.Text,{size:a,children:v})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:yr,children:[e.jsx(t.Text,{size:a,color:"bold",children:c("Total")}),e.jsx(t.Text,{size:a,color:"bold",children:p})]})]})},br=()=>{var r,i,o,s;const l=pe(),d=ce(),{order:{orderType:u,paymentMethod:c},updateOrder:m}=ne(),{data:p}=a.useContext(nr),{isOpen:_,isDelivering:v}=$(),{deliveryOrderEnabled:g,dineInOrderEnabled:E,pickupOrderEnabled:h,deliveryFeeAmount:y}=Z(),{t:I}=He("order"),b=[{type:x.DELIVERY,icon:n.Delivery,title:I("Delivery"),isDisabled:!v,isVisible:g},{type:x.DINE_IN,icon:n.Grid,title:I("Dine in"),isDisabled:!_,isVisible:E},{type:x.PICK_UP,icon:n.ShoppingBag,title:I("Pickup"),isDisabled:!_,isVisible:h}],T=[{value:k.CASH,label:I("Cash")},{value:k.CARD,label:I("Card")}];return e.jsxs(t.Column,{className:za,gap:1,children:[e.jsx(Er,{orderTypes:b,orderType:u,size:"small",onSelect:e=>m({orderType:e})}),u===x.DELIVERY&&e.jsx(dr,{}),u===x.DINE_IN&&e.jsx(t.Padding,{paddingInline:1,fullWidth:!0,children:e.jsx(vr,{})}),e.jsx(t.Row,{className:Ua,children:T.map(({label:a,value:r})=>e.jsx(t.Input,{label:a,name:"paymentMethod",onChange:()=>m({paymentMethod:r}),checked:c===r,type:t.InputType.RADIO,size:"small",noMargin:!0},r))}),e.jsx(t.Accordion,{title:I("Order summary"),content:e.jsx(ar,{isDisabled:!0}),fullWidth:!0,style:"no-shadow",noPadding:!0,headerPaddingInline:1,headerPaddingBlock:1,titleVariant:"h5"}),e.jsx(Ir,{textSize:"sm",totalPriceWithoutTax:null!==(r=null==p?void 0:p.totalPriceWithoutTax)&&void 0!==r?r:0,totalPriceWithTax:null!==(i=null==p?void 0:p.totalPriceWithTaxAndFees)&&void 0!==i?i:0,totalTax:null!==(o=null==p?void 0:p.totalTax)&&void 0!==o?o:0,deliveryFee:null!==(s=null==p?void 0:p.deliveryFee)&&void 0!==s?s:y,language:l,currency:d,orderType:u})]})},Tr=()=>e.jsx(ir,{children:e.jsx(br,{})}),fr=()=>{const{t:a}=He("order"),{trackingId:r}=ne(),i=pe(),o=j();return e.jsxs(t.Column,{className:za,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(t.SVGIcon,{icon:n.Check,size:"xxl",color:t.UIElementType.SUCCESS}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{variant:"h1",align:"center",children:a("Your Order is Completed!")})}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{align:"center",children:a("Thank you! We've received your order and it will be delivered shortly.")})}),e.jsx(t.Padding,{paddingInline:5,paddingBlock:2,fullWidth:!0,children:e.jsx(t.Link,{href:`https://${o}/${i}/order/${r}`,title:a("Track order"),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0,target:"_blank"})})]})},Dr=()=>{const{isOrderOpen:n,orderItems:i}=ne(),{orderStep:o,setOrderStep:s,resetOrder:l}=ne(),d=a.useRef(null),{t:u}=He("order"),c=(()=>{const{order:e,orderStep:t}=ne(),a=lt(),r=dt(),{t:n}=He("error");return t!==R.DETAILS?null:(null==e?void 0:e.orderType)?e.orderType===x.DELIVERY?r||a:null:n("NO_ORDER_TYPE")})(),m=!!c,p=X()&&(o===R.CART||m),_=r.isEmpty(i),v=()=>{l()};return n?e.jsx("div",{className:wa,onClick:e=>{var t,a;(null===(a=null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.contains)||void 0===a?void 0:a.call(t,null==e?void 0:e.target))||v()},children:e.jsx(t.Drawer,{ref:d,onClose:v,isOpen:n,title:u("Your order"),onBack:o===R.CART?void 0:()=>{s(R.CART)},content:(()=>{switch(o){case R.DETAILS:return e.jsx(Tr,{});case R.COMPLETED:return e.jsx(fr,{});default:return e.jsx(rr,{})}})(),footer:e.jsx(Ya,{isOrderItemsEmpty:_,orderError:c}),hasLargeFooter:p})}):null},Ar={[s]:({params:r})=>{const{modalRef:n,note:i}=r,[o,s]=a.useState(i||""),{setModal:l}=t.useModalContext(),{updateOrder:d}=ne(),{t:u}=He("order"),{t:c}=He("common");return e.jsx(t.Modal,{ref:n,header:e.jsx("div",{children:u("Add an order note")}),content:e.jsx("div",{className:$e.container,children:e.jsx(t.Input,{type:t.InputType.TEXT_AREA,placeholder:u("Specify any allergies, special requests, or ingredients you want to add or remove"),value:o,onChange:e=>{var t;return s(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)}})}),footer:e.jsxs(t.Row,{justifyContent:"flex-end",children:[e.jsx(t.Button,{label:c("Cancel"),onClick:()=>l(null),type:t.UIElementType.DEFAULT,size:"md"}),e.jsx(t.Button,{label:c("Save"),onClick:()=>{d({note:o}),l(null)},size:"md"})]})})},[l]:({params:n})=>{const{t:i}=He("auth"),{t:o}=He("error"),{t:s}=He("common"),{setModal:l}=t.useModalContext(),{setOrderStep:d,getCustomer:u}=ne(),[c,m]=a.useState({otp:"",email:""}),[p,_]=a.useState({}),[v,g]=a.useState(""),[h,y]=a.useState(Je.EMAIL),I=[Je.EMAIL,Je.OTP],{modalRef:b}=n,T=()=>{const e=I.indexOf(h),t=I[e+1];if(t)return y(t);d(R.DETAILS),l(null)},f=a.useCallback(e=>t=>{m(a=>Object.assign(Object.assign({},a),{[e]:t}))},[]);return e.jsx(t.Modal,{ref:b,title:i("Create an account or log in"),onClose:()=>l(null),content:e.jsxs(t.Column,{className:Ze.content,fullWidth:!0,children:[!!v&&e.jsx(t.AlertBox,{message:o(v),type:"error",onClear:()=>g(""),inline:!0}),h===Je.OTP?e.jsx(ut,{address:c.email,errorMessage:null==p?void 0:p.otp,onChange:f("otp")}):e.jsx(ct,{onChange:f("email"),formErrors:p})]}),footer:e.jsx(t.Button,{label:s("Continue"),onClick:()=>O(void 0,void 0,void 0,function*(){g("");try{const a=((e,t)=>{const a={},{email:n,otp:i}=e||{};switch(t){case Je.OTP:n&&r.checkIsValidEmail(n)||(a.email="Invalid Email Address"),i&&6===i.length||(a.otp="Invalid OTP");break;case Je.EMAIL:n&&r.checkIsValidEmail(n)||(a.email="Invalid Email Address")}return a})(c,h);if(!r.isEmpty(a))return _(a);switch(_({}),h){case Je.OTP:{const a=yield(e=c.otp,t=c.email,O(void 0,void 0,void 0,function*(){return W.post("/otp/verify",{otp:e,email:t})}));if(!(null==a?void 0:a.accessToken))throw new Error("SOMETHING_WRONG");E.saveAuthToken(a);break}case Je.EMAIL:{const e=yield(e=>O(void 0,void 0,void 0,function*(){return W.post("/customer",{email:e})}))(c.email);if(200!==(null==e?void 0:e.status))throw new Error("SOMETHING_WRONG");break}}yield u(),T()}catch(e){g((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),G(e,{file:"src/components/PublicMenu/Modals/Auth/Auth.tsx",method:"handleSubmit",payload:c})}var e,t}),size:"lg",fullWidth:!0})})},[d]:({params:n})=>{const i=p[0].code,{getCustomer:o}=ne(),s=pe(),l=q(),{id:d,countryCode:u=i,cityName:c="",street:m="",houseNumber:_="",floor:v,additionalNumber:g="",instructions:E="",longitude:h,latitude:y,postCode:I}=Xe(),b={addressId:d,countryCode:u,cityName:c,street:m,houseNumber:_,additionalNumber:g,instructions:E,floor:v,latitude:y,longitude:h,postCode:I},{modalRef:T}=n,{t:f}=He("customer"),{t:D}=He("error"),{t:A}=He("common"),{setModal:j}=t.useModalContext(),[S,x]=a.useState(b),[P,C]=a.useState({}),[k,R]=a.useState(""),[N,L]=a.useState(!1),[M,w]=a.useState(!1),z=P.countryCode||P.cityName||P.street,U=at(b.street,b.houseNumber,void 0),B=e=>{var t,a;const r=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.name,n=null===(a=null==e?void 0:e.target)||void 0===a?void 0:a.value;x(e=>{const t=Object.assign(Object.assign({},e),{[r]:n}),a=tt(t);return C(a),t})},V=()=>j(null),Y=a.useCallback(e=>{const t=Object.assign(Object.assign({},S),{countryCode:e.countryCode,cityName:e.cityName,street:e.street,houseNumber:e.houseNumber||"",latitude:e.lat,longitude:e.long,postCode:e.postCode}),a=tt(t);x(t),C(a),w(!e.houseNumber)},[S]);return e.jsx(t.Modal,{ref:T,title:f("Update Delivery Address"),onClose:V,content:e.jsx("div",{className:mt.content,children:e.jsxs(t.Column,{fullWidth:!0,children:[!!k&&e.jsx(t.AlertBox,{message:D(k),type:"error",onClear:()=>R(""),inline:!0}),e.jsxs(t.Column,{fullWidth:!0,gap:.5,children:[e.jsx(t.AddressAutocomplete,{onSelect:Y,language:s,origin:{lat:null==l?void 0:l.latitude,lng:null==l?void 0:l.longitude},noMargin:!0,defaultAdressText:U,placeHolder:f("Enter address"),inputLabel:f("Address")}),z&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:D(z)})]}),e.jsxs(t.Flex,{gap:1,children:[M&&e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"houseNumber",label:f("House No."),placeholder:"221B",type:t.InputType.TEXT,value:S.houseNumber,onChange:B,errorMessage:D(P.houseNumber)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"floor",label:f("Floor"),placeholder:"7",type:t.InputType.TEXT,value:S.floor,onChange:B,errorMessage:D(P.floor)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"additionalNumber",label:f("Additional number"),placeholder:"17",type:t.InputType.TEXT,value:S.additionalNumber,onChange:B,errorMessage:D(P.additionalNumber)})})]}),e.jsx(t.Input,{name:"instructions",placeholder:f("Example: Door code is 555"),label:f("Delivery Instructions"),type:t.InputType.TEXT,fullWidth:!0,value:S.instructions,onChange:B,errorMessage:D(P.instructions)})]})}),footer:e.jsx(t.Button,{label:A("Save"),onClick:()=>O(void 0,void 0,void 0,function*(){R("");try{const t=tt(S);if(!r.isEmpty(t))return C(t);C({}),L(!0);const a=yield(e={address:S},O(void 0,void 0,void 0,function*(){return W.patch("/customer",e)}));if(200!==(null==a?void 0:a.status))throw new Error("SOMETHING_WRONG");o(),V()}catch(e){R((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),G(e,{file:"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx",method:"handleSubmit",payload:S})}finally{L(!1)}var e}),size:"lg",fullWidth:!0,isLoading:N})})},[u]:({params:a})=>{const{setModal:r}=t.useModalContext(),{t:n}=He("branch"),{modalRef:i,openingHours:o,deliveryHours:s}=a;return e.jsx(t.Modal,{ref:i,onClose:()=>r(null),content:e.jsx(Et,{openingHours:o,deliveryHours:s}),title:n("Opening Hours")})},[c]:({params:t})=>{const{product:n={},modalRef:i,closeModal:o}=t,s=(null==n?void 0:n.sellUnitType)===nt.WEIGHT||(null==n?void 0:n.sellUnitType)===nt.VOLUME?0:1,l=pe(),d=ce(),{addToOrderEnabled:u}=Z(),{addProduct:c,updateProduct:m,removeAllProductVariants:p}=ne(),[_,v]=a.useState(s),[g,E]=a.useState(!1),[h,y]=a.useState(null),[I,b]=a.useState(null),[T,f]=a.useState({}),{t:D}=He("order"),A=(({productId:e,variantId:t,selectedAddons:a})=>{var n;const{orderItems:i}=ne();return r.isEmpty(i)||!e?0:(null===(n=i[U(e,t,a)])||void 0===n?void 0:n.quantity)||0})({productId:null==n?void 0:n.id,variantId:h,selectedAddons:T}),j=(e=>{const{orderItems:t}=ne();return r.isEmpty(t)||!e?0:Object.values(t).filter(t=>t.productId===e).reduce((e,t)=>e+t.quantity,0)})(null==n?void 0:n.id),{name:S}=a.useMemo(()=>Ct(n,l),[n,l]),x=g?0===_:1===_,P=a.useMemo(()=>D(g?0===_?"Remove from order":"Update order":"Add"),[g,_]),C=ye(null==n?void 0:n.id),k=Boolean(n.videoUrl);a.useEffect(()=>{O(void 0,void 0,void 0,function*(){v(A>0?A+1:s),E(A>0)})},[A,n,s]),a.useEffect(()=>{O(void 0,void 0,void 0,function*(){y(null),f({})})},[n]);const R=a.useCallback(e=>{b(e),setTimeout(()=>{b(null)},200)},[]),N=a.useCallback(()=>{var e;return(null===(e=null==n?void 0:n.variants)||void 0===e?void 0:e.length)>0&&!h?R("variant"):_<=0?R("quantity"):(g?m({product:n,quantity:_,variantId:h,selectedAddons:T}):(c({product:n,quantity:_,variantId:h,selectedAddons:T}),r.trackEvent(Bt,{name:S,quantity:_})),void(null==o||o()))},[c,o,R,g,S,n,_,T,h,m]),L=a.useCallback(e=>{-1===e&&x||v(t=>Math.max(0,t+e))},[x]),M=a.useCallback(({addonId:e,optionId:t,isSingle:a,isRemove:r=!1})=>{f(n=>{if(a)return Object.assign(Object.assign({},n),{[e]:t});const i=n[e]||[],o=r?i.filter(e=>e!==t):[...new Set([...i,t])];return Object.assign(Object.assign({},n),{[e]:o})})},[]);return e.jsx(Ma,{modalRef:i,product:n,language:l,currency:d,selectedVariant:h,focusedSection:I,selectedAddons:T,isDecreaseDisabled:x,quantity:_,actionTitle:P,videoUrl:k?C:void 0,addToOrderEnabled:u,onClose:o,setSelectedVariant:y,onOptionSelect:M,adjustQuantity:L,onSubmit:N,removeAllProductVariants:p,productQuantityInOrderWithAllVariants:j,onQuantityChange:e=>v(e),isInPublicMenu:!0})}},jr=()=>{const{getCustomer:t}=ne(),n=a.useRef(null),s=S(),l=J(),d=K()||l,u=he(),{url:c,domain:m}=_e();return a.useEffect(()=>{s||t()},[t,s]),r.isEmpty(u)?e.jsxs("div",{className:i,ref:n,children:[e.jsx(Qe,{}),d?e.jsx(ia,{containerRef:n}):e.jsx(At,{}),e.jsx(yt,{size:"md",zIndex:10}),!!m&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:c,className:o,children:m})]}):e.jsx(fa,{})};var Sr={};const Or=({currentGoal:r,language:n,setGoal:i})=>{const{t:o}=He("events",{language:n}),s=a.useRef({}),l=e=>{switch(e){case zt:return o("Scrolled to Category");case wt:return o("Category Selected");case Ut:return o("Product Details");case Bt:return o("Product Added to Order");default:return""}},d=a.useCallback(e=>{var t,a;i(e),null===(a=null===(t=null==s?void 0:s.current)||void 0===t?void 0:t.close)||void 0===a||a.call(t)},[i]);return e.jsx(t.DropDown,{action:l(r),actionSize:"large",type:t.UIElementType.BORDERED_PRIMARY,closeRef:s,menu:e.jsx("div",{className:Sr.toolbarMenu,children:Wt.map(a=>e.jsx(t.DropDownMenuItem,{onClick:()=>d(a),children:l(a)},a))})})};exports.Categories=Yt,exports.Events=({data:a,isLoading:r=!1,language:n,goal:i,setGoal:o})=>{const{t:s}=He("events",{language:n});return e.jsx(t.Card,{title:s("Events"),toolbar:e.jsx(Or,{language:n,currentGoal:i,setGoal:o}),children:r?e.jsx(t.Loading,{}):e.jsx(t.BarChart,{data:a})})},exports.OrderFAB=ra,exports.OrderMethods=Er,exports.OrderPaymentSummary=Ir,exports.OrderProvider=re,exports.OrderTableUI=_r,exports.ProductDetailsUI=Ma,exports.ProductsGridItem=Jt,exports.PublicMenu=({data:a})=>e.jsx(D,{value:a||{},children:e.jsx(re,{children:e.jsxs(t.ModalProvider,{modalsMap:Ar,children:[e.jsx(jr,{}),e.jsx(Dr,{})]})})}),exports.Quantity=ja,exports.useOrderContext=ne;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|