PageSourceSearch

https://www.hotelroma.pt/bookcore/static/js/web-components/spa/builds/138.74d5e2fbfb45dcf36e78.chunk.js

js hotelroma.pt collected 2026-09-26 09:34:46 UTC 6,521 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbookcore_client=self.webpackChunkbookcore_client||[]).push([[138],{98104:function(t,e,r){var i=r(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(96540),o=i(r(5556)),d=r(51678),n=i(r(12873)),f=r(25186),s=r(74848);class u extends a.Component{constructor(t){super(t),this.giftCardCodeInputRef=(0,a.createRef)(),this.onSubmitGiftCard=this.onSubmitGiftCard.bind(this),this.removeGiftCard=this.removeGiftCard.bind(this),this.importDeviceView()}importDeviceView(){this.props.isDesktop?this.view=(0,a.lazy)(()=>(0,d.lazyRetry)(()=>r.e(61).then(r.t.bind(r,81330,23)))):this.view=(0,a.lazy)(()=>(0,d.lazyRetry)(()=>r.e(98).then(r.t.bind(r,40948,23))))}removeGiftCard(){this.props.removeGiftCard(this.props.onGiftCardError)}onSubmitGiftCard(){const t=this.giftCardCodeInputRef.current.value;t?this.props.addGiftCard(t.toLowerCase(),this.props.onGiftCardError):this.giftCardCodeInputRef.current.reportValidity()}render(){const t=this.props.isDesktop&&"booking"===this.props.source?null:{removeGiftCard:this.removeGiftCard,onSubmitGiftCard:this.onSubmitGiftCard,giftCardCodeInputRef:this.giftCardCodeInputRef},e=(0,f.getGiftCardProps)(this.props,t),r=this.view;return(0,s.jsx)(a.Suspense,{fallback:this.props.isDesktop?null:(0,s.jsx)(n.default,{type:"inlineloader"}),children:(0,s.jsx)(r,{...e})})}}u.displayName="GiftCardController",u.propTypes={giftCard:o.default.object,amountText:o.default.string,amountRemainderText:o.default.string,giftCardFormText:o.default.string,giftCardPlaceHolderText:o.default.string,giftCardButtonText:o.default.string,giftCardText:o.default.string,onGiftCardApplied:o.default.func,removeGiftCard:o.default.func,isDesktop:o.default.bool},u.defaultProps={amountText:"",amountRemainderText:"",giftCardFormText:"",giftCardPlaceHolderText:"",giftCardButtonText:"",giftCardText:"",isDesktop:!1};e.default=u;t.exports=e.default},42267:function(t,e,r){var i=r(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(96540),o=i(r(5556)),d=r(51678),n=i(r(98104)),f=r(43873),s=r(74848);class u extends a.Component{constructor(t){super(t),this.state={giftCard:t.giftCard,giftCardError:"",displayContent:(0,f.isGiftCardApplied)(t.giftCard)||t.isGiftCardOpen},this.bindActions()}bindActions(){this.toggleGiftCardButton=this.toggleGiftCardButton.bind(this),this.onGiftCardError=this.onGiftCardError.bind(this)}toggleGiftCardButton(){this.props.updateGiftCardToggleState(!this.state.displayContent),this.props.isPaymentBenefitEnabled("giftcard")&&this.setState({displayContent:!this.state.displayContent})}onGiftCardError(t){this.setState({giftCardError:t})}componentDidUpdate(t){(0,d.areSimpleObjectsEqual)(t.giftCard,this.props.giftCard)||this.setState({giftCard:this.props.giftCard}),(0,d.areSimpleObjectsEqual)(t.isGiftCardOpen,this.props.isGiftCardOpen)||this.setState({displayContent:this.props.isGiftCardOpen})}render(){return(0,s.jsx)(n.default,{...this.props,...this.state,isGiftCardApplied:(0,f.isGiftCardApplied)(this.state.giftCard),toggleGiftCardButton:this.toggleGiftCardButton,onGiftCardError:this.onGiftCardError})}}u.displayName="GiftCardModel",u.propTypes={amountRemainderText:o.default.string,amountText:o.default.string,giftCard:o.default.object,giftCardButtonText:o.default.string,giftCardFormText:o.default.string,giftCardPlaceHolderText:o.default.string,giftCardText:o.default.string,isDesktop:o.default.bool,isPaymentBenefitEnabled:o.default.func,onGiftCardApplied:o.default.func,updateGiftCardToggleState:o.default.func},u.defaultProps={amountText:"",amountRemainderText:"",giftCardFormText:"",giftCardPlaceHolderText:"",giftCardButtonText:"",giftCardText:"",onGiftCardApplied:d.defaultEmptyFunction,isDesktop:!1,isPaymentBenefitEnabled:d.defaultEmptyFunction,updateGiftCardToggleState:d.defaultEmptyFunction};e.default=u;t.exports=e.default},25186:function(t,e,r){var i=r(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(r(98424));function o({currencyUser:t,locale:e,forcedCurrencyFormat:r,price:i,currencyConversion:o}){return a.default.convertAndFormatPrice({price:i,currencyCode:t,locale:e,currencyConversion:o,formatArgs:r})}e.default={getGiftCardProps:function({amountRemainderText:t,amountText:e,currencyConversions:r,currencyUser:i,displayContent:a,forcedCurrencyFormat:d,giftCard:n,giftCardButtonText:f,giftCardError:s,giftCardFormText:u,giftCardPlaceHolderText:l,giftCardText:C,isDesktop:c,isGiftCardApplied:p,locale:g,source:m,toggleGiftCardButton:x},y){let T;return T=c&&"booking"===m?function({amountRemainderText:t,amountText:e,currencyUser:r,forcedCurrencyFormat:i,giftCard:a,giftCardText:d,isGiftCardApplied:n,locale:f,source:s}){return{...{...a,amountApplied:o({currencyUser:r,locale:f,forcedCurrencyFormat:i,price:-a.amount_applied})},amountRemainderText:t,amountText:e,giftCardText:d,isGiftCardApplied:n,source:s}}({amountRemainderText:t,amountText:e,currencyUser:i,forcedCurrencyFormat:d,giftCard:n,giftCardText:C,isGiftCardApplied:p,locale:g,source:m}):function({amountRemainderText:t,amountText:e,currencyConversions:r,currencyUser:i,displayContent:a,forcedCurrencyFormat:d,giftCard:n,giftCardButtonText:f,giftCardError:s,giftCardFormText:u,giftCardPlaceHolderText:l,giftCardText:C,isGiftCardApplied:c,locale:p,toggleGiftCardButton:g},m){const x=r?.[i]?r[i]:1,y=o({currencyConversion:x,currencyUser:i,forcedCurrencyFormat:d,locale:p,price:n.amount}),T=o({currencyConversion:x,currencyUser:i,locale:p,forcedCurrencyFormat:d,price:n.amount_remainder});return{amount:y,amountApplied:o({currencyConversion:x,currencyUser:i,locale:p,forcedCurrencyFormat:d,price:n.amount_applied}),amountRemainder:T,amountRemainderText:t,amountText:e,displayContent:a,giftCard:n,giftCardButtonText:f,giftCardError:s,giftCardFormText:u,giftCardPlaceHolderText:l,giftCardText:C,isGiftCardApplied:c,toggleGiftCardButton:g,...m}}({amountRemainderText:t,amountText:e,currencyConversions:r,currencyUser:i,displayContent:a,forcedCurrencyFormat:d,giftCard:n,giftCardButtonText:f,giftCardError:s,giftCardFormText:u,giftCardPlaceHolderText:l,giftCardText:C,isGiftCardApplied:p,locale:g,toggleGiftCardButton:x},y),T}};t.exports=e.default}
1,43873:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={isGiftCardApplied:function(t){return!!Object.keys(t).length}};t.exports=e.default},31934:function(t,e,r){var i=r(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(r(42267));e.default=a.default;t.exports=e.default}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.