1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9301],{9707:(e,n,t)=>{"use strict";t.d(n,{M:()=>C});var i=t(7634),o=t(37641),r=t(66284),a=t(14232),s=t(88161),l=t(55529),d=t(15706),c=t(86746);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}let f=function(e){var n,t,i=e.addonCode,r=e.booking,u=e.onClose,f=e.sections,m=(0,l.w)(),g=(0,l.d)(c.A.getBasket),p=null!=(n=null==r?void 0:r.addons.map(function(e){var n;return null!=(n=f.map(function(n){return e[n]}).flat().filter(function(e){return!!e}).find(function(e){return e.code===i}))?n:null}).filter(function(e){return!!e}))?n:[],C=p.some(function(e){return e.isAllowedToEdit}),k=p.some(function(e){return!e.isAllowedToEdit}),b=null!=(t=null==r?void 0:r.parties)?t:[],v=p.some(function(e){return e.quantityBooked>0})||(null==g?void 0:g.add.some(function(e){return e.code===i})),A=p.map(function(e){return{isChecked:e.quantityBooked>0,isDisabled:!e.isAllowedToEdit}}),y=(0,a.useState)(A),x=y[0],D=y[1],w=(0,a.useState)({isChecked:A.every(function(e){return e.isChecked}),isDisabled:A.some(function(e){return e.isDisabled})}),N=w[0],S=w[1],_=!C||JSON.stringify(x)===JSON.stringify(A),O=N.isDisabled||(null==r?void 0:r.addons.some(function(e){return(0,s.Wt)(r,g,e.UnitSeqNo)}));return{addon:p,units:b,basket:g,hasDisabledCheckbox:k,isSaveButtonDisabled:_,isAllPartiesDisabled:O,hasEnabledCheckbox:C,allPartiesCheckbox:N,partyCheckboxes:x,isLunchBookedOrAddedToBasket:v,handleSave:function(){x.forEach(function(e,n){var t,r,a,s,l=(0,o.sdi)(b[n]);m(d.A.actions.handleAllInclusiveBasketChange({code:i,quantity:e.isChecked?l:0,unitSeqNumber:n,addonName:null!=(t=null==(r=p[n])?void 0:r.name)?t:p[0].name})),e.isChecked&&m(d.A.actions.setAddedBasketItem(null!=(a=null==(s=p[n])?void 0:s.name)?a:p[0].name)),null==u||u()})},onAllPartiesClick:function(){S(h(h({},N),{},{isChecked:!N.isChecked})),D(x.map(function(e){return h(h({},e),{},{isChecked:!N.isChecked})}))},onPartyCheckboxChange:function(e){var n=x.map(function(n,t){return t!==e?n:h(h({},n),{},{isChecked:!n.isChecked})});D(n),n.every(function(e){return e.isChecked}
1)&&!N.isChecked&&S(h(h({},N),{},{isChecked:!0})),n.some(function(e){return!e.isChecked})&&N.isChecked&&S(h(h({},N),{},{isChecked:!1}))}}};var m=t(34175),g=t(24458),p=t(37876),C=function(e){var n,t=e.addonCode,r=e.booking,a=e.onClose,l=f({addonCode:t,booking:r,onClose:a,sections:e.sections}),d=l.addon,c=l.units,u=l.basket,h=l.hasDisabledCheckbox,C=l.isSaveButtonDisabled,k=l.isAllPartiesDisabled,b=l.hasEnabledCheckbox,v=l.allPartiesCheckbox,A=l.partyCheckboxes,y=l.isLunchBookedOrAddedToBasket,x=l.handleSave,D=l.onAllPartiesClick,w=l.onPartyCheckboxChange;return(0,p.jsx)(g.A,{id:"party-based",title:"".concat(y?"EDIT":"ADD"," ").concat(d[0].name),showDialogNote:h,showSaveButton:b,dialogNote:(n=!!(null!=r&&r.isBeforeFinalPayment),h?n?i.eZA.refundContact:i.eZA.editIsNotAllowed:""),saveButtonText:"Add To Basket",isSaveButtonDisabled:C,onSave:x,showCancelButton:!0,cancelButtonText:"Cancel",onClose:a,showCheckboxArea:!0,checkboxArea:(0,p.jsxs)(p.Fragment,{children:[d.length>1&&b&&(0,p.jsx)(m.A,{label:"All parties",isDisabled:k,isChecked:v.isChecked,price:(0,s.Sd)(r,t),onClick:D}),b&&A.map(function(e,n){var t=d[n],i=t.code,a=t.price,l=(0,o.sdi)(c[n]),h="".concat(i,"-").concat(n),f=(0,s.Wt)(r,u,n);return(0,p.jsx)(m.A,{label:"Party ".concat(n+1),isDisabled:!t.isAllowedToEdit||f,isChecked:e.isChecked,price:a,numOfGuests:l,onChange:function(){return w(n)}},h)})]})})}},19753:(e,n,t)=>{"use strict";t.d(n,{A:()=>h});var i=t(21626),o=t(7634),r=t(44357),a=t(37876),s=i.Ay.div.withConfig({displayName:"DiningUpgradeNotification__Wrapper",componentId:"sc-1whtw5p-0"})(["width:85%;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:1.1250rem;position:relative;","{width:100%;}","{padding:0.8750rem;}","{width:100%;padding:0.6250rem;justify-content:space-between;}"],function(e){return e.theme.responsive.maxXl},function(e){return e.theme.responsive.maxSm},function(e){return e.theme.responsive.maxXs}),l=i.Ay.div.withConfig({displayName:"DiningUpgradeNotification__ContentWrapper",componentId:"sc-1whtw5p-1"})(["display:flex;align-items:center;gap:1.8750rem;","{flex:1;}"],function(e){return e.theme.responsive.maxXs}),d=i.Ay.span.withConfig({displayName:"DiningUpgradeNotification__Message",componentId:"sc-1whtw5p-2"})(["font:normal normal bold 1.1250rem/1.2500rem NeutrafaceBold;letter-spacing:0.0000rem;color:#fff;","{font:normal normal bold 1.0000rem/1.1250rem NeutrafaceBold;}","{font:normal normal bold 0.8750rem/1.0000rem NeutrafaceBold;}"],function(e){return e.theme.responsive.maxSm},function(e){return e.theme.responsive.maxXs}),c=i.Ay.button.withConfig({displayName:"DiningUpgradeNotification__CloseButton",componentId:"sc-1whtw5p-3"})(["background:none;border:none;color:#fff;font-size:1.8750rem;line-height:1;cursor:pointer;padding:0;width:1.8750rem;height:1.8750rem;display:flex;align-items:center;justify-content:center;position:absolute;right:1.2500rem;&:hover{opacity:0.6;}","{position:static;font-size:1.5625rem;width:1.5625rem;height:1.5625rem;align-self:flex-start;margin-top:-0.6250rem;margin-right:-0.6250rem;}"],function(e){return e.theme.responsive.maxXs}),u=(0,i.Ay)(r.A).withConfig({displayName:"DiningUpgradeNotification__ViewButton",componentId:"sc-1whtw5p-4"})(["font:normal normal bold 0.8750rem/1.3125rem NeutrafaceBold;letter-spacing:0.0875rem;height:1.5625rem;padding:0.0000rem 0.6250rem;","{font:normal normal bold 0.8125rem/1.0625rem NeutrafaceBold;}"],function(e){return e.theme.responsive.maxXs});let h=function(e){var n=e.message,t=e.onClose,i=e.onView;return(0,a.jsxs)(s,{children:[(0,a.jsxs)(l,{children:[(0,a.jsx)(d,{children:n}),(0,a.jsx)(u,{size:o.GO8.xs,variant:o.Cki.secondary,onClick:i,children:"View"})]}),(0,a.jsx)(c,{onClick:t,children:"\xd7"})]})}},34175:(e,n,t)=>{"use strict";t.d(n,{A:()=>m});var i=t(21626),o=t(37641),r=t(43549),a=t(37876),s=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__LineData",componentId:"sc-lud89i-0"})(["display:flex;flex-direction:column;flex-wrap:wrap;justify-content:space-between;margin-bottom:0.6250rem;width:100%;font-family:Neutraface;font-size:1em;letter-spacing:0.0600rem;margin-left:2.1875rem;padding-left:2.1875rem;padding-right:4.3750rem;position:relative;"]),l=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__LineDetail",componentId:"sc-lud89i-1"})(["display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1.2500rem;"]),d=(0,i.Ay)(r.A).withConfig({displayName:"ExclusivePartyBasedCheckbox__StyledCheckBox",componentId:"sc-lud89i-2"})(["& input{background-color:#ab2328;width:1.5625rem;height:1.5625rem;}position:absolute;
1left:0;top:-0.6250rem;"]),c=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__ColumnLeft",componentId:"sc-lud89i-3"})(["display:flex;flex-direction:column;align-items:flex-start;"]),u=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__Column",componentId:"sc-lud89i-4"})(["display:flex;flex-direction:column;align-items:flex-end;"]),h=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__PriceDesc",componentId:"sc-lud89i-5"})(["font-size:0.8750rem;font-family:Neutraface;letter-spacing:0;"]),f=i.Ay.div.withConfig({displayName:"ExclusivePartyBasedCheckbox__ItemTitle",componentId:"sc-lud89i-6"})(["font-family:NeutraFaceBold;font-size:1em;letter-spacing:0;"]);let m=function(e){var n=e.label,t=e.isDisabled,i=e.isChecked,r=e.numOfGuests,m=e.price,g=e.replaces,p=e.onClick,C=e.onChange;return(0,a.jsx)(s,{children:(0,a.jsxs)(l,{children:[(0,a.jsx)(d,{onClick:function(){null==p||p()},onChange:function(){null==C||C()},type:"checkbox",isDisabled:t,checked:i}),(0,a.jsxs)(c,{children:[(0,a.jsx)(f,{children:n}),r&&r>0&&(0,a.jsx)(h,{children:"".concat(r," Guest").concat(r>1?"s":"")})]}),(0,a.jsxs)(u,{children:[(0,a.jsx)("div",{children:(0,o.Y3T)(m)}),g&&(0,a.jsx)(h,{children:"(Replaces ".concat(g,")")})]})]})})}},45087:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var i=t(21626),o=t(37876),r=(0,i.i7)(["from{transform:translateY(-100%);opacity:0;}to{transform:translateY(0);opacity:1;}"]),a=i.Ay.div.withConfig({displayName:"StickyNotificationBanner__BannerContainer",componentId:"sc-sf0q5j-0"})(["position:sticky;top:0;left:0;width:100%;display:flex;align-items:center;justify-content:center;background-color:#32912f;z-index:",";box-shadow:0 0.1250rem 0.2500rem rgba(0,0,0,0.1);animation:"," 0.2s ease-out;"],function(e){return e.theme.layer["layer-3"]},r);let s=function(e){var n=e.className,t=e.children;return(0,o.jsx)(a,{className:n,children:t})}},59456:(e,n,t)=>{"use strict";t.d(n,{A:()=>a});var i=t(21626),o=t(37876),r=i.Ay.div.withConfig({displayName:"BookingDetailPageCardList__CardList",componentId:"sc-177akfq-0"})(["display:flex;align-items:stretch;flex-wrap:wrap;justify-content:space-between;gap:1.2500rem;.booking-generic-addon-card__wrapper{flex:1 1 50%;max-width:calc(50% - 0.6250rem);.booking-generic-addon-card__top{height:auto;}}","{flex-direction:column;.booking-generic-addon-card__wrapper{max-width:100%;flex:1 1 100%;.booking-generic-addon-card__top{height:100%;}}}"],function(e){return e.theme.responsive.maxTablet});let a=function(e){var n=e.children;return(0,o.jsx)(r,{children:n})}},63302:(e,n,t)=>{"use strict";t.d(n,{e:()=>x});var i=t(27925),o=t(19510),r=t(21626),a=t(7634),s=t(37641),l=t(66284),d=t(14232),c=t(88161),u=t(55529),h=t(15706),f=t(86746);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach(function(n){(0,l.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var p=function(e,n,t){return null!=n&&n.addons?e.length===n.addons.length?t:n.addons.reduce(function(e,n){var t;return(null==(t=n[o.MY_BUTLINS_ADDON_SECTIONS.DINING])?void 0:t.find(function(e){return e.code===o.ADDON_CODES.XMAS}))?n.UnitSeqNo:e},0):t};let C=function(e){var n,t,i,r=e.addonCode,a=e.booking,l=e.onClose,m=(0,u.w)(),C=(0,u.d)(f.A.getBasket),k=null!=(n=null==a?void 0:a.addons.map(function(e){var n;return null!=(n=(0,s.REK)(e[o.MY_BUTLINS_ADDON_SECTIONS.DINING]).find(function(e){return e.code===r}))?n:null}).filter(function(e){return!!e}))?n:[],b=(0,c.IS)(k,a),v=!!(null!=b&&b.some(function(e){var n;return(null!=(n=null==e?void 0:e.quantityBooked)?n:0)>0}))||(null==C?void 0:C.add.some(function(e){return e.code===o.ADDON_CODES.LUNCH})),A=b&&b.length>0&&!v,y=k.some(function(e){return e.quantityBooked>0})||(null==C?void 0:C.add.some(function(e){return e.code===r})),x=(0,s.eSL)(null==a?void 0:a.addons),D=(0,s.D95)(a,!0),w=k.some(function(e){return e.isAllowedToEdit}),N=k.some(function(e){return!e.isAllowedToEdit}),S=null!=(t=null==a?void 0:a.parties)?t:[],_=k.map(function(e){return{isChecked:e.quantityBooked>0,isDisabled:!e.isAllowedToEdit}}),O=null!=(i=null==b?void 0:b.map(function(e,n){var t;return{isChecked:(null!=(t=null==e?void 0:e.quantityBooked)?t:0)>0,isDisabled:(0,c.Wt)(a,C,n)}}))?i:[],j=(0,d.useState)(_),P=j[0],B=j[1],E=(0,d.useState)(O),I=E[0],L=E[1],T=(0,d.useState)({isChecked:_.every(function(e){return e.isChecked}),isDisabled:_.some(function(e){return e.isDisabled})}),M=T[0],Y=T[1],H=(0,d.useState)({isChecked:O.every(function(e){return e.isChecked}
1),isDisabled:O.some(function(e){return e.isDisabled})}),X=H[0],U=H[1];return{showLunch:A,bookedAddons:x,diningCodes:D,hasDisabledCheckbox:N,isSaveButtonDisabled:!w&&(0,c.mQ)(o.ADDON_CODES.LUNCH,a,C)||JSON.stringify(P)===JSON.stringify(_)&&JSON.stringify(I)===JSON.stringify(O),isLunchAllPartiesChecked:X.isChecked&&!I.some(function(e){return e.isDisabled}),addon:k,lunch:b,hasEnabledCheckbox:w,isLunchBookedOrAddedToBasket:v,isDiningBookedOrAddedToBasket:y,lunchPartyCheckboxes:I,units:S,allPartiesCheckbox:M,partyCheckboxes:P,handleSave:function(){P.forEach(function(e,n){var t,i,o,l,d=p(P,a,n),c=(0,s.sdi)(S[d]);m(h.A.actions.handleAllInclusiveBasketChange({code:r,quantity:e.isChecked?c:0,unitSeqNumber:d,addonName:null!=(t=null==(i=k[d])?void 0:i.name)?t:k[0].name})),e.isChecked&&m(h.A.actions.setAddedBasketItem(null!=(o=null==(l=k[d])?void 0:l.name)?o:k[0].name))}),b&&!v&&I.forEach(function(e,n){var t=p(I,a,n),i=(0,s.sdi)(S[t]);if(m(h.A.actions.handleAllInclusiveBasketChange({code:o.ADDON_CODES.LUNCH,quantity:e.isChecked?i:0,unitSeqNumber:t,addonName:null!=(d=null==(c=b[t])?void 0:c.name)?d:"Lunch"})),e.isChecked){var r=P[n],l=null!=(u=null==(f=b[t])?void 0:f.name)?u:"Lunch";if(r.isChecked){var d,c,u,f,g,C,v=null!=(g=null==(C=k[t])?void 0:C.name)?g:k[0].name;m(h.A.actions.setAddedBasketItem("".concat(v," & ").concat(l)))}else m(h.A.actions.setAddedBasketItem(l))}}),null==l||l()},onLunchAllPartiesClick:function(){U(g(g({},X),{},{isChecked:!X.isChecked})),L(I.map(function(e){return g(g({},e),{},{isChecked:!X.isChecked})}))},onLunchPartyCheckboxChange:function(e){var n=I.map(function(n,t){return t!==e?n:g(g({},n),{},{isChecked:!n.isChecked})});L(n),n.every(function(e){return e.isChecked})&&!X.isChecked&&U(g(g({},X),{},{isChecked:!0})),n.some(function(e){return!e.isChecked})&&X.isChecked&&U(g(g({},X),{},{isChecked:!1}))},onDiningAllPartiesClick:function(){Y(g(g({},M),{},{isChecked:!M.isChecked}));var e=P.map(function(e){return g(g({},e),{},{isChecked:!M.isChecked})});B(e),L(I.map(function(n,t){var i=(0,c.Wt)(a,C,t)&&!e[t].isChecked;return{isChecked:n.isChecked&&!i,isDisabled:i}}))},onDiningPartyCheckboxChange:function(e){var n=P.map(function(n,t){return t!==e?n:g(g({},n),{},{isChecked:!n.isChecked})});B(n),n.every(function(e){return e.isChecked})&&!M.isChecked&&Y(g(g({},M),{},{isChecked:!0})),n.some(function(e){return!e.isChecked})&&M.isChecked&&Y(g(g({},M),{},{isChecked:!1})),L(I.map(function(t,i){if(i!==e)return t;var o=(0,c.Wt)(a,C,i)&&!n[i].isChecked;return{isChecked:t.isChecked&&!o,isDisabled:o}}))},getUnitIndex:p}};var k=t(34175),b=t(24458),v=t(37876),A=r.Ay.div.withConfig({displayName:"ExclusivePartyBasedBasketChange__SectionTitle",componentId:"sc-1dnt96n-0"})(["font:normal normal bold 1.0000rem/1.5625rem NeutraFaceBold;letter-spacing:0.1000rem;text-transform:uppercase;margin-left:2.1875rem;margin-bottom:0.6250rem;"]),y=r.Ay.div.withConfig({displayName:"ExclusivePartyBasedBasketChange__Separator",componentId:"sc-1dnt96n-1"})(["border-top:0.0625rem solid #000;margin:0.0000rem 2.1875rem 1.2500rem 2.1875rem;"]),x=function(e){var n,t=e.addonCode,r=e.booking,l=e.onClose,d=C({addonCode:t,booking:r,onClose:l}),u=d.showLunch,h=d.bookedAddons,f=d.diningCodes,m=d.hasDisabledCheckbox,g=d.isSaveButtonDisabled,p=d.isLunchAllPartiesChecked,x=d.addon,D=d.lunch,w=d.hasEnabledCheckbox,N=d.isLunchBookedOrAddedToBasket,S=d.isDiningBookedOrAddedToBasket,_=d.lunchPartyCheckboxes,O=d.units,j=d.allPartiesCheckbox,P=d.partyCheckboxes,B=d.handleSave,E=d.onLunchAllPartiesClick,I=d.onLunchPartyCheckboxChange,L=d.onDiningAllPartiesClick,T=d.onDiningPartyCheckboxChange,M=d.getUnitIndex;return(0,v.jsx)(b.A,{id:"exclusive-party-based",title:"".concat(S?"EDIT":"ADD"," ").concat(x[0].name),showDialogNote:m,showSaveButton:w,dialogNote:(n=!!(null!=r&&r.isBeforeFinalPayment),m?n?a.eZA.refundContact:a.eZA.editIsNotAllowed:""),saveButtonText:"Add To Basket",isSaveButtonDisabled:g,onSave:B,showCancelButton:!0,cancelButtonText:"Cancel",onClose:l,showCheckboxArea:!0,checkboxArea:(0,v.jsxs)(v.Fragment,{children:[x.length>0&&w&&u&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(A,{children:"dining only"}),x.length>1&&(0,v.jsx)(k.A,{label:"All parties",isDisabled:j.isDisabled,isChecked:j.isChecked,price:(0,c.Sd)(r,t),onClick:L})]}),w&&P.map(function(e,n){var o=x[n],a=o.code,l=o.price,d=(0,s.sdi)(O[n]),c="".concat(a,"-").concat(n),u=M(P,r,n),m=h.filter(function(e){return f.includes(e.code)&&e.code!==t&&e.units.find(function(e){return e.UnitSeqNo===u&&e.quantityBooked>0})}),g=(0,i.A)(m,1)[0];return(0,v.jsx)(k.A,{label:"Party ".concat(u+1),isDisabled:!o.isAllowedToEdit,isChecked:e.isChecked,price:l,numOfGuests:d,replaces:null==g?void 0:g.name,onChange:function(){return T(n)}},c)}),!N&&D&&D.length>0&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(y,{}),(0,v.jsx)(A,{children:"upgrade and include lunch"}),D.length>1&&(0,v.jsx)(k.A,{label:"All parties",isDisabled:_.some(function(e){return e.isDisabled}
1),isChecked:p,price:(0,c.Sd)(r,o.ADDON_CODES.LUNCH),onClick:E})]}),!N&&_.map(function(e,n){if(!D)return null;var t=D[n];if(!t)return null;var i=t.code,o=t.price,a=(0,s.sdi)(O[n]),l="".concat(i,"-").concat(n),d=M(_,r,n);return(0,v.jsx)(k.A,{label:"Party ".concat(d+1),isDisabled:e.isDisabled,isChecked:e.isChecked,price:o,numOfGuests:a,onChange:function(){return I(n)}},l)})]})})}},74927:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-butlins/bookings/dining/[resId]",function(){return t(98071)}])},98071:(e,n,t)=>{"use strict";t.r(n),t.d(n,{__N_SSP:()=>J,default:()=>W});var i=t(77328),o=t.n(i),r=t(66284),a=t(27925),s=t(19510),l=t(14232),d=t(21626),c=t(7634),u=t(37641),h=t(58200),f=t(2381),m=t(19753),g=t(63302),p=t(9707),C=t(41194),k=t(11203),b=t(59456),v=t(82172),A=t(44478),y=t(63857),x=t(43081),D=t.n(x),w=t(35881),N=t(71422),S=t(88161),_=t(55529),O=t(15706),j=t(86746),P=t(99927),B=t(11422);function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var L=(0,w.Mz)(j.A.getLoading,j.A.getBooking,j.A.getDining,j.A.getFoodAndDrinks,j.A.getBasket,function(e,n,t,i,o){return{isLoading:e,booking:n,dinings:t.dinings,foodAndDrinks:i,basket:o}});let T=function(){var e=(0,_.w)(),n=(0,N.z)().selectedBreak,t=(0,_.d)(L),i=t.isLoading,o=t.booking,r=t.dinings,a=t.foodAndDrinks,d=t.basket,h=(0,l.useCallback)((0,y.A)(D().mark(function t(){var i,r,a,l,d,h;return D().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e(O.A.actions.handleLoadingChange(!0)),r=!!(null!=o&&o.isBBW),e((0,P.w)(null!=n&&n.resortCode?{resort:"".concat(n.resortCode,"|all")}:Object.create(null))),a=Array.from(new Map((null==o||null==(i=o.addons)?void 0:i.flatMap(function(e){return e.DINING}).map(function(e){return[null==e?void 0:e.code,e]}))||[]).values()),t.next=6,Promise.allSettled([].concat((0,A.A)(a.map(function(n){var t=n.code;return e((0,B.a)({code:(0,S.Ln)(t)},r)).unwrap()})),[e((0,B.a)({code:(0,S.Ln)(c.GZG.myButlinsDining)},r)).unwrap(),e((0,B.a)({code:c.GZG.myAccountCard},r)).unwrap(),e((0,B.a)({code:s.ADDON_CODES.LUNCH},r)).unwrap()]));case 6:d=(l=t.sent).reduce(function(e,n){if("fulfilled"===n.status){var t,i=null==(t=n.value.results)?void 0:t[0];if(i)return[].concat((0,A.A)(e),[i])}return e},[]),h=l.reduce(function(e,n){if("fulfilled"===n.status){var t,i,o,r,s=null==(t=n.value.results)?void 0:t[0],l=a.find(function(e){return e.code===(null==s?void 0:s.code)});return s&&l?[].concat((0,A.A)(e),[{foodAndDrink:I(I(I({},s),l),{},{adultPrice:null!=(i=s.adultPrice)?i:0,juniorPrice:null!=(o=s.toddlerPrice)?o:0,childPrice:null!=(r=s.childPrice)?r:0}),code:s.code,displayMode:"dynamicDining"}]):e}return"rejected"===n.status&&(0,u.Zkr)(n.reason),e},[]),e(O.A.actions.handleFoodAndDrinksChange((0,A.A)(null!=d?d:[]))),e(O.A.actions.setDinings(h)),e(O.A.actions.handleLoadingChange(!1));case 12:case"end":return t.stop()}},t)})),[o]);return(0,l.useEffect)(function(){o&&h()},[o]),{isLoading:i,dinings:r,foodAndDrinks:a,booking:o,basket:d}};var M=t(88513),Y=t(45087),H=t(37876);function X(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var U=d.Ay.div.withConfig({displayName:"Dining__ReadMore",componentId:"sc-zo7ait-0"})(["text-decoration:underline;cursor:pointer;margin-bottom:0.6250rem;"]),F=d.Ay.div.withConfig({displayName:"Dining__Description",componentId:"sc-zo7ait-1"})(["font:normal normal normal 1.0000rem/1.3750rem NeutraFaceBook;text-align:left;padding:1.1250rem 0 0.6250rem 0;"]),G=d.Ay.ul.withConfig({displayName:"Dining__IncludesList",componentId:"sc-zo7ait-2"})(["letter-spacing:0.0000rem;padding-left:1.2500rem;margin-top:0.0000rem;"]),K=d.Ay.li.withConfig({displayName:"Dining__IncludesListItem",componentId:"sc-zo7ait-3"})(["line-height:1.3125rem;font-size:1.0000rem;"]),q=function(e){var n,t;return null!=(n=null==e||null==(t=e.includesList[c.OzB])?void 0:t.map(function(n){var t;return null==e||null==(t=e.includesList)||null==(t=t[n])?void 0:t.t
1itle}))?n:[]},z=function(e,n){var t=null==(o=e.find(function(e){return e.code===n}))||null==(o=o.foodAndDrink)?void 0:o.children,i=[];if(t){var o,r,a=function(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return X(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?X(e,n):void 0}}(e))){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw r}}}}(t);try{for(a.s();!(r=a.n()).done;){var s,l,d=r.value;
1i.push({addon:d,title:null!=(s=null==(l=d.name.split("-")[1])?void 0:l.trim())?s:d.name})}}catch(e){a.e(e)}finally{a.f()}}return i};let R=function(e){var n,t,i,o,d,A,y,x,D,w,N,_,O=e.layout,j=e.magnoliaContent,P=e.siteGlobalBannerContent,B=T(),E=B.dinings,I=B.foodAndDrinks,L=B.booking,X=B.isLoading,R=B.basket,J=(0,l.useState)(null),W=J[0],V=J[1],Z=(0,l.useState)(!1),Q=Z[0],$=Z[1],ee=(0,l.useState)(null),en=ee[0],et=ee[1],ei=null!=(n=null==L||null==(t=L.parties)?void 0:t.length)?n:1,eo=(0,l.useCallback)(function(e){var n;return null!=(n=I.find(function(n){return n.code===(0,S.Ln)(e)}))?n:null},[I]),er=(0,u.b7W)(L,[s.MY_BUTLINS_ADDON_SECTIONS.DINING]),ea=null==(i=E[0])||null==(i=i.foodAndDrink)||null==(i=i.imageCta)?void 0:i.image,es=(0,S.Qw)(L,s.ADDON_CODES.LUNCH),el=(0,S.nl)(es,I),ed=(0,a.A)(el,1)[0],ec=!!ed&&(0,S.mQ)(ed.addon.code,L,R);return(0,l.useEffect)(function(){ed&&!ec&&null!==en&&et(!0)},[ec]),(0,H.jsxs)(M.A,{layout:O,siteGlobalBannerContent:P,isLoading:X,content:j,desktopPadding:"20px 0px",mobilePadding:"0",showHeader:!0,isSignedInHeader:!0,showAddonMenu:!0,showBasket:!0,children:[en&&(0,H.jsx)(Y.A,{className:"sticky-notification",children:(0,H.jsx)(m.A,{message:c.Xf6,onClose:function(){return et(!1)},onView:function(){var e=document.getElementById(s.ADDON_CODES.LUNCH);e&&e.scrollIntoView({behavior:"smooth"}),setTimeout(function(){et(!1)},1500)}})}),(0,H.jsx)(v.A,{image:(null==(o=eo(c.GZG.myButlinsDining))||null==(o=o.imageCta)?void 0:o.image)||ea,title:"Dining Plans",children:(0,H.jsxs)(b.A,{children:[er.map(function(e,n){var t,i,o,a,l,d,m,p=(0,S.Qw)(L,e)[0],b=W===n,v=eo(e);return v?(null==v?void 0:v.code)===s.ADDON_CODES.XMAS?(0,H.jsx)(C.A,{code:null==v?void 0:v.code,index:n,image:null!=(t=(null==v?void 0:v.image)||(null==v||null==(i=v.imageCta)?void 0:i.image))?t:Object.create(null),imageVariants:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},c.XYK.xs,{width:380,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.sm,{width:576,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.md,{width:768,height:290,variant:c.HsM.LANDSCAPE2_1}),c.XYK.tablet,{width:440,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.xl,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.original,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),isImageFixHeight:!0,showTitle:!0,title:null==v?void 0:v.title,analyticsName:null==v?void 0:v.analyticsName,titlePosition:k.Of.top,buttons:[k.dS.basket],buttonJustifyContent:"flex-start",basketModal:(0,H.jsx)(g.e,{addonCode:e,booking:L}),showTimeSlots:!0,showTimeSlotsLabel:!0,timeSlots:z(E,e),showPrice:!0,prices:[{value:(0,u.Y3T)((0,S.On)(null!=(o=(0,S.NR)(s.MY_BUTLINS_ADDON_SECTIONS.DINING,L))?o:[],e)),label:"From",postFix:"per party"}],customDescription:(0,H.jsx)(G,{children:q(v).map(function(e,n){return(0,H.jsx)(K,{children:e},n)})})},"generic-card__dining-xmas-".concat(n)):p&&(0,H.jsx)(C.A,{code:e,index:n,image:null!=(a=null==v||null==(l=v.imageCta)?void 0:l.image)?a:Object.create(null),imageVariants:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},c.XYK.xs,{width:380,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.sm,{width:576,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.md,{width:768,height:290,variant:c.HsM.LANDSCAPE2_1}),c.XYK.tablet,{width:440,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.xl,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.original,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),isImageFixHeight:!0,showTitle:!0,title:null!=(d=null==v?void 0:v.title)?d:e,analyticsName:null==v?void 0:v.analyticsName,titlePosition:k.Of.top,buttons:[k.dS.basket],buttonJustifyContent:"flex-start",discount:p.discount,basketModal:(0,H.jsx)(g.e,{addonCode:e,booking:L}),showPrice:!0,prices:[{value:(0,u.Y3T)((0,S.On)(null!=(m=(0,S.NR)(s.MY_BUTLINS_ADDON_SECTIONS.DINING,L))?m:[],e)),label:ei>1?"From":"",postFix:ei>1?"per party":""}],customDescription:(0,H.jsxs)(H.Fragment,{children:[!b&&(0,H.jsx)(F,{children:null==v?void 0:v.summary}),b&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(h.Ay,{foodAndDrink:v,showPrices:!1,showTitle:!1,displayMode:"staticDining"}),(0,H.jsx)(f.Ay,{foodAndDrink:v})]}),(0,H.jsx)(U,{onClick:function(){return V(b?null:n)},children:"Read ".concat(b?"short":"full"," description")})]})},"generic-card__dining-".concat(n)):null}),(null==ed?void 0:ed.addon)&&(null==ed?void 0:ed.content)&&(0,H.jsx)(C.A,{id:ed.addon.code,code:ed.addon.code,image:null!=(d=null==(A=ed.content)||null==(A=A.imageCta)?void 0:A.image)?d:Object.create(null),imageVariants:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},c.XYK.xs,{width:380,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.sm,{width:576,height:215,variant:c.HsM.LANDSCAPE2_1}),c.XYK.md,{width:768,height:290,variant:c.HsM.LANDSCAPE2_1}),c.XYK.tablet,{width:440,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.xl,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),c.XYK.original,{width:480,height:210,variant:c.HsM.LANDSCAPE2_1}),isImageFixHeight:!0,showTitle:!0,title:null!=(y=null==(x=ed.content)?void 0:x.title)?y:null==(D=ed.addon)?void 0:D.name,analyticsName:null==(w=ed.content)?void 0:w.analyticsName,titlePosition:k.Of.top,buttons:[k.dS.basket],buttonJustifyContent:"flex-start",discount:ed.addon.discount,basketModal:(0,H.jsx)(p.M,{addonCode:ed.addon.code,booking:L,sections:[s.MY_BUTLINS_ADDON_SECTIONS.UPGRADES]}),showPrice:!0,prices:[{value:(0,u.Y3T)((0,S.On)(null!=(N=(0,S.NR
1)(s.MY_BUTLINS_ADDON_SECTIONS.UPGRADES,L))?N:[],ed.addon.code)),label:ei>1?"From":"",postFix:ei>1?"per party":""}],customDescription:(0,H.jsxs)(H.Fragment,{children:[!Q&&(0,H.jsx)(F,{children:null==(_=ed.content)?void 0:_.summary}),Q&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(h.Ay,{foodAndDrink:ed.content,showPrices:!1,showTitle:!1,displayMode:"staticDining"}),(0,H.jsx)(f.Ay,{foodAndDrink:ed.content})]}),(0,H.jsx)(U,{onClick:function(){return $(!0)},children:"Read ".concat(Q?"short":"full"," description")})]}),isDisabled:ec},"lunch-addon-card")]})})]})};var J=!0;let W=function(e){var n=e.layout,t=e.content,i=e.siteGlobalBannerContent;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(o(),{children:[(0,H.jsx)("title",{children:"Dining Packages | My Butlin's"}),(0,H.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,H.jsx)(R,{layout:n,magnoliaContent:t,siteGlobalBannerContent:i})]})}}},e=>{e.O(0,[3576,4775,9357,8689,7833,4e3,4357,3587,187,2555,1200,6412,6885,1147,2051,7612,283,223,3557,8435,8513,8201,5722,636,6593,8792],()=>e(e.s=74927)),_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.