(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1032],{66466:function(e,t,o){"use strict";o.d(t,{Z:function(){return S}});var i=o(73679),n=o(43350),r=o(80040),a=o(59307),l=o(48415),s=o(73667),c=o(3117),d=o(90849),u=o(27378),h=o(60042),_=o.n(h),p=o(98598),f=o(94221),m=o(42600),g=o.n(m),v=o(8944),w=o.n(v),b=o(24246);var y=function(e){var t=e.onClick,o=e.color,i=void 0===o?"dark":o,n=e.direction,r=e.hide;return(0,b.jsx)("button",{onClick:t,"aria-label":"".concat(n," slide"),className:r?w().hidden:w()["".concat(n,"Arrow")],children:(0,b.jsx)(g(),{height:40,width:40,name:"arrow",color:i})})};function x(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,i=(0,c.Z)(e);if(t){var n=(0,c.Z)(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return(0,s.Z)(this,o)}}var C=function(e){(0,l.Z)(o,e);var t=x(o);function o(){var e;return(0,n.Z)(this,o),e=t.call(this),(0,d.Z)((0,a.Z)(e),"onResize",(function(){var t=window.innerWidth,o=e.getSlidesToShow();e.setState({slidesToShow:o,hideRightArrow:o>=e.props.children.length,hideLeftArrow:0===e.state.firstSlide,mobile:t<=480}),e.setActiveSlides(void 0,o)})),(0,d.Z)((0,a.Z)(e),"getSlidesToShow",(function(){var t,o=window.innerWidth,n=e.props.maxSlides;if(Math.max.apply(Math,(0,i.Z)(e.props.settings.map((function(e){return e.breakpoint}))))>o){var r=e.props.settings.filter((function(e){return e.breakpoint>o})),a=Math.min.apply(Math,(0,i.Z)(r.map((function(e){return e.breakpoint})))),l=e.props.settings.filter((function(e){return e.breakpoint===a}));t=l.length>0?l[0].slides:n}else t=n;return e.props.slidesToShow||t})),(0,d.Z)((0,a.Z)(e),"setActiveSlides",(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.state.firstSlide,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.state.slidesToShow,i=[],n=t;n<t+o;n+=1)i.push(n);e.props.getActiveSlides(i)})),(0,d.Z)((0,a.Z)(e),"firstLoadSettings",(function(){var t=window.innerWidth,o=e.getSlidesToShow();e.setState({slidesToShow:o,firstSlide:0,hideRightArrow:o>=e.props.children.length,hideLeftArrow:!0,firstTimeLoad:!1,mobile:t<=480}),e.setActiveSlides(0,o)})),(0,d.Z)((0,a.Z)(e),"beforeSlide",(function(t,o){var i=o;e.setState({firstSlide:i,hideLeftArrow:0===o,hideRightArrow:o+e.state.slidesToShow>=e.props.children.length}),e.setActiveSlides(i)})),(0,d.Z)((0,a.Z)(e),"arrowClick",(function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right";e.props.trackEvent("content_component_action",{payload:{actionType:"Slide",componentType:"Content Belt",contentType:"Mixed",placement:"Page",title:"left"===o?"Left arrow":"Right arrow"}}),t()})),e.state={firstTimeLoad:!0},e}return(0,r.Z)(o,[{key:"componentDidMount",value:function(){this.firstLoadSettings()}},{key:"componentDidUpdate",value:function(e){e.children.length!==this.props.children.length&&this.firstLoadSettings()}},{key:"render",value:function(){var e=this;return(0,b.jsx)("div",{className:_()(w().carousel,this.props.classNameWrapper,this.props.className,this.props.static?w().static:null,this.props.fullWidth?w().full_width:null),children:(0,b.jsx)(p.ZP,{beforeSlide:this.props.wrapAround?function(){}:this.beforeSlide,heightMode:this.props.heightMode,cellSpacing:this.props.fullWidth?null:20,slideWidth:this.props.slideWidth,cellAlign:this.props.cellAlign,framePadding:this.props.framePadding,renderBottomCenterControls:function(){},renderCenterLeftControls:function(t){var o=t.previousSlide;return(0,b.jsx)(y,{onClick:function(){return e.arrowClick(o,"left")},hide:(e.state.firstTimeLoad||e.state.hideLeftArrow)&&!e.props.wrapAround,direction:"left",color:e.props.arrowColor})},renderCenterRightControls:function(t){var o=t.nextSlide;return(0,b.jsx)(y,{onClick:function(){return e.arrowClick(o)},hide:(e.state.firstTimeLoad||e.state.hideRightArrow)&&!e.props.wrapAround,direction:"right",color:e.props.arrowColor})},slidesToShow:this.props.slidesToShow||this.state.slidesToShow,onResize:this.onResize,initialSlideWidth:this.props.initialSlideWidth,initialSlideHeight:this.props.initialSlideHeight,frameOverflow:this.state.mobile?"visible":"hidden",autoplay:this.props.autoplay,autoplayInterval:this.props.autoplayInterval,wrapAround:this.props.wrapAround,children:this.props.children.map((function(e,t){return(0,b.jsx)("div",{onClick:function(e){return e.stopPropagation()},onKeyPress:function(e){return e.stopPropagation()},children:e},t)}))})})}}]),o}(u.Component);(0,d.Z)(C,"defaultProps",{maxSlides:4,settings:[{breakpoint:1300,slides:3},{breakpoint:1070,slides:2},{breakpoint:770,slides:1}],getActiveSlides:function(){}});var S=(0,f.Z)(C)},51044:function(e,t,o){"use strict";o(27378);var i=o(60042),n=o.n(i),r=o(8898),a=o.n(r),l=o(24246);function s(e){var t=e.fullHeight?"full_height":"";return(0,l.jsx)("div",{className:n()(a().max_width,a()[e.width],a()[t],a()[e.padding],e.className),children:e.children})}s.defaultProps={className:""},t.Z=s},50135:function(e,t,o){"use strict";o.r(t);var i=o(27378),n=o(13666),r=o(60042),a=o.n(r),l=o(55386),s=o(78033),c=o.n(s),d=o(24246),u="https://pixels-cache.icelandair.com/upload/",h=function(e){var t,o=e.className,r=void 0===o?"":o,s=e.noCdn,h=void 0!==s&&s,_=e.shouldUpdate,p=void 0===_||_,f=e.cover,m=void 0===f||f,g=e.crop,v=void 0===g?"auto":g,w=e.handleHeightResize,b=void 0===w||w,y=e.shouldResize,x=void 0===y||y,C=e.position,S=void 0===C?"center":C,T=e.updateDelay,j=void 0===T?0:T,k=e.alt,Z=void 0===k?"":k,O=e.src,A=e.width,M=e.height,N=e.children,P=e.skipResizeDetectorOnMount,R=void 0===P||P,W=(0,i.useState)(null),L=W[0],I=W[1],V=(0,i.useState)(!1),H=V[0],z=V[1],D="".concat(u,"w_80%2Ch_45%2Cg_").concat(""!==v&&!1!==v?v:"auto","%2Cc_fill%2Cf_auto%2Cq_auto%2Ce_blur:140/icelandair").concat(O),E="".concat(u).concat(A?"w_".concat(A,","):"").concat(M?"h_".concat(M,","):"","g_auto%2Cc_fill%2Cf_auto%2Cq_auto/icelandair").concat(O),q=(0,i.useState)(null),B=q[0],X=q[1],F=(0,i.useState)({imageWidth:null,imageHeight:null}),G=F[0],J=F[1],K=(0,i.useRef)(null);return(0,i.useEffect)((function(){if(void 0!==K&&p){var e=K.current,t=e.clientHeight,o=e.clientWidth,i=G.imageWidth||o;if(i){var n=window.devicePixelRatio||1,r=250*Math.round((A||i*n)/250),a=r>3200?3200:r,l=a?"w_".concat(a):"",s="".concat(100*Math.round((M||t*n)/100)),c=s?"h_".concat(s):"",d="g_".concat(v,",c_fill,f_auto,q_auto"),h="".concat(l).concat(l?",":"").concat(c).concat(c?",":"").concat(d),_=v?h:l;I("".concat(u).concat(_,"/icelandair").concat(O))}}}),[A,M,O,v,p,G]),(0,i.useEffect)((function(){var e=!0;return L&&(0,l.loadImage)(L).then((function(t){var o=!1===v?"/ contain":m?" / cover":"",i={background:"url(".concat(t.src,") ").concat(S," center ").concat(o," no-repeat")};e&&(X(i),setTimeout((function(){return z(!0)}),j))})).catch((function(){console.warn("Image cdn failed to load, loading placeholder");var t={background:"url(https://pixels.icelandair.com".concat("/bltee88a7b6153eb597.jpg",") no-repeat ").concat(S," center / cover")};e&&(X(t),setTimeout((function(){return z(!0)}),j))})),function(){e=!1}}),[L,m,S,j,v]),t=p?B:{background:"url(".concat(h?O:E,") no-repeat center / cover")},(0,d.jsxs)("span",{style:t,className:a()(r,c().image),ref:K,children:[i.Children.map(N,(function(e){return e})),!h&&p&&(0,d.jsx)("span",{className:a()(c().blur,H&&c().updated),children:(0,d.jsx)("span",{className:a()(c().placeholder,H&&c().updated),style:{background:"url(".concat(D,") no-repeat center center / cover")},"aria-label":Z})}),x&&(0,d.jsx)(n.default,{nodeType:"span",handleWidth:!0,skipOnMount:R,handleHeight:b,onResize:function(e,t){return J({imageWidth:e,imageHeight:t})}})]})};t.default=(0,i.memo)(h)},22731:function(e,t,o){"use strict";o.d(t,{Z:function(){return w}});o(27378);var i=o(61403),n=o.n(i),r=o(16228),a=o(20652),l=o(42600),s=o.n(l),c=o(61320),d=o.n(c),u=o(97867),h=o(60498),_=o(24246);function p(e){var t=(0,u.stripHtml)(e.text);return{"@context":"https://schema.org","@type":"VideoObject",name:e.title,description:t,thumbnailUrl:"".concat(h.nl,"w_240%2Ch_120%2Cg_auto%2Cc_fill%2Cf_auto%2Cq_auto/icelandair").concat(e.media[0].src),uploadDate:d()(e.uploadDate).toISOString()}}function f(e){var t=e.item;return t.title&&t.text&&t.uploadDate&&t.media&&t.media.length>0&&t.media[0].src?(0,_.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(p(t))}},"videoschema-".concat(t.id)):null}var m=o(66466),g=o(34825),v=o.n(g),w=function(e){var t=e.isOpen,o=e.onClose,i=e.videoId,l=e.schemaObject,c=e.multiVideo,d=(0,a.useTranslations)()._;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(n(),{ariaHideApp:!1,isOpen:t,contentLabel:"Video feature",className:v().video_modal,overlayClassName:v().overlay,onRequestClose:o,shouldCloseOnOverlayClick:!1,children:[(0,_.jsx)("button",{onClick:o,"aria-label":d("icelandair.com.close"),className:v().close,children:(0,_.jsx)(s(),{name:"close"})}),c&&c.multiVideo.length>0?(0,_.jsx)(m.Z,{className:v().carousel,heightMode:"max",wrapAround:!0,maxSlides:1,settings:[{breakpoint:3e3,slides:1}],children:c.multiVideo.map((function(e,t){return(0,_.jsx)("div",{className:v().video_wrap,children:(0,_.jsx)(r.Z,{videoId:e.videoId,className:v().youtube,opts:{playerVars:{controls:1,rel:0}}})},t)}))}):(0,_.jsx)("div",{className:v().video_wrap,children:(0,_.jsx)(r.Z,{videoId:i,className:v().youtube,opts:{playerVars:{controls:1,rel:0}}})})]},"VideoModal"),l?(0,_.jsx)(f,{item:l}):null]})}},74586:function(e,t,o){"use strict";var i,n=o(90089),r=o(90849),a=o(27378),l=o(60042),s=o.n(l),c=o(70090),d=o(42901),u=o.n(d),h=o(24246),_=["as","variant","isHTML","children","className","color","data-cy"];function p(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function f(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){(0,r.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}!function(e){e[e.h1=0]="h1",e[e.h2=1]="h2",e[e.h3=2]="h3",e[e.h4=3]="h4",e[e.h5=4]="h5",e[e.h6=5]="h6",e[e.p=6]="p",e[e.span=7]="span",e[e.ul=8]="ul",e[e.ol=9]="ol",e[e.li=10]="li"}(i||(i={}));var m=function(e){return/^h[1-6]$/.test(e)},g={trim:!0,replace:function(e){if(!(e instanceof c.W_))return null;if(Object.keys(i).includes(e.name)){var t=e.name,o=f({as:t},m(t)&&{color:"blue"});return(0,h.jsx)(w,f(f({},o),{},{children:(0,c.du)(e.children,g)}))}return null}},v=function(e){try{return(0,c.ZP)(e,g)}catch(t){0}},w=(0,a.forwardRef)((function(e,t){var o=e.as,i=void 0===o?"p":o,l=e.variant,c=e.isHTML,d=e.children,h=e.className,p=e.color,g=e["data-cy"],w=(0,n.Z)(e,_),b=c?"div":i,y=l||i,x=(0,r.Z)({},u()[y],!c),C=m(i)?p||"blue":void 0,S="color-".concat(C||p||"grey");return(0,a.createElement)(b,f({className:s()(u().container,x,S,h),children:c?v(d):d,ref:t,"data-cy":g},w))}));t.Z=w},8944:function(e){e.exports={carousel:"Carousel_carousel__mAO8p",weather:"Carousel_weather__Z_vhk",destination:"Carousel_destination__FPCCY","instantsearch-destination":"Carousel_instantsearch-destination__TlI3y",full_width:"Carousel_full_width__JhYsA",carousel_container:"Carousel_carousel_container__UkX_S",rightArrow:"Carousel_rightArrow__Z2S_n",leftArrow:"Carousel_leftArrow__hD8kF",hidden:"Carousel_hidden__9uoQ4",static:"Carousel_static__JEqJR"}},8898:function(e){e.exports={max_width:"MaxWidth_max_width__Ozayy",narrow:"MaxWidth_narrow__9CnBo",super_narrow:"MaxWidth_super_narrow__Q5k1g",full_height:"MaxWidth_full_height__YKu_r",ceroXPadding:"MaxWidth_ceroXPadding__St_SN"}},78033:function(e){e.exports={image:"Image_image__2sK2u",blur:"Image_blur__xoytn",updated:"Image_updated__eCx9X",placeholder:"Image_placeholder__HC_jX",img_wrap:"Image_img_wrap__fpRqg",image_container:"Image_image_container__nu7Pb",max_height:"Image_max_height__4rZbb",fullwidth:"Image_fullwidth__BmOV8"}},34825:function(e){e.exports={play_wrap:"VideoModal_play_wrap__1_ZlO",play_button:"VideoModal_play_button__f7G2h",video_wrap:"VideoModal_video_wrap__c5owm",youtube:"VideoModal_youtube__jykLg",close:"VideoModal_close__6F7o5",video_modal:"VideoModal_video_modal__eN9Pe",carousel:"VideoModal_carousel__lGthb",carousel_item:"VideoModal_carousel_item__0cz5y"}},42901:function(e){e.exports={container:"Text_container__Lu8v3",h1:"Text_h1__iHL2d",h2:"Text_h2__4WdjZ",h3:"Text_h3__vA4FX",h4:"Text_h4__wtBCK",h5:"Text_h5__Z0a7t",h6:"Text_h6__o2T6M",body1:"Text_body1__cx_Hp",p:"Text_p__CRwvM",span:"Text_span__PTTv6",body2:"Text_body2__XrrsE",ol:"Text_ol__o_C4g",ul:"Text_ul__oiiG0",body3:"Text_body3__zA_sl",body4:"Text_body4__npGHc",body5:"Text_body5__NzzVg",body6:"Text_body6__sh2u_"}}}]);
//# sourceMappingURL=1032-ff0d25362b5d9d87.js.map