PageSourceSearch

https://www.sonicdrivein.com/_next/static/chunks/3390-98d2d4a041645265.js

js sonicdrivein.com collected 2026-09-24 08:56:13 UTC 6,185 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3390],{591:function(e,i,n){n.d(i,{L:function(){return t}});let t="This reward is not available at this location. Select a new location to redeem this reward."},23390:function(e,i,n){n.d(i,{Nr:function(){return b},XE:function(){return O}});var t=n(72517),l=n(591),u=n(46351),r=n(44241),d=n(14174),a=n(47951),o=n(45538),s=n(87042);let c=(e,i)=>{if(!(e&&i))return{isInTimeRange:!0};let n=new Date(Date.now()),t=(0,s.Ry)(e,i).find(e=>(0,o.Z)(n,e));return{isInTimeRange:!!t,currentOpenedTimeRange:t}};var m=n(12198);let f=(e,i,n)=>{if(!i)return!1;let{isInTimeRange:t}=c(e.redemptionTimeRanges,n),l=(0,m.Z)({endDateTime:e.endDateTime,displayExpirationDate:e.displayExpirationDate}),u=(0,d.Z)((0,a.Z)(new Date(Date.now()),n),(0,a.Z)(new Date(l),n));return!t||u};var p=n(41703),I=n(45803),v=n(54369),y=n(65264);let h=(e,i,n,l,u)=>{var d,a,o,s;let c,m,h,q;let b=p.v[null==i?void 0:i.type],O=0,g=null,N=null==i?void 0:null===(a=i.checkRestrictions)||void 0===a?void 0:null===(d=a.minimumCheckAmount)||void 0===d?void 0:d.amount;n<N&&(O=N-n);let T=!1,D=!1,{eligibleIds:E,buyCount:w,getRestrictions:R,buyIds:_,getIds:k}=(null==i?void 0:i.applicability)||{},B=[],A=e=>{B.includes(e)||B.push(e)},M=!1;if((null==b?void 0:b.mainType)===v.l_.BuyX_GetY){let n;let{getItems:t,buyItems:l,overlappingItems:u}=(0,I.p)(e,null==i?void 0:i.applicability),r=[...t,...u],d=[...l,...u.slice().reverse()],a=e=>{let i=w,n=new Map;for(let t of d)if(t.quantity){if(e&&(null==R?void 0:R.getItemValueIsLessThanBuyItemValue)&&e.price>t.price){M=!0;continue}if(T=!0,A(t.productId),t.quantity>=i){t.quantity-=i,i=0;break}i-=t.quantity,n.set(t.lineItemId,t.quantity)}return i?(c={count:i,menuIds:(null==_?void 0:_.reduce((e,i)=>[...e,...i.menuIds],[]))||[]},!1):(n.forEach((e,i)=>{let n=d.find(e=>e.lineItemId===i);n.quantity-=e}),c=null,!0)},o=[],s=()=>{for(let e of r)if(e.quantity&&!o.includes(e))return e.quantity--,T=!0,A(e.productId),e};for(;n=s();){if(q=n,a(n)){D=!0;break}n.quantity++,o.push(n)}q||(a(),m={count:1,menuIds:(null==k?void 0:k.reduce((e,i)=>[...e,...i.menuIds],[]))||[]})}if((null==b?void 0:b.mainType)===v.l_.BuyX){(null===(o=i.applicability)||void 0===o?void 0:o.isIncludesAll)||(O=i.checkRestrictions.minimumCheckAmount.amount||0);let n=e.filter(e=>null==E?void 0:E.some(i=>i.menuId===e.productId)).map(e=>{let i=null==E?void 0:E.find(i=>i.menuId===e.productId);return{...e,quantity:i.quantity&&i.quantity<e.quantity?i.quantity:e.quantity}})[0],t=(null==n?void 0:n.quantity)||0,l=e.map(e=>{if(null==E?void 0:E.find(i=>i.menuId===e.productId)){let i=e.quantity-t;return t>0&&(t-=1),(i<0||isNaN(i))&&(i=0),{...e,quantity:i}}return e});l&&l.length>0&&l.forEach(e=>{var i,n;let t=null===(i=e.discounts)||void 0===i?void 0:i.map(e=>e.amount).reduce((e,i)=>e+i,0),l=null===(n=e.modifierGroups)||void 0===n?void 0:n.flatMap(e=>e.modifiers.map(e=>e.price)).reduce((e,i)=>e+i,0);isNaN(l)&&(l=0),isNaN(t)&&(t=0),O-=(e.price+l-t)*e.quantity}),(O<0||isNaN(O))&&(O=0),(null===(s=i.applicability)||void 0===s?void 0:s.isIncludesAll)?(D=!0,T=!0):n?(A(n.productId),D=!0):h={count:1,menuIds:E}}let P=(null==b?void 0:b.mainType)===v.l_.BuyX_GetY&&!_,G=null==R?void 0:R.getItemValueIsLessThanBuyItemValue,{Offers:{OFFER_DESCRIPTION_ONLY_REMAINING_PRICE:L,OFFER_DESCRIPTION_PURCHASE_NEEDED_MESSAGE:C,OFFER_DESCRIPTION_NO_QUALIFY_ITEMS:S,OFFER_DESCRIPTION_INSUFFICIENT_NUMBER:Z}}=t.default;O?(D=!1,g="".concat((0,r._)(L,{"{remainingPrice}":(0,y.T4)(O)}))):!D&&P?g=q?C:S:!D&&T&&G?g=q&&M?C:Z:!D&&T?g=Z:D||T||(g=S);let x=f(i,u,l);return x&&(g="This ".concat(i.discountDetailsType===v.JB.PromoCode?"promo code":"reward"," is expired or no longer available.")),{discountedProduct:e.find(e=>B.includes(e.productId)),fullMatch:D,partiallyMatch:T,remainingBuyIds:c,remainingGetIds:m,remainingEligibleIds:h,matchingBagItems:B,remainingPrice:O,message:g,isOfferExpired:x,lastMatchedGetItem:q,checkIfOfferExpired:()=>f(i,u,l)}},{Offers:{PROMO_CODE_NON_APPLICABLE_IN_BAG:q}}=t.default,b=(e,i,n)=>{if((null==e?void 0:e.isRedeemableOnlineOnly)&&!(null==e?void 0:e.isRedeemableInStoreOnly))return t.default.Offers.ONLINE_BADGE;if((null==e?void 0:e.isRedeemableInStoreOnly)&&!(null==e?void 0:e.isRedeemableOnlineOnly))return t.default.Offers.INSTORE_BADGE;if((null==e?void 0:e.isRedeemableInStore)&&(null==e?void 0:e.isRedeemableOnline)){var l;let e=null!==(l=!i&&n)&&void 0!==l&&l;return i||!e?t.default.Offers.ONLINE_BADGE:null}return null},O=e=>
1{let{offer:i,bagRenderItems:n,subTotalBeforeDiscounts:r,applicableOffers:d,isShowExpiredMessage:a,locationTimezone:o}=e;if(!i)return{partiallyMatch:!0,fullMatch:!0,remainingPrice:0,message:null,isOfferApplicable:!0};let s=d.some(e=>e.id===(null==i?void 0:i.id)),{Offers:{OFFER_DESCRIPTION_NO_QUALIFY_ITEMS:c}}=t.default;if(i&&!s)return{isOfferApplicable:s,partiallyMatch:!1,fullMatch:!1,remainingPrice:0,message:i.discountDetailsType===v.JB.PromoCode?q:l.L};let{buyIds:m}=(null==i?void 0:i.applicability)||{},f=(0,u.n)(n);if(0===f.reduce((e,i)=>{let{productId:n,quantity:t,price:l,childItems:u}=i,r=(u||[]).map(e=>({productId:e.productId,quantity:e.quantity*t,price:e.price}));return[...e,{productId:n,quantity:t,price:l},...r]},[]).length)return{isOfferApplicable:s,partiallyMatch:!1,fullMatch:!1,remainingPrice:0,message:c};let{discountedProduct:p,matchingBagItems:I,partiallyMatch:y,remainingBuyIds:b,remainingGetIds:O,remainingEligibleIds:g,remainingPrice:N,message:T,fullMatch:D,isOfferExpired:E,lastMatchedGetItem:w,checkIfOfferExpired:R}=h(f,i,r,o,a);return{isOfferExpired:E,isOfferApplicable:s,partiallyMatch:y,fullMatch:D,remainingPrice:N,message:T,remainingBuyIds:b,remainingGetIds:O&&{count:O.count,menuIds:O.menuIds.filter(e=>!(null==m?void 0:m.some(i=>i.menuIds.some(i=>{let{menuId:n}=i;return n===e.menuId})))&&!I.includes(e.menuId)||(null==m?void 0:m.some(i=>i.menuIds.some(i=>{let{menuId:n}=i;return n===e.menuId})))&&I.includes(e.menuId)||(null==m?void 0:m.some(i=>i.menuIds.some(i=>{let{menuId:n}=i;return n===e.menuId})))&&!I.includes(e.menuId))},remainingEligibleIds:g,matchingItemWithLowestPrice:p,lastMatchedGetItem:w,checkIfOfferExpired:R}}}}]);
2//# sourceMappingURL=3390-98d2d4a041645265.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.