PageSourceSearch

https://assets.foodi.de/_nuxt/vWup9rfs.js

js foodi.de collected 2026-09-24 13:26:23 UTC 16,005 bytes, 1 lines download raw bytes

1import{_ as Xe}from"./DC2e6-jH.js";import{d as De,u as Be,e as o,f as l,g as n,j as ve,t as u,q as v,F as x,v as pe,s as Ze,h as i,i as d,r as p,k as a,_ as Ne,a as et,l as tt,a8 as at,o as ot,M as Ie,b as st,c as nt,w as g,B as T,G as lt,a9 as it,aa as ut,a7 as ct}from"./Deum5oGV.js";import{u as xe,m as rt}from"./DL4RzNd0.js";import{u as dt}from"./BsfaCrct.js";import{g as vt,u as pt,G as mt,C as _t,O as bt,P as ft,N as ht,y as kt,l as Pe}from"./BnIb3jeQ.js";import{c as yt}from"./B-LNKekV.js";import{u as gt,C as wt,i as Ct,p as Ot,b as $t}from"./7WXki7YU.js";import{a as q,b as Te}from"./vSMh8uW6.js";import{U as w}from"./B9dLiKHF.js";import{a as St,c as Mt}from"./C8tAe10s.js";import{U as It}from"./j22ZrKSo.js";import{u as Pt}from"./CpGPBirc.js";import"./CSIP8b58.js";import"./Ckpm3n6N.js";import"./BCs37wSc.js";import"./Pbdi3kZZ.js";import"./5B2o6dxm.js";import"./CTvUHECy.js";const Tt={class:"line"},Dt={class:"line__info"},Bt={class:"line__name"},Nt={key:0,class:"line__variant"},xt={key:0,class:"line__recipe"},Vt={key:1,class:"line__chips"},At={key:2,class:"line__note"},Lt={class:"line__actions"},Et=["disabled"],Ut=["disabled"],Gt=["disabled"],Ht=["disabled"],Ft=["disabled"],jt={class:"line__right"},Rt={class:"line__stepper"},zt=["disabled","aria-label"],Yt={class:"line__qty"},qt=["disabled","aria-label"],Kt=De({__name:"BasketLineItem",props:{group:{},disabled:{type:Boolean},loggedIn:{type:Boolean}},emits:["increment","decrement","edit-ingredients","note","save-custom","delete-custom"],setup(k,{emit:c}){const m=k,$=c,{t:e}=Be(),S=xe(),V=p(!1),K=a(()=>m.group.sample.item_has_ai_ingredients);async function C(){if(!(V.value||m.disabled)){V.value=!0;try{await S.removeAiIngredientsForGroup(m.group)}finally{V.value=!1}}}const A=a(()=>m.group.sample.addons.map(I=>({key:I.id,text:e(`basket.line.${Mt(I.count)}`,{name:I.title}),tone:St(I)}))),J=a(()=>m.group.sample.humanSize.trim()),L=a(()=>(m.group.sample.productdata.item_ingredients_list??"").trim()),M=a(()=>m.group.sample.item_note.trim()),E=a(()=>!!m.group.sample.productdata.item_ingredients),oe=a(()=>m.group.sample.addons.length>0?e("basket.line.editSelection"):e("basket.line.editIngredients")),U=a(()=>M.value?e("basket.line.noteEdit"):e("basket.line.note")),B=a(()=>!!m.loggedIn&&m.group.sample.item_customerproduct_allowed),Q=a(()=>!!m.loggedIn&&m.group.sample.item_customerproduct_delete_allowed);return(I,b)=>(o(),l("article",Tt,[n("div",Dt,[n("div",Bt,[ve(u(k.group.sample.productdata.item_title)+" ",1),J.value?(o(),l("span",Nt,"· "+u(J.value),1)):v("",!0)]),L.value?(o(),l("p",xt,u(L.value),1)):v("",!0),A.value.length?(o(),l("div",Vt,[(o(!0),l(x,null,pe(A.value,O=>(o(),l("span",{key:O.key,class:Ze(["line__chip",`line__chip--${O.tone}`])},u(O.text),3))),128))])):v("",!0),M.value?(o(),l("p",At,u(i(e)("basket.line.savedNote",{note:M.value})),1)):v("",!0),n("div",Lt,[E.value?(o(),l("button",{key:0,type:"button",class:"line__action",disabled:k.disabled,onClick:b[0]||(b[0]=O=>$("edit-ingredients"))},u(oe.value),9,Et)):v("",!0),n("button",{type:"button",class:"line__action",disabled:k.disabled,onClick:b[1]||(b[1]=O=>$("note"))},u(U.value),9,Ut),K.value?(o(),l("button",{key:1,type:"button",class:"line__action",disabled:k.disabled||V.value,onClick:C},u(i(e)("basket.line.removeAi")),9,Gt)):v("",!0),B.value?(o(),l("button",{key:2,type:"button",class:"line__action",disabled:k.disabled,onClick:b[2]||(b[2]=O=>$("save-custom"))},u(i(e)("basket.line.saveCustom")),9,Ht)):Q.value?(o(),l("button",{key:3,type:"button",class:"line__action line__action--danger",disabled:k.disabled,onClick:b[3]||(b[3]=O=>$("delete-custom"))},u(i(e)("basket.line.deleteCustom")),9,Ft)):v("",!0)])]),n("div",jt,[d(w,{class:"line__price",value:k.group.unitPrice},null,8,["value"]),n("div",Rt,[n("button",{type:"button",class:"line__step line__step--minus",disabled:k.disabled,"aria-label":i(e)("basket.line.decrease"),onClick:b[4]||(b[4]=O=>$("decrement"))}," − ",8,zt),n("span",Yt,u(k.group.quantity),1),n("button",{type:"button",class:"line__step line__step--plus",disabled:k.disabled,"aria-label":i(e)("basket.line.increase"),onClick:b[5]||(b[5]=O=>$("increment"))}," + ",8,qt)])])]))}}),Jt=Object.assign(Ne(Kt,[["__scopeId","data-v-3e6482f3"]]),{__name:"BasketLineItem"}),Qt={class:"cart"},Wt={class:"cart__header"},Xt={class:"cart__title"},Zt={key:0,class:"cart__skeleton","aria-hidden":"true"},ea={key:0,class:"cart__participants"},ta={key:1,class:"cart__empty",role:"status"},aa={class:"cart__empty-title"},oa={class:"cart__empty-hint"},sa={class:"cart__items"},na={key:0,class:"cart__orderedby"},la={key:0,class:"cart__coupon"},ia={key:0,class:"coupon-line"},ua={class:"coupon-line__info"},ca={class:"coupon-line__label"},ra={key:0,class:"coupon-line__msg"},da={class:"coupon-line__right"},va=["disabled"],pa={class:"coupon-form__field"},ma=["disabled"],_a={key:1,class:"cart__mode"},ba={class:"cart__mode-label"},fa={class:"cart__summary"},ha={class:"cart__row"},ka={key:2,class:"cart__row"},ya={key:1},ga={key:3,class:"cart__mbw"},wa={class:"cart__row cart__row--total"}
1,Ca={type:"button",class:"cart__cta cart__cta--disabled",disabled:""},Oa={key:0,class:"cart__cta-hint"},$a={key:0,class:"cart-toast",role:"status","aria-live":"polite"},Sa=De({__name:"[host]",setup(k){const{t:c}=Be(),m=et(),{$api:$}=tt(),e=xe(),S=dt(),V=at(),K=vt(),C=a(()=>String(m.params.host??"")),A=a(()=>`/speisekarte/${C.value}`),J=a(()=>`/checkout/${C.value}`),L=a(()=>e.currenthost?.item_name??""),M=a(()=>{const t=e.currenthost?.item_homedelivery;return t===0||t==="0"?"table":Te(t)?"delivery":"pickup"}),E=gt(),oe=Pt(),U=a(()=>oe.hasTableFor(e.currenthost?.id??"")),B=a(()=>({allowDelivery:M.value==="delivery"&&e.currenthost?.item_active_delivery!=="N",allowPickup:N.value})),Q=a(()=>E.canChoose(B.value)&&!U.value&&!y.value),I=a(()=>Q.value?E.currentMode(C.value,B.value):M.value==="delivery"&&!B.value.allowDelivery&&N.value?"pickup":M.value);function b(t){E.setMode(C.value,t)}const O=a(()=>({mbw:e.mbw,free:q(e.shipping?.free),maxMbwDeviation:q(e.currenthost?.item_max_mbw_deviation),webpaymentFree:e.currenthost?.item_webpayment_free==="Y"})),me=a(()=>{const t=e.coupon;return t?{success:t.success===!0,discount:q(t.item_discount)}:null}),se=a(()=>me.value?.success===!0),_e=a(()=>Oe(String(e.coupon?.message??""))),be=a(()=>q(e.coupon?.item_discount_left)),Ve=a(()=>q(e.coupon?.item_discount_value)),Ae=a(()=>Te(e.currenthost?.item_allow_coupons)),f=a(()=>yt({productSum:e.subtotal,mode:I.value,host:O.value,shipping:e.shippingCost,coupon:me.value,payment:"nachnahme"})),G=a(()=>I.value==="delivery"),Le=a(()=>G.value&&f.value.mbwDeviation>0&&!y.value),N=a(()=>e.currenthost?.item_active_pickup==="Y"&&e.currenthost?.item_pickup!=="N"),y=a(()=>S.isClient&&S.hasOfficeOrder(e.currenthost?.id??"")),ne=a(()=>Ct({loaded:e.loaded,hostMode:M.value,allowDelivery:B.value.allowDelivery,allowPickup:N.value,allowBookATable:e.currenthost?.item_allow_bookatable==="Y",isTableMode:U.value,isOfficeClient:y.value})),fe=a(()=>Ot({loaded:e.loaded,hostMode:M.value,offersDelivery:$t(e.currenthost),deliveryOn:e.currenthost?.item_active_delivery!=="N",offersPickup:e.currenthost?.item_pickup==="Y",pickupOn:e.currenthost?.item_active_pickup!=="N",allowDelivery:B.value.allowDelivery,allowPickup:N.value,isTableMode:U.value,isOfficeClient:y.value})),Ee=a(()=>e.itemCount>0&&!ne.value&&(y.value||!G.value||f.value.mbwGate||N.value)),Ue=a(()=>e.itemCount>0&&!ne.value&&G.value&&!f.value.mbwGate&&!N.value&&!y.value),Ge=a(()=>G.value&&f.value.mbwDeviation>0&&N.value&&!y.value),le=a(()=>y.value?f.value.productSum:f.value.displayTotal),he=a(()=>y.value?"groupClient.basket.ctaAmount":"basket.page.checkout"),W=p(!1),He=a(()=>W.value||e.loading);async function X(t){if(!W.value){W.value=!0;try{await t()}finally{W.value=!1}}}function Fe(t){X(()=>e.incrementGroup(t))}function je(t){X(()=>e.decrementGroup(t))}const ke=p(""),ie=p(!1);let H=null;function F(t){ke.value=t,ie.value=!0,H&&clearTimeout(H),H=setTimeout(()=>{ie.value=!1},2600)}const Re=a(()=>({id:e.currenthost?.id??"",url:C.value})),j=p(null),ue=p(!1),Z=p(null),ce=p(null),ee=p(!1);async function ye(){if(j.value)return j.value;const t=e.currenthost?.id;if(!t)return[];ue.value=!0;try{const s=await Pe(t,C.value);return j.value=s,s}finally{ue.value=!1}}async function ze(t){if(ue.value)return;const s=t.sample,_=(await ye()).find(r=>String(r.id)===String(s.item_product));if(!_){F(c("basket.page.editUnavailable"));return}Z.value=_,ce.value=kt(s),ee.value=!0}async function Ye(t){const h=(await ye()).find(_=>String(_.id)===String(t));h&&(Z.value=h,ce.value=null,ee.value=!0)}const re=p(!1),ge=p(""),we=p("");function qe(t){ge.value=t.sample.id,we.value=t.sample.item_note,re.value=!0}async function Ke(t){await X(async()=>{const s=await K.saveCustomerProduct(t.sample.id);s.success?(await Ce(),F(c("basket.custom.saved"))):s.message&&F(s.message)})}async function Je(t){await X(async()=>{const s=await K.deleteCustomerProduct(t.sample.item_customerproduct);s.success?(await Ce(),F(c("basket.custom.deleted"))):s.message&&F(s.message)})}async function Ce(){const t=e.currenthost?.id;if(j.value=null,!!t)try{j.value=await Pe(t,C.value)}catch{}}const R=p(""),P=p(!1),z=p("");function Oe(t){return t.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()}async function Qe(){const t=R.value.trim();if(!(!t||P.value)){P.value=!0,z.value="";try{const s=await $("/api/redeemCoupon",{method:"POST",body:{couponCode:t,isv3:!0}});await e.refresh(),se.value?R.value="":z.value=Oe(String(s??""))||c("basket.page.couponError")}catch{z.value=c("basket.page.couponError")}finally{P.value=!1}}}async function We(){if(!P.value){P.value=!0,z.value="";try{await $("/api/redeemCoupon",{method:"POST",body:{couponCode:"",isv3:!0}}).catch(()=>{}),await e.refresh()}finally{P.value=!1}}}const te=a(()=>e.currenthost?.id??""),de=pt(()=>S.officeOrderId),Y=a(()=>S.isMaster&&!!te.value&&S.hasOfficeOrder(te.value)),ae=p({});async function $e(){if(!Y.value){ae.value={};return}try{const t=await $("/api/retrieveBasket",{method:"POST",body:{hostUrl:C.value}}),s=rt(t?.basket),h={};for(const _ of Object.values(s)){const r=_.id!=null?String(_.id):"",D=String(_.item_multiuser??"").trim();r&&D&&(h[r]=D)}ae.value=h}catch{}}function Se(t){if(!Y.value)return"";
1const s=new Set(t.ids.map(h=>ae.value[h]??""));return s.size!==1?"":[...s][0]??""}async function Me(){const t=te.value;t&&(await S.resolveRole(t),Y.value&&S.officeOrderId?(await de.subscribe(),await $e()):(de.teardown(),ae.value={}))}return ot(async()=>{!e.loaded&&!e.loading&&await e.refresh(C.value),await Me()}),Ie(te,(t,s)=>{t&&t!==s&&Me()}),Ie(()=>e.items.map(t=>t.id).join(","),()=>{Y.value&&$e()}),st(()=>{de.teardown(),H&&clearTimeout(H)}),nt(()=>({title:c("basket.page.seoTitle"),meta:[{name:"robots",content:"noindex,follow"}]})),(t,s)=>{const h=Xe,_=ct("i18n-t");return o(),l("div",Qt,[n("header",Wt,[d(h,{to:A.value,class:"cart__back","aria-label":i(c)("basket.page.back")},{default:g(()=>[...s[3]||(s[3]=[n("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[n("path",{d:"M15 5l-7 7 7 7"})],-1)])]),_:1},8,["to","aria-label"]),n("h1",Xt,u(L.value||i(c)("basket.page.seoTitle")),1)]),i(e).loaded?(o(),l(x,{key:1},[Y.value?(o(),l("section",ea,[d(mt,{clients:i(S).clients},null,8,["clients"])])):v("",!0),i(e).itemCount===0?(o(),l("div",ta,[n("p",aa,u(i(c)("basket.page.empty")),1),n("p",oa,u(i(c)("basket.page.emptyHint")),1),d(h,{to:A.value,class:"cart__empty-cta"},{default:g(()=>[ve(u(i(c)("basket.page.emptyCta")),1)]),_:1},8,["to"])])):(o(),l(x,{key:2},[n("section",sa,[(o(!0),l(x,null,pe(i(e).groups,r=>(o(),l(x,{key:r.signature},[Se(r)?(o(),l("p",na,u(i(c)("groupOrder.line.orderedBy",{name:Se(r)})),1)):v("",!0),d(Jt,{group:r,disabled:He.value,"logged-in":i(V).isLoggedIn,onIncrement:D=>Fe(r),onDecrement:D=>je(r),onEditIngredients:D=>ze(r),onNote:D=>qe(r),onSaveCustom:D=>Ke(r),onDeleteCustom:D=>Je(r)},null,8,["group","disabled","logged-in","onIncrement","onDecrement","onEditIngredients","onNote","onSaveCustom","onDeleteCustom"])],64))),128)),d(h,{to:A.value,class:"cart__add-more"},{default:g(()=>[ve(u(i(c)("basket.page.addMore")),1)]),_:1},8,["to"])]),d(_t,{variant:"cart","host-id":i(e).currenthost?.id??"",onSelect:Ye},null,8,["host-id"]),(se.value||Ae.value)&&!y.value?(o(),l("section",la,[se.value?(o(),l("div",ia,[n("div",ua,[n("span",ca,u(i(c)("basket.page.couponLabel")),1),_e.value?(o(),l("span",ra,u(_e.value),1)):v("",!0),be.value>0?(o(),T(_,{key:1,keypath:"basket.page.couponRemaining",tag:"span",class:"coupon-line__rest",scope:"global"},{left:g(()=>[d(w,{value:be.value},null,8,["value"])]),value:g(()=>[d(w,{value:Ve.value},null,8,["value"])]),_:1})):v("",!0)]),n("div",da,[d(w,{class:"coupon-line__amount",value:-f.value.couponDiscount},null,8,["value"]),n("button",{type:"button",class:"coupon-line__remove",disabled:P.value,onClick:We},u(i(c)("basket.page.couponRemove")),9,va)])])):(o(),l("form",{key:1,class:"coupon-form",onSubmit:lt(Qe,["prevent"])},[n("div",pa,[d(It,{modelValue:R.value,"onUpdate:modelValue":s[0]||(s[0]=r=>R.value=r),label:i(c)("basket.page.couponPlaceholder"),name:"couponCode",autocomplete:"off",error:z.value||void 0},null,8,["modelValue","label","error"])]),n("button",{type:"submit",class:"coupon-form__submit",disabled:P.value||!R.value.trim()},u(P.value?i(c)("basket.page.couponRedeeming"):i(c)("basket.page.couponSubmit")),9,ma)],32))])):v("",!0),Q.value?(o(),l("div",_a,[n("span",ba,u(i(c)("orderMode.groupLabel")),1),d(bt,{"model-value":I.value==="pickup"?"pickup":"delivery",size:"compact","onUpdate:modelValue":b},null,8,["model-value"])])):fe.value?(o(),T(wt,{key:2,channel:fe.value,"restaurant-name":L.value},null,8,["channel","restaurant-name"])):v("",!0),n("section",fa,[n("div",ha,[n("span",null,u(i(c)("basket.page.subtotal")),1),d(w,{value:f.value.productSum},null,8,["value"])]),Ge.value?(o(),T(_,{key:0,keypath:"basket.page.mbwGapPickup",tag:"p",class:"cart__mbw",scope:"global"},{amount:g(()=>[d(w,{value:f.value.mbwDeviation},null,8,["value"])]),_:1})):Le.value?(o(),T(_,{key:1,keypath:"basket.page.mbwGap",tag:"p",class:"cart__mbw",scope:"global"},{amount:g(()=>[d(w,{value:f.value.mbwDeviation},null,8,["value"])]),_:1})):v("",!0),G.value&&!y.value?(o(),l("div",ka,[n("span",null,u(i(c)("basket.page.delivery")),1),f.value.shipping>0?(o(),T(w,{key:0,value:f.value.shipping},null,8,["value"])):(o(),l("span",ya,u(i(c)("basket.page.deliveryFree")),1))])):v("",!0),y.value?(o(),l("p",ga,u(i(c)("groupClient.checkout.masterPaysHint")),1)):v("",!0),n("div",wa,[n("span",null,u(i(c)("basket.page.total")),1),d(w,{value:le.value},null,8,["value"])]),Ee.value?(o(),T(h,{key:4,to:J.value,class:"cart__cta"},{default:g(()=>[d(_,{keypath:he.value,tag:"span",scope:"global"},{amount:g(()=>[d(w,{value:le.value},null,8,["value"])]),_:1},8,["keypath"])]),_:1},8,["to"])):(o(),l(x,{key:5},[n("button",Ca,[d(_,{keypath:he.value,tag:"span",scope:"global"},{amount:g(()=>[d(w,{value:le.value},null,8,["value"])]),_:1},8,["keypath"])]),ne.value?(o(),l("p",Oa,[n("span",null,u(i(c)("basket.page.channelBlocked")),1
1)])):Ue.value?(o(),T(_,{key:1,keypath:"basket.page.mbwBlockedAmount",tag:"p",class:"cart__cta-hint",scope:"global"},{amount:g(()=>[d(w,{value:f.value.mbwDeviation},null,8,["value"])]),_:1})):v("",!0)],64))])],64))],64)):(o(),l("div",Zt,[(o(),l(x,null,pe(3,r=>n("div",{key:r,class:"skel-line"})),64))])),Z.value?(o(),T(ft,{key:2,modelValue:ee.value,"onUpdate:modelValue":s[1]||(s[1]=r=>ee.value=r),product:Z.value,host:Re.value,"edit-item":ce.value},null,8,["modelValue","product","host","edit-item"])):v("",!0),d(ht,{modelValue:re.value,"onUpdate:modelValue":s[2]||(s[2]=r=>re.value=r),"basket-id":ge.value,note:we.value},null,8,["modelValue","basket-id","note"]),(o(),T(ut,{to:"body"},[d(it,{name:"cart-toast"},{default:g(()=>[ie.value?(o(),l("div",$a,u(ke.value),1)):v("",!0)]),_:1})]))])}}}),za=Ne(Sa,[["__scopeId","data-v-7b4bf8ad"]]);export{za as default};

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.