@restaround/react 1.0.59 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/js-utils"),n=require("react"),o=require("@sorocraft/ui"),r=require("@sorocraft/ui/icons");function i(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function a(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var l="PublicMenu-module_container__QLN6U",s="PublicMenu-module_categories__Iy6NC",d="PublicMenu-module_footer__6G3DQ";const c="https://images.restaround.co",u=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"",m=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"https://images.restaround.co/no-photo-128.webp",_=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"https://images.restaround.co/restaround-doodle.webp",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=(e,t,n)=>h.charAt(e>>2)+h.charAt((3&e)<<4|t>>4)+h.charAt((15&t)<<2|n>>6)+h.charAt(63&n),p="restaround.co",v=[p,"restaround.az","restaround.ee","restaround.nl"],f=n.createContext({}),x=({children:n,value:o})=>{const r=t.isEmpty(o)?{}:o;return r.currency||(r.currency="AZN"),r.language||(r.language="az"),e.jsx(f.Provider,{value:t.isEmpty(o)?{}:o,children:n})},j=()=>n.useContext(f),I="digital_menu",y=`${I}_category_select`,P=`${I}_category_scroll`,C=`${I}_product_details`,A=`${I}_product_add_cart`,b=`${I}_product_view_changed`,N=[y,P,C,A],S=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.language===t)))||{}};var w="Header-module_container__tenlF",T="Header-module_cover__BAWZK",k="Header-module_content__Gx4Al",L="Header-module_logo__4MTCm",R="Header-module_info__IchYA",E="Header-module_name__30wyw",D="Header-module_address__WOxXc",O="Header-module_addressText__lUszI",G="Header-module_social__AoP0z",q="Header-module_links__EeQxg",V="Header-module_wifiPassword__VWBTa",W="Header-module_wifiPasswordIcon__Ukn3D";const B=t=>{const n=i(t,["priority","blurDataURL","quality","placeholder","fetchPriority"]),{imageTag:o}=j()||{};if(o){const n=o;return e.jsx(n,Object.assign({},t,{quality:t.quality||100,placeholder:"blur",blurDataURL:(r=235,a=59,l=90,`data:image/gif;base64,R0lGODlhAQABAPAA${g(0,r,a)+g(l,255,255)}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`)}))}var r,a,l;return e.jsx("img",Object.assign({},n))};var M={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f"};const z=()=>{var t;const{language:r,languages:i,onLanguageSelect:a}=j(),[l,s]=n.useState(!1),d=(null==i?void 0:i.length)>1,c=(null===(t=null==i?void 0:i.filter)||void 0===t?void 0:t.call(i,(({code:e})=>e!==r)))||[],u=e=>`https://images.restaround.co/languages/${e}.svg`;return d?e.jsx("div",{className:M.container,onClick:()=>s(!l),children:e.jsxs(o.Row,{alignItems:"center",gap:0,children:[e.jsx(o.Row,{alignItems:"center",className:o.classNames(M,{options:!0,isOpen:l}),children:c.map((({code:t})=>e.jsx("img",{src:u(t),className:M.option,onClick:()=>(e=>{a&&a(e)})(t),alt:t},t)))}),e.jsx("img",{src:u(r),alt:r||"",className:M.currentLanguage})]})}):null},U=({branch:n,coverImage:i,logoImage:a,name:l,instagram:s,facebook:d,whatsapp:c,telegram:u,tiktok:m})=>{const{address:_,latitude:h,longitude:g,phone:p,wifiPassword:v}=n||{},f=t.isEmpty(n),x=`https://www.google.com/maps/place/${h},${g}`;return e.jsxs("div",{className:w,children:[e.jsx(B,{src:i,alt:l,className:T,width:1024,height:400,priority:!0,sizes:"100vw",fetchPriority:"high",loading:"eager"}),e.jsx("div",{className:k,children:f?e.jsx((()=>e.jsxs(o.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(B,{src:a,alt:l,className:L,width:96,height:96}),e.jsx("div",{className:R,children:e.jsx("h1",{className:E,children:l})})]})),{}):e.jsx((()=>e.jsxs(o.Flex,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e.jsx(o.Flex.Item,{children:e.jsx(B,{src:a,alt:l,className:L,width:96,height:96})}),e.jsx(o.Flex.Item,{shrink:!0,className:R,children:e.jsxs(o.Column,{gap:.25,children:[e.jsx("h1",{className:E,children:l}),e.jsx("a",{className:D,href:x,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(o.Row,{alignItems:"center",gap:.5,children:[e.jsx(o.SVGIcon,{icon:r.MarkerPin,theme:"dark"}),e.jsx("span",{className:O,children:_})]})})]})})]})),{})}),e.jsx(z,{}),!f&&e.jsx("div",{className:G,children:e.jsx("div",{className:q,children:e.jsx(o.Row,{gap:2,alignItems:"center",children:e.jsxs(o.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!p&&e.jsx(o.IconLink,{icon:r.Phone,href:`tel:+${p}`,size:"sm",shape:"circle",theme:"light"}),!!c&&e.jsx(o.IconLink,{icon:r.Whatsapp,href:`https://wa.me/${c}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!s&&e.jsx(o.IconLink,{icon:r.Instagram,href:s,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!u&&e.jsx(o.IconLink,{icon:r.Telegram,href:u,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!m&&e.jsx(o.IconLink,{icon:r.Tiktok,href:m,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e.jsx(o.IconLink,{icon:r.Facebook,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!v&&e.jsx(o.Tooltip,{hint:v,children:e.jsx("div",{className:V,children:e.jsx(o.SVGIcon,{icon:r.Wifi,size:"sm",className:W})})})]})})})})]})},H=({categoryProductMap:r=[],language:i,selectedCategoryId:a,onSelectCategory:l})=>{const d=n.useRef({}),c=n.useRef(null);return n.useEffect((()=>{a&&(()=>{var e;const t=null===(e=null==d?void 0:d.current)||void 0===e?void 0:e[a];if(!t||!c.current)return;const n=c.current.clientWidth,o=t.offsetLeft-n/2+t.offsetWidth/2;c.current.scrollTo({left:o,behavior:"smooth"})})()}),[a]),e.jsx("div",{className:s,children:e.jsx(o.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(c.current=e.current)},children:(r||[]).map((({id:n,translations:r})=>{const{name:s}=r.find((e=>e.language===i))||{};return e.jsx(o.CarouselItem,{children:e.jsx(o.Chip,{onClick:()=>((e,n)=>{e!==a&&(t.trackEvent(y,{name:n}),l(e))})(n,s),type:o.UIElementType.BORDERED_PRIMARY,active:n===a,children:e.jsx("div",{ref:e=>{e&&(d.current[n]=e)},children:s})})},n)}))})})};var F="Products-module_container__bF2LF",Q="Products-module_view__l857X",Y="Products-module_products__AoDrY",$="Products-module_category__Sp7dE",X="Products-module_list__LH4v5";const K=(e=0,t=1,n=0)=>e*t*(1+n/100);var Z;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(Z||(Z={}));const J=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.language===t)))||{}},ee=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.language===t)))||{}},te=(e,t)=>{var n;return(null===(n=((null==e?void 0:e.options)||[]).find((({id:e})=>e===t)))||void 0===n?void 0:n.price)||0},ne=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.language===t)))||{}},oe=(e,t=1)=>{const{price:n=0,vat:o=0}=e||{};return K(n,t,o)},re=(e,n,o,r=1)=>{const i=oe(e,r);return{totalPrice:i,formattedTotalPrice:t.priceFormatter(i,n,o)}},ie=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.variants)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.id===t)))||{}},ae=(e,t,n)=>{const o=ie(t,e),{vat:r}=t||{},{price:i}=o||{};return K(i,n,r)},le=(e,t)=>{var n,o;return(null===(o=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===o?void 0:o.call(n,(e=>e.language===t)))||{}},se=({product:e,variantId:n,quantity:o=1,selectedAddons:r,noVat:i=!1})=>{if(t.isEmpty(e))return{price:0,optionsPrice:0,total:0};const a=Object.assign(Object.assign({},e),{vat:i?0:e.vat}),l=((e,t={},n)=>((null==e?void 0:e.addons)||[]).filter((e=>Object.prototype.hasOwnProperty.call(t,e.id))).reduce(((e,n)=>{const{id:o,selectType:r}=n;if(r===Z.SINGLE){const r=t[o];return e+te(n,r)}return e+(t[o]||[]).reduce(((e,t)=>e+te(n,t)),0)}),0)*n)(a,r,o),s=n?ae(n,a,o):oe(a,o);return{price:s,optionsPrice:l,total:s+l}};var de;!function(e){e.LIST="list",e.GRID="grid"}(de||(de={}));const ce=(e,n="USD",o="en")=>{const{price:r,vat:i,quantity:a,optionsPrice:l}=e||{},s=K(r,a,i)+l*a;return{totalPrice:s,formattedTotalPrice:t.priceFormatter(s,n,o)}},ue=(e,t,n)=>{if(!e)throw new Error("Product ID is required");let o=`${e}`;t&&(o+=`-${t}`);const r=Object.entries(n||{}).map((([e,t])=>{if(!e||!t)return null;const n=Array.isArray(t)?t.filter(Boolean).join("-"):`${t}`;return n?`${e}-${n}`:null})).filter(Boolean).join("-");return r&&(o+=`-${r}`),o},me=n.createContext({cart:{},isCartOpen:!1,addProduct:()=>{},updateProduct:()=>{},setIsCartOpen:()=>{},removeAllProductVariants:()=>{}}),_e=({children:o})=>{const[r,a]=n.useState({}),[l,s]=n.useState(!1),d=({product:e,quantity:n,isAddOperation:o,variantId:r,selectedAddons:l})=>{if(t.isEmpty(e)||n<0)return;const{id:s,vat:d=0}=e,c=ue(s,r,l),{price:u,optionsPrice:m}=se({product:e,variantId:r,quantity:1,selectedAddons:l,noVat:!0});a((e=>{const t=e[c],a=o?((null==t?void 0:t.quantity)||0)+n:n;if(a<=0){const t=e,n=c;t[n];return i(t,["symbol"==typeof n?n:n+""])}return Object.assign(Object.assign({},e),{[c]:{productId:s,price:u,optionsPrice:m,quantity:a,vat:d,variantId:r,selectedAddons:l}})}))},c=({product:e,quantity:t=1,variantId:n,selectedAddons:o})=>d({product:e,quantity:t,variantId:n,selectedAddons:o,isAddOperation:!0}),u=({product:e,quantity:t=1,variantId:n,selectedAddons:o})=>d({product:e,quantity:t,variantId:n,selectedAddons:o,isAddOperation:!1}),m=e=>{if(!e||t.isEmpty(r))return;const n=Object.entries(r).reduce(((t,[n,o])=>(o.productId!==e&&(t[n]=o),t)),{});a(n)},_=n.useMemo((()=>({cart:r,isCartOpen:l,addProduct:c,updateProduct:u,setIsCartOpen:s,removeAllProductVariants:m})),[r,l]);return e.jsx(me.Provider,{value:_,children:o})},he=()=>n.useContext(me);var ge={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",image:"ProductsListItem-module_image__h6Wbi",addToCart:"ProductsListItem-module_addToCart__WXrQZ",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26"};const pe=({product:i,currency:a,language:l,onClick:s})=>{var d,c;const{addProduct:m}=he(),{image160:_,volume:h}=i||{},{name:g,description:p}=n.useMemo((()=>ne(i,l)),[i,l]),{formattedTotalPrice:v}=n.useMemo((()=>re(i,a,l)),[i,a,l]),f=(null===(d=null==i?void 0:i.variants)||void 0===d?void 0:d.length)>0,x=(null===(c=null==i?void 0:i.addons)||void 0===c?void 0:c.length)>0,j=!!_;return e.jsxs("div",{className:t.classNames(ge,{container:!0,isClickable:!!s,noImage:!j}),onClick:s,children:[e.jsxs(o.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:ge.info,children:e.jsxs(o.Column,{gap:.25,children:[e.jsx("h3",{className:ge.name,children:g}),e.jsx("p",{className:ge.description,children:p}),e.jsxs(o.Row,{className:ge.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:v}),!!h&&e.jsx(o.Text,{color:"muted",children:h})]})]})}),j&&e.jsx(B,{src:u(_),alt:g||"menu",className:ge.image,loading:"lazy",width:160,height:90})]}),e.jsx("div",{className:ge.addToCart,children:e.jsx(o.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(f||x)&&s)return s();m({product:i}),t.trackEvent(A,{name:g,quantity:1})},icon:r.Plus,type:o.UIElementType.DEFAULT})})]})};var ve={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",addToCart:"ProductsGridItem-module_addToCart__gYVrI",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5"};const fe=({product:i,currency:a,language:l,onClick:s})=>{var d,c;const{addProduct:m}=he(),{volume:_,image580:h,image160:g,image1024:p}=i||{},v=h||p||g,{name:f,description:x}=n.useMemo((()=>ne(i,l)),[i,l]),{formattedTotalPrice:j}=n.useMemo((()=>re(i,a,l)),[i,a,l]),I=(null===(d=null==i?void 0:i.variants)||void 0===d?void 0:d.length)>0,y=(null===(c=null==i?void 0:i.addons)||void 0===c?void 0:c.length)>0;return e.jsx("div",{className:ve.container,children:e.jsxs("div",{className:t.classNames(ve,{content:!0,isClickable:!!s,noImage:!v}),onClick:s,children:[v&&e.jsx("div",{className:ve.imageContainer,children:e.jsx(B,{src:u(v),alt:f||"menu",className:ve.image,loading:"lazy",width:580,height:326})}),e.jsx("div",{className:ve.info,children:e.jsx("div",{className:ve.data,children:e.jsxs(o.Column,{gap:.25,children:[e.jsx("h3",{className:ve.name,children:f}),e.jsx("p",{className:ve.description,children:x}),e.jsxs(o.Row,{className:ve.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:j}),!!_&&e.jsx(o.Text,{color:"white",className:ve.volume,children:_})]})]})})}),e.jsx("div",{className:ve.addToCart,children:e.jsx(o.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(I||y)&&s)return s();m({product:i}),t.trackEvent(A,{name:f,quantity:1})},icon:r.Plus,type:o.UIElementType.DEFAULT})})]})})};var xe={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW",flexWide:"ProductDetails-module_flexWide__w06FX",slidein:"ProductDetails-module_slidein__N8f4g",fadeInOut:"ProductDetails-module_fadeInOut__hYRtK",heightAnimation:"ProductDetails-module_heightAnimation__hLQyz",fadein:"ProductDetails-module_fadein__QN4mI",floatAnimation:"ProductDetails-module_floatAnimation__dTQbc",bottomSheet:"ProductDetails-module_bottomSheet__HO2S-",slideRightToLeft:"ProductDetails-module_slideRightToLeft__hbtJg"};const je={en:{},az:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et",Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Cart":"Səbətə əlavə edildi","Product choices":"Seçimlər","In order":"Sifarişdə"},tr:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte"},nl:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling"},et:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses"},ru:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет товаров","Add items":"Добавить товары",Subtotal:"Итого",Events:"События","Product choices":"Варианты товара","In order":"В заказе"}},Ie=e=>{const{language:t}=j(),n=e||t;return{t:e=>{var t;return(null===(t=je[n])||void 0===t?void 0:t[e])||e}}},ye=()=>{const{cart:e}=he();return Object.values(e||{}).reduce(((e,t)=>e+t.quantity),0)};var Pe={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk"};const Ce=({isDecreaseDisabled:n=!1,quantity:i=1,size:a="md",onIncrease:l,onDecrease:s})=>e.jsxs(o.Row,{className:t.classNames(Pe,{container:!0},[Pe[a]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:t.classNames(Pe,{quantityAction:!0,isDisabled:n}),onClick:s,children:e.jsx(o.SVGIcon,{icon:r.Minus})}),e.jsx("div",{className:Pe.quantityValue,children:i}),e.jsx("div",{className:Pe.quantityAction,onClick:l,children:e.jsx(o.SVGIcon,{icon:r.Plus})})]});var Ae="ProductInCart-module_container__oSrwq",be="ProductInCart-module_title__Vnc4l";const Ne=({productId:n,onModalClose:i})=>{const{setIsCartOpen:a,removeAllProductVariants:l}=he(),{t:s}=Ie(),d=(e=>{const{cart:n}=he();return t.isEmpty(n)||!e?0:Object.values(n).filter((t=>t.productId===e)).reduce(((e,t)=>e+t.quantity),0)})(n);return d<=0?null:e.jsxs(o.Flex,{className:Ae,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(o.Flex.Item,{flex:1,className:be,children:[s("In order")," (",d,")"]}),e.jsx(o.Flex.Item,{flex:0,children:e.jsxs(o.Row,{children:[e.jsx(o.IconButton,{icon:r.Trash,onClick:()=>{l(n)},type:o.UIElementType.DANGER,tooltip:s("Remove from order")}),e.jsx(o.IconButton,{icon:r.ShoppingBag,onClick:()=>{a(!0),i&&i()},type:o.UIElementType.SUCCESS,tooltip:s("View order")})]})})]})};var Se={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ"};const we=({product:r,selectedVariant:i,focusedSection:a,onSelectVariant:l})=>{const{language:s,currency:d}=j(),{t:c}=Ie(),u=n.useRef(null),{variants:m}=r||{},_="variant"===a;return n.useEffect((()=>{_&&u.current&&u.current.scrollIntoView({behavior:"smooth"})}),[a]),e.jsxs(o.Column,{className:t.classNames(Se,{container:!0,focused:_}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:Se.variantsTitle,ref:u,children:c("Product choices")}),(m||[]).map((n=>{const{id:a}=n||{},{formattedTotalPrice:c}=(({variantId:e,currency:n="USD",language:o="en",product:r,quantity:i=1})=>{const a=ae(e,r,i);return{totalPrice:a,formattedTotalPrice:t.priceFormatter(a,n,o)}})({variantId:a,language:s,currency:d,product:r}),{title:u}=le(n,s);return e.jsxs(o.Row,{justifyContent:"space-between",onClick:()=>l(a),className:Se.variant,children:[e.jsx(o.Input,{label:u,name:"variant",onChange:()=>l(a),checked:i===a,type:o.InputType.RADIO,size:"small"}),e.jsx("div",{className:Se.variantPrice,children:c})]},a)}))]})};var Te={container:"ProductAddons-module_container__DRnT7",focused:"ProductAddons-module_focused__KplXf",optionsTitle:"ProductAddons-module_optionsTitle__dE0ee",flexWide:"ProductAddons-module_flexWide__kxcTh",slidein:"ProductAddons-module_slidein__C5osk",fadeInOut:"ProductAddons-module_fadeInOut__Wtu5Z",heightAnimation:"ProductAddons-module_heightAnimation__sA75y",fadein:"ProductAddons-module_fadein__ErDv9",floatAnimation:"ProductAddons-module_floatAnimation__crBUu",bottomSheet:"ProductAddons-module_bottomSheet__Irr5y",slideRightToLeft:"ProductAddons-module_slideRightToLeft__Q-PfS"};const ke=({product:n,selectedAddons:r,onOptionSelect:i})=>{const{language:a,currency:l}=j(),{addons:s}=n||{};return e.jsx(o.Column,{className:Te.container,gap:1.5,fullWidth:!0,children:(s||[]).map((n=>{const{id:s,options:d,selectType:c}=n||{},{title:u}=J(n,a);return e.jsxs(o.Column,{children:[e.jsx(o.Text,{variant:"bold",children:u}),e.jsx(o.Column,{gap:1,fullWidth:!0,children:(d||[]).map((n=>{const{id:d}=n||{},{formattedTotalPrice:u}=(({option:e,currency:n="USD",language:o="en"})=>{const{price:r}=e||{};return{totalPrice:r,formattedTotalPrice:t.priceFormatter(r,n,o)}})({option:n,language:a,currency:l}),{title:m}=ee(n,a),_=c===Z.SINGLE,h=_?r[s]===d:(r[s]||[]).includes(d);return e.jsxs(o.Row,{justifyContent:"space-between",className:Te.option,children:[e.jsx(o.Input,{label:m,name:`option-${s}`,onChange:()=>i({addonId:s,optionId:d,isSingle:_,isRemove:!_&&h}),checked:h,type:_?o.InputType.RADIO:o.InputType.CHECKBOX,size:"small"}),e.jsx("div",{className:Te.optionPrice,children:u})]},d)}))})]},s)}))})},Le=({product:i,onClose:a})=>{const{language:l,currency:s}=j(),{addProduct:d,updateProduct:c}=he(),[m,_]=n.useState(1),[h,g]=n.useState(!1),[p,v]=n.useState(null),[f,x]=n.useState(null),[I,y]=n.useState({}),P=n.useRef(null),{t:C}=Ie(),b=(({productId:e,variantId:n,selectedAddons:o})=>{var r;const{cart:i}=he();return t.isEmpty(i)||!e?0:(null===(r=i[ue(e,n,o)])||void 0===r?void 0:r.quantity)||0})({productId:null==i?void 0:i.id,variantId:p,selectedAddons:I}),{name:N,description:S}=n.useMemo((()=>ne(i,l)),[i,l]),{formattedTotalPrice:w}=n.useMemo((()=>re(i,s,l)),[i,s,l]),{formattedTotalPrice:T}=n.useMemo((()=>(({product:e,variantId:n,quantity:o=1,currency:r,language:i,selectedAddons:a,noVat:l=!1})=>{const{total:s}=se({product:e,variantId:n,quantity:o,selectedAddons:a,noVat:l});return{totalPrice:s,formattedTotalPrice:t.priceFormatter(s,r,i)}})({product:i,quantity:m,language:l,currency:s,variantId:p,selectedAddons:I})),[i,m,l,s,p,I]),k=h?0===m:1===m,L=n.useMemo((()=>C(h?0===m?"Remove from order":"Update order":"Add to order")),[h,m]);n.useEffect((()=>{_(b>0?b:1),g(b>0)}),[b,i]),n.useEffect((()=>{v(null),y({})}),[i]);const R=e=>{-1===e&&k||_((t=>Math.max(0,t+e)))};if(t.isEmpty(i))return null;const{image1024:E,volume:D,variants:O,addons:G}=i,q=(null==O?void 0:O.length)>0,V=(null==G?void 0:G.length)>0;return e.jsx("div",{className:xe.container,onClick:e=>{var t,n;(null===(n=null===(t=null==P?void 0:P.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||a&&a()},children:e.jsx(o.Modal,{onClose:a,ref:P,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:xe.content,children:[e.jsxs(o.Column,{gap:0,children:[E&&e.jsx(B,{src:u(E),width:1024,height:400,alt:N||"product",className:xe.image}),e.jsxs(o.Column,{className:xe.details,gap:1,children:[e.jsx("h2",{className:xe.name,children:N}),e.jsxs(o.Row,{justifyContent:"space-between",children:[e.jsx("div",{className:xe.price,children:w}),e.jsx("div",{className:xe.volume,children:D})]}),e.jsx("div",{className:xe.description,children:S})]}),(q||V)&&e.jsxs(o.Column,{gap:0,className:xe.choices,children:[q&&e.jsx(we,{product:i,selectedVariant:p,focusedSection:f,onSelectVariant:v}),V&&e.jsx(ke,{product:i,selectedAddons:I,onOptionSelect:({addonId:e,optionId:t,isSingle:n,isRemove:o=!1})=>{y((r=>{if(n)return Object.assign(Object.assign({},r),{[e]:t});const i=r[e]||[],a=o?i.filter((e=>e!==t)):[...new Set([...i,t])];return Object.assign(Object.assign({},r),{[e]:a})}))}})]})]}),e.jsx("div",{className:xe.close,children:e.jsx(o.IconButton,{onClick:a,icon:r.Close})})]}),footer:e.jsxs(o.Column,{children:[e.jsx(Ne,{productId:null==i?void 0:i.id,onModalClose:a}),e.jsxs(o.Row,{className:xe.addToCart,gap:.5,children:[e.jsx(Ce,{isDecreaseDisabled:k,onDecrease:()=>R(-1),onIncrease:()=>R(1),quantity:m}),e.jsx(o.Button,{className:xe.addAction,label:e.jsxs(o.Row,{fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{className:xe.actionTitle,children:L}),e.jsx("span",{children:T})]}),onClick:()=>{var e;if((null===(e=null==i?void 0:i.variants)||void 0===e?void 0:e.length)>0&&!p)return x("variant"),void setTimeout((()=>{x(null)}),200);h?c({product:i,quantity:m,variantId:p,selectedAddons:I}):(d({product:i,quantity:m,variantId:p,selectedAddons:I}),t.trackEvent(A,{name:N,quantity:m})),a&&a()},size:"xl",fullWidth:!0})]})]})})})};var Re="Cart-module_container__3KQtx",Ee="Cart-module_content__rkiZa",De={container:"CartStepper-module_container__4CF1L",count:"CartStepper-module_count__E-RBg",actionText:"CartStepper-module_actionText__-rVKA",totalPrice:"CartStepper-module_totalPrice__QboRN",isClickable:"CartStepper-module_isClickable__mDptU",flexWide:"CartStepper-module_flexWide__eXxCr",slidein:"CartStepper-module_slidein__d5JQ-",fadeInOut:"CartStepper-module_fadeInOut__pS8nn",heightAnimation:"CartStepper-module_heightAnimation__7-e5Z",fadein:"CartStepper-module_fadein__-Ba0-",floatAnimation:"CartStepper-module_floatAnimation__rq6zX",bottomSheet:"CartStepper-module_bottomSheet__1wHHD",slideRightToLeft:"CartStepper-module_slideRightToLeft__0KLAo"};const Oe=({actionText:n,onClick:r})=>{const i=ye(),{formattedTotalPrice:a}=(()=>{const{cart:e}=he(),{currency:n,language:o}=j(),r=Object.values(e||{}).reduce(((e,t)=>{const{totalPrice:n}=ce(t);return e+n}),0);return{totalPrice:r,formattedTotalPrice:t.priceFormatter(r,n,o)}})();return e.jsxs(o.Flex,{className:t.classNames(De,{container:!0,isClickable:!!r}),justifyContent:"space-between",alignItems:"center",onClick:r,children:[e.jsx(o.Flex.Item,{flex:1,children:e.jsxs(o.Row,{alignItems:"center",children:[e.jsx("div",{className:De.count,children:i}),e.jsx("div",{className:De.actionText,children:n})]})}),e.jsx(o.Flex.Item,{className:De.totalPrice,flex:1,children:a})]})},Ge=()=>{const{setIsCartOpen:t}=he(),{t:n}=Ie();return ye()<=0?null:e.jsx("div",{className:Re,children:e.jsx("div",{className:Ee,children:e.jsx(Oe,{onClick:()=>t(!0),actionText:n("View order")})})})};var qe={container:"CartDrawer-module_container__zvapw",content:"CartDrawer-module_content__ELSiG",flexWide:"CartDrawer-module_flexWide__ySgY-",slidein:"CartDrawer-module_slidein__XC9AW",fadeInOut:"CartDrawer-module_fadeInOut__w9h6X",heightAnimation:"CartDrawer-module_heightAnimation__tBgkj",fadein:"CartDrawer-module_fadein__QNPoQ",floatAnimation:"CartDrawer-module_floatAnimation__nZWoY",bottomSheet:"CartDrawer-module_bottomSheet__m0wy7",slideRightToLeft:"CartDrawer-module_slideRightToLeft__gpixh"},Ve="CartItem-module_container__At7lj",We="CartItem-module_image__D-zzG",Be="CartItem-module_data__Lo3Fb",Me="CartItem-module_name__EksZu",ze="CartItem-module_price__yJxl6";const Ue=e=>{var t;const{products:n}=j();return(null===(t=null==n?void 0:n.find)||void 0===t?void 0:t.call(n,(({id:t})=>t===e)))||{}},He=({productId:t,variantId:n,min:o=1,size:r="md",selectedAddons:i})=>{const a=(({productId:e,variantId:t,selectedAddons:n})=>{const{cart:o}=he(),r=o[ue(e,t,n)];return(null==r?void 0:r.quantity)||1})({productId:t,variantId:n,selectedAddons:i}),l=Ue(t),{updateProduct:s}=he(),d=a===o;return e.jsx(Ce,{isDecreaseDisabled:d,onDecrease:()=>s({product:l,quantity:a-1,variantId:n,selectedAddons:i}),onIncrease:()=>s({product:l,quantity:a+1,variantId:n,selectedAddons:i}),quantity:a,size:r})},Fe=({item:n,product:r,language:i})=>{const{selectedAddons:a}=n||{};return e.jsx(e.Fragment,{children:Object.entries(a||{}).map((([n,a])=>{const l=((e,t)=>((null==e?void 0:e.addons)||[]).find((({id:e})=>e===t))||{})(r,Number(n));if(t.isEmpty(l)||t.isEmpty(l.options)||!Array.isArray(l.options))return null;let s="";if(Array.isArray(a)){const e=l.options.filter((({id:e})=>a.includes(e)));if(t.isEmpty(e))return null;s=e.map((e=>{const{title:t}=ee(e,i);return t})).filter(Boolean).join(", ")}else{const e=l.options.find((({id:e})=>e===a));if(t.isEmpty(e))return null;const{title:n}=ee(e,i);s=n}const{title:d}=J(l,i);return e.jsxs(o.Text,{color:"muted",variant:"small",children:[d,": ",s]},n)})).filter(Boolean)})},Qe=({item:t})=>{const{productId:r,variantId:i,selectedAddons:a}=t||{},l=Ue(r),s=ie(l,i),{language:d,currency:c}=j(),{image160:m}=l,{title:_}=le(s,d),{name:h}=n.useMemo((()=>ne(l,d)),[l,d]),{formattedTotalPrice:g}=n.useMemo((()=>ce(t,c,d)),[t,c,d]);return e.jsxs(o.Row,{className:Ve,gap:1,alignItems:"flex-start",children:[m&&e.jsx(B,{src:u(m),alt:h||"menu",className:We,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:Be,children:[e.jsx("div",{className:Me,children:h}),e.jsxs(o.Column,{gap:0,children:[!!_&&e.jsx(o.Text,{color:"muted",variant:"small",children:_}),e.jsx(Fe,{item:t,product:l,language:d})]}),e.jsx("div",{className:ze,children:g})]}),e.jsx(He,{productId:r,variantId:i,selectedAddons:a,size:"sm",min:0})]})},Ye=()=>{const{isCartOpen:r,cart:i,setIsCartOpen:a}=he(),l=n.useRef(null),{t:s}=Ie(),d=t.isEmpty(i),c=()=>a(!1);return r?e.jsx("div",{className:qe.container,onClick:e=>{var t,n;(null===(n=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||c()},children:e.jsx(o.Drawer,{ref:l,onClose:c,isOpen:r,title:s("Your order"),content:e.jsx("div",{className:qe.content,children:d?e.jsx((()=>e.jsxs(o.Column,{className:qe.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(o.Text,{variant:"h2",children:s("Empty order")}),e.jsx(o.Description,{text:s("You don't have any items in your order")})]})),{}):e.jsx("div",{className:qe.items,children:Object.keys(i||{}).map((t=>e.jsx(Qe,{item:i[t]},t)))})}),footer:d?e.jsx(o.Button,{label:s("Add items"),onClick:c,type:o.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):e.jsx(Oe,{actionText:s("Subtotal")})})}):null},$e=n.memo((({categoryProductMap:i=[],currency:a,language:l,productBlocksRef:s,containerRef:d,onCategoryInView:c})=>{const[u,m]=n.useState(null),[_,h]=n.useState(de.LIST),g=[{icon:r.List,type:de.LIST},{icon:r.Grid,type:de.GRID}],p=e=>{const{name:n}=ne(e,l);t.trackEvent(C,{name:n}),m(e)};return n.useEffect((()=>{const e=new IntersectionObserver((e=>{var t;const n=((null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let o=null,r=1/0;e.forEach((e=>{if(e.isIntersecting){const t=e.boundingClientRect,i=t.top+t.height/2,a=Math.abs(i-n);a<r&&(r=a,o=e.target.getAttribute("data-category-id"))}})),o&&c(Number(o))}),{threshold:.1});return Object.entries(s.current||{}).forEach((([t,n])=>{n&&(n.setAttribute("data-category-id",t),e.observe(n))})),()=>{e.disconnect()}}),[s,d]),e.jsx(_e,{children:e.jsxs("div",{className:F,children:[e.jsx(o.Row,{className:Q,alignItems:"center",children:g.map((({icon:n,type:r})=>e.jsx(o.IconButton,{icon:n,onClick:()=>(e=>{h(e),t.trackEvent(b,{name:e})})(r),type:r===_?o.UIElementType.PRIMARY:o.UIElementType.DEFAULT},r)))}),e.jsx(o.Column,{children:(i||[]).map((t=>{const{name:n}=S(t,l),{id:r,products:i}=t;return e.jsxs("div",{className:Y,ref:e=>{e&&(s.current[r]=e)},"data-category-id":r,children:[e.jsx("h2",{className:$,children:n}),e.jsx("div",{className:X,children:e.jsx(o.Column,{gap:0,children:(i||[]).map((t=>_===de.GRID?e.jsx(fe,{product:t,currency:a,language:l,onClick:()=>p(t)},t.id):e.jsx(pe,{product:t,currency:a,language:l,onClick:()=>p(t)},t.id)))})})]},r)}))}),e.jsx(Le,{product:u,onClose:()=>m(null)}),e.jsx(Ge,{}),e.jsx(Ye,{})]})})}),((e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language));$e.displayName="Products";var Xe="Branches-module_branches__sOuoV",Ke="Branches-module_list__vYoT2",Ze="Branches-module_name__K0Z-4";const Je=({branches:t=[],rootPath:n="",onBranchSelect:r})=>{const i=({children:t,id:o})=>r?e.jsx("div",{onClick:()=>r(o),children:t}):e.jsx("a",{href:`${n}/${o}`,children:t});return e.jsx("div",{className:Xe,children:e.jsx(o.Container,{className:Ke,children:t.map((({id:t,name:n})=>e.jsx(i,{id:t,children:e.jsx(o.Card,{noBottomMargin:!0,children:e.jsx(o.Flex,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:e.jsx("h2",{className:Ze,children:n})})})},t)))})})},et=({data:o})=>{var r;const{name:i,coverImage:s,logoImage:c,branches:u=[],branchId:h,language:g,categories:f,products:x,currency:j,instagram:I,facebook:y,whatsapp:C,telegram:A,tiktok:b,rootPath:N,hostname:w,onBranchSelect:T}=o||{},k=u.length<=1,L=((e,t)=>{const n=t.reduce(((e,t)=>{const n=Number(t.categoryId);return e[n]||(e[n]=[]),e[n].push(t),e}),{});return e.map((e=>Object.assign(Object.assign({},e),{products:n[Number(e.id)]||[]}))).filter((e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0}))})(f,x),R=(()=>{var e;return k?(null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.id)?u[0]:{}:u.find((e=>e.id===Number(h)))})(),E=k||!(null==R?void 0:R.name)?i:(null==R?void 0:R.name)||"",[D,O]=n.useState(null===(r=null==f?void 0:f[0])||void 0===r?void 0:r.id),G=n.useRef({}),q=n.useRef(null),V=n.useRef(!0),{url:W,domain:B}=((e,t)=>{const n=v.includes(e)?e:p;return{url:`https://${n}/${t||"en"}`,domain:n}})(w,g);return e.jsxs("div",{className:l,ref:q,children:[e.jsx(U,{branch:R,name:E,coverImage:_(s),logoImage:m(c),instagram:I,facebook:y,whatsapp:C,telegram:A,tiktok:b}),k||h?e.jsxs(e.Fragment,{children:[e.jsx(H,{categoryProductMap:L,language:g,selectedCategoryId:D,onSelectCategory:e=>a(void 0,void 0,void 0,(function*(){V.current=!1,O(e),(e=>{var t;const n=null===(t=null==G?void 0:G.current)||void 0===t?void 0:t[e];n&&(setTimeout((()=>{n.scrollIntoView({behavior:"smooth",block:"start"})}),100),setTimeout((()=>{V.current=!0}),1e3))})(e)}))}),e.jsx($e,{currency:j,language:g,productBlocksRef:G,containerRef:q,categoryProductMap:L,onCategoryInView:e=>{if(!(null==V?void 0:V.current))return;const n=((e,n,o)=>{var r;const i=null===(r=null==n?void 0:n.find)||void 0===r?void 0:r.call(n,(({id:t})=>t===e));if(t.isEmpty(i))return"";const{name:a}=S(i,o);return a})(e,f,g);t.trackEvent(P,{name:n}),O(e)}})]}):e.jsx(Je,{branches:u,onBranchSelect:T,rootPath:N}),!!w&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:W,className:d,children:B})]})};var tt={};const nt=({currentGoal:t,language:r,setGoal:i})=>{const{t:a}=Ie(r),l=n.useRef({}),s=e=>{switch(e){case P:return a("Scrolled to Category");case y:return a("Category Selected");case C:return a("Product Details");case A:return a("Product Added to Cart");default:return""}},d=n.useCallback((e=>{var t,n;i(e),null===(n=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.close)||void 0===n||n.call(t)}),[i]);return e.jsx(o.DropDown,{action:s(t),actionSize:"large",type:o.UIElementType.BORDERED_PRIMARY,closeRef:l,menu:e.jsx("div",{className:tt.toolbarMenu,children:N.map((t=>e.jsx(o.DropDownMenuItem,{onClick:()=>d(t),children:s(t)},t)))})})};exports.Events=({data:t,isLoading:n=!1,loadingImage:r,language:i,goal:a,setGoal:l})=>{const{t:s}=Ie(i);return e.jsx(o.Card,{title:s("Events"),toolbar:e.jsx(nt,{language:i,currentGoal:a,setGoal:l}),children:n?e.jsx(o.Loading,{image:r}):e.jsx(o.BarChart,{data:t})})},exports.PublicMenu=({data:t})=>e.jsx(x,{value:t,children:e.jsx(et,{data:t})});
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@sorocraft/js-utils"),n=require("react"),r=require("@sorocraft/ui"),o=require("@sorocraft/ui/icons");function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var s="PublicMenu-module_container__QLN6U",l="PublicMenu-module_categories__Iy6NC",d="PublicMenu-module_footer__6G3DQ";const c="https://images.restaround.co",u=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"",m=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"https://images.restaround.co/no-photo-128.webp",_=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${c}/${e}`:"https://images.restaround.co/restaround-doodle.webp",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=(e,t,n)=>h.charAt(e>>2)+h.charAt((3&e)<<4|t>>4)+h.charAt((15&t)<<2|n>>6)+h.charAt(63&n),g="restaround.co",v=[g,"restaround.az","restaround.ee","restaround.nl"],f=n.createContext({}),x=({children:n,value:r})=>{const o=t.isEmpty(r)?{}:r;return o.currency||(o.currency="AZN"),o.language||(o.language="az"),e.jsx(f.Provider,{value:t.isEmpty(r)?{}:r,children:n})},j=()=>n.useContext(f),y="digital_menu",I=`${y}_category_select`,P=`${y}_category_scroll`,C=`${y}_product_details`,b=`${y}_product_add_cart`,A=`${y}_product_view_changed`,N=[I,P,C,b],S=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.language===t)))||{}};var w="Header-module_container__tenlF",k="Header-module_cover__BAWZK",T="Header-module_content__Gx4Al",L="Header-module_logo__4MTCm",R="Header-module_info__IchYA",E="Header-module_name__30wyw",O="Header-module_address__WOxXc",D="Header-module_addressText__lUszI",G="Header-module_social__AoP0z",q="Header-module_links__EeQxg",V="Header-module_wifiPassword__VWBTa",B="Header-module_wifiPasswordIcon__Ukn3D";const M=t=>{const{priority:n,blurDataURL:r,quality:o,placeholder:i,fetchPriority:s}=t,l=a(t,["priority","blurDataURL","quality","placeholder","fetchPriority"]),{imageTag:d}=j()||{};if(d){const n=d;return e.jsx(n,Object.assign({},t,{quality:t.quality||100,placeholder:"blur",blurDataURL:(c=235,u=59,m=90,`data:image/gif;base64,R0lGODlhAQABAPAA${p(0,c,u)+p(m,255,255)}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`)}))}var c,u,m;return e.jsx("img",Object.assign({},l))};var z={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f"};const U=()=>{var t;const{language:o,languages:a,onLanguageSelect:i}=j(),[s,l]=n.useState(!1),d=(null==a?void 0:a.length)>1,c=(null===(t=null==a?void 0:a.filter)||void 0===t?void 0:t.call(a,(({code:e})=>e!==o)))||[],u=e=>`https://images.restaround.co/languages/${e}.svg`;return d?e.jsx("div",{className:z.container,onClick:()=>l(!s),children:e.jsxs(r.Row,{alignItems:"center",gap:0,children:[e.jsx(r.Row,{alignItems:"center",className:r.classNames(z,{options:!0,isOpen:s}),children:c.map((({code:t})=>e.jsx("img",{src:u(t),className:z.option,onClick:()=>(e=>{i&&i(e)})(t),alt:t},t)))}),e.jsx("img",{src:u(o),alt:o||"",className:z.currentLanguage})]})}):null},W=({branch:n,coverImage:a,logoImage:i,name:s,instagram:l,facebook:d,whatsapp:c,telegram:u,tiktok:m})=>{const{address:_,latitude:h,longitude:p,phone:g,wifiPassword:v}=n||{},f=t.isEmpty(n),x=`https://www.google.com/maps/place/${h},${p}`;return e.jsxs("div",{className:w,children:[e.jsx(M,{src:a,alt:s,className:k,width:1024,height:400,priority:!0,sizes:"100vw",fetchPriority:"high",loading:"eager"}),e.jsx("div",{className:T,children:f?e.jsx((()=>e.jsxs(r.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx(M,{src:i,alt:s,className:L,width:96,height:96}),e.jsx("div",{className:R,children:e.jsx("h1",{className:E,children:s})})]})),{}):e.jsx((()=>e.jsxs(r.Flex,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e.jsx(r.Flex.Item,{children:e.jsx(M,{src:i,alt:s,className:L,width:96,height:96})}),e.jsx(r.Flex.Item,{shrink:!0,className:R,children:e.jsxs(r.Column,{gap:.25,children:[e.jsx("h1",{className:E,children:s}),e.jsx("a",{className:O,href:x,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(r.Row,{alignItems:"center",gap:.5,children:[e.jsx(r.SVGIcon,{icon:o.MarkerPin,theme:"dark"}),e.jsx("span",{className:D,children:_})]})})]})})]})),{})}),e.jsx(U,{}),!f&&e.jsx("div",{className:G,children:e.jsx("div",{className:q,children:e.jsx(r.Row,{gap:2,alignItems:"center",children:e.jsxs(r.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!g&&e.jsx(r.IconLink,{icon:o.Phone,href:`tel:+${g}`,size:"sm",shape:"circle",theme:"light"}),!!c&&e.jsx(r.IconLink,{icon:o.Whatsapp,href:`https://wa.me/${c}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!l&&e.jsx(r.IconLink,{icon:o.Instagram,href:l,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!u&&e.jsx(r.IconLink,{icon:o.Telegram,href:u,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!m&&e.jsx(r.IconLink,{icon:o.Tiktok,href:m,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e.jsx(r.IconLink,{icon:o.Facebook,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!v&&e.jsx(r.Tooltip,{hint:v,children:e.jsx("div",{className:V,children:e.jsx(r.SVGIcon,{icon:o.Wifi,size:"sm",className:B})})})]})})})})]})},H=({categoryProductMap:o=[],language:a,selectedCategoryId:i,onSelectCategory:s})=>{const d=n.useRef({}),c=n.useRef(null);return n.useEffect((()=>{i&&(()=>{var e;const t=null===(e=null==d?void 0:d.current)||void 0===e?void 0:e[i];if(!t||!c.current)return;const n=c.current.clientWidth,r=t.offsetLeft-n/2+t.offsetWidth/2;c.current.scrollTo({left:r,behavior:"smooth"})})()}),[i]),e.jsx("div",{className:l,children:e.jsx(r.Carousel,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(c.current=e.current)},children:(o||[]).map((({id:n,translations:o})=>{const{name:l}=o.find((e=>e.language===a))||{};return e.jsx(r.CarouselItem,{children:e.jsx(r.Chip,{onClick:()=>((e,n)=>{e!==i&&(t.trackEvent(I,{name:n}),s(e))})(n,l),type:r.UIElementType.BORDERED_PRIMARY,active:n===i,children:e.jsx("div",{ref:e=>{e&&(d.current[n]=e)},children:l})})},n)}))})})};var F="Products-module_container__bF2LF",Q="Products-module_view__l857X",$="Products-module_products__AoDrY",Y="Products-module_category__Sp7dE",K="Products-module_list__LH4v5";const X=(e=0,t=1,n=0)=>e*t*(1+n/100);var Z;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(Z||(Z={}));const J=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.language===t)))||{}},ee=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.language===t)))||{}},te=(e,t)=>{var n;return(null===(n=((null==e?void 0:e.options)||[]).find((({id:e})=>e===t)))||void 0===n?void 0:n.price)||0},ne=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.language===t)))||{}},re=(e,t=1)=>{const{price:n=0,vat:r=0}=e||{};return X(n,t,r)},oe=(e,n,r,o=1)=>{const a=re(e,o);return{totalPrice:a,formattedTotalPrice:t.priceFormatter(a,n,r)}},ae=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.variants)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.id===t)))||{}},ie=(e,t,n)=>{const r=ae(t,e),{vat:o}=t||{},{price:a}=r||{};return X(a,n,o)},se=(e,t)=>{var n,r;return(null===(r=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===r?void 0:r.call(n,(e=>e.language===t)))||{}},le=({product:e,variantId:n,quantity:r=1,selectedAddons:o,noVat:a=!1})=>{if(t.isEmpty(e))return{price:0,optionsPrice:0,total:0};const i=Object.assign(Object.assign({},e),{vat:a?0:e.vat}),s=((e,t={},n)=>((null==e?void 0:e.addons)||[]).filter((e=>Object.prototype.hasOwnProperty.call(t,e.id))).reduce(((e,n)=>{const{id:r,selectType:o}=n;if(o===Z.SINGLE){const o=t[r];return e+te(n,o)}return e+(t[r]||[]).reduce(((e,t)=>e+te(n,t)),0)}),0)*n)(i,o,r),l=n?ie(n,i,r):re(i,r);return{price:l,optionsPrice:s,total:l+s}};var de;!function(e){e.LIST="list",e.GRID="grid"}(de||(de={}));const ce=(e,n="USD",r="en")=>{const{price:o,vat:a,quantity:i,optionsPrice:s}=e||{},l=X(o,i,a)+s*i;return{totalPrice:l,formattedTotalPrice:t.priceFormatter(l,n,r)}},ue=(e,t,n)=>{if(!e)throw new Error("Product ID is required");let r=`${e}`;t&&(r+=`-${t}`);const o=Object.entries(n||{}).map((([e,t])=>{if(!e||!t)return null;const n=Array.isArray(t)?t.filter(Boolean).join("-"):`${t}`;return n?`${e}-${n}`:null})).filter(Boolean).join("-");return o&&(r+=`-${o}`),r},me=n.createContext({cart:{},isCartOpen:!1,addProduct:()=>{},updateProduct:()=>{},setIsCartOpen:()=>{},removeAllProductVariants:()=>{}}),_e=({children:r})=>{const[o,i]=n.useState({}),[s,l]=n.useState(!1),d=({product:e,quantity:n,isAddOperation:r,variantId:o,selectedAddons:s})=>{if(t.isEmpty(e)||n<0)return;const{id:l,vat:d=0}=e,c=ue(l,o,s),{price:u,optionsPrice:m}=le({product:e,variantId:o,quantity:1,selectedAddons:s,noVat:!0});i((e=>{const t=e[c],i=r?((null==t?void 0:t.quantity)||0)+n:n;if(i<=0){const t=e,n=c;t[n];return a(t,["symbol"==typeof n?n:n+""])}return Object.assign(Object.assign({},e),{[c]:{productId:l,price:u,optionsPrice:m,quantity:i,vat:d,variantId:o,selectedAddons:s}})}))},c=({product:e,quantity:t=1,variantId:n,selectedAddons:r})=>d({product:e,quantity:t,variantId:n,selectedAddons:r,isAddOperation:!0}),u=({product:e,quantity:t=1,variantId:n,selectedAddons:r})=>d({product:e,quantity:t,variantId:n,selectedAddons:r,isAddOperation:!1}),m=e=>{if(!e||t.isEmpty(o))return;const n=Object.entries(o).reduce(((t,[n,r])=>(r.productId!==e&&(t[n]=r),t)),{});i(n)},_=n.useMemo((()=>({cart:o,isCartOpen:s,addProduct:c,updateProduct:u,setIsCartOpen:l,removeAllProductVariants:m})),[o,s]);return e.jsx(me.Provider,{value:_,children:r})},he=()=>n.useContext(me);var pe={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",image:"ProductsListItem-module_image__h6Wbi",addToCart:"ProductsListItem-module_addToCart__WXrQZ",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26"};const ge=({product:a,currency:i,language:s,onClick:l})=>{var d,c;const{addProduct:m}=he(),{image160:_,volume:h}=a||{},{name:p,description:g}=n.useMemo((()=>ne(a,s)),[a,s]),{formattedTotalPrice:v}=n.useMemo((()=>oe(a,i,s)),[a,i,s]),f=(null===(d=null==a?void 0:a.variants)||void 0===d?void 0:d.length)>0,x=(null===(c=null==a?void 0:a.addons)||void 0===c?void 0:c.length)>0,j=!!_;return e.jsxs("div",{className:t.classNames(pe,{container:!0,isClickable:!!l,noImage:!j}),onClick:l,children:[e.jsxs(r.Row,{justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:pe.info,children:e.jsxs(r.Column,{gap:.25,children:[e.jsx("h3",{className:pe.name,children:p}),e.jsx("p",{className:pe.description,children:g}),e.jsxs(r.Row,{className:pe.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:v}),!!h&&e.jsx(r.Text,{color:"muted",children:h})]})]})}),j&&e.jsx(M,{src:u(_),alt:p||"menu",className:pe.image,loading:"lazy",width:160,height:90})]}),e.jsx("div",{className:pe.addToCart,children:e.jsx(r.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(f||x)&&l)return l();m({product:a}),t.trackEvent(b,{name:p,quantity:1})},icon:o.Plus,type:r.UIElementType.DEFAULT})})]})};var ve={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",addToCart:"ProductsGridItem-module_addToCart__gYVrI",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5"};const fe=({product:a,currency:i,language:s,onClick:l})=>{var d,c;const{addProduct:m}=he(),{volume:_,image580:h,image160:p,image1024:g}=a||{},v=h||g||p,{name:f,description:x}=n.useMemo((()=>ne(a,s)),[a,s]),{formattedTotalPrice:j}=n.useMemo((()=>oe(a,i,s)),[a,i,s]),y=(null===(d=null==a?void 0:a.variants)||void 0===d?void 0:d.length)>0,I=(null===(c=null==a?void 0:a.addons)||void 0===c?void 0:c.length)>0;return e.jsx("div",{className:ve.container,children:e.jsxs("div",{className:t.classNames(ve,{content:!0,isClickable:!!l,noImage:!v}),onClick:l,children:[v&&e.jsx("div",{className:ve.imageContainer,children:e.jsx(M,{src:u(v),alt:f||"menu",className:ve.image,loading:"lazy",width:580,height:326})}),e.jsx("div",{className:ve.info,children:e.jsx("div",{className:ve.data,children:e.jsxs(r.Column,{gap:.25,children:[e.jsx("h3",{className:ve.name,children:f}),e.jsx("p",{className:ve.description,children:x}),e.jsxs(r.Row,{className:ve.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{children:j}),!!_&&e.jsx(r.Text,{color:"white",className:ve.volume,children:_})]})]})})}),e.jsx("div",{className:ve.addToCart,children:e.jsx(r.IconButton,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(y||I)&&l)return l();m({product:a}),t.trackEvent(b,{name:f,quantity:1})},icon:o.Plus,type:r.UIElementType.DEFAULT})})]})})};var xe={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW"};const je={en:{},az:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et",Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Cart":"Səbətə əlavə edildi","Product choices":"Seçimlər","In order":"Sifarişdə"},tr:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte"},nl:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling"},et:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses"},ru:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет товаров","Add items":"Добавить товары",Subtotal:"Итого",Events:"События","Product choices":"Варианты товара","In order":"В заказе"}},ye=e=>{const{language:t}=j(),n=e||t;return{t:e=>{var t;return(null===(t=je[n])||void 0===t?void 0:t[e])||e}}},Ie=()=>{const{cart:e}=he();return Object.values(e||{}).reduce(((e,t)=>e+t.quantity),0)};var Pe={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk"};const Ce=({isDecreaseDisabled:n=!1,quantity:a=1,size:i="md",onIncrease:s,onDecrease:l})=>e.jsxs(r.Row,{className:t.classNames(Pe,{container:!0},[Pe[i]]),justifyContent:"space-between",gap:0,children:[e.jsx("div",{className:t.classNames(Pe,{quantityAction:!0,isDisabled:n}),onClick:l,children:e.jsx(r.SVGIcon,{icon:o.Minus})}),e.jsx("div",{className:Pe.quantityValue,children:a}),e.jsx("div",{className:Pe.quantityAction,onClick:s,children:e.jsx(r.SVGIcon,{icon:o.Plus})})]});var be="ProductInCart-module_container__oSrwq",Ae="ProductInCart-module_title__Vnc4l";const Ne=({productId:n,onModalClose:a})=>{const{setIsCartOpen:i,removeAllProductVariants:s}=he(),{t:l}=ye(),d=(e=>{const{cart:n}=he();return t.isEmpty(n)||!e?0:Object.values(n).filter((t=>t.productId===e)).reduce(((e,t)=>e+t.quantity),0)})(n);return d<=0?null:e.jsxs(r.Flex,{className:be,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[e.jsxs(r.Flex.Item,{flex:1,className:Ae,children:[l("In order")," (",d,")"]}),e.jsx(r.Flex.Item,{flex:0,children:e.jsxs(r.Row,{children:[e.jsx(r.IconButton,{icon:o.Trash,onClick:()=>{s(n)},type:r.UIElementType.DANGER,tooltip:l("Remove from order")}),e.jsx(r.IconButton,{icon:o.ShoppingBag,onClick:()=>{i(!0),a&&a()},type:r.UIElementType.SUCCESS,tooltip:l("View order")})]})})]})};var Se={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ"};const we=({product:o,selectedVariant:a,focusedSection:i,onSelectVariant:s})=>{const{language:l,currency:d}=j(),{t:c}=ye(),u=n.useRef(null),{variants:m}=o||{},_="variant"===i;return n.useEffect((()=>{_&&u.current&&u.current.scrollIntoView({behavior:"smooth"})}),[i]),e.jsxs(r.Column,{className:t.classNames(Se,{container:!0,focused:_}),gap:1,fullWidth:!0,children:[e.jsx("div",{className:Se.variantsTitle,ref:u,children:c("Product choices")}),(m||[]).map((n=>{const{id:i}=n||{},{formattedTotalPrice:c}=(({variantId:e,currency:n="USD",language:r="en",product:o,quantity:a=1})=>{const i=ie(e,o,a);return{totalPrice:i,formattedTotalPrice:t.priceFormatter(i,n,r)}})({variantId:i,language:l,currency:d,product:o}),{title:u}=se(n,l);return e.jsxs(r.Row,{justifyContent:"space-between",onClick:()=>s(i),className:Se.variant,children:[e.jsx(r.Input,{label:u,name:"variant",onChange:()=>s(i),checked:a===i,type:r.InputType.RADIO,size:"small"}),e.jsx("div",{className:Se.variantPrice,children:c})]},i)}))]})};var ke={container:"ProductAddons-module_container__DRnT7"};const Te=({product:n,selectedAddons:o,onOptionSelect:a})=>{const{language:i,currency:s}=j(),{addons:l}=n||{};return e.jsx(r.Column,{className:ke.container,gap:1.5,fullWidth:!0,children:(l||[]).map((n=>{const{id:l,options:d,selectType:c}=n||{},{title:u}=J(n,i);return e.jsxs(r.Column,{children:[e.jsx(r.Text,{variant:"bold",children:u}),e.jsx(r.Column,{gap:1,fullWidth:!0,children:(d||[]).map((n=>{const{id:d}=n||{},{formattedTotalPrice:u}=(({option:e,currency:n="USD",language:r="en"})=>{const{price:o}=e||{};return{totalPrice:o,formattedTotalPrice:t.priceFormatter(o,n,r)}})({option:n,language:i,currency:s}),{title:m}=ee(n,i),_=c===Z.SINGLE,h=_?o[l]===d:(o[l]||[]).includes(d);return e.jsxs(r.Row,{justifyContent:"space-between",className:ke.option,children:[e.jsx(r.Input,{label:m,name:`option-${l}`,onChange:()=>a({addonId:l,optionId:d,isSingle:_,isRemove:!_&&h}),checked:h,type:_?r.InputType.RADIO:r.InputType.CHECKBOX,size:"small"}),e.jsx("div",{className:ke.optionPrice,children:u})]},d)}))})]},l)}))})},Le=({product:a,onClose:i})=>{const{language:s,currency:l}=j(),{addProduct:d,updateProduct:c}=he(),[m,_]=n.useState(1),[h,p]=n.useState(!1),[g,v]=n.useState(null),[f,x]=n.useState(null),[y,I]=n.useState({}),P=n.useRef(null),{t:C}=ye(),A=(({productId:e,variantId:n,selectedAddons:r})=>{var o;const{cart:a}=he();return t.isEmpty(a)||!e?0:(null===(o=a[ue(e,n,r)])||void 0===o?void 0:o.quantity)||0})({productId:null==a?void 0:a.id,variantId:g,selectedAddons:y}),{name:N,description:S}=n.useMemo((()=>ne(a,s)),[a,s]),{formattedTotalPrice:w}=n.useMemo((()=>oe(a,l,s)),[a,l,s]),{formattedTotalPrice:k}=n.useMemo((()=>(({product:e,variantId:n,quantity:r=1,currency:o,language:a,selectedAddons:i,noVat:s=!1})=>{const{total:l}=le({product:e,variantId:n,quantity:r,selectedAddons:i,noVat:s});return{totalPrice:l,formattedTotalPrice:t.priceFormatter(l,o,a)}})({product:a,quantity:m,language:s,currency:l,variantId:g,selectedAddons:y})),[a,m,s,l,g,y]),T=h?0===m:1===m,L=n.useMemo((()=>C(h?0===m?"Remove from order":"Update order":"Add to order")),[h,m]);n.useEffect((()=>{_(A>0?A:1),p(A>0)}),[A,a]),n.useEffect((()=>{v(null),I({})}),[a]);const R=e=>{-1===e&&T||_((t=>Math.max(0,t+e)))};if(t.isEmpty(a))return null;const{image1024:E,volume:O,variants:D,addons:G}=a,q=(null==D?void 0:D.length)>0,V=(null==G?void 0:G.length)>0;return e.jsx("div",{className:xe.container,onClick:e=>{var t,n;(null===(n=null===(t=null==P?void 0:P.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||i&&i()},children:e.jsx(r.Modal,{onClose:i,ref:P,noBodyPadding:!0,size:"small",content:e.jsxs("div",{className:xe.content,children:[e.jsxs(r.Column,{gap:0,children:[E&&e.jsx(M,{src:u(E),width:1024,height:400,alt:N||"product",className:xe.image}),e.jsxs(r.Column,{className:xe.details,gap:1,children:[e.jsx("h2",{className:xe.name,children:N}),e.jsxs(r.Row,{justifyContent:"space-between",children:[e.jsx("div",{className:xe.price,children:w}),e.jsx("div",{className:xe.volume,children:O})]}),e.jsx("div",{className:xe.description,children:S})]}),(q||V)&&e.jsxs(r.Column,{gap:0,className:xe.choices,children:[q&&e.jsx(we,{product:a,selectedVariant:g,focusedSection:f,onSelectVariant:v}),V&&e.jsx(Te,{product:a,selectedAddons:y,onOptionSelect:({addonId:e,optionId:t,isSingle:n,isRemove:r=!1})=>{I((o=>{if(n)return Object.assign(Object.assign({},o),{[e]:t});const a=o[e]||[],i=r?a.filter((e=>e!==t)):[...new Set([...a,t])];return Object.assign(Object.assign({},o),{[e]:i})}))}})]})]}),e.jsx("div",{className:xe.close,children:e.jsx(r.IconButton,{onClick:i,icon:o.Close})})]}),footer:e.jsxs(r.Column,{children:[e.jsx(Ne,{productId:null==a?void 0:a.id,onModalClose:i}),e.jsxs(r.Row,{className:xe.addToCart,gap:.5,children:[e.jsx(Ce,{isDecreaseDisabled:T,onDecrease:()=>R(-1),onIncrease:()=>R(1),quantity:m}),e.jsx(r.Button,{className:xe.addAction,label:e.jsxs(r.Row,{fullWidth:!0,justifyContent:"space-between",children:[e.jsx("span",{className:xe.actionTitle,children:L}),e.jsx("span",{children:k})]}),onClick:()=>{var e;if((null===(e=null==a?void 0:a.variants)||void 0===e?void 0:e.length)>0&&!g)return x("variant"),void setTimeout((()=>{x(null)}),200);h?c({product:a,quantity:m,variantId:g,selectedAddons:y}):(d({product:a,quantity:m,variantId:g,selectedAddons:y}),t.trackEvent(b,{name:N,quantity:m})),i&&i()},size:"xl",fullWidth:!0})]})]})})})};var Re="Cart-module_container__3KQtx",Ee="Cart-module_content__rkiZa",Oe={container:"CartStepper-module_container__4CF1L",count:"CartStepper-module_count__E-RBg",actionText:"CartStepper-module_actionText__-rVKA",totalPrice:"CartStepper-module_totalPrice__QboRN",isClickable:"CartStepper-module_isClickable__mDptU",flexWide:"CartStepper-module_flexWide__eXxCr",slidein:"CartStepper-module_slidein__d5JQ-",fadeInOut:"CartStepper-module_fadeInOut__pS8nn",heightAnimation:"CartStepper-module_heightAnimation__7-e5Z",fadein:"CartStepper-module_fadein__-Ba0-",floatAnimation:"CartStepper-module_floatAnimation__rq6zX",bottomSheet:"CartStepper-module_bottomSheet__1wHHD",slideRightToLeft:"CartStepper-module_slideRightToLeft__0KLAo"};const De=({actionText:n,onClick:o})=>{const a=Ie(),{formattedTotalPrice:i}=(()=>{const{cart:e}=he(),{currency:n,language:r}=j(),o=Object.values(e||{}).reduce(((e,t)=>{const{totalPrice:n}=ce(t);return e+n}),0);return{totalPrice:o,formattedTotalPrice:t.priceFormatter(o,n,r)}})();return e.jsxs(r.Flex,{className:t.classNames(Oe,{container:!0,isClickable:!!o}),justifyContent:"space-between",alignItems:"center",onClick:o,children:[e.jsx(r.Flex.Item,{flex:1,children:e.jsxs(r.Row,{alignItems:"center",children:[e.jsx("div",{className:Oe.count,children:a}),e.jsx("div",{className:Oe.actionText,children:n})]})}),e.jsx(r.Flex.Item,{className:Oe.totalPrice,flex:1,children:i})]})},Ge=()=>{const{setIsCartOpen:t}=he(),{t:n}=ye();return Ie()<=0?null:e.jsx("div",{className:Re,children:e.jsx("div",{className:Ee,children:e.jsx(De,{onClick:()=>t(!0),actionText:n("View order")})})})};var qe={container:"CartDrawer-module_container__zvapw",content:"CartDrawer-module_content__ELSiG"},Ve="CartItem-module_container__At7lj",Be="CartItem-module_image__D-zzG",Me="CartItem-module_data__Lo3Fb",ze="CartItem-module_name__EksZu",Ue="CartItem-module_price__yJxl6";const We=e=>{var t;const{products:n}=j();return(null===(t=null==n?void 0:n.find)||void 0===t?void 0:t.call(n,(({id:t})=>t===e)))||{}},He=({productId:t,variantId:n,min:r=1,size:o="md",selectedAddons:a})=>{const i=(({productId:e,variantId:t,selectedAddons:n})=>{const{cart:r}=he(),o=r[ue(e,t,n)];return(null==o?void 0:o.quantity)||1})({productId:t,variantId:n,selectedAddons:a}),s=We(t),{updateProduct:l}=he(),d=i===r;return e.jsx(Ce,{isDecreaseDisabled:d,onDecrease:()=>l({product:s,quantity:i-1,variantId:n,selectedAddons:a}),onIncrease:()=>l({product:s,quantity:i+1,variantId:n,selectedAddons:a}),quantity:i,size:o})},Fe=({item:n,product:o,language:a})=>{const{selectedAddons:i}=n||{};return e.jsx(e.Fragment,{children:Object.entries(i||{}).map((([n,i])=>{const s=((e,t)=>((null==e?void 0:e.addons)||[]).find((({id:e})=>e===t))||{})(o,Number(n));if(t.isEmpty(s)||t.isEmpty(s.options)||!Array.isArray(s.options))return null;let l="";if(Array.isArray(i)){const e=s.options.filter((({id:e})=>i.includes(e)));if(t.isEmpty(e))return null;l=e.map((e=>{const{title:t}=ee(e,a);return t})).filter(Boolean).join(", ")}else{const e=s.options.find((({id:e})=>e===i));if(t.isEmpty(e))return null;const{title:n}=ee(e,a);l=n}const{title:d}=J(s,a);return e.jsxs(r.Text,{color:"muted",variant:"small",children:[d,": ",l]},n)})).filter(Boolean)})},Qe=({item:t})=>{const{productId:o,variantId:a,selectedAddons:i}=t||{},s=We(o),l=ae(s,a),{language:d,currency:c}=j(),{image160:m}=s,{title:_}=se(l,d),{name:h}=n.useMemo((()=>ne(s,d)),[s,d]),{formattedTotalPrice:p}=n.useMemo((()=>ce(t,c,d)),[t,c,d]);return e.jsxs(r.Row,{className:Ve,gap:1,alignItems:"flex-start",children:[m&&e.jsx(M,{src:u(m),alt:h||"menu",className:Be,loading:"lazy",width:80,height:45}),e.jsxs("div",{className:Me,children:[e.jsx("div",{className:ze,children:h}),e.jsxs(r.Column,{gap:0,children:[!!_&&e.jsx(r.Text,{color:"muted",variant:"small",children:_}),e.jsx(Fe,{item:t,product:s,language:d})]}),e.jsx("div",{className:Ue,children:p})]}),e.jsx(He,{productId:o,variantId:a,selectedAddons:i,size:"sm",min:0})]})},$e=()=>{const{isCartOpen:o,cart:a,setIsCartOpen:i}=he(),s=n.useRef(null),{t:l}=ye(),d=t.isEmpty(a),c=()=>i(!1);return o?e.jsx("div",{className:qe.container,onClick:e=>{var t,n;(null===(n=null===(t=null==s?void 0:s.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||c()},children:e.jsx(r.Drawer,{ref:s,onClose:c,isOpen:o,title:l("Your order"),content:e.jsx("div",{className:qe.content,children:d?e.jsx((()=>e.jsxs(r.Column,{className:qe.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e.jsx(r.Text,{variant:"h2",children:l("Empty order")}),e.jsx(r.Description,{text:l("You don't have any items in your order")})]})),{}):e.jsx("div",{className:qe.items,children:Object.keys(a||{}).map((t=>e.jsx(Qe,{item:a[t]},t)))})}),footer:d?e.jsx(r.Button,{label:l("Add items"),onClick:c,type:r.UIElementType.PRIMARY,size:"xl",fullWidth:!0}):e.jsx(De,{actionText:l("Subtotal")})})}):null},Ye=n.memo((({categoryProductMap:a=[],currency:i,language:s,productBlocksRef:l,containerRef:d,onCategoryInView:c})=>{const[u,m]=n.useState(null),[_,h]=n.useState(de.LIST),p=[{icon:o.List,type:de.LIST},{icon:o.Grid,type:de.GRID}],g=e=>{const{name:n}=ne(e,s);t.trackEvent(C,{name:n}),m(e)};return n.useEffect((()=>{const e=new IntersectionObserver((e=>{var t;const n=((null===(t=null==d?void 0:d.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let r=null,o=1/0;e.forEach((e=>{if(e.isIntersecting){const t=e.boundingClientRect,a=t.top+t.height/2,i=Math.abs(a-n);i<o&&(o=i,r=e.target.getAttribute("data-category-id"))}})),r&&c(Number(r))}),{threshold:.1});return Object.entries(l.current||{}).forEach((([t,n])=>{n&&(n.setAttribute("data-category-id",t),e.observe(n))})),()=>{e.disconnect()}}),[l,d]),e.jsx(_e,{children:e.jsxs("div",{className:F,children:[e.jsx(r.Row,{className:Q,alignItems:"center",children:p.map((({icon:n,type:o})=>e.jsx(r.IconButton,{icon:n,onClick:()=>(e=>{h(e),t.trackEvent(A,{name:e})})(o),type:o===_?r.UIElementType.PRIMARY:r.UIElementType.DEFAULT},o)))}),e.jsx(r.Column,{children:(a||[]).map((t=>{const{name:n}=S(t,s),{id:o,products:a}=t;return e.jsxs("div",{className:$,ref:e=>{e&&(l.current[o]=e)},"data-category-id":o,children:[e.jsx("h2",{className:Y,children:n}),e.jsx("div",{className:K,children:e.jsx(r.Column,{gap:0,children:(a||[]).map((t=>_===de.GRID?e.jsx(fe,{product:t,currency:i,language:s,onClick:()=>g(t)},t.id):e.jsx(ge,{product:t,currency:i,language:s,onClick:()=>g(t)},t.id)))})})]},o)}))}),e.jsx(Le,{product:u,onClose:()=>m(null)}),e.jsx(Ge,{}),e.jsx($e,{})]})})}),((e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language));Ye.displayName="Products";var Ke="Branches-module_branches__sOuoV",Xe="Branches-module_list__vYoT2",Ze="Branches-module_name__K0Z-4";const Je=({branches:t=[],rootPath:n="",onBranchSelect:o})=>{const a=({children:t,id:r})=>o?e.jsx("div",{onClick:()=>o(r),children:t}):e.jsx("a",{href:`${n}/${r}`,children:t});return e.jsx("div",{className:Ke,children:e.jsx(r.Container,{className:Xe,children:t.map((({id:t,name:n})=>e.jsx(a,{id:t,children:e.jsx(r.Card,{noBottomMargin:!0,children:e.jsx(r.Flex,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:e.jsx("h2",{className:Ze,children:n})})})},t)))})})},et=({data:r})=>{var o;const{name:a,coverImage:l,logoImage:c,branches:u=[],branchId:h,language:p,categories:f,products:x,currency:j,instagram:y,facebook:I,whatsapp:C,telegram:b,tiktok:A,rootPath:N,hostname:w,onBranchSelect:k}=r||{},T=u.length<=1,L=((e,t)=>{const n=t.reduce(((e,t)=>{const n=Number(t.categoryId);return e[n]||(e[n]=[]),e[n].push(t),e}),{});return e.map((e=>Object.assign(Object.assign({},e),{products:n[Number(e.id)]||[]}))).filter((e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0}))})(f,x),R=(()=>{var e;return T?(null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.id)?u[0]:{}:u.find((e=>e.id===Number(h)))})(),E=T||!(null==R?void 0:R.name)?a:(null==R?void 0:R.name)||"",[O,D]=n.useState(null===(o=null==f?void 0:f[0])||void 0===o?void 0:o.id),G=n.useRef({}),q=n.useRef(null),V=n.useRef(!0),{url:B,domain:M}=((e,t)=>{const n=v.includes(e)?e:g;return{url:`https://${n}/${t||"en"}`,domain:n}})(w,p),z=e=>i(void 0,void 0,void 0,(function*(){V.current=!1,D(e),(e=>{var t;const n=null===(t=null==G?void 0:G.current)||void 0===t?void 0:t[e];n&&(setTimeout((()=>{n.scrollIntoView({behavior:"smooth",block:"start"})}),100),setTimeout((()=>{V.current=!0}),1e3))})(e)}));return n.useEffect((()=>{(()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search),n=Number(e.get("category"));if(!n)return;const r=(f||[]).find((({id:e})=>e===n));t.isEmpty(r)||z(n)})()}),[]),e.jsxs("div",{className:s,ref:q,children:[e.jsx(W,{branch:R,name:E,coverImage:_(l),logoImage:m(c),instagram:y,facebook:I,whatsapp:C,telegram:b,tiktok:A}),T||h?e.jsxs(e.Fragment,{children:[e.jsx(H,{categoryProductMap:L,language:p,selectedCategoryId:O,onSelectCategory:z}),e.jsx(Ye,{currency:j,language:p,productBlocksRef:G,containerRef:q,categoryProductMap:L,onCategoryInView:e=>{if(!(null==V?void 0:V.current))return;const n=((e,n,r)=>{var o;const a=null===(o=null==n?void 0:n.find)||void 0===o?void 0:o.call(n,(({id:t})=>t===e));if(t.isEmpty(a))return"";const{name:i}=S(a,r);return i})(e,f,p);t.trackEvent(P,{name:n}),D(e)}})]}):e.jsx(Je,{branches:u,onBranchSelect:k,rootPath:N}),!!w&&e.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:B,className:d,children:M})]})};var tt={};const nt=({currentGoal:t,language:o,setGoal:a})=>{const{t:i}=ye(o),s=n.useRef({}),l=e=>{switch(e){case P:return i("Scrolled to Category");case I:return i("Category Selected");case C:return i("Product Details");case b:return i("Product Added to Cart");default:return""}},d=n.useCallback((e=>{var t,n;a(e),null===(n=null===(t=null==s?void 0:s.current)||void 0===t?void 0:t.close)||void 0===n||n.call(t)}),[a]);return e.jsx(r.DropDown,{action:l(t),actionSize:"large",type:r.UIElementType.BORDERED_PRIMARY,closeRef:s,menu:e.jsx("div",{className:tt.toolbarMenu,children:N.map((t=>e.jsx(r.DropDownMenuItem,{onClick:()=>d(t),children:l(t)},t)))})})};exports.Events=({data:t,isLoading:n=!1,loadingImage:o,language:a,goal:i,setGoal:s})=>{const{t:l}=ye(a);return e.jsx(r.Card,{title:l("Events"),toolbar:e.jsx(nt,{language:a,currentGoal:i,setGoal:s}),children:n?e.jsx(r.Loading,{image:o}):e.jsx(r.BarChart,{data:t})})},exports.PublicMenu=({data:t})=>e.jsx(x,{value:t,children:e.jsx(et,{data:t})});
2
2
  //# sourceMappingURL=index.js.map