@tabres/react 1.0.33 → 1.0.36

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.
Files changed (73) hide show
  1. package/dist/components/PublicMenu/OrderDrawer/OrderPaymentMethods/OrderPaymentMethods.d.ts +2 -0
  2. package/dist/components/PublicMenu/OrderDrawer/OrderPaymentMethods/index.d.ts +1 -0
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/models/index.esm.js +1 -1
  8. package/dist/models/index.esm.js.map +1 -1
  9. package/dist/models/index.js +1 -1
  10. package/dist/models/index.js.map +1 -1
  11. package/dist/models/modules/branch/models.d.ts +3 -1
  12. package/dist/models/services/translation/locales/az/index.d.ts +0 -1
  13. package/dist/models/services/translation/locales/az/order.d.ts +0 -1
  14. package/dist/models/services/translation/locales/es/index.d.ts +0 -1
  15. package/dist/models/services/translation/locales/es/order.d.ts +0 -1
  16. package/dist/models/services/translation/locales/et/index.d.ts +0 -1
  17. package/dist/models/services/translation/locales/et/order.d.ts +0 -1
  18. package/dist/models/services/translation/locales/hr/index.d.ts +0 -1
  19. package/dist/models/services/translation/locales/hr/order.d.ts +0 -1
  20. package/dist/models/services/translation/locales/index.d.ts +0 -9
  21. package/dist/models/services/translation/locales/nl/index.d.ts +0 -1
  22. package/dist/models/services/translation/locales/nl/order.d.ts +0 -1
  23. package/dist/models/services/translation/locales/pl/index.d.ts +0 -1
  24. package/dist/models/services/translation/locales/pl/order.d.ts +0 -1
  25. package/dist/models/services/translation/locales/pt/index.d.ts +0 -1
  26. package/dist/models/services/translation/locales/pt/order.d.ts +0 -1
  27. package/dist/models/services/translation/locales/ru/index.d.ts +0 -1
  28. package/dist/models/services/translation/locales/ru/order.d.ts +0 -1
  29. package/dist/models/services/translation/locales/tr/index.d.ts +0 -1
  30. package/dist/models/services/translation/locales/tr/order.d.ts +0 -1
  31. package/dist/modules/branch/models.d.ts +3 -1
  32. package/dist/services/translation/locales/az/index.d.ts +0 -1
  33. package/dist/services/translation/locales/az/order.d.ts +0 -1
  34. package/dist/services/translation/locales/es/index.d.ts +0 -1
  35. package/dist/services/translation/locales/es/order.d.ts +0 -1
  36. package/dist/services/translation/locales/et/index.d.ts +0 -1
  37. package/dist/services/translation/locales/et/order.d.ts +0 -1
  38. package/dist/services/translation/locales/hr/index.d.ts +0 -1
  39. package/dist/services/translation/locales/hr/order.d.ts +0 -1
  40. package/dist/services/translation/locales/index.d.ts +0 -9
  41. package/dist/services/translation/locales/nl/index.d.ts +0 -1
  42. package/dist/services/translation/locales/nl/order.d.ts +0 -1
  43. package/dist/services/translation/locales/pl/index.d.ts +0 -1
  44. package/dist/services/translation/locales/pl/order.d.ts +0 -1
  45. package/dist/services/translation/locales/pt/index.d.ts +0 -1
  46. package/dist/services/translation/locales/pt/order.d.ts +0 -1
  47. package/dist/services/translation/locales/ru/index.d.ts +0 -1
  48. package/dist/services/translation/locales/ru/order.d.ts +0 -1
  49. package/dist/services/translation/locales/tr/index.d.ts +0 -1
  50. package/dist/services/translation/locales/tr/order.d.ts +0 -1
  51. package/dist/styles/ui.css +1 -1
  52. package/dist/styles/ui.css.map +1 -1
  53. package/dist/utils/modules/branch/models.d.ts +3 -1
  54. package/dist/utils/services/translation/locales/az/index.d.ts +0 -1
  55. package/dist/utils/services/translation/locales/az/order.d.ts +0 -1
  56. package/dist/utils/services/translation/locales/es/index.d.ts +0 -1
  57. package/dist/utils/services/translation/locales/es/order.d.ts +0 -1
  58. package/dist/utils/services/translation/locales/et/index.d.ts +0 -1
  59. package/dist/utils/services/translation/locales/et/order.d.ts +0 -1
  60. package/dist/utils/services/translation/locales/hr/index.d.ts +0 -1
  61. package/dist/utils/services/translation/locales/hr/order.d.ts +0 -1
  62. package/dist/utils/services/translation/locales/index.d.ts +0 -9
  63. package/dist/utils/services/translation/locales/nl/index.d.ts +0 -1
  64. package/dist/utils/services/translation/locales/nl/order.d.ts +0 -1
  65. package/dist/utils/services/translation/locales/pl/index.d.ts +0 -1
  66. package/dist/utils/services/translation/locales/pl/order.d.ts +0 -1
  67. package/dist/utils/services/translation/locales/pt/index.d.ts +0 -1
  68. package/dist/utils/services/translation/locales/pt/order.d.ts +0 -1
  69. package/dist/utils/services/translation/locales/ru/index.d.ts +0 -1
  70. package/dist/utils/services/translation/locales/ru/order.d.ts +0 -1
  71. package/dist/utils/services/translation/locales/tr/index.d.ts +0 -1
  72. package/dist/utils/services/translation/locales/tr/order.d.ts +0 -1
  73. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/modules/menu/utils.ts","../src/modules/view/constants.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/modules/view/hooks.ts","../src/store/index.tsx","../src/modules/business/hooks.ts","../src/modules/business/constants.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/menu/hooks.ts","../node_modules/tslib/tslib.es6.js","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils/item-price.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/client.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/store/hooks.ts","../src/modules/table/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/modules/business/models.ts","../src/modules/video/hooks.ts","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/PublicMenu/Header/BusinessHeader/BusinessHeader.tsx","../src/components/BackIcon/BackIcon.tsx","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/es/index.ts","../src/services/translation/locales/es/auth.ts","../src/services/translation/locales/es/branch.ts","../src/services/translation/locales/es/common.ts","../src/services/translation/locales/es/customer.ts","../src/services/translation/locales/es/error.ts","../src/services/translation/locales/es/events.ts","../src/services/translation/locales/es/order.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/locales/pl/index.ts","../src/services/translation/locales/pl/error.ts","../src/services/translation/locales/pl/common.ts","../src/services/translation/locales/pl/order.ts","../src/services/translation/locales/pl/customer.ts","../src/services/translation/locales/pl/auth.ts","../src/services/translation/locales/pl/events.ts","../src/services/translation/locales/pl/branch.ts","../src/services/translation/locales/pt/index.ts","../src/services/translation/locales/pt/error.ts","../src/services/translation/locales/pt/common.ts","../src/services/translation/locales/pt/order.ts","../src/services/translation/locales/pt/customer.ts","../src/services/translation/locales/pt/auth.ts","../src/services/translation/locales/pt/events.ts","../src/services/translation/locales/pt/branch.ts","../src/services/translation/locales/hr/index.ts","../src/services/translation/locales/hr/error.ts","../src/services/translation/locales/hr/common.ts","../src/services/translation/locales/hr/order.ts","../src/services/translation/locales/hr/customer.ts","../src/services/translation/locales/hr/auth.ts","../src/services/translation/locales/hr/events.ts","../src/services/translation/locales/hr/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.tsx","../src/components/PublicMenu/Header/BranchHeader/BranchHeader.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/modules/customer/hooks.ts","../src/modules/customer/models.ts","../src/modules/customer/utils.ts","../src/modules/product/models.ts","../src/modules/order/hooks.ts","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Branches/BranchCard/Parent.tsx","../src/components/PublicMenu/Branches/BranchCard/BranchCard.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/modules/product/utils/listing-price.ts","../src/modules/addon/models.ts","../src/modules/product/utils/order-price.ts","../src/modules/product/utils.ts","../src/modules/product/hooks.ts","../src/modules/category/utils.ts","../src/constants/analytics.ts","../src/components/PublicMenu/Categories/Categories.tsx","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/OrderFAB/OrderFAB.tsx","../src/components/PublicMenu/OrderFAB/OrderFABContainer.tsx","../src/components/PublicMenu/MenuContent/MenuContent.tsx","../src/modules/category/hooks.ts","../src/components/PublicMenu/Videos/Video/Actions/Actions.tsx","../src/components/PublicMenu/Videos/Video/VideoData/VideoData.tsx","../src/components/PublicMenu/Videos/Video/Video.tsx","../src/components/PublicMenu/Videos/VideoFeed/VideoFeed.tsx","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/modules/addon/utils.ts","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/modules/order/preview.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/modules/table/models.ts","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx"],"sourcesContent":["import * as categoryModels from \"src/modules/category/models\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { CategoryProductMap } from \"./models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: categoryModels.Category[],\n\tproducts: productModels.Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, productModels.Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as productModels.Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n\tPRODUCT_DETAILS: \"PRODUCT_DETAILS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\", \"pl\", \"pt\", \"hr\"];\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n\nexport const DOMAIN = \"tabres.com\";\n\nexport const DEFAULT_HOSTNAME = DOMAIN;\n\nexport const IMAGE_BASE_URL = \"https://images.tabres.com\";\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"tabres_cst_act\", \"tabres_cst_rft\");\n","import { DOMAIN, IMAGE_BASE_URL } from \"./constants\";\n\ninterface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst locale = language || \"en\";\n\t// Local env\n\tif (hostname === \"localhost:3000\") {\n\t\treturn { url: `http://localhost:3000/${locale}`, domain: DOMAIN };\n\t}\n\t// Prod env\n\treturn { url: `https://${DOMAIN}/${locale}`, domain: DOMAIN };\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\treturn `https://app.tabres.com/auth/register?lang=${language}&utm_source=${source}`;\n};\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.tabres.com/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.tabres.com/tabres-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n\nexport const getVideoSource = (video?: string) => {\n\tif (!video) return \"\";\n\n\tif (video.includes(\"base64\") || video.startsWith(\"https://\")) return video;\n\n\treturn `${IMAGE_BASE_URL}/${video}`;\n};\n\nexport const adjustLightness = (hex: string, deltaPct: number) => {\n\tconst n = parseInt(hex.replace(\"#\", \"\"), 16);\n\tconst r = ((n >> 16) & 0xff) / 255;\n\tconst g = ((n >> 8) & 0xff) / 255;\n\tconst b = (n & 0xff) / 255;\n\n\tconst max = Math.max(r, g, b);\n\tconst min = Math.min(r, g, b);\n\tconst l = (max + min) / 2;\n\tlet h = 0;\n\tlet s = 0;\n\tif (max !== min) {\n\t\tconst d = max - min;\n\t\ts = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\t\tswitch (max) {\n\t\t\tcase r:\n\t\t\t\th = (g - b) / d + (g < b ? 6 : 0);\n\t\t\t\tbreak;\n\t\t\tcase g:\n\t\t\t\th = (b - r) / d + 2;\n\t\t\t\tbreak;\n\t\t\tcase b:\n\t\t\t\th = (r - g) / d + 4;\n\t\t\t\tbreak;\n\t\t}\n\t\th /= 6;\n\t}\n\n\tconst newL = Math.max(0, Math.min(1, l + deltaPct / 100));\n\n\tconst hueToRgb = (p: number, q: number, t: number) => {\n\t\tif (t < 0) t += 1;\n\t\tif (t > 1) t -= 1;\n\t\tif (t < 1 / 6) return p + (q - p) * 6 * t;\n\t\tif (t < 1 / 2) return q;\n\t\tif (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n\t\treturn p;\n\t};\n\n\tlet r2 = newL;\n\tlet g2 = newL;\n\tlet b2 = newL;\n\tif (s !== 0) {\n\t\tconst q = newL < 0.5 ? newL * (1 + s) : newL + s - newL * s;\n\t\tconst p = 2 * newL - q;\n\t\tr2 = hueToRgb(p, q, h + 1 / 3);\n\t\tg2 = hueToRgb(p, q, h);\n\t\tb2 = hueToRgb(p, q, h - 1 / 3);\n\t}\n\n\tconst toHex = (x: number) =>\n\t\tMath.round(x * 255)\n\t\t\t.toString(16)\n\t\t\t.padStart(2, \"0\");\n\treturn `#${toHex(r2)}${toHex(g2)}${toHex(b2)}`;\n};\n","import { useStoreContext } from \"src/store\";\n\nimport { DEFAULT_HOSTNAME } from \"./constants\";\n\nexport const useHostname = (): string => {\n\tconst { hostname } = useStoreContext();\n\n\treturn hostname || DEFAULT_HOSTNAME;\n};\n\nexport const useIsInDashboard = (): boolean => {\n\tconst { isInDashboard } = useStoreContext();\n\n\treturn isInDashboard || false;\n};\n","import { createContext, CSSProperties, ReactElement, useContext } from \"react\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nconst StoreContext = createContext<menuModels.PublicMenuData>({} as menuModels.PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: menuModels.PublicMenuData;\n}) => {\n\treturn (\n\t\t<StoreContext.Provider value={value}>\n\t\t\t<div\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--sorocraft-color-primary\": value.menuDesign?.primaryColor,\n\t\t\t\t\t\t\"--sorocraft-color-primary-light\":\n\t\t\t\t\t\t\tvalue.menuDesign?.primaryColor &&\n\t\t\t\t\t\t\tviewUtils.adjustLightness(value.menuDesign.primaryColor, 37.5),\n\t\t\t\t\t\t\"--sorocraft-color-primary-active\":\n\t\t\t\t\t\t\tvalue.menuDesign?.primaryColor &&\n\t\t\t\t\t\t\tviewUtils.adjustLightness(value.menuDesign.primaryColor, -7.5),\n\t\t\t\t\t\t\"--tabres-menu-category-background-color\": value.menuDesign?.categoryBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-category-text-color\": value.menuDesign?.categoryTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-background-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-text-color\": value.menuDesign?.productCardTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-description-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardDescriptionTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-volume-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardVolumeTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-price-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardPriceTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-block-padding\": value.menuDesign?.productCardBlockPadding,\n\t\t\t\t\t\t\"--tabres-menu-category-title-font-size\": value.menuDesign?.categoryTitleFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-name-font-size\": value.menuDesign?.productNameFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-price-font-size\": value.menuDesign?.productPriceFontSize,\n\t\t\t\t\t\t\"--tabres-menu-distance-between-category-title-and-products\":\n\t\t\t\t\t\t\tvalue.menuDesign?.distanceBetweenCategoryTitleAndProducts,\n\t\t\t\t\t\t\"--tabres-menu-product-description-font-size\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productDescriptionFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-volume-font-size\": value.menuDesign?.productVolumeFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-separator-color\": value.menuDesign?.productSeparatorColor,\n\t\t\t\t\t\t\"--tabres-menu-page-background-color\": value.menuDesign?.menuPageBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-page-text-color\": value.menuDesign?.menuPageTextColor,\n\t\t\t\t\t} as CSSProperties\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</StoreContext.Provider>\n\t);\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","import { useMemo } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as viewHooks from \"src/modules/view/hooks\";\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport { Business, BusinessLanguage } from \"./models\";\nimport { DEFAULT_CURRENCY, DEFAULT_LANGUAGE } from \"./constants\";\n\nexport const useBusiness = (): Business => {\n\tconst { business } = useStoreContext();\n\n\treturn business || ({} as Business);\n};\n\nexport const useCurrency = () => {\n\tconst { currency } = useBusiness();\n\n\treturn currency || DEFAULT_CURRENCY;\n};\n\nexport const useBusinessId = (): number => {\n\tconst { id } = useBusiness();\n\n\treturn id;\n};\n\nexport const useBusinessUsername = (): string => {\n\tconst { username } = useBusiness();\n\n\treturn username || \"\";\n};\n\nexport const useLanguages = (): BusinessLanguage[] => {\n\tconst business = useBusiness();\n\n\treturn business.languages || [];\n};\n\nexport const useLanguage = (): string => {\n\tconst { language } = useStoreContext();\n\n\treturn language || DEFAULT_LANGUAGE;\n};\n\nexport const useOnLanguageSelect = (): ((code: string) => void) => {\n\tconst { onLanguageSelect } = useStoreContext();\n\n\treturn onLanguageSelect;\n};\n\nexport const useBusinessSegment = () => {\n\tconst { segment } = useBusiness();\n\n\treturn segment;\n};\n\nexport const useBusinessName = (): string => {\n\tconst { name } = useBusiness();\n\n\treturn name;\n};\n\nexport const useBaseUrl = () => {\n\tconst hostname = viewHooks.useHostname();\n\tconst language = useLanguage();\n\n\treturn useMemo(() => viewUtils.getBaseUrl(hostname, language), [hostname, language]);\n};\n\nexport const useBusinessUrl = () => {\n\tconst { url } = useBaseUrl();\n\tconst username = useBusinessUsername();\n\n\treturn useMemo(() => `${url}/${username}`, [url, username]);\n};\n","export const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\n","import { BranchWorkDays } from \"src/models\";\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"src/modules/view/models\";\n\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { Branch, BranchServes, BranchSettings } from \"./models\";\n\nexport const useHasSingleBranch = (): boolean => {\n\tconst { branches } = useStoreContext();\n\n\treturn (branches || []).length <= 1;\n};\n\nexport const useSelectedBranch = (): Branch => {\n\tconst { branches, branchId } = useStoreContext();\n\tconst hasSingleBranch = useHasSingleBranch();\n\n\tif (isEmpty(branches)) return {} as Branch;\n\n\tif (hasSingleBranch) {\n\t\treturn branches[0];\n\t}\n\n\treturn branches.find((item) => item.id === Number(branchId)) || ({} as Branch);\n};\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchAddress = (): string => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch.address || \"\";\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst selectedBranch = useSelectedBranch();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n\nexport const useIsDeliveryEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\treturn settings?.deliveryOrderEnabled;\n};\n\nexport const useVenueName = () => {\n\tconst { business } = useStoreContext();\n\tconst selectedBranch = useSelectedBranch();\n\tconst hasSingleBranch = useHasSingleBranch();\n\tconst businessName = business?.name || \"Tabres\";\n\n\tif (hasSingleBranch) return businessName;\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport const useBranchId = (): number | undefined => {\n\tconst { branchId } = useStoreContext();\n\n\treturn branchId;\n};\n\nexport const useList = (): Branch[] => {\n\tconst { branches } = useStoreContext();\n\n\treturn branches || [];\n};\n\nexport const useOnBranchSelect = (): ((branchId: number) => void) => {\n\tconst { onBranchSelect } = useStoreContext();\n\n\treturn onBranchSelect;\n};\n","import * as businessHooks from \"src/modules/business/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useMenuUrl = () => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst branchId = branchHooks.useBranchId();\n\n\tif (!branchId) return businessUrl;\n\n\treturn `${businessUrl}/${branchId}`;\n};\n\nexport const useMenuTexts = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst { menuDesign } = useStoreContext();\n\n\tconst headerText = menuDesign?.headerText?.[language] ?? null;\n\tconst footerText = menuDesign?.footerText?.[language] ?? null;\n\n\treturn { headerText, footerText };\n};\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import * as customerModels from \"../customer/models\";\nimport * as productModels from \"../product/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\t/** Gross unit price (listingPrice from the menu listing). */\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\t/** Gross unit price (listingPrice from the menu listing). */\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\t/**\n\t * Gross unit price (listingPrice) at the moment the line was added. The\n\t * server recomputes authoritative totals on create/preview; this value is\n\t * what the cart UI displays.\n\t */\n\tprice?: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tisPaid?: boolean;\n\tsellUnitType: productModels.SellUnitType;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tpreferredPaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n\tcurrency?: string;\n\ttrackingId?: string;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n\tlanguage?: string;\n}\n\nexport interface CalculatePreviewItemRequest {\n\torderItemsId: string;\n\tproductId: number;\n\tquantity: number;\n\tvariant?: { variantId: number };\n\taddons?: Array<{\n\t\taddonId: number;\n\t\toptions: Array<{ optionId: number }>;\n\t}>;\n}\n\nexport interface CalculatePreviewRequest {\n\tbusinessId?: number;\n\tbranchId: number;\n\torderType: OrderType;\n\titems: CalculatePreviewItemRequest[];\n}\n\nexport interface CalculatePreviewTax {\n\tbranchTaxId: number;\n\tname: Record<string, string>;\n\trate: number;\n\ttype: \"percentage\" | \"fixed\";\n\taddToListingPrice: boolean;\n\tamount: number;\n}\n\nexport interface CalculatePreviewLine {\n\torderItemsId: string;\n\tproductId: number;\n\tquantity: number;\n\tprice: number;\n\ttaxes: CalculatePreviewTax[];\n}\n\nexport interface CalculatePreviewResponse {\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\ttotalTax: number;\n\tdeliveryFee: number;\n\tserviceFee: number;\n\titems: CalculatePreviewLine[];\n\ttaxes: CalculatePreviewTax[];\n}\n\nexport interface OrderPreviewState {\n\tdata: CalculatePreviewResponse | null;\n\tisLoading: boolean;\n\terror: string | null;\n}\n","import { OrderPreviewState, OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\tpreferredPaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport const initialPreviewState: OrderPreviewState = {\n\tdata: null,\n\tisLoading: false,\n\terror: null,\n};\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { OrderItem } from \"../models\";\n\nexport const getOrderItemListingRawPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity } = orderItem || {};\n\n\tconst baseUnitPrice = variant?.price ?? price ?? 0;\n\n\tconst addonsUnitPrice = (addons || []).reduce(\n\t\t(addonSum, addon) =>\n\t\t\taddonSum +\n\t\t\t(addon?.options || []).reduce((optionSum, option) => optionSum + (option?.price ?? 0), 0),\n\t\t0,\n\t);\n\n\tconst unitPrice = baseUnitPrice + addonsUnitPrice;\n\treturn unitPrice * (quantity ?? 1);\n};\n\nexport const getOrderItemListingPrice = (\n\torderItem: OrderItem,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst totalPrice = getOrderItemListingRawPrice(orderItem);\n\n\treturn priceFormatter(totalPrice, currency, language);\n};\n","import { isEmpty, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tCalculatePreviewResponse,\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons,\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {},\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.listingPrice ?? option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean,\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\n// Defensive shape check for the /order/calculate response. The service is\n// typed as CalculatePreviewResponse, but the network can return malformed\n// payloads (empty body, HTML error page) that would corrupt preview state\n// and break price-line lookups downstream.\nexport const isValidPreviewResponse = (data: unknown): data is CalculatePreviewResponse => {\n\tif (!data || typeof data !== \"object\") return false;\n\tconst d = data as Partial<CalculatePreviewResponse>;\n\treturn (\n\t\ttypeof d.totalPriceWithoutTax === \"number\" &&\n\t\ttypeof d.totalPriceWithTax === \"number\" &&\n\t\ttypeof d.totalPriceWithTaxAndFees === \"number\" &&\n\t\ttypeof d.totalTax === \"number\" &&\n\t\ttypeof d.deliveryFee === \"number\" &&\n\t\ttypeof d.serviceFee === \"number\" &&\n\t\tArray.isArray(d.items) &&\n\t\tArray.isArray(d.taxes)\n\t);\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n\nexport * from \"./utils/item-price\";\n","export const BASE_API_V2_URL = \"https://api.tabres.com/api/v2\";\n","import { HttpClient } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_V2_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst httpClient = new HttpClient({\n\tbaseURL: BASE_API_V2_URL,\n\theaders: {\n\t\t\"Content-Type\": \"application/json\",\n\t},\n\tcredentials: \"include\",\n});\n\nhttpClient.onRequest((config) => {\n\tconst { accessToken = \"\" } = storage.getAuthToken();\n\tconfig.headers.Authorization = accessToken;\n\treturn config;\n});\n\nhttpClient.onResponse(async (response) => {\n\tconst data = await response.json().catch(() => null);\n\treturn data;\n});\n\nexport default httpClient;\n","import httpClient from \"src/services/api/client\";\n\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn httpClient.get(\"/customer\");\n};\n\nexport const loginCustomer = async (email: string): Promise<{ status: number }> => {\n\treturn httpClient.post(\"/customer\", { email });\n};\n\nexport const verifyOTP = async (otp: string, email: string): Promise<AuthResponse> => {\n\treturn httpClient.post(\"/otp/verify\", { otp, email });\n};\n\nexport const update = async (payload: CustomerUpdatePayload): Promise<{ status: number }> => {\n\treturn httpClient.patch(\"/customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates,\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\",\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude,\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude,\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_V2_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_V2_URL}/log/client`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as tableHooks from \"src/modules/table/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst tableId = tableHooks.usePreDefinedTableId();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\tpreferredPaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean, shouldClose?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n\tisOrderDefaultOpen?: boolean;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n\tisOrderDefaultOpen = false,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(isOrderDefaultOpen);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t([\"branchId\", \"tableId\"] as const).forEach((field) => {\n\t\t\t\tif (updatedFields[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => {\n\t\t\t\t\t\tif (currentErrors?.[field]) {\n\t\t\t\t\t\t\treturn { ...currentErrors, [field]: null };\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn currentErrors;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity = 1,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product)) return;\n\n\t\t\tconst { id: productId, variants, addons, price, listingPrice, sellUnitType } = product;\n\t\t\t// Cart lines record the gross unit price the user saw on the menu;\n\t\t\t// the server is still source-of-truth for actual line totals at\n\t\t\t// create/preview time.\n\t\t\tconst unitPrice = listingPrice ?? price;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = parseFloat(\n\t\t\t\t\t(isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity).toFixed(3),\n\t\t\t\t);\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice: unitPrice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: {\n\t\t\t\t\t\t\t\tvariantId: selectedVariant.id,\n\t\t\t\t\t\t\t\tprice: selectedVariant.listingPrice ?? selectedVariant.price,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t\tsellUnitType,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation) {\n\t\t\t\tsetErrors((currentErrors) => {\n\t\t\t\t\tif (currentErrors?.items) {\n\t\t\t\t\t\treturn { ...currentErrors, items: null };\n\t\t\t\t\t}\n\t\t\t\t\treturn currentErrors;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[],\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems],\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems],\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId) return;\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tif (isEmpty(currentOrderItems)) return currentOrderItems;\n\n\t\t\t\t// Filter out order items that belong to the given productId\n\t\t\t\tconst updatedOrderItems = Object.entries(currentOrderItems).reduce(\n\t\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{} as orderModels.OrderItems,\n\t\t\t\t);\n\n\t\t\t\treturn updatedOrderItems;\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false, shouldClose = true) => {\n\t\t\tif (shouldClose) setIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep],\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t],\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n\tdeliveryFeeAmount: number;\n\tserviceChargeEnabled: boolean;\n\tserviceChargePercentage: number;\n\taddToOrderEnabled: boolean;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n\tDELIVERY_FEE_AMOUNT = \"deliveryFeeAmount\",\n\tSERVICE_CHARGE_ENABLED = \"serviceChargeEnabled\",\n\tSERVICE_CHARGE_PERCENTAGE = \"serviceChargePercentage\",\n\tADD_TO_ORDER_ENABLED = \"addToOrderEnabled\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twhatsApp?: string;\n\ttelegram?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\ttimezone?: string;\n\tbusinessDayStart?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n\nexport enum BranchTaxType {\n\tPERCENTAGE = \"percentage\",\n\tFIXED_AMOUNT = \"fixed\",\n}\n\nexport enum BranchTaxScope {\n\tENTIRE_MENU = \"entire_menu\",\n\tCLASS = \"class\",\n}\n\nexport enum BranchTaxFulfillment {\n\tDELIVERY = \"delivery\",\n\tTAKEAWAY = \"takeaway\",\n\tDINE_IN = \"dine_in\",\n\tALL = \"ALL\",\n}\n\nexport type BranchTax = {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\ttaxClassId?: number;\n\tname: Record<string, string>;\n\trate: number;\n\ttype: BranchTaxType;\n\tisActive: boolean;\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tscope: BranchTaxScope;\n\taddToListingPrice: boolean;\n\tisDefault: boolean;\n\tcomputationOrder: number;\n\tappliesToFulfillment?: BranchTaxFulfillment;\n\ttaxClassCode?: string;\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","import { RefObject, useEffect, useMemo, useRef, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nimport { Video } from \"./models\";\n\nexport const useVideoId = () => {\n\tconst { videoId } = useStoreContext();\n\n\treturn videoId;\n};\n\nexport const useVideos = (): Video[] => {\n\tconst { videos } = useStoreContext();\n\n\treturn useMemo(() => videos || [], [videos]);\n};\n\nexport const useCurrentVideo = (): Video => {\n\tconst allVideos = useVideos();\n\tconst videoId = useVideoId();\n\n\treturn useMemo(() => {\n\t\tif (!videoId) return {} as Video;\n\t\treturn allVideos.find((video) => video.productId === Number(videoId)) || ({} as Video);\n\t}, [allVideos, videoId]);\n};\n\nexport const useOtherVideosForScrolling = (): Video[] => {\n\tconst currentVideoId = useVideoId();\n\tconst allVideos = useVideos();\n\n\treturn useMemo(\n\t\t() => allVideos.filter((video) => video.productId !== Number(currentVideoId)),\n\t\t[allVideos, currentVideoId]\n\t);\n};\n\nexport function useActiveSnap(containerRef: RefObject<HTMLElement>) {\n\tconst [activeId, setActiveId] = useState<number | null>(null);\n\tconst elements = useRef(new Map<number, HTMLElement>());\n\n\tconst register = (id: number, el: HTMLElement | null) => {\n\t\tif (el) elements.current.set(id, el);\n\t};\n\n\tuseEffect(() => {\n\t\tconst root = containerRef.current;\n\t\tif (!root) return;\n\n\t\tlet rafId: number;\n\n\t\tconst observer = new IntersectionObserver(\n\t\t\t(entries) => {\n\t\t\t\t// Pick the most visible item\n\t\t\t\tconst visible = entries\n\t\t\t\t\t.filter((e) => e.isIntersecting)\n\t\t\t\t\t.sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];\n\n\t\t\t\tif (visible) {\n\t\t\t\t\tcancelAnimationFrame(rafId);\n\t\t\t\t\trafId = requestAnimationFrame(() => {\n\t\t\t\t\t\tsetActiveId((prev) => {\n\t\t\t\t\t\t\tconst nextId =\n\t\t\t\t\t\t\t\t[...elements.current.entries()].find(([, el]) => el === visible.target)?.[0] ??\n\t\t\t\t\t\t\t\tnull;\n\n\t\t\t\t\t\t\treturn prev === nextId ? prev : nextId;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\troot,\n\t\t\t\tthreshold: [0.6, 0.75, 1],\n\t\t\t}\n\t\t);\n\n\t\telements.current.forEach((el) => observer.observe(el));\n\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [containerRef]);\n\n\treturn { activeId, register };\n}\n\nexport const useFirstVideo = (): Video => {\n\tconst videos = useVideos();\n\n\treturn useMemo(() => videos[0], [videos]);\n};\n\nexport const useVideoUrl = (videoId: number): string => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst branchId = branchHooks.useBranchId();\n\n\tlet url = businessUrl;\n\tif (branchId) url += `/${branchId}`;\n\tif (videoId) url += `/videos/${videoId}`;\n\n\treturn url;\n};\n\nexport const useFirstVideoUrl = (): string => {\n\tconst firstVideo = useFirstVideo();\n\tconst firstVideoUrl = useVideoUrl(firstVideo?.productId);\n\n\tif (isEmpty(firstVideo)) return \"\";\n\treturn firstVideoUrl;\n};\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nconst Languages = () => {\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\tconst languages = businessHooks.useLanguages();\n\tconst language = businessHooks.useLanguage();\n\tconst onLanguageSelect = businessHooks.useOnLanguageSelect();\n\n\tconst isBilingual = languages.length > 1;\n\tconst otherLanguages = languages.filter(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.tabres.com/languages/${code}.svg`;\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => onLanguageSelect?.(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { Column, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport Languages from \"../Languages\";\n\nconst BusinessHeader = () => {\n\tconst { coverPhoto, avatar256, name } = businessHooks.useBusiness();\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tfullWidth\n\t\t\t\t\tfullHeight\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustifyContent=\"center\"\n\t\t\t\t\tgap={0.5}\n\t\t\t\t\tclassName={styles.container}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\talt={name}\n\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\theight={96}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t\t<Text variant=\"h1\" color=\"white\" className={styles.name} align=\"center\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</div>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t</div>\n\t);\n};\nexport default BusinessHeader;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\n\tconst handleGoBack = () => {\n\t\tif (isInDashboard) return onBranchSelect?.(\"\" as never);\n\t\tif (typeof window === \"undefined\") return;\n\n\t\twindow.location.href = businessUrl;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import az from \"./az\";\nimport en from \"./en\";\nimport es from \"./es\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\nimport pl from \"./pl\";\nimport pt from \"./pt\";\nimport hr from \"./hr\";\n\nexport default {\n\taz,\n\ten,\n\tes,\n\tru,\n\ttr,\n\tnl,\n\tet,\n\tpl,\n\tpt,\n\thr,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sifariş növü indi aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n\tINVALID_ADDRESS: \"Ünvan düzgün deyil\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Go to checkout\": \"Ödənişə keç\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n\t\"Delivery Fee\": \"Çatdırılma\",\n\t\"Play video\": \"Videonu izlə\",\n\t\" / kg\": \" / kq\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Endirim\",\n\t\"Discount ({{rate}}%)\": \"Endirim ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servis haqqı ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n\t\"House No.\": \"Ev nömrəsi\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n\tFeedback: \"Rəy bildir\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"This order type is not available right now.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n\tINVALID_ADDRESS: \"Invalid address\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import auth from \"./auth\";\nimport branch from \"./branch\";\nimport common from \"./common\";\nimport customer from \"./customer\";\nimport error from \"./error\";\nimport events from \"./events\";\nimport order from \"./order\";\n\nexport default {\n\tauth,\n\tbranch,\n\tcommon,\n\tcustomer,\n\terror,\n\tevents,\n\torder,\n};\n","export default {\n\t\"Create an account or log in\": \"Crear una cuenta o iniciar sesión\",\n\t\"Phone number\": \"Número de teléfono\",\n\t\"I don't have an email\": \"No tengo correo electrónico\",\n\t\"We sent a confirmation code to {{address}}\": \"Hemos enviado un código de confirmación a {{address}}\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Lunes\",\n\t\"WEEKDAY-1\": \"Martes\",\n\t\"WEEKDAY-2\": \"Miércoles\",\n\t\"WEEKDAY-3\": \"Jueves\",\n\t\"WEEKDAY-4\": \"Viernes\",\n\t\"WEEKDAY-5\": \"Sábado\",\n\t\"WEEKDAY-6\": \"Domingo\",\n\t\"Closed\": \"Cerrado\",\n\t\"Opening Hours\": \"Horarios de apertura\",\n\t\"Delivery Hours\": \"Horarios de entrega\",\n\t\"Feedback\": \"Comentarios\",\n};\n","export default {\n\t\"Save\": \"Guardar\",\n\t\"Cancel\": \"Cancelar\",\n\t\"Continue\": \"Continuar\",\n};\n","export default {\n\t\"Unknown address\": \"Dirección desconocida\",\n\t\"No address available\": \"Sin dirección disponible\",\n\t\"Update Delivery Address\": \"Actualizar dirección de entrega\",\n\t\"Country\": \"País\",\n\t\"City\": \"Ciudad\",\n\t\"Baker Street\": \"Calle Baker\",\n\t\"Address\": \"Dirección\",\n\t\"House number\": \"Número de casa\",\n\t\"Additional number\": \"Número adicional\",\n\t\"Example: Door code is 555\": \"Ejemplo: El código de la puerta es 555\",\n\t\"Delivery Instructions\": \"Instrucciones de entrega\",\n\t\"Floor\": \"Planta\",\n\t\"Enter address\": \"Introducir dirección\",\n\t\"House No.\": \"Nº de casa\",\n};\n","export default {\n\t\"SOMETHING_WRONG\": \"¡Algo salió mal! Por favor, inténtalo de nuevo más tarde.\",\n\t\"FIELD_REQUIRED\": \"Este campo es obligatorio\",\n\t\"Unsupported country code\": \"Código de país no soportado\",\n\t\"Invalid OTP\": \"Código de confirmación inválido\",\n\t\"INVALID_OTP\": \"Código de confirmación inválido\",\n\t\"OTP_RATE_LIMIT_EXCEEDED\": \"Has superado el límite de códigos. Por favor, inténtalo de nuevo más tarde.\",\n\t\"Invalid Email Address\": \"Dirección de correo electrónico no válida\",\n\t\"FEATURE_NOT_AVAILABLE_FOR_SEGMENT\": \"Esta función no está disponible en tu plan actual.\",\n\t\"ORDER_TYPE_DISABLED_FOR_BUSINESS\": \"Este tipo de pedido no está disponible para este negocio.\",\n\t\"ORDER_TYPE_DISABLED_AT_THIS_TIME\": \"Este tipo de pedido no está disponible en este momento.\",\n\t\"COUNTRY_REQUIRED\": \"El país es obligatorio.\",\n\t\"CITY_REQUIRED\": \"La ciudad es obligatoria.\",\n\t\"STREET_REQUIRED\": \"La calle es obligatoria.\",\n\t\"STREET_NUMBER_REQUIRED\": \"El número de calle es obligatorio.\",\n\t\"OUT_OF_DELIVERY_RANGE\": \"Este establecimiento no realiza entregas en tu dirección.\",\n\t\"NO_ORDER_TYPE\": \"Por favor, selecciona un tipo de pedido.\",\n\t\"INVALID_ADDRESS\": \"Dirección no válida\",\n};\n","export default {\n\t\"Events\": \"Eventos\",\n\t\"Scrolled to Category\": \"Desplazado a la categoría\",\n\t\"Category Selected\": \"Categoría seleccionada\",\n\t\"Product Details\": \"Detalles del producto\",\n\t\"Product Added to Order\": \"Producto añadido al pedido\",\n};\n","export default {\n\t\"View order\": \"Ver pedido\",\n\t\"Remove from order\": \"Eliminar del pedido\",\n\t\"Update order\": \"Actualizar pedido\",\n\t\"Add to order\": \"Añadir al pedido\",\n\t\"Add\": \"Añadir\",\n\t\"Your order\": \"Tu pedido\",\n\t\"Subtotal\": \"Subtotal\",\n\t\"Empty order\": \"Pedido vacío\",\n\t\"You don't have any items in your order\": \"No tienes ningún artículo en tu pedido\",\n\t\"Add items\": \"Añadir artículos\",\n\t\"Add an order note\": \"Añadir nota al pedido\",\n\t\"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\",\n\t\"Your Order is Completed!\": \"¡Tu pedido se ha completado!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\": \"¡Gracias! Hemos recibido tu pedido y será entregado en breve.\",\n\t\"Delivery\": \"Entrega\",\n\t\"Dine in\": \"Para tomar aquí\",\n\t\"Pickup\": \"Para recoger\",\n\t\"Cash\": \"Efectivo\",\n\t\"POS Terminal\": \"Terminal TPV\",\n\t\"Order summary\": \"Resumen del pedido\",\n\t\"Items\": \"Artículos\",\n\t\"Tax\": \"Impuestos\",\n\t\"Total\": \"Total\",\n\t\"Special instructions, allergies, etc.\": \"Instrucciones especiales, alergias, etc.\",\n\t\"Go to checkout\": \"Ir a pagar\",\n\t\"Place order\": \"Realizar pedido\",\n\t\"Continue\": \"Continuar\",\n\t\"Not available\": \"No disponible\",\n\t\"In order\": \"En el pedido\",\n\t\"Product choices\": \"Opciones de producto\",\n\t\"Track order\": \"Seguimiento del pedido\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"El importe mínimo de pedido para entrega es {{amount}}\",\n\t\"This field is required\": \"Este campo es obligatorio\",\n\t\"Please select a table\": \"Por favor, selecciona una mesa\",\n\t\"Please enter an address\": \"Por favor, introduce una dirección\",\n\t\"Please choose product\": \"Por favor, elige un producto\",\n\t\"Table\": \"Mesa\",\n\t\"Select Table\": \"Seleccionar mesa\",\n\t\"Card\": \"Tarjeta\",\n\t\"Closed Now\": \"Cerrado ahora\",\n\t\"Delivery Fee\": \"Gastos de envío\",\n\t\"Play video\": \"Reproducir vídeo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\t\"Discount\": \"Descuento\",\n\t\"Discount ({{rate}}%)\": \"Descuento ({{rate}}%)\",\n\t\"Events\": \"Eventos\",\n\t\"Service Fee ({{rate}}%)\": \"Cargo por servicio ({{rate}}%)\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Этот тип заказа сейчас недоступен.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n\tINVALID_ADDRESS: \"Неверный адрес\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Go to checkout\": \"Перейти к оплате\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n\t\"Delivery Fee\": \"Доставка\",\n\t\"Play video\": \"Смотреть видео\",\n\tDiscount: \"Скидка\",\n\t\"Discount ({{rate}}%)\": \"Скидка ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Сервисный сбор ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n\t\"House No.\": \"Дом №\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sipariş türü şu anda aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n\tINVALID_ADDRESS: \"Geçersiz adres\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Go to checkout\": \"Ödemeye geç\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n\t\"Delivery Fee\": \"Teslimat ücreti\",\n\t\"Play video\": \"Videoyu izle\",\n\tDiscount: \"İndirim\",\n\t\"Discount ({{rate}}%)\": \"İndirim ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servis Ücreti ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n\t\"House No.\": \"Ev No.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Dit besteltype is op dit moment niet beschikbaar.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n\tINVALID_ADDRESS: \"Ongeldig adres\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Go to checkout\": \"Ga naar afrekenen\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n\t\"Delivery Fee\": \"Bezorgkosten\",\n\t\"Play video\": \"Bekijk video\",\n\tDiscount: \"Korting\",\n\t\"Discount ({{rate}}%)\": \"Korting ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servicekosten ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n\t\"House No.\": \"Huis nr.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"See tellimuse tüüp ei ole praegu saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n\tINVALID_ADDRESS: \"Vigane aadress\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Go to checkout\": \"Mine kassasse\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n\t\"Delivery Fee\": \"Kohaletoimetamise tasu\",\n\t\"Play video\": \"Vaata videot\",\n\tDiscount: \"Allahindlus\",\n\t\"Discount ({{rate}}%)\": \"Allahindlus ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Teenustasu ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n\t\"House No.\": \"Maja nr.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Coś poszło nie tak! Spróbuj ponownie później.\",\n\tFIELD_REQUIRED: \"To pole jest wymagane\",\n\t\"Unsupported country code\": \"Nieobsługiwany numer kierunkowy\",\n\t\"Invalid OTP\": \"Nieprawidłowy kod weryfikacyjny\",\n\tINVALID_OTP: \"Nieprawidłowy kod weryfikacyjny\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Przekroczono limit kodów. Spróbuj ponownie za chwilę.\",\n\t\"Invalid Email Address\": \"Nieprawidłowy adres e-mail\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Ta funkcja nie jest dostępna w Twoim obecnym planie.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Ten typ zamówienia nie jest dostępny w tym lokalu.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Ten typ zamówienia jest teraz niedostępny.\",\n\tCOUNTRY_REQUIRED: \"Kraj jest wymagany.\",\n\tCITY_REQUIRED: \"Miasto jest wymagane.\",\n\tSTREET_REQUIRED: \"Ulica jest wymagana.\",\n\tSTREET_NUMBER_REQUIRED: \"Numer domu jest wymagany.\",\n\tOUT_OF_DELIVERY_RANGE: \"Ten lokal nie dostarcza pod Twój adres.\",\n\tNO_ORDER_TYPE: \"Wybierz typ zamówienia.\",\n\tINVALID_ADDRESS: \"Nieprawidłowy adres\",\n};\n","export default {\n\tSave: \"Zapisz\",\n\tCancel: \"Anuluj\",\n\tContinue: \"Dalej\",\n};\n","export default {\n\t\"View order\": \"Zobacz zamówienie\",\n\t\"Remove from order\": \"Usuń z zamówienia\",\n\t\"Update order\": \"Zmień zamówienie\",\n\t\"Add to order\": \"Dodaj do zamówienia\",\n\tAdd: \"Dodaj\",\n\t\"Your order\": \"Twoje zamówienie\",\n\tSubtotal: \"Suma\",\n\t\"Empty order\": \"Puste zamówienie\",\n\t\"You don't have any items in your order\": \"Nie masz jeszcze nic w zamówieniu\",\n\t\"Add items\": \"Dodaj produkty\",\n\t\"Add an order note\": \"Notatka dla restauracji\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Napisz o alergiach, specjalnych prośbach lub składnikach, które chcesz dodać albo usunąć.\",\n\t\"Your Order is Completed!\": \"Zamówienie przyjęte!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Dziękujemy! Otrzymaliśmy Twoje zamówienie i niedługo je dostarczymy.\",\n\tDelivery: \"Dostawa\",\n\t\"Dine in\": \"Na miejscu\",\n\tPickup: \"Na wynos\",\n\tCash: \"Gotówka\",\n\t\"POS Terminal\": \"Terminal płatniczy\",\n\t\"Order summary\": \"Podsumowanie zamówienia\",\n\tItems: \"Produkty\",\n\tTax: \"Podatek\",\n\tTotal: \"Razem\",\n\t\"Special instructions, allergies, etc.\": \"Uwagi, alergie itp.\",\n\t\"Go to checkout\": \"Przejdź do płatności\",\n\t\"Place order\": \"Złóż zamówienie\",\n\tContinue: \"Dalej\",\n\t\"Not available\": \"Niedostępne\",\n\t\"In order\": \"W zamówieniu\",\n\t\"Product choices\": \"Opcje\",\n\t\"Track order\": \"Śledź zamówienie\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimalna kwota zamówienia na dostawę to {{amount}}\",\n\t\"This field is required\": \"To pole jest wymagane\",\n\t\"Please select a table\": \"Wybierz stolik\",\n\t\"Please enter an address\": \"Podaj adres\",\n\t\"Please choose product\": \"Wybierz produkt\",\n\tTable: \"Stolik\",\n\t\"Select Table\": \"Wybierz stolik\",\n\tCard: \"Kartą\",\n\t\"Closed Now\": \"Teraz zamknięte\",\n\t\"Delivery Fee\": \"Koszt dostawy\",\n\t\"Play video\": \"Odtwórz wideo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Rabat\",\n\t\"Discount ({{rate}}%)\": \"Rabat ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Opłata serwisowa ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Adres nie został podany\",\n\t\"No address available\": \"Brak adresu\",\n\t\"Update Delivery Address\": \"Zmień adres dostawy\",\n\tCountry: \"Kraj\",\n\tCity: \"Miasto\",\n\t\"Baker Street\": \"ul. Marszałkowska\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Numer domu\",\n\t\"Additional number\": \"Numer mieszkania\",\n\t\"Example: Door code is 555\": \"Np. kod do drzwi: 555\",\n\t\"Delivery Instructions\": \"Wskazówki dla kuriera\",\n\tFloor: \"Piętro\",\n\t\"Enter address\": \"Wpisz adres\",\n\t\"House No.\": \"Nr domu\",\n};\n","export default {\n\t\"Create an account or log in\": \"Załóż konto lub zaloguj się\",\n\t\"Phone number\": \"Numer telefonu\",\n\t\"I don't have an email\": \"Nie mam adresu e-mail\",\n\t\"We sent a confirmation code to {{address}}\": \"Wysłaliśmy kod potwierdzający na {{address}}\",\n};\n","export default {\n\tEvents: \"Aktywność\",\n\t\"Scrolled to Category\": \"Przewinięto do kategorii\",\n\t\"Category Selected\": \"Wybrano kategorię\",\n\t\"Product Details\": \"Szczegóły produktu\",\n\t\"Product Added to Order\": \"Dodano do zamówienia\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Poniedziałek\",\n\t\"WEEKDAY-1\": \"Wtorek\",\n\t\"WEEKDAY-2\": \"Środa\",\n\t\"WEEKDAY-3\": \"Czwartek\",\n\t\"WEEKDAY-4\": \"Piątek\",\n\t\"WEEKDAY-5\": \"Sobota\",\n\t\"WEEKDAY-6\": \"Niedziela\",\n\tClosed: \"Zamknięte\",\n\t\"Opening Hours\": \"Godziny otwarcia\",\n\t\"Delivery Hours\": \"Godziny dostawy\",\n\tFeedback: \"Zostaw opinię\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Algo correu mal! Por favor, tente novamente mais tarde.\",\n\tFIELD_REQUIRED: \"Este campo é obrigatório\",\n\t\"Unsupported country code\": \"Código de país não suportado\",\n\t\"Invalid OTP\": \"Código de confirmação inválido\",\n\tINVALID_OTP: \"Código de confirmação inválido\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Excedeu o limite de códigos. Por favor, tente novamente mais tarde.\",\n\t\"Invalid Email Address\": \"Endereço de e-mail inválido\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Esta funcionalidade não está disponível no seu plano.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Este tipo de pedido não está disponível para este estabelecimento.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Este tipo de pedido não está disponível de momento.\",\n\tCOUNTRY_REQUIRED: \"O país é obrigatório.\",\n\tCITY_REQUIRED: \"A cidade é obrigatória.\",\n\tSTREET_REQUIRED: \"A rua é obrigatória.\",\n\tSTREET_NUMBER_REQUIRED: \"O número da porta é obrigatório.\",\n\tOUT_OF_DELIVERY_RANGE: \"Este estabelecimento não faz entregas para a sua morada.\",\n\tNO_ORDER_TYPE: \"Por favor, selecione um tipo de pedido.\",\n\tINVALID_ADDRESS: \"Morada inválida\",\n};\n","export default {\n\tSave: \"Guardar\",\n\tCancel: \"Cancelar\",\n\tContinue: \"Continuar\",\n};\n","export default {\n\t\"View order\": \"Ver pedido\",\n\t\"Remove from order\": \"Remover do pedido\",\n\t\"Update order\": \"Atualizar pedido\",\n\t\"Add to order\": \"Adicionar ao pedido\",\n\tAdd: \"Adicionar\",\n\t\"Your order\": \"O seu pedido\",\n\tSubtotal: \"Subtotal\",\n\t\"Empty order\": \"Pedido vazio\",\n\t\"You don't have any items in your order\": \"Ainda não tem itens no seu pedido\",\n\t\"Add items\": \"Adicionar itens\",\n\t\"Add an order note\": \"Adicionar nota ao pedido\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Indique alergias, pedidos especiais ou ingredientes que queira adicionar ou retirar.\",\n\t\"Your Order is Completed!\": \"O seu pedido está concluído!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Obrigado! Recebemos o seu pedido e será entregue em breve.\",\n\tDelivery: \"Entrega\",\n\t\"Dine in\": \"No local\",\n\tPickup: \"Takeaway\",\n\tCash: \"Dinheiro\",\n\t\"POS Terminal\": \"Multibanco\",\n\t\"Order summary\": \"Resumo do pedido\",\n\tItems: \"Itens\",\n\tTax: \"Impostos\",\n\tTotal: \"Total\",\n\t\"Special instructions, allergies, etc.\": \"Instruções especiais, alergias, etc.\",\n\t\"Go to checkout\": \"Finalizar pedido\",\n\t\"Place order\": \"Confirmar pedido\",\n\tContinue: \"Continuar\",\n\t\"Not available\": \"Indisponível\",\n\t\"In order\": \"No pedido\",\n\t\"Product choices\": \"Opções do produto\",\n\t\"Track order\": \"Acompanhar pedido\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"O valor mínimo para entrega é {{amount}}\",\n\t\"This field is required\": \"Este campo é obrigatório\",\n\t\"Please select a table\": \"Por favor, selecione uma mesa\",\n\t\"Please enter an address\": \"Por favor, introduza uma morada\",\n\t\"Please choose product\": \"Por favor, escolha o produto\",\n\tTable: \"Mesa\",\n\t\"Select Table\": \"Selecionar mesa\",\n\tCard: \"Cartão\",\n\t\"Closed Now\": \"Fechado agora\",\n\t\"Delivery Fee\": \"Taxa de entrega\",\n\t\"Play video\": \"Ver vídeo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Desconto\",\n\t\"Discount ({{rate}}%)\": \"Desconto ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Taxa de serviço ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Endereço não definido\",\n\t\"No address available\": \"Sem endereço disponível\",\n\t\"Update Delivery Address\": \"Atualizar endereço de entrega\",\n\tCountry: \"País\",\n\tCity: \"Cidade\",\n\t\"Baker Street\": \"Rua da Liberdade\",\n\tAddress: \"Morada\",\n\t\"House number\": \"Número da porta\",\n\t\"Additional number\": \"Andar / Apartamento\",\n\t\"Example: Door code is 555\": \"Exemplo: Código da porta é 555\",\n\t\"Delivery Instructions\": \"Instruções de entrega\",\n\tFloor: \"Piso\",\n\t\"Enter address\": \"Introduzir morada\",\n\t\"House No.\": \"Nº da porta\",\n};\n","export default {\n\t\"Create an account or log in\": \"Crie a sua conta ou entre\",\n\t\"Phone number\": \"Número de telemóvel\",\n\t\"I don't have an email\": \"Não tenho e-mail\",\n\t\"We sent a confirmation code to {{address}}\": \"Enviámos um código de confirmação para {{address}}\",\n};\n","export default {\n\tEvents: \"Eventos\",\n\t\"Scrolled to Category\": \"Navegou até à categoria\",\n\t\"Category Selected\": \"Categoria selecionada\",\n\t\"Product Details\": \"Detalhes do produto\",\n\t\"Product Added to Order\": \"Produto adicionado ao pedido\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Segunda-feira\",\n\t\"WEEKDAY-1\": \"Terça-feira\",\n\t\"WEEKDAY-2\": \"Quarta-feira\",\n\t\"WEEKDAY-3\": \"Quinta-feira\",\n\t\"WEEKDAY-4\": \"Sexta-feira\",\n\t\"WEEKDAY-5\": \"Sábado\",\n\t\"WEEKDAY-6\": \"Domingo\",\n\tClosed: \"Fechado\",\n\t\"Opening Hours\": \"Horário de funcionamento\",\n\t\"Delivery Hours\": \"Horário de entrega\",\n\tFeedback: \"Dar opinião\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Nešto je pošlo po zlu! Molimo pokušajte ponovno.\",\n\tFIELD_REQUIRED: \"Ovo polje je obavezno\",\n\t\"Unsupported country code\": \"Nepodržani pozivni broj zemlje\",\n\t\"Invalid OTP\": \"Nevažeći kod\",\n\tINVALID_OTP: \"Nevažeći kod\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Previše pokušaja. Molimo pričekajte malo i pokušajte ponovno.\",\n\t\"Invalid Email Address\": \"Nevažeća adresa epošte\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Ova značajka nije dostupna u vašem planu.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Ova vrsta narudžbe trenutno nije omogućena.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Ova vrsta narudžbe trenutno nije dostupna.\",\n\tCOUNTRY_REQUIRED: \"Država je obavezna.\",\n\tCITY_REQUIRED: \"Grad je obavezan.\",\n\tSTREET_REQUIRED: \"Ulica je obavezna.\",\n\tSTREET_NUMBER_REQUIRED: \"Kućni broj je obavezan.\",\n\tOUT_OF_DELIVERY_RANGE: \"Nažalost, nismo u mogućnosti dostaviti na vašu adresu.\",\n\tNO_ORDER_TYPE: \"Molimo odaberite vrstu narudžbe.\",\n\tINVALID_ADDRESS: \"Nevažeća adresa\",\n};\n","export default {\n\tSave: \"Spremi\",\n\tCancel: \"Odustani\",\n\tContinue: \"Nastavi\",\n};\n","export default {\n\t\"View order\": \"Pregled narudžbe\",\n\t\"Remove from order\": \"Ukloni iz narudžbe\",\n\t\"Update order\": \"Ažuriraj narudžbu\",\n\t\"Add to order\": \"Dodaj u narudžbu\",\n\tAdd: \"Dodaj\",\n\t\"Your order\": \"Vaša narudžba\",\n\tSubtotal: \"Međuzbroj\",\n\t\"Empty order\": \"Prazna narudžba\",\n\t\"You don't have any items in your order\": \"Vaša narudžba je prazna\",\n\t\"Add items\": \"Dodajte stavke\",\n\t\"Add an order note\": \"Dodaj napomenu\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\": \"Navedite alergije, posebne želje ili sastojke koje želite dodati ili izbaciti\",\n\t\"Your Order is Completed!\": \"Vaša narudžba je dovršena!\",\n\t\"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.\",\n\tDelivery: \"Dostava\",\n\t\"Dine in\": \"Za stolom\",\n\tPickup: \"Preuzimanje\",\n\tCash: \"Gotovina\",\n\t\"POS Terminal\": \"Kartica (POS)\",\n\t\"Order summary\": \"Sažetak narudžbe\",\n\tItems: \"Stavke\",\n\tTax: \"Porez\",\n\tTotal: \"Ukupno\",\n\t\"Special instructions, allergies, etc.\": \"Posebne upute, alergije itd.\",\n\t\"Go to checkout\": \"Na plaćanje\",\n\t\"Place order\": \"Naruči\",\n\tContinue: \"Nastavi\",\n\t\"Not available\": \"Nije dostupno\",\n\t\"In order\": \"U narudžbi\",\n\t\"Product choices\": \"Opcije proizvoda\",\n\t\"Track order\": \"Prati narudžbu\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"Minimalni iznos za dostavu je {{amount}}\",\n\t\"This field is required\": \"Ovo polje je obavezno\",\n\t\"Please select a table\": \"Molimo odaberite stol\",\n\t\"Please enter an address\": \"Molimo unesite adresu\",\n\t\"Please choose product\": \"Molimo odaberite proizvod\",\n\tTable: \"Stol\",\n\t\"Select Table\": \"Odaberi stol\",\n\tCard: \"Kartica\",\n\t\"Closed Now\": \"Trenutno zatvoreno\",\n\t\"Delivery Fee\": \"Naknada za dostavu\",\n\t\"Play video\": \"Pogledaj video\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Popust\",\n\t\"Discount ({{rate}}%)\": \"Popust ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Naknada za uslugu ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Nepoznata adresa\",\n\t\"No address available\": \"Adresa nije dostupna\",\n\t\"Update Delivery Address\": \"Ažurirajte adresu dostave\",\n\tCountry: \"Država\",\n\tCity: \"Grad\",\n\t\"Baker Street\": \"Ulica\",\n\tAddress: \"Adresa\",\n\t\"House number\": \"Kućni broj\",\n\t\"Additional number\": \"Dodatni broj / Stan\",\n\t\"Example: Door code is 555\": \"Primjer: Kod za vrata je 555\",\n\t\"Delivery Instructions\": \"Upute za dostavu\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Unesite adresu\",\n\t\"House No.\": \"Kućni br.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Izradite račun ili se prijavite\",\n\t\"Phone number\": \"Broj telefona\",\n\t\"I don't have an email\": \"Nemam e-poštu\",\n\t\"We sent a confirmation code to {{address}}\": \"Poslali smo potvrdni kod na {{address}}\",\n};\n","export default {\n\tEvents: \"Događaji\",\n\t\"Scrolled to Category\": \"Pomaknuto do kategorije\",\n\t\"Category Selected\": \"Odabrana kategorija\",\n\t\"Product Details\": \"Detalji proizvoda\",\n\t\"Product Added to Order\": \"Proizvod dodan u narudžbu\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Ponedjeljak\",\n\t\"WEEKDAY-1\": \"Utorak\",\n\t\"WEEKDAY-2\": \"Srijeda\",\n\t\"WEEKDAY-3\": \"Četvrtak\",\n\t\"WEEKDAY-4\": \"Petak\",\n\t\"WEEKDAY-5\": \"Subota\",\n\t\"WEEKDAY-6\": \"Nedjelja\",\n\tClosed: \"Zatvoreno\",\n\t\"Opening Hours\": \"Radno vrijeme\",\n\t\"Delivery Hours\": \"Vrijeme dostave\",\n\tFeedback: \"Povratne informacije\",\n};\n","import { SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport * as businessConstants from \"src/modules/business/constants\";\n\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale)\n\t\t\t? locale\n\t\t\t: businessConstants.DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst language = businessHooks.useLanguage();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n\tMessageHeartSquare,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./HeaderLinks.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst HeaderLinks = () => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\tconst { phone, wifiPassword, whatsApp, telegram, openingHours, deliveryHours } =\n\t\tbranchHooks.useSelectedBranch();\n\tconst { instagram, tiktok, facebook, username } = businessHooks.useBusiness();\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\tconst isDGKMenu = username === \"dgkmenu\";\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.links}>\n\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!whatsApp && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsApp}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{isDGKMenu && (\n\t\t\t\t\t\t\t<Tooltip hint={t(\"Feedback\")}>\n\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\ticon={MessageHeartSquare}\n\t\t\t\t\t\t\t\t\thref=\"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Row>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default HeaderLinks;\n","import { Column, Flex, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BackIcon from \"src/components/BackIcon\";\nimport Languages from \"../Languages\";\nimport HeaderLinks from \"./HeaderLinks\";\n\nconst BranchHeader = () => {\n\tconst { coverPhoto, avatar256 } = businessHooks.useBusiness();\n\tconst venueName = branchHooks.useVenueName();\n\tconst address = branchHooks.useBranchAddress();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst { latitude, longitude } = branchHooks.useBranchCoordinates();\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={venueName}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tfullWidth\n\t\t\t\t\tgap={0}\n\t\t\t\t>\n\t\t\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t\t\t<Flex.Item>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\t\t\theight={96}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\t\t\t\tvariant=\"h1\"\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{venueName}\n\t\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t</Flex>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t<HeaderLinks />\n\t\t</div>\n\t);\n};\nexport default BranchHeader;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BusinessHeader from \"./BusinessHeader\";\nimport BranchHeader from \"./BranchHeader\";\n\nconst Header = () => {\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\n\tif (hasSingleBranch || !isEmpty(selectedBranch)) return <BranchHeader />;\n\n\treturn <BusinessHeader />;\n};\nexport default Header;\n","import { useMemo } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n\nexport const useCustomerEmail = (): string => {\n\tconst { customer } = useOrderContext();\n\n\treturn useMemo(() => customer?.email, [customer?.email]);\n};\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string,\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface LocalizedContent {\n\tname: string;\n\tdescription: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\t/** Net price (tax-exclusive) — server-of-record value. */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus any branch taxes flagged\n\t * `addToListingPrice`. Equals `price` when no branch context is supplied.\n\t */\n\tlistingPrice: number;\n\t/** Title keyed by language code, e.g. { en: \"Large\", az: \"Böyük\" }. */\n\ttitle: Record<string, string>;\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\t/** Net price (tax-exclusive). Nullable when the product has no own price (variant-only). */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus any branch taxes flagged\n\t * `addToListingPrice`. Equals `price` when no branch context is supplied,\n\t * and is null when `price` itself is null.\n\t */\n\tlistingPrice?: number | null;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: Record<string, LocalizedContent>;\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n\tvideoUrl?: string;\n\tsellUnitType?: SellUnitType;\n\ttaxClassId?: number | null;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n\nexport enum SellUnitType {\n\tPIECE = \"PIECE\",\n\tWEIGHT = \"WEIGHT\",\n\tVOLUME = \"VOLUME\",\n}\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { generateOrderItemsId, getOrderItemListingRawPrice } from \"./utils\";\n\nimport {\n\tOrder,\n\tOrderItem,\n\tOrderItems,\n\tOrderPayload,\n\tOrderStep,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nexport const useOrderTotalRawPriceWithTax = (): number => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst totalPriceWithTax = Object.values((orderItems || {}) as OrderItems).reduce(\n\t\t(sum, item) => sum + getOrderItemListingRawPrice(item),\n\t\t0,\n\t);\n\n\treturn totalPriceWithTax;\n};\n\nexport const useOrderTotalPriceWithTax = (): string => {\n\tconst totalPriceWithTax = useOrderTotalRawPriceWithTax();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\treturn priceFormatter(totalPriceWithTax, currency, language);\n};\n\nconst usePrepareOrderItems = (): OrderItem[] => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst values = Object.values(orderItems || {});\n\n\tconst items: OrderItem[] = values.map(\n\t\t({ productId, quantity, variant, addons, note, sellUnitType }) => {\n\t\t\treturn {\n\t\t\t\tproductId,\n\t\t\t\tquantity,\n\t\t\t\tvariant,\n\t\t\t\taddons,\n\t\t\t\tnote,\n\t\t\t\tsellUnitType,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn items;\n};\n\n// Pricing is intentionally absent from the payload — the server resolves\n// line/total/tax/fee math from product/variant/option records and branch\n// settings on every create. The FE never sends prices.\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst businessId = businessHooks.useBusinessId();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst language = businessHooks.useLanguage();\n\n\tconst { order } = useOrderContext();\n\tconst items = usePrepareOrderItems();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\n\tconst { workingDayId, tableId, employeeId, orderType, preferredPaymentMethod, note } = {\n\t\t...order,\n\t\t...existingOrderData,\n\t};\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\tlanguage,\n\t\titems,\n\t\tpreferredPaymentMethod,\n\t\tnote,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\t// If item quantity has decimal places, accept it as quantity 1\n\treturn Object.values((orderItems || {}) as OrderItems).reduce((sum, item) => {\n\t\tconst newValue =\n\t\t\titem.sellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\t\titem.sellUnitType === productModels.SellUnitType.VOLUME\n\t\t\t\t? 1\n\t\t\t\t: item.quantity;\n\t\treturn sum + newValue;\n\t}, 0);\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId,\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst totalPriceWithTax = useOrderTotalRawPriceWithTax();\n\n\tif (totalPriceWithTax < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage?: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\t// Ensure updates happen after render, not during render\n\tconst handleOTPChange = (otp: string) => {\n\t\t// OTP codes are uppercase alphanumeric (A-Z, 0-9); normalize case so\n\t\t// lowercase entry still matches the server-issued code.\n\t\tconst normalizedOTP = otp?.toUpperCase?.();\n\t\tqueueMicrotask(() => {\n\t\t\tonChange(normalizedOTP);\n\t\t});\n\t};\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", { address })}\n\t\t\t</Text>\n\n\t\t\t<OTPInput\n\t\t\t\tonChangeOTP={handleOTPChange}\n\t\t\t\terrorMessage={errorMessage ? tError(errorMessage) : undefined}\n\t\t\t\tinputMode=\"text\"\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nexport default OTPStep;\n","import { Column, FormErrors, Input, InputType, onChangeEventType } from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as viewHooks, utils as viewUtils } from \"src/modules/view\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n}\n\nconst EmailStep = ({ formErrors, onChange }: Props) => {\n\tconst [email, setEmail] = useState(\"\");\n\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst hostname = viewHooks.useHostname();\n\tconst language = businessHooks.useLanguage();\n\tconst { url: baseUrl } = viewUtils.getBaseUrl(hostname, language);\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange],\n\t);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels, hooks as branchHooks } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tconst isDeliveryEnabled = branchHooks.useIsDeliveryEnabled();\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t{isDeliveryEnabled && <HoursList title=\"Delivery Hours\" days={deliveryDays} />}\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import { ReactNode } from \"react\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\ninterface Props {\n\tchildren: ReactNode;\n\tid: number;\n}\n\nconst BranchCardParent = ({ children, id }: Props) => {\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\n\tif (onBranchSelect) {\n\t\treturn (\n\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<a href={`${businessUrl}/${id}`} className={styles.item}>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\nexport default BranchCardParent;\n","import { classNames } from \"@sorocraft/js-utils\";\nimport { Column, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BranchCardParent from \"./Parent\";\n\ninterface Props {\n\tbranch: branchModels.Branch;\n}\n\nconst BranchCard = ({ branch }: Props) => {\n\tconst { id, address, coverPhoto, name } = branch || {};\n\tconst business = businessHooks.useBusiness();\n\tconst venueName = `${business.name} ${name}`;\n\n\treturn (\n\t\t<BranchCardParent id={id}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{coverPhoto && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tfullHeight\n\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\tgap={0.5}\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tvariant=\"h2\"\n\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{venueName}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t</BranchCardParent>\n\t);\n};\nexport default BranchCard;\n","import { Container } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BranchCard from \"./BranchCard\";\n\nconst Branches = () => {\n\tconst branches = branchHooks.useList();\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.container}>\n\t\t\t\t{branches.map((branch) => (\n\t\t\t\t\t<BranchCard key={branch.id} branch={branch} />\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Product, ProductVariant } from \"../models\";\nimport { MenuAddonOption } from \"src/models\";\n\nexport const getUnitListingPrice = (item: {\n\tprice?: number | null;\n\tlistingPrice?: number | null;\n}) => item?.listingPrice ?? item?.price ?? 0;\n\nexport const getProductListingPrice = (product: Product, currency: string, language: string) => {\n\tconst listingPrice = getUnitListingPrice(product);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n\nexport const getVariantListingPrice = (\n\tvariant: ProductVariant,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst listingPrice = getUnitListingPrice(variant);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n\nexport const getOptionListingPrice = (\n\toption: MenuAddonOption,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst listingPrice = getUnitListingPrice(option);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\t/** Net price (tax-exclusive) — server-of-record value. */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus the parent product's\n\t * `addToListingPrice` taxes. Equals `price` when no branch context is\n\t * supplied (e.g. addon detached from a branch tax setup).\n\t */\n\tlistingPrice: number;\n\ttitle: Record<string, string>;\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n\ttitle: Record<string, string>;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { MenuAddonSelectType } from \"src/modules/addon/models\";\nimport * as orderModels from \"src/modules/order/models\";\n\nimport { Product } from \"../models\";\nimport { getUnitListingPrice } from \"./listing-price\";\n\nexport const getAllSelectedOptionsListingPrice = (\n\tproduct: Pick<Product, \"addons\">,\n\tselectedAddons: orderModels.SelectedAddons = {},\n): number => {\n\tlet total = 0;\n\n\tfor (const addon of product?.addons || []) {\n\t\tconst { id: addonId, selectType, options } = addon;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(selectedAddons, addonId)) continue;\n\n\t\tconst selection = selectedAddons[addonId];\n\t\tconst selectedOptionIds =\n\t\t\tselectType === MenuAddonSelectType.SINGLE\n\t\t\t\t? [selection as number]\n\t\t\t\t: ((selection || []) as number[]);\n\n\t\tfor (const optionId of selectedOptionIds) {\n\t\t\tconst option = (options || []).find(({ id }) => id === optionId);\n\t\t\tif (option) total += getUnitListingPrice(option);\n\t\t}\n\t}\n\n\treturn total;\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tquantity,\n\tlanguage,\n\tcurrency,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproduct: Product;\n\tquantity: number;\n\tlanguage: string;\n\tcurrency: string;\n\tvariantId?: number;\n\tselectedAddons?: Record<number, number | number[]>;\n}) => {\n\tif (!product || Object.keys(product).length === 0) {\n\t\treturn priceFormatter(0, currency, language);\n\t}\n\n\tconst variant = variantId\n\t\t? (product.variants || []).find(({ id }) => id === variantId)\n\t\t: undefined;\n\n\tconst baseUnitPrice = variantId ? getUnitListingPrice(variant) : getUnitListingPrice(product);\n\tconst optionsUnitPrice = getAllSelectedOptionsListingPrice(product, selectedAddons);\n\n\tconst totalPrice = (baseUnitPrice + optionsUnitPrice) * quantity;\n\n\treturn priceFormatter(totalPrice, currency, language);\n};\n","import { LocalizedContent, Product, ProductVariant, SellUnitType } from \"./models\";\n\nimport { MenuAddon } from \"src/modules/addon/models\";\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string,\n): LocalizedContent => {\n\treturn product?.translations?.[language] || ({} as LocalizedContent);\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number,\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getProductVariantTranslation = (variant: ProductVariant, language: string): string => {\n\treturn variant?.title?.[language] || \"\";\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n\nexport const getPriceSuffix = (sellUnitType: SellUnitType) => {\n\tswitch (sellUnitType) {\n\t\tcase SellUnitType.WEIGHT:\n\t\t\treturn \" / kg\";\n\t\tcase SellUnitType.VOLUME:\n\t\t\treturn \" / l\";\n\n\t\tdefault:\n\t\t\treturn \"\";\n\t}\n};\n\nexport const getProductSellUnitShortCuts = (sellUnitType: SellUnitType) => {\n\tswitch (sellUnitType) {\n\t\tcase SellUnitType.WEIGHT:\n\t\t\treturn {\n\t\t\t\t\"50gr\": 0.05,\n\t\t\t\t\"100gr\": 0.1,\n\t\t\t\t\"150gr\": 0.15,\n\t\t\t\t\"200gr\": 0.2,\n\t\t\t\t\"250gr\": 0.25,\n\t\t\t\t\"300gr\": 0.3,\n\t\t\t\t\"350gr\": 0.35,\n\t\t\t\t\"400gr\": 0.4,\n\t\t\t\t\"450gr\": 0.45,\n\t\t\t\t\"500gr\": 0.5,\n\t\t\t\t\"600gr\": 0.6,\n\t\t\t\t\"700gr\": 0.7,\n\t\t\t\t\"750gr\": 0.75,\n\t\t\t\t\"800gr\": 0.8,\n\t\t\t\t\"850gr\": 0.85,\n\t\t\t\t\"900gr\": 0.9,\n\t\t\t\t\"950gr\": 0.95,\n\t\t\t\t\"1kg\": 1,\n\t\t\t\t\"2kg\": 2,\n\t\t\t\t\"5kg\": 5,\n\t\t\t\t\"10kg\": 10,\n\t\t\t\t\"20kg\": 20,\n\t\t\t};\n\t\tcase SellUnitType.VOLUME:\n\t\t\treturn {\n\t\t\t\t\"50ml\": 0.05,\n\t\t\t\t\"100ml\": 0.1,\n\t\t\t\t\"150ml\": 0.15,\n\t\t\t\t\"200ml\": 0.2,\n\t\t\t\t\"250ml\": 0.25,\n\t\t\t\t\"300ml\": 0.3,\n\t\t\t\t\"350ml\": 0.35,\n\t\t\t\t\"400ml\": 0.4,\n\t\t\t\t\"450ml\": 0.45,\n\t\t\t\t\"500ml\": 0.5,\n\t\t\t\t\"600ml\": 0.6,\n\t\t\t\t\"700ml\": 0.7,\n\t\t\t\t\"750ml\": 0.75,\n\t\t\t\t\"800ml\": 0.8,\n\t\t\t\t\"850ml\": 0.85,\n\t\t\t\t\"900ml\": 0.9,\n\t\t\t\t\"950ml\": 0.95,\n\t\t\t\t\"1l\": 1,\n\t\t\t\t\"2l\": 2,\n\t\t\t\t\"5l\": 5,\n\t\t\t\t\"10l\": 10,\n\t\t\t\t\"20l\": 20,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {};\n\t}\n};\n\nexport * from \"./utils/listing-price\";\nexport * from \"./utils/order-price\";\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\nimport { useStoreContext } from \"src/store\";\n\nimport { Product } from \"./models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n\nexport const useList = (): Product[] => {\n\tconst { products } = useStoreContext();\n\n\treturn products || [];\n};\n\nexport const useProductById = (productId: number): Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as Product;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Category, CategoryTranslation } from \"./models\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Categories.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef} paddingInline={1}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available, sellUnitType, variants, addons } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\tconst formattedTotalPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst { t } = useTranslation(\"order\");\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\n\tconst canAddToOrder = addToOrderEnabled && available;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif (shouldOpenProductDetails && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <div className={styles.volume}>{volume}</div>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{canAddToOrder && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { SellUnitType } from \"src/modules/product/models\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tbackgroundColor,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available, sellUnitType, variants, addons } =\n\t\tproduct || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\tconst productPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\n\tconst canAddToOrder = addToOrderEnabled && available;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === SellUnitType.WEIGHT ||\n\t\tsellUnitType === SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif (shouldOpenProductDetails && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t\thasBackgroundColor: !image && Boolean(backgroundColor),\n\t\t\t\t\tisDashboard,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t\tstyle={{ backgroundColor }}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{productPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{canAddToOrder && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport {\n\tColumn,\n\tDivElementMap,\n\tIconButton,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List, PlaySquare } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { utils as categoryUtils } from \"src/modules/category\";\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as videoHooks } from \"src/modules/video\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [view, setView] = useState<productModels.ProductView>(productModels.ProductView.LIST);\n\t\tconst { setModal } = useModalContext();\n\t\tconst firstVideoUrl = videoHooks.useFirstVideoUrl();\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: productModels.ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: productModels.ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: productModels.ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: productModels.Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetModal({ id: viewConstants.MODALS.PRODUCT_DETAILS, params: { product } });\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t},\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t\t{!isEmpty(firstVideoUrl) && (\n\t\t\t\t\t\t<a href={firstVideoUrl}>\n\t\t\t\t\t\t\t<IconButton icon={PlaySquare} onClick={() => {}} type={UIElementType.DEFAULT} />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === productModels.ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t},\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { useEffect, useRef } from \"react\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { SVGIcon, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderFAB.module.scss\";\n\ninterface Props {\n\ttotalCount: number;\n\tisVisible: boolean;\n\tisInPublicMenu?: boolean;\n\tonClick?: () => void;\n}\n\nconst OrderFAB = ({ totalCount, isVisible, onClick, isInPublicMenu = false }: Props) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst mountedRef = useRef<boolean>(false);\n\t// if total count has decimal places, show it as it is\n\tconst formattedTotalCount = totalCount % 1 === 0 ? totalCount : totalCount.toFixed(2);\n\n\tuseEffect(() => {\n\t\tif (!mountedRef.current) return;\n\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\tuseEffect(() => {\n\t\tmountedRef.current = true;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisVisible,\n\t\t\t\tisInPublicMenu,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t<SVGIcon icon={ShoppingBag} color={UIElementType.DEFAULT} size=\"md\" />\n\t\t\t<div className={styles.count}>{formattedTotalCount}</div>\n\t\t</div>\n\t);\n};\nexport default OrderFAB;\n","import { hooks as orderHooks } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderFAB from \"./OrderFAB\";\n\ninterface Props {\n\talwaysVisible?: boolean;\n\tisInPublicMenu?: boolean;\n}\n\nconst POSOrderFAB = ({ alwaysVisible = false, isInPublicMenu = false }: Props) => {\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { setIsOrderOpen, isOrderOpen } = useOrderContext();\n\n\tif (totalCount <= 0 && !alwaysVisible) return null;\n\n\treturn (\n\t\t<OrderFAB\n\t\t\ttotalCount={totalCount}\n\t\t\tisVisible={!isOrderOpen}\n\t\t\tonClick={() => setIsOrderOpen(!isOrderOpen)}\n\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t/>\n\t);\n};\nexport default POSOrderFAB;\n","import { RefObject, useCallback, useEffect, useRef, useState } from \"react\";\nimport { DivElementMap } from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./MenuContent.module.scss\";\n\nimport { hooks as productHooks } from \"src/modules/product\";\nimport { hooks as categoryHooks, utils as categoryUtils } from \"src/modules/category\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as menuUtils } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport Categories from \"../Categories\";\nimport Products from \"../Products\";\nimport { OrderFABContainer } from \"../OrderFAB\";\n\ninterface Props {\n\tcontainerRef: RefObject<HTMLDivElement>;\n}\n\nconst MenuContent = ({ containerRef }: Props) => {\n\tconst products = productHooks.useList();\n\tconst categories = categoryHooks.useList();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\tconst categoryProductMap = menuUtils.prepareCategoryAndProductMap(categories, products);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst canUserScroll = useRef<boolean>(true);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = categoryUtils.getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language],\n\t);\n\n\tconst handleCategoryFromURL = useCallback(async () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Categories\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t/>\n\t\t\t<Products\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\tcontainerRef={containerRef}\n\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t/>\n\t\t\t<OrderFABContainer isInPublicMenu />\n\t\t</div>\n\t);\n};\nexport default MenuContent;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport { Category } from \"./models\";\nimport { getCategoryTranslation } from \"./utils\";\n\nexport const useList = (): Category[] => {\n\tconst { categories } = useStoreContext();\n\n\treturn categories || [];\n};\n\nexport const useCategoryNameById = (categoryId: number): string => {\n\tconst { categories } = useStoreContext() || {};\n\tconst language = businessHooks.useLanguage();\n\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","import { Column, SVGIcon, Text, UIElementType, useModalContext } from \"@sorocraft/ui\";\nimport { Eye, Plus, ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { useCallback, useEffect, useRef } from \"react\";\nimport { isNil, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Actions.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { models as videoModels } from \"src/modules/video\";\nimport { hooks as productHooks, models as productModels } from \"src/modules/product\";\nimport { hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n}\n\nconst Actions = ({ video }: Props) => {\n\tconst { setModal } = useModalContext();\n\tconst { addProduct, setIsOrderOpen } = useOrderContext();\n\tconst shoppingBagActionRef = useRef<HTMLDivElement>(null);\n\n\tconst { productId, productName } = video || {};\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst product = productHooks.useProductById(productId);\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\tconst { sellUnitType, variants, addons, available } = product;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\tconst canAddToOrder = addToOrderEnabled && available;\n\n\tconst openProductDetails = useCallback(() => {\n\t\tsetModal({ id: viewConstants.MODALS.PRODUCT_DETAILS, params: { product } });\n\t}, [product, setModal]);\n\n\tconst handleAddToOrder = useCallback(() => {\n\t\tif (shouldOpenProductDetails) return openProductDetails();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name: productName, quantity: 1 });\n\t}, [addProduct, openProductDetails, product, productName, shouldOpenProductDetails]);\n\n\tconst actions = [\n\t\t{\n\t\t\ticon: Eye,\n\t\t\tonClick: openProductDetails,\n\t\t},\n\t\t...(canAddToOrder\n\t\t\t? [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: Plus,\n\t\t\t\t\t\tonClick: handleAddToOrder,\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t: []),\n\t\t// {\n\t\t// \ticon: Share,\n\t\t// \tonClick: () => {},\n\t\t// },\n\t\t{\n\t\t\ticon: ShoppingBag,\n\t\t\tonClick: () => setIsOrderOpen(true),\n\t\t\tvalue: totalCount,\n\t\t\tref: shoppingBagActionRef,\n\t\t},\n\t];\n\n\t// Animation shopping bag\n\tuseEffect(() => {\n\t\tconst el = shoppingBagActionRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0.5}>\n\t\t\t{actions.map(({ icon, onClick, value, ref }, index) => (\n\t\t\t\t<Column key={index} alignItems=\"center\" gap={0.375}>\n\t\t\t\t\t<div className={styles.action} onClick={onClick} ref={ref}>\n\t\t\t\t\t\t<SVGIcon icon={icon} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{!isNil(value) && (\n\t\t\t\t\t\t<Text size=\"xs\" weight=\"bold\" color=\"white\" fullWidth align=\"center\">\n\t\t\t\t\t\t\t{value}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</Column>\n\t\t\t))}\n\t\t</Column>\n\t);\n};\nexport default Actions;\n","import { Avatar, Column, Row, Text } from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { classNames, isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./VideoData.module.scss\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { models as videoModels } from \"src/modules/video\";\nimport { hooks as menuHooks } from \"src/modules/menu\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n}\n\nconst VideoData = ({ video }: Props) => {\n\tconst [isDescriptionVisible, setIsDescriptionVisible] = useState<boolean>(false);\n\tconst menuUrl = menuHooks.useMenuUrl();\n\n\tif (isEmpty(video)) return null;\n\n\tconst { businessAvatar, businessName, productName, productDescription, productPrice } = video;\n\tconst hasAvatar = Boolean(businessAvatar);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tnoAvatar: !hasAvatar,\n\t\t\t})}\n\t\t\tgap={0.75}\n\t\t\tfullWidth={false}\n\t\t>\n\t\t\t<a className={styles.business} href={menuUrl}>\n\t\t\t\t{hasAvatar && <Avatar source={viewUtils.getImageSource(businessAvatar)} size=\"sm\" />}\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t<Text weight=\"medium\" color=\"white\" whiteSpace=\"nowrap\" className={styles.productName}>\n\t\t\t\t\t\t{productName}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width of this\n\t\t\t\t\t\tcomponent */}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text color=\"white\" whiteSpace=\"nowrap\" className={styles.businessName} weight=\"light\">\n\t\t\t\t\t\t{businessName}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width\n\t\t\t\t\t\tof this component */}\n\t\t\t\t\t</Text>\n\t\t\t\t</Column>\n\t\t\t</a>\n\t\t\t<Text color=\"white\" className={styles.price}>\n\t\t\t\t{productPrice}\n\t\t\t</Text>\n\t\t\t{Boolean(productDescription) && (\n\t\t\t\t<Row onClick={() => setIsDescriptionVisible((prev) => !prev)}>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\twhiteSpace={isDescriptionVisible ? \"wrap\" : \"nowrap\"}\n\t\t\t\t\t\tclassName={styles.description}\n\t\t\t\t\t>\n\t\t\t\t\t\t{productDescription}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width of this\n\t\t\t\t\t\tcomponent Lorem ipsum dolor sit amet is the only text we can try and test the width of\n\t\t\t\t\t\tthis component Lorem ipsum dolor sit amet is the only text we can try and test the width\n\t\t\t\t\t\tof this component Lorem ipsum dolor sit amet is the only text we can try and test the\n\t\t\t\t\t\twidth of this component Lorem ipsum dolor sit amet is the only text we can try and test\n\t\t\t\t\t\tthe width of this component Lorem ipsum dolor sit amet is the only text we can try and\n\t\t\t\t\t\ttest the width of this component Lorem ipsum dolor sit amet is the only text we can try\n\t\t\t\t\t\tand test the width of this component Lorem ipsum dolor sit amet is the only text we can\n\t\t\t\t\t\ttry and test the width of this component Lorem ipsum dolor sit amet is the only text we\n\t\t\t\t\t\tcan try and test the width of this component Lorem ipsum dolor sit amet is the only text\n\t\t\t\t\t\twe can try and test the width of this component */}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\nexport default VideoData;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useState, useEffect } from \"react\";\nimport { Column, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { Close, Play, VolumeMax, VolumeX } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Video.module.scss\";\n\nimport { models as videoModels } from \"src/modules/video\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { hooks as menuHooks } from \"src/modules/menu\";\nimport Actions from \"./Actions\";\nimport VideoData from \"./VideoData\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n\tisActive: boolean;\n\tshouldLoad: boolean;\n\tisMuted: boolean;\n\tregisterVideo: (id: number, el: HTMLElement) => void;\n\tsetIsMuted: (isMuted: boolean) => void;\n}\n\nconst Video = ({\n\tvideo,\n\tisActive = false,\n\tshouldLoad = false,\n\tisMuted = true,\n\tregisterVideo,\n\tsetIsMuted,\n}: Props) => {\n\tconst [isPaused, setIsPaused] = useState(true);\n\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst hasPlayedRef = useRef(false);\n\n\tconst menuUrl = menuHooks.useMenuUrl();\n\tconst videoSource = viewUtils.getVideoSource(video?.videoUrl);\n\n\t/* ---- User interactions ----*/\n\tconst togglePlay = useCallback(() => {\n\t\tconst el = videoRef.current;\n\t\tif (!el) return;\n\n\t\tif (el.paused) {\n\t\t\tel.play()?.catch(() => {});\n\t\t} else {\n\t\t\tel.pause();\n\t\t}\n\t\tsetIsPaused(el.paused);\n\t}, []);\n\n\tconst toggleMute = (e: MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (!videoRef.current || !hasPlayedRef.current) return;\n\n\t\tvideoRef.current.muted = !videoRef.current.muted;\n\t\tsetIsMuted(videoRef.current.muted);\n\t};\n\n\tconst onPlay = useCallback(() => {\n\t\thasPlayedRef.current = true;\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst el = videoRef.current;\n\t\tif (!el) return;\n\n\t\t// LOAD\n\t\tif (shouldLoad && !el.src) {\n\t\t\tel.muted = true;\n\t\t\tel.playsInline = true;\n\t\t\tel.src = videoSource;\n\t\t\tel.load();\n\t\t}\n\n\t\t// PLAY when active\n\t\tif (shouldLoad && isActive) {\n\t\t\tel.play()?.catch(() => {});\n\t\t}\n\n\t\t// PAUSE when inactive\n\t\tif (!isActive && !el.paused) {\n\t\t\tel.pause();\n\t\t}\n\n\t\t// UNLOAD\n\t\tif (!shouldLoad && el.src) {\n\t\t\tel.pause();\n\t\t\tel.removeAttribute(\"src\");\n\t\t\tel.load();\n\t\t}\n\n\t\tsetIsPaused(el.paused);\n\t}, [shouldLoad, isActive, videoSource]);\n\n\tuseEffect(() => {\n\t\tif (videoRef.current && !isPaused && videoRef.current.muted !== isMuted) {\n\t\t\tvideoRef.current.muted = isMuted;\n\t\t}\n\t}, [isMuted, isPaused]);\n\n\tif (isEmpty(video)) return null;\n\n\treturn (\n\t\t<div className={styles.container} ref={(el) => registerVideo(video.productId, el)}>\n\t\t\t<div className={styles.videoContainer}>\n\t\t\t\t<video\n\t\t\t\t\tref={videoRef}\n\t\t\t\t\tclassName={styles.video}\n\t\t\t\t\tmuted\n\t\t\t\t\tautoPlay\n\t\t\t\t\tplaysInline\n\t\t\t\t\tpreload=\"none\"\n\t\t\t\t\tloop\n\t\t\t\t\tcontrolsList=\"nodownload nofullscreen noplaybackrate\"\n\t\t\t\t\tcontrols={false}\n\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\tposter={viewUtils.getImageSource(video.thumbnail)}\n\t\t\t\t\tonClick={togglePlay}\n\t\t\t\t\tonPlay={onPlay}\n\t\t\t\t></video>\n\t\t\t\t<Row className={styles.top} justifyContent=\"space-between\">\n\t\t\t\t\t<div className={styles.actionIcon} onClick={toggleMute} data-testid=\"mute-button\">\n\t\t\t\t\t\t<SVGIcon icon={isMuted ? VolumeX : VolumeMax} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t\t<a className={styles.actionIcon} href={menuUrl}>\n\t\t\t\t\t\t<SVGIcon icon={Close} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</a>\n\t\t\t\t</Row>\n\t\t\t\t{isPaused && (\n\t\t\t\t\t<div className={styles.play}>\n\t\t\t\t\t\t<SVGIcon icon={Play} size=\"xxxl\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Row className={styles.bottom} alignItems=\"flex-end\" gap={1}>\n\t\t\t\t\t<VideoData video={video} />\n\t\t\t\t\t<Column\n\t\t\t\t\t\tclassName={styles.actions}\n\t\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\t\tfullWidth={false}\n\t\t\t\t\t\tfullHeight={false}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Actions video={video} />\n\t\t\t\t\t</Column>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default Video;\n","import { useRef, useState } from \"react\";\n\nimport styles from \"./VideoFeed.module.scss\";\n\nimport { hooks as videoHooks } from \"src/modules/video\";\n\nimport Video from \"../Video\";\n\nconst VideoFeed = () => {\n\tconst [isMuted, setIsMuted] = useState<boolean>(true);\n\tconst currentVideo = videoHooks.useCurrentVideo();\n\tconst otherVideos = videoHooks.useOtherVideosForScrolling();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst { activeId, register } = videoHooks.useActiveSnap(containerRef);\n\n\t// TODO: move this to utils\n\t// const PRELOAD_DISTANCE = 2;\n\n\t// const shouldLoad = (index: number) => {\n\t// \tif (activeIndex === null) return false;\n\t// \treturn Math.abs(index - activeIndex) <= PRELOAD_DISTANCE;\n\t// };\n\n\t// END\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.videos} tabIndex={0} ref={containerRef}>\n\t\t\t\t<Video\n\t\t\t\t\tvideo={currentVideo}\n\t\t\t\t\tregisterVideo={register}\n\t\t\t\t\tisActive={activeId === currentVideo.productId}\n\t\t\t\t\tshouldLoad\n\t\t\t\t\tsetIsMuted={setIsMuted}\n\t\t\t\t\tisMuted={isMuted}\n\t\t\t\t/>\n\t\t\t\t{otherVideos.map((video) => (\n\t\t\t\t\t<Video\n\t\t\t\t\t\tvideo={video}\n\t\t\t\t\t\tkey={video.productId}\n\t\t\t\t\t\tregisterVideo={register}\n\t\t\t\t\t\tisActive={activeId === video.productId}\n\t\t\t\t\t\tshouldLoad={activeId === video.productId}\n\t\t\t\t\t\tsetIsMuted={setIsMuted}\n\t\t\t\t\t\tisMuted={isMuted}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default VideoFeed;\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tfocusedSection?: string;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tfocusedSection,\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t\tfocused: focusedSection === \"quantity\",\n\t\t\t\t},\n\t\t\t\t[styles[size]],\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\n\t\t\t\tconst variantTitle = productUtils.getProductVariantTranslation(variant, language);\n\t\t\t\tconst variantPrice = productUtils.getVariantListingPrice(variant, currency, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={variantTitle}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{variantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { MenuAddon, MenuAddonOption } from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): string => {\n\treturn addon?.title?.[language] || \"\";\n};\n\nexport const getAddonOptionTranslation = (option: MenuAddonOption, language: string): string => {\n\treturn option?.title?.[language] || \"\";\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string,\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn (options || [])\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ title }) => title?.[language] || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = (options || []).find(({ id }) => id === optionIds);\n\t\treturn option?.title?.[language] || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.title?.[language] || \"\";\n};\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{addonTitle}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\t\t\t\t\t\t\t\tconst optionPrice = productUtils.getOptionListingPrice(option, currency, language);\n\n\t\t\t\t\t\t\t\tconst optionTitle = addonUtils.getAddonOptionTranslation(option, language);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{optionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import {\n\tButton,\n\tColumn,\n\tIconButton,\n\tModal,\n\tNumpad,\n\tRow,\n\tSVGIcon,\n\tText,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { Close, PlayCircle } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, MouseEvent, useMemo, RefObject } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tmodalRef: RefObject<HTMLDivElement>;\n\tvideoUrl?: string;\n\taddToOrderEnabled?: boolean;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tonQuantityChange?: (quantity: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tmodalRef,\n\tvideoUrl,\n\taddToOrderEnabled = true,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n\tonQuantityChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\t// PRICING\n\n\tconst productPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst priceSuffix = useMemo(() => productUtils.getPriceSuffix(product?.sellUnitType), [product]);\n\tconst productOrderPrice = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons],\n\t);\n\t// END PRICING\n\n\tconst sellingUnitShortcuts = useMemo(\n\t\t() => productUtils.getProductSellUnitShortCuts(product?.sellUnitType),\n\t\t[product],\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[modalRef, onClose],\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available, sellUnitType } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst isManualQuantityNeeded =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t<div className={styles.media}>\n\t\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{Boolean(videoUrl) && (\n\t\t\t\t\t\t\t\t\t<a href={videoUrl} className={styles.play}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={PlayCircle} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<Text color=\"white\">{t(\"Play video\")}</Text>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t\t\t{productPrice}\n\t\t\t\t\t\t\t\t\t\t{Boolean(priceSuffix) && t(priceSuffix)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column gap={0} fullWidth className={styles.stickyBottom}>\n\t\t\t\t\t\t\t\t{isManualQuantityNeeded && (\n\t\t\t\t\t\t\t\t\t<Numpad\n\t\t\t\t\t\t\t\t\t\tonChange={onQuantityChange}\n\t\t\t\t\t\t\t\t\t\tvalue={quantity}\n\t\t\t\t\t\t\t\t\t\tshortcuts={sellingUnitShortcuts}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\taddToOrderEnabled ? (\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{productOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t) : null\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst { orderStep } = useOrderContext();\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst totalPriceWithTax = orderHooks.useOrderTotalPriceWithTax();\n\tconst inDetails = orderStep === orderModels.OrderStep.DETAILS;\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t\tinDetails,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t{!inDetails && (\n\t\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t\t{totalPriceWithTax}\n\t\t\t\t</Flex.Item>\n\t\t\t)}\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Go to checkout\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import httpClient from \"src/services/api/client\";\n\nimport { CalculatePreviewRequest, CalculatePreviewResponse, OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload,\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn httpClient.post(\"/customer/order\", order);\n};\n\nexport const calculate = (\n\tpayload: CalculatePreviewRequest,\n\tsignal?: AbortSignal,\n): Promise<CalculatePreviewResponse> => {\n\treturn httpClient.post(\"/customer/order/calculate\", payload, { signal });\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = productHooks.useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id),\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language);\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language))\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { models as orderModels, utils as orderUtils } from \"src/modules/order\";\nimport { utils as productUtils, hooks as productHooks } from \"src/modules/product\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = productHooks.useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { image160 } = product;\n\tconst variantTitle = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\tconst itemPrice = useMemo(\n\t\t() => orderUtils.getOrderItemListingPrice(item, currency, language),\n\t\t[item, currency, language],\n\t);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{itemPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { createContext, ReactNode, useContext, useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport * as orderServices from \"./services\";\nimport { initialPreviewState } from \"./constants\";\nimport { isValidPreviewResponse } from \"./utils\";\nimport { CalculatePreviewRequest, OrderItems, OrderPreviewState } from \"./models\";\n\nconst OrderPreviewContext = createContext<OrderPreviewState>(initialPreviewState);\n\nconst buildPreviewItemsRequest = (\n\torderItems: OrderItems | undefined,\n): CalculatePreviewRequest[\"items\"] => {\n\t// OrderProvider keys orderItems by the same orderItemsId that identifies a\n\t// (product, variant, addon-selection) tuple — pass it through so the server\n\t// echoes it back and the UI can match each preview line to its cart line.\n\treturn Object.entries(orderItems || {}).map(([orderItemsId, item]) => ({\n\t\torderItemsId,\n\t\tproductId: item.productId,\n\t\tquantity: item.quantity,\n\t\t...(item.variant?.variantId ? { variant: { variantId: item.variant.variantId } } : {}),\n\t\t...(item.addons && item.addons.length > 0\n\t\t\t? {\n\t\t\t\t\taddons: item.addons.map((addon) => ({\n\t\t\t\t\t\taddonId: addon.addonId,\n\t\t\t\t\t\toptions: (addon.options || []).map((option) => ({ optionId: option.optionId })),\n\t\t\t\t\t})),\n\t\t\t\t}\n\t\t\t: {}),\n\t}));\n};\n\ntype ProviderProps = {\n\tchildren: ReactNode;\n};\n\n// Mount this once inside the drawer subtree. The effect fires `calculate`\n// exactly once per mount — i.e. once per drawer open — so cart edits while\n// the drawer is open do NOT re-trigger a fetch. Closing the drawer unmounts\n// the provider and aborts any in-flight request.\nexport const OrderPreviewProvider = ({ children }: ProviderProps) => {\n\tconst { order, orderItems } = useOrderContext();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst businessId = businessHooks.useBusinessId();\n\tconst branchId = selectedBranch?.id;\n\tconst orderType = order?.orderType;\n\n\tconst [state, setState] = useState<OrderPreviewState>(initialPreviewState);\n\n\tuseEffect(() => {\n\t\tconst items = buildPreviewItemsRequest(orderItems as OrderItems);\n\t\tif (!businessId || !branchId || !orderType || items.length === 0) {\n\t\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\t\tsetState((prev) => (prev === initialPreviewState ? prev : initialPreviewState));\n\t\t\treturn;\n\t\t}\n\n\t\tconst controller = new AbortController();\n\t\tsetState({ data: null, isLoading: true, error: null });\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst data = await orderServices.calculate(\n\t\t\t\t\t{ businessId, branchId, orderType, items },\n\t\t\t\t\tcontroller.signal,\n\t\t\t\t);\n\t\t\t\tif (controller.signal.aborted) return;\n\t\t\t\tif (!isValidPreviewResponse(data)) {\n\t\t\t\t\tsetState({\n\t\t\t\t\t\tdata: null,\n\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\terror: \"We couldn't refresh order totals. Please try again.\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetState({ data, isLoading: false, error: null });\n\t\t\t} catch (error) {\n\t\t\t\tif (controller.signal.aborted) return;\n\t\t\t\tif ((error as DOMException | undefined)?.name === \"AbortError\") return;\n\t\t\t\tsetState({\n\t\t\t\t\tdata: null,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t\terror: \"We couldn't refresh order totals. Please try again.\",\n\t\t\t\t});\n\t\t\t}\n\t\t})();\n\n\t\treturn () => {\n\t\t\tcontroller.abort();\n\t\t};\n\t\t// Intentionally only re-run on mount/unmount of this provider (drawer\n\t\t// open/close). Cart edits while the drawer is open keep the original\n\t\t// preview until the drawer is reopened.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [order?.orderType]);\n\n\treturn <OrderPreviewContext.Provider value={state}>{children}</OrderPreviewContext.Provider>;\n};\n\nexport const useOrderPreview = (): OrderPreviewState => useContext(OrderPreviewContext);\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst createOrderMethod = (\n\t\t{ type, icon, title, isDisabled }: OrderTypeForMethods,\n\t\tindex: number\n\t): Method => ({\n\t\tvalue: type,\n\t\tisDisabled,\n\t\tlabel: (\n\t\t\t<Tooltip\n\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_AT_THIS_TIME\") : null}\n\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t>\n\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t<Text color={type === orderType && !isDisabled ? \"white\" : \"normal\"} whiteSpace=\"nowrap\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t</Tooltip>\n\t\t),\n\t});\n\n\tconst orderMethods: Method[] = orderTypes.reduce<Method[]>((methods, order, index) => {\n\t\tif (!order.isVisible) return methods;\n\t\tmethods.push(createOrderMethod(order, index));\n\t\treturn methods;\n\t}, []);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\tdeliveryFee: number;\n\tserviceFee: number;\n\tserviceFeePercentage: number;\n\tserviceFeeEnabled: boolean;\n\ttotalTax: number;\n\tdiscountAmount?: number;\n\tdiscountType?: string;\n\tdiscountRate?: number;\n\tcurrency: string;\n\tlanguage: string;\n\torderType: orderModels.OrderType;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax = 0,\n\ttotalPriceWithTaxAndFees = 0,\n\tdeliveryFee = 0,\n\tserviceFee = 0,\n\tserviceFeePercentage = 0,\n\tserviceFeeEnabled = false,\n\ttotalTax,\n\tdiscountAmount = 0,\n\tdiscountType,\n\tdiscountRate,\n\tcurrency,\n\tlanguage,\n\torderType,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\tconst deliveryFeeFormatted = priceFormatter(deliveryFee, currency, language);\n\tconst discountAmountFormatted = priceFormatter(discountAmount, currency, language);\n\tconst serviceFeeFormatted = priceFormatter(serviceFee, currency, language);\n\tconst totalPriceWithTaxAndFeesFormatted = priceFormatter(\n\t\ttotalPriceWithTaxAndFees,\n\t\tcurrency,\n\t\tlanguage,\n\t);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>{t(\"Delivery Fee\")}</Text>\n\t\t\t\t\t<Text size={textSize}>{deliveryFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t{serviceFeeEnabled && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>\n\t\t\t\t\t\t{t(\"Service Fee ({{rate}}%)\", { rate: String(serviceFeePercentage) })}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text size={textSize}>{serviceFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxAndFeesFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t\t{discountAmount > 0 && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize} color=\"muted\">\n\t\t\t\t\t\t{discountType === \"PERCENTAGE\"\n\t\t\t\t\t\t\t? t(\"Discount ({{rate}}%)\", { rate: String(discountRate) })\n\t\t\t\t\t\t\t: t(\"Discount\")}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text size={textSize} weight=\"medium\" color=\"success\">\n\t\t\t\t\t\t-{discountAmountFormatted}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { Accordion, Column, Input, InputType, Method, Padding, Row } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { OrderPreviewProvider, useOrderPreview } from \"src/modules/order/preview\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\n\nconst OrderDrawerDetails = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst {\n\t\torder: { orderType, preferredPaymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { data: previewData } = useOrderPreview();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst {\n\t\tdeliveryOrderEnabled,\n\t\tdineInOrderEnabled,\n\t\tpickupOrderEnabled,\n\t\tdeliveryFeeAmount,\n\t\tserviceChargePercentage,\n\t\tserviceChargeEnabled,\n\t} = branchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !isDelivering,\n\t\t\tisVisible: deliveryOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: dineInOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: pickupOrderEnabled,\n\t\t},\n\t];\n\n\tconst paymentMethods: Method[] = [\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CASH,\n\t\t\tlabel: t(\"Cash\"),\n\t\t},\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CARD,\n\t\t\tlabel: t(\"Card\"),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<Row className={styles.paymentMethods}>\n\t\t\t\t{paymentMethods.map(({ label, value }) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tlabel={label as string}\n\t\t\t\t\t\tname=\"preferredPaymentMethod\"\n\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\tupdateOrder({ preferredPaymentMethod: value as orderModels.PaymentMethod })\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={preferredPaymentMethod === value}\n\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Row>\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleVariant=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={previewData?.totalPriceWithoutTax ?? 0}\n\t\t\t\ttotalPriceWithTax={previewData?.totalPriceWithTax ?? 0}\n\t\t\t\ttotalPriceWithTaxAndFees={previewData?.totalPriceWithTaxAndFees ?? 0}\n\t\t\t\ttotalTax={previewData?.totalTax ?? 0}\n\t\t\t\tdeliveryFee={previewData?.deliveryFee ?? deliveryFeeAmount}\n\t\t\t\tserviceFee={previewData?.serviceFee ?? 0}\n\t\t\t\tserviceFeePercentage={serviceChargePercentage ?? 0}\n\t\t\t\tserviceFeeEnabled={serviceChargeEnabled}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\torderType={orderType}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nconst OrderDrawerDetailsWithProvider = () => (\n\t<OrderPreviewProvider>\n\t\t<OrderDrawerDetails />\n\t</OrderPreviewProvider>\n);\n\nexport default OrderDrawerDetailsWithProvider;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { ModalProvider, ModalsMap, Text } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport { models as menuModels, hooks as menuHooks } from \"src/modules/menu\";\nimport { constants as viewConstants, hooks as viewHooks } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as videoHooks } from \"src/modules/video\";\nimport { StoreProvider } from \"src/store\";\n\nimport Header from \"./Header\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport Branches from \"./Branches\";\nimport MenuContent from \"./MenuContent\";\nimport VideoFeed from \"./Videos/VideoFeed\";\nimport ProductDetails from \"./ProductDetails\";\nimport OrderDrawer from \"./OrderDrawer\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n\t[viewConstants.MODALS.PRODUCT_DETAILS]: ProductDetails,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst branchId = branchHooks.useBranchId();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst showMenu = hasSingleBranch || branchId;\n\tconst video = videoHooks.useCurrentVideo();\n\tconst { url: baseUrl, domain } = businessHooks.useBaseUrl();\n\tconst { headerText, footerText } = menuHooks.useMenuTexts();\n\n\tuseEffect(() => {\n\t\tif (isInDashboard) return;\n\t\tgetCustomer();\n\t}, [getCustomer, isInDashboard]);\n\n\tif (!isEmpty(video)) return <VideoFeed />;\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header />\n\t\t\t{showMenu && headerText && (\n\t\t\t\t<Text fullWidth align=\"center\" className={styles.headerText}>\n\t\t\t\t\t{headerText}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t\t{showMenu ? <MenuContent containerRef={containerRef} /> : <Branches />}\n\n\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\n\t\t\t{showMenu && footerText && (\n\t\t\t\t<Text fullWidth align=\"center\" className={styles.footerText}>\n\t\t\t\t\t{footerText}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{!!domain && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data || ({} as menuModels.PublicMenuData)}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t\t<OrderDrawer />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer } = useOrderContext();\n\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState(\"\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t);\n\n\tconst steps = [customerModels.CustomerAuthStep.EMAIL, customerModels.CustomerAuthStep.OTP];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => setModal(null);\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentIndex = steps.indexOf(currentStep);\n\t\tconst nextStep = steps[currentIndex + 1];\n\t\tif (nextStep) return setCurrentStep(nextStep);\n\t\tcompleteAuth();\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: keyof customerModels.CustomerAuthForm) => (value: string) => {\n\t\t\tsetForm((prev) => ({ ...prev, [field]: value }));\n\t\t},\n\t\t[],\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\n\t\ttry {\n\t\t\t// Validate form\n\t\t\tconst errors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.email);\n\t\t\t\t\tif (!response?.accessToken) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.email);\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error: any) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP:\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.email}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <EmailStep onChange={handleChange(\"email\")} formErrors={formErrors} />;\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\n\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [isHouseNumberEmpty, setIsHouseNumberEmpty] = useState<boolean>(false);\n\n\tconst adressError = formErrors.countryCode || formErrors.cityName || formErrors.street;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined,\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => {\n\t\t\tconst updated = {\n\t\t\t\t...currentForm,\n\t\t\t\t[name]: value,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updated);\n\t\t\tsetFormErrors(errors);\n\n\t\t\treturn updated;\n\t\t});\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber || \"\",\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t\tsetIsHouseNumberEmpty(!suggestion.houseNumber);\n\t\t},\n\t\t[form],\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t{isHouseNumberEmpty && (\n\t\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tname=\"houseNumber\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"House No.\")}\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"221B\"\n\t\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\t\tvalue={form.houseNumber}\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.houseNumber)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\nimport { ModalComponentProps } from \"@sorocraft/ui\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as videoHooks } from \"src/modules/video\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\n// Product modal\nconst ProductDetails = ({ params }: ModalComponentProps) => {\n\tconst { product = {}, modalRef, closeModal } = params;\n\tconst DEFAULT_QUANTITY =\n\t\tproduct?.sellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tproduct?.sellUnitType === productModels.SellUnitType.VOLUME\n\t\t\t? 0\n\t\t\t: 1;\n\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(DEFAULT_QUANTITY);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id,\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity],\n\t);\n\n\tconst videoUrl = videoHooks.useVideoUrl(product?.id);\n\tconst hasVideo = Boolean(product.videoUrl);\n\n\tuseEffect(() => {\n\t\tconst initQuantity = async () => {\n\t\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : DEFAULT_QUANTITY);\n\t\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t\t};\n\n\t\tinitQuantity();\n\t}, [productQuantityInOrder, product, DEFAULT_QUANTITY]);\n\n\tuseEffect(() => {\n\t\tconst resetProductDetails = async () => {\n\t\t\tsetSelectedVariant(null);\n\t\t\tsetSelectedAddons({});\n\t\t};\n\n\t\tresetProductDetails();\n\t}, [product]);\n\n\tconst handleSetFocusedSection = useCallback((section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t}, []);\n\n\tconst handleSubmit = useCallback(() => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\t\tif (quantity <= 0) return handleSetFocusedSection(\"quantity\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tcloseModal?.();\n\t}, [\n\t\taddProduct,\n\t\tcloseModal,\n\t\thandleSetFocusedSection,\n\t\tisUpdate,\n\t\tname,\n\t\tproduct,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tselectedVariant,\n\t\tupdateProduct,\n\t]);\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled],\n\t);\n\n\tconst handleOptionSelect = useCallback(\n\t\t({\n\t\t\taddonId,\n\t\t\toptionId,\n\t\t\tisSingle,\n\t\t\tisRemove = false,\n\t\t}: {\n\t\t\taddonId: number;\n\t\t\toptionId: number;\n\t\t\tisSingle: boolean;\n\t\t\tisRemove?: boolean;\n\t\t}) => {\n\t\t\tsetSelectedAddons((prevForm) => {\n\t\t\t\t// For single selection, directly replace the value\n\t\t\t\tif (isSingle) {\n\t\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t\t}\n\n\t\t\t\t// Handle multiple selection\n\t\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\t\tconst updatedSelection = isRemove\n\t\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\t\treturn {\n\t\t\t\t\t...prevForm,\n\t\t\t\t\t[addonId]: updatedSelection,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tmodalRef={modalRef}\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tvideoUrl={hasVideo ? videoUrl : undefined}\n\t\t\taddToOrderEnabled={addToOrderEnabled}\n\t\t\tonClose={closeModal}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tonQuantityChange={(newQuentity) => setQuantity(newQuentity)}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n"],"names":["MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","DOMAIN","DEFAULT_HOSTNAME","IMAGE_BASE_URL","storage","Storage","getBaseUrl","hostname","language","locale","url","domain","getImageSource","image","includes","startsWith","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","adjustLightness","hex","deltaPct","n","parseInt","replace","r","g","b","max","Math","min","l","h","s","d","newL","hueToRgb","p","q","t","r2","g2","b2","toHex","x","round","toString","padStart","useHostname","useStoreContext","useIsInDashboard","isInDashboard","StoreContext","createContext","StoreProvider","children","value","_jsx","Provider","style","_a","menuDesign","primaryColor","_b","viewUtils.adjustLightness","_c","_d","categoryBackgroundColor","_e","categoryTextColor","_f","productCardBackgroundColor","_g","productCardTextColor","_h","productCardDescriptionTextColor","_j","productCardVolumeTextColor","_k","productCardPriceTextColor","_l","productCardBlockPadding","_m","categoryTitleFontSize","_o","productNameFontSize","_p","productPriceFontSize","_q","distanceBetweenCategoryTitleAndProducts","_r","productDescriptionFontSize","_s","productVolumeFontSize","_t","productSeparatorColor","_u","menuPageBackgroundColor","_v","menuPageTextColor","useContext","useBusiness","business","useCurrency","currency","useBusinessId","id","useLanguage","useBaseUrl","viewHooks.useHostname","useMemo","viewUtils.getBaseUrl","useBusinessUrl","username","useBusinessUsername","getHoursForDay","schedule","weekDayIndex","days","find","day","hours","splitHours","split","map","Number","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useHasSingleBranch","branches","length","useSelectedBranch","branchId","hasSingleBranch","isEmpty","item","useBranchCoordinates","selectedBranch","latitude","longitude","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useBranchId","useOnBranchSelect","onBranchSelect","useMenuUrl","businessUrl","businessHooks.useBusinessUrl","branchHooks.useBranchId","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","SuppressedError","initialOrder","orderType","preferredPaymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","initialPreviewState","data","isLoading","error","OrderErrors","getOrderItemListingRawPrice","orderItem","price","variant","addons","quantity","baseUnitPrice","addonsUnitPrice","reduce","addonSum","addon","options","optionSum","option","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","Object","entries","addonId","optionIds","Array","isArray","sortNumbers","filter","Boolean","join","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_V2_URL","httpClient","HttpClient","baseURL","headers","credentials","onRequest","config","accessToken","getAuthToken","Authorization","onResponse","response","json","catch","logException","args_1","errorInfo","trackEvent","message","fetch","method","body","JSON","stringify","assign","console","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","tableHooks.usePreDefinedTableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","isOrderDefaultOpen","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","listingPrice","sellUnitType","unitPrice","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","parseFloat","toFixed","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","propertyIsEnumerable","__rest","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","acc","viewServices.storage","get","commonServices.logException","file","force","shouldClose","orderUtils.getOrderErrorMessages","contextValue","useOrderContext","BranchSetting","BranchTaxType","BranchTaxScope","BranchTaxFulfillment","BusinessSetting","useVideoId","videoId","useVideos","videos","useCurrentVideo","allVideos","video","useVideoUrl","useFirstVideoUrl","firstVideo","useFirstVideo","firstVideoUrl","Languages","isOptionsOpen","setIsOptionsOpen","languages","businessHooks.useLanguage","onLanguageSelect","businessHooks.useOnLanguageSelect","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","alt","currentLanguage","BusinessHeader","avatar256","businessHooks.useBusiness","viewUtils.getCoverPhotoSource","width","height","Column","fullWidth","fullHeight","justifyContent","viewUtils.getLogoImageSource","Text","color","align","BackIcon","size","theme","viewHooks.useIsInDashboard","branchHooks.useOnBranchSelect","window","location","href","SVGIcon","icon","ChevronLeft","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","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","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Discount","Country","City","Address","Floor","Events","Closed","Feedback","en","es","ru","tr","nl","et","pl","pt","hr","common","auth","events","branch","useTranslation","ns","params","supportedLocale","translations","key","translation","keys","k","getTranslations","HeaderLinks","setModal","useModalContext","phone","wifiPassword","whatsApp","telegram","branchHooks.useSelectedBranch","instagram","tiktok","facebook","isBusinessHoursAvailable","isDGKMenu","IconLink","Phone","shape","Whatsapp","target","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","MessageHeartSquare","Wifi","viewConstants.MODALS","Clock","BranchHeader","venueName","businessName","branchHooks.useVenueName","address","branchHooks.useHasSingleBranch","branchHooks.useBranchCoordinates","googleMapLink","Flex","direction","Item","shrink","weight","noMargin","rel","MarkerPin","UIElementType","DEFAULT","Header","useCustomerAddress","addresses","CustomerAuthStep","CustomerAddressType","validateAddressForm","form","countryCode","cityName","street","houseNumber","formatAddressLine","additionalNumber","ProductView","SellUnitType","useOrderTotalRawPriceWithTax","values","sum","usePrepareOrder","existingOrderData","businessId","businessHooks.useBusinessId","usePrepareOrderItems","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","useTotalOrderItemsCount","productModels.SellUnitType","WEIGHT","VOLUME","useDeliveryDistanceError","branchCoordinates","maxDeliveryDistance","setError","useEffect","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","businessHooks.useCurrency","minDeliveryAmount","amount","priceFormatter","OTPStep","errorMessage","onChange","tError","OTPInput","onChangeOTP","otp","normalizedOTP","toUpperCase","queueMicrotask","inputMode","EmailStep","formErrors","email","setEmail","baseUrl","handleChange","newValue","Input","type","InputType","EMAIL","placeholder","terms","HoursList","title","isClosed","timeText","whiteSpace","DANGER","BranchBusinessHours","openingDays","deliveryDays","isDeliveryEnabled","branchHooks.useIsDeliveryEnabled","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","IconButton","ChevronUp","scrollTo","left","top","behavior","BranchCardParent","BranchCard","content","noImage","imageContainer","info","Branches","branchHooks.useList","Container","getUnitListingPrice","getProductListingPrice","MenuAddonSelectType","getProductOrderPrice","optionsUnitPrice","total","selectType","selection","SINGLE","getAllSelectedOptionsListingPrice","getProductTranslation","getProductVariantTranslation","useProductById","products","getCategoryTranslation","category","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","Carousel","onGetRef","ref","paddingInline","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","BORDERED_PRIMARY","active","el","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","formattedTotalPrice","productUtils.getProductListingPrice","addToOrderEnabled","canAddToOrder","hasVariant","hasAddons","shouldOpenProductDetails","hasImage","isClickable","notAvailableText","viewUtils.getImageSource","notAvailable","loading","addToOrder","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","backgroundColor","onAddProduct","image580","image1024","productPrice","hasBackgroundColor","ProductsGridItemContainer","Products","memo","productBlocksRef","containerRef","onCategoryInView","view","setView","productModels.ProductView","LIST","videoHooks.useFirstVideoUrl","views","List","Grid","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","PRIMARY","PlaySquare","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","OrderFAB","totalCount","isVisible","isInPublicMenu","mountedRef","formattedTotalCount","classList","remove","animate","add","ShoppingBag","count","POSOrderFAB","alwaysVisible","orderHooks.useTotalOrderItemsCount","MenuContent","productHooks.useList","categories","categoryHooks.useList","productMap","push","menuUtils.prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","setTimeout","scrollIntoView","block","scrollToProductBlock","handleCategoryInView","categoryUtils.getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","categoryToSelect","OrderFABContainer","Actions","shoppingBagActionRef","productName","productHooks.useProductById","openProductDetails","handleAddToOrder","actions","Eye","index","isNil","VideoData","isDescriptionVisible","setIsDescriptionVisible","menuUrl","menuHooks.useMenuUrl","businessAvatar","productDescription","hasAvatar","noAvatar","Avatar","source","prev","Video","isActive","shouldLoad","isMuted","registerVideo","setIsMuted","isPaused","setIsPaused","videoRef","hasPlayedRef","videoSource","viewUtils.getVideoSource","videoUrl","togglePlay","paused","play","pause","onPlay","muted","playsInline","load","removeAttribute","autoPlay","preload","loop","controlsList","controls","disablePictureInPicture","poster","thumbnail","VolumeX","VolumeMax","Close","Play","VideoFeed","currentVideo","videoHooks.useCurrentVideo","otherVideos","currentVideoId","videoHooks.useOtherVideosForScrolling","activeId","register","setActiveId","elements","Map","root","rafId","sort","a","intersectionRatio","cancelAnimationFrame","requestAnimationFrame","nextId","set","videoHooks.useActiveSnap","tabIndex","Quantity","isDecreaseDisabled","focusedSection","onIncrease","onDecrease","focused","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","onModalClose","flex","Trash","tooltip","SUCCESS","ProductVariants","onSelectVariant","isVariantsFocused","variantsTitle","variantTitle","productUtils.getProductVariantTranslation","variantPrice","productUtils.getVariantListingPrice","label","checked","RADIO","getAddonTranslation","getAddonOptionTranslation","ProductAddons","onOptionSelect","addonTitle","addonUtils.getAddonTranslation","optionPrice","productUtils.getOptionListingPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","modalRef","onClose","setSelectedVariant","adjustQuantity","onSubmit","onQuantityChange","priceSuffix","productUtils.getPriceSuffix","productOrderPrice","productUtils.getProductOrderPrice","sellingUnitShortcuts","productUtils.getProductSellUnitShortCuts","handleClickOutside","event","contains","hasVariants","isManualQuantityNeeded","Modal","noBodyPadding","media","PlayCircle","details","choices","stickyBottom","Numpad","shortcuts","close","footer","Button","addAction","disabled","paddingBlock","OrderStepper","actionText","totalPriceWithTax","orderHooks.useOrderTotalPriceWithTax","inDetails","Loading","totalPrice","OrderDrawerFooter","isOrderItemsEmpty","orderError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","post","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","getActionText","ProductQuantity","productHooks.useProductQuantity","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","itemPrice","orderUtils.getOrderItemListingPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","OrderPreviewContext","OrderPreviewProvider","state","setState","buildPreviewItemsRequest","controller","AbortController","payload","signal","aborted","totalPriceWithoutTax","totalPriceWithTaxAndFees","totalTax","deliveryFee","serviceFee","taxes","isValidPreviewResponse","abort","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","TableShape","TableStatus","TableLocation","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","SELECT","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","orderMethods","methods","position","flexWrap","createOrderMethod","MethodSelection","selectedMethod","OrderPaymentSummary","textSize","serviceFeePercentage","serviceFeeEnabled","discountAmount","discountType","discountRate","totalPriceWithoutTaxFormatted","totalTaxFormatted","deliveryFeeFormatted","discountAmountFormatted","serviceFeeFormatted","totalPriceWithTaxAndFeesFormatted","rate","String","OrderDrawerDetails","previewData","deliveryFeeAmount","serviceChargePercentage","serviceChargeEnabled","paymentMethods","CARD","Padding","Accordion","noPadding","headerPaddingInline","headerPaddingBlock","titleVariant","OrderDrawerDetailsWithProvider","OrderDrawerCompleted","Check","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","setForm","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","steps","OTP","goToNextStep","currentIndex","inline","checkIsValidEmail","customerUtils.validateForm","saveAuthToken","customerServices.loginCustomer","status","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","viewConstants.SUPPORTED_COUNTRIES","floor","instructions","postCode","initalForm","addressId","isHouseNumberEmpty","setIsHouseNumberEmpty","adressError","defaultAdressText","currentForm","updated","customerUtils.validateAddressForm","closeModal","handleSelectGoogleSuggestion","suggestion","updatedForm","lat","long","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","patch","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","MODALS_PRODUCT_DETAILS","DEFAULT_QUANTITY","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","videoHooks.useVideoUrl","hasVideo","handleSetFocusedSection","section","handleSubmit","handleOptionSelect","prevForm","previousSelection","updatedSelection","Set","newQuentity","PublicMenu","showMenu","businessHooks.useBaseUrl","headerText","footerText","menuHooks.useMenuTexts","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart"],"mappings":"y/CAKO,MCLMA,GACM,mBADNA,GAEN,OAFMA,GAGQ,qBAHRA,GAIW,wBAJXA,GAKK,kBAGLC,GAAoB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MACrEC,GAAsB,CAClC,CACCC,KAAM,aACNC,KAAM,KACNC,UAAW,SAIAC,GAAS,aAETC,GAAmBD,GAEnBE,GAAiB,4BCn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,GAAa,CAACvrC,SAAUA,EAAUwrC,YAAaI,EAAMH,QAASA,IAAWzoC,SAElFwJ,EAAYtJ,EAACy5B,EAAO,CAAA,GAAMz5B,EAACopC,EAAQ,CAAC//B,KAAMA","x_google_ignoreList":[11]}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/modules/menu/utils.ts","../src/modules/view/constants.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/modules/view/hooks.ts","../src/store/index.tsx","../src/modules/business/hooks.ts","../src/modules/business/constants.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/menu/hooks.ts","../node_modules/tslib/tslib.es6.js","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils/item-price.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/client.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/store/hooks.ts","../src/modules/table/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/modules/business/models.ts","../src/modules/video/hooks.ts","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/PublicMenu/Header/BusinessHeader/BusinessHeader.tsx","../src/components/BackIcon/BackIcon.tsx","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/es/index.ts","../src/services/translation/locales/es/auth.ts","../src/services/translation/locales/es/branch.ts","../src/services/translation/locales/es/common.ts","../src/services/translation/locales/es/customer.ts","../src/services/translation/locales/es/error.ts","../src/services/translation/locales/es/events.ts","../src/services/translation/locales/es/order.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/locales/pl/index.ts","../src/services/translation/locales/pl/error.ts","../src/services/translation/locales/pl/common.ts","../src/services/translation/locales/pl/order.ts","../src/services/translation/locales/pl/customer.ts","../src/services/translation/locales/pl/auth.ts","../src/services/translation/locales/pl/events.ts","../src/services/translation/locales/pl/branch.ts","../src/services/translation/locales/pt/index.ts","../src/services/translation/locales/pt/error.ts","../src/services/translation/locales/pt/common.ts","../src/services/translation/locales/pt/order.ts","../src/services/translation/locales/pt/customer.ts","../src/services/translation/locales/pt/auth.ts","../src/services/translation/locales/pt/events.ts","../src/services/translation/locales/pt/branch.ts","../src/services/translation/locales/hr/index.ts","../src/services/translation/locales/hr/error.ts","../src/services/translation/locales/hr/common.ts","../src/services/translation/locales/hr/order.ts","../src/services/translation/locales/hr/customer.ts","../src/services/translation/locales/hr/auth.ts","../src/services/translation/locales/hr/events.ts","../src/services/translation/locales/hr/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.tsx","../src/components/PublicMenu/Header/BranchHeader/BranchHeader.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/modules/customer/hooks.ts","../src/modules/customer/models.ts","../src/modules/customer/utils.ts","../src/modules/product/models.ts","../src/modules/order/hooks.ts","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Branches/BranchCard/Parent.tsx","../src/components/PublicMenu/Branches/BranchCard/BranchCard.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/modules/product/utils/listing-price.ts","../src/modules/addon/models.ts","../src/modules/product/utils/order-price.ts","../src/modules/product/utils.ts","../src/modules/product/hooks.ts","../src/modules/category/utils.ts","../src/constants/analytics.ts","../src/components/PublicMenu/Categories/Categories.tsx","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/OrderFAB/OrderFAB.tsx","../src/components/PublicMenu/OrderFAB/OrderFABContainer.tsx","../src/components/PublicMenu/MenuContent/MenuContent.tsx","../src/modules/category/hooks.ts","../src/components/PublicMenu/Videos/Video/Actions/Actions.tsx","../src/components/PublicMenu/Videos/Video/VideoData/VideoData.tsx","../src/components/PublicMenu/Videos/Video/Video.tsx","../src/components/PublicMenu/Videos/VideoFeed/VideoFeed.tsx","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/modules/addon/utils.ts","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/modules/order/preview.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/modules/table/models.ts","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderPaymentMethods/OrderPaymentMethods.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx"],"sourcesContent":["import * as categoryModels from \"src/modules/category/models\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { CategoryProductMap } from \"./models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: categoryModels.Category[],\n\tproducts: productModels.Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, productModels.Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as productModels.Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n\tPRODUCT_DETAILS: \"PRODUCT_DETAILS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\", \"pl\", \"pt\", \"hr\"];\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n\nexport const DOMAIN = \"tabres.com\";\n\nexport const DEFAULT_HOSTNAME = DOMAIN;\n\nexport const IMAGE_BASE_URL = \"https://images.tabres.com\";\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"tabres_cst_act\", \"tabres_cst_rft\");\n","import { DOMAIN, IMAGE_BASE_URL } from \"./constants\";\n\ninterface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst locale = language || \"en\";\n\t// Local env\n\tif (hostname === \"localhost:3000\") {\n\t\treturn { url: `http://localhost:3000/${locale}`, domain: DOMAIN };\n\t}\n\t// Prod env\n\treturn { url: `https://${DOMAIN}/${locale}`, domain: DOMAIN };\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\treturn `https://app.tabres.com/auth/register?lang=${language}&utm_source=${source}`;\n};\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.tabres.com/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.tabres.com/tabres-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n\nexport const getVideoSource = (video?: string) => {\n\tif (!video) return \"\";\n\n\tif (video.includes(\"base64\") || video.startsWith(\"https://\")) return video;\n\n\treturn `${IMAGE_BASE_URL}/${video}`;\n};\n\nexport const adjustLightness = (hex: string, deltaPct: number) => {\n\tconst n = parseInt(hex.replace(\"#\", \"\"), 16);\n\tconst r = ((n >> 16) & 0xff) / 255;\n\tconst g = ((n >> 8) & 0xff) / 255;\n\tconst b = (n & 0xff) / 255;\n\n\tconst max = Math.max(r, g, b);\n\tconst min = Math.min(r, g, b);\n\tconst l = (max + min) / 2;\n\tlet h = 0;\n\tlet s = 0;\n\tif (max !== min) {\n\t\tconst d = max - min;\n\t\ts = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\t\tswitch (max) {\n\t\t\tcase r:\n\t\t\t\th = (g - b) / d + (g < b ? 6 : 0);\n\t\t\t\tbreak;\n\t\t\tcase g:\n\t\t\t\th = (b - r) / d + 2;\n\t\t\t\tbreak;\n\t\t\tcase b:\n\t\t\t\th = (r - g) / d + 4;\n\t\t\t\tbreak;\n\t\t}\n\t\th /= 6;\n\t}\n\n\tconst newL = Math.max(0, Math.min(1, l + deltaPct / 100));\n\n\tconst hueToRgb = (p: number, q: number, t: number) => {\n\t\tif (t < 0) t += 1;\n\t\tif (t > 1) t -= 1;\n\t\tif (t < 1 / 6) return p + (q - p) * 6 * t;\n\t\tif (t < 1 / 2) return q;\n\t\tif (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n\t\treturn p;\n\t};\n\n\tlet r2 = newL;\n\tlet g2 = newL;\n\tlet b2 = newL;\n\tif (s !== 0) {\n\t\tconst q = newL < 0.5 ? newL * (1 + s) : newL + s - newL * s;\n\t\tconst p = 2 * newL - q;\n\t\tr2 = hueToRgb(p, q, h + 1 / 3);\n\t\tg2 = hueToRgb(p, q, h);\n\t\tb2 = hueToRgb(p, q, h - 1 / 3);\n\t}\n\n\tconst toHex = (x: number) =>\n\t\tMath.round(x * 255)\n\t\t\t.toString(16)\n\t\t\t.padStart(2, \"0\");\n\treturn `#${toHex(r2)}${toHex(g2)}${toHex(b2)}`;\n};\n","import { useStoreContext } from \"src/store\";\n\nimport { DEFAULT_HOSTNAME } from \"./constants\";\n\nexport const useHostname = (): string => {\n\tconst { hostname } = useStoreContext();\n\n\treturn hostname || DEFAULT_HOSTNAME;\n};\n\nexport const useIsInDashboard = (): boolean => {\n\tconst { isInDashboard } = useStoreContext();\n\n\treturn isInDashboard || false;\n};\n","import { createContext, CSSProperties, ReactElement, useContext } from \"react\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nconst StoreContext = createContext<menuModels.PublicMenuData>({} as menuModels.PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: menuModels.PublicMenuData;\n}) => {\n\treturn (\n\t\t<StoreContext.Provider value={value}>\n\t\t\t<div\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--sorocraft-color-primary\": value.menuDesign?.primaryColor,\n\t\t\t\t\t\t\"--sorocraft-color-primary-light\":\n\t\t\t\t\t\t\tvalue.menuDesign?.primaryColor &&\n\t\t\t\t\t\t\tviewUtils.adjustLightness(value.menuDesign.primaryColor, 37.5),\n\t\t\t\t\t\t\"--sorocraft-color-primary-active\":\n\t\t\t\t\t\t\tvalue.menuDesign?.primaryColor &&\n\t\t\t\t\t\t\tviewUtils.adjustLightness(value.menuDesign.primaryColor, -7.5),\n\t\t\t\t\t\t\"--tabres-menu-category-background-color\": value.menuDesign?.categoryBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-category-text-color\": value.menuDesign?.categoryTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-background-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-text-color\": value.menuDesign?.productCardTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-description-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardDescriptionTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-volume-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardVolumeTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-price-text-color\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productCardPriceTextColor,\n\t\t\t\t\t\t\"--tabres-menu-product-card-block-padding\": value.menuDesign?.productCardBlockPadding,\n\t\t\t\t\t\t\"--tabres-menu-category-title-font-size\": value.menuDesign?.categoryTitleFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-name-font-size\": value.menuDesign?.productNameFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-price-font-size\": value.menuDesign?.productPriceFontSize,\n\t\t\t\t\t\t\"--tabres-menu-distance-between-category-title-and-products\":\n\t\t\t\t\t\t\tvalue.menuDesign?.distanceBetweenCategoryTitleAndProducts,\n\t\t\t\t\t\t\"--tabres-menu-product-description-font-size\":\n\t\t\t\t\t\t\tvalue.menuDesign?.productDescriptionFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-volume-font-size\": value.menuDesign?.productVolumeFontSize,\n\t\t\t\t\t\t\"--tabres-menu-product-separator-color\": value.menuDesign?.productSeparatorColor,\n\t\t\t\t\t\t\"--tabres-menu-page-background-color\": value.menuDesign?.menuPageBackgroundColor,\n\t\t\t\t\t\t\"--tabres-menu-page-text-color\": value.menuDesign?.menuPageTextColor,\n\t\t\t\t\t} as CSSProperties\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</StoreContext.Provider>\n\t);\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","import { useMemo } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as viewHooks from \"src/modules/view/hooks\";\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport { Business, BusinessLanguage } from \"./models\";\nimport { DEFAULT_CURRENCY, DEFAULT_LANGUAGE } from \"./constants\";\n\nexport const useBusiness = (): Business => {\n\tconst { business } = useStoreContext();\n\n\treturn business || ({} as Business);\n};\n\nexport const useCurrency = () => {\n\tconst { currency } = useBusiness();\n\n\treturn currency || DEFAULT_CURRENCY;\n};\n\nexport const useBusinessId = (): number => {\n\tconst { id } = useBusiness();\n\n\treturn id;\n};\n\nexport const useBusinessUsername = (): string => {\n\tconst { username } = useBusiness();\n\n\treturn username || \"\";\n};\n\nexport const useLanguages = (): BusinessLanguage[] => {\n\tconst business = useBusiness();\n\n\treturn business.languages || [];\n};\n\nexport const useLanguage = (): string => {\n\tconst { language } = useStoreContext();\n\n\treturn language || DEFAULT_LANGUAGE;\n};\n\nexport const useOnLanguageSelect = (): ((code: string) => void) => {\n\tconst { onLanguageSelect } = useStoreContext();\n\n\treturn onLanguageSelect;\n};\n\nexport const useBusinessSegment = () => {\n\tconst { segment } = useBusiness();\n\n\treturn segment;\n};\n\nexport const useBusinessName = (): string => {\n\tconst { name } = useBusiness();\n\n\treturn name;\n};\n\nexport const useBaseUrl = () => {\n\tconst hostname = viewHooks.useHostname();\n\tconst language = useLanguage();\n\n\treturn useMemo(() => viewUtils.getBaseUrl(hostname, language), [hostname, language]);\n};\n\nexport const useBusinessUrl = () => {\n\tconst { url } = useBaseUrl();\n\tconst username = useBusinessUsername();\n\n\treturn useMemo(() => `${url}/${username}`, [url, username]);\n};\n","export const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\n","import { BranchWorkDays } from \"src/models\";\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"src/modules/view/models\";\n\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { Branch, BranchServes, BranchSettings } from \"./models\";\n\nexport const useHasSingleBranch = (): boolean => {\n\tconst { branches } = useStoreContext();\n\n\treturn (branches || []).length <= 1;\n};\n\nexport const useSelectedBranch = (): Branch => {\n\tconst { branches, branchId } = useStoreContext();\n\tconst hasSingleBranch = useHasSingleBranch();\n\n\tif (isEmpty(branches)) return {} as Branch;\n\n\tif (hasSingleBranch) {\n\t\treturn branches[0];\n\t}\n\n\treturn branches.find((item) => item.id === Number(branchId)) || ({} as Branch);\n};\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchAddress = (): string => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch.address || \"\";\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst selectedBranch = useSelectedBranch();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n\nexport const useIsDeliveryEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\treturn settings?.deliveryOrderEnabled;\n};\n\nexport const useVenueName = () => {\n\tconst { business } = useStoreContext();\n\tconst selectedBranch = useSelectedBranch();\n\tconst hasSingleBranch = useHasSingleBranch();\n\tconst businessName = business?.name || \"Tabres\";\n\n\tif (hasSingleBranch) return businessName;\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport const useBranchId = (): number | undefined => {\n\tconst { branchId } = useStoreContext();\n\n\treturn branchId;\n};\n\nexport const useList = (): Branch[] => {\n\tconst { branches } = useStoreContext();\n\n\treturn branches || [];\n};\n\nexport const useOnBranchSelect = (): ((branchId: number) => void) => {\n\tconst { onBranchSelect } = useStoreContext();\n\n\treturn onBranchSelect;\n};\n","import * as businessHooks from \"src/modules/business/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useMenuUrl = () => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst branchId = branchHooks.useBranchId();\n\n\tif (!branchId) return businessUrl;\n\n\treturn `${businessUrl}/${branchId}`;\n};\n\nexport const useMenuTexts = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst { menuDesign } = useStoreContext();\n\n\tconst headerText = menuDesign?.headerText?.[language] ?? null;\n\tconst footerText = menuDesign?.footerText?.[language] ?? null;\n\n\treturn { headerText, footerText };\n};\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import * as customerModels from \"../customer/models\";\nimport * as productModels from \"../product/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\t/** Gross unit price (listingPrice from the menu listing). */\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\t/** Gross unit price (listingPrice from the menu listing). */\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\t/**\n\t * Gross unit price (listingPrice) at the moment the line was added. The\n\t * server recomputes authoritative totals on create/preview; this value is\n\t * what the cart UI displays.\n\t */\n\tprice?: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tisPaid?: boolean;\n\tsellUnitType: productModels.SellUnitType;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tpreferredPaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n\tcurrency?: string;\n\ttrackingId?: string;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n\tlanguage?: string;\n}\n\nexport interface CalculatePreviewItemRequest {\n\torderItemsId: string;\n\tproductId: number;\n\tquantity: number;\n\tvariant?: { variantId: number };\n\taddons?: Array<{\n\t\taddonId: number;\n\t\toptions: Array<{ optionId: number }>;\n\t}>;\n}\n\nexport interface CalculatePreviewRequest {\n\tbusinessId?: number;\n\tbranchId: number;\n\torderType: OrderType;\n\titems: CalculatePreviewItemRequest[];\n}\n\nexport interface CalculatePreviewTax {\n\tbranchTaxId: number;\n\tname: Record<string, string>;\n\trate: number;\n\ttype: \"percentage\" | \"fixed\";\n\taddToListingPrice: boolean;\n\tamount: number;\n}\n\nexport interface CalculatePreviewLine {\n\torderItemsId: string;\n\tproductId: number;\n\tquantity: number;\n\tprice: number;\n\ttaxes: CalculatePreviewTax[];\n}\n\nexport interface CalculatePreviewResponse {\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\ttotalTax: number;\n\tdeliveryFee: number;\n\tserviceFee: number;\n\titems: CalculatePreviewLine[];\n\ttaxes: CalculatePreviewTax[];\n}\n\nexport interface OrderPreviewState {\n\tdata: CalculatePreviewResponse | null;\n\tisLoading: boolean;\n\terror: string | null;\n}\n","import { OrderPreviewState, OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\tpreferredPaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport const initialPreviewState: OrderPreviewState = {\n\tdata: null,\n\tisLoading: false,\n\terror: null,\n};\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { OrderItem } from \"../models\";\n\nexport const getOrderItemListingRawPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity } = orderItem || {};\n\n\tconst baseUnitPrice = variant?.price ?? price ?? 0;\n\n\tconst addonsUnitPrice = (addons || []).reduce(\n\t\t(addonSum, addon) =>\n\t\t\taddonSum +\n\t\t\t(addon?.options || []).reduce((optionSum, option) => optionSum + (option?.price ?? 0), 0),\n\t\t0,\n\t);\n\n\tconst unitPrice = baseUnitPrice + addonsUnitPrice;\n\treturn unitPrice * (quantity ?? 1);\n};\n\nexport const getOrderItemListingPrice = (\n\torderItem: OrderItem,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst totalPrice = getOrderItemListingRawPrice(orderItem);\n\n\treturn priceFormatter(totalPrice, currency, language);\n};\n","import { isEmpty, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tCalculatePreviewResponse,\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons,\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {},\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.listingPrice ?? option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean,\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\n// Defensive shape check for the /order/calculate response. The service is\n// typed as CalculatePreviewResponse, but the network can return malformed\n// payloads (empty body, HTML error page) that would corrupt preview state\n// and break price-line lookups downstream.\nexport const isValidPreviewResponse = (data: unknown): data is CalculatePreviewResponse => {\n\tif (!data || typeof data !== \"object\") return false;\n\tconst d = data as Partial<CalculatePreviewResponse>;\n\treturn (\n\t\ttypeof d.totalPriceWithoutTax === \"number\" &&\n\t\ttypeof d.totalPriceWithTax === \"number\" &&\n\t\ttypeof d.totalPriceWithTaxAndFees === \"number\" &&\n\t\ttypeof d.totalTax === \"number\" &&\n\t\ttypeof d.deliveryFee === \"number\" &&\n\t\ttypeof d.serviceFee === \"number\" &&\n\t\tArray.isArray(d.items) &&\n\t\tArray.isArray(d.taxes)\n\t);\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n\nexport * from \"./utils/item-price\";\n","export const BASE_API_V2_URL = \"https://api.tabres.com/api/v2\";\n","import { HttpClient } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_V2_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst httpClient = new HttpClient({\n\tbaseURL: BASE_API_V2_URL,\n\theaders: {\n\t\t\"Content-Type\": \"application/json\",\n\t},\n\tcredentials: \"include\",\n});\n\nhttpClient.onRequest((config) => {\n\tconst { accessToken = \"\" } = storage.getAuthToken();\n\tconfig.headers.Authorization = accessToken;\n\treturn config;\n});\n\nhttpClient.onResponse(async (response) => {\n\tconst data = await response.json().catch(() => null);\n\treturn data;\n});\n\nexport default httpClient;\n","import httpClient from \"src/services/api/client\";\n\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn httpClient.get(\"/customer\");\n};\n\nexport const loginCustomer = async (email: string): Promise<{ status: number }> => {\n\treturn httpClient.post(\"/customer\", { email });\n};\n\nexport const verifyOTP = async (otp: string, email: string): Promise<AuthResponse> => {\n\treturn httpClient.post(\"/otp/verify\", { otp, email });\n};\n\nexport const update = async (payload: CustomerUpdatePayload): Promise<{ status: number }> => {\n\treturn httpClient.patch(\"/customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates,\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\",\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude,\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude,\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_V2_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_V2_URL}/log/client`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as tableHooks from \"src/modules/table/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst tableId = tableHooks.usePreDefinedTableId();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\tpreferredPaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean, shouldClose?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n\tisOrderDefaultOpen?: boolean;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n\tisOrderDefaultOpen = false,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(isOrderDefaultOpen);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t([\"branchId\", \"tableId\"] as const).forEach((field) => {\n\t\t\t\tif (updatedFields[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => {\n\t\t\t\t\t\tif (currentErrors?.[field]) {\n\t\t\t\t\t\t\treturn { ...currentErrors, [field]: null };\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn currentErrors;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity = 1,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product)) return;\n\n\t\t\tconst { id: productId, variants, addons, price, listingPrice, sellUnitType } = product;\n\t\t\t// Cart lines record the gross unit price the user saw on the menu;\n\t\t\t// the server is still source-of-truth for actual line totals at\n\t\t\t// create/preview time.\n\t\t\tconst unitPrice = listingPrice ?? price;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = parseFloat(\n\t\t\t\t\t(isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity).toFixed(3),\n\t\t\t\t);\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice: unitPrice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: {\n\t\t\t\t\t\t\t\tvariantId: selectedVariant.id,\n\t\t\t\t\t\t\t\tprice: selectedVariant.listingPrice ?? selectedVariant.price,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t\tsellUnitType,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation) {\n\t\t\t\tsetErrors((currentErrors) => {\n\t\t\t\t\tif (currentErrors?.items) {\n\t\t\t\t\t\treturn { ...currentErrors, items: null };\n\t\t\t\t\t}\n\t\t\t\t\treturn currentErrors;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[],\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems],\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems],\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId) return;\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tif (isEmpty(currentOrderItems)) return currentOrderItems;\n\n\t\t\t\t// Filter out order items that belong to the given productId\n\t\t\t\tconst updatedOrderItems = Object.entries(currentOrderItems).reduce(\n\t\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{} as orderModels.OrderItems,\n\t\t\t\t);\n\n\t\t\t\treturn updatedOrderItems;\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false, shouldClose = true) => {\n\t\t\tif (shouldClose) setIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep],\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t],\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n\tdeliveryFeeAmount: number;\n\tserviceChargeEnabled: boolean;\n\tserviceChargePercentage: number;\n\taddToOrderEnabled: boolean;\n\tguestOrderEnabled: boolean;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n\tDELIVERY_FEE_AMOUNT = \"deliveryFeeAmount\",\n\tSERVICE_CHARGE_ENABLED = \"serviceChargeEnabled\",\n\tSERVICE_CHARGE_PERCENTAGE = \"serviceChargePercentage\",\n\tADD_TO_ORDER_ENABLED = \"addToOrderEnabled\",\n\tGUEST_ORDER_ENABLED = \"guestOrderEnabled\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twhatsApp?: string;\n\ttelegram?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\ttimezone?: string;\n\tbusinessDayStart?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n\nexport enum BranchTaxType {\n\tPERCENTAGE = \"percentage\",\n\tFIXED_AMOUNT = \"fixed\",\n}\n\nexport enum BranchTaxScope {\n\tENTIRE_MENU = \"entire_menu\",\n\tCLASS = \"class\",\n}\n\nexport enum BranchTaxFulfillment {\n\tDELIVERY = \"delivery\",\n\tTAKEAWAY = \"takeaway\",\n\tDINE_IN = \"dine_in\",\n\tALL = \"ALL\",\n}\n\nexport type BranchTax = {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\ttaxClassId?: number;\n\tname: Record<string, string>;\n\trate: number;\n\ttype: BranchTaxType;\n\tisActive: boolean;\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tscope: BranchTaxScope;\n\taddToListingPrice: boolean;\n\tisDefault: boolean;\n\tcomputationOrder: number;\n\tappliesToFulfillment?: BranchTaxFulfillment;\n\ttaxClassCode?: string;\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","import { RefObject, useEffect, useMemo, useRef, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nimport { Video } from \"./models\";\n\nexport const useVideoId = () => {\n\tconst { videoId } = useStoreContext();\n\n\treturn videoId;\n};\n\nexport const useVideos = (): Video[] => {\n\tconst { videos } = useStoreContext();\n\n\treturn useMemo(() => videos || [], [videos]);\n};\n\nexport const useCurrentVideo = (): Video => {\n\tconst allVideos = useVideos();\n\tconst videoId = useVideoId();\n\n\treturn useMemo(() => {\n\t\tif (!videoId) return {} as Video;\n\t\treturn allVideos.find((video) => video.productId === Number(videoId)) || ({} as Video);\n\t}, [allVideos, videoId]);\n};\n\nexport const useOtherVideosForScrolling = (): Video[] => {\n\tconst currentVideoId = useVideoId();\n\tconst allVideos = useVideos();\n\n\treturn useMemo(\n\t\t() => allVideos.filter((video) => video.productId !== Number(currentVideoId)),\n\t\t[allVideos, currentVideoId]\n\t);\n};\n\nexport function useActiveSnap(containerRef: RefObject<HTMLElement>) {\n\tconst [activeId, setActiveId] = useState<number | null>(null);\n\tconst elements = useRef(new Map<number, HTMLElement>());\n\n\tconst register = (id: number, el: HTMLElement | null) => {\n\t\tif (el) elements.current.set(id, el);\n\t};\n\n\tuseEffect(() => {\n\t\tconst root = containerRef.current;\n\t\tif (!root) return;\n\n\t\tlet rafId: number;\n\n\t\tconst observer = new IntersectionObserver(\n\t\t\t(entries) => {\n\t\t\t\t// Pick the most visible item\n\t\t\t\tconst visible = entries\n\t\t\t\t\t.filter((e) => e.isIntersecting)\n\t\t\t\t\t.sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];\n\n\t\t\t\tif (visible) {\n\t\t\t\t\tcancelAnimationFrame(rafId);\n\t\t\t\t\trafId = requestAnimationFrame(() => {\n\t\t\t\t\t\tsetActiveId((prev) => {\n\t\t\t\t\t\t\tconst nextId =\n\t\t\t\t\t\t\t\t[...elements.current.entries()].find(([, el]) => el === visible.target)?.[0] ??\n\t\t\t\t\t\t\t\tnull;\n\n\t\t\t\t\t\t\treturn prev === nextId ? prev : nextId;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\troot,\n\t\t\t\tthreshold: [0.6, 0.75, 1],\n\t\t\t}\n\t\t);\n\n\t\telements.current.forEach((el) => observer.observe(el));\n\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [containerRef]);\n\n\treturn { activeId, register };\n}\n\nexport const useFirstVideo = (): Video => {\n\tconst videos = useVideos();\n\n\treturn useMemo(() => videos[0], [videos]);\n};\n\nexport const useVideoUrl = (videoId: number): string => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst branchId = branchHooks.useBranchId();\n\n\tlet url = businessUrl;\n\tif (branchId) url += `/${branchId}`;\n\tif (videoId) url += `/videos/${videoId}`;\n\n\treturn url;\n};\n\nexport const useFirstVideoUrl = (): string => {\n\tconst firstVideo = useFirstVideo();\n\tconst firstVideoUrl = useVideoUrl(firstVideo?.productId);\n\n\tif (isEmpty(firstVideo)) return \"\";\n\treturn firstVideoUrl;\n};\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nconst Languages = () => {\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\tconst languages = businessHooks.useLanguages();\n\tconst language = businessHooks.useLanguage();\n\tconst onLanguageSelect = businessHooks.useOnLanguageSelect();\n\n\tconst isBilingual = languages.length > 1;\n\tconst otherLanguages = languages.filter(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.tabres.com/languages/${code}.svg`;\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => onLanguageSelect?.(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { Column, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport Languages from \"../Languages\";\n\nconst BusinessHeader = () => {\n\tconst { coverPhoto, avatar256, name } = businessHooks.useBusiness();\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tfullWidth\n\t\t\t\t\tfullHeight\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustifyContent=\"center\"\n\t\t\t\t\tgap={0.5}\n\t\t\t\t\tclassName={styles.container}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\talt={name}\n\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\theight={96}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t\t<Text variant=\"h1\" color=\"white\" className={styles.name} align=\"center\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</div>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t</div>\n\t);\n};\nexport default BusinessHeader;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\n\tconst handleGoBack = () => {\n\t\tif (isInDashboard) return onBranchSelect?.(\"\" as never);\n\t\tif (typeof window === \"undefined\") return;\n\n\t\twindow.location.href = businessUrl;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import az from \"./az\";\nimport en from \"./en\";\nimport es from \"./es\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\nimport pl from \"./pl\";\nimport pt from \"./pt\";\nimport hr from \"./hr\";\n\nexport default {\n\taz,\n\ten,\n\tes,\n\tru,\n\ttr,\n\tnl,\n\tet,\n\tpl,\n\tpt,\n\thr,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sifariş növü indi aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n\tINVALID_ADDRESS: \"Ünvan düzgün deyil\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n\t\"Delivery Fee\": \"Çatdırılma\",\n\t\"Play video\": \"Videonu izlə\",\n\t\" / kg\": \" / kq\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Endirim\",\n\t\"Discount ({{rate}}%)\": \"Endirim ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servis haqqı ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n\t\"House No.\": \"Ev nömrəsi\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n\tFeedback: \"Rəy bildir\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"This order type is not available right now.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n\tINVALID_ADDRESS: \"Invalid address\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import auth from \"./auth\";\nimport branch from \"./branch\";\nimport common from \"./common\";\nimport customer from \"./customer\";\nimport error from \"./error\";\nimport events from \"./events\";\nimport order from \"./order\";\n\nexport default {\n\tauth,\n\tbranch,\n\tcommon,\n\tcustomer,\n\terror,\n\tevents,\n\torder,\n};\n","export default {\n\t\"Create an account or log in\": \"Crear una cuenta o iniciar sesión\",\n\t\"Phone number\": \"Número de teléfono\",\n\t\"I don't have an email\": \"No tengo correo electrónico\",\n\t\"We sent a confirmation code to {{address}}\": \"Hemos enviado un código de confirmación a {{address}}\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Lunes\",\n\t\"WEEKDAY-1\": \"Martes\",\n\t\"WEEKDAY-2\": \"Miércoles\",\n\t\"WEEKDAY-3\": \"Jueves\",\n\t\"WEEKDAY-4\": \"Viernes\",\n\t\"WEEKDAY-5\": \"Sábado\",\n\t\"WEEKDAY-6\": \"Domingo\",\n\t\"Closed\": \"Cerrado\",\n\t\"Opening Hours\": \"Horarios de apertura\",\n\t\"Delivery Hours\": \"Horarios de entrega\",\n\t\"Feedback\": \"Comentarios\",\n};\n","export default {\n\t\"Save\": \"Guardar\",\n\t\"Cancel\": \"Cancelar\",\n\t\"Continue\": \"Continuar\",\n};\n","export default {\n\t\"Unknown address\": \"Dirección desconocida\",\n\t\"No address available\": \"Sin dirección disponible\",\n\t\"Update Delivery Address\": \"Actualizar dirección de entrega\",\n\t\"Country\": \"País\",\n\t\"City\": \"Ciudad\",\n\t\"Baker Street\": \"Calle Baker\",\n\t\"Address\": \"Dirección\",\n\t\"House number\": \"Número de casa\",\n\t\"Additional number\": \"Número adicional\",\n\t\"Example: Door code is 555\": \"Ejemplo: El código de la puerta es 555\",\n\t\"Delivery Instructions\": \"Instrucciones de entrega\",\n\t\"Floor\": \"Planta\",\n\t\"Enter address\": \"Introducir dirección\",\n\t\"House No.\": \"Nº de casa\",\n};\n","export default {\n\t\"SOMETHING_WRONG\": \"¡Algo salió mal! Por favor, inténtalo de nuevo más tarde.\",\n\t\"FIELD_REQUIRED\": \"Este campo es obligatorio\",\n\t\"Unsupported country code\": \"Código de país no soportado\",\n\t\"Invalid OTP\": \"Código de confirmación inválido\",\n\t\"INVALID_OTP\": \"Código de confirmación inválido\",\n\t\"OTP_RATE_LIMIT_EXCEEDED\": \"Has superado el límite de códigos. Por favor, inténtalo de nuevo más tarde.\",\n\t\"Invalid Email Address\": \"Dirección de correo electrónico no válida\",\n\t\"FEATURE_NOT_AVAILABLE_FOR_SEGMENT\": \"Esta función no está disponible en tu plan actual.\",\n\t\"ORDER_TYPE_DISABLED_FOR_BUSINESS\": \"Este tipo de pedido no está disponible para este negocio.\",\n\t\"ORDER_TYPE_DISABLED_AT_THIS_TIME\": \"Este tipo de pedido no está disponible en este momento.\",\n\t\"COUNTRY_REQUIRED\": \"El país es obligatorio.\",\n\t\"CITY_REQUIRED\": \"La ciudad es obligatoria.\",\n\t\"STREET_REQUIRED\": \"La calle es obligatoria.\",\n\t\"STREET_NUMBER_REQUIRED\": \"El número de calle es obligatorio.\",\n\t\"OUT_OF_DELIVERY_RANGE\": \"Este establecimiento no realiza entregas en tu dirección.\",\n\t\"NO_ORDER_TYPE\": \"Por favor, selecciona un tipo de pedido.\",\n\t\"INVALID_ADDRESS\": \"Dirección no válida\",\n};\n","export default {\n\t\"Events\": \"Eventos\",\n\t\"Scrolled to Category\": \"Desplazado a la categoría\",\n\t\"Category Selected\": \"Categoría seleccionada\",\n\t\"Product Details\": \"Detalles del producto\",\n\t\"Product Added to Order\": \"Producto añadido al pedido\",\n};\n","export default {\n\t\"View order\": \"Ver pedido\",\n\t\"Remove from order\": \"Eliminar del pedido\",\n\t\"Update order\": \"Actualizar pedido\",\n\t\"Add to order\": \"Añadir al pedido\",\n\t\"Add\": \"Añadir\",\n\t\"Your order\": \"Tu pedido\",\n\t\"Subtotal\": \"Subtotal\",\n\t\"Empty order\": \"Pedido vacío\",\n\t\"You don't have any items in your order\": \"No tienes ningún artículo en tu pedido\",\n\t\"Add items\": \"Añadir artículos\",\n\t\"Add an order note\": \"Añadir nota al pedido\",\n\t\"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\",\n\t\"Your Order is Completed!\": \"¡Tu pedido se ha completado!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\": \"¡Gracias! Hemos recibido tu pedido y será entregado en breve.\",\n\t\"Delivery\": \"Entrega\",\n\t\"Dine in\": \"Para tomar aquí\",\n\t\"Pickup\": \"Para recoger\",\n\t\"Cash\": \"Efectivo\",\n\t\"POS Terminal\": \"Terminal TPV\",\n\t\"Order summary\": \"Resumen del pedido\",\n\t\"Items\": \"Artículos\",\n\t\"Tax\": \"Impuestos\",\n\t\"Total\": \"Total\",\n\t\"Special instructions, allergies, etc.\": \"Instrucciones especiales, alergias, etc.\",\n\t\"Place order\": \"Realizar pedido\",\n\t\"Continue\": \"Continuar\",\n\t\"Not available\": \"No disponible\",\n\t\"In order\": \"En el pedido\",\n\t\"Product choices\": \"Opciones de producto\",\n\t\"Track order\": \"Seguimiento del pedido\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"El importe mínimo de pedido para entrega es {{amount}}\",\n\t\"This field is required\": \"Este campo es obligatorio\",\n\t\"Please select a table\": \"Por favor, selecciona una mesa\",\n\t\"Please enter an address\": \"Por favor, introduce una dirección\",\n\t\"Please choose product\": \"Por favor, elige un producto\",\n\t\"Table\": \"Mesa\",\n\t\"Select Table\": \"Seleccionar mesa\",\n\t\"Card\": \"Tarjeta\",\n\t\"Closed Now\": \"Cerrado ahora\",\n\t\"Delivery Fee\": \"Gastos de envío\",\n\t\"Play video\": \"Reproducir vídeo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\t\"Discount\": \"Descuento\",\n\t\"Discount ({{rate}}%)\": \"Descuento ({{rate}}%)\",\n\t\"Events\": \"Eventos\",\n\t\"Service Fee ({{rate}}%)\": \"Cargo por servicio ({{rate}}%)\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Этот тип заказа сейчас недоступен.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n\tINVALID_ADDRESS: \"Неверный адрес\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n\t\"Delivery Fee\": \"Доставка\",\n\t\"Play video\": \"Смотреть видео\",\n\tDiscount: \"Скидка\",\n\t\"Discount ({{rate}}%)\": \"Скидка ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Сервисный сбор ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n\t\"House No.\": \"Дом №\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sipariş türü şu anda aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n\tINVALID_ADDRESS: \"Geçersiz adres\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n\t\"Delivery Fee\": \"Teslimat ücreti\",\n\t\"Play video\": \"Videoyu izle\",\n\tDiscount: \"İndirim\",\n\t\"Discount ({{rate}}%)\": \"İndirim ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servis Ücreti ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n\t\"House No.\": \"Ev No.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Dit besteltype is op dit moment niet beschikbaar.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n\tINVALID_ADDRESS: \"Ongeldig adres\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n\t\"Delivery Fee\": \"Bezorgkosten\",\n\t\"Play video\": \"Bekijk video\",\n\tDiscount: \"Korting\",\n\t\"Discount ({{rate}}%)\": \"Korting ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Servicekosten ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n\t\"House No.\": \"Huis nr.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"See tellimuse tüüp ei ole praegu saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n\tINVALID_ADDRESS: \"Vigane aadress\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n\t\"Delivery Fee\": \"Kohaletoimetamise tasu\",\n\t\"Play video\": \"Vaata videot\",\n\tDiscount: \"Allahindlus\",\n\t\"Discount ({{rate}}%)\": \"Allahindlus ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Teenustasu ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n\t\"House No.\": \"Maja nr.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Coś poszło nie tak! Spróbuj ponownie później.\",\n\tFIELD_REQUIRED: \"To pole jest wymagane\",\n\t\"Unsupported country code\": \"Nieobsługiwany numer kierunkowy\",\n\t\"Invalid OTP\": \"Nieprawidłowy kod weryfikacyjny\",\n\tINVALID_OTP: \"Nieprawidłowy kod weryfikacyjny\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Przekroczono limit kodów. Spróbuj ponownie za chwilę.\",\n\t\"Invalid Email Address\": \"Nieprawidłowy adres e-mail\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Ta funkcja nie jest dostępna w Twoim obecnym planie.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Ten typ zamówienia nie jest dostępny w tym lokalu.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Ten typ zamówienia jest teraz niedostępny.\",\n\tCOUNTRY_REQUIRED: \"Kraj jest wymagany.\",\n\tCITY_REQUIRED: \"Miasto jest wymagane.\",\n\tSTREET_REQUIRED: \"Ulica jest wymagana.\",\n\tSTREET_NUMBER_REQUIRED: \"Numer domu jest wymagany.\",\n\tOUT_OF_DELIVERY_RANGE: \"Ten lokal nie dostarcza pod Twój adres.\",\n\tNO_ORDER_TYPE: \"Wybierz typ zamówienia.\",\n\tINVALID_ADDRESS: \"Nieprawidłowy adres\",\n};\n","export default {\n\tSave: \"Zapisz\",\n\tCancel: \"Anuluj\",\n\tContinue: \"Dalej\",\n};\n","export default {\n\t\"View order\": \"Zobacz zamówienie\",\n\t\"Remove from order\": \"Usuń z zamówienia\",\n\t\"Update order\": \"Zmień zamówienie\",\n\t\"Add to order\": \"Dodaj do zamówienia\",\n\tAdd: \"Dodaj\",\n\t\"Your order\": \"Twoje zamówienie\",\n\tSubtotal: \"Suma\",\n\t\"Empty order\": \"Puste zamówienie\",\n\t\"You don't have any items in your order\": \"Nie masz jeszcze nic w zamówieniu\",\n\t\"Add items\": \"Dodaj produkty\",\n\t\"Add an order note\": \"Notatka dla restauracji\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Napisz o alergiach, specjalnych prośbach lub składnikach, które chcesz dodać albo usunąć.\",\n\t\"Your Order is Completed!\": \"Zamówienie przyjęte!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Dziękujemy! Otrzymaliśmy Twoje zamówienie i niedługo je dostarczymy.\",\n\tDelivery: \"Dostawa\",\n\t\"Dine in\": \"Na miejscu\",\n\tPickup: \"Na wynos\",\n\tCash: \"Gotówka\",\n\t\"POS Terminal\": \"Terminal płatniczy\",\n\t\"Order summary\": \"Podsumowanie zamówienia\",\n\tItems: \"Produkty\",\n\tTax: \"Podatek\",\n\tTotal: \"Razem\",\n\t\"Special instructions, allergies, etc.\": \"Uwagi, alergie itp.\",\n\t\"Place order\": \"Złóż zamówienie\",\n\tContinue: \"Dalej\",\n\t\"Not available\": \"Niedostępne\",\n\t\"In order\": \"W zamówieniu\",\n\t\"Product choices\": \"Opcje\",\n\t\"Track order\": \"Śledź zamówienie\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimalna kwota zamówienia na dostawę to {{amount}}\",\n\t\"This field is required\": \"To pole jest wymagane\",\n\t\"Please select a table\": \"Wybierz stolik\",\n\t\"Please enter an address\": \"Podaj adres\",\n\t\"Please choose product\": \"Wybierz produkt\",\n\tTable: \"Stolik\",\n\t\"Select Table\": \"Wybierz stolik\",\n\tCard: \"Kartą\",\n\t\"Closed Now\": \"Teraz zamknięte\",\n\t\"Delivery Fee\": \"Koszt dostawy\",\n\t\"Play video\": \"Odtwórz wideo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Rabat\",\n\t\"Discount ({{rate}}%)\": \"Rabat ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Opłata serwisowa ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Adres nie został podany\",\n\t\"No address available\": \"Brak adresu\",\n\t\"Update Delivery Address\": \"Zmień adres dostawy\",\n\tCountry: \"Kraj\",\n\tCity: \"Miasto\",\n\t\"Baker Street\": \"ul. Marszałkowska\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Numer domu\",\n\t\"Additional number\": \"Numer mieszkania\",\n\t\"Example: Door code is 555\": \"Np. kod do drzwi: 555\",\n\t\"Delivery Instructions\": \"Wskazówki dla kuriera\",\n\tFloor: \"Piętro\",\n\t\"Enter address\": \"Wpisz adres\",\n\t\"House No.\": \"Nr domu\",\n};\n","export default {\n\t\"Create an account or log in\": \"Załóż konto lub zaloguj się\",\n\t\"Phone number\": \"Numer telefonu\",\n\t\"I don't have an email\": \"Nie mam adresu e-mail\",\n\t\"We sent a confirmation code to {{address}}\": \"Wysłaliśmy kod potwierdzający na {{address}}\",\n};\n","export default {\n\tEvents: \"Aktywność\",\n\t\"Scrolled to Category\": \"Przewinięto do kategorii\",\n\t\"Category Selected\": \"Wybrano kategorię\",\n\t\"Product Details\": \"Szczegóły produktu\",\n\t\"Product Added to Order\": \"Dodano do zamówienia\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Poniedziałek\",\n\t\"WEEKDAY-1\": \"Wtorek\",\n\t\"WEEKDAY-2\": \"Środa\",\n\t\"WEEKDAY-3\": \"Czwartek\",\n\t\"WEEKDAY-4\": \"Piątek\",\n\t\"WEEKDAY-5\": \"Sobota\",\n\t\"WEEKDAY-6\": \"Niedziela\",\n\tClosed: \"Zamknięte\",\n\t\"Opening Hours\": \"Godziny otwarcia\",\n\t\"Delivery Hours\": \"Godziny dostawy\",\n\tFeedback: \"Zostaw opinię\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Algo correu mal! Por favor, tente novamente mais tarde.\",\n\tFIELD_REQUIRED: \"Este campo é obrigatório\",\n\t\"Unsupported country code\": \"Código de país não suportado\",\n\t\"Invalid OTP\": \"Código de confirmação inválido\",\n\tINVALID_OTP: \"Código de confirmação inválido\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Excedeu o limite de códigos. Por favor, tente novamente mais tarde.\",\n\t\"Invalid Email Address\": \"Endereço de e-mail inválido\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Esta funcionalidade não está disponível no seu plano.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Este tipo de pedido não está disponível para este estabelecimento.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Este tipo de pedido não está disponível de momento.\",\n\tCOUNTRY_REQUIRED: \"O país é obrigatório.\",\n\tCITY_REQUIRED: \"A cidade é obrigatória.\",\n\tSTREET_REQUIRED: \"A rua é obrigatória.\",\n\tSTREET_NUMBER_REQUIRED: \"O número da porta é obrigatório.\",\n\tOUT_OF_DELIVERY_RANGE: \"Este estabelecimento não faz entregas para a sua morada.\",\n\tNO_ORDER_TYPE: \"Por favor, selecione um tipo de pedido.\",\n\tINVALID_ADDRESS: \"Morada inválida\",\n};\n","export default {\n\tSave: \"Guardar\",\n\tCancel: \"Cancelar\",\n\tContinue: \"Continuar\",\n};\n","export default {\n\t\"View order\": \"Ver pedido\",\n\t\"Remove from order\": \"Remover do pedido\",\n\t\"Update order\": \"Atualizar pedido\",\n\t\"Add to order\": \"Adicionar ao pedido\",\n\tAdd: \"Adicionar\",\n\t\"Your order\": \"O seu pedido\",\n\tSubtotal: \"Subtotal\",\n\t\"Empty order\": \"Pedido vazio\",\n\t\"You don't have any items in your order\": \"Ainda não tem itens no seu pedido\",\n\t\"Add items\": \"Adicionar itens\",\n\t\"Add an order note\": \"Adicionar nota ao pedido\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Indique alergias, pedidos especiais ou ingredientes que queira adicionar ou retirar.\",\n\t\"Your Order is Completed!\": \"O seu pedido está concluído!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Obrigado! Recebemos o seu pedido e será entregue em breve.\",\n\tDelivery: \"Entrega\",\n\t\"Dine in\": \"No local\",\n\tPickup: \"Takeaway\",\n\tCash: \"Dinheiro\",\n\t\"POS Terminal\": \"Multibanco\",\n\t\"Order summary\": \"Resumo do pedido\",\n\tItems: \"Itens\",\n\tTax: \"Impostos\",\n\tTotal: \"Total\",\n\t\"Special instructions, allergies, etc.\": \"Instruções especiais, alergias, etc.\",\n\t\"Place order\": \"Confirmar pedido\",\n\tContinue: \"Continuar\",\n\t\"Not available\": \"Indisponível\",\n\t\"In order\": \"No pedido\",\n\t\"Product choices\": \"Opções do produto\",\n\t\"Track order\": \"Acompanhar pedido\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"O valor mínimo para entrega é {{amount}}\",\n\t\"This field is required\": \"Este campo é obrigatório\",\n\t\"Please select a table\": \"Por favor, selecione uma mesa\",\n\t\"Please enter an address\": \"Por favor, introduza uma morada\",\n\t\"Please choose product\": \"Por favor, escolha o produto\",\n\tTable: \"Mesa\",\n\t\"Select Table\": \"Selecionar mesa\",\n\tCard: \"Cartão\",\n\t\"Closed Now\": \"Fechado agora\",\n\t\"Delivery Fee\": \"Taxa de entrega\",\n\t\"Play video\": \"Ver vídeo\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Desconto\",\n\t\"Discount ({{rate}}%)\": \"Desconto ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Taxa de serviço ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Endereço não definido\",\n\t\"No address available\": \"Sem endereço disponível\",\n\t\"Update Delivery Address\": \"Atualizar endereço de entrega\",\n\tCountry: \"País\",\n\tCity: \"Cidade\",\n\t\"Baker Street\": \"Rua da Liberdade\",\n\tAddress: \"Morada\",\n\t\"House number\": \"Número da porta\",\n\t\"Additional number\": \"Andar / Apartamento\",\n\t\"Example: Door code is 555\": \"Exemplo: Código da porta é 555\",\n\t\"Delivery Instructions\": \"Instruções de entrega\",\n\tFloor: \"Piso\",\n\t\"Enter address\": \"Introduzir morada\",\n\t\"House No.\": \"Nº da porta\",\n};\n","export default {\n\t\"Create an account or log in\": \"Crie a sua conta ou entre\",\n\t\"Phone number\": \"Número de telemóvel\",\n\t\"I don't have an email\": \"Não tenho e-mail\",\n\t\"We sent a confirmation code to {{address}}\": \"Enviámos um código de confirmação para {{address}}\",\n};\n","export default {\n\tEvents: \"Eventos\",\n\t\"Scrolled to Category\": \"Navegou até à categoria\",\n\t\"Category Selected\": \"Categoria selecionada\",\n\t\"Product Details\": \"Detalhes do produto\",\n\t\"Product Added to Order\": \"Produto adicionado ao pedido\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Segunda-feira\",\n\t\"WEEKDAY-1\": \"Terça-feira\",\n\t\"WEEKDAY-2\": \"Quarta-feira\",\n\t\"WEEKDAY-3\": \"Quinta-feira\",\n\t\"WEEKDAY-4\": \"Sexta-feira\",\n\t\"WEEKDAY-5\": \"Sábado\",\n\t\"WEEKDAY-6\": \"Domingo\",\n\tClosed: \"Fechado\",\n\t\"Opening Hours\": \"Horário de funcionamento\",\n\t\"Delivery Hours\": \"Horário de entrega\",\n\tFeedback: \"Dar opinião\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Nešto je pošlo po zlu! Molimo pokušajte ponovno.\",\n\tFIELD_REQUIRED: \"Ovo polje je obavezno\",\n\t\"Unsupported country code\": \"Nepodržani pozivni broj zemlje\",\n\t\"Invalid OTP\": \"Nevažeći kod\",\n\tINVALID_OTP: \"Nevažeći kod\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Previše pokušaja. Molimo pričekajte malo i pokušajte ponovno.\",\n\t\"Invalid Email Address\": \"Nevažeća adresa epošte\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Ova značajka nije dostupna u vašem planu.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Ova vrsta narudžbe trenutno nije omogućena.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Ova vrsta narudžbe trenutno nije dostupna.\",\n\tCOUNTRY_REQUIRED: \"Država je obavezna.\",\n\tCITY_REQUIRED: \"Grad je obavezan.\",\n\tSTREET_REQUIRED: \"Ulica je obavezna.\",\n\tSTREET_NUMBER_REQUIRED: \"Kućni broj je obavezan.\",\n\tOUT_OF_DELIVERY_RANGE: \"Nažalost, nismo u mogućnosti dostaviti na vašu adresu.\",\n\tNO_ORDER_TYPE: \"Molimo odaberite vrstu narudžbe.\",\n\tINVALID_ADDRESS: \"Nevažeća adresa\",\n};\n","export default {\n\tSave: \"Spremi\",\n\tCancel: \"Odustani\",\n\tContinue: \"Nastavi\",\n};\n","export default {\n\t\"View order\": \"Pregled narudžbe\",\n\t\"Remove from order\": \"Ukloni iz narudžbe\",\n\t\"Update order\": \"Ažuriraj narudžbu\",\n\t\"Add to order\": \"Dodaj u narudžbu\",\n\tAdd: \"Dodaj\",\n\t\"Your order\": \"Vaša narudžba\",\n\tSubtotal: \"Međuzbroj\",\n\t\"Empty order\": \"Prazna narudžba\",\n\t\"You don't have any items in your order\": \"Vaša narudžba je prazna\",\n\t\"Add items\": \"Dodajte stavke\",\n\t\"Add an order note\": \"Dodaj napomenu\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\": \"Navedite alergije, posebne želje ili sastojke koje želite dodati ili izbaciti\",\n\t\"Your Order is Completed!\": \"Vaša narudžba je dovršena!\",\n\t\"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.\",\n\tDelivery: \"Dostava\",\n\t\"Dine in\": \"Za stolom\",\n\tPickup: \"Preuzimanje\",\n\tCash: \"Gotovina\",\n\t\"POS Terminal\": \"Kartica (POS)\",\n\t\"Order summary\": \"Sažetak narudžbe\",\n\tItems: \"Stavke\",\n\tTax: \"Porez\",\n\tTotal: \"Ukupno\",\n\t\"Special instructions, allergies, etc.\": \"Posebne upute, alergije itd.\",\n\t\"Place order\": \"Naruči\",\n\tContinue: \"Nastavi\",\n\t\"Not available\": \"Nije dostupno\",\n\t\"In order\": \"U narudžbi\",\n\t\"Product choices\": \"Opcije proizvoda\",\n\t\"Track order\": \"Prati narudžbu\",\n\t\"Minimum order amount for delivery is {{amount}}\": \"Minimalni iznos za dostavu je {{amount}}\",\n\t\"This field is required\": \"Ovo polje je obavezno\",\n\t\"Please select a table\": \"Molimo odaberite stol\",\n\t\"Please enter an address\": \"Molimo unesite adresu\",\n\t\"Please choose product\": \"Molimo odaberite proizvod\",\n\tTable: \"Stol\",\n\t\"Select Table\": \"Odaberi stol\",\n\tCard: \"Kartica\",\n\t\"Closed Now\": \"Trenutno zatvoreno\",\n\t\"Delivery Fee\": \"Naknada za dostavu\",\n\t\"Play video\": \"Pogledaj video\",\n\t\" / kg\": \" / kg\",\n\t\" / l\": \" / l\",\n\tDiscount: \"Popust\",\n\t\"Discount ({{rate}}%)\": \"Popust ({{rate}}%)\",\n\t\"Service Fee ({{rate}}%)\": \"Naknada za uslugu ({{rate}}%)\",\n};\n","export default {\n\t\"Unknown address\": \"Nepoznata adresa\",\n\t\"No address available\": \"Adresa nije dostupna\",\n\t\"Update Delivery Address\": \"Ažurirajte adresu dostave\",\n\tCountry: \"Država\",\n\tCity: \"Grad\",\n\t\"Baker Street\": \"Ulica\",\n\tAddress: \"Adresa\",\n\t\"House number\": \"Kućni broj\",\n\t\"Additional number\": \"Dodatni broj / Stan\",\n\t\"Example: Door code is 555\": \"Primjer: Kod za vrata je 555\",\n\t\"Delivery Instructions\": \"Upute za dostavu\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Unesite adresu\",\n\t\"House No.\": \"Kućni br.\",\n};\n","export default {\n\t\"Create an account or log in\": \"Izradite račun ili se prijavite\",\n\t\"Phone number\": \"Broj telefona\",\n\t\"I don't have an email\": \"Nemam e-poštu\",\n\t\"We sent a confirmation code to {{address}}\": \"Poslali smo potvrdni kod na {{address}}\",\n};\n","export default {\n\tEvents: \"Događaji\",\n\t\"Scrolled to Category\": \"Pomaknuto do kategorije\",\n\t\"Category Selected\": \"Odabrana kategorija\",\n\t\"Product Details\": \"Detalji proizvoda\",\n\t\"Product Added to Order\": \"Proizvod dodan u narudžbu\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Ponedjeljak\",\n\t\"WEEKDAY-1\": \"Utorak\",\n\t\"WEEKDAY-2\": \"Srijeda\",\n\t\"WEEKDAY-3\": \"Četvrtak\",\n\t\"WEEKDAY-4\": \"Petak\",\n\t\"WEEKDAY-5\": \"Subota\",\n\t\"WEEKDAY-6\": \"Nedjelja\",\n\tClosed: \"Zatvoreno\",\n\t\"Opening Hours\": \"Radno vrijeme\",\n\t\"Delivery Hours\": \"Vrijeme dostave\",\n\tFeedback: \"Povratne informacije\",\n};\n","import { SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport * as businessConstants from \"src/modules/business/constants\";\n\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale)\n\t\t\t? locale\n\t\t\t: businessConstants.DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst language = businessHooks.useLanguage();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n\tMessageHeartSquare,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./HeaderLinks.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst HeaderLinks = () => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\tconst { phone, wifiPassword, whatsApp, telegram, openingHours, deliveryHours } =\n\t\tbranchHooks.useSelectedBranch();\n\tconst { instagram, tiktok, facebook, username } = businessHooks.useBusiness();\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\tconst isDGKMenu = username === \"dgkmenu\";\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.links}>\n\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!whatsApp && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsApp}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{isDGKMenu && (\n\t\t\t\t\t\t\t<Tooltip hint={t(\"Feedback\")}>\n\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\ticon={MessageHeartSquare}\n\t\t\t\t\t\t\t\t\thref=\"https://docs.google.com/forms/d/1c9YQQzHgfnZn72nMKqXf0lzxzhPPGMR1FdWKk0YLbps/viewform\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Row>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default HeaderLinks;\n","import { Column, Flex, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BackIcon from \"src/components/BackIcon\";\nimport Languages from \"../Languages\";\nimport HeaderLinks from \"./HeaderLinks\";\n\nconst BranchHeader = () => {\n\tconst { coverPhoto, avatar256 } = businessHooks.useBusiness();\n\tconst venueName = branchHooks.useVenueName();\n\tconst address = branchHooks.useBranchAddress();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst { latitude, longitude } = branchHooks.useBranchCoordinates();\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={venueName}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tfullWidth\n\t\t\t\t\tgap={0}\n\t\t\t\t>\n\t\t\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t\t\t<Flex.Item>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\t\t\theight={96}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\t\t\t\tvariant=\"h1\"\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{venueName}\n\t\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t</Flex>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t<HeaderLinks />\n\t\t</div>\n\t);\n};\nexport default BranchHeader;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BusinessHeader from \"./BusinessHeader\";\nimport BranchHeader from \"./BranchHeader\";\n\nconst Header = () => {\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\n\tif (hasSingleBranch || !isEmpty(selectedBranch)) return <BranchHeader />;\n\n\treturn <BusinessHeader />;\n};\nexport default Header;\n","import { useMemo } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n\nexport const useCustomerEmail = (): string => {\n\tconst { customer } = useOrderContext();\n\n\treturn useMemo(() => customer?.email, [customer?.email]);\n};\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string,\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface LocalizedContent {\n\tname: string;\n\tdescription: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\t/** Net price (tax-exclusive) — server-of-record value. */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus any branch taxes flagged\n\t * `addToListingPrice`. Equals `price` when no branch context is supplied.\n\t */\n\tlistingPrice: number;\n\t/** Title keyed by language code, e.g. { en: \"Large\", az: \"Böyük\" }. */\n\ttitle: Record<string, string>;\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\t/** Net price (tax-exclusive). Nullable when the product has no own price (variant-only). */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus any branch taxes flagged\n\t * `addToListingPrice`. Equals `price` when no branch context is supplied,\n\t * and is null when `price` itself is null.\n\t */\n\tlistingPrice?: number | null;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: Record<string, LocalizedContent>;\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n\tvideoUrl?: string;\n\tsellUnitType?: SellUnitType;\n\ttaxClassId?: number | null;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n\nexport enum SellUnitType {\n\tPIECE = \"PIECE\",\n\tWEIGHT = \"WEIGHT\",\n\tVOLUME = \"VOLUME\",\n}\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { generateOrderItemsId, getOrderItemListingRawPrice } from \"./utils\";\n\nimport {\n\tOrder,\n\tOrderItem,\n\tOrderItems,\n\tOrderPayload,\n\tOrderStep,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nexport const useOrderTotalRawPriceWithTax = (): number => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst totalPriceWithTax = Object.values((orderItems || {}) as OrderItems).reduce(\n\t\t(sum, item) => sum + getOrderItemListingRawPrice(item),\n\t\t0,\n\t);\n\n\treturn totalPriceWithTax;\n};\n\nexport const useOrderTotalPriceWithTax = (): string => {\n\tconst totalPriceWithTax = useOrderTotalRawPriceWithTax();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\treturn priceFormatter(totalPriceWithTax, currency, language);\n};\n\nconst usePrepareOrderItems = (): OrderItem[] => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst values = Object.values(orderItems || {});\n\n\tconst items: OrderItem[] = values.map(\n\t\t({ productId, quantity, variant, addons, note, sellUnitType }) => {\n\t\t\treturn {\n\t\t\t\tproductId,\n\t\t\t\tquantity,\n\t\t\t\tvariant,\n\t\t\t\taddons,\n\t\t\t\tnote,\n\t\t\t\tsellUnitType,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn items;\n};\n\n// Pricing is intentionally absent from the payload — the server resolves\n// line/total/tax/fee math from product/variant/option records and branch\n// settings on every create. The FE never sends prices.\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst businessId = businessHooks.useBusinessId();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst language = businessHooks.useLanguage();\n\n\tconst { order } = useOrderContext();\n\tconst items = usePrepareOrderItems();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\n\tconst { workingDayId, tableId, employeeId, orderType, preferredPaymentMethod, note } = {\n\t\t...order,\n\t\t...existingOrderData,\n\t};\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\tlanguage,\n\t\titems,\n\t\tpreferredPaymentMethod,\n\t\tnote,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\t// If item quantity has decimal places, accept it as quantity 1\n\treturn Object.values((orderItems || {}) as OrderItems).reduce((sum, item) => {\n\t\tconst newValue =\n\t\t\titem.sellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\t\titem.sellUnitType === productModels.SellUnitType.VOLUME\n\t\t\t\t? 1\n\t\t\t\t: item.quantity;\n\t\treturn sum + newValue;\n\t}, 0);\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId,\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst totalPriceWithTax = useOrderTotalRawPriceWithTax();\n\n\tif (totalPriceWithTax < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage?: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\t// Ensure updates happen after render, not during render\n\tconst handleOTPChange = (otp: string) => {\n\t\t// OTP codes are uppercase alphanumeric (A-Z, 0-9); normalize case so\n\t\t// lowercase entry still matches the server-issued code.\n\t\tconst normalizedOTP = otp?.toUpperCase?.();\n\t\tqueueMicrotask(() => {\n\t\t\tonChange(normalizedOTP);\n\t\t});\n\t};\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", { address })}\n\t\t\t</Text>\n\n\t\t\t<OTPInput\n\t\t\t\tonChangeOTP={handleOTPChange}\n\t\t\t\terrorMessage={errorMessage ? tError(errorMessage) : undefined}\n\t\t\t\tinputMode=\"text\"\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nexport default OTPStep;\n","import { Column, FormErrors, Input, InputType, onChangeEventType } from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as viewHooks, utils as viewUtils } from \"src/modules/view\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n}\n\nconst EmailStep = ({ formErrors, onChange }: Props) => {\n\tconst [email, setEmail] = useState(\"\");\n\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst hostname = viewHooks.useHostname();\n\tconst language = businessHooks.useLanguage();\n\tconst { url: baseUrl } = viewUtils.getBaseUrl(hostname, language);\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange],\n\t);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels, hooks as branchHooks } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tconst isDeliveryEnabled = branchHooks.useIsDeliveryEnabled();\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t{isDeliveryEnabled && <HoursList title=\"Delivery Hours\" days={deliveryDays} />}\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import { ReactNode } from \"react\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\ninterface Props {\n\tchildren: ReactNode;\n\tid: number;\n}\n\nconst BranchCardParent = ({ children, id }: Props) => {\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\tconst businessUrl = businessHooks.useBusinessUrl();\n\n\tif (onBranchSelect) {\n\t\treturn (\n\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<a href={`${businessUrl}/${id}`} className={styles.item}>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\nexport default BranchCardParent;\n","import { classNames } from \"@sorocraft/js-utils\";\nimport { Column, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BranchCardParent from \"./Parent\";\n\ninterface Props {\n\tbranch: branchModels.Branch;\n}\n\nconst BranchCard = ({ branch }: Props) => {\n\tconst { id, address, coverPhoto, name } = branch || {};\n\tconst business = businessHooks.useBusiness();\n\tconst venueName = `${business.name} ${name}`;\n\n\treturn (\n\t\t<BranchCardParent id={id}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{coverPhoto && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tfullHeight\n\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\tgap={0.5}\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tvariant=\"h2\"\n\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{venueName}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t</BranchCardParent>\n\t);\n};\nexport default BranchCard;\n","import { Container } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BranchCard from \"./BranchCard\";\n\nconst Branches = () => {\n\tconst branches = branchHooks.useList();\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.container}>\n\t\t\t\t{branches.map((branch) => (\n\t\t\t\t\t<BranchCard key={branch.id} branch={branch} />\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Product, ProductVariant } from \"../models\";\nimport { MenuAddonOption } from \"src/models\";\n\nexport const getUnitListingPrice = (item: {\n\tprice?: number | null;\n\tlistingPrice?: number | null;\n}) => item?.listingPrice ?? item?.price ?? 0;\n\nexport const getProductListingPrice = (product: Product, currency: string, language: string) => {\n\tconst listingPrice = getUnitListingPrice(product);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n\nexport const getVariantListingPrice = (\n\tvariant: ProductVariant,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst listingPrice = getUnitListingPrice(variant);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n\nexport const getOptionListingPrice = (\n\toption: MenuAddonOption,\n\tcurrency: string,\n\tlanguage: string,\n) => {\n\tconst listingPrice = getUnitListingPrice(option);\n\treturn priceFormatter(listingPrice, currency, language);\n};\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\t/** Net price (tax-exclusive) — server-of-record value. */\n\tprice: number;\n\t/**\n\t * Gross price for menu display: net price plus the parent product's\n\t * `addToListingPrice` taxes. Equals `price` when no branch context is\n\t * supplied (e.g. addon detached from a branch tax setup).\n\t */\n\tlistingPrice: number;\n\ttitle: Record<string, string>;\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n\ttitle: Record<string, string>;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { MenuAddonSelectType } from \"src/modules/addon/models\";\nimport * as orderModels from \"src/modules/order/models\";\n\nimport { Product } from \"../models\";\nimport { getUnitListingPrice } from \"./listing-price\";\n\nexport const getAllSelectedOptionsListingPrice = (\n\tproduct: Pick<Product, \"addons\">,\n\tselectedAddons: orderModels.SelectedAddons = {},\n): number => {\n\tlet total = 0;\n\n\tfor (const addon of product?.addons || []) {\n\t\tconst { id: addonId, selectType, options } = addon;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(selectedAddons, addonId)) continue;\n\n\t\tconst selection = selectedAddons[addonId];\n\t\tconst selectedOptionIds =\n\t\t\tselectType === MenuAddonSelectType.SINGLE\n\t\t\t\t? [selection as number]\n\t\t\t\t: ((selection || []) as number[]);\n\n\t\tfor (const optionId of selectedOptionIds) {\n\t\t\tconst option = (options || []).find(({ id }) => id === optionId);\n\t\t\tif (option) total += getUnitListingPrice(option);\n\t\t}\n\t}\n\n\treturn total;\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tquantity,\n\tlanguage,\n\tcurrency,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproduct: Product;\n\tquantity: number;\n\tlanguage: string;\n\tcurrency: string;\n\tvariantId?: number;\n\tselectedAddons?: Record<number, number | number[]>;\n}) => {\n\tif (!product || Object.keys(product).length === 0) {\n\t\treturn priceFormatter(0, currency, language);\n\t}\n\n\tconst variant = variantId\n\t\t? (product.variants || []).find(({ id }) => id === variantId)\n\t\t: undefined;\n\n\tconst baseUnitPrice = variantId ? getUnitListingPrice(variant) : getUnitListingPrice(product);\n\tconst optionsUnitPrice = getAllSelectedOptionsListingPrice(product, selectedAddons);\n\n\tconst totalPrice = (baseUnitPrice + optionsUnitPrice) * quantity;\n\n\treturn priceFormatter(totalPrice, currency, language);\n};\n","import { LocalizedContent, Product, ProductVariant, SellUnitType } from \"./models\";\n\nimport { MenuAddon } from \"src/modules/addon/models\";\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string,\n): LocalizedContent => {\n\treturn product?.translations?.[language] || ({} as LocalizedContent);\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number,\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getProductVariantTranslation = (variant: ProductVariant, language: string): string => {\n\treturn variant?.title?.[language] || \"\";\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n\nexport const getPriceSuffix = (sellUnitType: SellUnitType) => {\n\tswitch (sellUnitType) {\n\t\tcase SellUnitType.WEIGHT:\n\t\t\treturn \" / kg\";\n\t\tcase SellUnitType.VOLUME:\n\t\t\treturn \" / l\";\n\n\t\tdefault:\n\t\t\treturn \"\";\n\t}\n};\n\nexport const getProductSellUnitShortCuts = (sellUnitType: SellUnitType) => {\n\tswitch (sellUnitType) {\n\t\tcase SellUnitType.WEIGHT:\n\t\t\treturn {\n\t\t\t\t\"50gr\": 0.05,\n\t\t\t\t\"100gr\": 0.1,\n\t\t\t\t\"150gr\": 0.15,\n\t\t\t\t\"200gr\": 0.2,\n\t\t\t\t\"250gr\": 0.25,\n\t\t\t\t\"300gr\": 0.3,\n\t\t\t\t\"350gr\": 0.35,\n\t\t\t\t\"400gr\": 0.4,\n\t\t\t\t\"450gr\": 0.45,\n\t\t\t\t\"500gr\": 0.5,\n\t\t\t\t\"600gr\": 0.6,\n\t\t\t\t\"700gr\": 0.7,\n\t\t\t\t\"750gr\": 0.75,\n\t\t\t\t\"800gr\": 0.8,\n\t\t\t\t\"850gr\": 0.85,\n\t\t\t\t\"900gr\": 0.9,\n\t\t\t\t\"950gr\": 0.95,\n\t\t\t\t\"1kg\": 1,\n\t\t\t\t\"2kg\": 2,\n\t\t\t\t\"5kg\": 5,\n\t\t\t\t\"10kg\": 10,\n\t\t\t\t\"20kg\": 20,\n\t\t\t};\n\t\tcase SellUnitType.VOLUME:\n\t\t\treturn {\n\t\t\t\t\"50ml\": 0.05,\n\t\t\t\t\"100ml\": 0.1,\n\t\t\t\t\"150ml\": 0.15,\n\t\t\t\t\"200ml\": 0.2,\n\t\t\t\t\"250ml\": 0.25,\n\t\t\t\t\"300ml\": 0.3,\n\t\t\t\t\"350ml\": 0.35,\n\t\t\t\t\"400ml\": 0.4,\n\t\t\t\t\"450ml\": 0.45,\n\t\t\t\t\"500ml\": 0.5,\n\t\t\t\t\"600ml\": 0.6,\n\t\t\t\t\"700ml\": 0.7,\n\t\t\t\t\"750ml\": 0.75,\n\t\t\t\t\"800ml\": 0.8,\n\t\t\t\t\"850ml\": 0.85,\n\t\t\t\t\"900ml\": 0.9,\n\t\t\t\t\"950ml\": 0.95,\n\t\t\t\t\"1l\": 1,\n\t\t\t\t\"2l\": 2,\n\t\t\t\t\"5l\": 5,\n\t\t\t\t\"10l\": 10,\n\t\t\t\t\"20l\": 20,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {};\n\t}\n};\n\nexport * from \"./utils/listing-price\";\nexport * from \"./utils/order-price\";\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\nimport { useStoreContext } from \"src/store\";\n\nimport { Product } from \"./models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n\nexport const useList = (): Product[] => {\n\tconst { products } = useStoreContext();\n\n\treturn products || [];\n};\n\nexport const useProductById = (productId: number): Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as Product;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Category, CategoryTranslation } from \"./models\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Categories.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef} paddingInline={1}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available, sellUnitType, variants, addons } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\tconst formattedTotalPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst { t } = useTranslation(\"order\");\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\n\tconst canAddToOrder = addToOrderEnabled && available;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif (shouldOpenProductDetails && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <div className={styles.volume}>{volume}</div>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{canAddToOrder && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { SellUnitType } from \"src/modules/product/models\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tbackgroundColor,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available, sellUnitType, variants, addons } =\n\t\tproduct || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\tconst productPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\n\tconst canAddToOrder = addToOrderEnabled && available;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === SellUnitType.WEIGHT ||\n\t\tsellUnitType === SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif (shouldOpenProductDetails && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t\thasBackgroundColor: !image && Boolean(backgroundColor),\n\t\t\t\t\tisDashboard,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t\tstyle={{ backgroundColor }}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{productPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{canAddToOrder && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport {\n\tColumn,\n\tDivElementMap,\n\tIconButton,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List, PlaySquare } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { utils as categoryUtils } from \"src/modules/category\";\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as videoHooks } from \"src/modules/video\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [view, setView] = useState<productModels.ProductView>(productModels.ProductView.LIST);\n\t\tconst { setModal } = useModalContext();\n\t\tconst firstVideoUrl = videoHooks.useFirstVideoUrl();\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: productModels.ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: productModels.ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: productModels.ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: productModels.Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetModal({ id: viewConstants.MODALS.PRODUCT_DETAILS, params: { product } });\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t},\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t\t{!isEmpty(firstVideoUrl) && (\n\t\t\t\t\t\t<a href={firstVideoUrl}>\n\t\t\t\t\t\t\t<IconButton icon={PlaySquare} onClick={() => {}} type={UIElementType.DEFAULT} />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === productModels.ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t},\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { useEffect, useRef } from \"react\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { SVGIcon, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderFAB.module.scss\";\n\ninterface Props {\n\ttotalCount: number;\n\tisVisible: boolean;\n\tisInPublicMenu?: boolean;\n\tonClick?: () => void;\n}\n\nconst OrderFAB = ({ totalCount, isVisible, onClick, isInPublicMenu = false }: Props) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst mountedRef = useRef<boolean>(false);\n\t// if total count has decimal places, show it as it is\n\tconst formattedTotalCount = totalCount % 1 === 0 ? totalCount : totalCount.toFixed(2);\n\n\tuseEffect(() => {\n\t\tif (!mountedRef.current) return;\n\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\tuseEffect(() => {\n\t\tmountedRef.current = true;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisVisible,\n\t\t\t\tisInPublicMenu,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t<SVGIcon icon={ShoppingBag} color={UIElementType.DEFAULT} size=\"md\" />\n\t\t\t<div className={styles.count}>{formattedTotalCount}</div>\n\t\t</div>\n\t);\n};\nexport default OrderFAB;\n","import { hooks as orderHooks } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderFAB from \"./OrderFAB\";\n\ninterface Props {\n\talwaysVisible?: boolean;\n\tisInPublicMenu?: boolean;\n}\n\nconst POSOrderFAB = ({ alwaysVisible = false, isInPublicMenu = false }: Props) => {\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { setIsOrderOpen, isOrderOpen } = useOrderContext();\n\n\tif (totalCount <= 0 && !alwaysVisible) return null;\n\n\treturn (\n\t\t<OrderFAB\n\t\t\ttotalCount={totalCount}\n\t\t\tisVisible={!isOrderOpen}\n\t\t\tonClick={() => setIsOrderOpen(!isOrderOpen)}\n\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t/>\n\t);\n};\nexport default POSOrderFAB;\n","import { RefObject, useCallback, useEffect, useRef, useState } from \"react\";\nimport { DivElementMap } from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./MenuContent.module.scss\";\n\nimport { hooks as productHooks } from \"src/modules/product\";\nimport { hooks as categoryHooks, utils as categoryUtils } from \"src/modules/category\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as menuUtils } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport Categories from \"../Categories\";\nimport Products from \"../Products\";\nimport { OrderFABContainer } from \"../OrderFAB\";\n\ninterface Props {\n\tcontainerRef: RefObject<HTMLDivElement>;\n}\n\nconst MenuContent = ({ containerRef }: Props) => {\n\tconst products = productHooks.useList();\n\tconst categories = categoryHooks.useList();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\tconst categoryProductMap = menuUtils.prepareCategoryAndProductMap(categories, products);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst canUserScroll = useRef<boolean>(true);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = categoryUtils.getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language],\n\t);\n\n\tconst handleCategoryFromURL = useCallback(async () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Categories\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t/>\n\t\t\t<Products\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\tcontainerRef={containerRef}\n\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t/>\n\t\t\t<OrderFABContainer isInPublicMenu />\n\t\t</div>\n\t);\n};\nexport default MenuContent;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport { Category } from \"./models\";\nimport { getCategoryTranslation } from \"./utils\";\n\nexport const useList = (): Category[] => {\n\tconst { categories } = useStoreContext();\n\n\treturn categories || [];\n};\n\nexport const useCategoryNameById = (categoryId: number): string => {\n\tconst { categories } = useStoreContext() || {};\n\tconst language = businessHooks.useLanguage();\n\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","import { Column, SVGIcon, Text, UIElementType, useModalContext } from \"@sorocraft/ui\";\nimport { Eye, Plus, ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { useCallback, useEffect, useRef } from \"react\";\nimport { isNil, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Actions.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { models as videoModels } from \"src/modules/video\";\nimport { hooks as productHooks, models as productModels } from \"src/modules/product\";\nimport { hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n}\n\nconst Actions = ({ video }: Props) => {\n\tconst { setModal } = useModalContext();\n\tconst { addProduct, setIsOrderOpen } = useOrderContext();\n\tconst shoppingBagActionRef = useRef<HTMLDivElement>(null);\n\n\tconst { productId, productName } = video || {};\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst product = productHooks.useProductById(productId);\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\tconst { sellUnitType, variants, addons, available } = product;\n\tconst hasVariant = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst shouldOpenProductDetails =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME ||\n\t\thasVariant ||\n\t\thasAddons;\n\tconst canAddToOrder = addToOrderEnabled && available;\n\n\tconst openProductDetails = useCallback(() => {\n\t\tsetModal({ id: viewConstants.MODALS.PRODUCT_DETAILS, params: { product } });\n\t}, [product, setModal]);\n\n\tconst handleAddToOrder = useCallback(() => {\n\t\tif (shouldOpenProductDetails) return openProductDetails();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name: productName, quantity: 1 });\n\t}, [addProduct, openProductDetails, product, productName, shouldOpenProductDetails]);\n\n\tconst actions = [\n\t\t{\n\t\t\ticon: Eye,\n\t\t\tonClick: openProductDetails,\n\t\t},\n\t\t...(canAddToOrder\n\t\t\t? [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: Plus,\n\t\t\t\t\t\tonClick: handleAddToOrder,\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t: []),\n\t\t// {\n\t\t// \ticon: Share,\n\t\t// \tonClick: () => {},\n\t\t// },\n\t\t{\n\t\t\ticon: ShoppingBag,\n\t\t\tonClick: () => setIsOrderOpen(true),\n\t\t\tvalue: totalCount,\n\t\t\tref: shoppingBagActionRef,\n\t\t},\n\t];\n\n\t// Animation shopping bag\n\tuseEffect(() => {\n\t\tconst el = shoppingBagActionRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0.5}>\n\t\t\t{actions.map(({ icon, onClick, value, ref }, index) => (\n\t\t\t\t<Column key={index} alignItems=\"center\" gap={0.375}>\n\t\t\t\t\t<div className={styles.action} onClick={onClick} ref={ref}>\n\t\t\t\t\t\t<SVGIcon icon={icon} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{!isNil(value) && (\n\t\t\t\t\t\t<Text size=\"xs\" weight=\"bold\" color=\"white\" fullWidth align=\"center\">\n\t\t\t\t\t\t\t{value}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</Column>\n\t\t\t))}\n\t\t</Column>\n\t);\n};\nexport default Actions;\n","import { Avatar, Column, Row, Text } from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { classNames, isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./VideoData.module.scss\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { models as videoModels } from \"src/modules/video\";\nimport { hooks as menuHooks } from \"src/modules/menu\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n}\n\nconst VideoData = ({ video }: Props) => {\n\tconst [isDescriptionVisible, setIsDescriptionVisible] = useState<boolean>(false);\n\tconst menuUrl = menuHooks.useMenuUrl();\n\n\tif (isEmpty(video)) return null;\n\n\tconst { businessAvatar, businessName, productName, productDescription, productPrice } = video;\n\tconst hasAvatar = Boolean(businessAvatar);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tnoAvatar: !hasAvatar,\n\t\t\t})}\n\t\t\tgap={0.75}\n\t\t\tfullWidth={false}\n\t\t>\n\t\t\t<a className={styles.business} href={menuUrl}>\n\t\t\t\t{hasAvatar && <Avatar source={viewUtils.getImageSource(businessAvatar)} size=\"sm\" />}\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t<Text weight=\"medium\" color=\"white\" whiteSpace=\"nowrap\" className={styles.productName}>\n\t\t\t\t\t\t{productName}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width of this\n\t\t\t\t\t\tcomponent */}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text color=\"white\" whiteSpace=\"nowrap\" className={styles.businessName} weight=\"light\">\n\t\t\t\t\t\t{businessName}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width\n\t\t\t\t\t\tof this component */}\n\t\t\t\t\t</Text>\n\t\t\t\t</Column>\n\t\t\t</a>\n\t\t\t<Text color=\"white\" className={styles.price}>\n\t\t\t\t{productPrice}\n\t\t\t</Text>\n\t\t\t{Boolean(productDescription) && (\n\t\t\t\t<Row onClick={() => setIsDescriptionVisible((prev) => !prev)}>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\twhiteSpace={isDescriptionVisible ? \"wrap\" : \"nowrap\"}\n\t\t\t\t\t\tclassName={styles.description}\n\t\t\t\t\t>\n\t\t\t\t\t\t{productDescription}\n\t\t\t\t\t\t{/* Lorem ipsum dolor sit amet is the only text we can try and test the width of this\n\t\t\t\t\t\tcomponent Lorem ipsum dolor sit amet is the only text we can try and test the width of\n\t\t\t\t\t\tthis component Lorem ipsum dolor sit amet is the only text we can try and test the width\n\t\t\t\t\t\tof this component Lorem ipsum dolor sit amet is the only text we can try and test the\n\t\t\t\t\t\twidth of this component Lorem ipsum dolor sit amet is the only text we can try and test\n\t\t\t\t\t\tthe width of this component Lorem ipsum dolor sit amet is the only text we can try and\n\t\t\t\t\t\ttest the width of this component Lorem ipsum dolor sit amet is the only text we can try\n\t\t\t\t\t\tand test the width of this component Lorem ipsum dolor sit amet is the only text we can\n\t\t\t\t\t\ttry and test the width of this component Lorem ipsum dolor sit amet is the only text we\n\t\t\t\t\t\tcan try and test the width of this component Lorem ipsum dolor sit amet is the only text\n\t\t\t\t\t\twe can try and test the width of this component */}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\nexport default VideoData;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useState, useEffect } from \"react\";\nimport { Column, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { Close, Play, VolumeMax, VolumeX } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Video.module.scss\";\n\nimport { models as videoModels } from \"src/modules/video\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { hooks as menuHooks } from \"src/modules/menu\";\nimport Actions from \"./Actions\";\nimport VideoData from \"./VideoData\";\n\nexport interface Props {\n\tvideo: videoModels.Video;\n\tisActive: boolean;\n\tshouldLoad: boolean;\n\tisMuted: boolean;\n\tregisterVideo: (id: number, el: HTMLElement) => void;\n\tsetIsMuted: (isMuted: boolean) => void;\n}\n\nconst Video = ({\n\tvideo,\n\tisActive = false,\n\tshouldLoad = false,\n\tisMuted = true,\n\tregisterVideo,\n\tsetIsMuted,\n}: Props) => {\n\tconst [isPaused, setIsPaused] = useState(true);\n\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst hasPlayedRef = useRef(false);\n\n\tconst menuUrl = menuHooks.useMenuUrl();\n\tconst videoSource = viewUtils.getVideoSource(video?.videoUrl);\n\n\t/* ---- User interactions ----*/\n\tconst togglePlay = useCallback(() => {\n\t\tconst el = videoRef.current;\n\t\tif (!el) return;\n\n\t\tif (el.paused) {\n\t\t\tel.play()?.catch(() => {});\n\t\t} else {\n\t\t\tel.pause();\n\t\t}\n\t\tsetIsPaused(el.paused);\n\t}, []);\n\n\tconst toggleMute = (e: MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (!videoRef.current || !hasPlayedRef.current) return;\n\n\t\tvideoRef.current.muted = !videoRef.current.muted;\n\t\tsetIsMuted(videoRef.current.muted);\n\t};\n\n\tconst onPlay = useCallback(() => {\n\t\thasPlayedRef.current = true;\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst el = videoRef.current;\n\t\tif (!el) return;\n\n\t\t// LOAD\n\t\tif (shouldLoad && !el.src) {\n\t\t\tel.muted = true;\n\t\t\tel.playsInline = true;\n\t\t\tel.src = videoSource;\n\t\t\tel.load();\n\t\t}\n\n\t\t// PLAY when active\n\t\tif (shouldLoad && isActive) {\n\t\t\tel.play()?.catch(() => {});\n\t\t}\n\n\t\t// PAUSE when inactive\n\t\tif (!isActive && !el.paused) {\n\t\t\tel.pause();\n\t\t}\n\n\t\t// UNLOAD\n\t\tif (!shouldLoad && el.src) {\n\t\t\tel.pause();\n\t\t\tel.removeAttribute(\"src\");\n\t\t\tel.load();\n\t\t}\n\n\t\tsetIsPaused(el.paused);\n\t}, [shouldLoad, isActive, videoSource]);\n\n\tuseEffect(() => {\n\t\tif (videoRef.current && !isPaused && videoRef.current.muted !== isMuted) {\n\t\t\tvideoRef.current.muted = isMuted;\n\t\t}\n\t}, [isMuted, isPaused]);\n\n\tif (isEmpty(video)) return null;\n\n\treturn (\n\t\t<div className={styles.container} ref={(el) => registerVideo(video.productId, el)}>\n\t\t\t<div className={styles.videoContainer}>\n\t\t\t\t<video\n\t\t\t\t\tref={videoRef}\n\t\t\t\t\tclassName={styles.video}\n\t\t\t\t\tmuted\n\t\t\t\t\tautoPlay\n\t\t\t\t\tplaysInline\n\t\t\t\t\tpreload=\"none\"\n\t\t\t\t\tloop\n\t\t\t\t\tcontrolsList=\"nodownload nofullscreen noplaybackrate\"\n\t\t\t\t\tcontrols={false}\n\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\tposter={viewUtils.getImageSource(video.thumbnail)}\n\t\t\t\t\tonClick={togglePlay}\n\t\t\t\t\tonPlay={onPlay}\n\t\t\t\t></video>\n\t\t\t\t<Row className={styles.top} justifyContent=\"space-between\">\n\t\t\t\t\t<div className={styles.actionIcon} onClick={toggleMute} data-testid=\"mute-button\">\n\t\t\t\t\t\t<SVGIcon icon={isMuted ? VolumeX : VolumeMax} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t\t<a className={styles.actionIcon} href={menuUrl}>\n\t\t\t\t\t\t<SVGIcon icon={Close} size=\"md\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</a>\n\t\t\t\t</Row>\n\t\t\t\t{isPaused && (\n\t\t\t\t\t<div className={styles.play}>\n\t\t\t\t\t\t<SVGIcon icon={Play} size=\"xxxl\" color={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Row className={styles.bottom} alignItems=\"flex-end\" gap={1}>\n\t\t\t\t\t<VideoData video={video} />\n\t\t\t\t\t<Column\n\t\t\t\t\t\tclassName={styles.actions}\n\t\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\t\tfullWidth={false}\n\t\t\t\t\t\tfullHeight={false}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Actions video={video} />\n\t\t\t\t\t</Column>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default Video;\n","import { useRef, useState } from \"react\";\n\nimport styles from \"./VideoFeed.module.scss\";\n\nimport { hooks as videoHooks } from \"src/modules/video\";\n\nimport Video from \"../Video\";\n\nconst VideoFeed = () => {\n\tconst [isMuted, setIsMuted] = useState<boolean>(true);\n\tconst currentVideo = videoHooks.useCurrentVideo();\n\tconst otherVideos = videoHooks.useOtherVideosForScrolling();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst { activeId, register } = videoHooks.useActiveSnap(containerRef);\n\n\t// TODO: move this to utils\n\t// const PRELOAD_DISTANCE = 2;\n\n\t// const shouldLoad = (index: number) => {\n\t// \tif (activeIndex === null) return false;\n\t// \treturn Math.abs(index - activeIndex) <= PRELOAD_DISTANCE;\n\t// };\n\n\t// END\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.videos} tabIndex={0} ref={containerRef}>\n\t\t\t\t<Video\n\t\t\t\t\tvideo={currentVideo}\n\t\t\t\t\tregisterVideo={register}\n\t\t\t\t\tisActive={activeId === currentVideo.productId}\n\t\t\t\t\tshouldLoad\n\t\t\t\t\tsetIsMuted={setIsMuted}\n\t\t\t\t\tisMuted={isMuted}\n\t\t\t\t/>\n\t\t\t\t{otherVideos.map((video) => (\n\t\t\t\t\t<Video\n\t\t\t\t\t\tvideo={video}\n\t\t\t\t\t\tkey={video.productId}\n\t\t\t\t\t\tregisterVideo={register}\n\t\t\t\t\t\tisActive={activeId === video.productId}\n\t\t\t\t\t\tshouldLoad={activeId === video.productId}\n\t\t\t\t\t\tsetIsMuted={setIsMuted}\n\t\t\t\t\t\tisMuted={isMuted}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default VideoFeed;\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tfocusedSection?: string;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tfocusedSection,\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t\tfocused: focusedSection === \"quantity\",\n\t\t\t\t},\n\t\t\t\t[styles[size]],\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\n\t\t\t\tconst variantTitle = productUtils.getProductVariantTranslation(variant, language);\n\t\t\t\tconst variantPrice = productUtils.getVariantListingPrice(variant, currency, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={variantTitle}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{variantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { MenuAddon, MenuAddonOption } from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): string => {\n\treturn addon?.title?.[language] || \"\";\n};\n\nexport const getAddonOptionTranslation = (option: MenuAddonOption, language: string): string => {\n\treturn option?.title?.[language] || \"\";\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string,\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn (options || [])\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ title }) => title?.[language] || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = (options || []).find(({ id }) => id === optionIds);\n\t\treturn option?.title?.[language] || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.title?.[language] || \"\";\n};\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{addonTitle}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\t\t\t\t\t\t\t\tconst optionPrice = productUtils.getOptionListingPrice(option, currency, language);\n\n\t\t\t\t\t\t\t\tconst optionTitle = addonUtils.getAddonOptionTranslation(option, language);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{optionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import {\n\tButton,\n\tColumn,\n\tIconButton,\n\tModal,\n\tNumpad,\n\tRow,\n\tSVGIcon,\n\tText,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { Close, PlayCircle } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, MouseEvent, useMemo, RefObject } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tmodalRef: RefObject<HTMLDivElement>;\n\tvideoUrl?: string;\n\taddToOrderEnabled?: boolean;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tonQuantityChange?: (quantity: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tmodalRef,\n\tvideoUrl,\n\taddToOrderEnabled = true,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n\tonQuantityChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\t// PRICING\n\n\tconst productPrice = useMemo(\n\t\t() => productUtils.getProductListingPrice(product, currency, language),\n\t\t[product, currency, language],\n\t);\n\tconst priceSuffix = useMemo(() => productUtils.getPriceSuffix(product?.sellUnitType), [product]);\n\tconst productOrderPrice = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons],\n\t);\n\t// END PRICING\n\n\tconst sellingUnitShortcuts = useMemo(\n\t\t() => productUtils.getProductSellUnitShortCuts(product?.sellUnitType),\n\t\t[product],\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[modalRef, onClose],\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available, sellUnitType } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\tconst isManualQuantityNeeded =\n\t\tsellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tsellUnitType === productModels.SellUnitType.VOLUME;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t<div className={styles.media}>\n\t\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{Boolean(videoUrl) && (\n\t\t\t\t\t\t\t\t\t<a href={videoUrl} className={styles.play}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={PlayCircle} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<Text color=\"white\">{t(\"Play video\")}</Text>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t\t\t{productPrice}\n\t\t\t\t\t\t\t\t\t\t{Boolean(priceSuffix) && t(priceSuffix)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column gap={0} fullWidth className={styles.stickyBottom}>\n\t\t\t\t\t\t\t\t{isManualQuantityNeeded && (\n\t\t\t\t\t\t\t\t\t<Numpad\n\t\t\t\t\t\t\t\t\t\tonChange={onQuantityChange}\n\t\t\t\t\t\t\t\t\t\tvalue={quantity}\n\t\t\t\t\t\t\t\t\t\tshortcuts={sellingUnitShortcuts}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\taddToOrderEnabled ? (\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{productOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t) : null\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst { orderStep } = useOrderContext();\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst totalPriceWithTax = orderHooks.useOrderTotalPriceWithTax();\n\tconst inDetails = orderStep === orderModels.OrderStep.DETAILS;\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t\tinDetails,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t{!inDetails && (\n\t\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t\t{totalPriceWithTax}\n\t\t\t\t</Flex.Item>\n\t\t\t)}\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Continue\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import httpClient from \"src/services/api/client\";\n\nimport { CalculatePreviewRequest, CalculatePreviewResponse, OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload,\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn httpClient.post(\"/customer/order\", order);\n};\n\nexport const calculate = (\n\tpayload: CalculatePreviewRequest,\n\tsignal?: AbortSignal,\n): Promise<CalculatePreviewResponse> => {\n\treturn httpClient.post(\"/customer/order/calculate\", payload, { signal });\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = productHooks.useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id),\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language);\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language))\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { models as orderModels, utils as orderUtils } from \"src/modules/order\";\nimport { utils as productUtils, hooks as productHooks } from \"src/modules/product\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = productHooks.useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { image160 } = product;\n\tconst variantTitle = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\tconst itemPrice = useMemo(\n\t\t() => orderUtils.getOrderItemListingPrice(item, currency, language),\n\t\t[item, currency, language],\n\t);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{itemPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { createContext, ReactNode, useContext, useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport * as orderServices from \"./services\";\nimport { initialPreviewState } from \"./constants\";\nimport { isValidPreviewResponse } from \"./utils\";\nimport { CalculatePreviewRequest, OrderItems, OrderPreviewState } from \"./models\";\n\nconst OrderPreviewContext = createContext<OrderPreviewState>(initialPreviewState);\n\nconst buildPreviewItemsRequest = (\n\torderItems: OrderItems | undefined,\n): CalculatePreviewRequest[\"items\"] => {\n\t// OrderProvider keys orderItems by the same orderItemsId that identifies a\n\t// (product, variant, addon-selection) tuple — pass it through so the server\n\t// echoes it back and the UI can match each preview line to its cart line.\n\treturn Object.entries(orderItems || {}).map(([orderItemsId, item]) => ({\n\t\torderItemsId,\n\t\tproductId: item.productId,\n\t\tquantity: item.quantity,\n\t\t...(item.variant?.variantId ? { variant: { variantId: item.variant.variantId } } : {}),\n\t\t...(item.addons && item.addons.length > 0\n\t\t\t? {\n\t\t\t\t\taddons: item.addons.map((addon) => ({\n\t\t\t\t\t\taddonId: addon.addonId,\n\t\t\t\t\t\toptions: (addon.options || []).map((option) => ({ optionId: option.optionId })),\n\t\t\t\t\t})),\n\t\t\t\t}\n\t\t\t: {}),\n\t}));\n};\n\ntype ProviderProps = {\n\tchildren: ReactNode;\n};\n\n// Mount this once inside the drawer subtree. The effect fires `calculate`\n// exactly once per mount — i.e. once per drawer open — so cart edits while\n// the drawer is open do NOT re-trigger a fetch. Closing the drawer unmounts\n// the provider and aborts any in-flight request.\nexport const OrderPreviewProvider = ({ children }: ProviderProps) => {\n\tconst { order, orderItems } = useOrderContext();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst businessId = businessHooks.useBusinessId();\n\tconst branchId = selectedBranch?.id;\n\tconst orderType = order?.orderType;\n\n\tconst [state, setState] = useState<OrderPreviewState>(initialPreviewState);\n\n\tuseEffect(() => {\n\t\tconst items = buildPreviewItemsRequest(orderItems as OrderItems);\n\t\tif (!businessId || !branchId || !orderType || items.length === 0) {\n\t\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\t\tsetState((prev) => (prev === initialPreviewState ? prev : initialPreviewState));\n\t\t\treturn;\n\t\t}\n\n\t\tconst controller = new AbortController();\n\t\tsetState({ data: null, isLoading: true, error: null });\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst data = await orderServices.calculate(\n\t\t\t\t\t{ businessId, branchId, orderType, items },\n\t\t\t\t\tcontroller.signal,\n\t\t\t\t);\n\t\t\t\tif (controller.signal.aborted) return;\n\t\t\t\tif (!isValidPreviewResponse(data)) {\n\t\t\t\t\tsetState({\n\t\t\t\t\t\tdata: null,\n\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\terror: \"We couldn't refresh order totals. Please try again.\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetState({ data, isLoading: false, error: null });\n\t\t\t} catch (error) {\n\t\t\t\tif (controller.signal.aborted) return;\n\t\t\t\tif ((error as DOMException | undefined)?.name === \"AbortError\") return;\n\t\t\t\tsetState({\n\t\t\t\t\tdata: null,\n\t\t\t\t\tisLoading: false,\n\t\t\t\t\terror: \"We couldn't refresh order totals. Please try again.\",\n\t\t\t\t});\n\t\t\t}\n\t\t})();\n\n\t\treturn () => {\n\t\t\tcontroller.abort();\n\t\t};\n\t\t// Intentionally only re-run on mount/unmount of this provider (drawer\n\t\t// open/close). Cart edits while the drawer is open keep the original\n\t\t// preview until the drawer is reopened.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [order?.orderType]);\n\n\treturn <OrderPreviewContext.Provider value={state}>{children}</OrderPreviewContext.Provider>;\n};\n\nexport const useOrderPreview = (): OrderPreviewState => useContext(OrderPreviewContext);\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst createOrderMethod = (\n\t\t{ type, icon, title, isDisabled }: OrderTypeForMethods,\n\t\tindex: number\n\t): Method => ({\n\t\tvalue: type,\n\t\tisDisabled,\n\t\tlabel: (\n\t\t\t<Tooltip\n\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_AT_THIS_TIME\") : null}\n\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t>\n\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t<Text color={type === orderType && !isDisabled ? \"white\" : \"normal\"} whiteSpace=\"nowrap\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t</Tooltip>\n\t\t),\n\t});\n\n\tconst orderMethods: Method[] = orderTypes.reduce<Method[]>((methods, order, index) => {\n\t\tif (!order.isVisible) return methods;\n\t\tmethods.push(createOrderMethod(order, index));\n\t\treturn methods;\n\t}, []);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\tdeliveryFee: number;\n\tserviceFee: number;\n\tserviceFeePercentage: number;\n\tserviceFeeEnabled: boolean;\n\ttotalTax: number;\n\tdiscountAmount?: number;\n\tdiscountType?: string;\n\tdiscountRate?: number;\n\tcurrency: string;\n\tlanguage: string;\n\torderType: orderModels.OrderType;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax = 0,\n\ttotalPriceWithTaxAndFees = 0,\n\tdeliveryFee = 0,\n\tserviceFee = 0,\n\tserviceFeePercentage = 0,\n\tserviceFeeEnabled = false,\n\ttotalTax,\n\tdiscountAmount = 0,\n\tdiscountType,\n\tdiscountRate,\n\tcurrency,\n\tlanguage,\n\torderType,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\tconst deliveryFeeFormatted = priceFormatter(deliveryFee, currency, language);\n\tconst discountAmountFormatted = priceFormatter(discountAmount, currency, language);\n\tconst serviceFeeFormatted = priceFormatter(serviceFee, currency, language);\n\tconst totalPriceWithTaxAndFeesFormatted = priceFormatter(\n\t\ttotalPriceWithTaxAndFees,\n\t\tcurrency,\n\t\tlanguage,\n\t);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>{t(\"Delivery Fee\")}</Text>\n\t\t\t\t\t<Text size={textSize}>{deliveryFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t{serviceFeeEnabled && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>\n\t\t\t\t\t\t{t(\"Service Fee ({{rate}}%)\", { rate: String(serviceFeePercentage) })}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text size={textSize}>{serviceFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxAndFeesFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t\t{discountAmount > 0 && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize} color=\"muted\">\n\t\t\t\t\t\t{discountType === \"PERCENTAGE\"\n\t\t\t\t\t\t\t? t(\"Discount ({{rate}}%)\", { rate: String(discountRate) })\n\t\t\t\t\t\t\t: t(\"Discount\")}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Text size={textSize} weight=\"medium\" color=\"success\">\n\t\t\t\t\t\t-{discountAmountFormatted}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { BankNote, CreditCard } from \"@sorocraft/ui/icons\";\nimport { Row, SVGIcon, Text } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentMethods.module.scss\";\n\nimport {useTranslation} from \"src/hooks/translation\";\nimport {useOrderContext} from \"src/store/order\";\nimport {PaymentMethod} from \"src/modules/order/models\";\n\nconst OrderPaymentMethods = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst {\n\t\torder: { preferredPaymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\n\tconst methods = [\n\t\t{\n\t\t\ttitle: \"Card\",\n\t\t\ticon: CreditCard,\n\t\t\tvalue: PaymentMethod.CARD,\n\t\t},\n\t\t{\n\t\t\ttitle: \"Cash\",\n\t\t\ticon: BankNote,\n\t\t\tvalue: PaymentMethod.CASH,\n\t\t},\n\t];\n\treturn (\n\t\t<Row className={styles.container} fullWidth justifyContent=\"center\" gap={2}>\n\t\t\t{methods.map(({ title, icon, value }) => (\n\t\t\t\t<Row\n\t\t\t\t\tkey={value}\n\t\t\t\t\tgap={0.5}\n\t\t\t\t\tfullWidth={false}\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\tmethod: true,\n\t\t\t\t\t\tactive: value === preferredPaymentMethod,\n\t\t\t\t\t})}\n\t\t\t\t\tonClick={() => updateOrder({ preferredPaymentMethod: value })}\n\t\t\t\t>\n\t\t\t\t\t<SVGIcon icon={icon} size=\"md\" />\n\t\t\t\t\t<Text>{t(title)}</Text>\n\t\t\t\t</Row>\n\t\t\t))}\n\t\t</Row>\n\t);\n};\nexport default OrderPaymentMethods;\n","import { Accordion, Column, Padding } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { OrderPreviewProvider, useOrderPreview } from \"src/modules/order/preview\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\nimport OrderPaymentMethods from \"./OrderPaymentMethods\";\n\nconst OrderDrawerDetails = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst {\n\t\torder: { orderType },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { data: previewData } = useOrderPreview();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst {\n\t\tdeliveryOrderEnabled,\n\t\tdineInOrderEnabled,\n\t\tpickupOrderEnabled,\n\t\tdeliveryFeeAmount,\n\t\tserviceChargePercentage,\n\t\tserviceChargeEnabled,\n\t} = branchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !isDelivering,\n\t\t\tisVisible: deliveryOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: dineInOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: pickupOrderEnabled,\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<OrderPaymentMethods />\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleVariant=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={previewData?.totalPriceWithoutTax ?? 0}\n\t\t\t\ttotalPriceWithTax={previewData?.totalPriceWithTax ?? 0}\n\t\t\t\ttotalPriceWithTaxAndFees={previewData?.totalPriceWithTaxAndFees ?? 0}\n\t\t\t\ttotalTax={previewData?.totalTax ?? 0}\n\t\t\t\tdeliveryFee={previewData?.deliveryFee ?? deliveryFeeAmount}\n\t\t\t\tserviceFee={previewData?.serviceFee ?? 0}\n\t\t\t\tserviceFeePercentage={serviceChargePercentage ?? 0}\n\t\t\t\tserviceFeeEnabled={serviceChargeEnabled}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\torderType={orderType}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nconst OrderDrawerDetailsWithProvider = () => (\n\t<OrderPreviewProvider>\n\t\t<OrderDrawerDetails />\n\t</OrderPreviewProvider>\n);\n\nexport default OrderDrawerDetailsWithProvider;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { ModalProvider, ModalsMap, Text } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport { models as menuModels, hooks as menuHooks } from \"src/modules/menu\";\nimport { constants as viewConstants, hooks as viewHooks } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as videoHooks } from \"src/modules/video\";\nimport { StoreProvider } from \"src/store\";\n\nimport Header from \"./Header\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport Branches from \"./Branches\";\nimport MenuContent from \"./MenuContent\";\nimport VideoFeed from \"./Videos/VideoFeed\";\nimport ProductDetails from \"./ProductDetails\";\nimport OrderDrawer from \"./OrderDrawer\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n\t[viewConstants.MODALS.PRODUCT_DETAILS]: ProductDetails,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst branchId = branchHooks.useBranchId();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst showMenu = hasSingleBranch || branchId;\n\tconst video = videoHooks.useCurrentVideo();\n\tconst { url: baseUrl, domain } = businessHooks.useBaseUrl();\n\tconst { headerText, footerText } = menuHooks.useMenuTexts();\n\n\tuseEffect(() => {\n\t\tif (isInDashboard) return;\n\t\tgetCustomer();\n\t}, [getCustomer, isInDashboard]);\n\n\tif (!isEmpty(video)) return <VideoFeed />;\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header />\n\t\t\t{showMenu && headerText && (\n\t\t\t\t<Text fullWidth align=\"center\" className={styles.headerText}>\n\t\t\t\t\t{headerText}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t\t{showMenu ? <MenuContent containerRef={containerRef} /> : <Branches />}\n\n\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\n\t\t\t{showMenu && footerText && (\n\t\t\t\t<Text fullWidth align=\"center\" className={styles.footerText}>\n\t\t\t\t\t{footerText}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{!!domain && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data || ({} as menuModels.PublicMenuData)}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t\t<OrderDrawer />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer } = useOrderContext();\n\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState(\"\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t);\n\n\tconst steps = [customerModels.CustomerAuthStep.EMAIL, customerModels.CustomerAuthStep.OTP];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => setModal(null);\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentIndex = steps.indexOf(currentStep);\n\t\tconst nextStep = steps[currentIndex + 1];\n\t\tif (nextStep) return setCurrentStep(nextStep);\n\t\tcompleteAuth();\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: keyof customerModels.CustomerAuthForm) => (value: string) => {\n\t\t\tsetForm((prev) => ({ ...prev, [field]: value }));\n\t\t},\n\t\t[],\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\n\t\ttry {\n\t\t\t// Validate form\n\t\t\tconst errors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.email);\n\t\t\t\t\tif (!response?.accessToken) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.email);\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error: any) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP:\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.email}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <EmailStep onChange={handleChange(\"email\")} formErrors={formErrors} />;\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\n\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [isHouseNumberEmpty, setIsHouseNumberEmpty] = useState<boolean>(false);\n\n\tconst adressError = formErrors.countryCode || formErrors.cityName || formErrors.street;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined,\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => {\n\t\t\tconst updated = {\n\t\t\t\t...currentForm,\n\t\t\t\t[name]: value,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updated);\n\t\t\tsetFormErrors(errors);\n\n\t\t\treturn updated;\n\t\t});\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber || \"\",\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t\tsetIsHouseNumberEmpty(!suggestion.houseNumber);\n\t\t},\n\t\t[form],\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t{isHouseNumberEmpty && (\n\t\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tname=\"houseNumber\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"House No.\")}\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"221B\"\n\t\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\t\tvalue={form.houseNumber}\n\t\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.houseNumber)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\nimport { ModalComponentProps } from \"@sorocraft/ui\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as videoHooks } from \"src/modules/video\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\n// Product modal\nconst ProductDetails = ({ params }: ModalComponentProps) => {\n\tconst { product = {}, modalRef, closeModal } = params;\n\tconst DEFAULT_QUANTITY =\n\t\tproduct?.sellUnitType === productModels.SellUnitType.WEIGHT ||\n\t\tproduct?.sellUnitType === productModels.SellUnitType.VOLUME\n\t\t\t? 0\n\t\t\t: 1;\n\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { addToOrderEnabled } = branchHooks.useBranchSettings();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(DEFAULT_QUANTITY);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id,\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language],\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity],\n\t);\n\n\tconst videoUrl = videoHooks.useVideoUrl(product?.id);\n\tconst hasVideo = Boolean(product.videoUrl);\n\n\tuseEffect(() => {\n\t\tconst initQuantity = async () => {\n\t\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : DEFAULT_QUANTITY);\n\t\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t\t};\n\n\t\tinitQuantity();\n\t}, [productQuantityInOrder, product, DEFAULT_QUANTITY]);\n\n\tuseEffect(() => {\n\t\tconst resetProductDetails = async () => {\n\t\t\tsetSelectedVariant(null);\n\t\t\tsetSelectedAddons({});\n\t\t};\n\n\t\tresetProductDetails();\n\t}, [product]);\n\n\tconst handleSetFocusedSection = useCallback((section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t}, []);\n\n\tconst handleSubmit = useCallback(() => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\t\tif (quantity <= 0) return handleSetFocusedSection(\"quantity\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tcloseModal?.();\n\t}, [\n\t\taddProduct,\n\t\tcloseModal,\n\t\thandleSetFocusedSection,\n\t\tisUpdate,\n\t\tname,\n\t\tproduct,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tselectedVariant,\n\t\tupdateProduct,\n\t]);\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled],\n\t);\n\n\tconst handleOptionSelect = useCallback(\n\t\t({\n\t\t\taddonId,\n\t\t\toptionId,\n\t\t\tisSingle,\n\t\t\tisRemove = false,\n\t\t}: {\n\t\t\taddonId: number;\n\t\t\toptionId: number;\n\t\t\tisSingle: boolean;\n\t\t\tisRemove?: boolean;\n\t\t}) => {\n\t\t\tsetSelectedAddons((prevForm) => {\n\t\t\t\t// For single selection, directly replace the value\n\t\t\t\tif (isSingle) {\n\t\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t\t}\n\n\t\t\t\t// Handle multiple selection\n\t\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\t\tconst updatedSelection = isRemove\n\t\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\t\treturn {\n\t\t\t\t\t...prevForm,\n\t\t\t\t\t[addonId]: updatedSelection,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tmodalRef={modalRef}\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tvideoUrl={hasVideo ? videoUrl : undefined}\n\t\t\taddToOrderEnabled={addToOrderEnabled}\n\t\t\tonClose={closeModal}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tonQuantityChange={(newQuentity) => setQuantity(newQuentity)}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n"],"names":["MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","DOMAIN","DEFAULT_HOSTNAME","IMAGE_BASE_URL","storage","Storage","getBaseUrl","hostname","language","locale","url","domain","getImageSource","image","includes","startsWith","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","adjustLightness","hex","deltaPct","n","parseInt","replace","r","g","b","max","Math","min","l","h","s","d","newL","hueToRgb","p","q","t","r2","g2","b2","toHex","x","round","toString","padStart","useHostname","useStoreContext","useIsInDashboard","isInDashboard","StoreContext","createContext","StoreProvider","children","value","_jsx","Provider","style","_a","menuDesign","primaryColor","_b","viewUtils.adjustLightness","_c","_d","categoryBackgroundColor","_e","categoryTextColor","_f","productCardBackgroundColor","_g","productCardTextColor","_h","productCardDescriptionTextColor","_j","productCardVolumeTextColor","_k","productCardPriceTextColor","_l","productCardBlockPadding","_m","categoryTitleFontSize","_o","productNameFontSize","_p","productPriceFontSize","_q","distanceBetweenCategoryTitleAndProducts","_r","productDescriptionFontSize","_s","productVolumeFontSize","_t","productSeparatorColor","_u","menuPageBackgroundColor","_v","menuPageTextColor","useContext","useBusiness","business","useCurrency","currency","useBusinessId","id","useLanguage","useBaseUrl","viewHooks.useHostname","useMemo","viewUtils.getBaseUrl","useBusinessUrl","username","useBusinessUsername","getHoursForDay","schedule","weekDayIndex","days","find","day","hours","splitHours","split","map","Number","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useHasSingleBranch","branches","length","useSelectedBranch","branchId","hasSingleBranch","isEmpty","item","useBranchCoordinates","selectedBranch","latitude","longitude","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useBranchId","useOnBranchSelect","onBranchSelect","useMenuUrl","businessUrl","businessHooks.useBusinessUrl","branchHooks.useBranchId","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","SuppressedError","initialOrder","orderType","preferredPaymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","initialPreviewState","data","isLoading","error","OrderErrors","getOrderItemListingRawPrice","orderItem","price","variant","addons","quantity","baseUnitPrice","addonsUnitPrice","reduce","addonSum","addon","options","optionSum","option","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","Object","entries","addonId","optionIds","Array","isArray","sortNumbers","filter","Boolean","join","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_V2_URL","httpClient","HttpClient","baseURL","headers","credentials","onRequest","config","accessToken","getAuthToken","Authorization","onResponse","response","json","catch","logException","args_1","errorInfo","trackEvent","message","fetch","method","body","JSON","stringify","assign","console","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","tableHooks.usePreDefinedTableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","isOrderDefaultOpen","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","listingPrice","sellUnitType","unitPrice","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","parseFloat","toFixed","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","propertyIsEnumerable","__rest","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","acc","viewServices.storage","get","commonServices.logException","file","force","shouldClose","orderUtils.getOrderErrorMessages","contextValue","useOrderContext","BranchSetting","BranchTaxType","BranchTaxScope","BranchTaxFulfillment","BusinessSetting","useVideoId","videoId","useVideos","videos","useCurrentVideo","allVideos","video","useVideoUrl","useFirstVideoUrl","firstVideo","useFirstVideo","firstVideoUrl","Languages","isOptionsOpen","setIsOptionsOpen","languages","businessHooks.useLanguage","onLanguageSelect","businessHooks.useOnLanguageSelect","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","alt","currentLanguage","BusinessHeader","avatar256","businessHooks.useBusiness","viewUtils.getCoverPhotoSource","width","height","Column","fullWidth","fullHeight","justifyContent","viewUtils.getLogoImageSource","Text","color","align","BackIcon","size","theme","viewHooks.useIsInDashboard","branchHooks.useOnBranchSelect","window","location","href","SVGIcon","icon","ChevronLeft","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","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","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Discount","Country","City","Address","Floor","Events","Closed","Feedback","en","es","ru","tr","nl","et","pl","pt","hr","common","auth","events","branch","useTranslation","ns","params","supportedLocale","translations","key","translation","keys","k","getTranslations","HeaderLinks","setModal","useModalContext","phone","wifiPassword","whatsApp","telegram","branchHooks.useSelectedBranch","instagram","tiktok","facebook","isBusinessHoursAvailable","isDGKMenu","IconLink","Phone","shape","Whatsapp","target","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","MessageHeartSquare","Wifi","viewConstants.MODALS","Clock","BranchHeader","venueName","businessName","branchHooks.useVenueName","address","branchHooks.useHasSingleBranch","branchHooks.useBranchCoordinates","googleMapLink","Flex","direction","Item","shrink","weight","noMargin","rel","MarkerPin","UIElementType","DEFAULT","Header","useCustomerAddress","addresses","CustomerAuthStep","CustomerAddressType","validateAddressForm","form","countryCode","cityName","street","houseNumber","formatAddressLine","additionalNumber","ProductView","SellUnitType","useOrderTotalRawPriceWithTax","values","sum","usePrepareOrder","existingOrderData","businessId","businessHooks.useBusinessId","usePrepareOrderItems","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","useTotalOrderItemsCount","productModels.SellUnitType","WEIGHT","VOLUME","useDeliveryDistanceError","branchCoordinates","maxDeliveryDistance","setError","useEffect","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","businessHooks.useCurrency","minDeliveryAmount","amount","priceFormatter","OTPStep","errorMessage","onChange","tError","OTPInput","onChangeOTP","otp","normalizedOTP","toUpperCase","queueMicrotask","inputMode","EmailStep","formErrors","email","setEmail","baseUrl","handleChange","newValue","Input","type","InputType","EMAIL","placeholder","terms","HoursList","title","isClosed","timeText","whiteSpace","DANGER","BranchBusinessHours","openingDays","deliveryDays","isDeliveryEnabled","branchHooks.useIsDeliveryEnabled","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","IconButton","ChevronUp","scrollTo","left","top","behavior","BranchCardParent","BranchCard","content","noImage","imageContainer","info","Branches","branchHooks.useList","Container","getUnitListingPrice","getProductListingPrice","MenuAddonSelectType","getProductOrderPrice","optionsUnitPrice","total","selectType","selection","SINGLE","getAllSelectedOptionsListingPrice","getProductTranslation","getProductVariantTranslation","useProductById","products","getCategoryTranslation","category","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","Carousel","onGetRef","ref","paddingInline","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","BORDERED_PRIMARY","active","el","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","formattedTotalPrice","productUtils.getProductListingPrice","addToOrderEnabled","canAddToOrder","hasVariant","hasAddons","shouldOpenProductDetails","hasImage","isClickable","notAvailableText","viewUtils.getImageSource","notAvailable","loading","addToOrder","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","backgroundColor","onAddProduct","image580","image1024","productPrice","hasBackgroundColor","ProductsGridItemContainer","Products","memo","productBlocksRef","containerRef","onCategoryInView","view","setView","productModels.ProductView","LIST","videoHooks.useFirstVideoUrl","views","List","Grid","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","PRIMARY","PlaySquare","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","OrderFAB","totalCount","isVisible","isInPublicMenu","mountedRef","formattedTotalCount","classList","remove","animate","add","ShoppingBag","count","POSOrderFAB","alwaysVisible","orderHooks.useTotalOrderItemsCount","MenuContent","productHooks.useList","categories","categoryHooks.useList","productMap","push","menuUtils.prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","setTimeout","scrollIntoView","block","scrollToProductBlock","handleCategoryInView","categoryUtils.getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","categoryToSelect","OrderFABContainer","Actions","shoppingBagActionRef","productName","productHooks.useProductById","openProductDetails","handleAddToOrder","actions","Eye","index","isNil","VideoData","isDescriptionVisible","setIsDescriptionVisible","menuUrl","menuHooks.useMenuUrl","businessAvatar","productDescription","hasAvatar","noAvatar","Avatar","source","prev","Video","isActive","shouldLoad","isMuted","registerVideo","setIsMuted","isPaused","setIsPaused","videoRef","hasPlayedRef","videoSource","viewUtils.getVideoSource","videoUrl","togglePlay","paused","play","pause","onPlay","muted","playsInline","load","removeAttribute","autoPlay","preload","loop","controlsList","controls","disablePictureInPicture","poster","thumbnail","VolumeX","VolumeMax","Close","Play","VideoFeed","currentVideo","videoHooks.useCurrentVideo","otherVideos","currentVideoId","videoHooks.useOtherVideosForScrolling","activeId","register","setActiveId","elements","Map","root","rafId","sort","a","intersectionRatio","cancelAnimationFrame","requestAnimationFrame","nextId","set","videoHooks.useActiveSnap","tabIndex","Quantity","isDecreaseDisabled","focusedSection","onIncrease","onDecrease","focused","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","onModalClose","flex","Trash","tooltip","SUCCESS","ProductVariants","onSelectVariant","isVariantsFocused","variantsTitle","variantTitle","productUtils.getProductVariantTranslation","variantPrice","productUtils.getVariantListingPrice","label","checked","RADIO","getAddonTranslation","getAddonOptionTranslation","ProductAddons","onOptionSelect","addonTitle","addonUtils.getAddonTranslation","optionPrice","productUtils.getOptionListingPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","modalRef","onClose","setSelectedVariant","adjustQuantity","onSubmit","onQuantityChange","priceSuffix","productUtils.getPriceSuffix","productOrderPrice","productUtils.getProductOrderPrice","sellingUnitShortcuts","productUtils.getProductSellUnitShortCuts","handleClickOutside","event","contains","hasVariants","isManualQuantityNeeded","Modal","noBodyPadding","media","PlayCircle","details","choices","stickyBottom","Numpad","shortcuts","close","footer","Button","addAction","disabled","paddingBlock","OrderStepper","actionText","totalPriceWithTax","orderHooks.useOrderTotalPriceWithTax","inDetails","Loading","totalPrice","OrderDrawerFooter","isOrderItemsEmpty","orderError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","post","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","getActionText","ProductQuantity","productHooks.useProductQuantity","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","itemPrice","orderUtils.getOrderItemListingPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","OrderPreviewContext","OrderPreviewProvider","state","setState","buildPreviewItemsRequest","controller","AbortController","payload","signal","aborted","totalPriceWithoutTax","totalPriceWithTaxAndFees","totalTax","deliveryFee","serviceFee","taxes","isValidPreviewResponse","abort","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","TableShape","TableStatus","TableLocation","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","SELECT","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","orderMethods","methods","position","flexWrap","createOrderMethod","MethodSelection","selectedMethod","OrderPaymentSummary","textSize","serviceFeePercentage","serviceFeeEnabled","discountAmount","discountType","discountRate","totalPriceWithoutTaxFormatted","totalTaxFormatted","deliveryFeeFormatted","discountAmountFormatted","serviceFeeFormatted","totalPriceWithTaxAndFeesFormatted","rate","String","OrderPaymentMethods","CreditCard","CARD","BankNote","OrderDrawerDetails","previewData","deliveryFeeAmount","serviceChargePercentage","serviceChargeEnabled","Padding","Accordion","noPadding","headerPaddingInline","headerPaddingBlock","titleVariant","OrderDrawerDetailsWithProvider","OrderDrawerCompleted","Check","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","setForm","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","steps","OTP","goToNextStep","currentIndex","inline","checkIsValidEmail","customerUtils.validateForm","saveAuthToken","customerServices.loginCustomer","status","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","viewConstants.SUPPORTED_COUNTRIES","floor","instructions","postCode","initalForm","addressId","isHouseNumberEmpty","setIsHouseNumberEmpty","adressError","defaultAdressText","currentForm","updated","customerUtils.validateAddressForm","closeModal","handleSelectGoogleSuggestion","suggestion","updatedForm","lat","long","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","patch","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","MODALS_PRODUCT_DETAILS","DEFAULT_QUANTITY","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","videoHooks.useVideoUrl","hasVideo","handleSetFocusedSection","section","handleSubmit","handleOptionSelect","prevForm","previousSelection","updatedSelection","Set","newQuentity","PublicMenu","showMenu","businessHooks.useBaseUrl","headerText","footerText","menuHooks.useMenuTexts","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart"],"mappings":"yhDAKO,MCLMA,GACM,mBADNA,GAEN,OAFMA,GAGQ,qBAHRA,GAIW,wBAJXA,GAKK,kBAGLC,GAAoB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MACrEC,GAAsB,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