(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3787],{3554:function(e,t,r){"use strict";r.d(t,{b:function(){return l}});var n=r(27261),o=r(9710);function i(){var e=(0,n.Z)(["\n  query getArea ($id: Float, $postalCode: String, $edition: Float) {\n    area (id: $id, postalCode: $postalCode, edition: $edition) {\n      id\n      postalCode\n      city\n    }\n  }\n"]);return i=function(){return e},e}function s(){var e=(0,n.Z)(["\nquery getAreas ($query: String!) {\n  areas(query: $query) {\n    id\n    city,\n    municipalityName\n  }\n}"]);return s=function(){return e},e}t.Z=(0,o.ZP)(s());var l=(0,o.ZP)(i())},63195:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M}});var n=r(809),o=r.n(n),i=r(92447),s=r(74047),l=r(52700),c=r(33814),a=r(44102),u=r(20775),f=(r(26981),r(67294)),p=r(43083),d=r(70798),m=r(4706),h=r(26265),v=r(80535),g=r(69194),y=f.createElement,b=function(e){var t=e.sponsorUrl,r=e.sponsorFacebookUrl,n=e.sponsorTitle,o=e.prizeTitle,i=t&&t.content?(0,g.mQ)(t.content):null;return y("div",{className:"prize-actions"},i?y("a",{className:"company-link",href:i,target:"_blank"},n&&n.content?n.content:""):y("span",{className:"company"},n&&n.content?n.content:""),r&&r.content&&y("a",{className:"facebook-link",href:r.content,target:"_blank",title:o&&n.content?o.content:""},y("img",{src:"/static/svg/facebook-icon.svg"})))},w=f.createElement;function k(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}var N,Z=function(e){(0,c.Z)(r,e);var t=k(r);function r(e){var n;return(0,s.Z)(this,r),n=t.call(this,e),(0,h.Z)((0,m.Z)(n),"checkHeight",(function(){n.setState({isComponentClamped:n.descRef.current.scrollHeight>n.descRef.current.offsetHeight})})),(0,h.Z)((0,m.Z)(n),"toggleFullDescription",(function(){n.setState((function(e){return{isFullDescriptionVisible:!e.isFullDescriptionVisible}}))})),n.descRef=f.createRef(),n.state={rendered:!1,isFullDescriptionVisible:!1,isComponentClamped:!1},n}return(0,l.Z)(r,[{key:"componentDidMount",value:function(){this.setState({rendered:!0,isComponentClamped:this.descRef.current.scrollHeight>this.descRef.current.offsetHeight}),window.addEventListener("resize",this.checkHeight)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.checkHeight)}},{key:"render",value:function(){var e=(0,v.rb)(this.props.description),t=this.state,r=t.isFullDescriptionVisible,n=t.rendered,o=t.isComponentClamped,i=r?"Les mindre":"Les mer";return w("div",{className:"large prize-tile-description"},w("span",{ref:this.descRef,className:"".concat(r?"":"clamp")},e),n&&o&&w("a",{className:"show-more link-with-arrow",onClick:this.toggleFullDescription},i))}}]),r}(f.Component),z=f.createElement,_=function(e){var t=e.prize,r=t.prizeImage,n=t.prizeTitle,o=t.sponsorTitle,i=t.sponsorFacebookUrl,s=t.sponsorUrl,l=t.prizeDesc,c=t.sponsorImage;return z("div",{className:"prize-tile"},z("div",{className:"prize-tile-background-image desktop-display-only",style:{backgroundImage:"url(".concat(r&&r.content?r.content:"/static/img/placeholder_news-x2.png",")")}}),z("div",{className:"mobile-display-only prize-tile-image-wrapper"},z("img",{className:"prize-tile-image",src:r&&r.content?r.content:"/static/img/placeholder_news-x2.png"}),c&&c.content&&z("img",{src:c.content,className:"prize-tile-logo"})),z(b,{prizeTitle:n,sponsorTitle:o,sponsorFacebookUrl:i,sponsorUrl:s}),l&&l.content&&z(Z,{description:l.content}),c&&c.content&&z("img",{src:c.content,className:"desktop-display-only prize-tile-logo"}))},S=f.createElement;function P(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}var T,x=(0,d.f3)((function(e){return{literalsStore:e.literalsStore}}))(N=(0,d.Pi)(N=function(e){(0,c.Z)(r,e);var t=P(r);function r(){var e;(0,s.Z)(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,h.Z)((0,m.Z)(e),"renderPrizes",(function(e){return e.map((function(e,t){return S(_,{prize:e,key:t})}))})),(0,h.Z)((0,m.Z)(e),"renderSection",(function(t){var r=t[0],n=t.slice(1),o=r.sponsorImage,i=r.prizeImage,s=r.sponsorTitle,l=r.sponsorUrl,c=r.prizeTitle,a=r.sponsorFacebookUrl,u=r.prizeDesc;return S(f.Fragment,null,S("div",{className:"sponsor",style:{width:"unset"}},S("img",{src:"/static/svg/emblem.svg",className:"emblem mobile-display-only"}),i&&i.content&&S("div",{className:"sponsor-image-wrapper"},S("div",{className:"sponsor-image"},S("img",{src:i.content,alt:s&&s.content?s.content:""}),o&&o.content&&S("img",{src:o.content,className:"sponsor-logo"})),S("div",{className:"prize-tile-info"},S(b,{prizeTitle:c,sponsorTitle:s,sponsorFacebookUrl:a,sponsorUrl:l})),S("img",{src:"/static/svg/emblem.svg",className:"emblem desktop-display-only"})),u&&u.content&&S("div",{className:"large main-prize sponsor-description"},(0,v.rb)(u.content))),n&&n.length>0&&S("div",{className:"prizes-list"},e.renderPrizes(n)))})),e}return(0,l.Z)(r,[{key:"render",value:function(){var e=this.props.winner,t=e.nested?this.props.literalsStore.groupByPrefix(e.nested.id.replace("]","").replace("[","")):null;return S("div",{className:"main"},S("div",{className:"header main-prize"},e.header.content),t&&t.length>0&&this.renderSection(t))}}]),r}(f.Component))||N)||N,R=f.createElement;function C(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}var O,E=(0,d.f3)((function(e){return{literalsStore:e.literalsStore}}))(T=(0,d.Pi)(T=function(e){(0,c.Z)(r,e);var t=C(r);function r(){var e;(0,s.Z)(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,h.Z)((0,m.Z)(e),"renderPrizes",(function(e){return e.map((function(e,t){return R(_,{prize:e,key:t})}))})),e}return(0,l.Z)(r,[{key:"render",value:function(){var e=this,t=this.props.winners;return t&&t.length>0&&R("div",{className:"other"},t.map((function(t,r){var n=t.nested?e.props.literalsStore.groupByPrefix(t.nested.id.replace("]","").replace("[","")):null;return t.nested&&n&&0!==n.length?R("div",{className:"winner-wrapper",key:r},R("div",{className:"winner"},R("div",{className:"header"},t.header.content),R("div",{className:"prizes-list"},e.renderPrizes(n)))):null})))}}]),r}(f.Component))||T)||T,D=f.createElement,j=function(e){var t=e.sponsor;return D("div",{className:"prize-sponsor"},t.sponsorImage&&D("div",{className:"img-box"},D("img",{src:t.sponsorImage.content,alt:t.sponsorTitle.content})),D("blockquote",null,(0,v.rb)(t.sponsorDesc.content)),D("span",{className:"prize-sponsor-title"},t.sponsorTitle.content))},B=f.createElement,I=function(e){var t=e.sponsors;return B("div",{className:"bg-section-primary"},B("div",{className:"container"},B("div",{className:"prize-sponsors"},t.map((function(e){return B(j,{key:e.order.content,sponsor:e})})))))},F=f.createElement;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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}var M=(0,p.Z)({title:"Premier",active:"premier",page:"prizes",hideLogos:!0})(O=(0,d.f3)((function(e){return{literalsStore:e.literalsStore}}))(O=(0,d.Pi)(O=function(e){(0,c.Z)(r,e);var t=X(r);function r(){return(0,s.Z)(this,r),t.apply(this,arguments)}return(0,l.Z)(r,[{key:"render",value:function(){var e=this.props.literalsStore.groupByPrefix("prizes.winner"),t=this.props.literalsStore.groupByPrefix("prizes.sponsors");return e&&e.length>0&&F("div",{className:"page prizes-page"},F(x,{winner:e[0]}),e.length>1&&F(E,{winners:e.slice(1)}),t.length>0&&F(I,{sponsors:t}))}}],[{key:"getInitialProps",value:function(){var e=(0,i.Z)(o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.stores,r.layoutStore;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),r}(f.Component))||O)||O)||O},69194:function(e,t,r){"use strict";r.d(t,{oH:function(){return a},Cp:function(){return u},a$:function(){return f},F_:function(){return p},D0:function(){return d},mQ:function(){return m},G_:function(){return h}});var n=r(809),o=r.n(n),i=r(92447),s=r(89434),l=r(3554),c=r(80535),a=function(e,t,r,n){return!e&&t?"Dette feltet er p\xe5krevd.":e.length>0&&!e.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i)?"Vennligst skriv en gyldig e-post.":e.length>n?"E-posten er for lang.":""},u=function(e,t,r,n){return!e&&t?"Dette feltet er p\xe5krevd.":e.length>n?"Teksten er for lang. Maks lengde er ".concat(n," tegn."):e.length>0&&e.length<r?"Teksten er dessverre litt for kort. Minimum lengde er ".concat(r," tegn."):""},f=function(e,t){return!e&&t?"Dette feltet er p\xe5krevd.":e.length>0&&!e.match(/^[0-9]{8}$/i)?"Nummeret er ikke gyldig. Vennligst skriv inn 8 siffer.":""},p=40240,d=function(e,t){return e&&"image/jpeg"!==e.type&&"image/png"!==e.type?"Gyldige formater er jpeg eller png.":e&&e.size/1024>t?"Filen ".concat(e.name," er for stor. Maksimum st\xf8rrelse er ").concat(t/1024," MB."):""},m=function(e){var t=e.trim();return t.startsWith("http")?t:t.startsWith("www")?"//".concat(t):null},h=function(){var e=(0,i.Z)(o().mark((function e(t,r){var n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t||!r){e.next=2;break}return e.abrupt("return",{message:"Dette feltet er p\xe5krevd."});case 2:if(t.match(/^[0-9]{4}$/)){e.next=4;break}return e.abrupt("return",{message:"Postnummer er ikke gyldig. Vennligst skriv inn 4 siffer."});case 4:return e.next=6,s.S.query({query:l.b,variables:{postalCode:t}});case 6:if(n=e.sent,!(i=n.data.area)){e.next=10;break}return e.abrupt("return",{message:"",city:(0,c.ZP)(i.city),areaId:i.id});case 10:return e.abrupt("return",{message:"Ingen poststed for dette postnummer."});case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},81640:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/prizes",function(){return r(63195)}])},84925:function(e,t,r){var n;"undefined"!==typeof self&&self,n=function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.default=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=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},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(2),l=(n=s)&&n.__esModule?n:{default:n},c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.smoothScroll=r.smoothScroll.bind(r),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){r(3).polyfill()}},{key:"smoothScroll",value:function(e){var t=this;e.preventDefault();var r=function(){return 0};"undefined"!==typeof this.props.offset&&(r=this.props.offset&&this.props.offset.constructor&&this.props.offset.apply?this.props.offset:function(){return parseInt(t.props.offset)});var n=e.currentTarget.getAttribute("href").slice(1),o=document.getElementById(n).getBoundingClientRect().top+window.pageYOffset;window.scroll({top:o-r(),behavior:"smooth"}),this.props.onClick&&this.props.onClick(e)}},{key:"render",value:function(){var e=this.props,t=(e.offset,function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["offset"]));return l.default.createElement("a",o({},t,{onClick:this.smoothScroll}))}}]),t}(s.Component);t.default=c},function(t,r){t.exports=e},function(e,t,r){!function(){"use strict";e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var r=p(this),n=r.getBoundingClientRect(),i=this.getBoundingClientRect();r!==t.body?(m.call(this,r,r.scrollLeft+i.left-n.left,r.scrollTop+i.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function a(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function f(e){var t=a(e,"Y")&&u(e,"Y"),r=a(e,"X")&&u(e,"X");return t||r}function p(e){var r;do{r=(e=e.parentNode)===t.body}while(!1===r&&!1===f(e));return r=null,e}function d(t){var r,n,o,s,l=(i()-t.startTime)/468;s=l=l>1?1:l,r=.5*(1-Math.cos(Math.PI*s)),n=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,o),n===t.x&&o===t.y||e.requestAnimationFrame(d.bind(e,t))}function m(r,n,s){var c,a,u,f,p=i();r===t.body?(c=e,a=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=o.scroll):(c=r,a=r.scrollLeft,u=r.scrollTop,f=l),d({scrollable:c,method:f,startTime:p,startX:a,startY:u,x:n,y:s})}}}}()}])},e.exports=n(r(67294))}},function(e){e.O(0,[9774,4446,4885,7157,5335,9710,6748,1830,8469,6981,6105,9089,3083,2888,179],(function(){return t=81640,e(e.s=t);var t}));var t=e.O();_N_E=t}]);