PageSourceSearch

https://www.sonicdrivein.com/_next/static/chunks/5503-add586a4d102490e.js

js sonicdrivein.com collected 2026-09-24 08:54:44 UTC 15,934 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5503],{40665:function(l,i,e){e.d(i,{z:function(){return t}});var n=e(61882);let o=l=>"number"!=typeof l||isNaN(l)?0:l,u=l=>{let{label:i,value:e,type:n,helper:o,valueHelper:u,isLoading:t}=l;return{label:i,value:"number"==typeof e?"$".concat(e.toFixed(2)):e,type:n,helper:o,valueHelper:u,isLoading:t}},t=l=>{let{totalItems:i,subTotal:e,tax:t,total:d,tip:a,donation:r,discount:v,deliveryFee:c,retailDeliveryFee:s,serviceFee:f,smallOrderFee:p,bottleDepositFee:b,pointsEarned:h,entry:m,maxOrderAmountExceeded:y,isSubTotalLoading:I,isDiscountAppliedLoading:g}=l,D=(o(d)+o(a)+o(r)).toFixed(2);return[{label:(()=>{let l=(null==m?void 0:m.fields)||{},e=l.subTotal,o=l.itemsText||n.a6,u=l.itemText||n.qL,t="".concat(i," ").concat(1===i?u:o);return"".concat(e||n.Gt," (").concat(t,")")})(),value:e||0,type:n.q8.PRIMARY,...y&&{valueHelper:(null==m?void 0:m.feilds.maxOrderAmountExceededTooltipHelper)||n.xK},isLoading:I},v&&{label:(null==m?void 0:m.fields.discount)||n.PW,value:"-$".concat(v.toFixed(2)),type:n.q8.SECONDARY,isLoading:g},c&&{label:(null==m?void 0:m.fields.deliveryFee)||n.dZ,value:c,helper:(null==m?void 0:m.fields.deliveryFeeToolTip)||n.G$},s&&{label:(null==m?void 0:m.fields.retailDeliveryFee)||n.Is,value:s,helper:(null==m?void 0:m.fields.retailDeliveryFeeTooltip)||n.x9},f&&{label:(null==m?void 0:m.fields.serviceFee)||n._r,value:f,helper:(null==m?void 0:m.fields.serviceFeeToolTip)||n.rN},p&&{label:(null==m?void 0:m.fields.smallOrderFee)||n.BA,value:p,helper:(null==m?void 0:m.fields.smallOrderFeeTooltip)||n.Em},b&&{label:(null==m?void 0:m.fields.bottleDepositFee)||n.m_,value:b,helper:(null==m?void 0:m.fields.bottleDepositFeeTooltip)||n.Hm},+t>=0&&{label:(null==m?void 0:m.fields.tax)||n.GL,value:null!=t?t:n.uq,type:n.q8.PRIMARY},a>=0&&{label:(null==m?void 0:m.fields.tip)||n.Q_,value:a,type:n.q8.PRIMARY},r&&{label:(null==m?void 0:m.fields.donation)||n.av,value:r,type:n.q8.PRIMARY},d>=0&&{label:(null==m?void 0:m.fields.total)||n.Tr,value:parseFloat(D),type:n.q8.TERTIARY},h&&{label:(null==m?void 0:m.fields.rewardTitle)||n.jq,value:h.toString(),type:n.q8.SECONDARY}].filter(Boolean).map(u)}},53811:function(l,i,e){e.d(i,{xe:function(){return g}});var n,o,u=e(67294),t=e(23630),d=e(71621),a=e(56494),r=e(27439),v=e(84584),c=e(27062),s=e(23616),f=e(78037),p=e(6520),b=e(49510),h=e(42505),m=e(63034),y=e(28091);(n=o||(o={})).Full="full",n.NeedsModification="needsModification",n.Unavailable="unavailable",n.HasNoModification="hasNoModification";let I=l=>{switch(l){case"full":return{isAvailable:!0,canAddToBag:!0,canModify:!0};case"needsModification":return{isAvailable:!0,canAddToBag:!1,canModify:!0};case"hasNoModification":return{isAvailable:!0,canAddToBag:!0,canModify:!1};case"unavailable":return{isAvailable:!1,canAddToBag:!1,canModify:!1}}},g=()=>{let{currentLocation:l}=(0,r.Z)(),{actions:{getProductAlternatives:i},isNationalMenu:e}=(0,d.Z)(),{actions:{getAvailableGroupChildRefs:n,checkProductSizesAndNestedAvailability:o}}=(0,v.i)(),g=(0,s.CG)(c.eL),{getOperationalRootProduct:D}=(0,a.Z)(),{actions:{getCompleteProductData:A}}=(0,t.i)(),C=l=>{let{ingredientRefs:i,modifierGroupRefs:e}=l||{};if((0,p.x)(i)&&(0,p.x)(e))return!0;let n=Object.values(i).every(l=>(0,p.x)(l)),o=Object.values(e).every(l=>(0,p.x)(l));return n&&o},M=(0,u.useCallback)(l=>{var i,e,o;let{allChildProducts:u,availableProductsCount:t}=null!==(o=n(l))&&void 0!==o?o:{},d=(null===(i=l.selectionQuantity)||void 0===i?void 0:i.min)||0;if(d>0&&t<d)return I("unavailable");let a=u.filter(l=>{var i;return null===(i=l.product)||void 0===i?void 0:i.isDefault}).length>(null===(e=l.selectionQuantity)||void 0===e?void 0:e.max),r=u.filter(l=>{var i,e;return(null===(i=l.product)||void 0===i?void 0:i.isDefault)&&(null===(e=l.product)||void 0===e?void 0:e.isAvailable)}).reduce((l,i)=>{var e,n;let o=null===(e=i.product)||void 0===e?void 0:e.quantity;return l+(null!==(n=null==o?void 0:o.defaultIfSelected)&&void 0!==n?n:1)},0),v=null==u?void 0:u.some(l=>{var i,e;return(null===(i=l.product)||void 0===i?void 0:i.isDefault)&&!(null===(e=l.product)||void 0===e?void 0:e.isAvailable)});return a||r<d||v&&t>=d?{...I("needsModification"),hasIncludedModifiersUnavailable:!0}:I("full")},[n]),E=(l,i)=>{if(!(0,p.x)(i)&&(0,b.v)(l)){let{isAvailable:l,defaultSizeUnavailable:e}=o(i);return l?e?I("needsModification"):(0,m.cD)(i,M)||I("full"):I("unavailable")}if(l.startsWith(f.U)){var e;let l=M(i);if(l&&!l.canAddToBag)return l;let n=(null!==(e=null==i?void 0:i.childRefs)&&void 0!==e?e:[]).find(l=>(null==l?void 0:l.isDefault)&&(null==l?void 0:l.isAvailable));if(null==n?void 0:n.id){let l=A(n.id,null,!1),i=(0,m.cD)(l,M);if(i)return i}return l}if(l.startsWith(f.$))return M(i)},T=(0,u.useCallback)((l,i)=>{if((0,p.x)(l))return I("full");let e=null;for(let[n,o]of Object.entries(null!=l?l:{})){let l=i(n,o);if(l){if(!l.isAvailable)return l;l.canAddToBag||e||(e=l)}}return null!=e?e:I("full")},[]),x=(n,o)=>
1{if(!n||(0,p.x)(l)||e)return I("full");let u=A(n,null,!1);if(Object.keys(o).length&&(l=>{let e=i(D(l)||l);return e.length?(Object.values(e)[0]||[]).some(l=>!o[l.id]):!(null==o?void 0:o[l])})(n)||g.includes(n))return I("unavailable");if((0,h.o)(u.isAvailable))return I("full");if((0,y.m)(null==u?void 0:u.isAvailable))return I("unavailable");if(C(u))return I("hasNoModification");let t=I("full"),{ingredientRefs:d={},modifierGroupRefs:a={}}=u,r=T(Object.assign({},d,a),E);return r&&(!r.isAvailable||r.canModify)?{...r,canModify:r.canModify}:t};return function(l){var i,e,n,o,u;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=x(l,t);return!d||(null==d?void 0:d.isAvailable)?d&&(null==d?void 0:d.canAddToBag)?{...d,hasIncludedModifiersUnavailable:null!==(i=d.hasIncludedModifiersUnavailable)&&void 0!==i&&i}:{...d,isAvailable:null!==(e=null==d?void 0:d.isAvailable)&&void 0!==e&&e,canAddToBag:null!==(n=null==d?void 0:d.canAddToBag)&&void 0!==n&&n,canModify:null!==(o=null==d?void 0:d.canModify)&&void 0!==o&&o,hasIncludedModifiersUnavailable:null!==(u=null==d?void 0:d.hasIncludedModifiersUnavailable)&&void 0!==u&&u}:d}}},86479:function(l,i,e){e.d(i,{$h:function(){return m},DT:function(){return n},LZ:function(){return c},OE:function(){return p},Qo:function(){return o},VQ:function(){return a},a_:function(){return u},cJ:function(){return t},iT:function(){return r},k$:function(){return v},kW:function(){return h},li:function(){return f},m:function(){return d},n7:function(){return s},zL:function(){return b}});let n="inherit",o=5,u=!0,t="PICKUP",d="Track My Delivery",a="Get Directions",r="Pickup Instructions",v="Delivery Details",c="fulfillmentOptions",s="Your order will be ",f="ready for pickup",p="delivered",b={pickup:"PICKUP",delivery:"DELIVERY"},h="We’ll send a receipt with order details to ",m="Order Summary"},25456:function(l,i,e){e.d(i,{B9:function(){return t},KW:function(){return u},P9:function(){return d},QN:function(){return n},zL:function(){return o}});let n={AVAILABLE:"available",BAG:"in-bag",LOCKED:"locked",EXPIRED:"expired",DETAILS_ONLY:"details-only"},o={SUGGESTED:"suggested",APPLIED:"applied",ERROR:"error"},u={OFFER_REDEEMED:"offerRedeemed",OFFER_REMOVED:"offerRemoved",SELECT_ITEMS:"selectItems"},t={DETAILS_ONLY:"details-only"},d={OFFERS:"offer",CERTIFICATES:"certificate"}},60490:function(l,i,e){e.d(i,{s:function(){return I}});var n=e(88668),o=e(79096),u=e(5522),t=e(47353),d=e(5901),a=e(88915),r=e(53811),v=e(61882),c=e(27062),s=e(23616),f=e(73658),p=e(71621),b=e(56494),h=e(27439),m=e(84584);let y={showUpchargeLabel:!0,showDownchargeLabel:!1,upchargeDisplayInline:!1},I=()=>{var l;let{actions:{getProduct:i,getProductGroupById:e,getDefaultAlternativeProduct:I,getCurrentProductGroupsData:g}}=(0,p.Z)(),{getActiveCategory:D,getOperationalRootProduct:A}=(0,b.Z)(),{activeBagEntries:C,actions:{markAsRemoved:M}}=(0,f.Z)(),{actions:{getProductDayPartingInfo:E}}=(0,m.i)(),{currentLocation:T}=(0,h.Z)(),x=(0,s.CG)(c.eL),U=(0,r.xe)(),O=null!==(l=null==T?void 0:T.timezone)&&void 0!==l?l:"",{isDownchargeEnabled:R,isPricedDefaultEnabled:q,surfaceLabelConfig:F,showBagUpchargeInline:L}=(0,a.I)(),B=l=>{var i,e;return null!==(e=null!==(i=null==F?void 0:F[l])&&void 0!==i?i:null==F?void 0:F.bag)&&void 0!==e?e:{...y,upchargeDisplayInline:"bag"===l&&!!L}},w=(l,i,e,n)=>i<0?R&&n.showDownchargeLabel?n.upchargeDisplayInline?{name:"".concat(l," (").concat(v.uK).concat(v.dx).concat(Math.abs(i).toFixed(2),")"),symbol:"",upCharge:0}:{name:l,symbol:"".concat(v.uK).concat(v.dx),upCharge:Math.abs(i)}:{name:l,symbol:"",upCharge:0}:e&&i>0?n.showUpchargeLabel?n.upchargeDisplayInline?{name:"".concat(l," (").concat(v.DC).concat(v.dx).concat(i.toFixed(2),")"),symbol:"",upCharge:0}:{name:l,symbol:"".concat(v.DC).concat(v.dx),upCharge:i}:{name:l,symbol:"",upCharge:0}:{name:l,symbol:"",upCharge:i},N=l=>{let i=null==l?void 0:l.split("-");return(null==i?void 0:i.length)>1?"".concat((0,t.O)(i[0])):""},S=l=>{var o,t,d,a,r,c,s,f,p,b,h,m;let{item:y,product:I,productId:g,isParentCombo:D,groupQuantityMap:A,labelConfig:C,preferSelectionData:M=!1,contextuallyUnavailableIds:E=new Set}=l,T=e(null==y?void 0:y.productGroupId),O=E.has(g),{isAvailable:R}=U(g),F=(null==y?void 0:y.modifiers)&&(null==y?void 0:y.modifiers.length)>0,L=F&&(null==y?void 0:y.modifiers.length)>0?(0,u.Um)(null==y?void 0:y.modifiers[0]):"",B=(null==L?void 0:L.toLowerCase())===n.O5,N=F&&B||D?"":null==y?void 0:y.action,S=(null==y?void 0:y.action)===v.Dq||(null==y?void 0:y.action)===v.Dq.toUpperCase(),P=null!==(c=null==y?void 0:y.quantity)&&void 0!==c?c:0,G=null!==(f=M?null==y?void 0:y.freeQuantity:null!==(s=null==y?void 0:y.freeQuantity)&&void 0!==s?s:null===(t=i(null==y?void 0:y.productId))||void 0===t?void 0:null===(o=t.quantity)||void 0===o?void 0:o.free)&&void 0!==f?f:0,k=Math.max((null!==(p=null==T?void 0:null===(d=T.selectionQuantity)||void 0===d?void 0:d.free)&&void 0!==p?p:0)-(A[null==y?void 0:y.productGroupId]||0),0),_=Math.max(P-(M?G:Math.max(G,k)),0),Y=F&&(null==y?void 0:null===(a=y.modifiers)||void 0===a?void 0:a.some(l=>(null==l?void 0:l.price)&&(null==l?void 0:l.price)!==0)),Q=Y?null!==(b=null==y?void 0:null===(r=y.modifiers[0])||void 0===r?void 0:r.price)&&void 0!==b?b:0:null==y?void 0:y.price,Z=M?Q:(null==I?void 0:I.price)||(null==y?void 0:y.price),j=((null==y?void 0:y.upCharge)||Z||0)*_,K=(null==y?void 0:y.price)*_;F&&Y&&(K=null==y?void 0:null===(h=y.modifiers[0])||void 0===h?void 0:h.price),K=S?0:K;let W=(null==y?void 0:y.isDefault)&&!F&&!(null==y?void 0:y.upCharge),$=(null==y?void 0:y.action)===n.D7||
1(null==y?void 0:y.action)===n.D7.toUpperCase(),z=q&&!!(null==y?void 0:y.isDefault),H=(null!==(m=null==y?void 0:y.price)&&void 0!==m?m:0)*_,V=W&&!z,J=z?H:j,X=$||!!(null==y?void 0:y.isDefault)&&J>0,ll=V?{name:null==y?void 0:y.displayName,symbol:"",upCharge:0}:w(null==y?void 0:y.displayName,J,X,C),li=(null==y?void 0:y.upCharge)||K||0;V?li=0:z&&(li=H);let le=(O||x.includes(g)||!R)&&!S;return{data:{name:ll.name,price:li,upCharge:ll.upCharge,showBullet:!0,isBold:!1,isUnavailable:(O||x.includes(g))&&!S,action:N,symbol:ll.symbol,quantity:null==y?void 0:y.quantity,additionalName:L},isUnavailable:le}},P=l=>{var i,e;let{item:o,productId:u,labelConfig:d}=l,a=(null==o?void 0:o.action)===v.Dq||(null==o?void 0:o.action)===v.Dq.toUpperCase(),{isAvailable:r}=U(u),c=null!==(i=null==o?void 0:o.upCharge)&&void 0!==i?i:0,s=q&&(null==o?void 0:o.isDefault)&&!c?null!==(e=null==o?void 0:o.price)&&void 0!==e?e:0:c,f=(null==o?void 0:o.action)===n.D7||!!(null==o?void 0:o.isDefault)&&s>0,p=w("".concat((0,t.O)(null==o?void 0:o.displayName)),s,f,d),b=(x.includes(u)||!r)&&!a;return{data:{name:p.name,upCharge:p.upCharge,price:a?0:null==o?void 0:o.price,showBullet:!0,isBold:!1,isUnavailable:x.includes(u)&&!a,action:"",symbol:p.symbol,quantity:null==o?void 0:o.quantity,additionalName:(0,t.O)(N(null==o?void 0:o.modifierGroupId))},isUnavailable:b}},G=l=>{var i;return new Set(Object.values(null!==(i=g(l))&&void 0!==i?i:{}).flatMap(l=>{var i;return(null!==(i=l.childRefs)&&void 0!==i?i:[]).filter(l=>!1===l.isAvailable).flatMap(l=>l.id?[l.id]:[])}))},k=l=>{let{selections:e,labelConfig:u,isParentCombo:t=!1,preferSelectionData:d=!1,contextuallyUnavailableIds:a=new Set}=l,r=[],c={},s=!1;return e.forEach(l=>{var e,f,p,b,h,m,y,I,g,D,A;let C=i(null==l?void 0:l.productId);if(!C){let i=l.action||n.D7,e={action:i,quantity:null!==(p=l.quantity)&&void 0!==p?p:1,name:l.description||"",price:null!==(h=null!==(b=l.upCharge)&&void 0!==b?b:l.price)&&void 0!==h?h:0,isUnavailable:!0,showBullet:!t,isBold:t,symbol:(null==i?void 0:i.toUpperCase())===n.D7.toUpperCase()?"".concat(v.DC).concat(v.dx):"",childItems:[]};c[null!==(m=null==l?void 0:l.productGroupId)&&void 0!==m?m:""]=(null!==(I=c[null!==(y=null==l?void 0:l.productGroupId)&&void 0!==y?y:""])&&void 0!==I?I:0)+e.quantity;let o=[];if((null==l?void 0:null===(f=l.selections)||void 0===f?void 0:f.length)>0){let{data:i,hasUnavailable:e}=k({selections:l.selections,labelConfig:u,isParentCombo:!1,preferSelectionData:d,contextuallyUnavailableIds:a});e&&(s=!0),o=i}e.childItems=o,s=!0,r.push(e);return}if(!(0,o.CT)(l)&&!t&&!x.includes(null==l?void 0:l.productId)&&C.isAvailable&&!a.has(null==l?void 0:l.productId))return;let{data:M,isUnavailable:E}=S({item:{...l,displayName:C.displayName},product:C,productId:null==l?void 0:l.productId,isParentCombo:t,groupQuantityMap:c,labelConfig:u,preferSelectionData:d,contextuallyUnavailableIds:a});c[null!==(g=null==l?void 0:l.productGroupId)&&void 0!==g?g:""]=(null!==(A=c[null!==(D=null==l?void 0:l.productGroupId)&&void 0!==D?D:""])&&void 0!==A?A:0)+M.quantity,M.showBullet=!t,M.isBold=t,M.isUnavailable=E;let T=[];if((null==l?void 0:null===(e=l.selections)||void 0===e?void 0:e.length)>0){let{data:i,hasUnavailable:e}=k({selections:l.selections,labelConfig:u,isParentCombo:!1,preferSelectionData:d,contextuallyUnavailableIds:a});e&&(s=!0),T=i}E&&(s=!0),M.childItems=T,r.push(M)}),{data:r,hasUnavailable:s}},_=l=>{let{modifiers:i,labelConfig:e}=l,n=[],u=!1;return i.forEach(l=>{if(!(0,o.CT)(l))return;let{data:i,isUnavailable:t}=P({item:{...l},productId:null==l?void 0:l.modifierId,labelConfig:e});i.showBullet=!0,t&&(u=!0),n.push(i)}),{data:n,hasUnavailable:u}},Y=l=>{var e,o,u,t,d;let a=i(null!==(u=A(null==l?void 0:l.productId))&&void 0!==u?u:null==l?void 0:l.productId);if(!(null==a?void 0:null===(e=a.groupIds)||void 0===e?void 0:e.some(l=>l.startsWith(n.aA))))return!1;let r=D(l),v=E(null!==(t=null===(o=I(A(null==l?void 0:l.productId)))||void 0===o?void 0:o.id)&&void 0!==t?t:null==l?void 0:l.productId,null!==(d=l.categoryId)&&void 0!==d?d:null==r?void 0:r.id,O);return v?!!v:!(r&&(null==r?void 0:r.id))};return{getModifierAndSelectionData:function(l){var e,n,o;let u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>
12&&void 0!==arguments[2]?arguments[2]:"bag",a=[],r=!1,v=B(t);if((null==l?void 0:null===(e=l.selections)||void 0===e?void 0:e.length)>0){let e=i(null==l?void 0:l.productId),n=null!==(o=null==l?void 0:l.isCombo)&&void 0!==o?o:(0,d.s)(e),t=G(l.productId),{data:c,hasUnavailable:s}=k({selections:l.selections,labelConfig:v,isParentCombo:n,preferSelectionData:u,contextuallyUnavailableIds:t});a.push(...c),s&&(r=!0)}if((null==l?void 0:null===(n=l.modifiers)||void 0===n?void 0:n.length)>0){let{data:i,hasUnavailable:e}=_({modifiers:l.modifiers,labelConfig:v});a.push(...i),e&&(r=!0)}return{modifiersAndSelectionsData:a,isAnyItemUnavailable:r}},isAnyItemUnavailable:l=>{if(!l||0===l.length)return{isUnAvailable:!1,unAvailableIds:[]};let i=new Set(C.filter(l=>(null==l?void 0:l.isComplementary)&&(null==l?void 0:l.productId)).map(l=>l.productId)),e=[];for(let n of l)!((null==n?void 0:n.productId)&&i.has(n.productId))&&Y(n)&&(null==n?void 0:n.productId)&&e.push(null==n?void 0:n.productId);return{isUnAvailable:e.length>0,unAvailableIds:e}},removeUnavailableItemsAndContinue:l=>{for(let i of C)l.includes(i.productId)&&M({lineItemId:null==i?void 0:i.lineItemId})}}}}}]);
2//# sourceMappingURL=5503-add586a4d102490e.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.