/*! For license information please see critical.js.LICENSE.txt */
!function(){"use strict";var t={1757:function(t){t.exports=$}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r=n(1757),o=n.n(r),i={no:{date:{days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Sun","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Fjern valg",dateFormat:"mm/dd/yyyy",timeFormat:"hh:ii aa",firstDay:1},guide:{file:"lydfiler",minutes:"min",hours:"t",works:"Alle verk"},visit:{showMore:"Vis mer",showLess:"Vis mindre"},imageCredits:{btnText:"info"},videoPlay:{pause:"Pause",play:"Spill av"}},en:{date:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"mm/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0},guide:{file:"audio files",minutes:"min",hours:"h",works:"All works"},visit:{showMore:"Show more",showLess:"Show less"},imageCredits:{btnText:"info"},videoPlay:{pause:"Pause",play:"Play"}}},a=n(1757);function u(t){return u="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},u(t)}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(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)||d(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 s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function d(t,e){if(t){if("string"==typeof t)return h(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)?h(t,e):void 0}}function h(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}function f(){f=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),u=new P(r||[]);return o(a,"_invoke",{value:T(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p="suspendedStart",m="suspendedYield",y="executing",v="completed",g={};function w(){}function b(){}function x(){}var k={};s(k,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(I([])));E&&E!==n&&r.call(E,a)&&(k=E);var M=x.prototype=w.prototype=Object.create(k);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,i,a,c){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function T(e,n,r){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=A(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?v:m,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return b.prototype=x,o(M,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=s(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,s(t,l,"GeneratorFunction")),t.prototype=Object.create(M),t},e.awrap=function(t){return{__await:t}},_(L.prototype),s(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new L(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(M),s(M,l,"Generator"),s(M,a,(function(){return this})),s(M,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;D(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function p(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 m(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,u,"next",t)}function u(t){p(i,r,o,a,u,"throw",t)}a(void 0)}))}}function y(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,v(r.key),r)}}function v(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}var g=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getPageType",value:function(){return o()("body").data("page-type")}},{key:"getHeaderHeight",value:function(){return o()("header.header").outerHeight()}},{key:"getFooterHeight",value:function(){return o()("footer.footer").outerHeight()}},{key:"getElementHeight",value:function(t){return o()(t).outerHeight()}},{key:"getViewportHeight",value:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},{key:"getViewportWidth",value:function(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)}},{key:"getLanguage",value:function(){return o()("#lng").val()||"no"}},{key:"getLocalization",value:function(){return i[this.getLanguage()]}},{key:"getElementWidth",value:function(t){return o()(t).width()}},{key:"isMinWidth",value:function(t){return"matchMedia"in window?window.matchMedia("(min-width: ".concat(t,"px)")).matches:o()(window).width()>=t}},{key:"isXxs",value:function(){return"matchMedia"in window?window.matchMedia("(max-width: 320px)").matches:o()(window).width()<=320}},{key:"isMobile",value:function(){return"matchMedia"in window?window.matchMedia("(max-width: 575px)").matches:o()(window).width()<=576}},{key:"isTablet",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 576px) and (max-width: 767px)").matches:o()(window).width()<=768}},{key:"isSmallDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 768px) and (max-width: 991px)").matches:o()(window).width()<=992}},{key:"isLargeDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 992px) and (max-width: 1199px)").matches:o()(window).width()<=1200}},{key:"isExtraLargeDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 1200px)").matches:o()(window).width()<=1200}},{key:"isHiDPI",value:function(){return"matchMedia"in window&&window.matchMedia("(-webkit-min-device-pixel-ratio: 2),\n                                (min--moz-device-pixel-ratio: 2),\n                                (-o-min-device-pixel-ratio: 2/1),\n                                (min-device-pixel-ratio: 2),\n                                (min-resolution: 192dpi),\n                                (min-resolution: 2dppx)").matches}},{key:"isCollection",value:function(){return null!==document.querySelector("body[data-page-region='collection']")}},{key:"isPortrait",value:function(){return"matchMedia"in window&&window.matchMedia("(orientation: portrait)").matches}},{key:"isLandscape",value:function(){return"matchMedia"in window&&window.matchMedia("(orientation: landscape)").matches}},{key:"isInViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;void 0!==a&&el instanceof a&&(el=el[0]);var n=t.getBoundingClientRect();return n.top>=e&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}},{key:"isPartiallyInViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;void 0!==a&&t instanceof a&&(t=t[0]);var n=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=n.top<=r-e&&n.top+n.height>=e,u=n.left<=o&&n.left+n.width>=0;return i&&u}},{key:"hasLocalStorage",value:function(){return this.isStorageAvailable("localStorage")}},{key:"isStorageAvailable",value:function(t){var e;try{e=window[t];var n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&e&&0!==e.length}}},{key:"reduceMotion",value:function(){return!("matchMedia"in window)||window.matchMedia("(prefers-reduced-motion)").matches}},{key:"scrollTo",value:function(t){this.reduceMotion()?window.scrollTo(0,t):o()("html, body").animate({scrollTop:t},300)}},{key:"elHasClass",value:function(t,e){if(!t)return!1;var n=t.getAttribute("class");return!!n&&n.split(" ").indexOf(e)>-1}},{key:"uuid",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},{key:"stringIsHtml",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new RegExp(/<[a-z/][\s\S]*>/i).test(t)}},{key:"isEmpty",value:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}},{key:"getUrlParameter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];e||(e=location.href),t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");for(var r=new RegExp(t+"=([^&#]+)","ig");;){var o=r.exec(e);if(!o||!o[1])break;n.push(o[1])}return n.length?1==n.length?decodeURIComponent(n[0]):decodeURIComponent(n):null}},{key:"getUrlParameters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=t;return null===t&&(e=window.location.search),e.substring(1).split("&").reduce((function(t,e){var n=e.split("=");return n[0]&&(t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])),t}),{})}},{key:"getTransitionEndEvent",value:function(){var t,e=document.createElement("fakeelement"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(n.hasOwnProperty(t)&&void 0!==e.style[t])return n[t];return!1}},{key:"getAnimationEndEvent",value:function(){var t,e=document.createElement("fakeelement"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in n)if(n.hasOwnProperty(t)&&void 0!==e.style[t])return n[t];return!1}},{key:"luminanace",value:function(t,e,n){var r=[t,e,n].map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]}},{key:"contrast",value:function(t,e){return(this.luminanace(t[0],t[1],t[2])+.05)/(this.luminanace(e[0],e[1],e[2])+.05)}},{key:"hexToRgb",value:function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}},{key:"getImageColor",value:function(t,e){return new Promise((function(n,r){t.dispatch("scripts/load",{name:"ColorThief"}).then((function(){var t=new Image;t.crossOrigin="Anonymous",t.addEventListener("load",(function(){var e=new ColorThief,r=document.createElement("canvas"),o=r.getContext("2d"),i=document.createElement("div"),a=document.createElement("img");r.width=t.width,r.height=t.height,o.drawImage(t,0,0),i.appendChild(r),i.appendChild(a);var u=r.toDataURL("image/png");a.setAttribute("src",u),a.complete?n(e.getColor(a)):a.addEventListener("load",(function(){n(e.getColor(a))}))}),!1),t.src=e}))}))}},{key:"ajaxRequest",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,i){return o().ajax({type:e,url:t,beforeSend:function(e){-1===t.indexOf("https://")&&e.setRequestHeader("RequestVerificationToken",o()("#aft").val())},data:n,success:function(t){r(t)},error:function(t){i(t)}})}))}},{key:"loadScriptAsync",value:function(t){return new Promise((function(e,n){var r=document.createElement("script");r.src=t,r.async=!0,r.onload=function(t){e(t)};var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}))}},{key:"decodeHtml",value:function(t){return decodeURIComponent(t).replace(/\+/g," ")}},{key:"compareDateDays",value:function(t,e){return!(!t&&e||t&&!e)&&t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}},{key:"toInternalDateStr",value:function(t){var e=new Date(t),n=""+(e.getMonth()+1),r=""+e.getDate(),o=e.getFullYear();return n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),[o,n,r].join("-")}},{key:"parseDate",value:function(t){var e=t.split(/\D/);return new Date(e[0],--e[1],e[2])}},{key:"toShortDateString",value:function(t){var e=this.getLanguage(),n=t.getDate(),r=t.getMonth(),o=t.getFullYear();return"no"===e?"".concat(n<10?"0".concat(n):n,".").concat(++r<10?"0".concat(r):r,".").concat(o):"".concat(++r<10?"0".concat(r):r,"/").concat(n<10?"0".concat(n):n,"/").concat(o)}},{key:"toDateString",value:function(t){var e=this.getLanguage(),n=this.getLocalization(e).date.months,r=t.getDate(),o=n[t.getMonth()],i=t.getFullYear();return"no"===e?r+". "+o+" "+i:r+" "+o+" "+i}},{key:"toLocaleNumberString",value:function(t){if(isNaN(parseInt(t)))return t;var e=t.toLocaleString("en");return"no"!==this.getLanguage()?e:e.replace(/,/g," ")}},{key:"transformedPrice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n||",-";return"number"!=typeof t||isNaN(t)?t:e?Math.round(t).toString()+r:t.toFixed(2).replace(".",",")}},{key:"isValidEmail",value:function(t){return/^[ÆØÅæøåA-Za-z0-9._%+-]+@(?:[ÆØÅæøåA-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/.test(t)}},{key:"elementInView",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.getBoundingClientRect(),r=n.top,o=n.left,i=n.bottom,a=n.right,u=window,c=u.innerHeight,l=u.innerWidth;return e?(r>0&&r<c||i>0&&i<c)&&(o>0&&o<l||a>0&&a<l):r>=0&&o>=0&&i<=c&&a<=l}},{key:"noScrollBody",value:function(t){t?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}},{key:"handleQuantityChanged",value:function(t,e,n,r,o,i,a,u){var c=Array.isArray(t),l=function(){var t=m(f().mark((function t(i){var a,c,l,s;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={method:0===e?"DELETE":"PUT",headers:n,body:JSON.stringify({cartItem:{qty:e,quote_id:i}})},c=(0===e?r:o).replace("#itemId#",i).replace("#cartId#",u),t.prev=3,t.next=6,fetch(c,a);case 6:return l=t.sent,t.next=9,l.json();case 9:return s=t.sent,t.abrupt("return",s);case 13:return t.prev=13,t.t0=t.catch(3),console.log("Error modifying cart item:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(e){return t.apply(this,arguments)}}(),d=function(){var e=m(f().mark((function e(){var n,r,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c){e.next=25;break}n=s(t),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=14;break}return o=r.value,e.next=8,l(o);case 8:if(null!==e.sent){e.next=12;break}return a(),e.abrupt("return");case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),n.e(e.t0);case 19:return e.prev=19,n.f(),e.finish(19);case 22:i(),e.next=29;break;case 25:return e.next=27,l(t);case 27:e.sent?i():a();case 29:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}();d()}},{key:"toKebabCase",value:function(t){return t.replace(/[A-Z]/g,(function(t,e){return 0===e?t.toLowerCase():"-".concat(t.toLowerCase())}))}},{key:"formatTime",value:function(t){return new Date(1e3*t).toLocaleTimeString("en-GB",{timeZone:"Europe/Oslo",hour:"2-digit",minute:"2-digit"})}},{key:"validateBirthday",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0,o=!1,i="";if(/^(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.\d{4}$/.test(t)){var a=new Date(this.changeDateFormat(t)),u=new Date;if(null!==e){var c=new Date;c.setFullYear(c.getFullYear()-e),a>u||a<c?(i=n,o=!1):(o=!0,i="")}else a>u?(i=r,o=!1):(o=!0,i="")}else i=r,o=!1;return{birthdayIsValid:o,birthdayError:i}}},{key:"changeDateFormat",value:function(t){var e=t.split(".");if(3===e.length){var n=l(e,3),r=n[0],o=n[1],i=n[2];return"".concat(i,"-").concat(o,"-").concat(r)}return t}},{key:"formattedDate",value:function(t){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return console.error("Invalid date format. Expected format: yyyy-mm-dd"),t;var e=new Date(t),n=String(e.getDate()).padStart(2,"0"),r=String(e.getMonth()+1).padStart(2,"0"),o=e.getFullYear(),i="".concat(n,".").concat(r,".").concat(o);return i}},{key:"getPrices",value:(r=m(f().mark((function t(e,n,r,o,i){var a,u,l,s,d,h,p,m,y,v,g,w,b,x=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=x.length>5&&void 0!==x[5]?x[5]:[],u=x.length>6&&void 0!==x[6]?x[6]:[],l=!0,s=!1,d=n.map((function(t){return{product_child_id:0,product_id:t.id,request_id:t.id,type_id:"SimpleProduct"===t.__typename?"simple":"configurable",unit_code:"",zone:"item_list"}})),h={request:{items:d}},p={method:"POST",headers:e,body:JSON.stringify(h)},t.prev=7,t.next=10,fetch(r,p);case 10:return m=t.sent,t.next=13,fetch(o,p);case 13:if(y=t.sent,!m.ok||!y.ok){t.next=24;break}return t.next=17,m.json();case 17:return v=t.sent,t.next=20,y.json();case 20:g=t.sent,1!==i?((w=a).push.apply(w,c(v.items)),(b=u).push.apply(b,c(g.items))):(a=v.items,u=g.items),t.next=25;break;case 24:s=!0;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(7),s=!0;case 30:return l=!1,t.abrupt("return",{priceIsLoading:l,currentMemberPrices:a,currentGuestPrices:u,showErrorMessage:s});case 32:case"end":return t.stop()}}),t,null,[[7,27]])}))),function(t,e,n,o,i){return r.apply(this,arguments)})}],e&&y(t.prototype,e),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}(),w=new g;function b(t){return b="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},b(t)}!function(t){var e=-1,n=-1,r=function(t){return parseFloat(t)||0},o=function(e){var n=t(e),o=null,i=[];return n.each((function(){var e=t(this),n=e.offset().top-r(e.css("margin-top")),a=i.length>0?i[i.length-1]:null;null===a?i.push(e):Math.floor(Math.abs(o-n))<=1?i[i.length-1]=a.add(e):i.push(e),o=n})),i},i=function(e){var n={byRow:!0,property:"height",target:null,remove:!1};return"object"===b(e)?t.extend(n,e):("boolean"==typeof e?n.byRow=e:"remove"===e&&(n.remove=!0),n)},a=t.fn.matchHeight=function(e){var n=i(e);if(n.remove){var r=this;return this.css(n.property,""),t.each(a._groups,(function(t,e){e.elements=e.elements.not(r)})),this}return this.length<=1&&!n.target||(a._groups.push({elements:this,options:n}),a._apply(this,n)),this};a.version="0.7.2",a._groups=[],a._throttle=80,a._maintainScroll=!1,a._beforeUpdate=null,a._afterUpdate=null,a._rows=o,a._parse=r,a._parseOptions=i,a._apply=function(e,n){var u=i(n),c=t(e),l=[c],s=t(window).scrollTop(),d=t("html").outerHeight(!0),h=c.parents().filter(":hidden");return h.each((function(){var e=t(this);e.data("style-cache",e.attr("style"))})),h.css("display","block"),u.byRow&&!u.target&&(c.each((function(){var e=t(this),n=e.css("display");"inline-block"!==n&&"flex"!==n&&"inline-flex"!==n&&(n="block"),e.data("style-cache",e.attr("style")),e.css({display:n,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})})),l=o(c),c.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||"")}))),t.each(l,(function(e,n){var o=t(n),i=0;if(u.target)i=u.target.outerHeight(!1);else{if(u.byRow&&o.length<=1)return void o.css(u.property,"");o.each((function(){var e=t(this),n=e.attr("style"),r=e.css("display");"inline-block"!==r&&"flex"!==r&&"inline-flex"!==r&&(r="block");var o={display:r};o[u.property]="",e.css(o),e.outerHeight(!1)>i&&(i=e.outerHeight(!1)),n?e.attr("style",n):e.css("display","")}))}o.each((function(){var e=t(this),n=0;u.target&&e.is(u.target)||("border-box"!==e.css("box-sizing")&&(n+=r(e.css("border-top-width"))+r(e.css("border-bottom-width")),n+=r(e.css("padding-top"))+r(e.css("padding-bottom"))),e.css(u.property,i-n+"px"))}))})),h.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||null)})),a._maintainScroll&&t(window).scrollTop(s/d*t("html").outerHeight(!0)),this},a._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each((function(){var n=t(this),r=n.attr("data-mh")||n.attr("data-match-height");e[r]=r in e?e[r].add(n):n})),t.each(e,(function(){this.matchHeight(!0)}))};var u=function(e){a._beforeUpdate&&a._beforeUpdate(e,a._groups),t.each(a._groups,(function(){a._apply(this.elements,this.options)})),a._afterUpdate&&a._afterUpdate(e,a._groups)};a._update=function(r,o){if(o&&"resize"===o.type){var i=t(window).width();if(i===e)return;e=i}r?-1===n&&(n=setTimeout((function(){u(o),n=-1}),a._throttle)):u(o)},t(a._applyDataApi);var c=t.fn.on?"on":"bind";t(window)[c]("load",(function(t){a._update(!1,t)})),t(window)[c]("resize orientationchange",(function(t){a._update(!0,t)}))}(n(1757)),window.museet=window.museet||{},window.museet.util=w,o()("html").removeClass("no-js"),o()("noscript").remove(),window.onload=function(){w.loadScriptAsync(window.museet.bundles.main)}}();
