1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[63],{3157:function(t,e,n){n.r(e),n.d(e,{UrgencyMessagingComponent:function(){return O},default:function(){return H}});var r=n(6540),o=n(5338),i=n(2543),a=n(1145),u=n(4848),c=function(t){var e=t.color;return(0,u.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"35",viewBox:"0 0 9 35",fill:"none",children:[(0,u.jsx)("mask",{id:"path-1-inside-1_3556_1201",fill:"white",children:(0,u.jsx)("path",{d:"M0 0H9V35H0L9 17.5L0 0Z"})}),(0,u.jsx)("path",{d:"M0 0V-14H-22.9429L-12.45 6.40287L0 0ZM9 0H23V-14H9V0ZM9 35V49H23V35H9ZM0 35L-12.45 28.5971L-22.9429 49H0V35ZM9 17.5L21.45 23.9029L24.7429 17.5L21.45 11.0971L9 17.5ZM0 14H9V-14H0V14ZM-5 0V35H23V0H-5ZM9 21H0V49H9V21ZM12.45 41.4029L21.45 23.9029L-3.45003 11.0971L-12.45 28.5971L12.45 41.4029ZM21.45 11.0971L12.45 -6.40287L-12.45 6.40287L-3.45003 23.9029L21.45 11.0971Z",fill:e,mask:"url(#path-1-inside-1_3556_1201)"})]})},l=function(t){var e=t.color;return(0,u.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"35",viewBox:"0 0 9 35",fill:"none",children:[(0,u.jsx)("mask",{id:"path-1-inside-1_3556_1207",fill:"white",children:(0,u.jsx)("path",{d:"M8.99377 0H-0.00622559V35H8.99377L-0.00622559 17.5L8.99377 0Z"})}),(0,u.jsx)("path",{d:"M8.99377 0V-14H31.9367L21.4438 6.40287L8.99377 0ZM-0.00622559 0H-14.0062V-14H-0.00622559V0ZM-0.00622559 35V49H-14.0062V35H-0.00622559ZM8.99377 35L21.4438 28.5971L31.9367 49H8.99377V35ZM-0.00622559 17.5L-12.4563 23.9029L-15.7492 17.5L-12.4563 11.0971L-0.00622559 17.5ZM8.99377 14H-0.00622559V-14H8.99377V14ZM13.9938 0V35H-14.0062V0H13.9938ZM-0.00622559 21H8.99377V49H-0.00622559V21ZM-3.45625 41.4029L-12.4563 23.9029L12.4438 11.0971L21.4438 28.5971L-3.45625 41.4029ZM-12.4563 11.0971L-3.45625 -6.40287L21.4438 6.40287L12.4438 23.9029L-12.4563 11.0971Z",fill:e,mask:"url(#path-1-inside-1_3556_1207)"})]})};function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t,e)||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 f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){var e,n,o=t.urgencyMessagingData,i=s((0,r.useState)(null),2),f=i[0],d=i[1],p=s((0,r.useState)(!0),2),y=p[0],v=p[1],h="hal"===(null===(e=window)||void 0===e||null===(e=e.configs)||void 0===e?void 0:e.brand)?"#E46C24":"#AB8D45",g=(null==o?void 0:o.backgroundColor)||h;return(0,r.useEffect)(function(){return y&&(n=setInterval(function(){d(function(){var t=o.thresholdContent,e=o.nonThresholdContent,r=o.minimumGuestsCount,i=0;if(window.adobeDataLayer){var u,c,l=(null===(u=window.adobeDataLayer)||void 0===u?void 0:u.filter(function(t){return t.event===a.VOYAGEDATA}))||[];i=null===(c=l[0])||void 0===c?void 0:c.voyageData,null!=l&&l.length&&(clearInterval(n),v(!1))}if(!i)return null;var s=(i>=r?t:e)||"";return null==s?void 0:s.replace(/(\{{.*?\}})/gi,i)}())},1e3),setTimeout(function(){clearInterval(n)},3e4)),function(){return clearInterval(n)}},[y]),(0,u.jsx)(u.Fragment,{children:f?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"desktop-tablet-view",role:"alert","aria-live":"assertive","data-title":f,"aria-labelledby":"social-proofing-banner",children:[(0,u.jsx)("div",{className:"pseudo-social-proofing",children:(0,u.jsx)(c,{color:g})}),(0,u.jsxs)("div",{className:"um-body",style:{background:null==o?void 0:o.backgroundColor},children:[(0,u.jsx)("img",{src:null==o?void 0:o.bodyIcon,alt:"",loading:"lazy"}),(0,u.jsx)("span",{style:{color:null==o?void 0:o.textColor},children:f})]}),(0,u.jsx)("div",{className:"pseudo-social-proofing",children:(0,u.jsx)(l,{c
1olor:g})})]}),(0,u.jsx)("div",{className:"mobile-view",role:"alert","aria-live":"assertive",style:{background:null==o?void 0:o.backgroundColor},children:(0,u.jsx)("span",{style:{color:null==o?void 0:o.textColor},children:f})})]}):null})},p=r.memo(d),y=n(3683);function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function h(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return g(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,u=0,c=t,d.n=n,a}};function p(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],p=d.p,y=i[2];n>3?(o=y===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(u=0,d.v=r,d.n=i[1]):p<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,d.n=y,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,y){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,y),u=s,c=y;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(d.n=-1),p(u,c)):d.n=c:d.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=d.n<0)?c:n.call(r,d))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(g(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,g(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,g(f,"constructor",l),g(l,"constructor",c),c.displayName="GeneratorFunction",g(l,o,"GeneratorFunction"),g(f),g(f,o,"Generator"),g(f,r,function(){return this}),g(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:d}})()}function g(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}g=function(t,e,n,r){function i(e,n){g(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},g(t,e,n,r)}function m(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function b(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){m(i,r,o,a,u,"next",t)}function u(t){m(i,r,o,a,u,"throw",t)}a(void 0)})}}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}function j(t){var e=function(t,e){if("object"!=v(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==v(e)?e:e+""}function L(t,e,n){return e=M(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,x()?Reflect.construct(e,n||[],M(t).constructor):e.apply(t,n))}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(x=function(){return!!t})()}function M(t){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},M(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}var O=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=L(this,e,[t]),document.querySelectorAll(".urgency-messaging").forEach(function(t){t.hasAttribute("data-react-initialized")||(t.setAttribute("data-react-initialized","true"),(0,o.createRoot)(t).render((0,u.jsx)(e,{})))}),n.state={urgencyMessagingData:{},showElement:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),n=e,r=[{key:"componentDidMount",value:(s=b(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:if(!(0,y.j1Q)()){t.n=1;break}return t.n=1,this.fetchUrgencyMessagingData();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"fetchUrgencyMessagingData",value:(l=b(h().m(function t(){var e,n,r=this;return h().w(function(t){for(;;)switch(t.n){case 0:if(!(e=document.querySelector(".urgency-messaging").getAttribute("data-urgency-messaging"))){t.n=2;break}return t.n=1,JSON.parse(e);case 1:n=t.v,setTimeout(function(){r.setState({showElement:!0}),setTimeout(function(){r.setState({showElement:!1})},null==n?void 0:n.displayMiliSec)},null==n?void 0:n.pageLoadMiliSec),this.setState({urgencyMessagingData:n});case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"componentDidUpdate",value:function(){window.addEventListener("scroll",function(){var t=document.querySelector(".header-container--fixed-v2"),e=document.querySelector(".urgency-messaging-container"),n=null==t?void 0:t.offsetHeight;if(e&&t)if(window.pageYOffset){var r;if((null===(r=window)||void 0===r||null===(r=r.configs)||void 0===r?void 0:r.brand)===a.brandSbn){var o=document.querySelector(".cmp-detail-header-v2__menu-wrapper .hidden-desktop");n+=null==o?void 0:o.offsetHeight}e.style.top=n+"px"}else e.style.top=""})}},{key:"render",value:function(){var t=this.state,e=t.showElement,n=t.urgencyMessagingData;return(0,u.jsx)(u.Fragment,{children:!(0,i.isEmpty)(n)&&(0,u.jsx)("div",{className:"urgency-messaging-container",children:e&&(0,u.jsx)(p,{urgencyMessagingData:n})})})}}],r&&w(n.prototype,r),c&&w(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,l,s}(r.Component),H=O}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.