PageSourceSearch

https://pide.comecamila.com/_next/static/chunks/pages/[resturant]/myorders.js

js comecamila.com collected 2026-10-04 10:53:30 UTC 35,471 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="df5e369b-d3f6-47b4-afb2-029ba163bbd5",e._sentryDebugIdIdentifier="sentry-dbid-df5e369b-d3f6-47b4-afb2-029ba163bbd5")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4946],{52456:(e,r,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[resturant]/myorders",function(){return a(43643)}])},58017:(e,r,a)=>{"use strict";a.d(r,{bq:()=>c,eb:()=>p,gC:()=>f,l6:()=>l,yv:()=>d});var t=a(74848),o=a(96540),n=a(17049),i=a(86610),s=a(76094);let l=i.bL;i.YJ;let d=i.WT,c=o.forwardRef((e,r)=>{let{className:a,children:o,...l}=e;return(0,t.jsxs)(i.l9,{ref:r,className:(0,s.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-zinc-200 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-white placeholder:text-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-zinc-800 dark:ring-offset-zinc-950 dark:placeholder:text-zinc-400 dark:focus:ring-zinc-300",a),...l,children:[o,(0,t.jsx)(i.In,{asChild:!0,children:(0,t.jsx)(n.TBE,{className:"h-4 w-4 opacity-50"})})]})});c.displayName=i.l9.displayName;let u=o.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)(i.PP,{ref:r,className:(0,s.cn)("flex cursor-default items-center justify-center py-1",a),...o})});u.displayName=i.PP.displayName;let m=o.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)(i.wn,{ref:r,className:(0,s.cn)("flex cursor-default items-center justify-center py-1",a),...o})});m.displayName=i.wn.displayName;let f=o.forwardRef((e,r)=>{let{className:a,children:o,position:n="popper",...l}=e;return(0,t.jsx)(i.ZL,{children:(0,t.jsxs)(i.UC,{ref:r,className:(0,s.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white text-zinc-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:n,...l,children:[(0,t.jsx)(u,{}),(0,t.jsx)(i.LM,{className:(0,s.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),(0,t.jsx)(m,{})]})})});f.displayName=i.UC.displayName,o.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)(i.JU,{ref:r,className:(0,s.cn)("px-2 py-1.5 text-sm font-semibold",a),...o})}).displayName=i.JU.displayName;let p=o.forwardRef((e,r)=>{let{className:a,children:o,...l}=e;return(0,t.jsxs)(i.q7,{ref:r,className:(0,s.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",a),...l,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(i.VF,{children:(0,t.jsx)(n.Srz,{className:"h-4 w-4"})})}),(0,t.jsx)(i.p4,{children:o})]})});p.displayName=i.q7.displayName,o.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)(i.wv,{ref:r,className:(0,s.cn)("-mx-1 my-1 h-px bg-zinc-100 dark:bg-zinc-800",a),...o})}).displayName=i.wv.displayName},76094:(e,r,a)=>{"use strict";a.d(r,{cn:()=>n});var t=a(34164),o=a(50856);function n(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return(0,o.QP)((0,t.$)(r))}},43643:(e,r,a)=>{"use strict";a.r(r),a.d(r,{__N_SSP:()=>G,default:()=>L});var t=a(74848),o=a(14953),n=a.n(o),i=a(32862);a(29965);var s=a(86715),l=a(96540),d=a(77255),c=a(20181),u=a.n(c),m=a(64251),f=a(
170255),p=a(96438),b=a(58017),y=a(37644),_=a(84345),g=a(18987);let h={sameSite:"None",secure:!0,expires:7};var v=a(48049),x=a(13765);let w=l.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)("textarea",{className:"flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ".concat(a),ref:r,...o})});w.displayName="Textarea";let S=l.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)("div",{ref:r,className:"rounded-lg border bg-card text-card-foreground shadow-sm ".concat(a),...o})});S.displayName="Card";let j=l.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)("div",{ref:r,className:"flex flex-col space-y-1.5 p-6 ".concat(a),...o})});j.displayName="CardHeader";let N=l.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)("h3",{ref:r,className:"text-2xl font-semibold leading-none tracking-tight ".concat(a),...o})});N.displayName="CardTitle";let C=l.forwardRef((e,r)=>{let{className:a,...o}=e;return(0,t.jsx)("div",{ref:r,className:"p-6 pt-0 ".concat(a),...o})});C.displayName="CardContent";var k=a(49505);let F=e=>{let{resturantsettings:r,version:a,openFailureModalFunc:o,openSuccessModalFunc:n,session_id:i,id:c,memberId:u,primaryColor:m,fontFamily:f,bgColor:p,highlightbgColor:b,secondaryBtnTxtColor:y,secondaryBtnColor:_,setRateOrderModal:g,onFeedbackSubmitted:h,secondaryColor:F,refreshOrderHistory:O}=e,{t:T}=(0,d.Bd)(),[E,I]=l.useState({exteriorCleanliness:"",interiorCleanliness:"",staffFriendliness:"",staffTraining:"",beverageQuality:"",orderWaitTime:"",preparationTime:"",returnLikelihood:"",comments:""}),[q,B]=l.useState({}),[z,A]=l.useState(!1),[R,P]=l.useState("");(0,s.useRouter)();let D=e=>{let{name:r,value:a}=e.target;I(e=>({...e,[r]:a})),q[r]&&B(e=>({...e,[r]:void 0}))},J=()=>{let e={},r=!0;return Object.entries(E).forEach(a=>{let[t,o]=a;o||(e[t]="Este campo es requerido",r=!1)}),B(e),r},M=()=>{let e=Math.floor(1e9*Math.random());return"TRX_".concat(e)},G=async e=>{if(e.preventDefault(),J()){A(!0),P("");try{let e={restaurant_id:Number(null==r?void 0:r.restaurant_id),order_id:Number(null==c?void 0:c.order_id),survey_data:Object.entries(E).map(e=>{let[a,t]=e;return{trx_id:M(),order_id:Number(null==c?void 0:c.order_id),restaurant_id:Number(null==r?void 0:r.restaurant_id),member_id:String(null!=u?u:""),question:L(a),answer_type:"comments"===a?"text":"rating",answer:String(t)}}),lang:"es",session_id:null!=i?i:"123",version:null!=a?a:"123",source:"ecomv2",ui_request_time:new Date().toISOString()},t=(0,k.z)(),s="".concat(window.location.origin,"/"),l="https://order.foodbot.ai/apiv2";s&&(l=s+"apiv2");let d=await fetch("".concat(l,"/ecom/v1/gongcha_order_survey"),{method:"POST",headers:t,body:JSON.stringify(e)}),m=await d.json();200==d.status?(n("\xa1Gracias por tu feedback!"),g(!1),h(),I({exteriorCleanliness:"",interiorCleanliness:"",staffFriendliness:"",staffTraining:"",beverageQuality:"",orderWaitTime:"",preparationTime:"",returnLikelihood:"",comments:""}),O()):(d.status,o(m.message))}catch(e){console.error("Error:",e),o("Hubo un error al enviar el formulario. Por favor, int\xe9ntalo de nuevo.")}finally{A(!1)}}},L=e=>({exteriorCleanliness:"1. Que tan limpia y atractiva estaba la tienda desde el exterior?",interiorCleanliness:"2. Que tan limpia y atractiva estaba la tienda en su interior?",staffFriendliness:"3. \xbfQu\xe9 tan cordial y amable fue el personal de la tienda que te atendi\xf3?",staffTraining:"4. El personal de la tienda est\xe1 capacitado y entrenado para preparar Bubble tea?",beverageQuality:"5. \xbfQu\xe9 tan fant\xe1stica se ve\xeda y sab\xeda tu bebida?",orderWaitTime:"6. \xbfCu\xe1nto tiempo esperaste a que tomaran la orden de tu bubble tea?",preparationTime:"7. \xbfCu\xe1nto tiempo esperaste para que te prepararan tu bebida?",returnLikelihood:"8. Entonces, \xbfvolver\xedas a visitarnos?",comments:"Tus comentarios nos ayudar\xe1n a hacer de Gong cha la mejor marca de bubble tea del mundo..."})[e]||e,Q=Array.from({length:11}
1,(e,r)=>r).reverse(),W=e=>{let{name:r,label:a,description:o}=e;return(0,t.jsxs)("div",{className:"space-y-3 leading-5",children:[(0,t.jsxs)("label",{className:"block font-bold",children:[a," ",(0,t.jsx)("span",{children:"*"})]}),(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"text-xs ",children:o}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Q.map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-1",children:[(0,t.jsx)("input",{type:"radio",name:r,value:e.toString(),checked:E[r]===e.toString(),onChange:D,className:"form-radio ",style:{color:F,fontFamily:"".concat(f,", sans-serif")}}),(0,t.jsx)("span",{className:"text-sm font-normal",children:e})]},e))}),q[r]&&(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"  text-sm",children:q[r]})]})};return(0,t.jsxs)(S,{style:{fontFamily:"".concat(f,", sans-serif")},className:"w-full max-w-2xl mx-auto",children:[(0,t.jsx)(j,{children:(0,t.jsx)(N,{style:{color:m,fontFamily:"".concat(f,", sans-serif")},className:"text-lg font-bold text-start border-b pb-4 pr-4",children:"Ahora, cu\xe9ntanos sobre tu experiencia en Gongcha..."})}),(0,t.jsx)(C,{children:(0,t.jsxs)("form",{style:{color:m,fontFamily:"".concat(f,", sans-serif")},onSubmit:G,className:"space-y-8",children:[(0,t.jsx)(W,{name:"exteriorCleanliness",label:"1. Que tan limpia y atractiva estaba la tienda desde el exterior?",description:"(0 = la tienda estaba tan vieja y sucia, que seguramente no es un Gong cha) (10 = La tienda parec\xeda un templo a los Dioses del Bubble tea - me encanta)"}),(0,t.jsx)(W,{name:"interiorCleanliness",label:"2. Que tan limpia y atractiva estaba la tienda en su interior?",description:"(0 = bastante sucia, llena de basura) (10 = realmente deben sentirse orgullosos de como se ve la tienda)"}),(0,t.jsx)(W,{name:"staffFriendliness",label:"3. \xbfQu\xe9 tan cordial y amable fue el personal de la tienda que te atendi\xf3?",description:"(0 = el personal ni se enter\xf3 de que estaba ah\xed) (10 = el personal me hizo sentir como si fuera su mejor amigo)"}),(0,t.jsx)(W,{name:"staffTraining",label:"4. El personal de la tienda est\xe1 capacitado y entrenado para preparar Bubble tea?",description:"(0 = Los empleados ni siquiera saben como hervir agua) (10 = Si hubiera una competencia mundial de elaboraci\xf3n de bubble tea, este equipo lo ganar\xeda)"}),(0,t.jsx)(W,{name:"beverageQuality",label:"5. \xbfQu\xe9 tan fant\xe1stica se ve\xeda y sab\xeda tu bebida?",description:"(0 = Cualquier bebida sabe y se ve mejor que esto. Se ve y sabe horrible) (10 = Esto no es bubble tea, esto es el para\xedso)"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("label",{style:{color:m,fontFamily:"".concat(f,", sans-serif")},htmlFor:"orderWaitTime",className:"block font-bold leading-5",children:["6. \xbfCu\xe1nto tiempo esperaste a que tomaran la orden de tu bubble tea? ",(0,t.jsx)("span",{children:"*"})]}),(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"text-xs",children:"Por favor proporcione un numero aproximado en minutos"}),(0,t.jsx)(x.p,{type:"text",id:"orderWaitTime",name:"orderWaitTime",value:E.orderWaitTime,onChange:D,className:"bg-gray-100",style:{outline:"none",boxShadow:"none"},onFocus:e=>{e.target.style.outline="2px solid ".concat(F),e.target.style.boxShadow="none"},onBlur:e=>{e.target.style.outline="none",e.target.style.boxShadow="none"}}),q.orderWaitTime&&(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"  text-xs",children:q.orderWaitTime})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("label",{style:{color:m,fontFamily:"".concat(f,", sans-serif")},htmlFor:"preparationTime",className:"block font-bold leading-5",children:["7. \xbfCu\xe1nto tiempo esperaste para que te prepararan tu bebida?"," ",(0,t.jsx)("span",{children:"*"})]}),(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"text-xs",children:"Por favor proporcione un numero aproximado en minutos"}),(0,t.jsx)(x.p,{type:"text",id:"preparationTime",name:"preparationTime",value:E.preparationTime,onChange:D,className:"bg-gray-100 outline-none focus:ring-0",style:{outline:"none",boxShadow:"none"},onFocus:e=>
1{e.target.style.outline="2px solid ".concat(F),e.target.style.boxShadow="none"},onBlur:e=>{e.target.style.outline="none",e.target.style.boxShadow="none"}}),q.preparationTime&&(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"  text-xs",children:q.preparationTime})]}),(0,t.jsx)(W,{name:"returnLikelihood",label:"8. Entonces, \xbfvolver\xedas a visitarnos?",description:"(0 = No, hagamos como que nunca vine aqu\xed) (10 = Por supuesto, Gong cha me encanta y adem\xe1s invitar\xe9 a mis amigos y familiares)"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("label",{style:{color:m,fontFamily:"".concat(f,", sans-serif")},htmlFor:"comments",className:"block font-bold leading-5",children:"Tus comentarios nos ayudar\xe1n a hacer de Gong cha la mejor marca de bubble tea del mundo..."}),(0,t.jsx)("p",{style:{color:m,fontFamily:"".concat(f,", sans-serif")},className:"text-sm  ",children:"Nos encanta escuchar tus comentarios, comp\xe1rtenos lo que m\xe1s te gusta y lo que podemos mejorar en \xa1Gong cha...!"}),(0,t.jsx)(w,{id:"comments",name:"comments",value:E.comments,onChange:D,className:"min-h-[100px]",style:{outline:"none",boxShadow:"none"},onFocus:e=>{e.target.style.outline="2px solid ".concat(F),e.target.style.boxShadow="none"},onBlur:e=>{e.target.style.outline="none",e.target.style.boxShadow="none"}}),q.comments&&(0,t.jsx)("p",{style:{color:F,fontFamily:"".concat(f,", sans-serif")},className:"text-xs",children:q.comments})]}),(0,t.jsx)(v.$,{type:"submit",className:"w-full py-2",disabled:z,style:{color:y,backgroundColor:_,fontFamily:"".concat(f,", sans-serif")},children:z?"Enviando...":"Enviar"})]})})]})};var O=a(72124),T=a(18256),E=a(76754),I=a(40694),q=a(38567),B=a(42422),z=a(11962);n()(()=>a.e(8349).then(a.bind(a,58349)),{loadableGenerated:{webpack:()=>[58349]},loading:()=>(0,t.jsx)(f.A,{})});let A=n()(()=>Promise.all([a.e(3958),a.e(9389)]).then(a.bind(a,487)),{loadableGenerated:{webpack:()=>[487]},loading:()=>(0,t.jsx)(f.A,{})}),R=n()(()=>a.e(1419).then(a.bind(a,1419)),{loadableGenerated:{webpack:()=>[1419]},loading:()=>(0,t.jsx)(f.A,{})}),P=n()(()=>a.e(6034).then(a.bind(a,96034)),{loadableGenerated:{webpack:()=>[96034]},loading:()=>(0,t.jsx)(f.A,{})}),D=n()(()=>Promise.all([a.e(8563),a.e(6771),a.e(8438)]).then(a.bind(a,88438)),{loadableGenerated:{webpack:()=>[88438]},loading:()=>(0,t.jsx)(f.A,{})}),J=n()(()=>Promise.all([a.e(7551),a.e(6140)]).then(a.bind(a,98442)),{loadableGenerated:{webpack:()=>[98442]},loading:()=>(0,t.jsx)(f.A,{})}),M=n()(()=>Promise.all([a.e(7551),a.e(1413)]).then(a.bind(a,39231)),{loadableGenerated:{webpack:()=>[39231]},loading:()=>(0,t.jsx)(f.A,{})});var G=!0;let L=e=>{var r,a;let[o,n]=(0,l.useState)(!1),[c,f]=(0,l.useState)(!1),[v,x]=(0,l.useState)([]),[w,S]=(0,l.useState)(null),[j,N]=(0,l.useState)({}),C=(0,s.useRouter)(),{t:k}=(0,d.Bd)(),[G,L]=(0,l.useState)(null),[Q,W]=(0,l.useState)([]),[V,H]=(0,l.useState)([]),[U,X]=(0,l.useState)(null),[$,Z]=(0,l.useState)(!0),[Y,K]=(0,l.useState)(),[ee,er]=(0,l.useState)({}),{handleApiError:ea}=(0,p.u)(),et=l.useRef(!1),[eo,en]=(0,l.useState)(!1),[ei,es]=(0,l.useState)(!1),[el,ed]=(0,l.useState)("regular"),[ec,eu]=(0,l.useState)(null),[em,ef]=(0,l.useState)(new Set),[ep,eb]=(0,l.useState)("all"),[ey,e_]=(0,l.useState)([]),[eg,eh]=(0,l.useState)(new Set),[ev,ex]=(0,l.useState)(null),[ew,eS]=(0,l.useState)(!0),[ej,eN]=(0,l.useState)(""),[eC,ek]=(0,l.useState)(!1),[eF,eO]=(0,l.useState)(new Set),eT=(0,l.useContext)(i.ib);if(!eT)throw Error("IndexPage must be used within a MyProvider");let{openSuccessModalFunc:eE,openFailureModalFunc:eI,setOpenSuccessModal:eq,openSuccessModal:eB,openFailureModal:ez,setOpenFailureModal:eA,modalMessage:eR,sessionId:eP,curveOrderInstruction:eD,setCurveOrderInstruction:eJ,restaurantData:eM}=eT,eG=(e,r)=>{let a=localStorage.getItem(e);if(a)try{let e=JSON.parse(a);r(e)}catch(r){console.error("Error parsing ".concat(e,":"),r)}},{isGoogleMapsLoaded:eL,loadError:eQ}=(0,T.B)();(0,l.useEffect)(()=>{L(localStorage.getItem("version")),(0,y.nn)((0,_.o)(),5),(0,O.r)((0,_.o)())},[]),(0,l.useEffect)(()=>{let e="".concat((0,_.o)());if(!e){C.push(e);return}let r=localStorage.getItem("loggedin_".concat(e)),a=localStorage.getItem("profile_check_".concat(e));r&&a||(console.log("Redirecting: Missing loggedin or profile_check key"),C.push("/".concat(e)))},[C]);let eW=(0,l.useCallback)(e=>{"function"==typeof n&&n(e)},[n]),eV=(0,l.useCallback)(e=>{"function"==typeof f&&f(e)},[f]);(0,l.useEffect)(()=>{let e=(0,_.o)(),r=localStorage.getItem("getPickupBranches_".concat(e));if(r&&(null==ee?void 0:ee.branch_id))try{var a,t,o;let e=JSON.parse(r),n=null==e?void 0:null===(a=e.branches_data)||void 0===a?void 0:a.find(e=>e.branch_id===ee.branch_id);(null==n?void 0:null===(o=n.available_services)||void 0===o?void 0:null===(t=o.curveorder)||void 0===t?void 0:t.status)?eJ(n.available_services.curveorder.instruction):eJ(null)}catch(e){console.error("Error parsing pickup branches",e)}},[null==ee?void 0:ee.branch_id]),(0,l.useEffect)(()=>{eQ&&(console.error("Google Maps load error:",eQ),"function"==typeof eI&&eI(k("Map failed to load")),eW(!1))},[eQ,eI,k]),(0,l.useEffect)(()=>
1{if("scheduled"===localStorage.getItem("Ordertype")){ed("programmed");let e=setTimeout(()=>{localStorage.removeItem("Ordertype")},6e3);return()=>clearTimeout(e)}},[]),(0,l.useEffect)(()=>{let e=localStorage.getItem("orderId_feedback_".concat((0,_.o)()));if(e&&Q.length>0){let r=Q.find(r=>r.order_id===Number(e));r&&(er({order_id:r.order_id,branch_id:r.branch_id,...r}),eV(!0),eN("regular"),localStorage.removeItem("orderId_feedback_".concat((0,_.o)())))}},[Q,C.query.resturant]),(0,l.useEffect)(()=>{let e=localStorage.getItem("resturantserversidesettings"),r=localStorage.getItem("profile_check_".concat((0,_.o)())),a=localStorage.getItem("resturantserversideTheme");if(e)try{let r=JSON.parse(e);x(r)}catch(e){console.error("Error parsing serversidesettings:",e)}if(a)try{let e=JSON.parse(a);S(e)}catch(e){console.error("Error parsing resturantserversideTheme:",e)}if(r)try{let e=JSON.parse(r);N(e)}catch(e){console.error("Error parsing profilecheck:",e)}let{resturant:t}=C.query;console.log(t,"fff");let o="profile_check_".concat((0,_.o)());eG("resturantserversidesettings",x),eG(o,N),eG("resturantserversideTheme",S)},[C.query.resturant]),(0,l.useEffect)(()=>{let e=localStorage.getItem("OrderPlacedData_".concat((0,_.o)()));if(e&&Q.length>0)try{let r=JSON.parse(e),a=null==r?void 0:r.order_id;if(a){let e=Q.find(e=>e.order_id===Number(a));e?(er(e),eu(e.order_id.toString()),eW(!0)):console.warn("Order not found in history")}}catch(e){console.error("Error parsing OrderPlacedData:",e)}finally{localStorage.removeItem("OrderPlacedData_".concat((0,_.o)()))}},[Q,C.query.resturant]),(0,l.useEffect)(()=>{let{order:e}=C.query;if(e&&Q.length>0){let r=Number(e),a=Q.find(e=>e.order_id==r);a?(er({order_id:a.order_id,branch_id:a.branch_id,...a}),f(!0),eN("regular")):(console.warn("Order ".concat(r," not found in history")),eI(k("order_not_found")))}},[C.query.order,Q]),(0,l.useEffect)(()=>{let e=localStorage.getItem("status_id");e&&(eW(!0),eu(e),localStorage.removeItem("status_id"))},[eW]),(0,l.useEffect)(()=>{if(!ec||0===Q.length||(null==ee?void 0:ee.order_id))return;let e=Q.find(e=>String(e.order_id)===String(ec));e&&er(e)},[ec,Q]),(0,l.useEffect)(()=>{let e=(0,_.o)(),r=localStorage.getItem("TrackOrderData_".concat(e));if(r)try{let a=JSON.parse(r);er(a),eW(!0),eu(a.order_id.toString()),localStorage.removeItem("TrackOrderData_".concat(e))}catch(e){console.error("Error parsing TrackOrderData:",e),eI(k("error_fetching_order"))}},[eI,k,eW]),(0,l.useEffect)(()=>{(async()=>{try{if((null==v?void 0:v.restaurant_id)&&(null==j?void 0:j.member_id)&&(null==j?void 0:j.phone_number)&&eP&&G&&!et.current){et.current=!0;let e={restaurant_id:v.restaurant_id,member_id:j.member_id,brand_id:v.brand_id,phone_number:j.phone_number,session_id:eP,version:G},r=window.location.origin?"".concat(window.location.origin,"/"):"https://order.foodbot.ai/";Z(!0);let a=await (0,B.l)(e,r);W((null==a?void 0:a.orders_info)||[]),H((null==a?void 0:a.scheduled_orders_info)||[]),K(a)}}catch(e){m.Cp(e),ea(e)}finally{Z(!1)}})()},[v,j,eP,G]),(0,l.useEffect)(()=>{"favorite"===ep?e_(Q.filter(e=>1==e.is_favorite)):e_(Q)},[ep,Q]);let eH=(null==w?void 0:w.primary_text_color)||"#000000",eU=(null==w?void 0:w.secondary_text_color)||"#FFCD00";null==w||w.highlight_text_color;let eX=(null==w?void 0:null===(r=w.fonts)||void 0===r?void 0:r.name)||"sans-serif";null==w||w.primary_description_color;let e$=(null==w?void 0:w.primary_button_color)||"#000000",eZ=(null==w?void 0:w.primary_button_text_color)||"#FFCD00",eY=(null==w?void 0:w.secondary_button_color)||"#FFCD00",eK=(null==w?void 0:w.secondary_button_text_color)||"#000000";null==w||w.third_button_color,null==w||w.third_button_text_color;let e0=(null==w?void 0:w.background_color)||"#FFFFFF",e1=(null==w?void 0:w.highlight_bg_color)||"#FF0000",e2=(null==w?void 0:w.error_primary_color)||"#FF0000",e4=e=>{let r=new Date(e),a=r.toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),t=r.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:"America/Mexico_City"});return"".concat(a," - ").concat(t)},e5=(0,l.useCallback)(u()(()=>{var e;Z(!0),(null==C?void 0:null===(e=C.query)||void 0===e?void 0:e.resturant)&&C.push("/".concat(C.query.resturant))},100),[C]),e3=async e=>{if(eF.has(e.order_id))return;let r=1===e.is_favorite;eO(r=>new Set(r).add(e.order_id)),W(a=>a.map(a=>a.order_id===e.order_id?{...a,is_favorite:r?0:1}:a));try{let a="".concat(window.location.origin,"/"),t={restaurant_id:null==v?void 0:v.restaurant_id,branch_id:null==e?void 0:e.branch_id,order_id:null==e?void 0:e.order_id,member_id:null==e?void 0:e.member_id,session_id:eP,version:G},o=await (0,B._)({...t,is_favorite:r?0:1},a);if(200==o.status_code||201==o.status_code)W(a=>a.map(a=>a.order_id==e.order_id?{...a,is_favorite:r?0:1}:a));else throw Error("Non-200 response")}catch(a){W(a=>a.map(a=>a.order_id===e.order_id?{...a,is_favorite:r?1:0}:a)),eI(k("order_favorite_error"))}finally{eO(r=>{let a=new Set(r);return a.delete(e.order_id),a})}};if($)return(0,t.jsx)(z.A,{text:k("processing")});let e6=e=>{eh(r=>new Set(r).add(e)),f(!1),ex(null)},e9=async e=>{let r=window.location.origin?"".concat(window.location.origin,"/"):"https://order.foodbot.ai/",a=await (0,I.R)(e,"".concat((0,_.o)()),r,{order_id:null==ee?void 0:ee.order_id,restaurant_id:null==v?void 0:v.restaurant_id,branch_id:null==ee?void 0:ee.branch_id,customer:{name:null==j?void 0:j.user_name,phone:null==j?void 0:j.phone_number},fromOrderTrack:!0,cash_expected:(null==e?void 0:e.cash_expected)||""});if(a.success)ek(!1),await e7(),setTimeout(()=>{eE(k("Curve takeout added successfully"))},100);else{let e=a.message;(null==e?void 0:e.toLowerCase().includes("order is already completed"))&&(e=k("order_completed_curbside_unavailable")),eI(e)}},e7=async()=>{try{let r={restaurant_id:v.restaurant_id,member_id:j.member_id,brand_id:v.brand_id,phone_number:j.phone_number,session_id:eP,version:G},a=window.location.origin?"".concat(window.location.origin,"/"):"https://order.foodbot.ai/",t=await (0,B.l)(r,a);if(W((null==t?void 0:t.orders_info)||[]),H((null==t?void 0:t.scheduled_orders_info)||[]),K(t),null==ee?void 0:ee.order_id){var e;let r=null==t?void 0:null===(e=t.orders_info)||void 0===e?void 0:e.find(e=>e.order_id===ee.order_id);r&&er(r)}}catch(e){ea(e)}},e8=e=>{Z(!0),function(e,r){var a,t,o,n;let{resturantsettings:i,session_id:s,version:l,router:d}=r,c=(0,_.o)();localStorage.setItem("reorder_data_".concat(c),JSON.stringify(e));let u="takeout"===e.order_type?"pickup":"delivery",m=localStorage.getItem("preferred_language")||(null==i?void 0:i.bot_language)||"es",f=localStorage.getItem("getPickupBranches_".concat(c)),p=(f&&null!==(t=null===(a=JSON.parse(f))||void 0===a?void 0:a.branches_data)&&void 0!==t?t:[]).find(r=>r.branch_id===e.branch_id),b="".concat(window.location.origin,"/");
1if("pickup"===u){if(p){let e={mode:"pickup",branch:p};localStorage.setItem("selected_branchmode_".concat(c),JSON.stringify(e)),g.A.set("selected_branchmode_".concat(c),JSON.stringify(e),h);let r={restaurant_id:null==i?void 0:i.restaurant_id,branch_id:p.branch_id,is_schedule:!1,order_type:"takeout",source:{lat:Number(p.branch_latitude),lng:Number(p.branch_longitude)},is_callin:!1,lang:m,api_source:"EcomV2",session_id:s,version:l,request_timestamp:new Date().toISOString(),currentDomain:b};localStorage.setItem("payload_".concat(c),JSON.stringify(r)),g.A.set("payload_".concat(c),JSON.stringify(r),h)}}else{let r={mode:"delivery",branch:{branch_id:e.branch_id,formatted_address:e.formatted_address||"",latitude:e.latitude||"",longitude:e.longitude||"",city:e.city||"",state:e.state||"",street:e.street||"",unit_number:e.unit_number||"",zipcode:e.zipcode||"",country:e.country||"",address_label:e.address_label||"",delivery_instruction:e.delivery_instruction||""}};localStorage.setItem("selected_branchmode_".concat(c),JSON.str
1ingify(r)),g.A.set("selected_branchmode_".concat(c),JSON.stringify(r),h);let a={restaurant_id:null==i?void 0:i.restaurant_id,branch_id:e.branch_id,is_schedule:!1,order_type:"delivery",source:{lat:Number(null!==(o=null==p?void 0:p.branch_latitude)&&void 0!==o?o:0),lng:Number(null!==(n=null==p?void 0:p.branch_longitude)&&void 0!==n?n:0)},destination:{lat:Number(e.latitude),lng:Number(e.longitude)},address:{formatted_address:e.formatted_address||"",unit_number:e.unit_number||"",latitude:e.latitude||"",longitude:e.longitude||"",zipcode:e.zipcode||"",city:e.city||"",state:e.state||"",country:e.country||"",street:e.street||"",address_type:""},is_callin:!1,lang:m,api_source:"EcomV2",session_id:s,version:l,ui_request_timestamp:new Date().toISOString(),currentDomain:b};localStorage.setItem("payload_".concat(c),JSON.stringify(a)),g.A.set("payload_".concat(c),JSON.stringify(a),h)}d.push("/".concat(c,"/cart"))}(e,{resturantsettings:v,session_id:eP,version:G,router:C})},re=async e=>{let r=window.location.origin?"".concat(window.location.origin,"/"):"https://order.foodbot.ai/",a={order_id:e.order_id,restaurant_id:e.restaurant_id,branch_id:e.branch_id,customer_arrived:e.customer_arrived,currentDomain:r},t=await (0,I.O)(a);if(t.success)console.log("Customer arrival notified ✅",t.data),await e7();else{let e=t.message;(null==e?void 0:e.toLowerCase().includes("order is already completed"))&&(e=k("order_completed_curbside_unavailable")),eI(e)}},rr=(null==v?void 0:v.restaurant_id)===1158||(null==v?void 0:v.restaurant_id)===255||(null==v?void 0:v.restaurant_id)===400;return(0,t.jsxs)("div",{style:{backgroundColor:e0,fontFamily:"".concat(eX,", sans-serif")},className:"mx-auto  lg:max-w-full max-w-7xl  px-4 sm:px-6 min-h-screen",children:[eB&&(0,t.jsx)(J,{open:eB,setOpen:eq,modalMessage:eR,closeModal:()=>eq(!1)}),(0,t.jsx)(q.A,{open:eC,onClose:()=>{ek(!1),localStorage.removeItem("orderTotal_".concat((0,_.o)())),localStorage.removeItem("paymentMode_".concat((0,_.o)()))},onSubmit:e9,secondaryColor:eU,secondaryBtn:eY,secondaryText:eK,fontFamily:eX,primaryColor:eH,instruction:eD,taxDetails:{total:(null==ee?void 0:ee.amount_paid)?parseFloat(ee.amount_paid):0},currency:null==v?void 0:v.currency_symbol,ErrorPrimaryColor:e2,secondaryBtnTxtColor:eK,saveAlias:(0,_.o)()}),ez&&(0,t.jsx)(M,{open:ez,setOpen:eA,modalMessage:eR,closeModal:()=>eA(!1),redcolor:e2,fontFamily:eX}),o&&(0,t.jsx)(R,{open:o,setOpen:n,secondaryBtnColor:eY,secondaryBtnTxtColor:eK,fontFamily:eX,bgColor:e0,primaryColor:eH,children:eL?(0,t.jsx)(D,{resturantsettings:v,session_id:eP,version:G,handleApiError:ea,openFailureModalFunc:eI,openSuccessModalFunc:eE,id:ee,memberId:null==j?void 0:j.member_id,order_history_api:B.l,phone_number:null==j?void 0:j.phone_number,primaryColor:eH,secondaryColor:eU,fontFamily:eX,primaryBtnTxtColor:eZ,primaryBtnColor:e$,bgColor:e0,secondaryBtnColor:eY,secondaryBtnTxtColor:eK,statusId:ec,isGoogleMapsLoaded:eL,setShowCurveTakeoutModal:ek,instruction:eD,handleCustomerArrived:e=>re(e)},"order-track"):(0,t.jsx)("div",{children:"Loading map..."})},"order-status-modal"),c&&(0,t.jsx)(R,{open:c,setOpen:f,secondaryBtnColor:eY,secondaryBtnTxtColor:eK,fontFamily:eX,bgColor:e0,primaryColor:eH,children:rr?(0,t.jsx)(F,{resturantsettings:v,session_id:eP,version:G,openFailureModalFunc:eI,openSuccessModalFunc:eE,memberId:null==j?void 0:j.member_id,id:ee,primaryColor:eH,fontFamily:eX,bgColor:e0,highlightbgColor:e1,secondaryBtnTxtColor:eK,secondaryBtnColor:eY,setRateOrderModal:f,secondaryColor:eU,refreshOrderHistory:e7,onFeedbackSubmitted:()=>{(null==ev?void 0:ev.order_id)?e6(ev.order_id):console.error("Error: currentRatingOrder or order_id is null or undefined")}}):(0,t.jsx)(P,{feedback:Y&&(null==Y?void 0:null===(a=Y.feedback_settings)||void 0===a?void 0:a.feedback)||(null==Y?void 0:Y.feedback_settings),resturantsettings:v,session_id:eP,version:G,handleApiError:ea,openFailureModalFunc:eI,openSuccessModalFunc:eE,id:ee.order_id,branch_id:ee.branch_id,setRateOrderModal:f,primaryColor:eH,secondaryColor:eU,secondaryBtnTxtColor:eK,secondaryBtnColor:eY,fontFamily:eX,order_history_api:B.l,memberId:null==j?void 0:j.member_id,phone_number:null==j?void 0:j.phone_number,setIsFeedbackSubmitted:en,bgColor:e0,tab:ej,refreshOrderHistory:e7})},"order-status-modal"),(0,t.jsxs)("div",{style:{backgroundColor:e0,fontFamily:"".concat(eX,", sans-serif")},className:"flex justify-between items-center border-b py-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-5",children:[(0,t.jsxs)("div",{style:{color:eH,fontFamily:"".concat(eX,", sans-serif")},className:"  font-black text-lg my-auto",children:[" ",k("my_orders")]}),(0,t.jsxs)(b.l6,{onValueChange:e=>{eb(e)},defaultValue:ep,children:[(0,t.jsx)(b.bq,{className:"w-[180px]   border border-gray-300",style:{color:eH,fontFamily:"".concat(eX,", sans-serif")},children:(0,t.jsx)(b.yv,{style:{color:eH},placeholder:k("filter_orders")})}),(0,t.jsxs)(b.gC,{children:[(0,t.jsx)(b.eb,{value:"all",children:k("all_orders")}),(0,t.jsx)(b.eb,{value:"favorite",children:k("favorite_orders")})]})]})]}),(0,t.jsx)("div",{onClick:e5,children:(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer",children:[(0,t.jsx)("rect",{width:"15.1632",height:"3.03264",transform:"matrix(0.707107 -0.707106 0.707107 0.707106 4.50195 15.2888)",fill:eH}),(0,t.jsx)("rect",{width:"15.1632",height:"3.03264",transform:"matrix(-0.707107 -0.707106 0.707107 -0.707106 15.2241 17.4329)",fill:eH})]})})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",padding:"1rem",justifyContent:"center"},children:[(0,t.jsx)("button",{onClick:()=>ed("regular"),style:{padding:"0.5rem 1rem",borderRadius:"9999px",fontSize:"0.875rem",fontFamily:"".concat(eX,", sans-serif"),transition:"background-color 0.3s, color 0.3s",backgroundColor:"regular"===el?e$:"transparent",color:"regular"===el?eZ:eH,cursor:"pointer"},children:k("Regular Orders")}),(0,t.jsx)("button",{onClick:()=>ed("programmed"),style:{padding:"0.5rem 1rem",borderRadius:"9999px",fontSize:"0.875rem",fontFamily:"".concat(eX,", sans-serif"),transition:"background-color 0.3s, color 0.3s",backgroundColor:"programmed"===el?e$:"transparent",color:"programmed"===el?eZ:eH,cursor:"pointer"},children:k("Scheduled Orders")})]}),"regular"===el&&(0,t.jsx)("div",{className:"py-4 flex justify-center",children:ey&&ey.length>
10?(0,t.jsx)("div",{className:"grid xl:grid-cols-3 md:grid-cols-2 gap-4",children:ey.map(e=>(0,t.jsx)("div",{className:"lg:w-[400px] w-[350px]",children:(0,t.jsx)(A,{item:e,isOpen:U===e.order_id,onToggle:()=>X(U===e.order_id?null:e.order_id),primaryColor:eH,secondaryColor:eU,secondaryBtnColor:eY,secondaryBtnTxtColor:eK,fontFamily:eX,bgColor:e0,handleAddFavorite:e3,isAddingFavorite:eF,handleReorder:e8,onRateOrder:e=>{f(!0),er(e),eN("regular")},onTrackOrder:e=>{n(!0),er(e)},isFeedbackSubmitted:eo,ratedOrders:eg,orderSurveyArray:(null==Y?void 0:Y.orderSurveyArray)||[],formatDate:e4,currency:null==v?void 0:v.currency_symbol,resturantsettings:v,showReorder:!0})},e.order_id))}):(0,t.jsx)(E.A,{primaryColor:eH,secondaryColor:eU,fontFamily:eX,secondaryBtnTxtColor:eK,secondaryBtnColor:eY,onClick:()=>C.push("/".concat(C.query.resturant)),text:k("place_your_order")})}),"programmed"===el&&(0,t.jsx)("div",{className:"py-4 flex justify-center",children:V&&V.length>0?(0,t.jsxs)("div",{className:"grid xl:grid-cols-3 lg:grid-cols-2 gap-4",children:[!1,V.map(e=>(0,t.jsx)("div",{className:"lg:w-[400px] w-[350px]",children:(0,t.jsx)(A,{item:e,isOpen:U===e.order_id,onToggle:()=>X(U===e.order_id?null:e.order_id),primaryColor:eH,secondaryColor:eU,secondaryBtnColor:eY,secondaryBtnTxtColor:eK,fontFamily:eX,bgColor:e0,handleAddFavorite:e3,isAddingFavorite:eF,onRateOrder:e=>{f(!0),er(e),eN("programmed")},onTrackOrder:e=>{n(!0),er(e)},isFeedbackSubmitted:eo,ratedOrders:eg,orderSurveyArray:(null==Y?void 0:Y.orderSurveyArray)||[],formatDate:e4,currency:null==v?void 0:v.currency_symbol,resturantsettings:v,showReorder:!1})},e.order_id))]}):(0,t.jsx)("div",{className:"flex flex-col items-center justify-center py-8",children:(0,t.jsx)(E.A,{primaryColor:eH,secondaryColor:eU,fontFamily:eX,secondaryBtnTxtColor:eK,secondaryBtnColor:eY,onClick:()=>C.push("/".concat(C.query.resturant)),text:k("no_scheduled_orders")})})})]})}},42422:(e,r,a)=>{"use strict";a.d(r,{_:()=>n,l:()=>o});var t=a(49505);let o=async(e,r)=>{try{let a=(0,t.z)(),o=JSON.stringify({restaurant_id:null==e?void 0:e.restaurant_id,limit:10,member_id:null==e?void 0:e.member_id,brand_id:null==e?void 0:e.brand_id,phone_number:null==e?void 0:e.phone_number,session_id:null==e?void 0:e.session_id,source:"EcomV2",version:null==e?void 0:e.version,ui_request_timestamp:new Date().toISOString()}),n="https://order.foodbot.ai/apiv2";r&&(n="".concat(r.replace(/\/$/,""),"/apiv2"));let i=await fetch("".concat(n,"/ecom/v1/user-order-history"),{method:"POST",headers:a,body:o});return i.ok||console.log("Failed to fetch order history: ".concat(i.status)),await i.json()}catch(e){return console.error("fetchOrderHistory error:",e),{data:[],error:!0}}},n=async(e,r)=>{try{var a;let o=(0,t.z)(),n=JSON.stringify({restaurant_id:e.restaurant_id,branch_id:e.branch_id,order_id:e.order_id,member_id:e.member_id,is_favorite:null!==(a=e.is_favorite)&&void 0!==a?a:1,session_id:e.session_id,lang:e.lang||"es",source:"EcomV2",version:e.version,ui_request_timestamp:new Date().toISOString()}),i="https://order.foodbot.ai/apiv2";r&&(i="".concat(r,"apiv2"));let s=await fetch("".concat(i,"/ecom/v1/add-order-favorite"),{method:"POST",headers:o,body:n});return s.ok||console.log("Failed to add favorite: ".concat(s.status)),await s.json()}catch(e){return console.error("addOrderFavorite error:",e),{data:[],error:!0}}}}},e=>{var r=r=>e(e.s=r);e.O(0,[3342,1791,3139,1430,9861,4743,6130,9965,8051,6610,6576,8952,6754,636,6593,8792],()=>r(52456)),_N_E=e.O()}]);

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.