@roomstay/frontend 2.6.38 → 2.6.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[288],{12288:function(e,t,n){n.r(t),n.d(t,{default:function(){return ve}});var l=n(56500),a=n(67294),o=n(26793),r=n(89250),i=n(79655),s=n(79478),c=n(13821),m=n(13010),u=n(46409),d=n(19874),g=n(42982),v=n(89331),E=n(7832),p=n(54101),f=n(72258),h=n(39136),C=n(60281),y=n(84544),Z=n(90292),w=n(67023),R=n(70885),S=n(64854),N=n(20858),x=n(78886),P=n(33409),I=n(30584),b=n(78361),k=n(73633),M=n(44744),A=n(97754),D=n(40291),W=n(32458),B=n(98013);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}var O=function(e){var t=e.room,n=(0,a.useState)([]),r=(0,R.Z)(n,2),i=r[0],c=r[1],u=(0,a.useState)([]),d=(0,R.Z)(u,2),g=d[0],E=d[1],p=(0,a.useState)(!1),f=(0,R.Z)(p,2),h=f[0],C=f[1],w=a.useContext(l.g7),O=(0,a.useContext)(l.hy),_=(0,v.WP)().hotel,F=(0,o.$)().t;(0,a.useEffect)((function(){var e=[],n=[];if(k.Z.isActive()){var l,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var l=0,a=function(){};return{s:a,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){i=!0,o=e},f:function(){try{r||null==n.return||n.return()}finally{if(i)throw o}}}}(t.getRates());try{for(a.s();!(l=a.n()).done;){var o,r,i,s=l.value;(null===(o=s.promoCode)||void 0===o?void 0:o.toLowerCase())===(null===(r=O.selectedBasketRow)||void 0===r||null===(i=r.getPromoCode())||void 0===i?void 0:i.toLowerCase())?n.unshift(s):e.push(s)}}catch(e){a.e(e)}finally{a.f()}n.length>0&&c(n)}else e=t.getRates();E(e)}),[t.getRates()]);var G=t.getShortDescription(),L=w.screenSize<=Z.Z.Large,U=Math.round(t.getLowestPrice(!1,!0)),j=w.screenSize>Z.Z.Medium&&U.toLocaleString().length<7?"large":"normal";return a.createElement("div",{className:"room-details-container --theme-retargeting u-marg-top u-marg-bottom"},a.createElement("div",{className:"room-details"},a.createElement("div",{className:"room-details--image"},a.createElement(D.Z,{images:t.getImages(),imageSize:M.h.Medium})),a.createElement("div",{className:"room-details--content u-pad--heavy u-pad@l-"},a.createElement("div",{className:"u-marg-bottom"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(P.ZP,{type:P.Rm.Primary,icon:x.Tu.Add},F(s.W.Step.Room.YouBookedThisRoomRecently))),a.createElement("div",{className:"room-details--content-title u-marg-bottom--light"},a.createElement(m.Z,{bold:!0},t.name)),a.createElement(B.R,{room:t,textColor:A.Il.Navy}),a.createElement("div",{className:"room-details--content-description u-marg-bottom--light"},a.createElement(I.ZP,{color:A.Il.Navy,type:I.yG.Small},a.createElement("span",{dangerouslySetInnerHTML:{__html:(null==G?void 0:G.replace(/<br(\/|)>/g,""))||""}})))),a.createElement("div",{className:"row"},a.createElement("div",{className:"col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start"},a.createElement("div",{className:"room-details--content-perks u-marg-bottom@m-"},L&&a.createElement("div",{className:"u-marg-bottom"},a.createElement(I.ZP,{type:I.yG.Small,bold:!0,color:A.Il.Accent},(null==_?void 0:_.perkTitle)||F(s.W.Misc.Perks.AndYouGetAll))))),a.createElement("div",{className:"col-md-6 u-flex justify-content-end flex-column align-items-start align-items-md-end"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.Navy,inline:!0},F(s.W.Misc.From)),a.createElement("div",{className:"room-details--content-price flex-row align-items-end"},a.createElement(m.Z,{size:j,bold:!0},a.createElement(N.Z,{hideDecimals:!0},U)),a.createElement(I.ZP,{color:A.Il.Navy,inline:!0},"/",F(s.W.Misc.Night))),a.createElement("div",{className:"u-marg-bottom"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.Navy,className:"u-nowrap"},a.createElement("span",{dangerouslySetInnerHTML:{__html:t.getLowestPriceType()===b.I.IncludingFeesAndTaxes?F(s.W.Step.Room.RoomInfo.IncludesTaxes):F(s.W.Step.Room.ExcludingTaxes)}}))),a.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@m-"},a.createElement(S.Z,{name:"ViewRatesNowButton",primary:!0,filled:!0,stopIconAnimation:!0,iconPosition:"right",wide:w.screenSize<=Z.Z.Large,onClick:function(){y.ZP.instance.sendInteraction("More Room Details",y.s_.LINK,y._J.ROOMS),C(!0)}},F(s.W.Step.Room.RoomInfo.ViewRates))))))),a.createElement(W.Z,{open:h,room:e.room,rates:g,featuredRates:i,onClose:function(){C(!1)}}))},_=n(94184),F=n.n(_),G=n(42530),L=n(89089),U=n(65986),j=n(25112),z=n(63351),V=n(95494),J=n(43261);function Y(e){(0,v.WP)().hotel;var t,n,l,r,i=(0,(0,V.X)().getMaxSelectableAdults)({adults:null===(t=e.row)||void 0===t?void 0:t.getAdults(),children:null===(n=e.row)||void 0===n?void 0:n.getChildren()}),c=(0,o.$)().t,m=null!==(l=null===(r=e.row)||void 0===r?void 0:r.getAdults())&&void 0!==l?l:1;return a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(i)).map((function(e,t){return t+=1,{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Adult,c),value:t.toString()}})),value:null==m?void 0:m.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function $(e){var t,n,l,r=(0,v.WP)().hotel,i=(0,o.$)().t,c=null!==(t=null===(n=e.row)||void 0===n?void 0:n.getChildren())&&void 0!==t?t:1,m=Math.max((null==r?void 0:r.maxOccupancy)+1-(null===(l=e.row)||void 0===l?void 0:l.getAdults()));return(m<1||isNaN(m))&&(m=1),a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(m)).map((function(e,t){return{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Child,i),value:t.toString()}})),value:null==c?void 0:c.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function H(e){var t,n,l,r=(0,v.WP)().hotel,i=(0,o.$)().t,c=null!==(t=null===(n=e.row)||void 0===n?void 0:n.getInfants())&&void 0!==t?t:1,m=Math.max((null==r?void 0:r.maxOccupancy)+1-(null===(l=e.row)||void 0===l?void 0:l.getAdults()));return(m<1||isNaN(m))&&(m=1),a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(m)).map((function(e,t){return{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Infant,i),value:t.toString()}})),value:null==c?void 0:c.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function K(e){var t,n,r,i,c,m=(0,a.useContext)(l.hy),u=(0,a.useContext)(l.g7),d=(0,v.WP)().hotel,g=(0,V.X)().showChildren,E=(0,o.$)().t,p=(0,a.useState)(!1),f=(0,R.Z)(p,2),h=f[0],C=f[1],w=e.row,N=(0,a.useMemo)((function(){var e;return m.selectedBasketRow&&(null===(e=m.selectedBasketRow)||void 0===e?void 0:e.getID())===(null==w?void 0:w.getID())}),[m.selectedBasketRow,null===(t=m.selectedBasketRow)||void 0===t?void 0:t.getID(),null==w?void 0:w.getID()]),b=F()("room-builder-progress--item",{"--current":N,"--complete":w.isValid()}),k=(0,a.useRef)(null),M=(0,a.useState)(!1),D=(0,R.Z)(M,2),W=D[0],B=D[1];(0,a.useEffect)((function(){h&&!N&&C(!1)}),[m.selectBasketRow]);var T,O=function(e){var t=e.adults,n=e.children,l=e.infants,a=e.updatedPromoCode;t&&t!==w.getAdults()&&(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setAdults(t)),!n&&0!==n||n===w.getChildren()||(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setChildren(n)),!l&&0!==l||l===w.getInfants()||(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setInfants(l)),!a&&""!==a||a===w.getPromoCode()||(y.ZP.instance.sendInteraction("Promo Code",y.s_.FORM_FIELD,y._J.ROOMS),w.setPromoCode(a)),m.updateBasketRow(w)},_=m.currentBasketRows.length>1,z=a.createElement("div",{className:"room-builder-progress--remove"},a.createElement(j.Z,{title:_?"Remove this room":"Cannot remove this room as at least one must be selected."},a.createElement(S.Z,{isText:!0,icon:x.Tu.Close,iconPosition:"right",stopIconAnimation:!0,disabled:!_,onClick:function(){y.ZP.instance.sendInteraction("Remove Room",y.s_.BUTTON,y._J.ROOMS),m.removeBasketRow(w)}}))),K=u.screenSize>Z.Z.ExtraLarge,X=K||N,q=(0,a.useMemo)((function(){return 1!==m.currentBasketRows.length?e.number+1:""}),[m.currentBasketRows.length,e.number]);T="new"===w.getPromoCodeStatus()?w.getPromoCode()?E(s.W.Step.Date.PromoCodeTooltip.Checking):E(s.W.Step.Date.PromoCodeTooltip.NoValue):"valid"===w.getPromoCodeStatus()?E(s.W.Step.Date.PromoCodeTooltip.Valid):E(s.W.Step.Date.PromoCodeTooltip.Invalid);var Q=w.getPromoCode(null==d?void 0:d.memberOnlyPromoCode);return a.createElement("div",{className:b},N||!w.isValid()?a.createElement("div",{className:"u-flex w-100"},a.createElement("div",{className:"u-flex flex-wrap flex-xl-nowrap flex-row u-w-100@xl- align-items-center"},a.createElement("div",null,w.isValid()?a.createElement(I.ZP,null,a.createElement("strong",{className:"u-nowrap"},E(s.W.Step.Room.EditingRoom)," ",q)):a.createElement(I.ZP,null,a.createElement("strong",{className:"u-nowrap"},E(s.W.Step.Room.SelectRoom)," ",q))),X?a.createElement(a.Fragment,null,!K&&a.createElement("div",{className:"w-100 d-flex"+(X?" u-marg-bottom@xl-":"")},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.DarkGrey,inline:!0},E(s.W.Step.Room.ChooseRoomBelow))),a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateAdults),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement(Y,{row:w,onChange:function(e){O({adults:+e})}}))),g?a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateChildren),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement($,{row:w,onChange:function(e){O({children:+e})}}))):null,null!=d&&null!==(n=d.childConfiguration)&&void 0!==n&&n.supportInfants?a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateInfants),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement(H,{row:w,onChange:function(e){O({infants:+e})}}))):null,a.createElement(a.Fragment,null,a.createElement("div",{className:"room-builder-progress--value"},a.createElement(G.Z,{startDate:w.getStartDate(),selectedDateChanged:function(e,t){e&&w.setStartDate(e),t&&w.setEndDate(t),m.updateBasketRow(w)},className:"u-w-100@xl- d-flex align-items-center justify-content-center",isAboveNav:!0},a.createElement(j.Z,{title:E(s.W.Step.Date.SelectArrivalAndDepartureDatesByClickingHere)},a.createElement("div",{className:"u-flex align-items-center justify-content-center u-w-100@xl- u-cursor-pointer"},a.createElement(I.ZP,{color:A.Il.Accent,bold:!0,className:"u-nowrap"},w.getArrivalDate()),a.createElement(x.ZP,{icon:x.Tu.ArrowRight2}),a.createElement(I.ZP,{color:A.Il.Accent,bold:!0,className:"u-nowrap"},w.getDepartureDate()))))),a.createElement(j.Z,{title:T,wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-cursor-pointer",ref:k,onClick:function(){B(!0)}},a.createElement("div",{className:"u-flex align-items-center justify-content-center u-w-100@xl-"},a.createElement(I.ZP,{className:"u-pad-right--light",type:I.yG.Body,color:Q?w.getPromoCodeColour():A.Il.Navy},Q||E(s.W.Step.Date.PromoCode)),a.createElement(x.ZP,{icon:x.Tu.Dropdown,color:A.Il.DarkGrey}))))),a.createElement(L.a,{open:W,followElement:k.current,onClose:function(){B(!1)}},a.createElement("div",{className:"u-pad--heavy"},a.createElement("div",null,a.createElement(U.Z,{value:Q,onChange:function(e){var t;t=e,y.ZP.instance.sendInteraction("Promo Code",y.s_.FORM_FIELD,y._J.ROOMS),m.selectedBasketRow&&(m.selectedBasketRow.setPromoCode(t),m.selectedBasketRow.setManualInputPromoCode(!!t),m.updateBasketRow(m.selectedBasketRow),t&&B(!1))},valid:"new"!==(null===(r=m.selectedBasketRow)||void 0===r?void 0:r.getPromoCodeStatus())&&Q?"valid"===(null===(i=m.selectedBasketRow)||void 0===i?void 0:i.getPromoCodeStatus()):void 0})),a.createElement("div",{className:"u-flex justify-content-end align-items-center u-marg-top"},a.createElement(S.Z,{isText:!0,size:"small",onClick:function(){y.ZP.instance.sendInteraction("Cancel Promo Popup",y.s_.BUTTON,y._J.ROOMS),B(!1)}},E(s.W.Misc.Cancel))))),!K&&w.isValid()&&a.createElement(S.Z,{wide:!0,primary:!0,filled:!0,onClick:function(){y.ZP.instance.sendInteraction("Save Room Changes",y.s_.BUTTON,y._J.ROOMS),m.selectBasketRow(null),C(!1)}},E(s.W.Misc.Save))):a.createElement("div",{className:"w-100"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.DarkGrey},E(s.W.Step.Room.NextRoom)))),a.createElement("div",{className:"u-flex align-items-center"},w.isValid()&&a.createElement("div",{className:"u-none@xl-"},a.createElement(j.Z,{title:"Cancel changes"},a.createElement("div",{className:"u-flex align-items-center"},a.createElement(S.Z,{isText:!0,size:"tiny",onClick:function(){y.ZP.instance.sendInteraction("Cancel Room Changes",y.s_.LINK,y._J.ROOMS),m.selectBasketRow(null),C(!1)}},E(s.W.Misc.Cancel).toUpperCase())))),z)):a.createElement("div",{className:"u-flex w-100"},a.createElement("div",{className:"u-flex justify-content-start"},a.createElement("div",{className:"u-flex flex-column"},a.createElement("span",null,a.createElement(I.ZP,{inline:K},a.createElement("strong",null,w.getRoom().name)),a.createElement(I.ZP,{inline:K,type:K?I.yG.Body:I.yG.Small},a.createElement("span",{className:"u-marg-left--light@xl"},J.Z.pluralWithDictAndCount(w.getAdults(),s.W.Step.Date.Adult,E),g?a.createElement(a.Fragment,null,", ",J.Z.pluralWithDictAndCount(w.getChildren(),s.W.Step.Date.Child,E)):null,null!=d&&null!==(c=d.childConfiguration)&&void 0!==c&&c.supportInfants?a.createElement(a.Fragment,null,", ",J.Z.pluralWithDictAndCount(w.getInfants(),s.W.Step.Date.Infant,E)):null))),a.createElement(I.ZP,{type:I.yG.Caption,color:A.Il.DarkGrey},a.createElement("strong",null,w.getStayDateRange("ddd, MMM D, YYYY"," -")))),Q&&w.isPromoCodeValid()&&a.createElement("div",{className:"u-marg-left d-flex align-items-center"},a.createElement(P.ZP,{type:P.Rm.Success,icon:x.Tu.Money},Q))),a.createElement("div",{className:"u-flex align-items-center"},a.createElement("div",{className:"u-flex align-items-center room-builder-progress--edit"},a.createElement(j.Z,{title:E(s.W.Step.Room.EditThisRoom)},a.createElement("div",{className:"u-flex align-items-center"},a.createElement(S.Z,{isText:!0,size:"tiny",onClick:function(){y.ZP.instance.sendInteraction("Edit Room",y.s_.LINK,y._J.ROOMS),m.selectBasketRow(w),C(!0)}},E(s.W.Misc.Edit).toUpperCase())))),z)))}var X=n(72870),q=n(32941),Q=n(41092),ee=(0,q.A)(S.Z);function te(){var e=(0,a.useContext)(l.hy),t=e.currentBasketRows,n=e.addBasketRow,r=(e.selectedBasketRow,(0,o.$)().t),i=function(){y.ZP.instance.sendInteraction("Add Room Row",y.s_.BUTTON,y._J.ROOMS),n(new Q.Z)};return(0,a.useMemo)((function(){return a.createElement(a.Fragment,null,a.createElement("div",{className:"room-builder-progress"},!!t.length&&t.map((function(e,t){return a.createElement(K,{row:e,key:e.getID(),number:t})})),a.createElement("div",{className:"u-flex justify-content-end"},a.createElement(ee,{icon:x.Tu.Add,onClick:i,stopIconAnimation:!0},r(s.W.Step.Room.RoomInfo.AddRoom)))),a.createElement(X.y,null))}),[t,r])}var ne=n(79740),le=n(87933),ae=n(4511);function oe(){var e=(0,a.useContext)(l.hy),t=(0,o.$)().t,n=!(!e.selectedBasketRow||!e.selectedBasketRow.isValid());return a.createElement("div",{className:"u-marg-top u-marg-bottom"},a.createElement(ae.Z,null),a.createElement(ne.Z,{open:n},a.createElement(le.ZP,{icon:x.Tu.Edit,type:le.NK.Accent1},a.createElement(I.ZP,{type:I.yG.Small},a.createElement("strong",null,t(s.W.Misc.Alerts.YouAreEditing))," - ",t(s.W.Misc.Alerts.YouAreEditingAlert)))))}var re=function(e){return(0,a.useContext)(l.g7).screenSize<=Z.Z.Medium?a.createElement(a.Fragment,null,a.createElement(oe,null),a.createElement(d.Z,{smallMargins:!0}),a.createElement(te,null),e.children,a.createElement(d.Z,{smallMargins:!0})):a.createElement(a.Fragment,null,a.createElement(te,null),e.children,a.createElement(oe,null))},ie=n(49368);function se(){var e=(0,a.useContext)(l.hy),t=(0,a.useContext)(l.g7),n=(0,v.WP)().hotel,o=(0,h.w)(),r=o.rooms,i=o.loadingAttempted,s=o.isLoading,c=o.openRoom,m=o.apiHasError,u=o.retargetingRoom,d=(0,a.useRef)(null),R=t.currentRoomSort,S=null;return(0,a.useMemo)((function(){var e,l=(0,g.Z)(r);0!==l.length&&l.sort(C.Z.getSortByFunction(R)),setTimeout((function(){!function(){if(d.current&&S!==r){S=r;var e=t.screenSize<=Z.Z.Medium?185:350;window.scrollTo({top:window.scrollY+(d.current.getBoundingClientRect().top-e),behavior:"smooth"})}}()}),100);var o=a.createElement("div",{ref:d},s||!i?a.createElement(E.Z,null):l.length?l.map((function(e,t){return a.createElement(p.Z,{key:e.code,room:e,disableMarginBottom:t===l.length-1})})):a.createElement(a.Fragment,null,m?a.createElement(ie.F,null):a.createElement(w.Z,null),null==n||null===(e=n.crossSellHotelIds)||void 0===e?void 0:e.map((function(e){return a.createElement(f.Z,{key:e,hotelId:e})}))));return y.ZP.instance.sendRoomImpressions(),a.createElement(a.Fragment,null,a.createElement(re,null,!s&&u?a.createElement(O,{key:u.code,room:u}):null),o)}),[r,s,c,R,t.currentFilters,e.loadedPromotion])}var ce=n(38279),me=n(31972),ue=n(40370),de=n(50840),ge=n(95692),ve=function(){var e=(0,a.useContext)(l.g7),t=(0,r.TH)(),n=(0,o.$)().t,g=(0,a.useContext)(l.aN).currentStep;return a.createElement("div",{className:"container"},a.createElement(ue.default,null),a.createElement(u.i5,null,a.createElement(u.mV,null,e.screenSize>Z.Z.Medium&&a.createElement(a.Fragment,null,a.createElement(i.rU,{to:{pathname:ge.Z.getPreviousStepUrl(g),search:t.search}},a.createElement(c.Z,null)),a.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},a.createElement(m.Z,{bold:!0},n(s.W.Step.Room.ChooseRoom)))),a.createElement(de.Y,null)),e.screenSize>Z.Z.Medium&&a.createElement(u.f,null,a.createElement(ce.Z,null))),e.screenSize>Z.Z.Medium&&a.createElement(d.Z,null),a.createElement(u.i5,null,a.createElement(u.mV,null,a.createElement(se,null)),a.createElement(u.f,null,a.createElement(me.Z,null))))}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[288],{12288:function(e,t,n){n.r(t),n.d(t,{default:function(){return ve}});var l=n(56500),a=n(67294),o=n(26793),r=n(89250),i=n(79655),s=n(79478),c=n(13821),m=n(13010),u=n(46409),d=n(19874),g=n(42982),v=n(89331),E=n(7832),p=n(54101),f=n(72258),h=n(39136),C=n(60281),y=n(84544),Z=n(90292),w=n(67023),R=n(70885),S=n(64854),N=n(20858),x=n(78886),P=n(33409),I=n(30584),b=n(78361),k=n(73633),M=n(44744),A=n(97754),D=n(40291),W=n(32458),B=n(98013);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}var O=function(e){var t=e.room,n=(0,a.useState)([]),r=(0,R.Z)(n,2),i=r[0],c=r[1],u=(0,a.useState)([]),d=(0,R.Z)(u,2),g=d[0],E=d[1],p=(0,a.useState)(!1),f=(0,R.Z)(p,2),h=f[0],C=f[1],w=a.useContext(l.g7),O=(0,a.useContext)(l.hy),_=(0,v.WP)().hotel,F=(0,o.$)().t;(0,a.useEffect)((function(){var e=[],n=[];if(k.Z.isActive()){var l,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var l=0,a=function(){};return{s:a,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){i=!0,o=e},f:function(){try{r||null==n.return||n.return()}finally{if(i)throw o}}}}(t.getRates());try{for(a.s();!(l=a.n()).done;){var o,r,i,s=l.value;(null===(o=s.promoCode)||void 0===o?void 0:o.toLowerCase())===(null===(r=O.selectedBasketRow)||void 0===r||null===(i=r.getPromoCode())||void 0===i?void 0:i.toLowerCase())?n.unshift(s):e.push(s)}}catch(e){a.e(e)}finally{a.f()}n.length>0&&c(n)}else e=t.getRates();E(e)}),[t.getRates()]);var G=t.getShortDescription(),L=w.screenSize<=Z.Z.Large,U=Math.round(t.getLowestPrice(!1,!0)),j=w.screenSize>Z.Z.Medium&&U.toLocaleString().length<7?"large":"normal";return a.createElement("div",{className:"room-details-container --theme-retargeting u-marg-top u-marg-bottom"},a.createElement("div",{className:"room-details"},a.createElement("div",{className:"room-details--image"},a.createElement(D.Z,{images:t.getImages(),imageSize:M.h.Medium})),a.createElement("div",{className:"room-details--content u-pad--heavy u-pad@l-"},a.createElement("div",{className:"u-marg-bottom"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(P.ZP,{type:P.Rm.Primary,icon:x.Tu.Add},F(s.W.Step.Room.YouBookedThisRoomRecently))),a.createElement("div",{className:"room-details--content-title u-marg-bottom--light"},a.createElement(m.Z,{bold:!0},t.name)),a.createElement(B.R,{room:t,textColor:A.Il.Navy}),a.createElement("div",{className:"room-details--content-description u-marg-bottom--light"},a.createElement(I.ZP,{color:A.Il.Navy,type:I.yG.Small},a.createElement("span",{dangerouslySetInnerHTML:{__html:(null==G?void 0:G.replace(/<br(\/|)>/g,""))||""}})))),a.createElement("div",{className:"row"},a.createElement("div",{className:"col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start"},a.createElement("div",{className:"room-details--content-perks u-marg-bottom@m-"},L&&a.createElement("div",{className:"u-marg-bottom"},a.createElement(I.ZP,{type:I.yG.Small,bold:!0,color:A.Il.Accent},(null==_?void 0:_.perkTitle)||F(s.W.Misc.Perks.AndYouGetAll))))),a.createElement("div",{className:"col-md-6 u-flex justify-content-end flex-column align-items-start align-items-md-end"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.Navy,inline:!0},F(s.W.Misc.From)),a.createElement("div",{className:"room-details--content-price flex-row align-items-end"},a.createElement(m.Z,{size:j,bold:!0},a.createElement(N.Z,{hideDecimals:!0},U)),a.createElement(I.ZP,{color:A.Il.Navy,inline:!0},"/",F(s.W.Misc.Night))),a.createElement("div",{className:"u-marg-bottom"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.Navy,className:"u-nowrap"},a.createElement("span",{dangerouslySetInnerHTML:{__html:t.getLowestPriceType()===b.I.IncludingFeesAndTaxes?F(s.W.Step.Room.RoomInfo.IncludesTaxes):F(s.W.Step.Room.ExcludingTaxes)}}))),a.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@m-"},a.createElement(S.Z,{name:"ViewRatesNowButton",primary:!0,filled:!0,stopIconAnimation:!0,iconPosition:"right",wide:w.screenSize<=Z.Z.Large,onClick:function(){y.ZP.instance.sendInteraction("More Room Details",y.s_.LINK,y._J.ROOMS),C(!0)}},F(s.W.Step.Room.RoomInfo.ViewRates))))))),a.createElement(W.Z,{open:h,room:e.room,rates:g,featuredRates:i,onClose:function(){C(!1)}}))},_=n(94184),F=n.n(_),G=n(42530),L=n(89089),U=n(65986),j=n(25112),z=n(63351),V=n(95494),J=n(43261);function Y(e){(0,v.WP)().hotel;var t,n,l,r,i=(0,(0,V.X)().getMaxSelectableAdults)({adults:null===(t=e.row)||void 0===t?void 0:t.getAdults(),children:null===(n=e.row)||void 0===n?void 0:n.getChildren()}),c=(0,o.$)().t,m=null!==(l=null===(r=e.row)||void 0===r?void 0:r.getAdults())&&void 0!==l?l:1;return a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(i)).map((function(e,t){return t+=1,{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Adult,c),value:t.toString()}})),value:null==m?void 0:m.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function $(e){var t,n,l,r=(0,v.WP)().hotel,i=(0,o.$)().t,c=null!==(t=null===(n=e.row)||void 0===n?void 0:n.getChildren())&&void 0!==t?t:1,m=Math.max((null==r?void 0:r.maxOccupancy)+1-(null===(l=e.row)||void 0===l?void 0:l.getAdults()));return(m<1||isNaN(m))&&(m=1),a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(m)).map((function(e,t){return{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Child,i),value:t.toString()}})),value:null==c?void 0:c.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function H(e){var t,n,l,r=(0,v.WP)().hotel,i=(0,o.$)().t,c=null!==(t=null===(n=e.row)||void 0===n?void 0:n.getInfants())&&void 0!==t?t:1,m=Math.max((null==r?void 0:r.maxOccupancy)+1-(null===(l=e.row)||void 0===l?void 0:l.getAdults()));return(m<1||isNaN(m))&&(m=1),a.createElement(z.P,{nativeOnMobile:!0,options:(0,g.Z)(Array(m)).map((function(e,t){return{text:J.Z.pluralWithDictAndCount(t,s.W.Step.Date.Infant,i),value:t.toString()}})),value:null==c?void 0:c.toString(),onChange:e.onChange,keyName:"value",labelName:"text",inputLabelColor:e.labelColor})}function K(e){var t,n,r,i,c,m=(0,a.useContext)(l.hy),u=(0,a.useContext)(l.g7),d=(0,v.WP)().hotel,g=(0,V.X)().showChildren,E=(0,o.$)().t,p=(0,a.useState)(!1),f=(0,R.Z)(p,2),h=f[0],C=f[1],w=e.row,N=(0,a.useMemo)((function(){var e;return m.selectedBasketRow&&(null===(e=m.selectedBasketRow)||void 0===e?void 0:e.getID())===(null==w?void 0:w.getID())}),[m.selectedBasketRow,null===(t=m.selectedBasketRow)||void 0===t?void 0:t.getID(),null==w?void 0:w.getID()]),b=F()("room-builder-progress--item",{"--current":N,"--complete":w.isValid()}),k=(0,a.useRef)(null),M=(0,a.useState)(!1),D=(0,R.Z)(M,2),W=D[0],B=D[1];(0,a.useEffect)((function(){h&&!N&&C(!1)}),[m.selectBasketRow]);var T,O=function(e){var t=e.adults,n=e.children,l=e.infants,a=e.updatedPromoCode;t&&t!==w.getAdults()&&(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setAdults(t)),!n&&0!==n||n===w.getChildren()||(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setChildren(n)),!l&&0!==l||l===w.getInfants()||(y.ZP.instance.sendInteraction("Guests",y.s_.NUMBER_INPUT,y._J.ROOMS),w.setInfants(l)),!a&&""!==a||a===w.getPromoCode()||(y.ZP.instance.sendInteraction("Promo Code",y.s_.FORM_FIELD,y._J.ROOMS),w.setPromoCode(a)),m.updateBasketRow(w)},_=m.currentBasketRows.length>1,z=a.createElement("div",{className:"room-builder-progress--remove"},a.createElement(j.Z,{title:_?"Remove this room":"Cannot remove this room as at least one must be selected."},a.createElement(S.Z,{isText:!0,icon:x.Tu.Close,iconPosition:"right",stopIconAnimation:!0,disabled:!_,onClick:function(){y.ZP.instance.sendInteraction("Remove Room",y.s_.BUTTON,y._J.ROOMS),m.removeBasketRow(w)}}))),K=u.screenSize>Z.Z.ExtraLarge,X=K||N,q=(0,a.useMemo)((function(){return 1!==m.currentBasketRows.length?e.number+1:""}),[m.currentBasketRows.length,e.number]);T="new"===w.getPromoCodeStatus()?w.getPromoCode()?E(s.W.Step.Date.PromoCodeTooltip.Checking):E(s.W.Step.Date.PromoCodeTooltip.NoValue):"valid"===w.getPromoCodeStatus()?E(s.W.Step.Date.PromoCodeTooltip.Valid):E(s.W.Step.Date.PromoCodeTooltip.Invalid);var Q=w.getPromoCode(null==d?void 0:d.memberOnlyPromoCode);return a.createElement("div",{className:b},N||!w.isValid()?a.createElement("div",{className:"u-flex w-100"},a.createElement("div",{className:"u-flex flex-wrap flex-xl-nowrap flex-row u-w-100@xl- align-items-center"},a.createElement("div",null,w.isValid()?a.createElement(I.ZP,null,a.createElement("strong",{className:"u-nowrap"},E(s.W.Step.Room.EditingRoom)," ",q)):a.createElement(I.ZP,null,a.createElement("strong",{className:"u-nowrap"},E(s.W.Step.Room.SelectRoom)," ",q))),X?a.createElement(a.Fragment,null,!K&&a.createElement("div",{className:"w-100 d-flex"+(X?" u-marg-bottom@xl-":"")},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.DarkGrey,inline:!0},E(s.W.Step.Room.ChooseRoomBelow))),a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateAdults),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement(Y,{row:w,onChange:function(e){O({adults:+e})}}))),g?a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateChildren),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement($,{row:w,onChange:function(e){O({children:+e})}}))):null,null!=d&&null!==(n=d.childConfiguration)&&void 0!==n&&n.supportInfants?a.createElement(j.Z,{title:E(s.W.Step.Date.UpdateInfants),wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-flex-justify-center u-flex"},a.createElement(H,{row:w,onChange:function(e){O({infants:+e})}}))):null,a.createElement(a.Fragment,null,a.createElement("div",{className:"room-builder-progress--value"},a.createElement(G.Z,{startDate:w.getStartDate(),endDate:w.getEndDate(),selectedDateChanged:function(e,t){e&&w.setStartDate(e),t&&w.setEndDate(t),m.updateBasketRow(w)},className:"u-w-100@xl- d-flex align-items-center justify-content-center",isAboveNav:!0},a.createElement(j.Z,{title:E(s.W.Step.Date.SelectArrivalAndDepartureDatesByClickingHere)},a.createElement("div",{className:"u-flex align-items-center justify-content-center u-w-100@xl- u-cursor-pointer"},a.createElement(I.ZP,{color:A.Il.Accent,bold:!0,className:"u-nowrap"},w.getArrivalDate()),a.createElement(x.ZP,{icon:x.Tu.ArrowRight2}),a.createElement(I.ZP,{color:A.Il.Accent,bold:!0,className:"u-nowrap"},w.getDepartureDate()))))),a.createElement(j.Z,{title:T,wrapperClasses:"u-w-100@xl- d-flex"},a.createElement("div",{className:"room-builder-progress--value u-cursor-pointer",ref:k,onClick:function(){B(!0)}},a.createElement("div",{className:"u-flex align-items-center justify-content-center u-w-100@xl-"},a.createElement(I.ZP,{className:"u-pad-right--light",type:I.yG.Body,color:Q?w.getPromoCodeColour():A.Il.Navy},Q||E(s.W.Step.Date.PromoCode)),a.createElement(x.ZP,{icon:x.Tu.Dropdown,color:A.Il.DarkGrey}))))),a.createElement(L.a,{open:W,followElement:k.current,onClose:function(){B(!1)}},a.createElement("div",{className:"u-pad--heavy"},a.createElement("div",null,a.createElement(U.Z,{value:Q,onChange:function(e){var t;t=e,y.ZP.instance.sendInteraction("Promo Code",y.s_.FORM_FIELD,y._J.ROOMS),m.selectedBasketRow&&(m.selectedBasketRow.setPromoCode(t),m.selectedBasketRow.setManualInputPromoCode(!!t),m.updateBasketRow(m.selectedBasketRow),t&&B(!1))},valid:"new"!==(null===(r=m.selectedBasketRow)||void 0===r?void 0:r.getPromoCodeStatus())&&Q?"valid"===(null===(i=m.selectedBasketRow)||void 0===i?void 0:i.getPromoCodeStatus()):void 0})),a.createElement("div",{className:"u-flex justify-content-end align-items-center u-marg-top"},a.createElement(S.Z,{isText:!0,size:"small",onClick:function(){y.ZP.instance.sendInteraction("Cancel Promo Popup",y.s_.BUTTON,y._J.ROOMS),B(!1)}},E(s.W.Misc.Cancel))))),!K&&w.isValid()&&a.createElement(S.Z,{wide:!0,primary:!0,filled:!0,onClick:function(){y.ZP.instance.sendInteraction("Save Room Changes",y.s_.BUTTON,y._J.ROOMS),m.selectBasketRow(null),C(!1)}},E(s.W.Misc.Save))):a.createElement("div",{className:"w-100"},a.createElement(I.ZP,{type:I.yG.Small,color:A.Il.DarkGrey},E(s.W.Step.Room.NextRoom)))),a.createElement("div",{className:"u-flex align-items-center"},w.isValid()&&a.createElement("div",{className:"u-none@xl-"},a.createElement(j.Z,{title:"Cancel changes"},a.createElement("div",{className:"u-flex align-items-center"},a.createElement(S.Z,{isText:!0,size:"tiny",onClick:function(){y.ZP.instance.sendInteraction("Cancel Room Changes",y.s_.LINK,y._J.ROOMS),m.selectBasketRow(null),C(!1)}},E(s.W.Misc.Cancel).toUpperCase())))),z)):a.createElement("div",{className:"u-flex w-100"},a.createElement("div",{className:"u-flex justify-content-start"},a.createElement("div",{className:"u-flex flex-column"},a.createElement("span",null,a.createElement(I.ZP,{inline:K},a.createElement("strong",null,w.getRoom().name)),a.createElement(I.ZP,{inline:K,type:K?I.yG.Body:I.yG.Small},a.createElement("span",{className:"u-marg-left--light@xl"},J.Z.pluralWithDictAndCount(w.getAdults(),s.W.Step.Date.Adult,E),g?a.createElement(a.Fragment,null,", ",J.Z.pluralWithDictAndCount(w.getChildren(),s.W.Step.Date.Child,E)):null,null!=d&&null!==(c=d.childConfiguration)&&void 0!==c&&c.supportInfants?a.createElement(a.Fragment,null,", ",J.Z.pluralWithDictAndCount(w.getInfants(),s.W.Step.Date.Infant,E)):null))),a.createElement(I.ZP,{type:I.yG.Caption,color:A.Il.DarkGrey},a.createElement("strong",null,w.getStayDateRange("ddd, MMM D, YYYY"," -")))),Q&&w.isPromoCodeValid()&&a.createElement("div",{className:"u-marg-left d-flex align-items-center"},a.createElement(P.ZP,{type:P.Rm.Success,icon:x.Tu.Money},Q))),a.createElement("div",{className:"u-flex align-items-center"},a.createElement("div",{className:"u-flex align-items-center room-builder-progress--edit"},a.createElement(j.Z,{title:E(s.W.Step.Room.EditThisRoom)},a.createElement("div",{className:"u-flex align-items-center"},a.createElement(S.Z,{isText:!0,size:"tiny",onClick:function(){y.ZP.instance.sendInteraction("Edit Room",y.s_.LINK,y._J.ROOMS),m.selectBasketRow(w),C(!0)}},E(s.W.Misc.Edit).toUpperCase())))),z)))}var X=n(72870),q=n(32941),Q=n(41092),ee=(0,q.A)(S.Z);function te(){var e=(0,a.useContext)(l.hy),t=e.currentBasketRows,n=e.addBasketRow,r=(e.selectedBasketRow,(0,o.$)().t),i=function(){y.ZP.instance.sendInteraction("Add Room Row",y.s_.BUTTON,y._J.ROOMS),n(new Q.Z)};return(0,a.useMemo)((function(){return a.createElement(a.Fragment,null,a.createElement("div",{className:"room-builder-progress"},!!t.length&&t.map((function(e,t){return a.createElement(K,{row:e,key:e.getID(),number:t})})),a.createElement("div",{className:"u-flex justify-content-end"},a.createElement(ee,{icon:x.Tu.Add,onClick:i,stopIconAnimation:!0},r(s.W.Step.Room.RoomInfo.AddRoom)))),a.createElement(X.y,null))}),[t,r])}var ne=n(79740),le=n(87933),ae=n(4511);function oe(){var e=(0,a.useContext)(l.hy),t=(0,o.$)().t,n=!(!e.selectedBasketRow||!e.selectedBasketRow.isValid());return a.createElement("div",{className:"u-marg-top u-marg-bottom"},a.createElement(ae.Z,null),a.createElement(ne.Z,{open:n},a.createElement(le.ZP,{icon:x.Tu.Edit,type:le.NK.Accent1},a.createElement(I.ZP,{type:I.yG.Small},a.createElement("strong",null,t(s.W.Misc.Alerts.YouAreEditing))," - ",t(s.W.Misc.Alerts.YouAreEditingAlert)))))}var re=function(e){return(0,a.useContext)(l.g7).screenSize<=Z.Z.Medium?a.createElement(a.Fragment,null,a.createElement(oe,null),a.createElement(d.Z,{smallMargins:!0}),a.createElement(te,null),e.children,a.createElement(d.Z,{smallMargins:!0})):a.createElement(a.Fragment,null,a.createElement(te,null),e.children,a.createElement(oe,null))},ie=n(49368);function se(){var e=(0,a.useContext)(l.hy),t=(0,a.useContext)(l.g7),n=(0,v.WP)().hotel,o=(0,h.w)(),r=o.rooms,i=o.loadingAttempted,s=o.isLoading,c=o.openRoom,m=o.apiHasError,u=o.retargetingRoom,d=(0,a.useRef)(null),R=t.currentRoomSort,S=null;return(0,a.useMemo)((function(){var e,l=(0,g.Z)(r);0!==l.length&&l.sort(C.Z.getSortByFunction(R)),setTimeout((function(){!function(){if(d.current&&S!==r){S=r;var e=t.screenSize<=Z.Z.Medium?185:350;window.scrollTo({top:window.scrollY+(d.current.getBoundingClientRect().top-e),behavior:"smooth"})}}()}),100);var o=a.createElement("div",{ref:d},s||!i?a.createElement(E.Z,null):l.length?l.map((function(e,t){return a.createElement(p.Z,{key:e.code,room:e,disableMarginBottom:t===l.length-1})})):a.createElement(a.Fragment,null,m?a.createElement(ie.F,null):a.createElement(w.Z,null),null==n||null===(e=n.crossSellHotelIds)||void 0===e?void 0:e.map((function(e){return a.createElement(f.Z,{key:e,hotelId:e})}))));return y.ZP.instance.sendRoomImpressions(),a.createElement(a.Fragment,null,a.createElement(re,null,!s&&u?a.createElement(O,{key:u.code,room:u}):null),o)}),[r,s,c,R,t.currentFilters,e.loadedPromotion])}var ce=n(38279),me=n(31972),ue=n(40370),de=n(50840),ge=n(95692),ve=function(){var e=(0,a.useContext)(l.g7),t=(0,r.TH)(),n=(0,o.$)().t,g=(0,a.useContext)(l.aN).currentStep;return a.createElement("div",{className:"container"},a.createElement(ue.default,null),a.createElement(u.i5,null,a.createElement(u.mV,null,e.screenSize>Z.Z.Medium&&a.createElement(a.Fragment,null,a.createElement(i.rU,{to:{pathname:ge.Z.getPreviousStepUrl(g),search:t.search}},a.createElement(c.Z,null)),a.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},a.createElement(m.Z,{bold:!0},n(s.W.Step.Room.ChooseRoom)))),a.createElement(de.Y,null)),e.screenSize>Z.Z.Medium&&a.createElement(u.f,null,a.createElement(ce.Z,null))),e.screenSize>Z.Z.Medium&&a.createElement(d.Z,null),a.createElement(u.i5,null,a.createElement(u.mV,null,a.createElement(se,null)),a.createElement(u.f,null,a.createElement(me.Z,null))))}}}]);
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{40370:function(e,t,l){l.r(t),l.d(t,{default:function(){return A}});var a=l(70885),r=l(56500),n=l(89331),o=l(67294),c=l(26793),m=l(79478),s=l(20858),i=l(78886),u=l(30584),d=l(91069),y=l(4942),E=l(79655),p=l(64854),f=l(13010),g=l(19874),v=l(14394),h=l(65128),b=l(3933),N=l(90783),P=l(16401),Z=l(10513),D=l(80195),S=l(4826),x=l(97754),k=l(71657),w=l(43261),C=l(39605);function O(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,a)}return l}function G(e){var t,l,d,G,W=(0,o.useContext)(r.hy),I=(0,n.WP)().hotel,M=W.getAllValidRows(),A=W.basketAddonRows,T=(0,c.$)().t,R=(0,o.useState)({}),j=(0,a.Z)(R,2),F=j[0],B=j[1];(0,o.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?O(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):O(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},b.B);e.TransportDistanceBlock.component=o.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},o.createElement("div",{className:"u-flex flex-row u-w-100"},o.createElement(S.Z,{vertical:!0,hotel:I}))),e.PerksBlock.component=o.createElement(P.v,{size:"mobile"}),B(e)}),[]);var z=(0,n.Q$)(F).sortedComponents,$=W.endDate?W.endDate.diff(W.startDate,"day"):0,U=[null==I||null===(t=I.address)||void 0===t?void 0:t.line1,null==I||null===(l=I.address)||void 0===l?void 0:l.city],_=[null==I||null===(d=I.address)||void 0===d?void 0:d.postalCode,null==I||null===(G=I.address)||void 0===G?void 0:G.state],L=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?o.createElement(u.ZP,{type:u.yG.Small},t):null},Q=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},V=W.getTotalPrice(),q=W.getTotalPayNow(),H=W.getTotalFees();return o.createElement(h.Z,{open:e.isOpen,title:T(m.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:o.createElement("div",{className:"row align-items-center"},o.createElement("div",{className:"col-4"},o.createElement(u.ZP,{type:u.yG.Body},T(m.W.Misc.Total)),o.createElement(u.ZP,{type:u.yG.Small,color:x.Il.Accent},o.createElement("strong",null,w.Z.pluralWithDictAndCount($,m.W.Misc.Night,T)))),o.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},o.createElement(f.Z,{bold:!0,size:"normal",align:C.P.Right},o.createElement(s.Z,null,V)),o.createElement(u.ZP,{color:x.Il.DarkGrey,type:u.yG.Small,align:C.P.Right},o.createElement("span",{dangerouslySetInnerHTML:{__html:T(m.W.Step.Room.RoomInfo.IncludesTaxes)}}))))},o.createElement(o.Fragment,null,o.createElement("div",{className:"container"},o.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},o.createElement("div",{className:"col-6"},o.createElement(u.ZP,{type:u.yG.Small,color:x.Il.Grey},o.createElement("strong",null,T(m.W.Misc.CheckIn))),o.createElement(u.ZP,{type:u.yG.Small},T(m.W.Misc.After)," ",null==I?void 0:I.checkInTime)),o.createElement("div",{className:"col-6"},o.createElement(u.ZP,{type:u.yG.Small,color:x.Il.Grey},o.createElement("strong",null,T(m.W.Misc.CheckOut))),o.createElement(u.ZP,{type:u.yG.Small},T(m.W.Misc.Before)," ",null==I?void 0:I.checkOutTime))),o.createElement("div",{className:"row u-border-bottom u-pad be-mobile-summary-select-date-header",style:{width:"unset"}},o.createElement("div",{style:{flex:1}},o.createElement("div",{className:"u-flex u-flex-flex-start"},o.createElement(u.ZP,{className:"select-date-header-title"},o.createElement("span",W.startDate?{style:{color:x.Il.Accent,fontWeight:"bold"}}:{},W.startDate?W.startDate.format("MMM D"):T(m.W.Step.Date.Arrival))),o.createElement("span",{className:"u-marg-left-right--light"},o.createElement(i.ZP,{icon:i.Tu.ArrowRight2,size:"18px",color:x.Il.DarkGrey})),o.createElement(u.ZP,{className:"select-date-header-title"},o.createElement("span",W.endDate?{style:{color:x.Il.Accent,fontWeight:"bold"}}:{},W.endDate?W.endDate.format("MMM D"):T(m.W.Step.Date.Departure)))),o.createElement(u.ZP,{className:"select-date-header-subtitle"},W.getNumberOfAdults(!0),", ",W.getNumberOfChildren(!0),", ",W.getNumberOfRooms(!0))),o.createElement("div",{className:"u-align-right"},o.createElement(E.rU,{to:(0,k.Z)().getStepUrl()},o.createElement(p.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},T(m.W.Misc.Edit).toUpperCase())))),M&&M.length?o.createElement(o.Fragment,null,M.map((function(t,l){if(t.isValid())return o.createElement(D.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:Q})})),A.length>0&&o.createElement(o.Fragment,null,o.createElement(g.Z,{noMargins:!0,darker:!0}),o.createElement("div",{className:"u-marg-top"},o.createElement(u.ZP,{type:u.yG.Label,color:x.Il.DarkGrey},o.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return o.createElement(N.Z,{row:e,key:e.getID(),onRemoveClick:function(){return W.removeBasketAddonRow(e)}})})))):o.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},o.createElement("div",{className:"u-marg-bottom--heavy"},o.createElement(u.ZP,{type:u.yG.Body},T(m.W.Step.General.YourCartIsEmpty))),o.createElement("div",{style:{height:"150px",position:"relative"}},o.createElement(v.Z,null)),o.createElement("div",{className:"u-marg-top"},o.createElement("div",{className:"u-marg-bottom"},o.createElement(u.ZP,{bold:!0},null==I?void 0:I.name)),L(U),L(_))),H>0&&o.createElement(o.Fragment,null,o.createElement("div",{className:"line-break",style:{marginTop:0,marginBottom:"24px"}}),o.createElement("div",{className:"u-flex"},o.createElement(u.ZP,{type:u.yG.Small}," ",T(m.W.Step.Room.Summary.Fees)),o.createElement(u.ZP,{type:u.yG.Small},o.createElement(s.Z,null,H)))),z,o.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},o.createElement(Z.Z,null)),(null==I?void 0:I.requireDeposit)&&o.createElement("div",{className:"u-marg-bottom--heavy"},o.createElement("div",{className:"row align-items-center"},o.createElement("div",{className:"col-12 u-marg-top--light"},o.createElement("div",{className:"u-flex"},o.createElement(u.ZP,{type:u.yG.Small}," ",T(m.W.Step.Room.Summary.Fees)),o.createElement(u.ZP,{type:u.yG.Small},o.createElement(s.Z,null,H)))),o.createElement("div",{className:"line-break",style:{marginTop:0,marginBottom:"8px"}}),o.createElement("div",{className:"col-12 u-marg-top--light u-marg-bottom--light"},o.createElement("div",{className:"u-flex"},o.createElement(u.ZP,{type:u.yG.Small,bold:!0},T(m.W.Misc.PayNow)),o.createElement(u.ZP,{type:u.yG.Small,bold:!0},o.createElement(s.Z,null,q)))))))))}var W=l(95494),I=l(26061),M=l(90292);function A(){var e,t=(0,o.useContext)(r.g7).screenSize,l=(0,o.useContext)(r.aN).currentStep,y=(0,o.useContext)(r.hy),E=(0,c.$)().t,p=(0,n.WP)().hotel,f=(0,o.useState)(!1),g=(0,a.Z)(f,2),v=g[0],h=g[1],b=(0,W.X)().showChildren;return t<=M.Z.Medium?o.createElement(o.Fragment,null,o.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad u-marg-bottom",onClick:function(){h(!0)}},o.createElement("div",{className:"be-mobile-summary-select-date-header"},o.createElement("div",{className:"u-flex u-flex-flex-start"},o.createElement(u.ZP,{className:"select-date-header-title"},o.createElement("span",y.startDate?{style:{color:x.Il.Accent,fontWeight:"bold"}}:{},y.startDate?y.startDate.format("MMM D"):E(m.W.Step.Date.Arrival))),o.createElement("span",{className:"u-marg-left-right--light"},o.createElement(i.ZP,{icon:i.Tu.ArrowRight2,size:"18px",color:x.Il.DarkGrey})),o.createElement(u.ZP,{className:"select-date-header-title"},o.createElement("span",y.endDate?{style:{color:x.Il.Accent,fontWeight:"bold"}}:{},y.endDate?y.endDate.format("MMM D"):E(m.W.Step.Date.Departure)))),o.createElement("div",{style:{flex:0,display:"flex",flexDirection:"row"}},o.createElement(u.ZP,{bold:!0,size:"normal",align:C.P.Right,className:"select-date-header-title"},l===I.Z?o.createElement(d.Z,{isMobile:!0}):o.createElement(s.Z,null,y.getTotalPrice())),o.createElement(i.ZP,{icon:i.Tu.Dropdown,size:"18px",color:x.Il.DarkGrey}))),o.createElement("div",{className:"be-mobile-summary-select-date-header"},o.createElement("div",{style:{flex:1}},o.createElement(u.ZP,{className:"select-date-header-subtitle"},y.getNumberOfAdults(!0),", ",b?o.createElement(o.Fragment,null,y.getNumberOfChildren(!0),", "):null,null!=p&&null!==(e=p.childConfiguration)&&void 0!==e&&e.supportInfants?o.createElement(o.Fragment,null,y.getNumberOfInfants(!0),", "):null,y.getNumberOfRooms(!0))),o.createElement(u.ZP,{className:"select-date-header-subtitle"},"+ Taxes & fees"))),o.createElement(G,{isOpen:v,onClose:function(){h(!1)}})):o.createElement(o.Fragment,null)}},10513:function(e,t,l){l.d(t,{Z:function(){return u}});var a=l(56500),r=l(89331),n=l(67294),o=l(26793),c=l(89116),m=l(30584),s=l(79478),i=l(97754);function u(){var e=(0,r.WP)().hotel,t=(0,n.useContext)(a.Qm),l=(0,o.$)().t;return n.createElement("div",{className:"summary-privacy-policy"},n.createElement(m.ZP,{type:m.yG.Body},n.createElement("strong",null,l(s.W.Step.Confirmation.PrivacyPolicy))),n.createElement(m.ZP,{className:"u-marg-top--light",type:m.yG.Small,color:i.Il.DarkGrey},n.createElement(c.c,{i18nKey:s.W.Step.Confirmation.PrivacyPolicyDetail,values:{companyShort:t.companyShort},components:[n.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{40370:function(e,t,l){l.r(t),l.d(t,{default:function(){return A}});var a=l(70885),r=l(56500),n=l(89331),c=l(67294),o=l(26793),m=l(79478),s=l(20858),i=l(78886),u=l(30584),d=l(91069),y=l(4942),E=l(79655),p=l(64854),g=l(13010),f=l(19874),v=l(14394),h=l(65128),b=l(3933),N=l(90783),P=l(16401),Z=l(10513),D=l(80195),S=l(4826),C=l(97754),x=l(71657),k=l(43261),w=l(39605);function O(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,a)}return l}function G(e){var t,l,d,G,W=(0,c.useContext)(r.hy),I=(0,n.WP)().hotel,M=W.getAllValidRows(),A=W.basketAddonRows,T=(0,o.$)().t,R=(0,c.useState)({}),j=(0,a.Z)(R,2),B=j[0],F=j[1];(0,c.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?O(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):O(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},b.B);e.TransportDistanceBlock.component=c.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},c.createElement("div",{className:"u-flex flex-row u-w-100"},c.createElement(S.Z,{vertical:!0,hotel:I}))),e.PerksBlock.component=c.createElement(P.v,{size:"mobile"}),F(e)}),[]);var z=(0,n.Q$)(B).sortedComponents,$=W.endDate?W.endDate.diff(W.startDate,"day"):0,U=[null==I||null===(t=I.address)||void 0===t?void 0:t.line1,null==I||null===(l=I.address)||void 0===l?void 0:l.city],_=[null==I||null===(d=I.address)||void 0===d?void 0:d.postalCode,null==I||null===(G=I.address)||void 0===G?void 0:G.state],L=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?c.createElement(u.ZP,{type:u.yG.Small},t):null},Q=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},V=W.getTotalPrice(),q=W.getTotalPayNow(),H=W.getTotalFees();return c.createElement(h.Z,{open:e.isOpen,title:T(m.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:c.createElement("div",{className:"row align-items-center"},c.createElement("div",{className:"col-4"},c.createElement(u.ZP,{type:u.yG.Body},T(m.W.Misc.Total)),c.createElement(u.ZP,{type:u.yG.Small,color:C.Il.Accent},c.createElement("strong",null,k.Z.pluralWithDictAndCount($,m.W.Misc.Night,T)))),c.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},c.createElement(g.Z,{bold:!0,size:"normal",align:w.P.Right},c.createElement(s.Z,null,V)),c.createElement(u.ZP,{color:C.Il.DarkGrey,type:u.yG.Small,align:w.P.Right},c.createElement("span",{dangerouslySetInnerHTML:{__html:T(m.W.Step.Room.RoomInfo.IncludesTaxes)}}))))},c.createElement(c.Fragment,null,c.createElement("div",{className:"container"},c.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},c.createElement("div",{className:"col-6"},c.createElement(u.ZP,{type:u.yG.Small,color:C.Il.Grey},c.createElement("strong",null,T(m.W.Misc.CheckIn))),c.createElement(u.ZP,{type:u.yG.Small},T(m.W.Misc.After)," ",null==I?void 0:I.checkInTime)),c.createElement("div",{className:"col-6"},c.createElement(u.ZP,{type:u.yG.Small,color:C.Il.Grey},c.createElement("strong",null,T(m.W.Misc.CheckOut))),c.createElement(u.ZP,{type:u.yG.Small},T(m.W.Misc.Before)," ",null==I?void 0:I.checkOutTime))),c.createElement("div",{className:"row u-border-bottom u-pad be-mobile-summary-select-date-header",style:{width:"unset"}},c.createElement("div",{style:{flex:1}},c.createElement("div",{className:"u-flex u-flex-flex-start"},c.createElement(u.ZP,{className:"select-date-header-title"},c.createElement("span",W.startDate?{style:{color:C.Il.Accent,fontWeight:"bold"}}:{},W.startDate?W.startDate.format("MMM D"):T(m.W.Step.Date.Arrival))),c.createElement("span",{className:"u-marg-left-right--light"},c.createElement(i.ZP,{icon:i.Tu.ArrowRight2,size:"18px",color:C.Il.DarkGrey})),c.createElement(u.ZP,{className:"select-date-header-title"},c.createElement("span",W.endDate?{style:{color:C.Il.Accent,fontWeight:"bold"}}:{},W.endDate?W.endDate.format("MMM D"):T(m.W.Step.Date.Departure)))),c.createElement(u.ZP,{className:"select-date-header-subtitle"},W.getNumberOfAdults(!0),", ",W.getNumberOfChildren(!0),", ",W.getNumberOfRooms(!0))),c.createElement("div",{className:"u-align-right"},c.createElement(E.rU,{to:(0,x.Z)().getStepUrl()},c.createElement(p.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},T(m.W.Misc.Edit).toUpperCase())))),M&&M.length?c.createElement(c.Fragment,null,M.map((function(t,l){if(t.isValid())return c.createElement(D.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:Q})})),A.length>0&&c.createElement(c.Fragment,null,c.createElement(f.Z,{noMargins:!0,darker:!0}),c.createElement("div",{className:"u-marg-top"},c.createElement(u.ZP,{type:u.yG.Label,color:C.Il.DarkGrey},c.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return c.createElement(N.Z,{row:e,key:e.getID(),onRemoveClick:function(){return W.removeBasketAddonRow(e)}})})))):c.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},c.createElement("div",{className:"u-marg-bottom--heavy"},c.createElement(u.ZP,{type:u.yG.Body},T(m.W.Step.General.YourCartIsEmpty))),c.createElement("div",{style:{height:"150px",position:"relative"}},c.createElement(v.Z,null)),c.createElement("div",{className:"u-marg-top"},c.createElement("div",{className:"u-marg-bottom"},c.createElement(u.ZP,{bold:!0},null==I?void 0:I.name)),L(U),L(_))),H>0&&c.createElement(c.Fragment,null,c.createElement("div",{className:"line-break",style:{marginTop:0,marginBottom:"24px"}}),c.createElement("div",{className:"u-flex"},c.createElement(u.ZP,{type:u.yG.Small}," ",T(m.W.Step.Room.Summary.CreditCardSurcharge)),c.createElement(u.ZP,{type:u.yG.Small},c.createElement(s.Z,null,H)))),z,c.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},c.createElement(Z.Z,null)),(null==I?void 0:I.requireDeposit)&&c.createElement("div",{className:"u-marg-bottom--heavy"},c.createElement("div",{className:"row align-items-center"},c.createElement("div",{className:"col-12 u-marg-top--light"},c.createElement("div",{className:"u-flex"},c.createElement(u.ZP,{type:u.yG.Small}," ",T(m.W.Step.Room.Summary.CreditCardSurcharge)),c.createElement(u.ZP,{type:u.yG.Small},c.createElement(s.Z,null,H)))),c.createElement("div",{className:"line-break",style:{marginTop:0,marginBottom:"8px"}}),c.createElement("div",{className:"col-12 u-marg-top--light u-marg-bottom--light"},c.createElement("div",{className:"u-flex"},c.createElement(u.ZP,{type:u.yG.Small,bold:!0},T(m.W.Misc.PayNow)),c.createElement(u.ZP,{type:u.yG.Small,bold:!0},c.createElement(s.Z,null,q)))))))))}var W=l(95494),I=l(26061),M=l(90292);function A(){var e,t=(0,c.useContext)(r.g7).screenSize,l=(0,c.useContext)(r.aN).currentStep,y=(0,c.useContext)(r.hy),E=(0,o.$)().t,p=(0,n.WP)().hotel,g=(0,c.useState)(!1),f=(0,a.Z)(g,2),v=f[0],h=f[1],b=(0,W.X)().showChildren;return t<=M.Z.Medium?c.createElement(c.Fragment,null,c.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad u-marg-bottom",onClick:function(){h(!0)}},c.createElement("div",{className:"be-mobile-summary-select-date-header"},c.createElement("div",{className:"u-flex u-flex-flex-start"},c.createElement(u.ZP,{className:"select-date-header-title"},c.createElement("span",y.startDate?{style:{color:C.Il.Accent,fontWeight:"bold"}}:{},y.startDate?y.startDate.format("MMM D"):E(m.W.Step.Date.Arrival))),c.createElement("span",{className:"u-marg-left-right--light"},c.createElement(i.ZP,{icon:i.Tu.ArrowRight2,size:"18px",color:C.Il.DarkGrey})),c.createElement(u.ZP,{className:"select-date-header-title"},c.createElement("span",y.endDate?{style:{color:C.Il.Accent,fontWeight:"bold"}}:{},y.endDate?y.endDate.format("MMM D"):E(m.W.Step.Date.Departure)))),c.createElement("div",{style:{flex:0,display:"flex",flexDirection:"row"}},c.createElement(u.ZP,{bold:!0,size:"normal",align:w.P.Right,className:"select-date-header-title"},l===I.Z?c.createElement(d.Z,{isMobile:!0}):c.createElement(s.Z,null,y.getTotalPrice())),c.createElement(i.ZP,{icon:i.Tu.Dropdown,size:"18px",color:C.Il.DarkGrey}))),c.createElement("div",{className:"be-mobile-summary-select-date-header"},c.createElement("div",{style:{flex:1}},c.createElement(u.ZP,{className:"select-date-header-subtitle"},y.getNumberOfAdults(!0),", ",b?c.createElement(c.Fragment,null,y.getNumberOfChildren(!0),", "):null,null!=p&&null!==(e=p.childConfiguration)&&void 0!==e&&e.supportInfants?c.createElement(c.Fragment,null,y.getNumberOfInfants(!0),", "):null,y.getNumberOfRooms(!0))),c.createElement(u.ZP,{className:"select-date-header-subtitle"},"+ Taxes & fees"))),c.createElement(G,{isOpen:v,onClose:function(){h(!1)}})):c.createElement(c.Fragment,null)}},10513:function(e,t,l){l.d(t,{Z:function(){return u}});var a=l(56500),r=l(89331),n=l(67294),c=l(26793),o=l(89116),m=l(30584),s=l(79478),i=l(97754);function u(){var e=(0,r.WP)().hotel,t=(0,n.useContext)(a.Qm),l=(0,c.$)().t;return n.createElement("div",{className:"summary-privacy-policy"},n.createElement(m.ZP,{type:m.yG.Body},n.createElement("strong",null,l(s.W.Step.Confirmation.PrivacyPolicy))),n.createElement(m.ZP,{className:"u-marg-top--light",type:m.yG.Small,color:i.Il.DarkGrey},n.createElement(o.c,{i18nKey:s.W.Step.Confirmation.PrivacyPolicyDetail,values:{companyShort:t.companyShort},components:[n.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);