"use strict";(self.ldBronxApp=self.ldBronxApp||[]).push([[8092,564],{63969:(e,t,r)=>{r.d(t,{ZP:()=>b});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(45306),c=r(27692),s=r(6865),u="bagging-preference-summary-row",d=u+"__img-container",m=u+"__text-container",p=m+"__value",f=m+"__price",g=function(e){var t=e.baggingPreferenceData,r=t.image;return a().createElement("div",{className:u},a().createElement("span",{className:d},a().createElement("img",{src:r,alt:"",loading:"lazy",width:"40px",height:"40px"})),a().createElement("span",{className:m},a().createElement(l.Z,{type:"small5",element:"span",color:"global-color-dim-grey"},t.label),a().createElement("span",{className:p},function(){var e=t.type,r=t.quantity,n=t.product,o=t.isSelected;switch(e){case s.BAGGING_SECTION_GOATOTE:case s.BAGGING_SECTION_BYOB:var i=o?"cnc.almostDonePage.checkout.goGreen.baggingPreferences.selected":"cnc.almostDonePage.checkout.goGreen.baggingPreferences.NotSelected";return a().createElement(l.Z,{type:"small6",element:"span",color:"global-color-dim-grey",intlId:i});case s.BAGGING_SECTION_EXCHANGE_BIN:return a().createElement(l.Z,{type:"small6",element:"span",color:"global-color-dim-grey",intlId:"cnc.almostDonePage.checkout.goGreen.baggingPreferences.swapLabel",intlValues:{displayText:r}});case s.BAGGING_SECTION_PURCHASE_BIN:var u,d,m,p;return a().createElement(l.Z,{type:"small6",element:"span",color:"global-color-dim-grey"},r," x ",a().createElement(c.tA,{className:f,price:null==(d=n.prices)||null==(u=d.price)?void 0:u.value,unit:null==(m=n.pricingUnits)?void 0:m.unit,interval:null==(p=n.pricingUnits)?void 0:p.interval}));default:return null}}())))};g.propTypes={baggingPreferenceData:i().object.isRequired};const b=g},14263:(e,t,r)=>{r.d(t,{ZP:()=>B});var n=r(32747),a=r.n(n),o=r(14890),i=r(45697),l=r.n(i),c=r(23930),s=r.n(c),u=r(59529),d=r(15832),m=r(6979),p=r.n(m),f=r(62654),g=r(6865),b=r(45306),y=r(33681),E=r(27692),h=r(67722),v=r(9270),_="goGreen-exchange-form-row",N=_+"__product-img-wrapper",C=N+"__product-img",P=N+"__icon",S=_+"__label-qty-wrapper",O=S+"__form-label",R=O+"__description",A=S+"__form",k=A+"__paid",T=k+"__total-price",w=k+"__unit-price",I=A+"__quantity-selector-wrapper",L=_+"__fieldset",D=_+"__legend",Z=function(e,t,r){var n;return(n=r===g.BAGGING_SECTION_BYOB?g.BAGGING_SECTION_BYOB_IMAGE:r===g.BAGGING_SECTION_GOATOTE?g.BAGGING_SECTION_GOATOTE_IMAGE:t?e+"/products/"+t+"/b1/en/front/"+t+"_front_a01.png":null)?a().createElement("span",{className:N},a().createElement("img",{className:(0,f.lR)(C,r),src:n,alt:""}),function(e){return e===g.BAGGING_SECTION_EXCHANGE_BIN?a().createElement(d.Z,{className:(0,f.lR)(P,e)}):e===g.BAGGING_SECTION_PURCHASE_BIN?a().createElement(u.Z,{className:(0,f.lR)(P,e)}):null}(r)):null},G=function(e){var t,r,n,o,i,l=e.formHeader,c=e.formLabel,s=e.imagesCDN,u=e.productSKU,d=e.data,m=e.type,v=e.product,N=e.cartItem,C=e.isMobile,P=e.orderDashboardQuantityClassModifier,G=e.isCheckboxSelected,B=e.onCheckboxClick,M=e.isLoading,q=m===g.BAGGING_SECTION_EXCHANGE_BIN,x=m===g.BAGGING_SECTION_PURCHASE_BIN,U=m+"-legend",j=x?U+" buy-price":null,H=null==u?void 0:u.slice(0,-3),F={isBoxSwap:q,componentName:"GoGreenBoxExchangeFormRow"};return a().createElement("div",{className:(0,f.lR)(_,m)},Z(s,H,m),a().createElement("fieldset",{"aria-labelledby":j,className:L},a().createElement("legend",{id:U,className:D},a().createElement("div",{className:S},a().createElement("div",{className:(0,f.lR)(O,m)},a().createElement(b.Z,{type:"small3",element:"strong"},l),a().createElement(b.Z,{element:"span",type:"small6",className:R},c),C&&x&&a().createElement(E.tA,{price:null==(r=v.prices)||null==(t=r.price)?void 0:t.value,unit:null==(n=v.pricingUnits)?void 0:n.unit,interval:null==(o=v.pricingUnits)?void 0:o.interval,weighted:null==(i=v.pricingUnits)?void 0:i.weighted,className:w})))),a().createElement("div",{className:A},a().createElement("div",{className:(0,f.lR)(I,[P,m])},m===g.BAGGING_SECTION_EXCHANGE_BIN||m===g.BAGGING_SECTION_PURCHASE_BIN?a().createElement(h.Z,{productCode:u,quantity:null==N?void 0:N.quantity,alignment:"horizontal",productName:v.name,doNotShowAddButton:q,isDeleting:!1,ariaLabel:F,isGreenBinSwapSection:q}):a().createElement(y.ZP,{toggleButtonText:p().get(d,"fields.customData.copy.checkbox"),id:m,name:m,checkBoxSize:20,isActive:G,checked:G,onChange:B,isDisabled:M,isLoading:M})),function(e,t,r,n){var o,i,l,c,s;return e===g.BAGGING_SECTION_PURCHASE_BIN?a().createElement("div",{className:k},a().createElement(E.tA,{className:T,price:(null==r?void 0:r.totalPrice)||"0.00"}),!n&&a().createElement(E.tA,{price:null==(i=t.prices)||null==(o=i.price)?void 0:o.value,unit:null==(l=t.pricingUnits)?void 0:l.unit,interval:null==(c=t.pricingUnits)?void 0:c.interval,weighted:null==(s=t.pricingUnits)?void 0:s.weighted,className:w,fieldsetValue:"buy-price"})):null}(m,v,N,C))))};G.propTypes={formHeader:l().string.isRequired,formLabel:l().array.isRequired,imagesCDN:l().string,productSKU:l().string,data:s().record,type:l().string.isRequired,product:s().record,cartItem:s().record,isMobile:l().bool,orderDashboardQuantityClassModifier:l().oneOfType([l().array,l().string]),isCheckboxSelected:l().bool,onCheckboxClick:l().func,isLoading:l().bool},G.defaultProps={cartItem:null,data:null,isCheckboxSelected:!1,onCheckboxClick:function(){},imagesCDN:null,productSKU:null,product:null,isMobile:!1,isLoading:!1};const B=(0,o.qC)(v.Z)(G)},42422:(e,t,r)=>{r.d(t,{ZP:()=>T});var n=r(32747),a=r.n(n),o=r(14890),i=r(45697),l=r.n(i),c=r(23930),s=r.n(c),u=r(6979),d=r.n(u),m=r(86437),p=r(74129),f=r(62654),g=r(6865),b=r(45306),y=r(25141),E=r(9270),h=r(14263),v=r(999),_=r(10270);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t,r,n,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,a)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){C(o,n,a,i,l,"next",e)}function l(e){C(o,n,a,i,l,"throw",e)}i(void 0)}))}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var R="goGreen-box-exchange-form-wrapper",A=R+"__error",k=function(e){var t=e.cmsData,r=e.isGoGreenPackagingV2Enabled,o=e.getProduct,i=e.product,l=e.goGreenBinSKU,c=e.cartItem,s=e.imagesCDN,u=e.isMobile,E=e.derivedStatus,N=e.swapQuantity,C=e.isDeliveryOrder,k=e.isOrderDashboardPage,T=e.customData,w=e.updateUserCart,I=e.bringOwnBags,L=e.isBaggingSectionDisplayedButNonSelected,D=S((0,n.useState)(!1),2),Z=D[0],G=D[1],B=(0,n.useRef)();(0,n.useEffect)((function(){r&&l&&i.needsReload()&&o(l)}),[r,i,o,l]),(0,n.useEffect)((function(){!function(e,t,r,n){var a=0;a=e.current?((null==t?void 0:t.quantity)||0)+r:null,(0,v.Vj)({key:g.CART_GO_GREEN_PACKAGING_ANALYTICS,data:{goGreen:(0,_.Fz)(a,n)}})}(B,c,N,I)}),[c,N,I]);var M=(0,n.useCallback)(P((function(){return O(this,(function(e){switch(e.label){case 0:return G(!0),[4,w({pickupInstructions:{bringOwnBags:!I}})];case 1:return e.sent(),G(!1),[2]}}))})),[w,I]),q=[g.ORDER_STATUS_PICK_STARTED,g.ORDER_STATUS_READY_FOR_PICK_UP,g.ORDER_STATUS_PICK_COMPLETED,g.ORDER_STATUS_CANCELLED],x=(null==T?void 0:T.componentKey)===g.GO_GREEN_V2_FORM_COMPONENT_NAME;if(!t||!(r&&x)||!i||C||q.includes(E))return null;var U,j,H,F=k?"order-dashboard-active":"",K=k&&a().createElement("hr",{className:"gogreen-divider"}),V={renderNode:(U={},j=m.BLOCKS.PARAGRAPH,H=function(e,t){return a().createElement("p",null,t)},j in U?Object.defineProperty(U,j,{value:H,enumerable:!0,configurable:!0,writable:!0}):U[j]=H,U)},W=function(e){return F?[e,F]:e};return a().createElement(a().Fragment,null,a().createElement("div",{className:(0,f.lR)(R,F),ref:B},K,t.map((function(e){var t=d().get(e,"fields.customData.type");if(t===g.BAGGING_SECTION_GOATOTE)return a().createElement(y.Z,{key:t,type:t,data:e});var r=d().get(e,"fields.header.fields.headline"),n=d().get(e,"fields.body");return a().createElement(h.ZP,{key:t,formHeader:r,formLabel:(0,p.h)(n,V),imagesCDN:s,productSKU:l,type:t,data:e,product:i,cartItem:c,isMobile:u,orderDashboardQuantityClassModifier:W(t),isCheckboxSelected:I,onCheckboxClick:M,isLoading:Z})})),L&&a().createElement(b.Z,{className:A,type:"small4",intlId:"cnc.cart.almostDone.warning.baggingPreference",color:"global-color-pc-red"})))};k.propTypes={cmsData:s().list.isRequired,isGoGreenPackagingV2Enabled:l().bool.isRequired,product:s().record.isRequired,cartItem:s().record,goGreenBinSKU:l().string.isRequired,getProduct:l().func.isRequired,imagesCDN:l().string.isRequired,isMobile:l().bool.isRequired,derivedStatus:l().string,swapQuantity:l().number.isRequired,isDeliveryOrder:l().bool.isRequired,isOrderDashboardPage:l().bool.isRequired,customData:l().object,updateUserCart:l().func.isRequired,bringOwnBags:l().bool.isRequired,isBaggingSectionDisplayedButNonSelected:l().bool.isRequired},k.defaultProps={cartItem:null,derivedStatus:"",customData:null};const T=(0,o.qC)(E.Z)(k)},59506:(e,t,r)=>{r.d(t,{ZP:()=>R});var n=r(32747),a=r.n(n),o=r(14890),i=r(45697),l=r.n(i),c=r(6979),s=r.n(c),u=r(15832),d=r(45306),m=r(63861),p=r(76341),f=r(63969),g=r(6865),b=r(999),y=r(9270),E="goatote",h=E+"__form-header",v=h+"__form-title",_=v+"__icon",N=h+"__form-select-options",C=E+"__summary",P="goatote-title-id",S="goatote-summary-id",O=function(e){var t=e.data,r=e.showGoatoteOptionsModal,o=e.type,i=e.goatoteSku,l=e.isSelected,c=e.isMobile,y=(0,n.useRef)(),O=null;if((0,n.useEffect)((function(){var e=y.current?l:null;(0,b.Vj)({key:g.CART_GO_GREEN_GOATOTE_ANALYTICS,data:"goatote:"+e})}),[l]),!i)return null;var R={type:o,isSelected:l,image:g.BAGGING_SECTION_GOATOTE_IMAGE,label:s().get(t,"fields.customData.copy.summary")},A=s().get(t,"fields.customData.copy.promoTile");return a().createElement("fieldset",{"aria-labelledby":P+" "+S,className:E,ref:y},a().createElement("div",{className:h},a().createElement("div",{className:v,id:P},a().createElement(u.Z,{className:_,style:{fontSize:20}}),a().createElement(d.Z,{type:"small1",element:"span"},A)),l&&c&&a().createElement("div",{className:C,id:S},a().createElement(f.ZP,{baggingPreferenceData:R})),a().createElement("div",{className:N},a().createElement(m.Z,{className:N+"__btn",setRef:function(e){O=e},onClick:function(){return r(t,O)},theme:"no-style","data-track":"openGoatoteModal"},a().createElement(p.Z,{id:"cnc.almostDonePage.checkout.goGreen.goatote."+(l?"edit":"selectOptions")})))),l&&!c&&a().createElement("div",{className:C,id:S},a().createElement(f.ZP,{baggingPreferenceData:R})))};O.propTypes={data:l().object.isRequired,showGoatoteOptionsModal:l().func.isRequired,type:l().string.isRequired,isMobile:l().bool.isRequired,goatoteSku:l().string,isSelected:l().bool.isRequired},O.defaultProps={goatoteSku:null};const R=(0,o.qC)(y.Z)(O)},49788:(e,t,r)=>{r.d(t,{ZP:()=>w});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(6979),u=r.n(s),d=r(86437),m=r(74129),p=r(62654),f=r(45306),g=r(3558),b=r(76341),y=r(29847),E=r(6865);function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(this,arguments)}var _="pickup-package-instructions",N=_+"__header",C=N+"__text",P=N+"__left",S=N+"__image",O=_+"__instruction",R=O+"__text",A=O+"__link",k={style:{width:25,height:22,fill:"none"},viewBox:"0 0 25 22"},T=function(e){var t=e.goGreenData,r=e.isOrderDashboard,n=e.isOrderDashboardInProgress,o=e.isCheckoutPage;if(!t)return null;var i,l=u().get(t,"fields.header.fields.headline"),c=u().get(t,"fields.body"),s=u().get(t,"fields.customData.type")===E.GO_GREEN_TEXT_V2_TYPE,T=!l||s&&o,w={renderNode:(i={},h(i,d.INLINES.HYPERLINK,(function(e,t){return a().createElement(g.ZP,{className:A,to:e.data.uri,openInNewTab:!0},t,s&&a().createElement("span",{className:"sr-only"},a().createElement(b.Z,{id:"cnc.almostDonePage.checkout.goGreen.baggingPreferences.learnMore.srOnly"})))})),h(i,d.BLOCKS.PARAGRAPH,(function(e,t){return a().createElement("span",{className:_+"__span"},t)})),i)},I=function(e,t){var r="order-dashboard-active";return e&&!t?r:e&&t?[r,"in-progress"]:""}(r,n);return a().createElement("div",{className:(0,p.lR)(_,I)},!T&&a().createElement("div",{className:N},a().createElement("span",{className:P},!s&&a().createElement(y.iF,v({className:S},k)),a().createElement(f.Z,{className:C,type:"small3",color:s?"global-color-dark-grey":"global-color-pcexpress-green",element:"span"},l))),a().createElement("div",{className:O},a().createElement(f.Z,{className:(0,p.lR)(R,I),type:"small4"},(0,m.h)(c,w))))};T.propTypes={goGreenData:c().record,isOrderDashboard:i().bool.isRequired,isOrderDashboardInProgress:i().bool.isRequired,isCheckoutPage:i().bool.isRequired},T.defaultProps={goGreenData:null};const w=T},91637:(e,t,r)=>{r.d(t,{Z:()=>j});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(6979),u=r.n(s),d=r(55399),m=r(11175),p=r(76266),f=r(91590),g=r(20482),b=r(73484),y=r(8054),E=r(14094),h=r(16692),v=r(42491),_=r(53911),N=r(73237),C=r(54063),P=r(83163),S=r(17618),O=r(584),R=r(57138),A=r(63262),k=r(54435),T=r(54998);function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w.apply(this,arguments)}var I={recreateOnRerender:!1},L=(0,S.ZP)("HomepageHeroLiveOrderContainer",I),D=(0,S.ZP)("OrderTrackerContainer",I),Z=(0,S.ZP)("NotificationBanner",I),G=(0,S.ZP)("TimeSlotContainer",I),B=(0,S.ZP)("HomepageHeroPathwaysContainer",I),M=(0,S.ZP)("OrderHistoryCTA",I),q=(0,S.ZP)("ArrivalCheckinLinkDesktopContainer",I),x=(0,S.ZP)("ArrivalCheckinLinkMobileContainer",I),U=function(e){var t=e.reactComponent,r=e.componentProps,n=e.cmsData,o=e.customData,i=e.reactFile,l=e.match,c=w({},r,{cmsData:n,customData:o});switch(u().get(i,"fields.fileName")||t){case"FlyersHeader":return a().createElement(_.Z,c);case"DigitalFlyerSubscriptionsForm":return a().createElement(m.Z,c);case"homepageCustomerAssurance":return a().createElement(E.ZP,c);case"homepageCustomerDetailsLoyalty":return a().createElement(f.Z,null);case"homepageCustomerDetailsFulfillment":return a().createElement(g.Z,null);case"homepageCustomerCTAelements":return a().createElement(b.Z,c);case"SimpleCarousel":return a().createElement(h.Z,c);case"HomePageHeroSingleTile":return a().createElement(y.Z,c);case"HomepageHeroWelcomeMessage":return a().createElement(p.Z,c);case"HomepageHeroLiveOrder":return a().createElement(L,c);case"WellnessServiceDetailsContentful":return a().createElement(v.Z,c);case"OrderTracker":return a().createElement(D,w({},c,l));case"orderDashBoardNotificationBanner":return a().createElement(Z,w({},c,l));case"orderDashboardTimeSlot":return a().createElement(G,w({},c,l));case"HeroV2OrderDashboardPathways":return a().createElement(B,c);case"OrderDashboardOrderHistoryCTA":return a().createElement(M,c);case"ArrivalCheckinLinkDesktop":return a().createElement(q,w({},c,l));case"ArrivalCheckinLinkMobile":return a().createElement(x,w({},c,l));case"PickupPackageInstructions":return a().createElement(N.Z,w({},c,l));case"GoGreenBoxExchangeFormWrapper":return a().createElement(C.Z,w({},c,l));case"LocationDetailsGoGreenBoxExchangeMessage":return a().createElement(P.Z,w({},c,l));case"RapidDeliveryETA":return a().createElement(R.Z,c);case"OrderTrackingMap":return a().createElement(A.default,c);case"PCXDeliveryETA":return a().createElement(k.default,c);case"VoucherPromoBanner":return a().createElement(T.Z,c);case"mealPlannerChatBotWindow":return a().createElement(O.Z.MealPlannerContainer,c);case"ShopDealsLinkCTA":return a().createElement(O.Z.ShopDealsCTA,c);default:return null}};U.propTypes={componentProps:i().object,reactComponent:i().string,cmsData:c().list,customData:i().object,reactFile:c().record,match:i().object.isRequired},U.defaultProps={componentProps:{},customData:null,reactFile:null,reactComponent:null};const j=(0,d.withRouter)(U)},52147:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(86437),c=r(74129),s=r(3558),u=r(62654);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function p(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f="text-replacement",g={"™":a().createElement("sup",{className:f+"__sup"},"TM"),"®":a().createElement("sup",{className:f+"__sup"},"®"),"🅪":a().createElement("sup",{className:f+"__sup"},"MC"),"🅫":a().createElement("sup",{className:f+"__sup"},"MD"),"PC Express":a().createElement("em",{className:f+"__pcx"},"PC Express"),"PC Insiders":a().createElement("em",{className:f+"__pcx"},"PC Insiders"),"PC Optimum":a().createElement("em",{className:f+"__pcx"},"PC Optimum"),"Adeptes PC Optimum":a().createElement("em",{className:f+"__pcx"},"Adeptes PC Optimum")};function b(e){var t=e.text,r=e.replacements,n=m({},g,r),o=Object.keys(n),i=new RegExp(o.join("|"),"gi"),l=t.match(i),c=t.split(i);return c&&c.reduce((function(e,t,r){if(c.length-1!==r){var i=o.find((function(e){return e.toLowerCase()===l[r].toLowerCase()}));if(i)return[e,t,a().cloneElement(n[i],{key:"text-replacement-"+r})]}return p(e).concat([t])}),[])||t}b.propTypes={text:i().string.isRequired,replacements:i().shape({})},b.defaultProps={replacements:{}};const y=b;function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t,r,n=e.blockStyle,o=e.body,i=e.rootClass,d=e.replacements,m=(0,u.lR)(i,n),p={renderMark:(t={},E(t,l.MARKS.BOLD,(function(e){return a().createElement("span",{className:i+"__b"},e)})),E(t,l.MARKS.ITALIC,(function(e){return a().createElement("span",{className:i+"__i"},e)})),t),renderNode:(r={},E(r,l.BLOCKS.PARAGRAPH,(function(e,t){return a().createElement("p",{className:i+"__p"},t)})),E(r,l.BLOCKS.UL_LIST,(function(e,t){return a().createElement("ul",{className:i+"__ul"},t)})),E(r,l.BLOCKS.LIST_ITEM,(function(e,t){return a().createElement("li",{className:i+"__ul__li"},t)})),E(r,l.INLINES.EMBEDDED_ENTRY,(function(e){var t=e.data.target,r=t.fields.title;return a().createElement(s.ZP,{to:t,className:i+"__link"},a().createElement(y,{text:r,replacements:d}))})),E(r,l.INLINES.HYPERLINK,(function(e){var t=e.data.uri,r=e.content[0].value;return a().createElement(s.ZP,{to:t,className:i+"__link"},a().createElement(y,{text:r,replacements:d}))})),r),renderText:function(e){return a().createElement(y,{text:e,replacements:d})}};return a().createElement("div",{className:m},(0,c.h)(o,p))}h.propTypes={body:i().shape({}).isRequired,rootClass:i().string,replacements:i().shape({}),blockStyle:i().string,blockTheme:i().string},h.defaultProps={rootClass:"rich-text",replacements:{},blockStyle:null,blockTheme:null};const v=h},33242:(e,t,r)=>{r.d(t,{ZP:()=>P});var n=r(32747),a=r.n(n),o=r(14890),i=r(45697),l=r.n(i),c=r(23930),s=r.n(c),u=r(43861),d=r(62654),m=r(98516),p=r(69223),f=r(3558),g=r(21262),b=r(76549),y=r(9270),E=r(69666),h=r(90602),v=r(62065);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}var N="element-cta",C=function(e){var t=e.classModifier,r=e.ctaListTheme,n=e.data,o=e.locationId,i=e.noWrap,l=e.customData,c=e.redirectToLoginPage,s=e.setPickupLocation,b=e.showTimeslotSelectorModal,y=e.toggleWidget,C=e.toggleWidgetFromCTA,P=e.customRowData,S=e.showPCXPassSubscriptionModal,O=e.isLoggedIn;if(!n.id)return null;var R=n.fields,A=R.linkUrl,k=R.linkAction,T=R.linkActionProps,w=R.isLinkExternal,I=R.style,L=R.label,D=R.analyticsTagValue,Z=R.includeChevron,G=R.buttonSize,B=w?"_blank":null,M=I||r||"black",q=i?"no-wrap":null,x=[t,(0,m.cb)({prefix:"ctalist",type:"style",value:M}),(0,m.cb)({type:"size",value:G}),(0,m.Oh)(l,"customClassModifier")],U=(0,m.Oh)(l,"headlineStyles"),j=function(e){k&&e.preventDefault();var t=(0,p.Nc)(T);switch(k){case"redirectToCreateAnAccount":return c(e,null,"register");case"redirectToLogin":return c();case"launchTimeslotSelector":return b(o);case"startAnOrderWidget":return y();case"startADeliveryOrderWidget":return C(E.m.COURIER);case"setPickupLocation":return s(t,e.target);case"openPCXPassSignupModal":return(0,g.H)(O,c,S);default:return null}},H=a().createElement("span",{className:(0,d.lR)(N+"__text",q)},L),F=Z&&a().createElement(u.Z,{role:"presentation",focusable:"false",className:N+"__icon",style:{fontSize:21}}),K=D?"contentfulCTAButton":null,V=D?"cta-"+D:null;return k||!A?a().createElement("button",{id:n.id,className:(0,d.lR)(N,x),onClick:j,"data-track":K,"data-track-link-name":V,"data-cruller":V,style:U},H,F):a().createElement(f.ZP,{id:n.id,to:A,className:(0,d.lR)(N,x),target:B,"data-track":K,"data-track-link-name":V,"data-cruller":V,style:U,onClick:function(){var e=L.replace(/\s/g,"-").toLowerCase();(0,h.OE)({customData:_({},P,l,{creative_id:e}),userEventName:v.SP.TRACK_EVENT.AD_CLICK})}},H,F)};C.propTypes={classModifier:l().oneOfType([l().array,l().string]),ctaListTheme:l().string,data:s().record.isRequired,textColor:l().string,backgroundColor:l().string,redirectToLoginPage:l().func.isRequired,setPickupLocation:l().func.isRequired,showTimeslotSelectorModal:l().func.isRequired,deliveryUrl:l().string.isRequired,locationId:l().string,toggleWidget:l().func.isRequired,toggleWidgetFromCTA:l().func.isRequired,showPCXPassSubscriptionModal:l().func.isRequired,noWrap:l().bool,customData:l().object,customRowData:l().object},C.defaultProps={classModifier:null,ctaListTheme:null,textColor:null,backgroundColor:null,locationId:null,noWrap:!1,customData:null,customRowData:null};const P=(0,o.qC)(b.Z,y.Z)(C)},97478:(e,t,r)=>{r.d(t,{ZP:()=>g});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(62654),u=r(98516),d=r(10783);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(e){var t=e.ctaList,r=e.ctaListTheme,n=e.classModifiers,o=e.textAlignment,i=e.customData,l=e.customRowData;if(!t.size)return null;var c=t.map((function(e,t){return a().createElement(d.Z,{key:e.id+"-"+t,data:e,ctaListTheme:r,customData:i||e.fields.customData,classModifier:n,customRowData:l})})),m=(0,u.cb)({prefix:"block",type:"text-alignment",value:o}),f=n&&n.length?p(n).concat([m]):m;return a().createElement("div",{className:(0,s.lR)("element-cta-list",f)},c)};f.propTypes={ctaList:c().list.isRequired,ctaListTheme:i().string,classModifiers:i().array,textAlignment:i().string,customData:i().object,customRowData:i().object},f.defaultProps={ctaListTheme:null,classModifiers:null,textAlignment:null,customData:null,customRowData:null};const g=f},94474:(e,t,r)=>{r.d(t,{ZP:()=>O});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(76870),u=r(76341),d=r(24155),m=r(3558),p=r(51812),f=r(18835),g=r(95235),b=r(14378),y=r(62939);function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}var h="flyers-header",v=h+"__header",_=v+"__info",N=h+"__location",C=N+"__info",P=N+"__actions",S=function(e){function t(){return e.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props,t=e.location,r=e.getLocationDetails;t.id&&t.needsReload(g.o2.Details)&&r({locationId:t.id})},r.componentDidUpdate=function(e){var t=this.props,r=t.location,n=t.getLocationDetails;r.id!==e.location.id&&r.needsReload(g.o2.Details)&&n({locationId:r.id})},r.render=function(){var e=this.props,t=e.location,r=e.isPCXOrderDelivery,n=e.postalCode,o=e.currentUrl,i=t.address,l=t.storeDetails,c=t.timeZone,s=l&&l.storeHours||void 0,E="/flyers/locations?query="+t.address.postalCode+"&redirect="+o,S=t.isLoaded(g.o2.Details);return t.id||S?a().createElement("div",{className:h},a().createElement("div",{className:v},a().createElement("div",{className:_+"__title"},a().createElement(u.Z,{id:"cnc.page.flyersAndDeals.header"}))),a().createElement("div",{className:N},a().createElement("div",{className:C},a().createElement(d.Z,{className:C+"__icon",fontSize:"default"}),a().createElement("div",{className:C+"__name"},r?a().createElement(u.Z,{id:"cnc.page.flyersAndDeals.locationInfo.name.delivery",values:{postalCode:n}}):t.name),a().createElement("div",{className:C+"__address"},r?a().createElement(u.Z,{id:"cnc.page.flyersAndDeals.locationInfo.description.delivery"}):a().createElement(p.Z,{address:i,classModifier:h,isOneLine:!0})),s&&s.size?a().createElement(b.ZP,{storeHours:s,timeZone:c}):null),a().createElement("div",{className:P},r?a().createElement(m.ZP,{to:"/flyers/locations?query="+n+"&redirect="+o,className:P+"__link"},a().createElement(u.Z,{id:"cnc.page.flyersAndDeals.locationActions.viewNearbyStoreFlyers.link"})):a().createElement(y.Z,{location:t,classModifier:h,changeLocationUrl:E})))):a().createElement(f.Z,{type:"spinner"})},t}(s.ZP);S.propTypes={location:c().record.isRequired,isPCXOrderDelivery:i().bool.isRequired,postalCode:i().string,currentUrl:i().string.isRequired,getLocationDetails:i().func.isRequired};const O=S},53239:(e,t,r)=>{r.d(t,{ZP:()=>x});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(76870),u=r(57336),d=r(78494),m=r(38740),p=r(45548);const f=JSON.parse('[{"code":"dominion","label":{"en":"Dominion","fr":"Dominion"},"value":"DOMINION"},{"code":"extrafoods","label":{"en":"Extra Foods","fr":"Extra Foods"},"value":"EXTRA_FOODS"},{"code":"fortinos","label":{"en":"Fortinos","fr":"Fortinos"},"value":"FORTINOS"},{"code":"independent","label":{"en":"Your Independent Grocer","fr":"Your Independent Grocer"},"value":"YOUR_INDEPENDENT_GROCER"},{"code":"independentcitymarket","label":{"en":"Independent City Market","fr":"Independent City Market"},"value":"INDEPENDENT_CITY_MARKET"},{"code":"liquorstore","label":{"en":"Liquorstore","fr":"Liquorstore"},"value":"LIQUORSTORE"},{"code":"loblaw","label":{"en":"Loblaws","fr":"Loblaws"},"value":"LOBLAWS"},{"code":"maxi","label":{"en":"Maxi","fr":"Maxi"},"value":"MAXI"},{"code":"maxi","label":{"en":"Maxi & cie","fr":"Maxi et cie"},"value":"MAXI_AND_CIE"},{"code":"nofrills","label":{"en":"No Frills","fr":"No Frills"},"value":"NO_FRILLS"},{"code":"provigo","label":{"en":"Provigo","fr":"Provigo"},"value":"PROVIGO"},{"code":"rass","label":{"en":"Atlantic Superstore","fr":"Atlantic Superstore"},"value":"ATLANTIC_SUPERSTORE"},{"code":"superstore","label":{"en":"Real Canadian Superstore","fr":"Real Canadian Superstore"},"value":"REAL_CANADIAN_SUPERSTORE"},{"code":"valumart","label":{"en":"Valu Mart","fr":"Valu Mart"},"value":"VALU_MART"},{"code":"wholesaleclub","label":{"en":"Wholesale Club","fr":"Wholesale Club"},"value":"WHOLESALE_CLUB"},{"code":"zehrs","label":{"en":"Zehrs","fr":"Zehrs"},"value":"ZEHRS"}]');var g=r(3558),b=r(18835),y=r(6705),E=r(68102),h=r(77252),v=r(18046),_=r(34452),N=r(76341),C=r(30281),P=r(10270),S=r(17160),O=r(71355),R=r(39385),A="digital-flyer-subscriptions-form-success-message",k=A+"__title",T=A+"__content";const w=(0,R.M)((function(){return a().createElement("div",{className:A,"data-cruller":"digital-flyer-subscriptions-form-success-message"},a().createElement("h1",{className:k},a().createElement(O.Z,{style:{fontSize:"4rem",display:"block"},className:k+"__icon"}),a().createElement(N.Z,{id:"cnc.flyers.subscription.success.title"})),a().createElement("div",{className:T},a().createElement(g.ZP,{to:"/print-flyer",className:T+"__link"},a().createElement(N.Z,{id:"cnc.flyers.subscription.success.link"}))))}));var I=r(87173);function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e,t){return D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},D(e,t)}var Z="digital-flyer-subscriptions-form",G=Z+"__form",B=G+"__confirm-opt-in",M=G+"__footer",q=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={success:!1,error:!1},r.handleSubmit=r.handleSubmit.bind(L(r)),r.handleClick=r.handleClick.bind(L(r)),r.getProvinceOptions=r.getProvinceOptions.bind(L(r)),r.getBannerOptions=r.getBannerOptions.bind(L(r)),r.getLanguageOptions=r.getLanguageOptions.bind(L(r)),r.handleTrack=r.handleTrack.bind(L(r)),r}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props,t=e.isLocationListLoaded,r=e.getAllLocations;t||r()},r.getLanguageOptions=function(){var e=this.props.availableLanguages;return e.size>0?e.toArray().map((function(e){return{label:e.name,value:e.code.toUpperCase()}})):[{label:"English",value:"EN"}]},r.getProvinceOptions=function(){var e=this.props,t=e.language,r=e.availableProvinces;return p[t].filter((function(e){return r.includes(e.name)||r.includes(e.code)})).map((function(e){return{value:e.code,label:e.name}}))},r.getBannerOptions=function(){var e=this.props,t=e.banner,r=e.language;return(t?f.filter((function(e){return e.code===t})):f).map((function(e){return{label:e.label[r],value:e.value}}))},r.handleTrack=function(e){(0,P.j)("signupCtaButton",null,{event:{property:e,action:"subscribe",category:"newsletter",location:"flyer",detail:"flyer|signup-form-cta-button"}})},r.handleSubmitSuccess=function(e,t){if(t.setSubmitting(!1),204===e.status)return this.setState({success:!0,error:!1}),void this.handleTrack("success");this.setState({error:!0}),this.handleTrack("failure")},r.handleSubmitError=function(e){e.setSubmitting(!1),this.setState({error:!0}),this.handleTrack("failure")},r.handleClick=function(e){e||this.handleTrack("failure")},r.handleSubmit=function(e,t){var r=this,n=this.props,a=n.env,o=n.updateCustomerPreferences,i=n.isLoggedIn,l=n.customer,c=new Promise((function(t,r){if(i&&l.preferences.isLoaded()&&l.preferences.phoneNumber)try{t(o({dealsAndNewsSubscriptionStatus:!0,dealsAndNewsEmail:e.email}))}catch(e){r(),console.error("Error Occured",e)}t()})),s=new Promise((function(n){(0,S.c7)(e,a).then((function(e){n(e)})).catch((function(){r.handleSubmitError(t)}))}));Promise.all([s,c]).then((function(e){return r.handleSubmitSuccess(e[0],t)})).catch((function(){return r.handleSubmitError(t)}))},r.renderLoblawLink=function(){return a().createElement(g.ZP,{to:"https://www.loblaw.ca",className:B+"__link"},a().createElement(N.Z,{id:"cnc.flyers.subscription.formfield.label.confirmOptIn.link"}))},r.renderPrivacyPolicyLink=function(){var e=this.props.language,t=I.MW.b.replace("{currentLanguage}",e);return a().createElement(g.ZP,{to:t,className:B+"__link"},a().createElement(N.Z,{id:"cnc.page.privacyPolicy"}))},r.render=function(){var e=this,t=this.props,r=t.intl,n=t.language,o=t.region,i=t.isLocationListLoaded,l=this.state,c=l.success,s=l.error,d=this.getBannerOptions(),p=d[0].value,f=this.getProvinceOptions(),P=f.find((function(e){return e.label===o})),S=r.formatMessage({id:"cnc.flyers.subscription.formfield.defaultValue.province"}),O=this.getLanguageOptions();return i?c?a().createElement(w,null):a().createElement("div",{className:Z,"data-cruller":"digital-flyer-subscriptions-form"},s&&a().createElement(_.Z,{showGlobalError:!0,className:Z+"__error",errors:{error:"cnc.forms.error.message.serverRecord"},icon:m.Z}),a().createElement(u.J9,{onSubmit:function(t,r){return e.handleSubmit(t,r)},validateOnBlur:!1,initialValues:{preferredName:"",familyName:"",province:P?P.value:"",banner:p,language:n.toUpperCase(),email:"",optInStatus:!1}},(function(t){var r=t.isSubmitting,o=t.dirty,i=t.isValid;return a().createElement(y.Z,{className:G,focusonfirstfield:"false"},a().createElement(E.ZP,{name:"preferredName",type:"text",className:G+"__preferred-name",label:"cnc.flyers.subscription.formfield.label.preferredName",validate:function(e){return(0,C.Gh)(e,[{name:"toBeAValidFirstName"}])}}),a().createElement(E.ZP,{name:"familyName",type:"text",className:G+"__family-name",label:"cnc.flyers.subscription.formfield.label.familyName",validate:function(e){return(0,C.Gh)(e,[{name:"toBeAValidLastName"}])}}),a().createElement(v.Z,{label:"cnc.flyers.subscription.formfield.label.province",className:G+"__province",name:"province",validate:function(e){return(0,C.Gh)(e,[{name:"toBeRequiredInformation"}])},options:f,defaultOption:{value:"",label:S},selected:P?P.value:""}),a().createElement(v.Z,{label:"cnc.flyers.subscription.formfield.label.banner",className:G+"__banner",name:"banner",validate:function(e){return(0,C.Gh)(e,[{name:"toBeRequiredInformation"}])},options:d,selected:p,disabled:d.length<2}),a().createElement(v.Z,{label:"cnc.flyers.subscription.formfield.label.language",className:G+"__language",name:"language",validate:function(e){return(0,C.Gh)(e,[{name:"toBeRequiredInformation"}])},options:O,selected:n.toUpperCase(),disabled:O.length<2}),a().createElement(E.ZP,{name:"email",type:"text",className:G+"__email",label:"cnc.flyers.subscription.formfield.label.email",validate:function(e){return(0,C.Gh)(e,[{name:"toBeRequiredInformation"},{name:"toBeAnEmail"}])},required:!0}),a().createElement(E.ZP,{className:B,label:"cnc.flyers.subscription.formfield.label.confirmOptIn",name:"optInStatus",type:"checkbox",values:{loblaws:e.renderLoblawLink(),privacyPolicy:e.renderPrivacyPolicyLink()},validate:function(e){return(0,C.Gh)(e,[{name:"toBeChecked",error:"cnc.forms.error.message.confirmOptInRequired"}])}}),a().createElement(h.Z,{type:"submit",display:"block",theme:"dark",submitting:r,classModifier:"submit-btn",className:G+"__submit",dirty:o,onClick:function(){return e.handleClick(i)}},a().createElement(N.Z,{id:"cnc.flyers.subscription.formfield.button.submit"})),a().createElement("p",{className:M},a().createElement(N.Z,{id:"cnc.flyers.subscription.formfield.footer"}),a().createElement(g.ZP,{to:"/",className:M+"__link"},"www.loblaws.ca")))}))):a().createElement(b.Z,{type:"spinner",className:Z+"__loading"})},t}(s.ZP);q.propTypes={intl:i().object.isRequired,env:i().string.isRequired,language:i().string.isRequired,availableLanguages:c().list.isRequired,availableProvinces:i().array.isRequired,banner:i().string.isRequired,isLocationListLoaded:i().bool.isRequired,region:i().string,getAllLocations:i().func.isRequired,updateCustomerPreferences:i().func.isRequired,isLoggedIn:i().bool.isRequired,customer:i().object.isRequired},q.defaultProps={region:null};const x=(0,d.ZP)(q)},46767:(e,t,r)=>{r.d(t,{ZP:()=>S});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(23930),c=r.n(l),s=r(76870),u=r(76341),d=r(6865),m=r(41959),p=r(62654),f=r(66489),g=r(10270),b=r(3558),y=r(18835),E=r(10349);function h(e,t,r,n,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,a)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function _(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var N="location-pickup-confirmation",C=N+"__actions",P=function(e){function t(t){var r;return(r=e.call(this,t)||this).handleClick=r.handleClick.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,e);var r=t.prototype;return r.handleClick=function(){var e,t=this;return(e=function(){var e,r,n,a,o,i,l,c,s,u,m,p,f;return _(this,(function(b){switch(b.label){case 0:return e=t.props,r=e.hasCartEntries,n=e.location,a=n.id,o=n.locationType,i=n.storeId,l=e.customerLocationId,c=e.showCartMergeErrorModal,s=e.updateBooking,u=e.validateBooking,m=l===a,f=(p="STORE"===o)&&!l?"storeLocatorShopNowButton":"storeLocatorShopNowResetButton",p||l?p||m||(f="storeLocatorPickUpHereResetButton"):f="storeLocatorPickUpHereButton",(0,g.j)(f,null,{"pickup-store":i}),r?[4,u({pickupLocationId:a})]:(s({pickupLocationId:a}),[2]);case 1:return b.sent()?(s({pickupLocationId:a}),[2]):(c({type:d.CART_MERGE_TYPE_PICKUP_LOCATION_CHANGE,onConfirm:function(){s({pickupLocationId:a})}}),[2])}}))},function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){h(o,n,a,i,l,"next",e)}function l(e){h(o,n,a,i,l,"throw",e)}i(void 0)}))})()},r.render=function(){var e=this.props,t=e.location,r=e.customerLocationId,n=e.isLocationUpdating,o=e.urlPathName,i=e.classModifier,l=e.changeLocationUrl,c=r===t.id,s=c?"confirmed":"unconfirmed";return n?a().createElement(y.Z,{type:"spinner",className:N+"__loading"}):a().createElement("div",{className:(0,p.lR)(N,[s,i])},((0,f.MR)(o)||!c)&&a().createElement("div",{className:N+"__title"},c&&a().createElement(m.Z,{className:N+"__title__icon",style:{fontSize:18}}),a().createElement(u.Z,{id:"cnc.storeLocator.pickup.confirmation.title."+s,values:{locationName:t.name}})),a().createElement("div",{className:C},!c&&a().createElement("button",{className:C+"__set-store",onClick:this.handleClick},a().createElement(u.Z,{id:"cnc.storeLocator.pickup.confirmation.setStore"})),c&&!(0,f.MR)(o)&&a().createElement(b.ZP,{to:"/store-locator/details/"+t.id,className:C+"__location-details"},a().createElement(u.Z,{id:"cnc.storeLocator.pickup.confirmation.locationDetails"})),a().createElement(E.Z,{className:C+"__change-store",to:l},a().createElement(u.Z,{id:"cnc.storeLocator.pickup.confirmation.changeStore."+s}))))},t}(s.ZP);P.propTypes={classModifier:i().string,customerLocationId:i().string,urlPathName:i().string.isRequired,location:c().record.isRequired,isLocationUpdating:i().bool.isRequired,hasCartEntries:i().bool.isRequired,showCartMergeErrorModal:i().func.isRequired,updateBooking:i().func.isRequired,validateBooking:i().func.isRequired,changeLocationUrl:i().string},P.defaultProps={customerLocationId:void 0,classModifier:null,changeLocationUrl:"/store-locator"};const S=P},40535:(e,t,r)=>{r.d(t,{ZP:()=>E});var n=r(32747),a=r.n(n),o=r(45697),i=r.n(o),l=r(76341),c=r(69666),s=r(62654),u=r(75083),d=r(3558),m=r(64519),p=r(69223),f="switch-fulfillment-mode-button",g=f+"__text",b=f+"__subtext",y=function(e){var t=e.isFFDeliveryEnabled,r=e.hasTopBorder,n=e.fulfillmentMode,o=e.handleClick,i=e.analyticsLinkName,y=e.analyticsComponentName,E=e.instacartDeliveryUrl,h=e.alignment,v=e.classModifiers,_=e.isRapidBanner,N=e.isFulfillmentAsAServiceEnabled,C=e.isLoblawBanner;if(_)return null;if(N&&!C)return null;var P=r?"top-border":null,S=(0,u.pf)(n)?c.m.PICKUP:c.m.COURIER,O=[P,h,v];return a().createElement("div",{className:(0,s.lR)(f,O)},t?a().createElement("button",{className:g,onClick:function(){return o(S)},"data-track":"fulfillmentModeSwitchButton","data-cruller":"switch-fulfillment-mode","data-track-link-name":i,"data-track-component-name":y},a().createElement(m.Z,{className:g+"__icon"}),a().createElement(l.Z,{id:"cnc.fulfillment.switch."+(0,p.bc)(S)})):a().createElement(a().Fragment,null,a().createElement(d.ZP,{className:g,to:E,"data-track":"fulfillmentModeSwitchButton","data-cruller":"switch-fulfillment-mode","data-track-link-name":"switch-to-delivery-powered-by-instacart","data-track-component-name":y,target:"_blank",rel:"noopener noreferrer"},a().createElement(m.Z,{className:g+"__icon"}),a().createElement(l.Z,{id:"cnc.fulfillment.switch.delivery"})),a().createElement("p",{className:b},a().createElement(l.Z,{id:"cnc.homePage.delivery.button.subtext"}))))};y.propTypes={fulfillmentMode:i().oneOf(["COURIER","PICKUP"]).isRequired,handleClick:i().func,isFFDeliveryEnabled:i().bool,hasTopBorder:i().bool,analyticsLinkName:i().string,instacartDeliveryUrl:i().string.isRequired,alignment:i().string,analyticsComponentName:i().string,classModifiers:i().oneOfType([i().string,i().array]),isRapidBanner:i().bool.isRequired,isFulfillmentAsAServiceEnabled:i().bool.isRequired},y.defaultPropTypes={isInstacart:!1,hasTopBorder:!1,handleClick:function(){},analyticsLinkName:null,analyticsComponentName:null,alignment:null,classModifiers:null};const E=y},72421:e=>{e.exports=JSON.parse('{"production":{"url":"//api.pcoptimum.ca/loyalty/v3/inquiry/anon/flyers","apiKey":"1JieazqsGLxLLuA6m0ECCLJxTAKi3N69"},"development":{"url":"//api-uat.pcoptimum.ca/loyalty/v3/inquiry/anon/flyers","apiKey":"JA7wA4as2GdBsAX4UPMhwmW1LtD764Mo"},"staging":{"url":"//api-uat.pcoptimum.ca/loyalty/v3/inquiry/anon/flyers","apiKey":"JA7wA4as2GdBsAX4UPMhwmW1LtD764Mo"},"lower":{"url":"//api-uat.pcoptimum.ca/loyalty/v3/inquiry/anon/flyers","apiKey":"JA7wA4as2GdBsAX4UPMhwmW1LtD764Mo"}}')},93876:e=>{e.exports=JSON.parse('{"AB":"/ContentMedia/lsl/store/instore/pharmacy/ablogo.gif","BC":"/ContentMedia/lsl/store/instore/pharmacy/bclogo.gif","MB":"/ContentMedia/lsl/store/instore/pharmacy/mblogo.gif","NB":"/ContentMedia/lsl/store/instore/pharmacy/nblogo.gif","NL":"/ContentMedia/lsl/store/instore/pharmacy/nflogo.gif","NT":"/ContentMedia/lsl/store/instore/pharmacy/ntlogo.gif","NS":"/ContentMedia/lsl/store/instore/pharmacy/nslogo.gif","NU":"","ON":"/ContentMedia/lsl/store/instore/pharmacy/wklogo.gif","PE":"/ContentMedia/lsl/store/instore/pharmacy/pelogo.gif","QC":"/ContentMedia/lsl/store/instore/pharmacy/qclogo.gif","SK":"/ContentMedia/lsl/store/instore/pharmacy/sklogo.gif","YT":""}')},45548:e=>{e.exports=JSON.parse('{"en":[{"name":"Alberta","code":"AB"},{"name":"British Columbia","code":"BC"},{"name":"Manitoba","code":"MB"},{"name":"New Brunswick","code":"NB"},{"name":"Newfoundland and Labrador","code":"NL"},{"name":"Northwest Territories","code":"NT"},{"name":"Nova Scotia","code":"NS"},{"name":"Nunavut","code":"NU"},{"name":"Ontario","code":"ON"},{"name":"Prince Edward Island","code":"PE"},{"name":"Quebec","code":"QC"},{"name":"Saskatchewan","code":"SK"},{"name":"Yukon","code":"YT"}],"fr":[{"name":"Alberta","code":"AB"},{"name":"Colombie-Britannique","code":"BC"},{"name":"Manitoba","code":"MB"},{"name":"Nouveau-Brunswick","code":"NB"},{"name":"Terre-Neuve et Labr.","code":"NL"},{"name":"Terr. du Nord-Ouest","code":"NT"},{"name":"Nouvelle-Écosse","code":"NS"},{"name":"Nunavut","code":"NU"},{"name":"Ontario","code":"ON"},{"name":"Île-du-Prince-Édouard","code":"PE"},{"name":"Québec","code":"QC"},{"name":"Saskatchewan","code":"SK"},{"name":"Yukon","code":"YT"}]}')}}]);