PageSourceSearch

https://glovoapp.com/_next/static/chunks/70355-de0c20676a2d19a7.js

js glovoapp.com collected 2026-09-27 20:54:17 UTC 42,271 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70355],{2621:(e,t,n)=>{n.d(t,{ER:()=>d,O:()=>c,PF:()=>u,le:()=>s,v5:()=>l});var o=n(41795),r=n(20721),a=n(17593),i=n(474);let s=()=>{let e=(0,i.getWindow)().localStorage.getItem(r.aF);try{let t=JSON.parse(e),n=a.q.safeParse(t);return n.success?n.data:null}catch(e){return null}},l=e=>{let{fingerprintsExpirationTime:t,urn:n}=e;(0,i.getWindow)().localStorage.setItem(r.aF,JSON.stringify({fingerprintsExpirationTime:t,urn:n}))},d=e=>{let{fingerprintsExpirationTime:t}=e;return!t||t<Date.now()},c=()=>{let e=s();return(null==e?void 0:e.urn)||null},u=()=>{let e=(0,i.getWindow)().localStorage.getItem(r.ol);if(e)return e;{let e=(0,o.A)();return(0,i.getWindow)().localStorage.setItem(r.ol,e),e}}},8375:(e,t,n)=>{n.d(t,{B:()=>i,J:()=>a});var o=n(86470);let r={[n(42719).i.KASPI]:"kaspi"},a=e=>{let t=function(e){try{let{hostname:t}=new URL(e);if(/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(t)||t.includes(":"))return null;let n=t.split(".");if(n.length>2)return n[0];return null}catch(e){return null}}(e);if(!t)return null;for(let e of Object.keys(r))if(r[e]===t)return e;return null},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"login"===e?o.H.GlovoLoginPage:"kaspi-router"===e?o.H.SuperappDirect:o.H.Other}}
1,10812:(e,t,n)=>{n.d(t,{z:()=>os});var o={};n.r(o),n.d(o,{UserLoggedIn:()=>I,UserSignedUp:()=>T});var r={};n.r(r),n.d(r,{CheckoutOrderConfirmation:()=>L});var a={};n.r(a),n.d(a,{AddressCheckClickedEvent:()=>x,AddressCreationClicked:()=>F,AddressDetailsScreenOpenedEvent:()=>H,AddressFlowLandingScreenClickedEvent:()=>K,AddressFlowLandingScreenOpenedEvent:()=>q,LocationPreferenceSubmittedEvent:()=>Q});var i={};n.r(i),n.d(i,{AuthenticationOptionSelectedEvent:()=>ef,AuthenticationOptionsLoadedEvent:()=>eS,InvalidEmailMessageShownEvent:()=>ez,PasswordResetClickedEvent:()=>eH,PasswordResetFailedEvent:()=>eK,PhoneVerificationCallRequestedEvent:()=>eN,PhoneVerificationFailedEvent:()=>eD,PhoneVerificationLoadedEvent:()=>eV,PhoneVerificationMethodButtonClickedEvent:()=>eB,PhoneVerificationStartedEvent:()=>eR,PhoneVerificationSucceededEvent:()=>eW,ResetAccountTriggeredEvent:()=>eG,SignInButtonClickedEvent:()=>eA,SignInLandingLoadedEvent:()=>eU,SuperAppAuthenticationSucceededEvent:()=>eO,SuperAppBottomSheetClickedEvent:()=>ex,SuperAppBottomSheetLoadedEvent:()=>eF,SuperAppLoginFailedEvent:()=>eL,SuperAppMergeAccountStartedEvent:()=>eb,SuperAppModalDismissedEvent:()=>eT,SuperAppModalFailedEvent:()=>ek,SuperAppModalShownEvent:()=>eI,SuperAppSignInButtonClickedEvent:()=>eY,UserLogInSucceededEvent:()=>eP,UserSignUpSucceededEvent:()=>ej,WrongCredentialsMessageShownEvent:()=>eM});var s={};n.r(s),n.d(s,{CheckoutButtonClicked:()=>e8,CheckoutLoaded:()=>e7,CheckoutOrderLoaded:()=>e3,CheckoutTemplateViewed:()=>e4,DeliveryOptionSelected:()=>ta,EditRestrictedButtonClicked:()=>tn,PaymentProcessingFinished:()=>tr,PrimeCheckoutBoxDeselected:()=>te,PrimeCheckoutBoxSelected:()=>e9,ReverifyWithBankIdButtonClicked:()=>to,VerifyWithBankIdButtonClicked:()=>tt});var l={};n.r(l),n.d(l,{CategoryGroupLoadedEvent:()=>tu,CategoryGroupOpenedEvent:()=>tg,HomeScreenLoadedEvent:()=>tc});var d={};n.r(d),n.d(d,{OrderRatedUpdatedEvent:()=>tw,OrderRatingScreenLoadedEvent:()=>th,RatingDismissButtonClickedEvent:()=>tC});var c={};n.r(c),n.d(c,{ContactUsClickedEvent:()=>tI,OrderDetailsLoadedEvent:()=>tk,OrderTrackingLoadedEvent:()=>tf,OrderTrackingUpdatedEvent:()=>tA});var u={};n.r(u),n.d(u,{OrderDetailsViewedEvent:()=>tb,ReorderButtonClickedEvent:()=>tO});var g={};n.r(g),n.d(g,{PaymentProcessingTriggeredEvent:()=>tN});var p={};n.r(p),n.d(p,{PrimeLandingPageInteracted:()=>tj,PrimeSettingsViewed:()=>tG,PrimeSubscriptionConfirmed:()=>tz,PrimeTutorialShown:()=>tP});var v={};n.r(v),n.d(v,{SearchAutosuggestionsClickedEvent:()=>tq,SearchAutosuggestionsLoadedEvent:()=>tK,SearchBarClickedEvent:()=>tV,SearchErrorShownEvent:()=>tF,SearchSuggestionsClickedEvent:()=>tH,SearchSuggestionsLoadedEvent:()=>tx});var E={};n.r(E),n.d(E,{AddCartClickedEvent:()=>t4,BannerImpressionsLoadedEvent:()=>nt,BannerStoreClickedEvent:()=>nn,BottomSheetDismissedEvent:()=>ns,BottomSheetLoadedEvent:()=>ni,RemoveCartClickedEvent:()=>t9,ScreenOpenedEvent:()=>nl,ShopClickedEvent:()=>ne,ShopImpressionsLoadedEvent:()=>no,ShopListUpdatedEvent:()=>nr,VirtualPageViewEvent:()=>na,WebToAppBannerClickedEvent:()=>nd,WebToAppBannerShownEvent:()=>nc});var h={};n.r(h),n.d(h,{CartLoadedEvent:()=>nf,CategoryDetailsLoadedEvent:()=>nA,CheckoutClickedEvent:()=>nN,ProductChoiceOpenedEvent:()=>nk,ProductImpressionsLoadedEvent:()=>nI,SearchResultsLoadedEvent:()=>nB,ShopDetailsLoadedEvent:()=>nT,SubCategoryDetailsClickedEvent:()=>nL,SwimlaneSwipedEvent:()=>nb,SwimlanesLoadedEvent:()=>nO,ViewAllClickedEvent:()=>nD});var w={};n.r(w),n.d(w,{FiltersAppliedEvent:()=>nH,ShopListExpandedEvent:()=>nG,ShopListLoadedEvent:()=>nM,StoresLoadedEvent:()=>nY,SwimlaneSwipedEvent:()=>nx,WidgetImpressionsLoadedEvent:()=>nF,WidgetLoadedEvent:()=>nV});var C={};n.r(C),n.d(C,{TestEventPerseus:()=>nK});var m={};n.r(m),n.d(m,{ConsentAnsweredEvent:()=>nQ});var y={};n.r(y),n.d(y,{UserSignedUp:()=>n6});var _={};n.r(_),n.d(_,{CheckoutLoaded:()=>n8});var S={};n.r(S),n.d(S,{AddCartClickedEvent:()=>n7,CategoryGroupOpened:()=>n3});var f={};n.r(f),n.d(f,{ShopDetailsLoadedEvent:()=>n4});var A=n(60056),k=n(79556);let I=e=>"userLoggedIn",T=e=>"userSignedUp",L=e=>"checkoutOrderConfirmation",b={...o,...r},O="google-tag-manager-script";var D=n(21081),N=n(474);let B=async e=>{(0,N.getWindow)().dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"}),W(e),await R(e)},R=e=>new Promise((t,n)=>{!function(){if((0,N.getWindow)().document.getElementById(O))return t();let o="".concat("/gtm-metrics/","?id=").concat(e,"&l=dataLayer"),r=(0,N.getWindow)().document.createElement("script");r.id=O,r.src=o,r.async=!0,r.addEventListener("load",()=>
1{D.a.green("GTM","Loaded!"),t()},{once:!0}),r.addEventListener("error",()=>{n(Error("Failed to load GTM script from Google Tag Gateway"))},{once:!0}),(0,N.getWindow)().document.head.appendChild(r)}()}),W=e=>{let t="".concat("https://www.googletagmanager.com/ns.html","?id=").concat(e),n=(0,N.getWindow)().document.createElement("noscript"),o=(0,N.getWindow)().document.createElement("iframe");o.setAttribute("height","0"),o.setAttribute("width","0"),o.setAttribute("style","display:none;visibility:hidden"),o.setAttribute("src",t),n.appendChild(o);let r=(0,N.getWindow)().document.querySelector("body");r&&r.insertAdjacentElement("afterbegin",n)},U={googleTagsManager:"essential",perseus:"essential",braze:"essential"};class P{async init(){let{googleTagManagerId:e}=(0,A.zj)();(0,N.getWindow)().dataLayer=(0,N.getWindow)().dataLayer||[],(0,N.getWindow)().dataLayer.push(["set","ads_data_redaction",!0]),await B(e);let t=new URL((0,N.getWindow)().location.href).searchParams,n={};t.forEach((e,t)=>{t.startsWith("utm_")&&(n[t]=e)}),Object.keys(n).length&&(0,N.getWindow)().dataLayer.push({event:"initUTMParameters",...n}),this.isInitialized=!0}trackEvent(e,t){let n=(0,b[e])(t),o=this.globalAttributes.userData||void 0,r=(e=>{let{user:t,attributes:n}=e,o={};(null==t?void 0:t.id)&&(o.userId=t.id);let r=null==n?void 0:n.orderId;if(r){var a;o.orderId=r,o.isFirstOrder=(null==t?void 0:t.deliveredOrdersCount)===0,(null==t?void 0:t.email)&&(o.email=t.email),(null==t||null==(a=t.phoneNumber)?void 0:a.number)&&(o.phoneNumber=t.phoneNumber.number)}return o})({user:o,attributes:t});(0,N.getWindow)().dataLayer.push({event:n,...r}),D.a.green("GTM","Event sent",{eventName:n,checkoutOrderDataLayerParams:r})}setGlobalAttribute(e,t){this.globalAttributes[e]=t}constructor(){this.name="GoogleTagManager",this.consentCategory=U.googleTagsManager,this.isInitialized=!1,this.globalAttributes={},this.canHandle=e=>Object.keys(b).includes(e)}}var j=n(29385),z=n(53890),G=n(78263),M=n(47536),Y=n(76198),V=n(89223);let F=e=>new z.p(e),x=e=>new j.O(e),H=e=>new G.E(e),K=e=>new M.Z(e),q=e=>new Y.Z(e),Q=e=>new V.i(e);var J=n(94388),$=n(37535),X=n(82121),Z=n(42672),ee=n(19765),et=n(77317),en=n(77493),eo=n(92725),er=n(38854),ea=n(45540),ei=n(99216),es=n(35484),el=n(87347),ed=n(59947),ec=n(97432),eu=n(26699),eg=n(25933),ep=n(83229),ev=n(94154),eE=n(71152),eh=n(81822),ew=n(54628),eC=n(53833),em=n(5861),ey=n(76784),e_=n(61261);let eS=e=>new $.k(e),ef=e=>new J.p(e),eA=e=>new ed.m(e),ek=e=>new eh.V(e),eI=e=>new ew.h(e),eT=e=>new eE.J(e),eL=e=>new ev.H(e),eb=e=>new Z.x(e),eO=e=>new eu.k(e),eD=e=>new eo.t(e),eN=e=>new en.O(e),eB=e=>new ea.w(e),eR=e=>new ei.n(e),eW=e=>new es.r(e),eU=e=>new ec.z(e),eP=e=>new em.e(e),ej=e=>new ey.d(e),ez=e=>new X.w(e),eG=e=>new el.K(e),eM=e=>new e_.A(e),eY=e=>new eC.e(e),eV=e=>new er.h(e),eF=e=>new ep.K(e),ex=e=>new eg.W(e),eH=e=>new ee._(e),eK=e=>new et.E(e);var eq=n(65629),eQ=n(57157),eJ=n(56086),e$=n(74366),eX=n(45667),eZ=n(10293),e0=n(58656),e1=n(56931),e2=n(94507),e5=n(70385),e6=n(65925);let e8=e=>new eq.y(e),e7=e=>new e6.s(e),e3=e=>new eQ.E(e),e4=e=>new eJ.z(e),e9=e=>new eZ.i(e),te=e=>new eX.k(e),tt=e=>new e1.g(e),tn=e=>new e$.X(e),to=e=>new e0.F(e),tr=e=>new e2.i(e),ta=e=>new e5.N(e);var ti=n(51934),ts=n(25982),tl=n(1250),td=n(26731);let tc=e=>new tl.p({...e,pageType:td.g.Home}),tu=e=>new ti.$(e),tg=e=>new ts.N(e);var tp=n(1361),tv=n(69784),tE=n(89536);let th=e=>new tv.j(e),tw=e=>new tp.q(e),tC=e=>new tE.n(e);var tm=n(80793),ty=n(58607),t_=n(76392),tS=n(81760);let tf=e=>new t_.n(e),tA=e=>new tS.L(e),tk=e=>new ty.C(e),tI=e=>new tm.Q(e);var tT=n(66230),tL=n(40688);let tb=e=>new tT.x(e),tO=e=>new tL.R(e);var tD=n(89278);let tN=e=>
1new tD.T(e);var tB=n(55491),tR=n(79345),tW=n(59646),tU=n(55755);let tP=e=>new tU.t(e),tj=e=>new tB.L(e),tz=e=>new tW.W(e),tG=e=>new tR.L(e);var tM=n(62058),tY=n(27259);let tV=e=>new tM.l(e),tF=e=>new tY.q(e),tx=e=>({name:"search_suggestions.loaded",attributes:e}),tH=e=>({name:"search_suggestions.clicked",attributes:e}),tK=e=>({name:"search_autosuggestions.loaded",attributes:e}),tq=e=>({name:"search_autosuggestions.clicked",attributes:e});var tQ=n(72115),tJ=n(59563),t$=n(88665),tX=n(5953),tZ=n(53258),t0=n(33533),t1=n(99396),t2=n(14559),t5=n(88109),t6=n(98877),t8=n(34151),t7=n(82071),t3=n(95097);let t4=e=>new tZ.x(e),t9=e=>new t2.i(e),ne=e=>new t6.G(e),nt=e=>new t0._(e),nn=e=>new t1.v(e),no=e=>new t8.y(e),nr=e=>{let t=e=>"string"==typeof e?e.split(","):e;return new t7.U({...e,loadedTabs:t(e.loadedTabs),selectedFilters:t(e.selectedFilters),storeProductIds:t(e.storeProductIds),shopListNestedDishes:t(e.shopListNestedDishes)})},na=e=>new t3.s(e),ni=e=>new tJ.m(e),ns=e=>new tQ.A(e),nl=e=>new t5.y(e),nd=e=>new t$.y(e),nc=e=>new tX.y(e);var nu=n(24423),ng=n(21639),np=n(81493),nv=n(86470),nE=n(39201),nh=n(20042),nw=n(79263),nC=n(49939),nm=n(76637),ny=n(8126),n_=n(27232),nS=n(31245);let nf=e=>new nu.O({...e,pageType:td.g.ShopDetails}),nA=e=>new ng.I({...e,pageType:td.g.ShopDetails,eventOrigin:nv.H.Shop}),nk=e=>new nE.Q({...e,pageType:td.g.ShopDetails}),nI=e=>new nh.T({...e,pageType:td.g.ShopDetails}),nT=e=>{let{searchBarClickId:t,...n}=e,o=new nC.G({...n,pageType:td.g.ShopDetails});return t&&(o.attributes.searchBarClickId=t),o},nL=e=>new nm.i({...e,pageType:td.g.ShopDetails}),nb=e=>new n_.v({...e,pageType:td.g.ShopDetails}),nO=e=>new ny.t({...e,pageType:td.g.ShopDetails}),nD=e=>new nS.E({...e,pageType:td.g.ShopDetails}),nN=e=>new np.u({...e,pageType:td.g.ShopDetails}),nB=e=>new nw.I({...e,pageType:td.g.ShopDetails});var nR=n(2300),nW=n(8535),nU=n(40575),nP=n(14213),nj=n(70413),nz=n(41817);let nG=e=>new nj.e({...e,pageType:td.g.ShopList}),nM=e=>new nz.M({...e,pageType:td.g.ShopList}),nY=e=>new nW.G(e),nV=e=>new nP.a(e),nF=e=>new nU.I(e),nx=e=>new n_.v(e),nH=e=>new nR.b(e),nK=e=>new tZ.x({shopId:"123"});var nq=n(85070);let nQ=e=>new nq.A(e),nJ={...C,...h,...w,...E,...a,...u,...v,...g,...p,...l,...i,...s,...m,...c,...d};var n$=n(19179),nX=n(96151),nZ=n(55939),n0=n(91601),n1=n(92271),n2=n(55488);class n5{async init(){(0,k.onCookiesAccepted)("essential").then(this.evaluateConsentLevel.bind(this)),(0,k.onCookiesAccepted)("functional").then(this.evaluateConsentLevel.bind(this)),(0,k.onCookiesAccepted)("marketing").then(this.evaluateConsentLevel.bind(this)),this.isInitialized=!0}setGlobalAttribute(e,t){this.globalAttributes[e]=t}trackEvent(e,t){var n,o;let r=(0,nJ[e])(t);if(!(0,nX.FR)(r))throw Error("[Perseus]: Invalid event instance: ".concat(e));this.updateExpirationDates();let a=(0,nX._t)(this.globalAttributes),i=(null==a?void 0:a.locationCountry)||null,s=this.globalAttributes.userId||null,l={...{dhhPerseusGuestId:(0,nZ.B_)().id,dhhPerseusSessionId:(0,nZ.E)().id,globalEntityId:i?"GV_".concat(i.toUpperCase()):null,dhhPerseusHitId:(0,nX.Ij)(),hitNumber:this.eventEmissionCount++,payloadTimestamp:new Date().toISOString(),consent:(0,nX.$m)(),userId:s},event:r.name,perseusEventProperties:{pageUrlPath:(0,N.getWindow)().location.pathname,...a,...r.attributes,appContext:null!=(o=null==(n=(0,n0.getHostProvider)())?void 0:n.name)?o:"web"}};if(!(0,N.getWindow)().dataLayer||!Array.isArray((0,N.getWindow)().dataLayer))throw Error("[Perseus]: GTM dataLayer is not defined");(0,N.getWindow)().dataLayer.push(l,function(){Object.keys(l).forEach(e=>this.set(e,void 0))})}async evaluateConsentLevel(){let e,t=await (0,k.getCookieConsentStatus)();if(t.essential&&t.marketing&&t.functional)e="essential_functional_marketing";else if(t.essential&&t.functional)e="essential_functional";else if(t.essential&&t.marketing)e="essential_marketing";else if(t.essential)e="essential";else throw Error("[Perseus]: Unknown consent level");(0,nX.bO)(e),(0,n2.kO)("Glovo-Perseus-Consent",e)}updateExpirationDates(){let e=(0,nZ.E)(),t=(0,nZ.B_)();e.timestamp=Date.now(),t.timestamp=Date.now(),(0,n1.TV)(n$.iE,JSON.stringify(e)),(0,n1.TV)(n$.SY,JSON.stringify(t))}constructor(){this.name="Perseus",this.consentCategory=U.perseus,this.isInitialized=!1,this.eventEmissionCount=0,this.globalAttributes={},this.canHandle=e=>Object.keys(nJ).includes(e)}}let n6=()=>({eventName:"User Signed Up",eventAttributes:{}}),n8=e=>({eventName:"Checkout",eventAttributes:{orderType:e.orderType,storeId:e.chainId,storeAddressId:e.shopId,cartValue:e.cartValue,categoryId:e.categoryId}}),n7=e=>({eventName:"eCommerce - add_to_cart",eventAttributes:{storeAddressId:e.shopId,storeId:e.chainId,productSKU:e.productSKU,productName:e.productName,productIndex:e.productIndex,cartValue:e.cartValue,storeProductId:e.storeProductId}}),n3=e=>({eventName:"Category Group Opened",eventAttributes:{groupId:e.groupId,groupName:e.groupName}}),n4=e=>({eventName:"Viewed Store Screen",eventAttributes:{isOpen:e.shopOpen,storeAddressId:e.shopId,shopType:e.shopType}}),n9={...y,...f,...S,..._};class oe{get braze(){if(!this.brazeSDK||!this.isInitialized)throw Error("Braze SDK is not initialized yet");return this.brazeSDK}
1async init(){let{brazeId:e}=(0,A.zj)(),{userId:t}=this.globalAttributes;this.brazeSDK=await n.e(80264).then(n.bind(n,80264)),this.brazeSDK.initialize(e,{baseUrl:"sdk.fra-01.braze.eu"}),t&&this.brazeSDK.changeUser(t),this.brazeSDK.openSession(),this.isInitialized=!0,(0,k.onCookiesAccepted)("marketing").then(this.updateConsentAttributes.bind(this)),(0,k.onCookiesAccepted)("functional").then(this.updateConsentAttributes.bind(this))}setGlobalAttribute(e,t){this.globalAttributes[e]=t}async updateConsentAttributes(){var e;let t=null==(e=this.braze)?void 0:e.getUser();if(!t)return;let n=await (0,k.getCookieConsentStatus)(),o=n.marketing&&n.functional,{userCentricsGoogleConsentServiceId:r}=(0,A.zj)(),a=await (0,k.isServiceAccepted)(r);t.setCustomUserAttribute("gdpr_consent",o),t.setCustomUserAttribute("$google_ad_user_data",a),t.setCustomUserAttribute("$google_ad_personalization",a)}constructor(){this.name="Braze",this.consentCategory=U.braze,this.isInitialized=!1,this.globalAttributes={},this.canHandle=e=>Object.keys(n9).includes(e),this.trackEvent=(e,t)=>{let{eventName:n,eventAttributes:o}=(0,n9[e])(t);this.braze.logCustomEvent(n,o)}}}var ot=n(99237),on=n(68701),oo=n(80329),or=function(e){return e.AnalyticsInit="glovoapp.web.rum.analytics_service.init",e.TrackEventError="glovoapp.web.rum.analytics_service.track_event.error",e.TrackEventSuccess="glovoapp.web.rum.analytics_service.track_event.success",e.VendorInitError="glovoapp.web.rum.analytics_service.vendor_init.error",e.VendorInitSuccess="glovoapp.web.rum.analytics_service.vendor_init.success",e}(or||{});class oa{async init(){let{isBrowser:e}=(0,A.zj)();e&&(on.metrics.count("glovoapp.web.rum.analytics_service.init"),this.isInitializing||this.isInitialized||(this.isInitializing=!0,this.initVendorsWithCategory("essential"),this.initVendorsWithCategory("functional"),this.initVendorsWithCategory("marketing"),this.isInitializing=!1,this.isInitialized=!0))}get areAllVendorsInitialized(){return this.vendors.every(e=>e.isInitialized)}async initVendorsWithCategory(e){let t=this.getVendorsWithCategory(e);for(let n of(await (0,k.onCookiesAccepted)(e),t))try{await n.init(),(0,D.a)("Analytics","init",{vendor:n.name,consent:n.consentCategory}),on.metrics.customCount("glovoapp.web.rum.analytics_service.vendor_init.success",{vendorName:n.name})}catch(e){on.metrics.customCount("glovoapp.web.rum.analytics_service.vendor_init.error",{vendorName:n.name})}if(this.eventQueue.length)for(let e=0;e<this.eventQueue.length;e++)for(let n of t){let t=this.eventQueue[e];n.isInitialized&&n.canHandle(t.eventName)&&n.trackEvent(t.eventName,t.eventData)}this.areAllVendorsInitialized&&(this.eventQueue=[])}addToQueue(e,t){this.eventQueue.push({eventName:e,eventData:t}),this.eventQueue.length>1e3&&this.eventQueue.shift()}setGlobalAttribute(e,t){this.vendors.forEach(n=>{n.setGlobalAttribute(e,t)})}trackEvent(e,t){let{isBrowser:n}=(0,A.zj)();if(n){if(!this.isInitialized)return void this.addToQueue(e,t);for(let n of(this.areAllVendorsInitialized||this.addToQueue(e,t),this.vendors))if(n.isInitialized&&n.canHandle(e))try{n.trackEvent(e,t),on.metrics.customCount("glovoapp.web.rum.analytics_service.track_event.success",{vendorName:n.name,eventName:e})}catch(o){on.metrics.customCount("glovoapp.web.rum.analytics_service.track_event.error",{vendorName:n.name,eventName:e}),oo.yY.addError((0,ot._r)(o),{errorType:"analytics_service.track_event.error",eventName:e,eventVendor:n.name,eventDataRaw:t})}}}constructor(e){this.isInitializing=!1,this.isInitialized=!1,this.eventQueue=[],this.getVendorsWithCategory=e=>this.vendors.filter(t=>t.consentCategory===e),this.vendors=e}}let oi=null,os=new Proxy({},{get:(e,t)=>{let n=(oi||(oi=new oa([new P,new n5,new oe])),oi),o=Reflect.get(n,t);return"function"==typeof o?o.bind(n):o}})},17593:(e,t,n)=>{n.d(t,{q:()=>r});var o=n(31488);let r=o.Ik({fingerprintsExpirationTime:o.ai(),urn:o.Yj()})},20721:(e,t,n)=>{n.d(t,{Od:()=>a,aF:()=>o,cm:()=>r,ol:()=>i});let o="glv_device",r="108040",a=6e4,i="glv_uuid"},32934:(e,t,n)=>{n.d(t,{Y:()=>o});let o=()=>{let e,t;return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}}},42719:(e,t,n)=>{n.d(t,{i:()=>o});var o=function(e){return e.KASPI="kaspi",e}({})},55792:(e,t,n)=>{n.d(t,{Ar:()=>E,Ll:()=>v,Lu:()=>g,XB:()=>p});var o=n(60056),r=n(2621),a=n(474),i=n(68701),s=n(32934);let l=!1,d=(0,s.Y)(),c=d.resolve,u=d.promise,g=async()=>
1{if(!await h())throw Error("Incognia SDK is not available");let e=m(),t=await e.generateRequestToken({ensureDataCollection:!0});if(!t)throw Error("Failed to generate Incognia request token");return{provider:"Incognia",fingerprint:(0,r.PF)(),requestId:t}},p=async(e,t)=>{if(!await h())return;let n=m(),o=(0,r.O)();await n.setAccountId(String(e));let a=await C(t);await n.sendCustomEvent({tag:"login-monitoring",properties:{status:"AUTHORIZED",phone_hash:a,device_id:o||""}})},v=async(e,t)=>{if(!await h())return;let n=m(),o=(0,r.O)();await n.setAccountId(String(e));let a=await C(t);await n.sendCustomEvent({tag:"signup-monitoring",properties:{status:"AUTHORIZED",phone_hash:a,device_id:o||""}})},E=async()=>{if(!await h())return;let e=m();await e.clearAccountId()},h=()=>(l||(l=!0,i.metrics.customCount("glovoapp.web.rum.device_detection.provider.incognia.init.start"),w().then(()=>c(!0)).catch(()=>{i.metrics.customCount("glovoapp.web.rum.device_detection.provider.incognia.init.error"),c(!1)})),u),w=async()=>{let{incogniaSdkKey:e,incogniaSdkUrl:t,env:n}=(0,o.zj)();return new Promise((o,r)=>{let i=(0,a.getWindow)().document.createElement("script");i.src=t,i.defer=!0,i.setAttribute("incognia-app-id",e),"development"===n&&i.setAttribute("incognia-log-enabled","true"),(0,a.getWindow)().document.head.appendChild(i),i.onload=()=>{y()?o():r(Error("Failed to load Incognia Web SDK: IncogniaWebSdk is undefined"))},i.onerror=e=>{r(Error("Failed to load Incognia Web SDK script: ".concat(e)))}})},C=async e=>{if(!e)return"";let t="+".concat(e.countryCode," ").concat(e.number),n=new TextEncoder().encode(t);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",n))).map(e=>e.toString(16).padStart(2,"0")).join("")},m=()=>{let e=(0,a.getWindow)().IncogniaWebSdk;if(!e)throw Error("Incognia is not available: IncogniaWebSdk is undefined");return e},y=()=>{try{return!!m()}catch(e){return!1}}},56184:(e,t,n)=>{n.d(t,{a:()=>u,z:()=>c});var o=n(8375),r=n(60056);let a=()=>{let{superAppMockProvider:e}=(0,r.zj)();return!!e};var i=n(89994),s=n(42719),l=n(75787);let d={[s.i.KASPI]:i.gR},c=()=>{let{isBrowser:e}=(0,r.zj)();if(!e)throw Error("[isSuperApp/client] isSuperApp can only be called in the browser context");if(a())return!0;let t=(0,l.X)(),n=(0,o.J)(t);return!!n&&d[n]()},u=()=>{let{isBrowser:e}=(0,r.zj)();if(!e)throw Error("[getSuperAppName/client] getSuperAppName can only be called in the browser context");if(a())return(()=>{let{superAppMockProvider:e}=(0,r.zj)();return e})();if(!c())return null;let t=(0,l.X)(),n=(0,o.J)(t);if(!n)throw Error("[getSuperAppName/server] Unexpected error: superapp subdomain not found");return n}},66477:(e,t,n)=>{n.d(t,{pr:()=>p,Eb:()=>h,gj:()=>w,tm:()=>E,if:()=>y,cW:()=>_,LA:()=>v,CY:()=>C,mI:()=>m});var o=n(99046),r=n(70084),a=n(31488);let i=a.Ik({accessToken:a.Yj().min(48)}),s=a.Ik({accessToken:a.Yj().min(48),expiresIn:a.ai(),refreshToken:a.Yj().min(48),scope:a.lq(a.eu(null)),tokenType:a.k5(["bearer","Bearer"]).transform(()=>"Bearer")});a.Ik({access:s.extend({expirationTime:a.ai(),twoFactorToken:a.Yj().nullable()}),twoFactor:a.Ik({expiresIn:a.ai(),twoFactorToken:a.Yj().nullable()})});var l=n(52164),d=n(92271),c=n(474),u=n(31822);let g=()=>(e=>{if("localhost"===e||e.endsWith(".localhost")||/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(e)||e.includes(":"))return;let t=e.split(".");if(t.length<2)return;let n=t.slice(-2).join(".");return".".concat(n)})((0,c.getWindow)().location.hostname),p=()=>{let e=(0,d.Ri)(r.BX);if(!e)return null;let t=JSON.parse(e);if(t.refreshToken){let e=(0,u.x)("CredentialsSchema",s,t);return e&&(0,l.q)(e.accessToken)?((0,c.getWindow)().localStorage.setItem(r.wf,e.refreshToken),(0,d.TV)(r.BX,JSON.stringify({accessToken:e.accessToken}),{domain:g()}),e):null}let n=(0,u.x)("CookieCredentialsSchema",i,t);if(!n||!(0,l.q)(n.accessToken))return null;let a=(0,c.getWindow)().localStorage.getItem(r.wf);if(!a)return null;let p=(0,o.s)(n.accessToken),v=(null==p?void 0:p.exp)?Math.max(0,Number(p.exp)-Math.floor(Date.now()/1e3)):0;return{accessToken:n.accessToken,refreshToken:a,expiresIn:v,scope:null,tokenType:"Bearer"}},v=e=>{if(!(0,l.q)(null==e?void 0:e.accessToken)||!(null==e?void 0:e.refreshToken))return void E();let t=(0,u.x)("CredentialsSchema",s,e);if(!(0,l.q)(null==t?void 0:t.accessToken)||!(null==t?void 0:t.refreshToken))return void E();(0,d.TV)(r.BX,JSON.stringify({accessToken:t.accessToken}),{domain:g()}),(0,c.getWindow)().localStorage.setItem(r.wf,t.refreshToken)},E=()=>{let e=g();e&&(0,d.Yj)(r.BX,{domain:e}),(0,d.Yj)(r.BX),(0,c.getWindow)().localStorage.removeItem(r.wf)},h=()=>(0,c.getWindow)().sessionStorage.getItem(r.iw),w=()=>(0,c.getWindow)().sessionStorage.getItem(r.I2),C=e=>{(0,c.getWindow)().sessionStorage.setItem(r.iw,e)},m=e=>{(0,c.getWindow)().sessionStorage.setItem(r.I2,e)},y=()=>{(0,c.getWindow)().sessionStorage.removeItem(r.iw)},_=()=>{(0,c.getWindow)().sessionStorage.removeItem(r.I2)}},70084:(e,t,n)=>{n.d(t,{BX:()=>o,I2:()=>i,iw:()=>a,wf:()=>r});let o="glovo_auth_info",r="glovo_refresh_token",a="glovo_identity_flow_id",i="glovo_verified_phone_number"},70355:(e,t,n)=>{n.r(t),n.d(t,{AppGlobalStoreProvider:()=>V,appGlobalStoreMock:()=>x,useAppGlobalStore:()=>F});var o=n(69411),r=n(36067),a=n(63244),i=n(51396),s=n(66477),l=n(89078),d=n(60056),c=n(55792),u=n(55488);let g=async()=>{let e=(0,s.pr)();try{if(e){let{apiUrl:t}=(0,d.zj)();await u.GO.post("".concat(t,"/oauth/revoke"),{token:null==e?void 0:e.refreshToken})}}catch(e){var t;if((0,l.d7)(e)&&(null==(t=e.response)?void 0:t.status)!==400)throw e}finally{(0,s.tm)(),await (0,c.Ar)(),(0,u.YW)()}};var p=n(96295),v=n.n(p),E=n(21081);let h={FEATURE_FLAG_TEST:!1,WEB_PAST_ORDERS_DOWNLOAD_INVOICE:!1,CUSTOMER_WEB_REACT_TAB_BAR_ENABLED:!1,WEB_ENABLE_LEGACY_URL_HANDLER_DEBUG_MODE:!1,CUSTOMER_WEB_IS_GOOGLE_OAUTH_REMOVED:!1,CUSTOMER_WEB_KASPI_BUBBLES_IGNORED_CATEGORY_IDS:"[]",CUSTOMER_WEB_USE_DEVICE_UPDATE_ENABLED:!1,WEB_FACEBOOK_AUTH_SCOPES:"email,user_friends",CUSTOMER_OMNIBUS_OLD_STORE_WALL_ENABLED:!1,CUSTOMER_WEB_KASPI_PROMINENT_ACCOUNT_CREATION_CTA:!1,WEB_STORE_WALL_WIDGETS_SHOW_ALL_ENABLED:!1,PAY_ORDER_PAYMENTS_CHECKOUT_FALLBACK_ENABLED:!1,CUSTOMER_WEB_REACT_KASPI_ORDER_TRACKING_POLLING_KILL_SWITCH_ENABLED:!1,CUSTOMER_WEB_REACT_PUBLIC_ORDER_TRACKING_POLLING_KILL_SWITCH_ENABLED:!1,PAY_DISABLE_PREFETCH_GOOGLE_PAY_WEB:!1,WEB_KASPI_NATIVE_ADDRESS_ENABLED:!1,CUSTOMER_WEB_REACT_PRIME_PROFILE_PAGE_ENABLED:!1,WEB_POPUP_BLOCKED_IOS_FIX_ENABLED:!1,CUSTOMER_WEB_STORE_VIEW_DYNAMIC_SECTIONS_GRID_LAYOUT:!1,CUSTOMER_WEB_HOST_PROVIDER_ENABLED:!1,WEB_PHONE_VERIFICATION_LIBRARY_REMOVAL_ENABLED:!1,CUSTOMER_WEB_REACT_STORE_VIEW_ITERATION:!1,CUSTOMER_WEB_REACT_SEARCH_AUTOCOMPLETE_ENABLED:!1,CUSTOMER_WEB_REACT_PRESEARCH_ENABLED:!1,CUSTOMER_WEB_GUEST_CUSTOMER_ID_GENERATION_ENABLED:!1,CUSTOMER_WEB_CART_MS_V2_ENABLED:!1,CUSTOMER_WEB_REACT_ENABLE_CART_ENTRY_POINT:!1,CUSTOMER_WEB_OTC_HIDDEN_IMAGES_IDS:"",WEB_NEW_STORE_VIEW_PAGE:!1,WEB_FLASH_DEALS_ENABLED:!1,WEB_PRIVATE_OTP_ENABLED:!1,SPIKE_FLAT_CATEGORIES_RESPONSE_ENABLED:!1,Customer_Web$$$TestExperimentEnabled:{enabled:!1},Customer_Web$$$OtpExperimentEnabled:"false"},w=async(e,t)=>{let{apiUrl:n}=(0,d.zj)(),o=Object.keys(h);try{var r,a,i,s;let t=await e.post("".concat(n,"/features/query"),{toggles:o}),l=C(t.data.toggles),d=m(l,h);return E.a.pink("Toggles","Fetching toggles",{withUserId:!!(null==(a=t.config)||null==(r=a.headers)?void 0:r.Authorization),cityCode:null==(i=t.config)?void 0:i.headers["Glovo-Location-City-Code"],countryCode:null==(s=t.config)?void 0:s.headers["Glovo-Location-Country-Code"]}),d}catch(e){return t&&t(e),h}},C=e=>e?e.reduce((e,t)=>
1(e[t.name]=t.value,e),{}):{},m=(e,t)=>{let n={};for(let r of Object.keys(h))if(r in t){var o;n[r]=null!=(o=e[r])?o:h[r]}return n};var y=n(99237),_=n(11257),S=n(68701),f=n(80329);let A=e=>{let t=(0,y._r)(e),n=(0,_.u)(e);f.yY.addError(t,{id:"toggles_fetch_error",errorMessage:n,error:t}),S.metrics.customCount("glovoapp.web.rum.toggles.fetch.failure")};var k=n(31488);let I=k.Ik({phoneVerificationRequired:k.zM().optional(),statusMessage:k.Ik({isBlocking:k.zM(),title:k.Yj(),text:k.Yj(),imageId:k.Yj().nullish()}).nullable()});var T=n(31822);let L=async(e,t)=>{let{apiUrl:n}=(0,d.zj)(),o=await e.get("".concat(n,"/v3/whats_up?fields=").concat(t));return(0,T.x)("WhatsUpSchema",I,o.data)};var b=n(86879);let O=()=>{let{execWithErrorTracking:e}=(0,b.V)(),t=F(e=>e.lastBrowsedLocation.init);return(0,r.useEffect)(()=>{e(async()=>{E.a.yellow("AppGlobalStore","Initializing..."),t()})},[]),null},D="glovo_delivery_address";var N=n(92271);let B=async e=>{if(e){let t=JSON.stringify(e);(0,N.TV)(D,encodeURIComponent(t))}else(0,N.Yj)(D);return e};var R=n(8264),W=n.n(R),U=n(76748),P=n(10812);let j=e=>{var t,n,o,r,a,i;if("countryCode"in e){let t=e.countryCode||null;(0,u.kO)("Glovo-Location-Country-Code",t||"")}if("cityCode"in e){let t=e.cityCode||null;(0,u.kO)("Glovo-Location-City-Code",t||"")}if("locationCoordinates"in e){let t=e.locationCoordinates||null,n=t?"".concat(null==t?void 0:t.longitude):"",o=t?"".concat(null==t?void 0:t.latitude):"",r="".concat(new Date().getTime());(0,u.kO)("Glovo-Delivery-Location-Longitude",n),(0,u.kO)("Glovo-Delivery-Location-Latitude",o),(0,u.kO)("Glovo-Delivery-Location-Timestamp",r),(0,u.kO)("Glovo-Delivery-Location-Accuracy","0")}P.z.setGlobalAttribute("location",{locationCity:(null==e?void 0:e.cityCode)||null,locationCountry:(null==e?void 0:e.countryCode)||null,locationLat:null!=(a=null==e||null==(n=e.locationCoordinates)||null==(t=n.latitude)?void 0:t.toString())?a:null,locationLon:null!=(i=null==e||null==(r=e.locationCoordinates)||null==(o=r.longitude)?void 0:o.toString())?i:null})};var z=n(32934),G=n(88454),M=n(96286);let Y=(0,r.createContext)(null);function V(e){let{children:t,initialData:n}=e,i=(0,r.useRef)(void 0);return i.current||(i.current=(0,a.y)()(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return{...((e,t)=>({auth:{isLoggedIn:n.auth.isLoggedIn,shouldRefreshToken:n.auth.shouldRefreshToken,logOut:async()=>{await g(),e(e=>({auth:{...e.auth,isLoggedIn:!1}})),await t().whatsUp.getWhatsUp()},userDidLogIn:async()=>{e(e=>({auth:{...e.auth,isLoggedIn:!0}})),await t().whatsUp.getWhatsUp()}}}))(...t),...(e=>{let{toggles:t}=e;return e=>({toggles:{collection:t.collection,refreshToggles:async()=>{S.metrics.customCount("glovoapp.web.rum.toggles.fetch.start");let t=await w(u.GO,A);e(e=>v()(t,e.toggles.collection)?e:{toggles:{...e.toggles,collection:t}})}}})})(n)(...t),...(e=>{let{whatsUp:t}=e;return(e,n)=>({whatsUp:{phoneVerificationRequired:t.phoneVerificationRequired,statusMessage:t.statusMessage,getWhatsUp:async()=>{let t=await L(u.GO,"phoneVerificationRequired,statusMessage");e(e=>({whatsUp:{...e.whatsUp,phoneVerificationRequired:t.phoneVerificationRequired,statusMessage:t.statusMessage}}))}}})})(n)(...t),...(e=>{let{user:t}=e;return(e,n)=>({user:{isStaffUser:t.isStaffUser,userData:t.userData,isPrimeUser:void 0,setUserData:t=>{e(e=>({user:{...e.user,userData:t,isStaffUser:(0,G.Q)(t.email)}}))},setPhoneNumber:t=>{e(e=>e.user.userData?{user:{...e.user,userData:{...e.user.userData,phoneNumber:t}}}:e)},fetchAndSetUserData:async()=>{let{auth:t}=n();if(!t.isLoggedIn)return void e(e=>({user:{...e.user,userData:null,isStaffUser:!1}}));let o=await (0,M.Sk)();if(null==o?void 0:o.id){await (0,c.XB)(o.id,o.phoneNumber);let t=await (0,M.M$)(o.id),n=(0,G.Q)(o.email);e(e=>({user:{...e.user,isPrimeUser:t,isStaffUser:n,userData:o}}))}}}})})(n)(...t),...(e=>{let{deliveryAddress:t}=e;return(e,n)=>({deliveryAddress:{address:t.address,async setDeliveryAddress(t){let{lastBrowsedLocation:o}=n(),r=await B(t);await o.setLocationFromDeliveryAddress(r),e(e=>({deliveryAddress:{...e.deliveryAddress,address:r}})),E.a.navy("DeliveryAddress","Address updated",r)},doesDeliveryAddressMatchLocation(){let{deliveryAddress:e,lastBrowsedLocation:t}=n();return(e=>{let{address:t,countryCode:n,cityCode:o}=e;return(null==t?void 0:t.countryCode)===n&&(null==t?void 0:t.cityCode)===o})({address:e.address,countryCode:t.location.countryCode,cityCode:t.location.cityCode})}}})})(n)(...t),...(e=>{let{lastBrowsedLocation:t}=e;return(e,n)=>{let{promise:o,resolve:r}=(0,z.Y)();return{lastBrowsedLocation:{location:t.location,onInit:o,init:()=>{let{lastBrowsedLocation:e}=n();j(e.location),r()}
1,setLastBrowsedLocation:(o,r)=>{var a,i,s,l;let{deliveryAddress:d,lastBrowsedLocation:c,toggles:u}=n(),g=W()(o);d.address&&!g.locationCoordinates&&d.address.cityCode&&d.address.cityCode===g.cityCode&&(g.locationCoordinates={latitude:d.address.latitude,longitude:d.address.longitude});let p=((e,t,n)=>{let o={cityCode:e.cityCode,countryCode:e.countryCode,locationCoordinates:e.locationCoordinates};return"countryCode"in t&&(o.countryCode=t.countryCode||null),"cityCode"in t&&(o.cityCode=t.cityCode||null),"citySlug"in t?o.citySlug=t.citySlug||null:o.citySlug=o.countryCode&&o.cityCode?(0,U.yZ)(n[o.countryCode.toUpperCase()]||{},o.cityCode):null,"locationCoordinates"in t?o.locationCoordinates=t.locationCoordinates||null:(e.countryCode!==o.countryCode||e.cityCode!==o.cityCode)&&(o.locationCoordinates=null),o})(c.location,g,t.citiesSlugs);(p.cityCode!==c.location.cityCode||p.countryCode!==c.location.countryCode||p.citySlug!==c.location.citySlug||(null==(a=p.locationCoordinates)?void 0:a.latitude)!==(null==(i=c.location.locationCoordinates)?void 0:i.latitude)||(null==(s=p.locationCoordinates)?void 0:s.longitude)!==(null==(l=c.location.locationCoordinates)?void 0:l.longitude))&&(e(e=>({lastBrowsedLocation:{...e.lastBrowsedLocation,location:p}})),j(p),u.refreshToggles(),E.a.cyan("LastBrowsedLocation","[".concat(r,"]] New location set:"),p))},setLocationFromDeliveryAddress:async e=>{if(!e)return;let{lastBrowsedLocation:t}=n();t.setLastBrowsedLocation({cityCode:e.cityCode,countryCode:e.countryCode,locationCoordinates:{latitude:e.latitude,longitude:e.longitude}},"deliveryAddress")}}}}})(n)(...t),...((e,t)=>({pickupAddress:{address:null,async setPickupAddress(n){e({pickupAddress:{...t().pickupAddress,address:n}}),E.a.navy("PickupAddress","Address updated",n)}}}))(...t)}})),(0,o.jsxs)(Y.Provider,{value:i.current,children:[(0,o.jsx)(O,{}),t]})}function F(e){let t=(0,r.useContext)(Y);if(!t)throw Error("useAppGlobalStore must be used within <AppGlobalStoreProvider>");return(0,i.P)(t,e)}let x=void 0},75787:(e,t,n)=>{n.d(t,{X:()=>a});var o=n(60056),r=n(474);let a=()=>{let{isBrowser:e}=(0,o.zj)();if(!e)throw Error("[getAppUrl/client] getAppUrl can only be called in a browser context");return(0,r.getWindow)().location.origin}},76748:(e,t,n)=>{n.d(t,{yZ:()=>p,yV:()=>g});var o=n(89664),r=n(36067),a=n(31488);let i=a.Ik({cashEnabled:a.zM(),code:a.Yj(),contentLanguageCode:a.Yj(),countryCode:a.Yj(),currency:a.Yj(),currencyPattern:a.Yj(),decimalSeparator:a.me(a.Yj()),displayName:a.Yj().nullish(),enabled:a.zM(),extraCurrencyToDisplay:a.me(a.Ik({currency:a.Yj(),currencyPattern:a.Yj(),multiplier:a.ai()})),geolocation:a.Ik({polygons:a.YO(a.bz()),searchZone:a.Ik({center:a.Ik({lat:a.ai(),lng:a.ai()}),radius:a.ai()}).nullish()}),groupingSeparator:a.me(a.Yj()),languageCode:a.Yj(),name:a.Yj(),servicePhoneNumber:a.Yj().nullable(),supportedLanguages:a.YO(a.Yj()),translations:a.bz()}),s=a.Ik({filterId:a.ai(),categoryId:a.ai(),categoryName:a.Yj(),categorySlug:a.Yj(),filterName:a.Yj(),filterSlug:a.Yj(),ranking:a.ai()}),l=s.pick({filterName:!0,filterSlug:!0}),d=a.Ik({brandName:a.Yj(),brandSlug:a.Yj()});a.Ik({localeCode:a.Yj(),countryCode:a.Yj(),cityName:a.Yj(),cityCode:a.Yj(),topFilters:a.YO(s),topCountryFilters:a.YO(l),topCountryBrands:a.YO(d)});var c=n(60056),u=n(31822);let g=(0,r.cache)(async(e,t)=>{var n,r,a;let{apiUrl:s}=(0,c.zj)();try{let o=await t.get("".concat(s,"/v3/customers/cities?city_code=").concat(e).toLowerCase());if(!(null==o?void 0:o.data)||!(null==o||null==(n=o.data)?void 0:n.city))return null;let a=(0,u.x)("CitySchema",i,o.data.city);return a.displayName=null!=(r=a.displayName)?r:a.name,a}catch(e){if(e instanceof o.pe&&(null==(a=e.response)?void 0:a.status)===404)return null;throw e}}),p=(e,t)=>{let n=Object.entries(e).find(e=>{let[n,o]=e;return o===t});return n?n[0]:null}},79556:(e,t,n)=>{n.r(t),n.d(t,{CONSENT_BANNER_EVENT:()=>d,acceptAllConsents:()=>C,changeLanguage:()=>E,closeCookiesBanner:()=>w,getCookieConsentStatus:()=>f,initCookiesBlocker:()=>p,isPendingUserResponse:()=>m,isServiceAccepted:()=>A,onCookiesAccepted:()=>v,openCookiesAdvancedConfigPopup:()=>y,resetUserSelection:()=>h});var o=n(10812),r=n(56184),a=n(21081),i=n(99237),s=n(474),l=n(68701);let d="UC_UI_CMP_EVENT",c=!1,u={essential:()=>{},functional:()=>{},marketing:()=>{}},g={essential:new Promise(e=>u.essential=e),functional:new Promise(e=>u.functional=e),marketing:new Promise(e=>u.marketing=e)};u.essential(!0);let p=async()=>
1{if(c)return;if(c=!0,!__ucCmp)throw(0,i._r)("[cookies-blocker]: Failed to init. UserCentrics CMP not found",{errorDomain:"cookie_consent.init"});await T();let e=await k();if(!e.result)throw(0,i._r)("[CookieConsent] Invalid cookies categories! Please review categories in UserCentrics back-office (Expected: essential, functional, marketing)",{errorDomain:"cookie_consent.init",foundCategories:e.categories.join(", ")});await m()?(0,s.getWindow)().addEventListener(d,I):await _(),g.essential.then(()=>{l.metrics.customCount("glovoapp.web.rum.cookie_consent.grant",{consentCategory:"essential"}),a.a.green("Consent","Granted: essential")}),g.functional.then(()=>{l.metrics.customCount("glovoapp.web.rum.cookie_consent.grant",{consentCategory:"functional"}),a.a.green("Consent","Granted: functional")}),g.marketing.then(()=>{l.metrics.customCount("glovoapp.web.rum.cookie_consent.grant",{consentCategory:"marketing"}),a.a.green("Consent","Granted: marketing")}),a.a.green("CookieConsent","Initialised")};async function v(e){return g[e]}async function E(e){__ucCmp.changeLanguage(e)}async function h(){__ucCmp.clearUserSession()}function w(){__ucCmp.closeCmp()}function C(){return __ucCmp.acceptAllConsents()}function m(){return __ucCmp.isConsentRequired()}function y(){__ucCmp.showSecondLayer()}let _=async()=>{let e=await f();e.functional&&u.functional(!0),e.marketing&&u.marketing(!0),(0,s.getWindow)().sessionStorage&&(0,s.getWindow)().sessionStorage.setItem("cookie_consent_status",JSON.stringify(e)),S()},S=()=>{setTimeout(()=>{o.z.trackEvent("ConsentAnsweredEvent",{})},500)},f=async()=>{if("__ucCmp"in(0,s.getWindow)()){let{categories:e}=await __ucCmp.getConsentDetails();return{essential:!0,functional:"ALL_ACCEPTED"===e.functional.state,marketing:"ALL_ACCEPTED"===e.marketing.state}}return{essential:!0,functional:!1,marketing:!1}};async function A(e){if("__ucCmp"in(0,s.getWindow)()){var t;let{services:n}=await __ucCmp.getConsentDetails(),o=n[e];return!!(null==o||null==(t=o.consent)?void 0:t.given)}return!1}let k=async()=>{let{categories:e}=await __ucCmp.getConsentDetails(),{essential:t,functional:n,marketing:o}=e;return{result:!!(t&&n&&o),categories:Object.keys(e)}},I=e=>{setTimeout(async()=>{["ACCEPT_ALL","DENY_ALL","SAVE"].includes(e.detail.type)&&((0,s.getWindow)().removeEventListener(d,I),await _())},500)},T=async()=>{(0,r.z)()&&(await C(),w())}},88454:(e,t,n)=>{n.d(t,{Q:()=>o});let o=e=>"string"==typeof e&&(e.endsWith("@glovoapp.com")||e.endsWith("@providers.glovoapp.com"))},89078:(e,t,n)=>{n.d(t,{hx:()=>v,Ld:()=>s,d7:()=>l,Gr:()=>c,Ow:()=>u,Nq:()=>p,Jv:()=>g,CI:()=>d,S0:()=>E});var o=n(66477),r=n(60056),a=n(55488),i=n(44713);let s=()=>{let e=(0,o.pr)();e&&(0,a.sV)({accessToken:e.accessToken},u,c)},l=e=>"object"==typeof e&&!!e&&(!("response"in e)||"response"in e&&"object"==typeof e.response),d=async()=>{let{apiUrl:e}=(0,r.zj)(),t=(0,o.pr)();(0,o.tm)(),i.P.reset();try{t&&await a.GO.post("".concat(e,"/oauth/revoke"),{token:t.refreshToken})}catch(e){var n;if(l(e)&&(null==(n=e.response)?void 0:n.status)!==400)throw e}finally{(0,a.YW)()}},c=async e=>{var t;if(l(e)&&(null==(t=e.response)?void 0:t.status)===401){(0,a.YW)(),(0,o.tm)(),i.P.reset();return}await d()},u=async()=>{let{apiUrl:e}=(0,r.zj)(),t=(0,o.pr)();if(!t)throw Error("No credentials found");let n=(await a.GO.post("".concat(e,"/oauth/refresh"),{refreshToken:null==t?void 0:t.refreshToken})).data;return p(n),n},g=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{headers:{}},n=(e=>{let{facebookId:t,grantType:n,token:o,identityFlowId:r,username:a,password:i}=e;switch(n){case"google":return{grantType:n,googleToken:o};case"googleBearer":return{grantType:"google",googleBearerToken:o};case"facebook":return{grantType:n,facebookToken:o,facebookId:t};case"phone":return{grantType:n,identityFlowId:r};default:return{grantType:"password",username:a,password:i}}})(e),{apiUrl:o}=(0,r.zj)(),i=(await a.GO.post("".concat(o,"/oauth/token"),n,{headers:{Authorization:null,...t.headers}})).data;if(i.access&&p(i.access),i.twoFactor)return i.twoFactor},p=e=>{(0,o.LA)(e),(0,a.sV)({accessToken:e.accessToken},u,d)},v=async e=>{let{apiUrl:t}=(0,r.zj)(),{authenticationMethods:n}=(await a.GO.get("".concat(t,"/v3/customers/auth/").concat(e,"/methods"))).data.data;return n.length?n:null},E=async(e,t)=>{let{apiUrl:n}=(0,r.zj)();p((await a.GO.post("".concat(n,"/oauth/2fa/phone_verification/validate"),{twoFactorToken:e,code:t},{headers:{Authorization:null}})).data)}},96176:(e,t,n)=>{n.d(t,{k:()=>o});var o=function(e){return e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.GO
1NE=410]="GONE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.BAD_REQUEST=400]="BAD_REQUEST",e}({})},96286:(e,t,n)=>{n.d(t,{M$:()=>m,Mc:()=>C,Sk:()=>u,b6:()=>p,eB:()=>g,f3:()=>v,iD:()=>E,t8:()=>h,vY:()=>w});var o=n(36067),r=n(60056),a=n(68052),i=n(31373),s=n(289),l=n(55488),d=n(96176),c=n(80329);let u=(0,o.cache)(async()=>{let{apiUrl:e}=(0,r.zj)();try{return(await l.GO.get("".concat(e,"/v3/me"))).data}catch(e){if((0,a.F)(e)&&(0,i.W)(e,[d.k.FORBIDDEN,d.k.UNAUTHORIZED]))return c.yY.addError(e,{errorId:"fetch_user_data.error",statusCode:(0,s.G)(e),originalError:e}),null;throw e}}),g=async e=>{let{apiUrl:t}=(0,r.zj)();return l.GO.put("".concat(t,"/customer_profile/api/v1/language_management/preferred_language"),{preferredLanguage:e})},p=async(e,t)=>{let{apiUrl:n}=(0,r.zj)();return(await l.GO.put("".concat(n,"/v3/users/").concat(t),e)).data},v=async(e,t)=>{let{apiUrl:n}=(0,r.zj)();return(await l.GO.put("".concat(n,"/v3/users/").concat(t,"/password"),e)).data},E=async(e,t)=>{let{apiUrl:n}=(0,r.zj)();return(await l.GO.put("".concat(n,"/v3/customers/").concat(e,"/companydetail"),t)).data},h=async e=>{let{apiUrl:t}=(0,r.zj)();await l.GO.delete("".concat(t,"/v3/customers/").concat(e,"/companydetail"))},w=async e=>{var t,n;let{apiUrl:o}=(0,r.zj)();return null!=(n=null==(t=(await l.GO.get("".concat(o,"/v3/customers/cities?city_code=").concat(e).toLowerCase())).data)?void 0:t.city)?n:null},C=async e=>{var t,n;let o=await w(e);return null!=(n=null==o||null==(t=o.countryCode)?void 0:t.toLowerCase())?n:null},m=async e=>{try{let{apiUrl:t}=(0,r.zj)();return(await l.GO.get("".concat(t,"/customers/").concat(e,"/subscription/status"))).data.isSubscribed}catch(e){return!1}}}}]);
2//# sourceMappingURL=70355-de0c20676a2d19a7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.