@tabres/react 1.0.31 → 1.0.33
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/BackIcon/BackIcon.d.ts +1 -1
- package/dist/components/Events/Events.d.ts +1 -1
- package/dist/components/Events/EventsToolbar.d.ts +1 -1
- package/dist/components/PublicMenu/Branches/BranchCard/BranchCard.d.ts +1 -1
- package/dist/components/PublicMenu/Branches/BranchCard/Parent.d.ts +1 -1
- package/dist/components/PublicMenu/Branches/Branches.d.ts +1 -1
- package/dist/components/PublicMenu/Categories/Categories.d.ts +1 -1
- package/dist/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.d.ts +1 -1
- package/dist/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.d.ts +1 -1
- package/dist/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.d.ts +1 -1
- package/dist/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.d.ts +1 -1
- package/dist/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.d.ts +1 -1
- package/dist/components/PublicMenu/Header/BranchHeader/BranchHeader.d.ts +1 -1
- package/dist/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.d.ts +1 -1
- package/dist/components/PublicMenu/Header/BusinessHeader/BusinessHeader.d.ts +1 -1
- package/dist/components/PublicMenu/Header/Header.d.ts +1 -1
- package/dist/components/PublicMenu/Header/Languages/Languages.d.ts +1 -1
- package/dist/components/PublicMenu/MenuContent/MenuContent.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/Auth/Auth.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/Auth/EmailStep.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/Auth/OTPStep.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/Auth/PhoneStep.d.ts +1 -1
- package/dist/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawer.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawerCart.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawerDetails.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderDrawerFooter.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.d.ts +1 -1
- package/dist/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.d.ts +1 -1
- package/dist/components/PublicMenu/OrderFAB/OrderFAB.d.ts +1 -1
- package/dist/components/PublicMenu/OrderFAB/OrderFABContainer.d.ts +1 -1
- package/dist/components/PublicMenu/OrderItemsList/OrderItemsList.d.ts +1 -1
- package/dist/components/PublicMenu/OrderItemsList/OrderNoItems.d.ts +1 -1
- package/dist/components/PublicMenu/OrderListItem/OrderListItem.d.ts +1 -1
- package/dist/components/PublicMenu/OrderMethods/OrderMethods.d.ts +1 -1
- package/dist/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.d.ts +1 -1
- package/dist/components/PublicMenu/OrderStepper/OrderStepper.d.ts +1 -1
- package/dist/components/PublicMenu/ProductAddons/ProductAddons.d.ts +1 -1
- package/dist/components/PublicMenu/ProductDetails/ProductDetails.d.ts +1 -1
- package/dist/components/PublicMenu/ProductDetails/ProductDetailsUI.d.ts +1 -1
- package/dist/components/PublicMenu/ProductInOrder/ProductInOrder.d.ts +1 -1
- package/dist/components/PublicMenu/ProductQuantity/ProductQuantity.d.ts +1 -1
- package/dist/components/PublicMenu/ProductVariants/ProductVariants.d.ts +1 -1
- package/dist/components/PublicMenu/Products/Products.d.ts +1 -1
- package/dist/components/PublicMenu/ProductsGridItem/ProductsGridItem.d.ts +1 -1
- package/dist/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.d.ts +1 -1
- package/dist/components/PublicMenu/ProductsListItem/ProductsListItem.d.ts +1 -1
- package/dist/components/PublicMenu/PublicMenu.d.ts +1 -1
- package/dist/components/PublicMenu/Videos/Video/Actions/Actions.d.ts +1 -1
- package/dist/components/PublicMenu/Videos/Video/Video.d.ts +1 -1
- package/dist/components/PublicMenu/Videos/Video/VideoData/VideoData.d.ts +1 -1
- package/dist/components/PublicMenu/Videos/VideoFeed/VideoFeed.d.ts +1 -1
- package/dist/components/Quantity/Quantity.d.ts +1 -1
- package/dist/components/ScrollToTop/ScrollToTop.d.ts +1 -1
- package/dist/constants/index.esm.js.map +1 -1
- package/dist/constants/index.js.map +1 -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/index.esm.js +1 -1
- package/dist/models/index.esm.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/modules/branch/models.d.ts +2 -0
- package/dist/models/modules/order/constants.d.ts +1 -1
- package/dist/models/modules/order/models.d.ts +1 -1
- package/dist/models/modules/user/models.d.ts +7 -2
- package/dist/models/store/index.d.ts +1 -1
- package/dist/models/store/order.d.ts +1 -1
- package/dist/modules/branch/models.d.ts +2 -0
- package/dist/modules/order/constants.d.ts +1 -1
- package/dist/modules/order/models.d.ts +1 -1
- package/dist/modules/order/preview.d.ts +1 -1
- package/dist/modules/user/models.d.ts +7 -2
- package/dist/store/index.d.ts +1 -1
- package/dist/store/order.d.ts +1 -1
- 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/modules/branch/models.d.ts +2 -0
- package/dist/utils/modules/order/constants.d.ts +1 -1
- package/dist/utils/modules/order/models.d.ts +1 -1
- package/dist/utils/modules/user/models.d.ts +7 -2
- package/dist/utils/store/index.d.ts +1 -1
- package/dist/utils/store/order.d.ts +1 -1
- package/package.json +12 -11
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/ui"),r=require("react"),o=require("@sorocraft/js-utils"),a=require("@sorocraft/ui/icons"),n="PublicMenu-module_container__QLN6U",i="PublicMenu-module_footer__6G3DQ",d="PublicMenu-module_headerText__hKbnP",s="PublicMenu-module_footerText__a4g0i";const l="ADD_UPDATE_NOTES",u="AUTH",c="ADD_UPDATE_ADDRESS",m="BRANCH_BUSINESS_HOURS",p="PRODUCT_DETAILS",_=["en","az","nl","et","tr","ru","pl","pt","hr"],E=[{name:"Azerbaijan",code:"AZ",phoneCode:"+994"}],v="tabres.com",h=v,g="https://images.tabres.com",I=new o.Storage("tabres_cst_act","tabres_cst_rft"),y=(e,t)=>{const r=t||"en";return"localhost:3000"===e?{url:`http://localhost:3000/${r}`,domain:v}:{url:`https://${v}/${r}`,domain:v}},T=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"",D=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",f=(e,t)=>{const r=parseInt(e.replace("#",""),16),o=(r>>16&255)/255,a=(r>>8&255)/255,n=(255&r)/255,i=Math.max(o,a,n),d=Math.min(o,a,n),s=(i+d)/2;let l=0,u=0;if(i!==d){const e=i-d;switch(u=s>.5?e/(2-i-d):e/(i+d),i){case o:l=(a-n)/e+(a<n?6:0);break;case a:l=(n-o)/e+2;break;case n:l=(o-a)/e+4}l/=6}const c=Math.max(0,Math.min(1,s+t/100)),m=(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*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,l+1/3),_=m(t,e,l),E=m(t,e,l-1/3)}const v=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${v(p)}${v(_)}${v(E)}`},A=()=>{const{hostname:e}=R();return e||h},x=()=>{const{isInDashboard:e}=R();return e||!1},C=r.createContext({}),O=({children:t,value:r})=>{var o,a,n,i,d,s,l,u,c,m,p,_,E,v,h,g,I,y,T,D;return e.jsx(C.Provider,{value:r,children:e.jsx("div",{style:{"--sorocraft-color-primary":null===(o=r.menuDesign)||void 0===o?void 0:o.primaryColor,"--sorocraft-color-primary-light":(null===(a=r.menuDesign)||void 0===a?void 0:a.primaryColor)&&f(r.menuDesign.primaryColor,37.5),"--sorocraft-color-primary-active":(null===(n=r.menuDesign)||void 0===n?void 0:n.primaryColor)&&f(r.menuDesign.primaryColor,-7.5),"--tabres-menu-category-background-color":null===(i=r.menuDesign)||void 0===i?void 0:i.categoryBackgroundColor,"--tabres-menu-category-text-color":null===(d=r.menuDesign)||void 0===d?void 0:d.categoryTextColor,"--tabres-menu-product-card-background-color":null===(s=r.menuDesign)||void 0===s?void 0:s.productCardBackgroundColor,"--tabres-menu-product-card-text-color":null===(l=r.menuDesign)||void 0===l?void 0:l.productCardTextColor,"--tabres-menu-product-card-description-text-color":null===(u=r.menuDesign)||void 0===u?void 0:u.productCardDescriptionTextColor,"--tabres-menu-product-card-volume-text-color":null===(c=r.menuDesign)||void 0===c?void 0:c.productCardVolumeTextColor,"--tabres-menu-product-card-price-text-color":null===(m=r.menuDesign)||void 0===m?void 0:m.productCardPriceTextColor,"--tabres-menu-product-card-block-padding":null===(p=r.menuDesign)||void 0===p?void 0:p.productCardBlockPadding,"--tabres-menu-category-title-font-size":null===(_=r.menuDesign)||void 0===_?void 0:_.categoryTitleFontSize,"--tabres-menu-product-name-font-size":null===(E=r.menuDesign)||void 0===E?void 0:E.productNameFontSize,"--tabres-menu-product-price-font-size":null===(v=r.menuDesign)||void 0===v?void 0:v.productPriceFontSize,"--tabres-menu-distance-between-category-title-and-products":null===(h=r.menuDesign)||void 0===h?void 0:h.distanceBetweenCategoryTitleAndProducts,"--tabres-menu-product-description-font-size":null===(g=r.menuDesign)||void 0===g?void 0:g.productDescriptionFontSize,"--tabres-menu-product-volume-font-size":null===(I=r.menuDesign)||void 0===I?void 0:I.productVolumeFontSize,"--tabres-menu-product-separator-color":null===(y=r.menuDesign)||void 0===y?void 0:y.productSeparatorColor,"--tabres-menu-page-background-color":null===(T=r.menuDesign)||void 0===T?void 0:T.menuPageBackgroundColor,"--tabres-menu-page-text-color":null===(D=r.menuDesign)||void 0===D?void 0:D.menuPageTextColor},children:t})})},R=()=>r.useContext(C),j=()=>{const{business:e}=R();return e||{}},N=()=>{const{currency:e}=j();return e||"AZN"},S=()=>{const{id:e}=j();return e},P=()=>{const{language:e}=R();return e||"en"},k=()=>{const e=A(),t=P();return r.useMemo(()=>y(e,t),[e,t])},L=()=>{const{url:e}=k(),t=(()=>{const{username:e}=j();return e||""})();return r.useMemo(()=>`${e}/${t}`,[e,t])},w=(e,t)=>{var r;return null===(r=((null==e?void 0:e.days)||[]).find(({day:e})=>e===t))||void 0===r?void 0:r.hours},M=e=>(e||"").split(":").map(Number),U=e=>{if(!e)return!1;const t=new Date,[r,o]=M(e.openAt),[a,n]=M(e.closeAt),i=new Date(t);i.setHours(r,o,0,0);const d=new Date(t);return d.setHours(a,n,0,0),d<=i&&(t<d?i.setDate(i.getDate()-1):d.setDate(d.getDate()+1)),t>=i&&t<=d},z=()=>{const{branches:e}=R();return(e||[]).length<=1},W=()=>{const{branches:e,branchId:t}=R(),r=z();return o.isEmpty(e)?{}:r?e[0]:e.find(e=>e.id===Number(t))||{}},B=()=>{const e=W();return{latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude}},V=()=>{const e=W(),{openingHours:t,deliveryHours:r}=e||{};if(!(null==t?void 0:t.days)||!(null==r?void 0:r.days))return{isOpen:!1,isDelivering:!1};const o=((new Date).getUTCDay()+6)%7,a=w(t,o),n=w(r,o);return{isOpen:U(a),isDelivering:U(n)}},Y=()=>{const e=W();return(null==e?void 0:e.settings)||{}},G=()=>{const e=Y();if(o.isEmpty(e))return!1;const{deliveryOrderEnabled:t,dineInOrderEnabled:r,pickupOrderEnabled:a}=e;return t||r||a},F=()=>{const{branchId:e}=R();return e},H=()=>{const{onBranchSelect:e}=R();return e},K=()=>{const e=L(),t=F();return t?`${e}/${t}`:e};function q(e,t,r,o){return new(r||(r=Promise))(function(a,n){function i(e){try{s(o.next(e))}catch(e){n(e)}}function d(e){try{s(o.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,d)}s((o=o.apply(e,t||[])).next())})}var Q,$,X,Z,J;"function"==typeof SuppressedError&&SuppressedError,function(e){e.DINE_IN="DINE_IN",e.PICK_UP="PICK_UP",e.DELIVERY="DELIVERY"}(Q||(Q={})),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"}($||($={})),function(e){e.PENDING="PENDING",e.PREPARING="PREPARING",e.READY="READY",e.SERVED="SERVED"}(X||(X={})),function(e){e.CASH="CASH",e.CARD="CARD",e.WALLET="WALLET",e.TERMINAL="TERMINAL"}(Z||(Z={})),function(e){e.CART="CART",e.DETAILS="DETAILS",e.COMPLETED="COMPLETED"}(J||(J={}));const ee={orderType:null,paymentMethod:Z.CASH},te=[J.CART,J.DETAILS,J.COMPLETED],re={data:null,isLoading:!1,error:null};var oe;!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"}(oe||(oe={}));const ae=e=>{var t,r;const{price:o,variant:a,addons:n,quantity:i}=e||{},d=null!==(r=null!==(t=null==a?void 0:a.price)&&void 0!==t?t:o)&&void 0!==r?r:0,s=(n||[]).reduce((e,t)=>e+((null==t?void 0:t.options)||[]).reduce((e,t)=>{var r;return e+(null!==(r=null==t?void 0:t.price)&&void 0!==r?r:0)},0),0);return(d+s)*(null!=i?i:1)},ne=(e,t,r)=>{if(!e)throw new Error("Product ID is required");let a=`${e}`;t&&(a+=`-${t}`);const n=Object.entries(r||{}).map(([e,t])=>{if(!e||!t)return null;const r=Array.isArray(t)?o.sortNumbers(t).filter(Boolean).join("-"):`${t}`;return r?`${e}-${r}`:null}).filter(Boolean).join("-");return n&&(a+=`-${n}`),a},ie=e=>{switch(e){case"customer":return oe.ADDRESS_IS_EMPTY;case"tableId":return oe.TABLE_NOT_SELECTED;case"items":return oe.EMPTY_ITEMS;case"branchId":return oe.BRANCH_NOT_SELECTED;default:return oe.FIELD_REQUIRED_ERROR}},de="https://api.tabres.com/api/v2",se=new o.HttpClient({baseURL:de,headers:{"Content-Type":"application/json"},credentials:"include"});se.onRequest(e=>{const{accessToken:t=""}=I.getAuthToken();return e.headers.Authorization=t,e}),se.onResponse(e=>q(void 0,void 0,void 0,function*(){return yield e.json().catch(()=>null)}));const le=(...e)=>q(void 0,[...e],void 0,function*(e=null,t={}){try{return o.trackEvent("error",{message:null==e?void 0:e.message}),yield fetch(`${de}/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)}}),ue=({defaultOrderType:e,defaultPaymentMethod:t,defaultBranchId:r})=>{const o=(()=>{const{tableId:e}=R();return e})(),{isOpen:a,isDelivering:n}=V(),i=Y(),d=e||((e,t,r)=>{if(!e)return null;const{deliveryOrderEnabled:o,dineInOrderEnabled:a,pickupOrderEnabled:n}=e;return o&&r?Q.DELIVERY:a&&t?Q.DINE_IN:n&&t?Q.PICK_UP:null})(i,a,n);return{branchId:r,orderType:d,tableId:o?Number(o):void 0,paymentMethod:t||Z.CASH}},ce=r.createContext({order:ee,orderStep:J.CART,orderItems:{},isOrderOpen:!1,customer:{},trackingId:"",errors:{},updateOrder:()=>{},setOrderStep:()=>{},addProduct:()=>{},updateProduct:()=>{},removeAllProductVariants:()=>{},setIsOrderOpen:()=>{},getCustomer:()=>{},resetOrder:()=>{},setTrackingId:()=>{},updateOrderErrors:()=>{},resetErrors:()=>{}}),me=({children:t,defaultOrderType:a,defaultPaymentMethod:n,defaultBranchId:i,isOrderDefaultOpen:d=!1})=>{const s=ue({defaultOrderType:a,defaultPaymentMethod:n,defaultBranchId:i}),[l,u]=r.useState({}),[c,m]=r.useState(s),[p,_]=r.useState(J.CART),[E,v]=r.useState({}),[h,g]=r.useState(d),[y,T]=r.useState(""),[D,b]=r.useState({}),f=r.useCallback(e=>{m(t=>Object.assign(Object.assign({},t),e)),["branchId","tableId"].forEach(t=>{e[t]&&b(e=>(null==e?void 0:e[t])?Object.assign(Object.assign({},e),{[t]:null}):e)})},[]),A=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:a,note:n,isAddOperation:i})=>{if(o.isEmpty(e))return;const{id:d,variants:s,addons:l,price:u,listingPrice:c,sellUnitType:m}=e,p=null!=c?c:u,_=ne(d,r,a);v(e=>{var u;const c=e[_],E=parseFloat((i?((null==c?void 0:c.quantity)||0)+t:t).toFixed(3));if(E<=0){const t=e,r=_;t[r];return function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]])}return r}(t,["symbol"==typeof r?r:r+""])}const v=s.find(({id:e})=>e===r),h=((e=[],t={})=>Object.entries(t).map(([t,r])=>{const a=Number(t),n=Array.isArray(r)?r:[r],i=e.find(e=>e.id===a);if(o.isEmpty(i))return{addonId:a,options:[]};const d=(i.options||[]).filter(e=>n.includes(e.id)).map(e=>{var t;return{optionId:e.id,price:null!==(t=e.listingPrice)&&void 0!==t?t:e.price}});return{addonId:a,options:d}}))(l,a);return Object.assign(Object.assign({},e),{[_]:Object.assign(Object.assign({productId:d,quantity:E,price:p,note:n},!o.isEmpty(v)&&{variant:{variantId:v.id,price:null!==(u=v.listingPrice)&&void 0!==u?u:v.price}}),{addons:h,sellUnitType:m})})}),i&&b(e=>(null==e?void 0:e.items)?Object.assign(Object.assign({},e),{items:null}):e)},[]),x=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:o,note:a})=>A({product:e,quantity:t,variantId:r,selectedAddons:o,note:a,isAddOperation:!0}),[A]),C=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:o,note:a})=>A({product:e,quantity:t,variantId:r,selectedAddons:o,note:a,isAddOperation:!1}),[A]),O=r.useCallback(e=>{e&&v(t=>{if(o.isEmpty(t))return t;return Object.entries(t).reduce((t,[r,o])=>(o.productId!==e&&(t[r]=o),t),{})})},[]),R=r.useCallback(()=>q(void 0,void 0,void 0,function*(){try{const{accessToken:e}=I.getAuthToken();if(!e)return;const t=yield q(void 0,void 0,void 0,function*(){return se.get("/customer")});if(!(null==t?void 0:t.id))throw new Error("SOMETHING_WENT_WRONG");u(t)}catch(e){le(e,{file:"src/store/order.tsx",method:"getCustomer"})}}),[]),j=r.useCallback((e=!1,t=!0)=>{t&&g(!1),(p===J.COMPLETED||e)&&(m(s),v({}),_(J.CART),T(""))},[s,p]),N=r.useCallback(e=>{b(t=>Object.assign(Object.assign({},t),{[e]:ie(e)}))},[]),S=r.useCallback(()=>{b({})},[]),P=r.useMemo(()=>({order:c,orderStep:p,orderItems:E,isOrderOpen:h,customer:l,trackingId:y,errors:D,updateOrder:f,setOrderStep:_,addProduct:x,updateProduct:C,removeAllProductVariants:O,setIsOrderOpen:g,getCustomer:R,resetOrder:j,setTrackingId:T,updateOrderErrors:N,resetErrors:S}),[c,p,E,h,l,y,D,f,x,C,O,R,j,T,N,S]);return e.jsx(ce.Provider,{value:P,children:t})},pe=()=>r.useContext(ce);var _e,Ee,ve,he,ge;!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"}(_e||(_e={})),function(e){e.PERCENTAGE="percentage",e.FIXED_AMOUNT="fixed"}(Ee||(Ee={})),function(e){e.ENTIRE_MENU="entire_menu",e.CLASS="class"}(ve||(ve={})),function(e){e.DELIVERY="delivery",e.TAKEAWAY="takeaway",e.DINE_IN="dine_in",e.ALL="ALL"}(he||(he={})),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"}(ge||(ge={}));const Ie=()=>{const{videoId:e}=R();return e},ye=()=>{const{videos:e}=R();return r.useMemo(()=>e||[],[e])},Te=()=>{const e=ye(),t=Ie();return r.useMemo(()=>t&&e.find(e=>e.productId===Number(t))||{},[e,t])};const De=e=>{const t=L(),r=F();let o=t;return r&&(o+=`/${r}`),e&&(o+=`/videos/${e}`),o},be=()=>{const e=(()=>{const e=ye();return r.useMemo(()=>e[0],[e])})(),t=De(null==e?void 0:e.productId);return o.isEmpty(e)?"":t};var fe="BusinessHeader-module_container__X22c3",Ae="BusinessHeader-module_cover__l-1W8",xe="BusinessHeader-module_content__sjiqO",Ce="BusinessHeader-module_logo__DWaaU",Oe="BusinessHeader-module_info__6RQFI",Re="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 Ne=()=>{const[o,a]=r.useState(!1),n=j().languages||[],i=P(),d=(()=>{const{onLanguageSelect:e}=R();return e})(),s=n.length>1,l=n.filter(({code:e})=>e!==i)||[],u=e=>`https://images.tabres.com/languages/${e}.svg`;return s?e.jsx("div",{className:je.container,onClick:()=>a(!o),children:e.jsxs(t.Row,{alignItems:"center",gap:0,children:[e.jsx(t.Row,{alignItems:"center",className:t.classNames(je,{options:!0,isOpen:o}),children:l.map(({code:t})=>e.jsx("img",{src:u(t),className:je.option,onClick:()=>null==d?void 0:d(t),alt:t},t))}),e.jsx("img",{src:u(i),alt:i,className:je.currentLanguage})]})}):null},Se=()=>{const{coverPhoto:r,avatar256:o,name:a}=j();return e.jsxs("div",{className:fe,children:[e.jsx("img",{src:b(r),alt:a,className:Ae,width:1024,height:400}),e.jsx("div",{className:xe,children:e.jsxs(t.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:.5,className:fe,children:[e.jsx("img",{src:D(o),alt:a,className:Ce,width:96,height:96}),e.jsx("div",{className:Oe,children:e.jsx(t.Text,{variant:"h1",color:"white",className:Re,align:"center",children:a})})]})}),e.jsx(Ne,{})]})};var Pe="BranchHeader-module_container__Ol56f",ke="BranchHeader-module_cover__DGWZX",Le="BranchHeader-module_content__O8E27",we="BranchHeader-module_logo__DL7Si",Me="BranchHeader-module_info__Ym-ln",Ue="BranchHeader-module_name__91VkO",ze="BranchHeader-module_address__Y140r",We="BranchHeader-module_addressText__ofVQQ",Be="BackIcon-module_container__uknWc";const Ve=({onClick:r,size:o,theme:n})=>{const i=L(),d=x(),s=H();return e.jsx("div",{className:Be,onClick:r||(()=>{if(d)return null==s?void 0:s("");"undefined"!=typeof window&&(window.location.href=i)}),children:e.jsx(t.SVGIcon,{icon:a.ChevronLeft,size:o,theme:n})})};var Ye="HeaderLinks-module_container__wfIXS",Ge="HeaderLinks-module_links__S5qXC",Fe="HeaderLinks-module_wifiPassword__j4cgP",He="HeaderLinks-module_businessHours__qVA-Q",Ke="HeaderLinks-module_icon__cQpBK",qe={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",Discount:"Endirim","Discount ({{rate}}%)":"Endirim ({{rate}}%)","Service Fee ({{rate}}%)":"Servis haqqı ({{rate}}%)"},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"},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:{},branch:{"WEEKDAY-0":"Monday","WEEKDAY-1":"Tuesday","WEEKDAY-2":"Wednesday","WEEKDAY-3":"Thursday","WEEKDAY-4":"Friday","WEEKDAY-5":"Saturday","WEEKDAY-6":"Sunday"}},es:{auth:{"Create an account or log in":"Crear una cuenta o iniciar sesión","Phone number":"Número de teléfono","I don't have an email":"No tengo correo electrónico","We sent a confirmation code to {{address}}":"Hemos enviado un código de confirmación a {{address}}"},branch:{"WEEKDAY-0":"Lunes","WEEKDAY-1":"Martes","WEEKDAY-2":"Miércoles","WEEKDAY-3":"Jueves","WEEKDAY-4":"Viernes","WEEKDAY-5":"Sábado","WEEKDAY-6":"Domingo",Closed:"Cerrado","Opening Hours":"Horarios de apertura","Delivery Hours":"Horarios de entrega",Feedback:"Comentarios"},common:{Save:"Guardar",Cancel:"Cancelar",Continue:"Continuar"},customer:{"Unknown address":"Dirección desconocida","No address available":"Sin dirección disponible","Update Delivery Address":"Actualizar dirección de entrega",Country:"País",City:"Ciudad","Baker Street":"Calle Baker",Address:"Dirección","House number":"Número de casa","Additional number":"Número adicional","Example: Door code is 555":"Ejemplo: El código de la puerta es 555","Delivery Instructions":"Instrucciones de entrega",Floor:"Planta","Enter address":"Introducir dirección","House No.":"Nº de casa"},error:{SOMETHING_WRONG:"¡Algo salió mal! Por favor, inténtalo de nuevo más tarde.",FIELD_REQUIRED:"Este campo es obligatorio","Unsupported country code":"Código de país no soportado","Invalid OTP":"Código de confirmación inválido",INVALID_OTP:"Código de confirmación inválido",OTP_RATE_LIMIT_EXCEEDED:"Has superado el límite de códigos. Por favor, inténtalo de nuevo más tarde.","Invalid Email Address":"Dirección de correo electrónico no válida",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Esta función no está disponible en tu plan actual.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Este tipo de pedido no está disponible para este negocio.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Este tipo de pedido no está disponible en este momento.",COUNTRY_REQUIRED:"El país es obligatorio.",CITY_REQUIRED:"La ciudad es obligatoria.",STREET_REQUIRED:"La calle es obligatoria.",STREET_NUMBER_REQUIRED:"El número de calle es obligatorio.",OUT_OF_DELIVERY_RANGE:"Este establecimiento no realiza entregas en tu dirección.",NO_ORDER_TYPE:"Por favor, selecciona un tipo de pedido.",INVALID_ADDRESS:"Dirección no válida"},events:{Events:"Eventos","Scrolled to Category":"Desplazado a la categoría","Category Selected":"Categoría seleccionada","Product Details":"Detalles del producto","Product Added to Order":"Producto añadido al pedido"},order:{"View order":"Ver pedido","Remove from order":"Eliminar del pedido","Update order":"Actualizar pedido","Add to order":"Añadir al pedido",Add:"Añadir","Your order":"Tu pedido",Subtotal:"Subtotal","Empty order":"Pedido vacío","You don't have any items in your order":"No tienes ningún artículo en tu pedido","Add items":"Añadir artículos","Add an order note":"Añadir nota al pedido","Specify any allergies, special requests, or ingredients you want to add or remove":"Indica cualquier alergia, petición especial o ingrediente que quieras añadir o quitar","Your Order is Completed!":"¡Tu pedido se ha completado!","Thank you! We've received your order and it will be delivered shortly.":"¡Gracias! Hemos recibido tu pedido y será entregado en breve.",Delivery:"Entrega","Dine in":"Para tomar aquí",Pickup:"Para recoger",Cash:"Efectivo","POS Terminal":"Terminal TPV","Order summary":"Resumen del pedido",Items:"Artículos",Tax:"Impuestos",Total:"Total","Special instructions, allergies, etc.":"Instrucciones especiales, alergias, etc.","Go to checkout":"Ir a pagar","Place order":"Realizar pedido",Continue:"Continuar","Not available":"No disponible","In order":"En el pedido","Product choices":"Opciones de producto","Track order":"Seguimiento del pedido","Minimum order amount for delivery is {{amount}}":"El importe mínimo de pedido para entrega es {{amount}}","This field is required":"Este campo es obligatorio","Please select a table":"Por favor, selecciona una mesa","Please enter an address":"Por favor, introduce una dirección","Please choose product":"Por favor, elige un producto",Table:"Mesa","Select Table":"Seleccionar mesa",Card:"Tarjeta","Closed Now":"Cerrado ahora","Delivery Fee":"Gastos de envío","Play video":"Reproducir vídeo"," / kg":" / kg"," / l":" / l",Discount:"Descuento","Discount ({{rate}}%)":"Descuento ({{rate}}%)",Events:"Eventos","Service Fee ({{rate}}%)":"Cargo por servicio ({{rate}}%)"}},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":"Смотреть видео",Discount:"Скидка","Discount ({{rate}}%)":"Скидка ({{rate}}%)","Service Fee ({{rate}}%)":"Сервисный сбор ({{rate}}%)"},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":"Продукт добавлен в заказ"},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",Discount:"İndirim","Discount ({{rate}}%)":"İndirim ({{rate}}%)","Service Fee ({{rate}}%)":"Servis Ücreti ({{rate}}%)"},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"},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",Discount:"Korting","Discount ({{rate}}%)":"Korting ({{rate}}%)","Service Fee ({{rate}}%)":"Servicekosten ({{rate}}%)"},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"},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",Discount:"Allahindlus","Discount ({{rate}}%)":"Allahindlus ({{rate}}%)","Service Fee ({{rate}}%)":"Teenustasu ({{rate}}%)"},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"},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",Discount:"Rabat","Discount ({{rate}}%)":"Rabat ({{rate}}%)","Service Fee ({{rate}}%)":"Opłata serwisowa ({{rate}}%)"},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"},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",Discount:"Desconto","Discount ({{rate}}%)":"Desconto ({{rate}}%)","Service Fee ({{rate}}%)":"Taxa de serviço ({{rate}}%)"},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"},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",Discount:"Popust","Discount ({{rate}}%)":"Popust ({{rate}}%)","Service Fee ({{rate}}%)":"Naknada za uslugu ({{rate}}%)"},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"},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 r=P(),o=(null==t?void 0:t.language)||r,{t:a}=((e,t)=>{try{const r=_.includes(e)?e:"en",o=qe[r][t]||{},a=(e,t)=>{try{const r=o[e]||e;return t?Object.keys(t).reduce((e,r)=>e.replace(`{{${r}}}`,t[r]),r):r}catch(t){return console.error(t),e}};return{t:a}}catch(e){return console.error(e),{t:e=>e}}})(o,e);return{t:a}},$e=()=>{const{setModal:r}=t.useModalContext(),{t:n}=Qe("branch"),{phone:i,wifiPassword:d,whatsApp:s,telegram:l,openingHours:u,deliveryHours:c}=W(),{instagram:p,tiktok:_,facebook:E,username:v}=j(),h=!o.isEmpty(null==u?void 0:u.days)||!o.isEmpty(null==c?void 0:c.days),g="dgkmenu"===v;return e.jsx("div",{className:Ye,children:e.jsx("div",{className:Ge,children:e.jsx(t.Row,{gap:2,alignItems:"center",children:e.jsxs(t.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!i&&e.jsx(t.IconLink,{icon:a.Phone,href:`tel:+${i}`,size:"sm",shape:"circle",theme:"light"}),!!s&&e.jsx(t.IconLink,{icon:a.Whatsapp,href:`https://wa.me/${s}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!p&&e.jsx(t.IconLink,{icon:a.Instagram,href:p,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!l&&e.jsx(t.IconLink,{icon:a.Telegram,href:l,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!_&&e.jsx(t.IconLink,{icon:a.Tiktok,href:_,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!E&&e.jsx(t.IconLink,{icon:a.Facebook,href:E,size:"sm",shape:"circle",theme:"light",target:"_blank"}),g&&e.jsx(t.Tooltip,{hint:n("Feedback"),children:e.jsx(t.IconLink,{icon:a.MessageHeartSquare,href:"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform",size:"sm",shape:"circle",theme:"light",target:"_blank"})}),!!d&&e.jsx(t.Tooltip,{hint:d,children:e.jsx("div",{className:Fe,children:e.jsx(t.SVGIcon,{icon:a.Wifi,size:"sm",className:Ke})})}),h&&e.jsx("div",{className:He,onClick:()=>{r({id:m,params:{openingHours:u,deliveryHours:c}})},children:e.jsx(t.SVGIcon,{icon:a.Clock,size:"sm",className:Ke})})]})})})})},Xe=()=>{const{coverPhoto:r,avatar256:o}=j(),n=(()=>{const{business:e}=R(),t=W(),r=z(),o=(null==e?void 0:e.name)||"Tabres";return r?o:(null==t?void 0:t.name)?`${o} ${t.name}`:o})(),i=W().address||"",d=z(),{latitude:s,longitude:l}=B(),u=`https://www.google.com/maps/place/${s},${l}`;return e.jsxs("div",{className:Pe,children:[e.jsx("img",{src:b(r),alt:n,className:ke,width:1024,height:400}),e.jsx("div",{className:Le,children:e.jsxs(t.Column,{justifyContent:d?"flex-end":"space-between",fullHeight:!0,fullWidth:!0,gap:0,children:[!d&&e.jsx(Ve,{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:D(o),alt:n,className:we,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:Ue,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:a.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:We,children:i})]})})]})})]})]})}),e.jsx(Ne,{}),e.jsx($e,{})]})},Ze=()=>{const t=W();return z()||!o.isEmpty(t)?e.jsx(Xe,{}):e.jsx(Se,{})};var Je={};var et={content:"Auth-module_content__1ATBc",terms:"Auth-module_terms__OH3th"};const tt=()=>{var e,t;const{customer:r}=pe();return(null===(e=null==r?void 0:r.addresses)||void 0===e?void 0:e[(null===(t=null==r?void 0:r.addresses)||void 0===t?void 0:t.length)-1])||{}};var rt,ot;!function(e){e.PHONE="PHONE",e.OTP="OTP",e.EMAIL="EMAIL"}(rt||(rt={})),function(e){e.HOME="HOME",e.WORK="WORK",e.TRAVEL="TRAVEL"}(ot||(ot={}));const at=e=>{const t={},{countryCode:r,cityName:o,street:a,houseNumber:n}=e||{};return r||(t.countryCode="COUNTRY_REQUIRED"),o||(t.cityName="CITY_REQUIRED"),a||(t.street="STREET_REQUIRED"),n||(t.houseNumber="STREET_NUMBER_REQUIRED"),t},nt=(e,t,r)=>[e,[t,r].filter(Boolean).join("/")].filter(Boolean).join(" ");var it,dt;!function(e){e.LIST="list",e.GRID="grid"}(it||(it={})),function(e){e.PIECE="PIECE",e.WEIGHT="WEIGHT",e.VOLUME="VOLUME"}(dt||(dt={}));const st=()=>{const{orderItems:e}=pe();return Object.values(e||{}).reduce((e,t)=>e+ae(t),0)},lt=(e={})=>{const t=S(),r=W(),o=P(),{order:a}=pe(),n=(()=>{const{orderItems:e}=pe();return Object.values(e||{}).map(({productId:e,quantity:t,variant:r,addons:o,note:a,sellUnitType:n})=>({productId:e,quantity:t,variant:r,addons:o,note:a,sellUnitType:n}))})(),i=tt(),d=(()=>{const{customer:e}=pe();return null==e?void 0:e.id})(),{workingDayId:s,tableId:l,employeeId:u,orderType:c,paymentMethod:m,note:p}=Object.assign(Object.assign({},a),e);return{branchId:null==r?void 0:r.id,businessId:t,workingDayId:s,tableId:l,customerId:d,customerAddressId:i.id,employeeId:u,orderType:c,language:o,items:n,paymentMethod:m,note:p}},ut=()=>{const{orderItems:e}=pe();return Object.values(e||{}).reduce((e,t)=>e+(t.sellUnitType===dt.WEIGHT||t.sellUnitType===dt.VOLUME?1:t.quantity),0)},ct=()=>{const{t:e}=Qe("error"),t=B(),a=Y().maxDeliveryDistance,{latitude:n,longitude:i}=tt(),[d,s]=r.useState(null);return r.useEffect(()=>{const e=!!n&&!!i,r=!o.isEmpty(t);q(void 0,void 0,void 0,function*(){if(!e||!r)return s("INVALID_ADDRESS");try{const e=yield((e,t)=>q(void 0,void 0,void 0,function*(){const{spherical:r}=yield google.maps.importLibrary("geometry"),o=new google.maps.LatLng(e.latitude,e.longitude),a=new google.maps.LatLng(t.latitude,t.longitude);return r.computeDistanceBetween(o,a)}))(t,{latitude:n,longitude:i});s(!e||e>a?"OUT_OF_DELIVERY_RANGE":null)}catch(e){s("OUT_OF_DELIVERY_RANGE")}})},[n,i,t,a]),d?e(d):null},mt=()=>{const{t:e}=Qe("order"),t=P(),r=N(),a=Y().minDeliveryAmount;if(st()<a){return e("Minimum order amount for delivery is {{amount}}",{amount:o.priceFormatter(a,r,t)})}return null},pt=({address:r,errorMessage:o,onChange:a})=>{const{t:n}=Qe("auth"),{t:i}=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:r})}),e.jsx(t.OTPInput,{onChangeOTP:e=>{var t;const r=null===(t=null==e?void 0:e.toUpperCase)||void 0===t?void 0:t.call(e);queueMicrotask(()=>{a(r)})},errorMessage:o?i(o):void 0,inputMode:"text"})]})},_t=({formErrors:o,onChange:a})=>{const[n,i]=r.useState(""),{t:d}=Qe("error"),s=A(),l=P(),{url:u}=y(s,l),c=r.useCallback(e=>{var t,r;const o=null!==(r=null===(t=e.target)||void 0===t?void 0:t.value)&&void 0!==r?r:"";i(o),a(o)},[a]);return e.jsxs(t.Column,{className:et.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:o.email?d(o.email):void 0}),e.jsx("div",{className:et.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 Et={};var vt={},ht="HoursList-module_container__wYX5G",gt="HoursList-module_title__D7Q8u";const It=({title:r,days:a})=>{const{t:n}=Qe("branch");return o.isEmpty(a)?null:e.jsxs(t.Column,{className:ht,gap:.5,fullWidth:!0,children:[r&&e.jsx(t.Text,{weight:"medium",className:gt,children:n(r)}),a.map(({day:r,hours:o})=>{const a=!o,i=a?n("Closed"):`${o.openAt} - ${o.closeAt}`;return e.jsxs(t.Row,{justifyContent:"space-between",fullWidth:!0,children:[e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",children:n(`WEEKDAY-${r}`)}),e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",color:a?t.UIElementType.DANGER:"normal",children:i})]},r)})]})},yt=({openingHours:r,deliveryHours:a})=>{const n=(null==r?void 0:r.days)||[],i=(null==a?void 0:a.days)||[],d=(()=>{const e=Y();return null==e?void 0:e.deliveryOrderEnabled})();return o.isEmpty(n)?null:e.jsxs(t.Column,{className:vt.container,gap:2,children:[e.jsx(It,{days:n}),d&&e.jsx(It,{title:"Delivery Hours",days:i})]})};var Tt={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 Dt=({size:n,zIndex:i=100})=>{const[d,s]=r.useState(!1),l=r.useCallback(()=>{const e=window.scrollY>100;e!==d&&s(e)},[d]);return r.useEffect(()=>(window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}),[l]),e.jsx("div",{className:o.classNames(Tt,{container:!0,visible:d}),style:{zIndex:i},children:e.jsx(t.IconButton,{icon:a.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 xt=({children:t,id:r})=>{const o=H(),a=L();return o?e.jsx("div",{className:At.item,onClick:()=>o(r),children:t}):e.jsx("a",{href:`${a}/${r}`,className:At.item,children:t})},Ct=({branch:r})=>{const{id:n,address:i,coverPhoto:d,name:s}=r||{},l=`${j().name} ${s}`;return e.jsx(xt,{id:n,children:e.jsxs("div",{className:o.classNames(At,{content:!0,noImage:!d}),children:[d&&e.jsx("div",{className:At.imageContainer,children:e.jsx("img",{src:b(d),alt:l,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:l}),e.jsxs(t.Row,{alignItems:"center",gap:.5,justifyContent:"center",fullWidth:!0,children:[e.jsx(t.SVGIcon,{icon:a.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:At.address,children:i})]})]})]})})},Ot=()=>{const r=(()=>{const{branches:e}=R();return e||[]})();return e.jsx("div",{className:bt,children:e.jsx(t.Container,{className:ft,children:r.map(t=>e.jsx(Ct,{branch:t},t.id))})})};var Rt={};const jt=e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.listingPrice)&&void 0!==t?t:null==e?void 0:e.price)&&void 0!==r?r:0},Nt=(e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)};var St;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(St||(St={}));const Pt=({product:e,quantity:t,language:r,currency:a,variantId:n,selectedAddons:i})=>{if(!e||0===Object.keys(e).length)return o.priceFormatter(0,a,r);const d=n?(e.variants||[]).find(({id:e})=>e===n):void 0,s=jt(n?d:e),l=((e,t={})=>{let r=0;for(const o of(null==e?void 0:e.addons)||[]){const{id:e,selectType:a,options:n}=o;if(!Object.prototype.hasOwnProperty.call(t,e))continue;const i=t[e],d=a===St.SINGLE?[i]:i||[];for(const e of d){const t=(n||[]).find(({id:t})=>t===e);t&&(r+=jt(t))}}return r})(e,i),u=(s+l)*t;return o.priceFormatter(u,a,r)},kt=(e,t)=>{var r;return(null===(r=null==e?void 0:e.translations)||void 0===r?void 0:r[t])||{}},Lt=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},wt=e=>{var t;const{products:r}=R();return(null===(t=null==r?void 0:r.find)||void 0===t?void 0:t.call(r,({id:t})=>t===e))||{}},Mt=(e,t)=>{var r,o;return(null===(o=null===(r=null==e?void 0:e.translations)||void 0===r?void 0:r.find)||void 0===o?void 0:o.call(r,e=>e.language===t))||{}},Ut="digital_menu",zt=`${Ut}_category_select`,Wt=`${Ut}_category_scroll`,Bt=`${Ut}_product_details`,Vt=`${Ut}_product_add_cart`,Yt=`${Ut}_product_view_changed`,Gt=[zt,Wt,Bt,Vt];var Ft="Categories-module_categories__Hh8hl";const Ht=({categoryProductMap:a=[],language:n,selectedCategoryId:i,skipTracking:d=!1,onSelectCategory:s})=>{const l=r.useRef({}),u=r.useRef(null),c=r.useCallback(()=>{var e;const t=null===(e=null==l?void 0:l.current)||void 0===e?void 0:e[i];if(!t||!u.current)return;const r=u.current.clientWidth,o=t.offsetLeft-r/2+t.offsetWidth/2;u.current.scrollTo({left:o,behavior:"smooth"})},[i]);return r.useEffect(()=>{i&&c()},[i,c]),e.jsx("div",{className:Ft,children:e.jsx(t.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(u.current=e.current)},paddingInline:1,children:(a||[]).map(({id:r,translations:a})=>{const{name:u}=a.find(e=>e.language===n)||{};return e.jsx(t.CarouselItem,{children:e.jsx(t.Chip,{onClick:()=>((e,t)=>{e!==i&&(s(e),d||o.trackEvent(zt,{name:t}))})(r,u),type:t.UIElementType.BORDERED_PRIMARY,active:r===i,children:e.jsx("div",{ref:e=>{e&&(l.current[r]=e)},children:u})})},r)})})})};var Kt="Products-module_container__bF2LF",qt="Products-module_view__l857X",Qt="Products-module_products__AoDrY",$t="Products-module_category__Sp7dE",Xt="Products-module_list__LH4v5",Zt={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 Jt=({product:n,currency:i,language:d,onClick:s})=>{const{addProduct:l}=pe(),{image160:u,volume:c,available:m,sellUnitType:p,variants:_,addons:E}=n||{},{name:v,description:h}=r.useMemo(()=>kt(n,d),[n,d]),g=r.useMemo(()=>Nt(n,i,d),[n,i,d]),{t:I}=Qe("order"),{addToOrderEnabled:y}=Y(),D=y&&m,b=(null==_?void 0:_.length)>0,f=(null==E?void 0:E.length)>0,A=p===dt.WEIGHT||p===dt.VOLUME||b||f,x=!!u;return e.jsxs("div",{className:o.classNames(Zt,{container:!0,isClickable:!!s,noImage:!x}),onClick:s,children:[e.jsxs(t.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:Zt.info,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:Zt.name,children:v}),e.jsx("p",{className:Zt.description,children:h}),e.jsxs(t.Row,{className:Zt.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:g}),!!c&&e.jsx("div",{className:Zt.volume,children:c})]}),!m&&e.jsx(t.Text,{size:"xs",color:"danger",className:Zt.notAvailableText,children:I("Not available")})]})}),x&&e.jsx("img",{src:T(u),alt:v||"menu",className:o.classNames(Zt,{image:!0,notAvailable:!m}),loading:"lazy",width:160,height:90})]}),D&&e.jsx("div",{className:Zt.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),A&&s)return s();l({product:n}),o.trackEvent(Vt,{name:v,quantity:1})},icon:a.Plus,type:t.UIElementType.DEFAULT})})]})};var er={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",isDashboard:"ProductsGridItem-module_isDashboard__n-zKw",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 tr=({product:n,currency:i,language:d,defaultImage:s="",isDashboard:l=!1,backgroundColor:u,onClick:c,onAddProduct:m})=>{const{volume:p,image580:_,image160:E,image1024:v,available:h,sellUnitType:g,variants:I,addons:y}=n||{},D=_||v||E||s,{name:b,description:f}=r.useMemo(()=>kt(n,d),[n,d]),A=r.useMemo(()=>Nt(n,i,d),[n,i,d]),{t:x}=Qe("order",{language:d}),{addToOrderEnabled:C}=Y(),O=C&&h,R=(null==I?void 0:I.length)>0,j=(null==y?void 0:y.length)>0,N=g===dt.WEIGHT||g===dt.VOLUME||R||j;return e.jsx("div",{className:er.container,children:e.jsxs("div",{className:o.classNames(er,{content:!0,isClickable:!!c,noImage:!D,hasBackgroundColor:!D&&Boolean(u),isDashboard:l}),onClick:c,style:{backgroundColor:u},children:[D&&e.jsx("div",{className:er.imageContainer,children:e.jsx("img",{src:T(D),alt:b||"menu",className:o.classNames(er,{image:!0,notAvailable:!h}),loading:"lazy",width:580,height:326})}),e.jsx("div",{className:er.info,children:e.jsx("div",{className:er.data,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:er.name,children:b}),!l&&e.jsx("p",{className:er.description,children:f}),e.jsxs(t.Row,{className:er.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:A}),!!p&&e.jsx(t.Text,{color:"white",className:er.volume,children:p})]}),!h&&e.jsx(t.Text,{color:"white",size:"xs",className:er.notAvailableText,children:x("Not available")})]})})}),O&&e.jsx("div",{className:er.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N&&c)return c();m({product:n}),o.trackEvent(Vt,{name:b,quantity:1})},icon:a.Plus,type:t.UIElementType.DEFAULT})})]})})},rr=({product:t,currency:r,language:o,onClick:a})=>{const{addProduct:n}=pe();return e.jsx(tr,{onAddProduct:n,product:t,currency:r,language:o,onClick:a})},or=r.memo(({categoryProductMap:n=[],currency:i,language:d,productBlocksRef:s,containerRef:l,onCategoryInView:u})=>{const[c,m]=r.useState(it.LIST),{setModal:_}=t.useModalContext(),E=be(),v=[{icon:a.List,type:it.LIST},{icon:a.Grid,type:it.GRID}],h=e=>{const{name:t}=kt(e,d);o.trackEvent(Bt,{name:t}),_({id:p,params:{product:e}})};return r.useEffect(()=>{const e=new IntersectionObserver(e=>{var t;const r=((null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let o=null,a=1/0;e.forEach(e=>{if(e.isIntersecting){const t=e.boundingClientRect,n=t.top+t.height/2,i=Math.abs(n-r);i<a&&(a=i,o=e.target.getAttribute("data-category-id"))}}),o&&u(Number(o))},{threshold:.1});return Object.entries(s.current||{}).forEach(([t,r])=>{r&&(r.setAttribute("data-category-id",t),e.observe(r))}),()=>{e.disconnect()}},[s,l,u]),e.jsxs("div",{className:Kt,children:[e.jsxs(t.Row,{className:qt,alignItems:"center",children:[v.map(({icon:r,type:a})=>e.jsx(t.IconButton,{icon:r,onClick:()=>(e=>{m(e),o.trackEvent(Yt,{name:e})})(a),type:a===c?t.UIElementType.PRIMARY:t.UIElementType.DEFAULT},a)),!o.isEmpty(E)&&e.jsx("a",{href:E,children:e.jsx(t.IconButton,{icon:a.PlaySquare,onClick:()=>{},type:t.UIElementType.DEFAULT})})]}),e.jsx(t.Column,{gap:0,children:(n||[]).map(r=>{const{name:o}=Mt(r,d),{id:a,products:n}=r;return e.jsxs("div",{className:Qt,ref:e=>{e&&(s.current[a]=e)},"data-category-id":a,children:[e.jsx("h2",{className:$t,children:o}),e.jsx("div",{className:Xt,children:e.jsx(t.Column,{gap:0,children:(n||[]).map(t=>c===it.GRID?e.jsx(rr,{product:t,currency:i,language:d,onClick:()=>h(t)},t.id):e.jsx(Jt,{product:t,currency:i,language:d,onClick:()=>h(t)},t.id))})})]},a)})})]})},(e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language);or.displayName="Products";var ar={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 nr=({totalCount:n,isVisible:i,onClick:d,isInPublicMenu:s=!1})=>{const l=r.useRef(null),u=r.useRef(!1),c=n%1==0?n:n.toFixed(2);return r.useEffect(()=>{if(!u.current)return;const e=l.current;e&&(e.classList.remove(ar.animate),e.offsetWidth,e.classList.add(ar.animate))},[n]),r.useEffect(()=>{u.current=!0},[]),e.jsxs("div",{className:o.classNames(ar,{container:!0,isVisible:i,isInPublicMenu:s}),onClick:d,ref:l,children:[e.jsx(t.SVGIcon,{icon:a.ShoppingBag,color:t.UIElementType.DEFAULT,size:"md"}),e.jsx("div",{className:ar.count,children:c})]})},ir=({alwaysVisible:t=!1,isInPublicMenu:r=!1})=>{const o=ut(),{setIsOrderOpen:a,isOrderOpen:n}=pe();return o<=0&&!t?null:e.jsx(nr,{totalCount:o,isVisible:!n,onClick:()=>a(!n),isInPublicMenu:r})},dr=({containerRef:t})=>{var a;const n=(()=>{const{products:e}=R();return e||[]})(),i=(()=>{const{categories:e}=R();return e||[]})(),d=P(),s=N(),l=((e,t)=>{const r=t.reduce((e,t)=>{if(!t.visible)return e;const r=Number(t.categoryId);return e[r]||(e[r]=[]),e[r].push(t),e},{});return e.map(e=>Object.assign(Object.assign({},e),{products:r[Number(e.id)]||[]})).filter(e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0})})(i,n),[u,c]=r.useState(null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.id),m=r.useRef({}),p=r.useRef(!0),_=r.useCallback(e=>q(void 0,void 0,void 0,function*(){p.current=!1,c(e),(e=>{var t;const r=null===(t=null==m?void 0:m.current)||void 0===t?void 0:t[e];r&&(setTimeout(()=>{r.scrollIntoView({behavior:"smooth",block:"start"})},100),setTimeout(()=>{p.current=!0},1e3))})(e)}),[]),E=r.useCallback(e=>{if(!(null==p?void 0:p.current))return;const t=((e,t,r)=>{var a;const n=null===(a=null==t?void 0:t.find)||void 0===a?void 0:a.call(t,({id:t})=>t===e);if(o.isEmpty(n))return"";const{name:i}=Mt(n,r);return i||""})(e,i,d);o.trackEvent(Wt,{name:t}),c(e)},[i,d]),v=r.useCallback(()=>q(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 r=(i||[]).find(({id:e})=>e===t);o.isEmpty(r)||_(t)}),[i,_]);return r.useEffect(()=>{v()},[v]),e.jsxs("div",{className:Rt.container,children:[e.jsx(Ht,{categoryProductMap:l,language:d,selectedCategoryId:u,onSelectCategory:_}),e.jsx(or,{categoryProductMap:l,language:d,currency:s,productBlocksRef:m,containerRef:t,onCategoryInView:E}),e.jsx(ir,{isInPublicMenu:!0})]})};var sr="VideoFeed-module_container__6tYYs",lr="VideoFeed-module_videos__6KjGc",ur="Video-module_container__HT89i",cr="Video-module_videoContainer__GE-7a",mr="Video-module_video__36hFc",pr="Video-module_top__SIvSk",_r="Video-module_actionIcon__F6Ze1",Er="Video-module_play__XCToT",vr="Video-module_bottom__DNzui",hr="Video-module_actions__cOh-0",gr="Actions-module_container__K2DUX",Ir="Actions-module_action__u-Mvu",yr="Actions-module_animate__Y2p0y";const Tr=({video:n})=>{const{setModal:i}=t.useModalContext(),{addProduct:d,setIsOrderOpen:s}=pe(),l=r.useRef(null),{productId:u,productName:c}=n||{},m=ut(),_=wt(u),{addToOrderEnabled:E}=Y(),{sellUnitType:v,variants:h,addons:g,available:I}=_,y=(null==h?void 0:h.length)>0,T=(null==g?void 0:g.length)>0,D=v===dt.WEIGHT||v===dt.VOLUME||y||T,b=E&&I,f=r.useCallback(()=>{i({id:p,params:{product:_}})},[_,i]),A=r.useCallback(()=>{if(D)return f();d({product:_}),o.trackEvent(Vt,{name:c,quantity:1})},[d,f,_,c,D]),x=[{icon:a.Eye,onClick:f},...b?[{icon:a.Plus,onClick:A}]:[],{icon:a.ShoppingBag,onClick:()=>s(!0),value:m,ref:l}];return r.useEffect(()=>{const e=l.current;e&&(e.classList.remove(yr),e.offsetWidth,e.classList.add(yr))},[m]),e.jsx(t.Column,{className:gr,fullWidth:!0,gap:.5,children:x.map(({icon:r,onClick:a,value:n,ref:i},d)=>e.jsxs(t.Column,{alignItems:"center",gap:.375,children:[e.jsx("div",{className:Ir,onClick:a,ref:i,children:e.jsx(t.SVGIcon,{icon:r,size:"md",color:t.UIElementType.DEFAULT})}),!o.isNil(n)&&e.jsx(t.Text,{size:"xs",weight:"bold",color:"white",fullWidth:!0,align:"center",children:n})]},d))})};var Dr={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 br=({video:a})=>{const[n,i]=r.useState(!1),d=K();if(o.isEmpty(a))return null;const{businessAvatar:s,businessName:l,productName:u,productDescription:c,productPrice:m}=a,p=Boolean(s);return e.jsxs(t.Column,{className:o.classNames(Dr,{container:!0,noAvatar:!p}),gap:.75,fullWidth:!1,children:[e.jsxs("a",{className:Dr.business,href:d,children:[p&&e.jsx(t.Avatar,{source:T(s),size:"sm"}),e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{weight:"medium",color:"white",whiteSpace:"nowrap",className:Dr.productName,children:u}),e.jsx(t.Text,{color:"white",whiteSpace:"nowrap",className:Dr.businessName,weight:"light",children:l})]})]}),e.jsx(t.Text,{color:"white",className:Dr.price,children:m}),Boolean(c)&&e.jsx(t.Row,{onClick:()=>i(e=>!e),children:e.jsx(t.Text,{color:"white",size:"sm",whiteSpace:n?"wrap":"nowrap",className:Dr.description,children:c})})]})},fr=({video:n,isActive:i=!1,shouldLoad:d=!1,isMuted:s=!0,registerVideo:l,setIsMuted:u})=>{const[c,m]=r.useState(!0),p=r.useRef(null),_=r.useRef(!1),E=K(),v=(e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"")(null==n?void 0:n.videoUrl),h=r.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=r.useCallback(()=>{_.current=!0},[]);return r.useEffect(()=>{var e;const t=p.current;t&&(d&&!t.src&&(t.muted=!0,t.playsInline=!0,t.src=v,t.load()),d&&i&&(null===(e=t.play())||void 0===e||e.catch(()=>{})),i||t.paused||t.pause(),!d&&t.src&&(t.pause(),t.removeAttribute("src"),t.load()),m(t.paused))},[d,i,v]),r.useEffect(()=>{p.current&&!c&&p.current.muted!==s&&(p.current.muted=s)},[s,c]),o.isEmpty(n)?null:e.jsx("div",{className:ur,ref:e=>l(n.productId,e),children:e.jsxs("div",{className:cr,children:[e.jsx("video",{ref:p,className:mr,muted:!0,autoPlay:!0,playsInline:!0,preload:"none",loop:!0,controlsList:"nodownload nofullscreen noplaybackrate",controls:!1,disablePictureInPicture:!0,poster:T(n.thumbnail),onClick:h,onPlay:I}),e.jsxs(t.Row,{className:pr,justifyContent:"space-between",children:[e.jsx("div",{className:_r,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?a.VolumeX:a.VolumeMax,size:"md",color:t.UIElementType.DEFAULT})}),e.jsx("a",{className:_r,href:E,children:e.jsx(t.SVGIcon,{icon:a.Close,size:"md",color:t.UIElementType.DEFAULT})})]}),c&&e.jsx("div",{className:Er,children:e.jsx(t.SVGIcon,{icon:a.Play,size:"xxxl",color:t.UIElementType.DEFAULT})}),e.jsxs(t.Row,{className:vr,alignItems:"flex-end",gap:1,children:[e.jsx(br,{video:n}),e.jsx(t.Column,{className:hr,justifyContent:"flex-end",fullWidth:!1,fullHeight:!1,children:e.jsx(Tr,{video:n})})]})]})})},Ar=()=>{const[t,o]=r.useState(!0),a=Te(),n=(()=>{const e=Ie(),t=ye();return r.useMemo(()=>t.filter(t=>t.productId!==Number(e)),[t,e])})(),i=r.useRef(null),{activeId:d,register:s}=function(e){const[t,o]=r.useState(null),a=r.useRef(new Map);return r.useEffect(()=>{const t=e.current;if(!t)return;let r;const n=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio)[0];t&&(cancelAnimationFrame(r),r=requestAnimationFrame(()=>{o(e=>{var r,o;const n=null!==(o=null===(r=[...a.current.entries()].find(([,e])=>e===t.target))||void 0===r?void 0:r[0])&&void 0!==o?o:null;return e===n?e:n})}))},{root:t,threshold:[.6,.75,1]});return a.current.forEach(e=>n.observe(e)),()=>{cancelAnimationFrame(r),n.disconnect()}},[e]),{activeId:t,register:(e,t)=>{t&&a.current.set(e,t)}}}(i);return e.jsx("div",{className:sr,children:e.jsxs("div",{className:lr,tabIndex:0,ref:i,children:[e.jsx(fr,{video:a,registerVideo:s,isActive:d===a.productId,shouldLoad:!0,setIsMuted:o,isMuted:t}),n.map(r=>e.jsx(fr,{video:r,registerVideo:s,isActive:d===r.productId,shouldLoad:d===r.productId,setIsMuted:o,isMuted:t},r.productId))]})})};var xr={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"},Cr={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 Or=({isDecreaseDisabled:r=!1,quantity:n=1,size:i="md",focusedSection:d,onIncrease:s,onDecrease:l})=>e.jsxs(t.Row,{className:o.classNames(Cr,{container:!0,focused:"quantity"===d},[Cr[i]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:o.classNames(Cr,{quantityAction:!0,isDisabled:r}),onClick:l,children:e.jsx(t.SVGIcon,{icon:a.Minus})}),e.jsx("div",{className:Cr.quantityValue,children:n}),e.jsx("div",{className:Cr.quantityAction,onClick:s,children:e.jsx(t.SVGIcon,{icon:a.Plus})})]});var Rr="ProductInOrder-module_container__0N57G",jr="ProductInOrder-module_title__TWjM9";const Nr=({productId:r,quantity:o,isInPublicMenu:n=!0,language:i,removeAllProductVariants:d,onModalClose:s})=>{const{setIsOrderOpen:l}=pe(),{t:u}=Qe("order",{language:i});return o<=0?null:e.jsxs(t.Flex,{className:Rr,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(t.Flex.Item,{flex:1,className:jr,children:[u("In order")," (",o,")"]}),e.jsx(t.Flex.Item,{flex:0,children:e.jsxs(t.Row,{children:[e.jsx(t.IconButton,{icon:a.Trash,onClick:()=>{d(r)},type:t.UIElementType.DANGER,tooltip:u("Remove from order")}),n&&e.jsx(t.IconButton,{icon:a.ShoppingBag,onClick:()=>{l(!0),s&&s()},type:t.UIElementType.SUCCESS,tooltip:u("View order")})]})})]})};var Sr={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 Pr=({product:a,selectedVariant:n,focusedSection:i,language:d,currency:s,onSelectVariant:l})=>{const{t:u}=Qe("order",{language:d}),c=r.useRef(null),{variants:m}=a||{},p="variant"===i;return r.useEffect(()=>{p&&c.current&&c.current.scrollIntoView({behavior:"smooth"})},[i,p]),e.jsxs(t.Column,{className:o.classNames(Sr,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:Sr.variantsTitle,ref:c,children:u("Product choices")}),(m||[]).map(r=>{const{id:a}=r||{},i=Lt(r,d),u=((e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)})(r,s,d);return e.jsxs(t.Row,{justifyContent:"space-between",onClick:()=>l(a),className:Sr.variant,children:[e.jsx(t.Input,{label:i,name:"variant",onChange:()=>l(a),checked:n===a,type:t.InputType.RADIO,size:"small",noMargin:!0}),e.jsx("div",{className:Sr.variantPrice,children:u})]},a)})]})};var kr={container:"ProductAddons-module_container__DRnT7"};const Lr=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},wr=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},Mr=({product:r,selectedAddons:a,language:n,currency:i,onOptionSelect:d})=>{const{addons:s}=r||{};return e.jsx(t.Column,{className:kr.container,gap:1.5,fullWidth:!0,children:(s||[]).map(r=>{const{id:s,options:l,selectType:u}=r||{},c=Lr(r,n);return e.jsxs(t.Column,{children:[e.jsx(t.Text,{variant:"bold",children:c}),e.jsx(t.Column,{gap:1,fullWidth:!0,children:(l||[]).map(r=>{const{id:l}=r||{},c=((e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)})(r,i,n),m=wr(r,n),p=u===St.SINGLE,_=p?a[s]===l:(a[s]||[]).includes(l);return e.jsxs(t.Row,{justifyContent:"space-between",className:kr.option,children:[e.jsx(t.Input,{label:m,name:`option-${s}`,onChange:()=>d({addonId:s,optionId:l,isSingle:p,isRemove:!p&&_}),checked:_,type:p?t.InputType.RADIO:t.InputType.CHECKBOX,size:"small",noMargin:!0}),e.jsx("div",{className:kr.optionPrice,children:c})]},l)})})]},s)})})},Ur=({product:n,language:i,currency:d,selectedVariant:s,focusedSection:l,selectedAddons:u,isDecreaseDisabled:c,quantity:m,actionTitle:p,isInPublicMenu:_,productQuantityInOrderWithAllVariants:E,modalRef:v,videoUrl:h,addToOrderEnabled:g=!0,onClose:I,setSelectedVariant:y,onOptionSelect:D,adjustQuantity:b,onSubmit:f,removeAllProductVariants:A,onQuantityChange:x})=>{const{t:C}=Qe("order",{language:i}),{name:O,description:R}=r.useMemo(()=>kt(n,i),[n,i]),j=r.useMemo(()=>Nt(n,d,i),[n,d,i]),N=r.useMemo(()=>(e=>{switch(e){case dt.WEIGHT:return" / kg";case dt.VOLUME:return" / l";default:return""}})(null==n?void 0:n.sellUnitType),[n]),S=r.useMemo(()=>Pt({product:n,quantity:m,language:i,currency:d,variantId:s,selectedAddons:u}),[n,m,i,d,s,u]),P=r.useMemo(()=>(e=>{switch(e){case dt.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 dt.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=r.useCallback(e=>{var t,r;(null===(r=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.contains)||void 0===r?void 0:r.call(t,null==e?void 0:e.target))||I&&I()},[v,I]);if(o.isEmpty(n))return null;const{image1024:L,volume:w,variants:M,addons:U,available:z,sellUnitType:W}=n,B=(null==M?void 0:M.length)>0,V=(null==U?void 0:U.length)>0,Y=W===dt.WEIGHT||W===dt.VOLUME;return e.jsx("div",{className:xr.container,onClick:k,children:e.jsx(t.Modal,{onClose:I,ref:v,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:xr.content,children:[e.jsxs(t.Column,{gap:0,children:[e.jsxs("div",{className:xr.media,children:[L&&e.jsx("img",{src:T(L),width:1024,height:400,alt:O||"product",className:xr.image}),Boolean(h)&&e.jsxs("a",{href:h,className:xr.play,children:[e.jsx(t.SVGIcon,{icon:a.PlayCircle,color:t.UIElementType.DEFAULT}),e.jsx(t.Text,{color:"white",children:C("Play video")})]})]}),e.jsxs(t.Column,{className:xr.details,gap:1,children:[e.jsx("h2",{className:xr.name,children:O}),e.jsxs(t.Row,{justifyContent:"space-between",children:[e.jsxs("div",{className:xr.price,children:[j,Boolean(N)&&C(N)]}),e.jsx("div",{className:xr.volume,children:w})]}),e.jsx("div",{className:xr.description,children:R})]}),(B||V)&&e.jsxs(t.Column,{gap:0,className:xr.choices,children:[B&&e.jsx(Pr,{product:n,selectedVariant:s,focusedSection:l,language:i,currency:d,onSelectVariant:y}),V&&e.jsx(Mr,{product:n,selectedAddons:u,language:i,currency:d,onOptionSelect:D})]}),e.jsxs(t.Column,{gap:0,fullWidth:!0,className:xr.stickyBottom,children:[Y&&e.jsx(t.Numpad,{onChange:x,value:m,shortcuts:P}),e.jsx(Nr,{productId:null==n?void 0:n.id,onModalClose:I,isInPublicMenu:_,removeAllProductVariants:A,quantity:E,language:i})]})]}),e.jsx("div",{className:xr.close,children:e.jsx(t.IconButton,{onClick:I,icon:a.Close})})]}),footer:g?e.jsxs(t.Row,{className:xr.addToOrder,gap:.5,children:[e.jsx(Or,{focusedSection:l,isDecreaseDisabled:c,onDecrease:()=>b(-1),onIncrease:()=>b(1),quantity:m}),e.jsx(t.Button,{className:xr.addAction,label:z?e.jsxs(t.Row,{fullWidth:!0,justifyContent:"space-between",gap:.5,children:[e.jsx("span",{className:xr.actionTitle,children:p}),e.jsx("span",{children:S})]}):C("Not available"),onClick:f,size:"xl",fullWidth:!0,disabled:!z,paddingBlock:.5})]}):null})})};var zr="OrderDrawer-module_container__DymQj",Wr="OrderDrawer-module_content__khduX",Br="OrderDrawer-module_paymentMethods__9i-sb",Vr="OrderDrawer-module_footer__8XfD9",Yr="OrderDrawer-module_noteButton__M8BVx",Gr={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 Fr=({actionText:r,isLoading:a=!1,isDisabled:n=!1,onClick:i})=>{const{orderStep:d}=pe(),s=ut(),l=(()=>{const e=st(),t=P(),r=N();return o.priceFormatter(e,r,t)})(),u=d===J.DETAILS;return e.jsxs(t.Flex,{className:o.classNames(Gr,{container:!0,isLoading:a,isClickable:!!i,isDisabled:n,inDetails:u}),justifyContent:"space-between",alignItems:"center",onClick:a||n?null:i,children:[e.jsx(t.Flex.Item,{flex:1,children:e.jsxs(t.Row,{alignItems:"center",children:[e.jsx("div",{className:Gr.count,children:s}),e.jsx("div",{className:Gr.actionText,children:a?e.jsx(t.Loading,{}):r})]})}),!u&&e.jsx(t.Flex.Item,{className:Gr.totalPrice,flex:1,children:l})]})},Hr=({isOrderItemsEmpty:n=!1,orderError:i})=>{const{t:d}=Qe("order"),{t:s}=Qe("error"),{order:c,orderStep:m,orderItems:p,setOrderStep:_,setIsOrderOpen:E,setTrackingId:v,updateOrderErrors:h,resetErrors:g}=pe(),{setModal:I}=t.useModalContext(),y=G(),T=(()=>{const{customer:e}=pe();return e||{}})(),{isOpen:D,isDelivering:b}=V(),f=lt(),[A,x]=r.useState(!1),[C,O]=r.useState(""),R=null==c?void 0:c.note,j=!!R,N=y&&m===J.CART,S=D||b,P=!!i||!S,k=()=>q(void 0,void 0,void 0,function*(){try{O(""),x(!0);const e=yield(e=>q(void 0,void 0,void 0,function*(){return se.post("/customer/order",e)}))(f);return e.trackingId}catch(e){return O((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx",method:"handleSubmit"}),""}finally{x(!1)}}),L=y&&S?()=>q(void 0,void 0,void 0,function*(){if(o.isEmpty(T))return I({id:u});if(g(),m===J.DETAILS){if(c.orderType===Q.DELIVERY&&o.isEmpty(null==T?void 0:T.addresses))return h("customer");if(c.orderType===Q.DINE_IN&&!(null==c?void 0:c.tableId))return h("tableId");if(o.isEmpty(p))return h("items");const e=yield k();if(!e)return;v(e)}const e=(te.findIndex(e=>e===m)||0)+1;if(e>=te.length)return;const t=te[e];_(t)}):null;return e.jsxs(t.Column,{className:Vr,fullWidth:!0,children:[!!C&&e.jsx(t.AlertBox,{message:s(C),type:"error",onClear:()=>O("")}),!!i&&e.jsx(t.TextBanner,{text:i,type:t.UIElementType.DANGER,fullWidth:!0}),N&&e.jsx(t.Button,{label:j?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:()=>{I({id:l,params:{note:R}})},size:"xxxl",fullWidth:!0,type:t.UIElementType.LIGHT,className:Yr,icon:j?a.Edit:a.Plus,iconSize:"md"}),n?e.jsx(t.Button,{label:d("Add items"),onClick:()=>E(!1),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):m!==J.COMPLETED?e.jsx(Fr,{actionText:d((()=>{if(!y)return"Subtotal";if(!S)return"Closed Now";switch(m){case J.CART:return"Go to checkout";case J.DETAILS:return"Place order";default:return"Continue"}})()),onClick:L,isLoading:A,isDisabled:P}):null]})};var Kr={},qr="OrderListItem-module_container__Tj4RI",Qr="OrderListItem-module_image__o3PIC",$r="OrderListItem-module_data__BLzxw",Xr="OrderListItem-module_name__QEzuZ",Zr="OrderListItem-module_price__-V2qL",Jr="ProductQuantity-module_quantity__PzTpj";const eo=({productId:t,variantId:r,min:o=1,size:a="md",selectedAddons:n,isDisabled:i=!1})=>{const d=(({productId:e,variantId:t,selectedAddons:r})=>{const{orderItems:o}=pe(),a=o[ne(e,t,r)];return(null==a?void 0:a.quantity)||1})({productId:t,variantId:r,selectedAddons:n}),s=wt(t),{updateProduct:l}=pe(),u=d===o;return i?e.jsx("div",{className:Jr,children:d}):e.jsx(Or,{isDecreaseDisabled:u,onDecrease:()=>l({product:s,quantity:d-1,variantId:r,selectedAddons:n}),onIncrease:()=>l({product:s,quantity:d+1,variantId:r,selectedAddons:n}),quantity:d,size:a})},to=({item:r,product:a,language:n})=>e.jsx(e.Fragment,{children:(r.addons||[]).map(({addonId:r,options:i})=>{const d=((e,t)=>((null==e?void 0:e.addons)||[]).find(({id:e})=>e===t)||{})(a,r),s=((null==d?void 0:d.options)||[]).filter(e=>null==i?void 0:i.some(({optionId:t})=>t===e.id));if(o.isEmpty(d)||o.isEmpty(s))return null;const l=Lr(d,n),u=s.map(e=>wr(e,n)).filter(Boolean).join(", ");return l&&u?e.jsxs(t.Text,{color:"muted",size:"xs",children:[l,": ",u]},r):null})}),ro=({item:a,isDisabled:n=!1})=>{var i;const{productId:d}=a||{},s=null===(i=null==a?void 0:a.variant)||void 0===i?void 0:i.variantId,l=(e=>{const t={};for(const{addonId:r,options:o=[]}of e.addons||[]){const e=o.map(({optionId:e})=>e);t[r]=1===e.length?e[0]:e}return t})(a),u=wt(d),c=((e,t)=>{var r,o;return(null===(o=null===(r=null==e?void 0:e.variants)||void 0===r?void 0:r.find)||void 0===o?void 0:o.call(r,e=>e.id===t))||{}})(u,s),m=P(),p=N(),{image160:_}=u,E=Lt(c,m),{name:v}=r.useMemo(()=>kt(u,m),[u,m]),h=r.useMemo(()=>((e,t,r)=>{const a=ae(e);return o.priceFormatter(a,t,r)})(a,p,m),[a,p,m]);return e.jsxs(t.Row,{className:qr,gap:1,alignItems:"flex-start",children:[_&&e.jsx("img",{src:T(_),alt:v||"menu",className:Qr,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:$r,children:[e.jsx("div",{className:Xr,children:v}),e.jsxs(t.Column,{gap:0,children:[!!E&&e.jsx(t.Text,{color:"muted",size:"xs",children:E}),e.jsx(to,{item:a,product:u,language:m})]}),e.jsx("div",{className:Zr,children:h})]}),e.jsx(eo,{productId:d,variantId:s,selectedAddons:l,size:"sm",min:0,isDisabled:n})]})},oo=()=>{const{t:r}=Qe("order");return e.jsxs(t.Column,{className:Kr.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(t.Text,{variant:"h2",children:r("Empty order")}),e.jsx(t.Description,{text:r("You don't have any items in your order")})]})},ao=({isDisabled:t=!1})=>{const{orderItems:r}=pe(),a=o.isEmpty(r);return e.jsx("div",{className:Kr.container,children:a?e.jsx(oo,{}):e.jsx("div",{className:Kr.items,children:Object.entries(r||{}).map(([r,o])=>e.jsx(ro,{item:o,isDisabled:t},r))})})},no=()=>e.jsx("div",{className:Wr,children:e.jsx(ao,{})}),io=r.createContext(re),so=({children:t})=>{const{order:o,orderItems:a}=pe(),n=W(),i=S(),d=null==n?void 0:n.id,s=null==o?void 0:o.orderType,[l,u]=r.useState(re);return r.useEffect(()=>{const e=(e=>Object.entries(e||{}).map(([e,t])=>{var r;return Object.assign(Object.assign({orderItemsId:e,productId:t.productId,quantity:t.quantity},(null===(r=t.variant)||void 0===r?void 0:r.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}))}))}:{})}))(a);if(!i||!d||!s||0===e.length)return void u(re);const t=new AbortController;return u({data:null,isLoading:!0,error:null}),q(void 0,void 0,void 0,function*(){try{const a=yield(r={businessId:i,branchId:d,orderType:s,items:e},o=t.signal,se.post("/customer/order/calculate",r,{signal:o}));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)})(a))return void u({data:null,isLoading:!1,error:"We couldn't refresh order totals. Please try again."});u({data:a,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 r,o}),()=>{t.abort()}},[null==o?void 0:o.orderType]),e.jsx(io.Provider,{value:l,children:t})};var lo="CustomerAddress-module_container__TGYRV";const uo=()=>{const{t:r}=Qe("customer");return e.jsx(t.Text,{color:t.UIElementType.DANGER,children:r("No address available")})},co=()=>{const r=tt(),{t:o}=Qe("customer"),{additionalNumber:a,street:n,houseNumber:i,cityName:d,countryCode:s}=r,l=nt(n,i,a),u=([d,s]||[]).filter(Boolean).join(", ");return e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{children:l||o("Unknown address")}),u&&e.jsx(t.Text,{size:"sm",color:"muted",children:u})]})},mo=()=>{const r=tt(),{setModal:n}=t.useModalContext();return e.jsx("div",{className:lo,onClick:()=>{n({id:c})},children:e.jsxs(t.Row,{fullWidth:!0,alignItems:"center",children:[e.jsx(t.SVGIcon,{icon:a.MarkerPin,size:"md"}),e.jsx(t.Column,{gap:0,fullWidth:!0,children:o.isEmpty(r)?e.jsx(uo,{}):e.jsx(co,{})}),e.jsx(t.SVGIcon,{icon:a.Edit,size:"sm"})]})})};var po,_o,Eo;!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"}(po||(po={})),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"}(_o||(_o={})),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"}(Eo||(Eo={}));var vo={};const ho=({preDefinedTable:a,tableOptions:n,selectedTableId:i,error:d,disableIfPreDefined:s,language:l,onChange:u})=>{const{t:c}=Qe("order",{language:l}),m=!o.isEmpty(a),p=r.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:vo.table,fullWidth:!0,gap:.5,children:[e.jsx(t.Row,{fullWidth:!0,children:m&&s?e.jsx(t.Text,{variant:"bold",children:a.name}):e.jsx(t.Input,{name:"tableId",options:n,type:t.InputType.SELECT,className:vo.tableInput,value:i,onChange:p,isDisabled:m,fullWidth:!0,noMargin:!0,size:"small",placeholder:c("Select Table")})}),d&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:c(d)})]})},go=()=>{const t=(()=>{const{tableId:e,tables:t}=R();return!e||o.isEmpty(t)?{}:t.find(t=>Number(t.id)===Number(e))||{}})(),r=(()=>{const{tables:e}=R();return e})(),{order:a,updateOrder:n,errors:i}=pe(),d=P(),s=r.map(({id:e,name:t})=>({label:t,value:e}));return e.jsx(ho,{onChange:e=>n({tableId:e}),preDefinedTable:t,tableOptions:s,selectedTableId:null==a?void 0:a.tableId,error:null==i?void 0:i.tableId,language:d,disableIfPreDefined:!0})};var Io="OrderMethods-module_container__KSwfa";const yo=({orderTypes:r,orderType:o,size:a,onSelect:n})=>{const{t:i}=Qe("error"),d=e=>0===e?"right":e+1===r.length?"left":"bottom",s=r.reduce((r,a,n)=>a.isVisible?(r.push((({type:r,icon:a,title:n,isDisabled:s},l)=>({value:r,isDisabled:s,label:e.jsx(t.Tooltip,{hint:s?i("ORDER_TYPE_DISABLED_AT_THIS_TIME"):null,position:d(l),children:e.jsxs(t.Row,{gap:.5,flexWrap:"nowrap",children:[e.jsx(t.SVGIcon,{icon:a}),e.jsx(t.Text,{color:r!==o||s?"normal":"white",whiteSpace:"nowrap",children:n})]})})}))(a,n)),r):r,[]);return e.jsx("div",{className:Io,children:e.jsx(t.MethodSelection,{methods:s,onSelect:n,selectedMethod:o,fullWidth:!0,size:a,gap:.5})})};var To="OrderPaymentSummary-module_container__HF7-X",Do="OrderPaymentSummary-module_row__eikWa";const bo=({textSize:r,totalPriceWithoutTax:a=0,totalPriceWithTaxAndFees:n=0,deliveryFee:i=0,serviceFee:d=0,serviceFeePercentage:s=0,serviceFeeEnabled:l=!1,totalTax:u,discountAmount:c=0,discountType:m,discountRate:p,currency:_,language:E,orderType:v})=>{const{t:h}=Qe("order",{language:E}),g=o.priceFormatter(a,_,E),I=o.priceFormatter(u,_,E),y=o.priceFormatter(i,_,E),T=o.priceFormatter(c,_,E),D=o.priceFormatter(d,_,E),b=o.priceFormatter(n,_,E);return e.jsxs(t.Column,{className:To,fullWidth:!0,gap:0,children:[e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Items")}),e.jsx(t.Text,{size:r,children:g})]}),v===Q.DELIVERY&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Delivery Fee")}),e.jsx(t.Text,{size:r,children:y})]}),l&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Service Fee ({{rate}}%)",{rate:String(s)})}),e.jsx(t.Text,{size:r,children:D})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Tax")}),e.jsx(t.Text,{size:r,children:I})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,color:"bold",children:h("Total")}),e.jsx(t.Text,{size:r,color:"bold",children:b})]}),c>0&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,color:"muted",children:"PERCENTAGE"===m?h("Discount ({{rate}}%)",{rate:String(p)}):h("Discount")}),e.jsxs(t.Text,{size:r,weight:"medium",color:"success",children:["-",T]})]})]})},fo=()=>{var o,n,i,d,s,l;const u=P(),c=N(),{order:{orderType:m,paymentMethod:p},updateOrder:_}=pe(),{data:E}=r.useContext(io),{isOpen:v,isDelivering:h}=V(),{deliveryOrderEnabled:g,dineInOrderEnabled:I,pickupOrderEnabled:y,deliveryFeeAmount:T,serviceChargePercentage:D,serviceChargeEnabled:b}=Y(),{t:f}=Qe("order"),A=[{type:Q.DELIVERY,icon:a.Delivery,title:f("Delivery"),isDisabled:!h,isVisible:g},{type:Q.DINE_IN,icon:a.Grid,title:f("Dine in"),isDisabled:!v,isVisible:I},{type:Q.PICK_UP,icon:a.ShoppingBag,title:f("Pickup"),isDisabled:!v,isVisible:y}],x=[{value:Z.CASH,label:f("Cash")},{value:Z.CARD,label:f("Card")}];return e.jsxs(t.Column,{className:Wr,gap:1,children:[e.jsx(yo,{orderTypes:A,orderType:m,size:"small",onSelect:e=>_({orderType:e})}),m===Q.DELIVERY&&e.jsx(mo,{}),m===Q.DINE_IN&&e.jsx(t.Padding,{paddingInline:1,fullWidth:!0,children:e.jsx(go,{})}),e.jsx(t.Row,{className:Br,children:x.map(({label:r,value:o})=>e.jsx(t.Input,{label:r,name:"paymentMethod",onChange:()=>_({paymentMethod:o}),checked:p===o,type:t.InputType.RADIO,size:"small",noMargin:!0},o))}),e.jsx(t.Accordion,{title:f("Order summary"),content:e.jsx(ao,{isDisabled:!0}),fullWidth:!0,style:"no-shadow",noPadding:!0,headerPaddingInline:1,headerPaddingBlock:1,titleVariant:"h5"}),e.jsx(bo,{textSize:"sm",totalPriceWithoutTax:null!==(o=null==E?void 0:E.totalPriceWithoutTax)&&void 0!==o?o:0,totalPriceWithTax:null!==(n=null==E?void 0:E.totalPriceWithTax)&&void 0!==n?n:0,totalPriceWithTaxAndFees:null!==(i=null==E?void 0:E.totalPriceWithTaxAndFees)&&void 0!==i?i:0,totalTax:null!==(d=null==E?void 0:E.totalTax)&&void 0!==d?d:0,deliveryFee:null!==(s=null==E?void 0:E.deliveryFee)&&void 0!==s?s:T,serviceFee:null!==(l=null==E?void 0:E.serviceFee)&&void 0!==l?l:0,serviceFeePercentage:null!=D?D:0,serviceFeeEnabled:b,language:u,currency:c,orderType:m})]})},Ao=()=>e.jsx(so,{children:e.jsx(fo,{})}),xo=()=>{const{t:r}=Qe("order"),{trackingId:o}=pe(),n=P(),i=A();return e.jsxs(t.Column,{className:Wr,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(t.SVGIcon,{icon:a.Check,size:"xxl",color:t.UIElementType.SUCCESS}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{variant:"h1",align:"center",children:r("Your Order is Completed!")})}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{align:"center",children:r("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://${i}/${n}/order/${o}`,title:r("Track order"),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0,target:"_blank"})})]})},Co=()=>{const{isOrderOpen:a,orderItems:n}=pe(),{orderStep:i,setOrderStep:d,resetOrder:s}=pe(),l=r.useRef(null),{t:u}=Qe("order"),c=(()=>{const{order:e,orderStep:t}=pe(),r=ct(),o=mt(),{t:a}=Qe("error");return t!==J.DETAILS?null:(null==e?void 0:e.orderType)?e.orderType===Q.DELIVERY?o||r:null:a("NO_ORDER_TYPE")})(),m=!!c,p=G()&&(i===J.CART||m),_=o.isEmpty(n),E=()=>{s()};return a?e.jsx("div",{className:zr,onClick:e=>{var t,r;(null===(r=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.contains)||void 0===r?void 0:r.call(t,null==e?void 0:e.target))||E()},children:e.jsx(t.Drawer,{ref:l,onClose:E,isOpen:a,title:u("Your order"),onBack:i===J.CART?void 0:()=>{d(J.CART)},content:(()=>{switch(i){case J.DETAILS:return e.jsx(Ao,{});case J.COMPLETED:return e.jsx(xo,{});default:return e.jsx(no,{})}})(),footer:e.jsx(Hr,{isOrderItemsEmpty:_,orderError:c}),hasLargeFooter:p})}):null},Oo={[l]:({params:o})=>{const{modalRef:a,note:n}=o,[i,d]=r.useState(n||""),{setModal:s}=t.useModalContext(),{updateOrder:l}=pe(),{t:u}=Qe("order"),{t:c}=Qe("common");return e.jsx(t.Modal,{ref:a,header:e.jsx("div",{children:u("Add an order note")}),content:e.jsx("div",{className:Je.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:i,onChange:e=>{var t;return d(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:()=>{l({note:i}),s(null)},size:"md"})]})})},[u]:({params:a})=>{const{t:n}=Qe("auth"),{t:i}=Qe("error"),{t:d}=Qe("common"),{setModal:s}=t.useModalContext(),{setOrderStep:l,getCustomer:u}=pe(),[c,m]=r.useState({otp:"",email:""}),[p,_]=r.useState({}),[E,v]=r.useState(""),[h,g]=r.useState(rt.EMAIL),y=[rt.EMAIL,rt.OTP],{modalRef:T}=a,D=()=>{const e=y.indexOf(h),t=y[e+1];if(t)return g(t);l(J.DETAILS),s(null)},b=r.useCallback(e=>t=>{m(r=>Object.assign(Object.assign({},r),{[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:et.content,fullWidth:!0,children:[!!E&&e.jsx(t.AlertBox,{message:i(E),type:"error",onClear:()=>v(""),inline:!0}),h===rt.OTP?e.jsx(pt,{address:c.email,errorMessage:null==p?void 0:p.otp,onChange:b("otp")}):e.jsx(_t,{onChange:b("email"),formErrors:p})]}),footer:e.jsx(t.Button,{label:d("Continue"),onClick:()=>q(void 0,void 0,void 0,function*(){v("");try{const r=((e,t)=>{const r={},{email:a,otp:n}=e||{};switch(t){case rt.OTP:a&&o.checkIsValidEmail(a)||(r.email="Invalid Email Address"),n&&6===n.length||(r.otp="Invalid OTP");break;case rt.EMAIL:a&&o.checkIsValidEmail(a)||(r.email="Invalid Email Address")}return r})(c,h);if(!o.isEmpty(r))return _(r);switch(_({}),h){case rt.OTP:{const r=yield(e=c.otp,t=c.email,q(void 0,void 0,void 0,function*(){return se.post("/otp/verify",{otp:e,email:t})}));if(!(null==r?void 0:r.accessToken))throw new Error("SOMETHING_WRONG");I.saveAuthToken(r);break}case rt.EMAIL:{const e=yield(e=>q(void 0,void 0,void 0,function*(){return se.post("/customer",{email:e})}))(c.email);if(200!==(null==e?void 0:e.status))throw new Error("SOMETHING_WRONG");break}}yield u(),D()}catch(e){v((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/Modals/Auth/Auth.tsx",method:"handleSubmit",payload:c})}var e,t}),size:"lg",fullWidth:!0})})},[c]:({params:a})=>{const n=E[0].code,{getCustomer:i}=pe(),d=P(),s=W(),{id:l,countryCode:u=n,cityName:c="",street:m="",houseNumber:p="",floor:_,additionalNumber:v="",instructions:h="",longitude:g,latitude:I,postCode:y}=tt(),T={addressId:l,countryCode:u,cityName:c,street:m,houseNumber:p,additionalNumber:v,instructions:h,floor:_,latitude:I,longitude:g,postCode:y},{modalRef:D}=a,{t:b}=Qe("customer"),{t:f}=Qe("error"),{t:A}=Qe("common"),{setModal:x}=t.useModalContext(),[C,O]=r.useState(T),[R,j]=r.useState({}),[N,S]=r.useState(""),[k,L]=r.useState(!1),[w,M]=r.useState(!1),U=R.countryCode||R.cityName||R.street,z=nt(T.street,T.houseNumber,void 0),B=e=>{var t,r;const o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.name,a=null===(r=null==e?void 0:e.target)||void 0===r?void 0:r.value;O(e=>{const t=Object.assign(Object.assign({},e),{[o]:a}),r=at(t);return j(r),t})},V=()=>x(null),Y=r.useCallback(e=>{const t=Object.assign(Object.assign({},C),{countryCode:e.countryCode,cityName:e.cityName,street:e.street,houseNumber:e.houseNumber||"",latitude:e.lat,longitude:e.long,postCode:e.postCode}),r=at(t);O(t),j(r),M(!e.houseNumber)},[C]);return e.jsx(t.Modal,{ref:D,title:b("Update Delivery Address"),onClose:V,content:e.jsx("div",{className:Et.content,children:e.jsxs(t.Column,{fullWidth:!0,children:[!!N&&e.jsx(t.AlertBox,{message:f(N),type:"error",onClear:()=>S(""),inline:!0}),e.jsxs(t.Column,{fullWidth:!0,gap:.5,children:[e.jsx(t.AddressAutocomplete,{onSelect:Y,language:d,origin:{lat:null==s?void 0:s.latitude,lng:null==s?void 0:s.longitude},noMargin:!0,defaultAdressText:z,placeHolder:b("Enter address"),inputLabel:b("Address")}),U&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:f(U)})]}),e.jsxs(t.Flex,{gap:1,children:[w&&e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"houseNumber",label:b("House No."),placeholder:"221B",type:t.InputType.TEXT,value:C.houseNumber,onChange:B,errorMessage:f(R.houseNumber)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"floor",label:b("Floor"),placeholder:"7",type:t.InputType.TEXT,value:C.floor,onChange:B,errorMessage:f(R.floor)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"additionalNumber",label:b("Additional number"),placeholder:"17",type:t.InputType.TEXT,value:C.additionalNumber,onChange:B,errorMessage:f(R.additionalNumber)})})]}),e.jsx(t.Input,{name:"instructions",placeholder:b("Example: Door code is 555"),label:b("Delivery Instructions"),type:t.InputType.TEXT,fullWidth:!0,value:C.instructions,onChange:B,errorMessage:f(R.instructions)})]})}),footer:e.jsx(t.Button,{label:A("Save"),onClick:()=>q(void 0,void 0,void 0,function*(){S("");try{const t=at(C);if(!o.isEmpty(t))return j(t);j({}),L(!0);const r=yield(e={address:C},q(void 0,void 0,void 0,function*(){return se.patch("/customer",e)}));if(200!==(null==r?void 0:r.status))throw new Error("SOMETHING_WRONG");i(),V()}catch(e){S((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx",method:"handleSubmit",payload:C})}finally{L(!1)}var e}),size:"lg",fullWidth:!0,isLoading:k})})},[m]:({params:r})=>{const{setModal:o}=t.useModalContext(),{t:a}=Qe("branch"),{modalRef:n,openingHours:i,deliveryHours:d}=r;return e.jsx(t.Modal,{ref:n,onClose:()=>o(null),content:e.jsx(yt,{openingHours:i,deliveryHours:d}),title:a("Opening Hours")})},[p]:({params:t})=>{const{product:a={},modalRef:n,closeModal:i}=t,d=(null==a?void 0:a.sellUnitType)===dt.WEIGHT||(null==a?void 0:a.sellUnitType)===dt.VOLUME?0:1,s=P(),l=N(),{addToOrderEnabled:u}=Y(),{addProduct:c,updateProduct:m,removeAllProductVariants:p}=pe(),[_,E]=r.useState(d),[v,h]=r.useState(!1),[g,I]=r.useState(null),[y,T]=r.useState(null),[D,b]=r.useState({}),{t:f}=Qe("order"),A=(({productId:e,variantId:t,selectedAddons:r})=>{var a;const{orderItems:n}=pe();return o.isEmpty(n)||!e?0:(null===(a=n[ne(e,t,r)])||void 0===a?void 0:a.quantity)||0})({productId:null==a?void 0:a.id,variantId:g,selectedAddons:D}),x=(e=>{const{orderItems:t}=pe();return o.isEmpty(t)||!e?0:Object.values(t).filter(t=>t.productId===e).reduce((e,t)=>e+t.quantity,0)})(null==a?void 0:a.id),{name:C}=r.useMemo(()=>kt(a,s),[a,s]),O=v?0===_:1===_,R=r.useMemo(()=>f(v?0===_?"Remove from order":"Update order":"Add"),[v,_]),j=De(null==a?void 0:a.id),S=Boolean(a.videoUrl);r.useEffect(()=>{q(void 0,void 0,void 0,function*(){E(A>0?A+1:d),h(A>0)})},[A,a,d]),r.useEffect(()=>{q(void 0,void 0,void 0,function*(){I(null),b({})})},[a]);const k=r.useCallback(e=>{T(e),setTimeout(()=>{T(null)},200)},[]),L=r.useCallback(()=>{var e;return(null===(e=null==a?void 0:a.variants)||void 0===e?void 0:e.length)>0&&!g?k("variant"):_<=0?k("quantity"):(v?m({product:a,quantity:_,variantId:g,selectedAddons:D}):(c({product:a,quantity:_,variantId:g,selectedAddons:D}),o.trackEvent(Vt,{name:C,quantity:_})),void(null==i||i()))},[c,i,k,v,C,a,_,D,g,m]),w=r.useCallback(e=>{-1===e&&O||E(t=>Math.max(0,t+e))},[O]),M=r.useCallback(({addonId:e,optionId:t,isSingle:r,isRemove:o=!1})=>{b(a=>{if(r)return Object.assign(Object.assign({},a),{[e]:t});const n=a[e]||[],i=o?n.filter(e=>e!==t):[...new Set([...n,t])];return Object.assign(Object.assign({},a),{[e]:i})})},[]);return e.jsx(Ur,{modalRef:n,product:a,language:s,currency:l,selectedVariant:g,focusedSection:y,selectedAddons:D,isDecreaseDisabled:O,quantity:_,actionTitle:R,videoUrl:S?j:void 0,addToOrderEnabled:u,onClose:i,setSelectedVariant:I,onOptionSelect:M,adjustQuantity:w,onSubmit:L,removeAllProductVariants:p,productQuantityInOrderWithAllVariants:x,onQuantityChange:e=>E(e),isInPublicMenu:!0})}},Ro=()=>{const{getCustomer:a}=pe(),l=r.useRef(null),u=x(),c=F(),m=z()||c,p=Te(),{url:_,domain:E}=k(),{headerText:v,footerText:h}=(()=>{var e,t,r,o;const a=P(),{menuDesign:n}=R();return{headerText:null!==(t=null===(e=null==n?void 0:n.headerText)||void 0===e?void 0:e[a])&&void 0!==t?t:null,footerText:null!==(o=null===(r=null==n?void 0:n.footerText)||void 0===r?void 0:r[a])&&void 0!==o?o:null}})();return r.useEffect(()=>{u||a()},[a,u]),o.isEmpty(p)?e.jsxs("div",{className:n,ref:l,children:[e.jsx(Ze,{}),m&&v&&e.jsx(t.Text,{fullWidth:!0,align:"center",className:d,children:v}),m?e.jsx(dr,{containerRef:l}):e.jsx(Ot,{}),e.jsx(Dt,{size:"md",zIndex:10}),m&&h&&e.jsx(t.Text,{fullWidth:!0,align:"center",className:s,children:h}),!!E&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:_,className:i,children:E})]}):e.jsx(Ar,{})};var jo={};const No=({currentGoal:o,language:a,setGoal:n})=>{const{t:i}=Qe("events",{language:a}),d=r.useRef({}),s=e=>{switch(e){case Wt:return i("Scrolled to Category");case zt:return i("Category Selected");case Bt:return i("Product Details");case Vt:return i("Product Added to Order");default:return""}},l=r.useCallback(e=>{var t,r;n(e),null===(r=null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.close)||void 0===r||r.call(t)},[n]);return e.jsx(t.DropDown,{action:s(o),actionSize:"large",type:t.UIElementType.BORDERED_PRIMARY,closeRef:d,menu:e.jsx("div",{className:jo.toolbarMenu,children:Gt.map(r=>e.jsx(t.DropDownMenuItem,{onClick:()=>l(r),children:s(r)},r))})})};exports.Categories=Ht,exports.Events=({data:r,isLoading:o=!1,language:a,goal:n,setGoal:i})=>{const{t:d}=Qe("events",{language:a});return e.jsx(t.Card,{title:d("Events"),toolbar:e.jsx(No,{language:a,currentGoal:n,setGoal:i}),children:o?e.jsx(t.Loading,{}):e.jsx(t.BarChart,{data:r})})},exports.OrderFAB=nr,exports.OrderMethods=yo,exports.OrderPaymentSummary=bo,exports.OrderProvider=me,exports.OrderTableUI=ho,exports.ProductDetailsUI=Ur,exports.ProductsGridItem=tr,exports.PublicMenu=({data:r})=>e.jsx(O,{value:r||{},children:e.jsx(me,{children:e.jsxs(t.ModalProvider,{modalsMap:Oo,children:[e.jsx(Ro,{}),e.jsx(Co,{})]})})}),exports.Quantity=Or,exports.useOrderContext=pe;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/ui"),r=require("react"),o=require("@sorocraft/js-utils"),a=require("@sorocraft/ui/icons"),n="PublicMenu-module_container__QLN6U",i="PublicMenu-module_footer__6G3DQ",d="PublicMenu-module_headerText__hKbnP",s="PublicMenu-module_footerText__a4g0i";const l="ADD_UPDATE_NOTES",u="AUTH",c="ADD_UPDATE_ADDRESS",m="BRANCH_BUSINESS_HOURS",p="PRODUCT_DETAILS",_=["en","az","nl","et","tr","ru","pl","pt","hr"],E=[{name:"Azerbaijan",code:"AZ",phoneCode:"+994"}],v="tabres.com",h=v,g="https://images.tabres.com",I=new o.Storage("tabres_cst_act","tabres_cst_rft"),y=(e,t)=>{const r=t||"en";return"localhost:3000"===e?{url:`http://localhost:3000/${r}`,domain:v}:{url:`https://${v}/${r}`,domain:v}},T=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"",D=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",f=(e,t)=>{const r=parseInt(e.replace("#",""),16),o=(r>>16&255)/255,a=(r>>8&255)/255,n=(255&r)/255,i=Math.max(o,a,n),d=Math.min(o,a,n),s=(i+d)/2;let l=0,u=0;if(i!==d){const e=i-d;switch(u=s>.5?e/(2-i-d):e/(i+d),i){case o:l=(a-n)/e+(a<n?6:0);break;case a:l=(n-o)/e+2;break;case n:l=(o-a)/e+4}l/=6}const c=Math.max(0,Math.min(1,s+t/100)),m=(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*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,l+1/3),_=m(t,e,l),E=m(t,e,l-1/3)}const v=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${v(p)}${v(_)}${v(E)}`},A=()=>{const{hostname:e}=R();return e||h},x=()=>{const{isInDashboard:e}=R();return e||!1},C=r.createContext({}),O=({children:t,value:r})=>{var o,a,n,i,d,s,l,u,c,m,p,_,E,v,h,g,I,y,T,D;return e.jsx(C.Provider,{value:r,children:e.jsx("div",{style:{"--sorocraft-color-primary":null===(o=r.menuDesign)||void 0===o?void 0:o.primaryColor,"--sorocraft-color-primary-light":(null===(a=r.menuDesign)||void 0===a?void 0:a.primaryColor)&&f(r.menuDesign.primaryColor,37.5),"--sorocraft-color-primary-active":(null===(n=r.menuDesign)||void 0===n?void 0:n.primaryColor)&&f(r.menuDesign.primaryColor,-7.5),"--tabres-menu-category-background-color":null===(i=r.menuDesign)||void 0===i?void 0:i.categoryBackgroundColor,"--tabres-menu-category-text-color":null===(d=r.menuDesign)||void 0===d?void 0:d.categoryTextColor,"--tabres-menu-product-card-background-color":null===(s=r.menuDesign)||void 0===s?void 0:s.productCardBackgroundColor,"--tabres-menu-product-card-text-color":null===(l=r.menuDesign)||void 0===l?void 0:l.productCardTextColor,"--tabres-menu-product-card-description-text-color":null===(u=r.menuDesign)||void 0===u?void 0:u.productCardDescriptionTextColor,"--tabres-menu-product-card-volume-text-color":null===(c=r.menuDesign)||void 0===c?void 0:c.productCardVolumeTextColor,"--tabres-menu-product-card-price-text-color":null===(m=r.menuDesign)||void 0===m?void 0:m.productCardPriceTextColor,"--tabres-menu-product-card-block-padding":null===(p=r.menuDesign)||void 0===p?void 0:p.productCardBlockPadding,"--tabres-menu-category-title-font-size":null===(_=r.menuDesign)||void 0===_?void 0:_.categoryTitleFontSize,"--tabres-menu-product-name-font-size":null===(E=r.menuDesign)||void 0===E?void 0:E.productNameFontSize,"--tabres-menu-product-price-font-size":null===(v=r.menuDesign)||void 0===v?void 0:v.productPriceFontSize,"--tabres-menu-distance-between-category-title-and-products":null===(h=r.menuDesign)||void 0===h?void 0:h.distanceBetweenCategoryTitleAndProducts,"--tabres-menu-product-description-font-size":null===(g=r.menuDesign)||void 0===g?void 0:g.productDescriptionFontSize,"--tabres-menu-product-volume-font-size":null===(I=r.menuDesign)||void 0===I?void 0:I.productVolumeFontSize,"--tabres-menu-product-separator-color":null===(y=r.menuDesign)||void 0===y?void 0:y.productSeparatorColor,"--tabres-menu-page-background-color":null===(T=r.menuDesign)||void 0===T?void 0:T.menuPageBackgroundColor,"--tabres-menu-page-text-color":null===(D=r.menuDesign)||void 0===D?void 0:D.menuPageTextColor},children:t})})},R=()=>r.useContext(C),j=()=>{const{business:e}=R();return e||{}},N=()=>{const{currency:e}=j();return e||"AZN"},S=()=>{const{id:e}=j();return e},P=()=>{const{language:e}=R();return e||"en"},k=()=>{const e=A(),t=P();return r.useMemo(()=>y(e,t),[e,t])},L=()=>{const{url:e}=k(),t=(()=>{const{username:e}=j();return e||""})();return r.useMemo(()=>`${e}/${t}`,[e,t])},w=(e,t)=>{var r;return null===(r=((null==e?void 0:e.days)||[]).find(({day:e})=>e===t))||void 0===r?void 0:r.hours},M=e=>(e||"").split(":").map(Number),U=e=>{if(!e)return!1;const t=new Date,[r,o]=M(e.openAt),[a,n]=M(e.closeAt),i=new Date(t);i.setHours(r,o,0,0);const d=new Date(t);return d.setHours(a,n,0,0),d<=i&&(t<d?i.setDate(i.getDate()-1):d.setDate(d.getDate()+1)),t>=i&&t<=d},z=()=>{const{branches:e}=R();return(e||[]).length<=1},W=()=>{const{branches:e,branchId:t}=R(),r=z();return o.isEmpty(e)?{}:r?e[0]:e.find(e=>e.id===Number(t))||{}},B=()=>{const e=W();return{latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude}},V=()=>{const e=W(),{openingHours:t,deliveryHours:r}=e||{};if(!(null==t?void 0:t.days)||!(null==r?void 0:r.days))return{isOpen:!1,isDelivering:!1};const o=((new Date).getUTCDay()+6)%7,a=w(t,o),n=w(r,o);return{isOpen:U(a),isDelivering:U(n)}},Y=()=>{const e=W();return(null==e?void 0:e.settings)||{}},G=()=>{const e=Y();if(o.isEmpty(e))return!1;const{deliveryOrderEnabled:t,dineInOrderEnabled:r,pickupOrderEnabled:a}=e;return t||r||a},F=()=>{const{branchId:e}=R();return e},H=()=>{const{onBranchSelect:e}=R();return e},K=()=>{const e=L(),t=F();return t?`${e}/${t}`:e};function q(e,t,r,o){return new(r||(r=Promise))(function(a,n){function i(e){try{s(o.next(e))}catch(e){n(e)}}function d(e){try{s(o.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,d)}s((o=o.apply(e,t||[])).next())})}var Q,$,X,Z,J;"function"==typeof SuppressedError&&SuppressedError,function(e){e.DINE_IN="DINE_IN",e.PICK_UP="PICK_UP",e.DELIVERY="DELIVERY"}(Q||(Q={})),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"}($||($={})),function(e){e.PENDING="PENDING",e.PREPARING="PREPARING",e.READY="READY",e.SERVED="SERVED"}(X||(X={})),function(e){e.CASH="CASH",e.CARD="CARD",e.WALLET="WALLET",e.TERMINAL="TERMINAL"}(Z||(Z={})),function(e){e.CART="CART",e.DETAILS="DETAILS",e.COMPLETED="COMPLETED"}(J||(J={}));const ee={orderType:null,preferredPaymentMethod:Z.CASH},te=[J.CART,J.DETAILS,J.COMPLETED],re={data:null,isLoading:!1,error:null};var oe;!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"}(oe||(oe={}));const ae=e=>{var t,r;const{price:o,variant:a,addons:n,quantity:i}=e||{},d=null!==(r=null!==(t=null==a?void 0:a.price)&&void 0!==t?t:o)&&void 0!==r?r:0,s=(n||[]).reduce((e,t)=>e+((null==t?void 0:t.options)||[]).reduce((e,t)=>{var r;return e+(null!==(r=null==t?void 0:t.price)&&void 0!==r?r:0)},0),0);return(d+s)*(null!=i?i:1)},ne=(e,t,r)=>{if(!e)throw new Error("Product ID is required");let a=`${e}`;t&&(a+=`-${t}`);const n=Object.entries(r||{}).map(([e,t])=>{if(!e||!t)return null;const r=Array.isArray(t)?o.sortNumbers(t).filter(Boolean).join("-"):`${t}`;return r?`${e}-${r}`:null}).filter(Boolean).join("-");return n&&(a+=`-${n}`),a},ie=e=>{switch(e){case"customer":return oe.ADDRESS_IS_EMPTY;case"tableId":return oe.TABLE_NOT_SELECTED;case"items":return oe.EMPTY_ITEMS;case"branchId":return oe.BRANCH_NOT_SELECTED;default:return oe.FIELD_REQUIRED_ERROR}},de="https://api.tabres.com/api/v2",se=new o.HttpClient({baseURL:de,headers:{"Content-Type":"application/json"},credentials:"include"});se.onRequest(e=>{const{accessToken:t=""}=I.getAuthToken();return e.headers.Authorization=t,e}),se.onResponse(e=>q(void 0,void 0,void 0,function*(){return yield e.json().catch(()=>null)}));const le=(...e)=>q(void 0,[...e],void 0,function*(e=null,t={}){try{return o.trackEvent("error",{message:null==e?void 0:e.message}),yield fetch(`${de}/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)}}),ue=({defaultOrderType:e,defaultPaymentMethod:t,defaultBranchId:r})=>{const o=(()=>{const{tableId:e}=R();return e})(),{isOpen:a,isDelivering:n}=V(),i=Y(),d=e||((e,t,r)=>{if(!e)return null;const{deliveryOrderEnabled:o,dineInOrderEnabled:a,pickupOrderEnabled:n}=e;return o&&r?Q.DELIVERY:a&&t?Q.DINE_IN:n&&t?Q.PICK_UP:null})(i,a,n);return{branchId:r,orderType:d,tableId:o?Number(o):void 0,preferredPaymentMethod:t||Z.CASH}},ce=r.createContext({order:ee,orderStep:J.CART,orderItems:{},isOrderOpen:!1,customer:{},trackingId:"",errors:{},updateOrder:()=>{},setOrderStep:()=>{},addProduct:()=>{},updateProduct:()=>{},removeAllProductVariants:()=>{},setIsOrderOpen:()=>{},getCustomer:()=>{},resetOrder:()=>{},setTrackingId:()=>{},updateOrderErrors:()=>{},resetErrors:()=>{}}),me=({children:t,defaultOrderType:a,defaultPaymentMethod:n,defaultBranchId:i,isOrderDefaultOpen:d=!1})=>{const s=ue({defaultOrderType:a,defaultPaymentMethod:n,defaultBranchId:i}),[l,u]=r.useState({}),[c,m]=r.useState(s),[p,_]=r.useState(J.CART),[E,v]=r.useState({}),[h,g]=r.useState(d),[y,T]=r.useState(""),[D,b]=r.useState({}),f=r.useCallback(e=>{m(t=>Object.assign(Object.assign({},t),e)),["branchId","tableId"].forEach(t=>{e[t]&&b(e=>(null==e?void 0:e[t])?Object.assign(Object.assign({},e),{[t]:null}):e)})},[]),A=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:a,note:n,isAddOperation:i})=>{if(o.isEmpty(e))return;const{id:d,variants:s,addons:l,price:u,listingPrice:c,sellUnitType:m}=e,p=null!=c?c:u,_=ne(d,r,a);v(e=>{var u;const c=e[_],E=parseFloat((i?((null==c?void 0:c.quantity)||0)+t:t).toFixed(3));if(E<=0){const t=e,r=_;t[r];return function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]])}return r}(t,["symbol"==typeof r?r:r+""])}const v=s.find(({id:e})=>e===r),h=((e=[],t={})=>Object.entries(t).map(([t,r])=>{const a=Number(t),n=Array.isArray(r)?r:[r],i=e.find(e=>e.id===a);if(o.isEmpty(i))return{addonId:a,options:[]};const d=(i.options||[]).filter(e=>n.includes(e.id)).map(e=>{var t;return{optionId:e.id,price:null!==(t=e.listingPrice)&&void 0!==t?t:e.price}});return{addonId:a,options:d}}))(l,a);return Object.assign(Object.assign({},e),{[_]:Object.assign(Object.assign({productId:d,quantity:E,price:p,note:n},!o.isEmpty(v)&&{variant:{variantId:v.id,price:null!==(u=v.listingPrice)&&void 0!==u?u:v.price}}),{addons:h,sellUnitType:m})})}),i&&b(e=>(null==e?void 0:e.items)?Object.assign(Object.assign({},e),{items:null}):e)},[]),x=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:o,note:a})=>A({product:e,quantity:t,variantId:r,selectedAddons:o,note:a,isAddOperation:!0}),[A]),C=r.useCallback(({product:e,quantity:t=1,variantId:r,selectedAddons:o,note:a})=>A({product:e,quantity:t,variantId:r,selectedAddons:o,note:a,isAddOperation:!1}),[A]),O=r.useCallback(e=>{e&&v(t=>{if(o.isEmpty(t))return t;return Object.entries(t).reduce((t,[r,o])=>(o.productId!==e&&(t[r]=o),t),{})})},[]),R=r.useCallback(()=>q(void 0,void 0,void 0,function*(){try{const{accessToken:e}=I.getAuthToken();if(!e)return;const t=yield q(void 0,void 0,void 0,function*(){return se.get("/customer")});if(!(null==t?void 0:t.id))throw new Error("SOMETHING_WENT_WRONG");u(t)}catch(e){le(e,{file:"src/store/order.tsx",method:"getCustomer"})}}),[]),j=r.useCallback((e=!1,t=!0)=>{t&&g(!1),(p===J.COMPLETED||e)&&(m(s),v({}),_(J.CART),T(""))},[s,p]),N=r.useCallback(e=>{b(t=>Object.assign(Object.assign({},t),{[e]:ie(e)}))},[]),S=r.useCallback(()=>{b({})},[]),P=r.useMemo(()=>({order:c,orderStep:p,orderItems:E,isOrderOpen:h,customer:l,trackingId:y,errors:D,updateOrder:f,setOrderStep:_,addProduct:x,updateProduct:C,removeAllProductVariants:O,setIsOrderOpen:g,getCustomer:R,resetOrder:j,setTrackingId:T,updateOrderErrors:N,resetErrors:S}),[c,p,E,h,l,y,D,f,x,C,O,R,j,T,N,S]);return e.jsx(ce.Provider,{value:P,children:t})},pe=()=>r.useContext(ce);var _e,Ee,ve,he,ge;!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"}(_e||(_e={})),function(e){e.PERCENTAGE="percentage",e.FIXED_AMOUNT="fixed"}(Ee||(Ee={})),function(e){e.ENTIRE_MENU="entire_menu",e.CLASS="class"}(ve||(ve={})),function(e){e.DELIVERY="delivery",e.TAKEAWAY="takeaway",e.DINE_IN="dine_in",e.ALL="ALL"}(he||(he={})),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"}(ge||(ge={}));const Ie=()=>{const{videoId:e}=R();return e},ye=()=>{const{videos:e}=R();return r.useMemo(()=>e||[],[e])},Te=()=>{const e=ye(),t=Ie();return r.useMemo(()=>t&&e.find(e=>e.productId===Number(t))||{},[e,t])};const De=e=>{const t=L(),r=F();let o=t;return r&&(o+=`/${r}`),e&&(o+=`/videos/${e}`),o},be=()=>{const e=(()=>{const e=ye();return r.useMemo(()=>e[0],[e])})(),t=De(null==e?void 0:e.productId);return o.isEmpty(e)?"":t};var fe="BusinessHeader-module_container__X22c3",Ae="BusinessHeader-module_cover__l-1W8",xe="BusinessHeader-module_content__sjiqO",Ce="BusinessHeader-module_logo__DWaaU",Oe="BusinessHeader-module_info__6RQFI",Re="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 Ne=()=>{const[o,a]=r.useState(!1),n=j().languages||[],i=P(),d=(()=>{const{onLanguageSelect:e}=R();return e})(),s=n.length>1,l=n.filter(({code:e})=>e!==i)||[],u=e=>`https://images.tabres.com/languages/${e}.svg`;return s?e.jsx("div",{className:je.container,onClick:()=>a(!o),children:e.jsxs(t.Row,{alignItems:"center",gap:0,children:[e.jsx(t.Row,{alignItems:"center",className:t.classNames(je,{options:!0,isOpen:o}),children:l.map(({code:t})=>e.jsx("img",{src:u(t),className:je.option,onClick:()=>null==d?void 0:d(t),alt:t},t))}),e.jsx("img",{src:u(i),alt:i,className:je.currentLanguage})]})}):null},Se=()=>{const{coverPhoto:r,avatar256:o,name:a}=j();return e.jsxs("div",{className:fe,children:[e.jsx("img",{src:b(r),alt:a,className:Ae,width:1024,height:400}),e.jsx("div",{className:xe,children:e.jsxs(t.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:.5,className:fe,children:[e.jsx("img",{src:D(o),alt:a,className:Ce,width:96,height:96}),e.jsx("div",{className:Oe,children:e.jsx(t.Text,{variant:"h1",color:"white",className:Re,align:"center",children:a})})]})}),e.jsx(Ne,{})]})};var Pe="BranchHeader-module_container__Ol56f",ke="BranchHeader-module_cover__DGWZX",Le="BranchHeader-module_content__O8E27",we="BranchHeader-module_logo__DL7Si",Me="BranchHeader-module_info__Ym-ln",Ue="BranchHeader-module_name__91VkO",ze="BranchHeader-module_address__Y140r",We="BranchHeader-module_addressText__ofVQQ",Be="BackIcon-module_container__uknWc";const Ve=({onClick:r,size:o,theme:n})=>{const i=L(),d=x(),s=H();return e.jsx("div",{className:Be,onClick:r||(()=>{if(d)return null==s?void 0:s("");"undefined"!=typeof window&&(window.location.href=i)}),children:e.jsx(t.SVGIcon,{icon:a.ChevronLeft,size:o,theme:n})})};var Ye="HeaderLinks-module_container__wfIXS",Ge="HeaderLinks-module_links__S5qXC",Fe="HeaderLinks-module_wifiPassword__j4cgP",He="HeaderLinks-module_businessHours__qVA-Q",Ke="HeaderLinks-module_icon__cQpBK",qe={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",Discount:"Endirim","Discount ({{rate}}%)":"Endirim ({{rate}}%)","Service Fee ({{rate}}%)":"Servis haqqı ({{rate}}%)"},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"},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:{},branch:{"WEEKDAY-0":"Monday","WEEKDAY-1":"Tuesday","WEEKDAY-2":"Wednesday","WEEKDAY-3":"Thursday","WEEKDAY-4":"Friday","WEEKDAY-5":"Saturday","WEEKDAY-6":"Sunday"}},es:{auth:{"Create an account or log in":"Crear una cuenta o iniciar sesión","Phone number":"Número de teléfono","I don't have an email":"No tengo correo electrónico","We sent a confirmation code to {{address}}":"Hemos enviado un código de confirmación a {{address}}"},branch:{"WEEKDAY-0":"Lunes","WEEKDAY-1":"Martes","WEEKDAY-2":"Miércoles","WEEKDAY-3":"Jueves","WEEKDAY-4":"Viernes","WEEKDAY-5":"Sábado","WEEKDAY-6":"Domingo",Closed:"Cerrado","Opening Hours":"Horarios de apertura","Delivery Hours":"Horarios de entrega",Feedback:"Comentarios"},common:{Save:"Guardar",Cancel:"Cancelar",Continue:"Continuar"},customer:{"Unknown address":"Dirección desconocida","No address available":"Sin dirección disponible","Update Delivery Address":"Actualizar dirección de entrega",Country:"País",City:"Ciudad","Baker Street":"Calle Baker",Address:"Dirección","House number":"Número de casa","Additional number":"Número adicional","Example: Door code is 555":"Ejemplo: El código de la puerta es 555","Delivery Instructions":"Instrucciones de entrega",Floor:"Planta","Enter address":"Introducir dirección","House No.":"Nº de casa"},error:{SOMETHING_WRONG:"¡Algo salió mal! Por favor, inténtalo de nuevo más tarde.",FIELD_REQUIRED:"Este campo es obligatorio","Unsupported country code":"Código de país no soportado","Invalid OTP":"Código de confirmación inválido",INVALID_OTP:"Código de confirmación inválido",OTP_RATE_LIMIT_EXCEEDED:"Has superado el límite de códigos. Por favor, inténtalo de nuevo más tarde.","Invalid Email Address":"Dirección de correo electrónico no válida",FEATURE_NOT_AVAILABLE_FOR_SEGMENT:"Esta función no está disponible en tu plan actual.",ORDER_TYPE_DISABLED_FOR_BUSINESS:"Este tipo de pedido no está disponible para este negocio.",ORDER_TYPE_DISABLED_AT_THIS_TIME:"Este tipo de pedido no está disponible en este momento.",COUNTRY_REQUIRED:"El país es obligatorio.",CITY_REQUIRED:"La ciudad es obligatoria.",STREET_REQUIRED:"La calle es obligatoria.",STREET_NUMBER_REQUIRED:"El número de calle es obligatorio.",OUT_OF_DELIVERY_RANGE:"Este establecimiento no realiza entregas en tu dirección.",NO_ORDER_TYPE:"Por favor, selecciona un tipo de pedido.",INVALID_ADDRESS:"Dirección no válida"},events:{Events:"Eventos","Scrolled to Category":"Desplazado a la categoría","Category Selected":"Categoría seleccionada","Product Details":"Detalles del producto","Product Added to Order":"Producto añadido al pedido"},order:{"View order":"Ver pedido","Remove from order":"Eliminar del pedido","Update order":"Actualizar pedido","Add to order":"Añadir al pedido",Add:"Añadir","Your order":"Tu pedido",Subtotal:"Subtotal","Empty order":"Pedido vacío","You don't have any items in your order":"No tienes ningún artículo en tu pedido","Add items":"Añadir artículos","Add an order note":"Añadir nota al pedido","Specify any allergies, special requests, or ingredients you want to add or remove":"Indica cualquier alergia, petición especial o ingrediente que quieras añadir o quitar","Your Order is Completed!":"¡Tu pedido se ha completado!","Thank you! We've received your order and it will be delivered shortly.":"¡Gracias! Hemos recibido tu pedido y será entregado en breve.",Delivery:"Entrega","Dine in":"Para tomar aquí",Pickup:"Para recoger",Cash:"Efectivo","POS Terminal":"Terminal TPV","Order summary":"Resumen del pedido",Items:"Artículos",Tax:"Impuestos",Total:"Total","Special instructions, allergies, etc.":"Instrucciones especiales, alergias, etc.","Go to checkout":"Ir a pagar","Place order":"Realizar pedido",Continue:"Continuar","Not available":"No disponible","In order":"En el pedido","Product choices":"Opciones de producto","Track order":"Seguimiento del pedido","Minimum order amount for delivery is {{amount}}":"El importe mínimo de pedido para entrega es {{amount}}","This field is required":"Este campo es obligatorio","Please select a table":"Por favor, selecciona una mesa","Please enter an address":"Por favor, introduce una dirección","Please choose product":"Por favor, elige un producto",Table:"Mesa","Select Table":"Seleccionar mesa",Card:"Tarjeta","Closed Now":"Cerrado ahora","Delivery Fee":"Gastos de envío","Play video":"Reproducir vídeo"," / kg":" / kg"," / l":" / l",Discount:"Descuento","Discount ({{rate}}%)":"Descuento ({{rate}}%)",Events:"Eventos","Service Fee ({{rate}}%)":"Cargo por servicio ({{rate}}%)"}},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":"Смотреть видео",Discount:"Скидка","Discount ({{rate}}%)":"Скидка ({{rate}}%)","Service Fee ({{rate}}%)":"Сервисный сбор ({{rate}}%)"},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":"Продукт добавлен в заказ"},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",Discount:"İndirim","Discount ({{rate}}%)":"İndirim ({{rate}}%)","Service Fee ({{rate}}%)":"Servis Ücreti ({{rate}}%)"},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"},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",Discount:"Korting","Discount ({{rate}}%)":"Korting ({{rate}}%)","Service Fee ({{rate}}%)":"Servicekosten ({{rate}}%)"},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"},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",Discount:"Allahindlus","Discount ({{rate}}%)":"Allahindlus ({{rate}}%)","Service Fee ({{rate}}%)":"Teenustasu ({{rate}}%)"},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"},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",Discount:"Rabat","Discount ({{rate}}%)":"Rabat ({{rate}}%)","Service Fee ({{rate}}%)":"Opłata serwisowa ({{rate}}%)"},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"},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",Discount:"Desconto","Discount ({{rate}}%)":"Desconto ({{rate}}%)","Service Fee ({{rate}}%)":"Taxa de serviço ({{rate}}%)"},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"},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",Discount:"Popust","Discount ({{rate}}%)":"Popust ({{rate}}%)","Service Fee ({{rate}}%)":"Naknada za uslugu ({{rate}}%)"},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"},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 r=P(),o=(null==t?void 0:t.language)||r,{t:a}=((e,t)=>{try{const r=_.includes(e)?e:"en",o=qe[r][t]||{},a=(e,t)=>{try{const r=o[e]||e;return t?Object.keys(t).reduce((e,r)=>e.replace(`{{${r}}}`,t[r]),r):r}catch(t){return console.error(t),e}};return{t:a}}catch(e){return console.error(e),{t:e=>e}}})(o,e);return{t:a}},$e=()=>{const{setModal:r}=t.useModalContext(),{t:n}=Qe("branch"),{phone:i,wifiPassword:d,whatsApp:s,telegram:l,openingHours:u,deliveryHours:c}=W(),{instagram:p,tiktok:_,facebook:E,username:v}=j(),h=!o.isEmpty(null==u?void 0:u.days)||!o.isEmpty(null==c?void 0:c.days),g="dgkmenu"===v;return e.jsx("div",{className:Ye,children:e.jsx("div",{className:Ge,children:e.jsx(t.Row,{gap:2,alignItems:"center",children:e.jsxs(t.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!i&&e.jsx(t.IconLink,{icon:a.Phone,href:`tel:+${i}`,size:"sm",shape:"circle",theme:"light"}),!!s&&e.jsx(t.IconLink,{icon:a.Whatsapp,href:`https://wa.me/${s}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!p&&e.jsx(t.IconLink,{icon:a.Instagram,href:p,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!l&&e.jsx(t.IconLink,{icon:a.Telegram,href:l,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!_&&e.jsx(t.IconLink,{icon:a.Tiktok,href:_,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!E&&e.jsx(t.IconLink,{icon:a.Facebook,href:E,size:"sm",shape:"circle",theme:"light",target:"_blank"}),g&&e.jsx(t.Tooltip,{hint:n("Feedback"),children:e.jsx(t.IconLink,{icon:a.MessageHeartSquare,href:"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform",size:"sm",shape:"circle",theme:"light",target:"_blank"})}),!!d&&e.jsx(t.Tooltip,{hint:d,children:e.jsx("div",{className:Fe,children:e.jsx(t.SVGIcon,{icon:a.Wifi,size:"sm",className:Ke})})}),h&&e.jsx("div",{className:He,onClick:()=>{r({id:m,params:{openingHours:u,deliveryHours:c}})},children:e.jsx(t.SVGIcon,{icon:a.Clock,size:"sm",className:Ke})})]})})})})},Xe=()=>{const{coverPhoto:r,avatar256:o}=j(),n=(()=>{const{business:e}=R(),t=W(),r=z(),o=(null==e?void 0:e.name)||"Tabres";return r?o:(null==t?void 0:t.name)?`${o} ${t.name}`:o})(),i=W().address||"",d=z(),{latitude:s,longitude:l}=B(),u=`https://www.google.com/maps/place/${s},${l}`;return e.jsxs("div",{className:Pe,children:[e.jsx("img",{src:b(r),alt:n,className:ke,width:1024,height:400}),e.jsx("div",{className:Le,children:e.jsxs(t.Column,{justifyContent:d?"flex-end":"space-between",fullHeight:!0,fullWidth:!0,gap:0,children:[!d&&e.jsx(Ve,{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:D(o),alt:n,className:we,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:Ue,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:a.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:We,children:i})]})})]})})]})]})}),e.jsx(Ne,{}),e.jsx($e,{})]})},Ze=()=>{const t=W();return z()||!o.isEmpty(t)?e.jsx(Xe,{}):e.jsx(Se,{})};var Je={};var et={content:"Auth-module_content__1ATBc",terms:"Auth-module_terms__OH3th"};const tt=()=>{var e,t;const{customer:r}=pe();return(null===(e=null==r?void 0:r.addresses)||void 0===e?void 0:e[(null===(t=null==r?void 0:r.addresses)||void 0===t?void 0:t.length)-1])||{}};var rt,ot;!function(e){e.PHONE="PHONE",e.OTP="OTP",e.EMAIL="EMAIL"}(rt||(rt={})),function(e){e.HOME="HOME",e.WORK="WORK",e.TRAVEL="TRAVEL"}(ot||(ot={}));const at=e=>{const t={},{countryCode:r,cityName:o,street:a,houseNumber:n}=e||{};return r||(t.countryCode="COUNTRY_REQUIRED"),o||(t.cityName="CITY_REQUIRED"),a||(t.street="STREET_REQUIRED"),n||(t.houseNumber="STREET_NUMBER_REQUIRED"),t},nt=(e,t,r)=>[e,[t,r].filter(Boolean).join("/")].filter(Boolean).join(" ");var it,dt;!function(e){e.LIST="list",e.GRID="grid"}(it||(it={})),function(e){e.PIECE="PIECE",e.WEIGHT="WEIGHT",e.VOLUME="VOLUME"}(dt||(dt={}));const st=()=>{const{orderItems:e}=pe();return Object.values(e||{}).reduce((e,t)=>e+ae(t),0)},lt=(e={})=>{const t=S(),r=W(),o=P(),{order:a}=pe(),n=(()=>{const{orderItems:e}=pe();return Object.values(e||{}).map(({productId:e,quantity:t,variant:r,addons:o,note:a,sellUnitType:n})=>({productId:e,quantity:t,variant:r,addons:o,note:a,sellUnitType:n}))})(),i=tt(),d=(()=>{const{customer:e}=pe();return null==e?void 0:e.id})(),{workingDayId:s,tableId:l,employeeId:u,orderType:c,preferredPaymentMethod:m,note:p}=Object.assign(Object.assign({},a),e);return{branchId:null==r?void 0:r.id,businessId:t,workingDayId:s,tableId:l,customerId:d,customerAddressId:i.id,employeeId:u,orderType:c,language:o,items:n,preferredPaymentMethod:m,note:p}},ut=()=>{const{orderItems:e}=pe();return Object.values(e||{}).reduce((e,t)=>e+(t.sellUnitType===dt.WEIGHT||t.sellUnitType===dt.VOLUME?1:t.quantity),0)},ct=()=>{const{t:e}=Qe("error"),t=B(),a=Y().maxDeliveryDistance,{latitude:n,longitude:i}=tt(),[d,s]=r.useState(null);return r.useEffect(()=>{const e=!!n&&!!i,r=!o.isEmpty(t);q(void 0,void 0,void 0,function*(){if(!e||!r)return s("INVALID_ADDRESS");try{const e=yield((e,t)=>q(void 0,void 0,void 0,function*(){const{spherical:r}=yield google.maps.importLibrary("geometry"),o=new google.maps.LatLng(e.latitude,e.longitude),a=new google.maps.LatLng(t.latitude,t.longitude);return r.computeDistanceBetween(o,a)}))(t,{latitude:n,longitude:i});s(!e||e>a?"OUT_OF_DELIVERY_RANGE":null)}catch(e){s("OUT_OF_DELIVERY_RANGE")}})},[n,i,t,a]),d?e(d):null},mt=()=>{const{t:e}=Qe("order"),t=P(),r=N(),a=Y().minDeliveryAmount;if(st()<a){return e("Minimum order amount for delivery is {{amount}}",{amount:o.priceFormatter(a,r,t)})}return null},pt=({address:r,errorMessage:o,onChange:a})=>{const{t:n}=Qe("auth"),{t:i}=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:r})}),e.jsx(t.OTPInput,{onChangeOTP:e=>{var t;const r=null===(t=null==e?void 0:e.toUpperCase)||void 0===t?void 0:t.call(e);queueMicrotask(()=>{a(r)})},errorMessage:o?i(o):void 0,inputMode:"text"})]})},_t=({formErrors:o,onChange:a})=>{const[n,i]=r.useState(""),{t:d}=Qe("error"),s=A(),l=P(),{url:u}=y(s,l),c=r.useCallback(e=>{var t,r;const o=null!==(r=null===(t=e.target)||void 0===t?void 0:t.value)&&void 0!==r?r:"";i(o),a(o)},[a]);return e.jsxs(t.Column,{className:et.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:o.email?d(o.email):void 0}),e.jsx("div",{className:et.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 Et={};var vt={},ht="HoursList-module_container__wYX5G",gt="HoursList-module_title__D7Q8u";const It=({title:r,days:a})=>{const{t:n}=Qe("branch");return o.isEmpty(a)?null:e.jsxs(t.Column,{className:ht,gap:.5,fullWidth:!0,children:[r&&e.jsx(t.Text,{weight:"medium",className:gt,children:n(r)}),a.map(({day:r,hours:o})=>{const a=!o,i=a?n("Closed"):`${o.openAt} - ${o.closeAt}`;return e.jsxs(t.Row,{justifyContent:"space-between",fullWidth:!0,children:[e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",children:n(`WEEKDAY-${r}`)}),e.jsx(t.Text,{size:"sm",whiteSpace:"nowrap",color:a?t.UIElementType.DANGER:"normal",children:i})]},r)})]})},yt=({openingHours:r,deliveryHours:a})=>{const n=(null==r?void 0:r.days)||[],i=(null==a?void 0:a.days)||[],d=(()=>{const e=Y();return null==e?void 0:e.deliveryOrderEnabled})();return o.isEmpty(n)?null:e.jsxs(t.Column,{className:vt.container,gap:2,children:[e.jsx(It,{days:n}),d&&e.jsx(It,{title:"Delivery Hours",days:i})]})};var Tt={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 Dt=({size:n,zIndex:i=100})=>{const[d,s]=r.useState(!1),l=r.useCallback(()=>{const e=window.scrollY>100;e!==d&&s(e)},[d]);return r.useEffect(()=>(window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}),[l]),e.jsx("div",{className:o.classNames(Tt,{container:!0,visible:d}),style:{zIndex:i},children:e.jsx(t.IconButton,{icon:a.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 xt=({children:t,id:r})=>{const o=H(),a=L();return o?e.jsx("div",{className:At.item,onClick:()=>o(r),children:t}):e.jsx("a",{href:`${a}/${r}`,className:At.item,children:t})},Ct=({branch:r})=>{const{id:n,address:i,coverPhoto:d,name:s}=r||{},l=`${j().name} ${s}`;return e.jsx(xt,{id:n,children:e.jsxs("div",{className:o.classNames(At,{content:!0,noImage:!d}),children:[d&&e.jsx("div",{className:At.imageContainer,children:e.jsx("img",{src:b(d),alt:l,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:l}),e.jsxs(t.Row,{alignItems:"center",gap:.5,justifyContent:"center",fullWidth:!0,children:[e.jsx(t.SVGIcon,{icon:a.MarkerPin,color:t.UIElementType.DEFAULT}),e.jsx("span",{className:At.address,children:i})]})]})]})})},Ot=()=>{const r=(()=>{const{branches:e}=R();return e||[]})();return e.jsx("div",{className:bt,children:e.jsx(t.Container,{className:ft,children:r.map(t=>e.jsx(Ct,{branch:t},t.id))})})};var Rt={};const jt=e=>{var t,r;return null!==(r=null!==(t=null==e?void 0:e.listingPrice)&&void 0!==t?t:null==e?void 0:e.price)&&void 0!==r?r:0},Nt=(e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)};var St;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(St||(St={}));const Pt=({product:e,quantity:t,language:r,currency:a,variantId:n,selectedAddons:i})=>{if(!e||0===Object.keys(e).length)return o.priceFormatter(0,a,r);const d=n?(e.variants||[]).find(({id:e})=>e===n):void 0,s=jt(n?d:e),l=((e,t={})=>{let r=0;for(const o of(null==e?void 0:e.addons)||[]){const{id:e,selectType:a,options:n}=o;if(!Object.prototype.hasOwnProperty.call(t,e))continue;const i=t[e],d=a===St.SINGLE?[i]:i||[];for(const e of d){const t=(n||[]).find(({id:t})=>t===e);t&&(r+=jt(t))}}return r})(e,i),u=(s+l)*t;return o.priceFormatter(u,a,r)},kt=(e,t)=>{var r;return(null===(r=null==e?void 0:e.translations)||void 0===r?void 0:r[t])||{}},Lt=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},wt=e=>{var t;const{products:r}=R();return(null===(t=null==r?void 0:r.find)||void 0===t?void 0:t.call(r,({id:t})=>t===e))||{}},Mt=(e,t)=>{var r,o;return(null===(o=null===(r=null==e?void 0:e.translations)||void 0===r?void 0:r.find)||void 0===o?void 0:o.call(r,e=>e.language===t))||{}},Ut="digital_menu",zt=`${Ut}_category_select`,Wt=`${Ut}_category_scroll`,Bt=`${Ut}_product_details`,Vt=`${Ut}_product_add_cart`,Yt=`${Ut}_product_view_changed`,Gt=[zt,Wt,Bt,Vt];var Ft="Categories-module_categories__Hh8hl";const Ht=({categoryProductMap:a=[],language:n,selectedCategoryId:i,skipTracking:d=!1,onSelectCategory:s})=>{const l=r.useRef({}),u=r.useRef(null),c=r.useCallback(()=>{var e;const t=null===(e=null==l?void 0:l.current)||void 0===e?void 0:e[i];if(!t||!u.current)return;const r=u.current.clientWidth,o=t.offsetLeft-r/2+t.offsetWidth/2;u.current.scrollTo({left:o,behavior:"smooth"})},[i]);return r.useEffect(()=>{i&&c()},[i,c]),e.jsx("div",{className:Ft,children:e.jsx(t.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(u.current=e.current)},paddingInline:1,children:(a||[]).map(({id:r,translations:a})=>{const{name:u}=a.find(e=>e.language===n)||{};return e.jsx(t.CarouselItem,{children:e.jsx(t.Chip,{onClick:()=>((e,t)=>{e!==i&&(s(e),d||o.trackEvent(zt,{name:t}))})(r,u),type:t.UIElementType.BORDERED_PRIMARY,active:r===i,children:e.jsx("div",{ref:e=>{e&&(l.current[r]=e)},children:u})})},r)})})})};var Kt="Products-module_container__bF2LF",qt="Products-module_view__l857X",Qt="Products-module_products__AoDrY",$t="Products-module_category__Sp7dE",Xt="Products-module_list__LH4v5",Zt={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 Jt=({product:n,currency:i,language:d,onClick:s})=>{const{addProduct:l}=pe(),{image160:u,volume:c,available:m,sellUnitType:p,variants:_,addons:E}=n||{},{name:v,description:h}=r.useMemo(()=>kt(n,d),[n,d]),g=r.useMemo(()=>Nt(n,i,d),[n,i,d]),{t:I}=Qe("order"),{addToOrderEnabled:y}=Y(),D=y&&m,b=(null==_?void 0:_.length)>0,f=(null==E?void 0:E.length)>0,A=p===dt.WEIGHT||p===dt.VOLUME||b||f,x=!!u;return e.jsxs("div",{className:o.classNames(Zt,{container:!0,isClickable:!!s,noImage:!x}),onClick:s,children:[e.jsxs(t.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:Zt.info,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:Zt.name,children:v}),e.jsx("p",{className:Zt.description,children:h}),e.jsxs(t.Row,{className:Zt.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:g}),!!c&&e.jsx("div",{className:Zt.volume,children:c})]}),!m&&e.jsx(t.Text,{size:"xs",color:"danger",className:Zt.notAvailableText,children:I("Not available")})]})}),x&&e.jsx("img",{src:T(u),alt:v||"menu",className:o.classNames(Zt,{image:!0,notAvailable:!m}),loading:"lazy",width:160,height:90})]}),D&&e.jsx("div",{className:Zt.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),A&&s)return s();l({product:n}),o.trackEvent(Vt,{name:v,quantity:1})},icon:a.Plus,type:t.UIElementType.DEFAULT})})]})};var er={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",isDashboard:"ProductsGridItem-module_isDashboard__n-zKw",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 tr=({product:n,currency:i,language:d,defaultImage:s="",isDashboard:l=!1,backgroundColor:u,onClick:c,onAddProduct:m})=>{const{volume:p,image580:_,image160:E,image1024:v,available:h,sellUnitType:g,variants:I,addons:y}=n||{},D=_||v||E||s,{name:b,description:f}=r.useMemo(()=>kt(n,d),[n,d]),A=r.useMemo(()=>Nt(n,i,d),[n,i,d]),{t:x}=Qe("order",{language:d}),{addToOrderEnabled:C}=Y(),O=C&&h,R=(null==I?void 0:I.length)>0,j=(null==y?void 0:y.length)>0,N=g===dt.WEIGHT||g===dt.VOLUME||R||j;return e.jsx("div",{className:er.container,children:e.jsxs("div",{className:o.classNames(er,{content:!0,isClickable:!!c,noImage:!D,hasBackgroundColor:!D&&Boolean(u),isDashboard:l}),onClick:c,style:{backgroundColor:u},children:[D&&e.jsx("div",{className:er.imageContainer,children:e.jsx("img",{src:T(D),alt:b||"menu",className:o.classNames(er,{image:!0,notAvailable:!h}),loading:"lazy",width:580,height:326})}),e.jsx("div",{className:er.info,children:e.jsx("div",{className:er.data,children:e.jsxs(t.Column,{gap:.25,children:[e.jsx("h3",{className:er.name,children:b}),!l&&e.jsx("p",{className:er.description,children:f}),e.jsxs(t.Row,{className:er.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:A}),!!p&&e.jsx(t.Text,{color:"white",className:er.volume,children:p})]}),!h&&e.jsx(t.Text,{color:"white",size:"xs",className:er.notAvailableText,children:x("Not available")})]})})}),O&&e.jsx("div",{className:er.addToOrder,children:e.jsx(t.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N&&c)return c();m({product:n}),o.trackEvent(Vt,{name:b,quantity:1})},icon:a.Plus,type:t.UIElementType.DEFAULT})})]})})},rr=({product:t,currency:r,language:o,onClick:a})=>{const{addProduct:n}=pe();return e.jsx(tr,{onAddProduct:n,product:t,currency:r,language:o,onClick:a})},or=r.memo(({categoryProductMap:n=[],currency:i,language:d,productBlocksRef:s,containerRef:l,onCategoryInView:u})=>{const[c,m]=r.useState(it.LIST),{setModal:_}=t.useModalContext(),E=be(),v=[{icon:a.List,type:it.LIST},{icon:a.Grid,type:it.GRID}],h=e=>{const{name:t}=kt(e,d);o.trackEvent(Bt,{name:t}),_({id:p,params:{product:e}})};return r.useEffect(()=>{const e=new IntersectionObserver(e=>{var t;const r=((null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let o=null,a=1/0;e.forEach(e=>{if(e.isIntersecting){const t=e.boundingClientRect,n=t.top+t.height/2,i=Math.abs(n-r);i<a&&(a=i,o=e.target.getAttribute("data-category-id"))}}),o&&u(Number(o))},{threshold:.1});return Object.entries(s.current||{}).forEach(([t,r])=>{r&&(r.setAttribute("data-category-id",t),e.observe(r))}),()=>{e.disconnect()}},[s,l,u]),e.jsxs("div",{className:Kt,children:[e.jsxs(t.Row,{className:qt,alignItems:"center",children:[v.map(({icon:r,type:a})=>e.jsx(t.IconButton,{icon:r,onClick:()=>(e=>{m(e),o.trackEvent(Yt,{name:e})})(a),type:a===c?t.UIElementType.PRIMARY:t.UIElementType.DEFAULT},a)),!o.isEmpty(E)&&e.jsx("a",{href:E,children:e.jsx(t.IconButton,{icon:a.PlaySquare,onClick:()=>{},type:t.UIElementType.DEFAULT})})]}),e.jsx(t.Column,{gap:0,children:(n||[]).map(r=>{const{name:o}=Mt(r,d),{id:a,products:n}=r;return e.jsxs("div",{className:Qt,ref:e=>{e&&(s.current[a]=e)},"data-category-id":a,children:[e.jsx("h2",{className:$t,children:o}),e.jsx("div",{className:Xt,children:e.jsx(t.Column,{gap:0,children:(n||[]).map(t=>c===it.GRID?e.jsx(rr,{product:t,currency:i,language:d,onClick:()=>h(t)},t.id):e.jsx(Jt,{product:t,currency:i,language:d,onClick:()=>h(t)},t.id))})})]},a)})})]})},(e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language);or.displayName="Products";var ar={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 nr=({totalCount:n,isVisible:i,onClick:d,isInPublicMenu:s=!1})=>{const l=r.useRef(null),u=r.useRef(!1),c=n%1==0?n:n.toFixed(2);return r.useEffect(()=>{if(!u.current)return;const e=l.current;e&&(e.classList.remove(ar.animate),e.offsetWidth,e.classList.add(ar.animate))},[n]),r.useEffect(()=>{u.current=!0},[]),e.jsxs("div",{className:o.classNames(ar,{container:!0,isVisible:i,isInPublicMenu:s}),onClick:d,ref:l,children:[e.jsx(t.SVGIcon,{icon:a.ShoppingBag,color:t.UIElementType.DEFAULT,size:"md"}),e.jsx("div",{className:ar.count,children:c})]})},ir=({alwaysVisible:t=!1,isInPublicMenu:r=!1})=>{const o=ut(),{setIsOrderOpen:a,isOrderOpen:n}=pe();return o<=0&&!t?null:e.jsx(nr,{totalCount:o,isVisible:!n,onClick:()=>a(!n),isInPublicMenu:r})},dr=({containerRef:t})=>{var a;const n=(()=>{const{products:e}=R();return e||[]})(),i=(()=>{const{categories:e}=R();return e||[]})(),d=P(),s=N(),l=((e,t)=>{const r=t.reduce((e,t)=>{if(!t.visible)return e;const r=Number(t.categoryId);return e[r]||(e[r]=[]),e[r].push(t),e},{});return e.map(e=>Object.assign(Object.assign({},e),{products:r[Number(e.id)]||[]})).filter(e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0})})(i,n),[u,c]=r.useState(null===(a=null==i?void 0:i[0])||void 0===a?void 0:a.id),m=r.useRef({}),p=r.useRef(!0),_=r.useCallback(e=>q(void 0,void 0,void 0,function*(){p.current=!1,c(e),(e=>{var t;const r=null===(t=null==m?void 0:m.current)||void 0===t?void 0:t[e];r&&(setTimeout(()=>{r.scrollIntoView({behavior:"smooth",block:"start"})},100),setTimeout(()=>{p.current=!0},1e3))})(e)}),[]),E=r.useCallback(e=>{if(!(null==p?void 0:p.current))return;const t=((e,t,r)=>{var a;const n=null===(a=null==t?void 0:t.find)||void 0===a?void 0:a.call(t,({id:t})=>t===e);if(o.isEmpty(n))return"";const{name:i}=Mt(n,r);return i||""})(e,i,d);o.trackEvent(Wt,{name:t}),c(e)},[i,d]),v=r.useCallback(()=>q(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 r=(i||[]).find(({id:e})=>e===t);o.isEmpty(r)||_(t)}),[i,_]);return r.useEffect(()=>{v()},[v]),e.jsxs("div",{className:Rt.container,children:[e.jsx(Ht,{categoryProductMap:l,language:d,selectedCategoryId:u,onSelectCategory:_}),e.jsx(or,{categoryProductMap:l,language:d,currency:s,productBlocksRef:m,containerRef:t,onCategoryInView:E}),e.jsx(ir,{isInPublicMenu:!0})]})};var sr="VideoFeed-module_container__6tYYs",lr="VideoFeed-module_videos__6KjGc",ur="Video-module_container__HT89i",cr="Video-module_videoContainer__GE-7a",mr="Video-module_video__36hFc",pr="Video-module_top__SIvSk",_r="Video-module_actionIcon__F6Ze1",Er="Video-module_play__XCToT",vr="Video-module_bottom__DNzui",hr="Video-module_actions__cOh-0",gr="Actions-module_container__K2DUX",Ir="Actions-module_action__u-Mvu",yr="Actions-module_animate__Y2p0y";const Tr=({video:n})=>{const{setModal:i}=t.useModalContext(),{addProduct:d,setIsOrderOpen:s}=pe(),l=r.useRef(null),{productId:u,productName:c}=n||{},m=ut(),_=wt(u),{addToOrderEnabled:E}=Y(),{sellUnitType:v,variants:h,addons:g,available:I}=_,y=(null==h?void 0:h.length)>0,T=(null==g?void 0:g.length)>0,D=v===dt.WEIGHT||v===dt.VOLUME||y||T,b=E&&I,f=r.useCallback(()=>{i({id:p,params:{product:_}})},[_,i]),A=r.useCallback(()=>{if(D)return f();d({product:_}),o.trackEvent(Vt,{name:c,quantity:1})},[d,f,_,c,D]),x=[{icon:a.Eye,onClick:f},...b?[{icon:a.Plus,onClick:A}]:[],{icon:a.ShoppingBag,onClick:()=>s(!0),value:m,ref:l}];return r.useEffect(()=>{const e=l.current;e&&(e.classList.remove(yr),e.offsetWidth,e.classList.add(yr))},[m]),e.jsx(t.Column,{className:gr,fullWidth:!0,gap:.5,children:x.map(({icon:r,onClick:a,value:n,ref:i},d)=>e.jsxs(t.Column,{alignItems:"center",gap:.375,children:[e.jsx("div",{className:Ir,onClick:a,ref:i,children:e.jsx(t.SVGIcon,{icon:r,size:"md",color:t.UIElementType.DEFAULT})}),!o.isNil(n)&&e.jsx(t.Text,{size:"xs",weight:"bold",color:"white",fullWidth:!0,align:"center",children:n})]},d))})};var Dr={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 br=({video:a})=>{const[n,i]=r.useState(!1),d=K();if(o.isEmpty(a))return null;const{businessAvatar:s,businessName:l,productName:u,productDescription:c,productPrice:m}=a,p=Boolean(s);return e.jsxs(t.Column,{className:o.classNames(Dr,{container:!0,noAvatar:!p}),gap:.75,fullWidth:!1,children:[e.jsxs("a",{className:Dr.business,href:d,children:[p&&e.jsx(t.Avatar,{source:T(s),size:"sm"}),e.jsxs(t.Column,{gap:0,children:[e.jsx(t.Text,{weight:"medium",color:"white",whiteSpace:"nowrap",className:Dr.productName,children:u}),e.jsx(t.Text,{color:"white",whiteSpace:"nowrap",className:Dr.businessName,weight:"light",children:l})]})]}),e.jsx(t.Text,{color:"white",className:Dr.price,children:m}),Boolean(c)&&e.jsx(t.Row,{onClick:()=>i(e=>!e),children:e.jsx(t.Text,{color:"white",size:"sm",whiteSpace:n?"wrap":"nowrap",className:Dr.description,children:c})})]})},fr=({video:n,isActive:i=!1,shouldLoad:d=!1,isMuted:s=!0,registerVideo:l,setIsMuted:u})=>{const[c,m]=r.useState(!0),p=r.useRef(null),_=r.useRef(!1),E=K(),v=(e=>e?e.includes("base64")||e.startsWith("https://")?e:`${g}/${e}`:"")(null==n?void 0:n.videoUrl),h=r.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=r.useCallback(()=>{_.current=!0},[]);return r.useEffect(()=>{var e;const t=p.current;t&&(d&&!t.src&&(t.muted=!0,t.playsInline=!0,t.src=v,t.load()),d&&i&&(null===(e=t.play())||void 0===e||e.catch(()=>{})),i||t.paused||t.pause(),!d&&t.src&&(t.pause(),t.removeAttribute("src"),t.load()),m(t.paused))},[d,i,v]),r.useEffect(()=>{p.current&&!c&&p.current.muted!==s&&(p.current.muted=s)},[s,c]),o.isEmpty(n)?null:e.jsx("div",{className:ur,ref:e=>l(n.productId,e),children:e.jsxs("div",{className:cr,children:[e.jsx("video",{ref:p,className:mr,muted:!0,autoPlay:!0,playsInline:!0,preload:"none",loop:!0,controlsList:"nodownload nofullscreen noplaybackrate",controls:!1,disablePictureInPicture:!0,poster:T(n.thumbnail),onClick:h,onPlay:I}),e.jsxs(t.Row,{className:pr,justifyContent:"space-between",children:[e.jsx("div",{className:_r,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?a.VolumeX:a.VolumeMax,size:"md",color:t.UIElementType.DEFAULT})}),e.jsx("a",{className:_r,href:E,children:e.jsx(t.SVGIcon,{icon:a.Close,size:"md",color:t.UIElementType.DEFAULT})})]}),c&&e.jsx("div",{className:Er,children:e.jsx(t.SVGIcon,{icon:a.Play,size:"xxxl",color:t.UIElementType.DEFAULT})}),e.jsxs(t.Row,{className:vr,alignItems:"flex-end",gap:1,children:[e.jsx(br,{video:n}),e.jsx(t.Column,{className:hr,justifyContent:"flex-end",fullWidth:!1,fullHeight:!1,children:e.jsx(Tr,{video:n})})]})]})})},Ar=()=>{const[t,o]=r.useState(!0),a=Te(),n=(()=>{const e=Ie(),t=ye();return r.useMemo(()=>t.filter(t=>t.productId!==Number(e)),[t,e])})(),i=r.useRef(null),{activeId:d,register:s}=function(e){const[t,o]=r.useState(null),a=r.useRef(new Map);return r.useEffect(()=>{const t=e.current;if(!t)return;let r;const n=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio)[0];t&&(cancelAnimationFrame(r),r=requestAnimationFrame(()=>{o(e=>{var r,o;const n=null!==(o=null===(r=[...a.current.entries()].find(([,e])=>e===t.target))||void 0===r?void 0:r[0])&&void 0!==o?o:null;return e===n?e:n})}))},{root:t,threshold:[.6,.75,1]});return a.current.forEach(e=>n.observe(e)),()=>{cancelAnimationFrame(r),n.disconnect()}},[e]),{activeId:t,register:(e,t)=>{t&&a.current.set(e,t)}}}(i);return e.jsx("div",{className:sr,children:e.jsxs("div",{className:lr,tabIndex:0,ref:i,children:[e.jsx(fr,{video:a,registerVideo:s,isActive:d===a.productId,shouldLoad:!0,setIsMuted:o,isMuted:t}),n.map(r=>e.jsx(fr,{video:r,registerVideo:s,isActive:d===r.productId,shouldLoad:d===r.productId,setIsMuted:o,isMuted:t},r.productId))]})})};var xr={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"},Cr={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 Or=({isDecreaseDisabled:r=!1,quantity:n=1,size:i="md",focusedSection:d,onIncrease:s,onDecrease:l})=>e.jsxs(t.Row,{className:o.classNames(Cr,{container:!0,focused:"quantity"===d},[Cr[i]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:o.classNames(Cr,{quantityAction:!0,isDisabled:r}),onClick:l,children:e.jsx(t.SVGIcon,{icon:a.Minus})}),e.jsx("div",{className:Cr.quantityValue,children:n}),e.jsx("div",{className:Cr.quantityAction,onClick:s,children:e.jsx(t.SVGIcon,{icon:a.Plus})})]});var Rr="ProductInOrder-module_container__0N57G",jr="ProductInOrder-module_title__TWjM9";const Nr=({productId:r,quantity:o,isInPublicMenu:n=!0,language:i,removeAllProductVariants:d,onModalClose:s})=>{const{setIsOrderOpen:l}=pe(),{t:u}=Qe("order",{language:i});return o<=0?null:e.jsxs(t.Flex,{className:Rr,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(t.Flex.Item,{flex:1,className:jr,children:[u("In order")," (",o,")"]}),e.jsx(t.Flex.Item,{flex:0,children:e.jsxs(t.Row,{children:[e.jsx(t.IconButton,{icon:a.Trash,onClick:()=>{d(r)},type:t.UIElementType.DANGER,tooltip:u("Remove from order")}),n&&e.jsx(t.IconButton,{icon:a.ShoppingBag,onClick:()=>{l(!0),s&&s()},type:t.UIElementType.SUCCESS,tooltip:u("View order")})]})})]})};var Sr={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 Pr=({product:a,selectedVariant:n,focusedSection:i,language:d,currency:s,onSelectVariant:l})=>{const{t:u}=Qe("order",{language:d}),c=r.useRef(null),{variants:m}=a||{},p="variant"===i;return r.useEffect(()=>{p&&c.current&&c.current.scrollIntoView({behavior:"smooth"})},[i,p]),e.jsxs(t.Column,{className:o.classNames(Sr,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:Sr.variantsTitle,ref:c,children:u("Product choices")}),(m||[]).map(r=>{const{id:a}=r||{},i=Lt(r,d),u=((e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)})(r,s,d);return e.jsxs(t.Row,{justifyContent:"space-between",onClick:()=>l(a),className:Sr.variant,children:[e.jsx(t.Input,{label:i,name:"variant",onChange:()=>l(a),checked:n===a,type:t.InputType.RADIO,size:"small",noMargin:!0}),e.jsx("div",{className:Sr.variantPrice,children:u})]},a)})]})};var kr={container:"ProductAddons-module_container__DRnT7"};const Lr=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},wr=(e,t)=>{var r;return(null===(r=null==e?void 0:e.title)||void 0===r?void 0:r[t])||""},Mr=({product:r,selectedAddons:a,language:n,currency:i,onOptionSelect:d})=>{const{addons:s}=r||{};return e.jsx(t.Column,{className:kr.container,gap:1.5,fullWidth:!0,children:(s||[]).map(r=>{const{id:s,options:l,selectType:u}=r||{},c=Lr(r,n);return e.jsxs(t.Column,{children:[e.jsx(t.Text,{variant:"bold",children:c}),e.jsx(t.Column,{gap:1,fullWidth:!0,children:(l||[]).map(r=>{const{id:l}=r||{},c=((e,t,r)=>{const a=jt(e);return o.priceFormatter(a,t,r)})(r,i,n),m=wr(r,n),p=u===St.SINGLE,_=p?a[s]===l:(a[s]||[]).includes(l);return e.jsxs(t.Row,{justifyContent:"space-between",className:kr.option,children:[e.jsx(t.Input,{label:m,name:`option-${s}`,onChange:()=>d({addonId:s,optionId:l,isSingle:p,isRemove:!p&&_}),checked:_,type:p?t.InputType.RADIO:t.InputType.CHECKBOX,size:"small",noMargin:!0}),e.jsx("div",{className:kr.optionPrice,children:c})]},l)})})]},s)})})},Ur=({product:n,language:i,currency:d,selectedVariant:s,focusedSection:l,selectedAddons:u,isDecreaseDisabled:c,quantity:m,actionTitle:p,isInPublicMenu:_,productQuantityInOrderWithAllVariants:E,modalRef:v,videoUrl:h,addToOrderEnabled:g=!0,onClose:I,setSelectedVariant:y,onOptionSelect:D,adjustQuantity:b,onSubmit:f,removeAllProductVariants:A,onQuantityChange:x})=>{const{t:C}=Qe("order",{language:i}),{name:O,description:R}=r.useMemo(()=>kt(n,i),[n,i]),j=r.useMemo(()=>Nt(n,d,i),[n,d,i]),N=r.useMemo(()=>(e=>{switch(e){case dt.WEIGHT:return" / kg";case dt.VOLUME:return" / l";default:return""}})(null==n?void 0:n.sellUnitType),[n]),S=r.useMemo(()=>Pt({product:n,quantity:m,language:i,currency:d,variantId:s,selectedAddons:u}),[n,m,i,d,s,u]),P=r.useMemo(()=>(e=>{switch(e){case dt.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 dt.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=r.useCallback(e=>{var t,r;(null===(r=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.contains)||void 0===r?void 0:r.call(t,null==e?void 0:e.target))||I&&I()},[v,I]);if(o.isEmpty(n))return null;const{image1024:L,volume:w,variants:M,addons:U,available:z,sellUnitType:W}=n,B=(null==M?void 0:M.length)>0,V=(null==U?void 0:U.length)>0,Y=W===dt.WEIGHT||W===dt.VOLUME;return e.jsx("div",{className:xr.container,onClick:k,children:e.jsx(t.Modal,{onClose:I,ref:v,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:xr.content,children:[e.jsxs(t.Column,{gap:0,children:[e.jsxs("div",{className:xr.media,children:[L&&e.jsx("img",{src:T(L),width:1024,height:400,alt:O||"product",className:xr.image}),Boolean(h)&&e.jsxs("a",{href:h,className:xr.play,children:[e.jsx(t.SVGIcon,{icon:a.PlayCircle,color:t.UIElementType.DEFAULT}),e.jsx(t.Text,{color:"white",children:C("Play video")})]})]}),e.jsxs(t.Column,{className:xr.details,gap:1,children:[e.jsx("h2",{className:xr.name,children:O}),e.jsxs(t.Row,{justifyContent:"space-between",children:[e.jsxs("div",{className:xr.price,children:[j,Boolean(N)&&C(N)]}),e.jsx("div",{className:xr.volume,children:w})]}),e.jsx("div",{className:xr.description,children:R})]}),(B||V)&&e.jsxs(t.Column,{gap:0,className:xr.choices,children:[B&&e.jsx(Pr,{product:n,selectedVariant:s,focusedSection:l,language:i,currency:d,onSelectVariant:y}),V&&e.jsx(Mr,{product:n,selectedAddons:u,language:i,currency:d,onOptionSelect:D})]}),e.jsxs(t.Column,{gap:0,fullWidth:!0,className:xr.stickyBottom,children:[Y&&e.jsx(t.Numpad,{onChange:x,value:m,shortcuts:P}),e.jsx(Nr,{productId:null==n?void 0:n.id,onModalClose:I,isInPublicMenu:_,removeAllProductVariants:A,quantity:E,language:i})]})]}),e.jsx("div",{className:xr.close,children:e.jsx(t.IconButton,{onClick:I,icon:a.Close})})]}),footer:g?e.jsxs(t.Row,{className:xr.addToOrder,gap:.5,children:[e.jsx(Or,{focusedSection:l,isDecreaseDisabled:c,onDecrease:()=>b(-1),onIncrease:()=>b(1),quantity:m}),e.jsx(t.Button,{className:xr.addAction,label:z?e.jsxs(t.Row,{fullWidth:!0,justifyContent:"space-between",gap:.5,children:[e.jsx("span",{className:xr.actionTitle,children:p}),e.jsx("span",{children:S})]}):C("Not available"),onClick:f,size:"xl",fullWidth:!0,disabled:!z,paddingBlock:.5})]}):null})})};var zr="OrderDrawer-module_container__DymQj",Wr="OrderDrawer-module_content__khduX",Br="OrderDrawer-module_paymentMethods__9i-sb",Vr="OrderDrawer-module_footer__8XfD9",Yr="OrderDrawer-module_noteButton__M8BVx",Gr={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 Fr=({actionText:r,isLoading:a=!1,isDisabled:n=!1,onClick:i})=>{const{orderStep:d}=pe(),s=ut(),l=(()=>{const e=st(),t=P(),r=N();return o.priceFormatter(e,r,t)})(),u=d===J.DETAILS;return e.jsxs(t.Flex,{className:o.classNames(Gr,{container:!0,isLoading:a,isClickable:!!i,isDisabled:n,inDetails:u}),justifyContent:"space-between",alignItems:"center",onClick:a||n?null:i,children:[e.jsx(t.Flex.Item,{flex:1,children:e.jsxs(t.Row,{alignItems:"center",children:[e.jsx("div",{className:Gr.count,children:s}),e.jsx("div",{className:Gr.actionText,children:a?e.jsx(t.Loading,{}):r})]})}),!u&&e.jsx(t.Flex.Item,{className:Gr.totalPrice,flex:1,children:l})]})},Hr=({isOrderItemsEmpty:n=!1,orderError:i})=>{const{t:d}=Qe("order"),{t:s}=Qe("error"),{order:c,orderStep:m,orderItems:p,setOrderStep:_,setIsOrderOpen:E,setTrackingId:v,updateOrderErrors:h,resetErrors:g}=pe(),{setModal:I}=t.useModalContext(),y=G(),T=(()=>{const{customer:e}=pe();return e||{}})(),{isOpen:D,isDelivering:b}=V(),f=lt(),[A,x]=r.useState(!1),[C,O]=r.useState(""),R=null==c?void 0:c.note,j=!!R,N=y&&m===J.CART,S=D||b,P=!!i||!S,k=()=>q(void 0,void 0,void 0,function*(){try{O(""),x(!0);const e=yield(e=>q(void 0,void 0,void 0,function*(){return se.post("/customer/order",e)}))(f);return e.trackingId}catch(e){return O((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx",method:"handleSubmit"}),""}finally{x(!1)}}),L=y&&S?()=>q(void 0,void 0,void 0,function*(){if(o.isEmpty(T))return I({id:u});if(g(),m===J.DETAILS){if(c.orderType===Q.DELIVERY&&o.isEmpty(null==T?void 0:T.addresses))return h("customer");if(c.orderType===Q.DINE_IN&&!(null==c?void 0:c.tableId))return h("tableId");if(o.isEmpty(p))return h("items");const e=yield k();if(!e)return;v(e)}const e=(te.findIndex(e=>e===m)||0)+1;if(e>=te.length)return;const t=te[e];_(t)}):null;return e.jsxs(t.Column,{className:Vr,fullWidth:!0,children:[!!C&&e.jsx(t.AlertBox,{message:s(C),type:"error",onClear:()=>O("")}),!!i&&e.jsx(t.TextBanner,{text:i,type:t.UIElementType.DANGER,fullWidth:!0}),N&&e.jsx(t.Button,{label:j?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:()=>{I({id:l,params:{note:R}})},size:"xxxl",fullWidth:!0,type:t.UIElementType.LIGHT,className:Yr,icon:j?a.Edit:a.Plus,iconSize:"md"}),n?e.jsx(t.Button,{label:d("Add items"),onClick:()=>E(!1),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):m!==J.COMPLETED?e.jsx(Fr,{actionText:d((()=>{if(!y)return"Subtotal";if(!S)return"Closed Now";switch(m){case J.CART:return"Go to checkout";case J.DETAILS:return"Place order";default:return"Continue"}})()),onClick:L,isLoading:A,isDisabled:P}):null]})};var Kr={},qr="OrderListItem-module_container__Tj4RI",Qr="OrderListItem-module_image__o3PIC",$r="OrderListItem-module_data__BLzxw",Xr="OrderListItem-module_name__QEzuZ",Zr="OrderListItem-module_price__-V2qL",Jr="ProductQuantity-module_quantity__PzTpj";const eo=({productId:t,variantId:r,min:o=1,size:a="md",selectedAddons:n,isDisabled:i=!1})=>{const d=(({productId:e,variantId:t,selectedAddons:r})=>{const{orderItems:o}=pe(),a=o[ne(e,t,r)];return(null==a?void 0:a.quantity)||1})({productId:t,variantId:r,selectedAddons:n}),s=wt(t),{updateProduct:l}=pe(),u=d===o;return i?e.jsx("div",{className:Jr,children:d}):e.jsx(Or,{isDecreaseDisabled:u,onDecrease:()=>l({product:s,quantity:d-1,variantId:r,selectedAddons:n}),onIncrease:()=>l({product:s,quantity:d+1,variantId:r,selectedAddons:n}),quantity:d,size:a})},to=({item:r,product:a,language:n})=>e.jsx(e.Fragment,{children:(r.addons||[]).map(({addonId:r,options:i})=>{const d=((e,t)=>((null==e?void 0:e.addons)||[]).find(({id:e})=>e===t)||{})(a,r),s=((null==d?void 0:d.options)||[]).filter(e=>null==i?void 0:i.some(({optionId:t})=>t===e.id));if(o.isEmpty(d)||o.isEmpty(s))return null;const l=Lr(d,n),u=s.map(e=>wr(e,n)).filter(Boolean).join(", ");return l&&u?e.jsxs(t.Text,{color:"muted",size:"xs",children:[l,": ",u]},r):null})}),ro=({item:a,isDisabled:n=!1})=>{var i;const{productId:d}=a||{},s=null===(i=null==a?void 0:a.variant)||void 0===i?void 0:i.variantId,l=(e=>{const t={};for(const{addonId:r,options:o=[]}of e.addons||[]){const e=o.map(({optionId:e})=>e);t[r]=1===e.length?e[0]:e}return t})(a),u=wt(d),c=((e,t)=>{var r,o;return(null===(o=null===(r=null==e?void 0:e.variants)||void 0===r?void 0:r.find)||void 0===o?void 0:o.call(r,e=>e.id===t))||{}})(u,s),m=P(),p=N(),{image160:_}=u,E=Lt(c,m),{name:v}=r.useMemo(()=>kt(u,m),[u,m]),h=r.useMemo(()=>((e,t,r)=>{const a=ae(e);return o.priceFormatter(a,t,r)})(a,p,m),[a,p,m]);return e.jsxs(t.Row,{className:qr,gap:1,alignItems:"flex-start",children:[_&&e.jsx("img",{src:T(_),alt:v||"menu",className:Qr,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:$r,children:[e.jsx("div",{className:Xr,children:v}),e.jsxs(t.Column,{gap:0,children:[!!E&&e.jsx(t.Text,{color:"muted",size:"xs",children:E}),e.jsx(to,{item:a,product:u,language:m})]}),e.jsx("div",{className:Zr,children:h})]}),e.jsx(eo,{productId:d,variantId:s,selectedAddons:l,size:"sm",min:0,isDisabled:n})]})},oo=()=>{const{t:r}=Qe("order");return e.jsxs(t.Column,{className:Kr.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(t.Text,{variant:"h2",children:r("Empty order")}),e.jsx(t.Description,{text:r("You don't have any items in your order")})]})},ao=({isDisabled:t=!1})=>{const{orderItems:r}=pe(),a=o.isEmpty(r);return e.jsx("div",{className:Kr.container,children:a?e.jsx(oo,{}):e.jsx("div",{className:Kr.items,children:Object.entries(r||{}).map(([r,o])=>e.jsx(ro,{item:o,isDisabled:t},r))})})},no=()=>e.jsx("div",{className:Wr,children:e.jsx(ao,{})}),io=r.createContext(re),so=({children:t})=>{const{order:o,orderItems:a}=pe(),n=W(),i=S(),d=null==n?void 0:n.id,s=null==o?void 0:o.orderType,[l,u]=r.useState(re);return r.useEffect(()=>{const e=(e=>Object.entries(e||{}).map(([e,t])=>{var r;return Object.assign(Object.assign({orderItemsId:e,productId:t.productId,quantity:t.quantity},(null===(r=t.variant)||void 0===r?void 0:r.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}))}))}:{})}))(a);if(!i||!d||!s||0===e.length)return void u(e=>e===re?e:re);const t=new AbortController;return u({data:null,isLoading:!0,error:null}),q(void 0,void 0,void 0,function*(){try{const a=yield(r={businessId:i,branchId:d,orderType:s,items:e},o=t.signal,se.post("/customer/order/calculate",r,{signal:o}));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)})(a))return void u({data:null,isLoading:!1,error:"We couldn't refresh order totals. Please try again."});u({data:a,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 r,o}),()=>{t.abort()}},[null==o?void 0:o.orderType]),e.jsx(io.Provider,{value:l,children:t})};var lo="CustomerAddress-module_container__TGYRV";const uo=()=>{const{t:r}=Qe("customer");return e.jsx(t.Text,{color:t.UIElementType.DANGER,children:r("No address available")})},co=()=>{const r=tt(),{t:o}=Qe("customer"),{additionalNumber:a,street:n,houseNumber:i,cityName:d,countryCode:s}=r,l=nt(n,i,a),u=([d,s]||[]).filter(Boolean).join(", ");return e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{children:l||o("Unknown address")}),u&&e.jsx(t.Text,{size:"sm",color:"muted",children:u})]})},mo=()=>{const r=tt(),{setModal:n}=t.useModalContext();return e.jsx("div",{className:lo,onClick:()=>{n({id:c})},children:e.jsxs(t.Row,{fullWidth:!0,alignItems:"center",children:[e.jsx(t.SVGIcon,{icon:a.MarkerPin,size:"md"}),e.jsx(t.Column,{gap:0,fullWidth:!0,children:o.isEmpty(r)?e.jsx(uo,{}):e.jsx(co,{})}),e.jsx(t.SVGIcon,{icon:a.Edit,size:"sm"})]})})};var po,_o,Eo;!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"}(po||(po={})),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"}(_o||(_o={})),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"}(Eo||(Eo={}));var vo={};const ho=({preDefinedTable:a,tableOptions:n,selectedTableId:i,error:d,disableIfPreDefined:s,language:l,onChange:u})=>{const{t:c}=Qe("order",{language:l}),m=!o.isEmpty(a),p=r.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:vo.table,fullWidth:!0,gap:.5,children:[e.jsx(t.Row,{fullWidth:!0,children:m&&s?e.jsx(t.Text,{variant:"bold",children:a.name}):e.jsx(t.Input,{name:"tableId",options:n,type:t.InputType.SELECT,className:vo.tableInput,value:i,onChange:p,isDisabled:m,fullWidth:!0,noMargin:!0,size:"small",placeholder:c("Select Table")})}),d&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:c(d)})]})},go=()=>{const t=(()=>{const{tableId:e,tables:t}=R();return!e||o.isEmpty(t)?{}:t.find(t=>Number(t.id)===Number(e))||{}})(),r=(()=>{const{tables:e}=R();return e})(),{order:a,updateOrder:n,errors:i}=pe(),d=P(),s=r.map(({id:e,name:t})=>({label:t,value:e}));return e.jsx(ho,{onChange:e=>n({tableId:e}),preDefinedTable:t,tableOptions:s,selectedTableId:null==a?void 0:a.tableId,error:null==i?void 0:i.tableId,language:d,disableIfPreDefined:!0})};var Io="OrderMethods-module_container__KSwfa";const yo=({orderTypes:r,orderType:o,size:a,onSelect:n})=>{const{t:i}=Qe("error"),d=e=>0===e?"right":e+1===r.length?"left":"bottom",s=r.reduce((r,a,n)=>a.isVisible?(r.push((({type:r,icon:a,title:n,isDisabled:s},l)=>({value:r,isDisabled:s,label:e.jsx(t.Tooltip,{hint:s?i("ORDER_TYPE_DISABLED_AT_THIS_TIME"):null,position:d(l),children:e.jsxs(t.Row,{gap:.5,flexWrap:"nowrap",children:[e.jsx(t.SVGIcon,{icon:a}),e.jsx(t.Text,{color:r!==o||s?"normal":"white",whiteSpace:"nowrap",children:n})]})})}))(a,n)),r):r,[]);return e.jsx("div",{className:Io,children:e.jsx(t.MethodSelection,{methods:s,onSelect:n,selectedMethod:o,fullWidth:!0,size:a,gap:.5})})};var To="OrderPaymentSummary-module_container__HF7-X",Do="OrderPaymentSummary-module_row__eikWa";const bo=({textSize:r,totalPriceWithoutTax:a=0,totalPriceWithTaxAndFees:n=0,deliveryFee:i=0,serviceFee:d=0,serviceFeePercentage:s=0,serviceFeeEnabled:l=!1,totalTax:u,discountAmount:c=0,discountType:m,discountRate:p,currency:_,language:E,orderType:v})=>{const{t:h}=Qe("order",{language:E}),g=o.priceFormatter(a,_,E),I=o.priceFormatter(u,_,E),y=o.priceFormatter(i,_,E),T=o.priceFormatter(c,_,E),D=o.priceFormatter(d,_,E),b=o.priceFormatter(n,_,E);return e.jsxs(t.Column,{className:To,fullWidth:!0,gap:0,children:[e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Items")}),e.jsx(t.Text,{size:r,children:g})]}),v===Q.DELIVERY&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Delivery Fee")}),e.jsx(t.Text,{size:r,children:y})]}),l&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Service Fee ({{rate}}%)",{rate:String(s)})}),e.jsx(t.Text,{size:r,children:D})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,children:h("Tax")}),e.jsx(t.Text,{size:r,children:I})]}),e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,color:"bold",children:h("Total")}),e.jsx(t.Text,{size:r,color:"bold",children:b})]}),c>0&&e.jsxs(t.Row,{justifyContent:"space-between",className:Do,children:[e.jsx(t.Text,{size:r,color:"muted",children:"PERCENTAGE"===m?h("Discount ({{rate}}%)",{rate:String(p)}):h("Discount")}),e.jsxs(t.Text,{size:r,weight:"medium",color:"success",children:["-",T]})]})]})},fo=()=>{var o,n,i,d,s,l;const u=P(),c=N(),{order:{orderType:m,preferredPaymentMethod:p},updateOrder:_}=pe(),{data:E}=r.useContext(io),{isOpen:v,isDelivering:h}=V(),{deliveryOrderEnabled:g,dineInOrderEnabled:I,pickupOrderEnabled:y,deliveryFeeAmount:T,serviceChargePercentage:D,serviceChargeEnabled:b}=Y(),{t:f}=Qe("order"),A=[{type:Q.DELIVERY,icon:a.Delivery,title:f("Delivery"),isDisabled:!h,isVisible:g},{type:Q.DINE_IN,icon:a.Grid,title:f("Dine in"),isDisabled:!v,isVisible:I},{type:Q.PICK_UP,icon:a.ShoppingBag,title:f("Pickup"),isDisabled:!v,isVisible:y}],x=[{value:Z.CASH,label:f("Cash")},{value:Z.CARD,label:f("Card")}];return e.jsxs(t.Column,{className:Wr,gap:1,children:[e.jsx(yo,{orderTypes:A,orderType:m,size:"small",onSelect:e=>_({orderType:e})}),m===Q.DELIVERY&&e.jsx(mo,{}),m===Q.DINE_IN&&e.jsx(t.Padding,{paddingInline:1,fullWidth:!0,children:e.jsx(go,{})}),e.jsx(t.Row,{className:Br,children:x.map(({label:r,value:o})=>e.jsx(t.Input,{label:r,name:"preferredPaymentMethod",onChange:()=>_({preferredPaymentMethod:o}),checked:p===o,type:t.InputType.RADIO,size:"small",noMargin:!0},o))}),e.jsx(t.Accordion,{title:f("Order summary"),content:e.jsx(ao,{isDisabled:!0}),fullWidth:!0,style:"no-shadow",noPadding:!0,headerPaddingInline:1,headerPaddingBlock:1,titleVariant:"h5"}),e.jsx(bo,{textSize:"sm",totalPriceWithoutTax:null!==(o=null==E?void 0:E.totalPriceWithoutTax)&&void 0!==o?o:0,totalPriceWithTax:null!==(n=null==E?void 0:E.totalPriceWithTax)&&void 0!==n?n:0,totalPriceWithTaxAndFees:null!==(i=null==E?void 0:E.totalPriceWithTaxAndFees)&&void 0!==i?i:0,totalTax:null!==(d=null==E?void 0:E.totalTax)&&void 0!==d?d:0,deliveryFee:null!==(s=null==E?void 0:E.deliveryFee)&&void 0!==s?s:T,serviceFee:null!==(l=null==E?void 0:E.serviceFee)&&void 0!==l?l:0,serviceFeePercentage:null!=D?D:0,serviceFeeEnabled:b,language:u,currency:c,orderType:m})]})},Ao=()=>e.jsx(so,{children:e.jsx(fo,{})}),xo=()=>{const{t:r}=Qe("order"),{trackingId:o}=pe(),n=P(),i=A();return e.jsxs(t.Column,{className:Wr,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(t.SVGIcon,{icon:a.Check,size:"xxl",color:t.UIElementType.SUCCESS}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{variant:"h1",align:"center",children:r("Your Order is Completed!")})}),e.jsx(t.Padding,{paddingInline:2,children:e.jsx(t.Text,{align:"center",children:r("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://${i}/${n}/order/${o}`,title:r("Track order"),type:t.UIElementType.PRIMARY,size:"xl",fullWidth:!0,target:"_blank"})})]})},Co=()=>{const{isOrderOpen:a,orderItems:n}=pe(),{orderStep:i,setOrderStep:d,resetOrder:s}=pe(),l=r.useRef(null),{t:u}=Qe("order"),c=(()=>{const{order:e,orderStep:t}=pe(),r=ct(),o=mt(),{t:a}=Qe("error");return t!==J.DETAILS?null:(null==e?void 0:e.orderType)?e.orderType===Q.DELIVERY?o||r:null:a("NO_ORDER_TYPE")})(),m=!!c,p=G()&&(i===J.CART||m),_=o.isEmpty(n),E=()=>{s()};return a?e.jsx("div",{className:zr,onClick:e=>{var t,r;(null===(r=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.contains)||void 0===r?void 0:r.call(t,null==e?void 0:e.target))||E()},children:e.jsx(t.Drawer,{ref:l,onClose:E,isOpen:a,title:u("Your order"),onBack:i===J.CART?void 0:()=>{d(J.CART)},content:(()=>{switch(i){case J.DETAILS:return e.jsx(Ao,{});case J.COMPLETED:return e.jsx(xo,{});default:return e.jsx(no,{})}})(),footer:e.jsx(Hr,{isOrderItemsEmpty:_,orderError:c}),hasLargeFooter:p})}):null},Oo={[l]:({params:o})=>{const{modalRef:a,note:n}=o,[i,d]=r.useState(n||""),{setModal:s}=t.useModalContext(),{updateOrder:l}=pe(),{t:u}=Qe("order"),{t:c}=Qe("common");return e.jsx(t.Modal,{ref:a,header:e.jsx("div",{children:u("Add an order note")}),content:e.jsx("div",{className:Je.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:i,onChange:e=>{var t;return d(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:()=>{l({note:i}),s(null)},size:"md"})]})})},[u]:({params:a})=>{const{t:n}=Qe("auth"),{t:i}=Qe("error"),{t:d}=Qe("common"),{setModal:s}=t.useModalContext(),{setOrderStep:l,getCustomer:u}=pe(),[c,m]=r.useState({otp:"",email:""}),[p,_]=r.useState({}),[E,v]=r.useState(""),[h,g]=r.useState(rt.EMAIL),y=[rt.EMAIL,rt.OTP],{modalRef:T}=a,D=()=>{const e=y.indexOf(h),t=y[e+1];if(t)return g(t);l(J.DETAILS),s(null)},b=r.useCallback(e=>t=>{m(r=>Object.assign(Object.assign({},r),{[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:et.content,fullWidth:!0,children:[!!E&&e.jsx(t.AlertBox,{message:i(E),type:"error",onClear:()=>v(""),inline:!0}),h===rt.OTP?e.jsx(pt,{address:c.email,errorMessage:null==p?void 0:p.otp,onChange:b("otp")}):e.jsx(_t,{onChange:b("email"),formErrors:p})]}),footer:e.jsx(t.Button,{label:d("Continue"),onClick:()=>q(void 0,void 0,void 0,function*(){v("");try{const r=((e,t)=>{const r={},{email:a,otp:n}=e||{};switch(t){case rt.OTP:a&&o.checkIsValidEmail(a)||(r.email="Invalid Email Address"),n&&6===n.length||(r.otp="Invalid OTP");break;case rt.EMAIL:a&&o.checkIsValidEmail(a)||(r.email="Invalid Email Address")}return r})(c,h);if(!o.isEmpty(r))return _(r);switch(_({}),h){case rt.OTP:{const r=yield(e=c.otp,t=c.email,q(void 0,void 0,void 0,function*(){return se.post("/otp/verify",{otp:e,email:t})}));if(!(null==r?void 0:r.accessToken))throw new Error("SOMETHING_WRONG");I.saveAuthToken(r);break}case rt.EMAIL:{const e=yield(e=>q(void 0,void 0,void 0,function*(){return se.post("/customer",{email:e})}))(c.email);if(200!==(null==e?void 0:e.status))throw new Error("SOMETHING_WRONG");break}}yield u(),D()}catch(e){v((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/Modals/Auth/Auth.tsx",method:"handleSubmit",payload:c})}var e,t}),size:"lg",fullWidth:!0})})},[c]:({params:a})=>{const n=E[0].code,{getCustomer:i}=pe(),d=P(),s=W(),{id:l,countryCode:u=n,cityName:c="",street:m="",houseNumber:p="",floor:_,additionalNumber:v="",instructions:h="",longitude:g,latitude:I,postCode:y}=tt(),T={addressId:l,countryCode:u,cityName:c,street:m,houseNumber:p,additionalNumber:v,instructions:h,floor:_,latitude:I,longitude:g,postCode:y},{modalRef:D}=a,{t:b}=Qe("customer"),{t:f}=Qe("error"),{t:A}=Qe("common"),{setModal:x}=t.useModalContext(),[C,O]=r.useState(T),[R,j]=r.useState({}),[N,S]=r.useState(""),[k,L]=r.useState(!1),[w,M]=r.useState(!1),U=R.countryCode||R.cityName||R.street,z=nt(T.street,T.houseNumber,void 0),B=e=>{var t,r;const o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.name,a=null===(r=null==e?void 0:e.target)||void 0===r?void 0:r.value;O(e=>{const t=Object.assign(Object.assign({},e),{[o]:a}),r=at(t);return j(r),t})},V=()=>x(null),Y=r.useCallback(e=>{const t=Object.assign(Object.assign({},C),{countryCode:e.countryCode,cityName:e.cityName,street:e.street,houseNumber:e.houseNumber||"",latitude:e.lat,longitude:e.long,postCode:e.postCode}),r=at(t);O(t),j(r),M(!e.houseNumber)},[C]);return e.jsx(t.Modal,{ref:D,title:b("Update Delivery Address"),onClose:V,content:e.jsx("div",{className:Et.content,children:e.jsxs(t.Column,{fullWidth:!0,children:[!!N&&e.jsx(t.AlertBox,{message:f(N),type:"error",onClear:()=>S(""),inline:!0}),e.jsxs(t.Column,{fullWidth:!0,gap:.5,children:[e.jsx(t.AddressAutocomplete,{onSelect:Y,language:d,origin:{lat:null==s?void 0:s.latitude,lng:null==s?void 0:s.longitude},noMargin:!0,defaultAdressText:z,placeHolder:b("Enter address"),inputLabel:b("Address")}),U&&e.jsx(t.Text,{color:t.UIElementType.DANGER,children:f(U)})]}),e.jsxs(t.Flex,{gap:1,children:[w&&e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"houseNumber",label:b("House No."),placeholder:"221B",type:t.InputType.TEXT,value:C.houseNumber,onChange:B,errorMessage:f(R.houseNumber)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"floor",label:b("Floor"),placeholder:"7",type:t.InputType.TEXT,value:C.floor,onChange:B,errorMessage:f(R.floor)})}),e.jsx(t.Flex.Item,{flex:6,children:e.jsx(t.Input,{name:"additionalNumber",label:b("Additional number"),placeholder:"17",type:t.InputType.TEXT,value:C.additionalNumber,onChange:B,errorMessage:f(R.additionalNumber)})})]}),e.jsx(t.Input,{name:"instructions",placeholder:b("Example: Door code is 555"),label:b("Delivery Instructions"),type:t.InputType.TEXT,fullWidth:!0,value:C.instructions,onChange:B,errorMessage:f(R.instructions)})]})}),footer:e.jsx(t.Button,{label:A("Save"),onClick:()=>q(void 0,void 0,void 0,function*(){S("");try{const t=at(C);if(!o.isEmpty(t))return j(t);j({}),L(!0);const r=yield(e={address:C},q(void 0,void 0,void 0,function*(){return se.patch("/customer",e)}));if(200!==(null==r?void 0:r.status))throw new Error("SOMETHING_WRONG");i(),V()}catch(e){S((null==e?void 0:e.errorCode)||"SOMETHING_WRONG"),le(e,{file:"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx",method:"handleSubmit",payload:C})}finally{L(!1)}var e}),size:"lg",fullWidth:!0,isLoading:k})})},[m]:({params:r})=>{const{setModal:o}=t.useModalContext(),{t:a}=Qe("branch"),{modalRef:n,openingHours:i,deliveryHours:d}=r;return e.jsx(t.Modal,{ref:n,onClose:()=>o(null),content:e.jsx(yt,{openingHours:i,deliveryHours:d}),title:a("Opening Hours")})},[p]:({params:t})=>{const{product:a={},modalRef:n,closeModal:i}=t,d=(null==a?void 0:a.sellUnitType)===dt.WEIGHT||(null==a?void 0:a.sellUnitType)===dt.VOLUME?0:1,s=P(),l=N(),{addToOrderEnabled:u}=Y(),{addProduct:c,updateProduct:m,removeAllProductVariants:p}=pe(),[_,E]=r.useState(d),[v,h]=r.useState(!1),[g,I]=r.useState(null),[y,T]=r.useState(null),[D,b]=r.useState({}),{t:f}=Qe("order"),A=(({productId:e,variantId:t,selectedAddons:r})=>{var a;const{orderItems:n}=pe();return o.isEmpty(n)||!e?0:(null===(a=n[ne(e,t,r)])||void 0===a?void 0:a.quantity)||0})({productId:null==a?void 0:a.id,variantId:g,selectedAddons:D}),x=(e=>{const{orderItems:t}=pe();return o.isEmpty(t)||!e?0:Object.values(t).filter(t=>t.productId===e).reduce((e,t)=>e+t.quantity,0)})(null==a?void 0:a.id),{name:C}=r.useMemo(()=>kt(a,s),[a,s]),O=v?0===_:1===_,R=r.useMemo(()=>f(v?0===_?"Remove from order":"Update order":"Add"),[v,_]),j=De(null==a?void 0:a.id),S=Boolean(a.videoUrl);r.useEffect(()=>{q(void 0,void 0,void 0,function*(){E(A>0?A+1:d),h(A>0)})},[A,a,d]),r.useEffect(()=>{q(void 0,void 0,void 0,function*(){I(null),b({})})},[a]);const k=r.useCallback(e=>{T(e),setTimeout(()=>{T(null)},200)},[]),L=r.useCallback(()=>{var e;return(null===(e=null==a?void 0:a.variants)||void 0===e?void 0:e.length)>0&&!g?k("variant"):_<=0?k("quantity"):(v?m({product:a,quantity:_,variantId:g,selectedAddons:D}):(c({product:a,quantity:_,variantId:g,selectedAddons:D}),o.trackEvent(Vt,{name:C,quantity:_})),void(null==i||i()))},[c,i,k,v,C,a,_,D,g,m]),w=r.useCallback(e=>{-1===e&&O||E(t=>Math.max(0,t+e))},[O]),M=r.useCallback(({addonId:e,optionId:t,isSingle:r,isRemove:o=!1})=>{b(a=>{if(r)return Object.assign(Object.assign({},a),{[e]:t});const n=a[e]||[],i=o?n.filter(e=>e!==t):[...new Set([...n,t])];return Object.assign(Object.assign({},a),{[e]:i})})},[]);return e.jsx(Ur,{modalRef:n,product:a,language:s,currency:l,selectedVariant:g,focusedSection:y,selectedAddons:D,isDecreaseDisabled:O,quantity:_,actionTitle:R,videoUrl:S?j:void 0,addToOrderEnabled:u,onClose:i,setSelectedVariant:I,onOptionSelect:M,adjustQuantity:w,onSubmit:L,removeAllProductVariants:p,productQuantityInOrderWithAllVariants:x,onQuantityChange:e=>E(e),isInPublicMenu:!0})}},Ro=()=>{const{getCustomer:a}=pe(),l=r.useRef(null),u=x(),c=F(),m=z()||c,p=Te(),{url:_,domain:E}=k(),{headerText:v,footerText:h}=(()=>{var e,t,r,o;const a=P(),{menuDesign:n}=R();return{headerText:null!==(t=null===(e=null==n?void 0:n.headerText)||void 0===e?void 0:e[a])&&void 0!==t?t:null,footerText:null!==(o=null===(r=null==n?void 0:n.footerText)||void 0===r?void 0:r[a])&&void 0!==o?o:null}})();return r.useEffect(()=>{u||a()},[a,u]),o.isEmpty(p)?e.jsxs("div",{className:n,ref:l,children:[e.jsx(Ze,{}),m&&v&&e.jsx(t.Text,{fullWidth:!0,align:"center",className:d,children:v}),m?e.jsx(dr,{containerRef:l}):e.jsx(Ot,{}),e.jsx(Dt,{size:"md",zIndex:10}),m&&h&&e.jsx(t.Text,{fullWidth:!0,align:"center",className:s,children:h}),!!E&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:_,className:i,children:E})]}):e.jsx(Ar,{})};var jo={};const No=({currentGoal:o,language:a,setGoal:n})=>{const{t:i}=Qe("events",{language:a}),d=r.useRef({}),s=e=>{switch(e){case Wt:return i("Scrolled to Category");case zt:return i("Category Selected");case Bt:return i("Product Details");case Vt:return i("Product Added to Order");default:return""}},l=r.useCallback(e=>{var t,r;n(e),null===(r=null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.close)||void 0===r||r.call(t)},[n]);return e.jsx(t.DropDown,{action:s(o),actionSize:"large",type:t.UIElementType.BORDERED_PRIMARY,closeRef:d,menu:e.jsx("div",{className:jo.toolbarMenu,children:Gt.map(r=>e.jsx(t.DropDownMenuItem,{onClick:()=>l(r),children:s(r)},r))})})};exports.Categories=Ht,exports.Events=({data:r,isLoading:o=!1,language:a,goal:n,setGoal:i})=>{const{t:d}=Qe("events",{language:a});return e.jsx(t.Card,{title:d("Events"),toolbar:e.jsx(No,{language:a,currentGoal:n,setGoal:i}),children:o?e.jsx(t.Loading,{}):e.jsx(t.BarChart,{data:r})})},exports.OrderFAB=nr,exports.OrderMethods=yo,exports.OrderPaymentSummary=bo,exports.OrderProvider=me,exports.OrderTableUI=ho,exports.ProductDetailsUI=Ur,exports.ProductsGridItem=tr,exports.PublicMenu=({data:r})=>e.jsx(O,{value:r||{},children:e.jsx(me,{children:e.jsxs(t.ModalProvider,{modalsMap:Oo,children:[e.jsx(Ro,{}),e.jsx(Co,{})]})})}),exports.Quantity=Or,exports.useOrderContext=pe;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|