@kartverket/geonorge-web-components 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DownloadItem.js +1 -1
- package/DownloadItem.js.map +1 -1
- package/MainMenu.js.map +1 -1
- package/MainNavigation.js +1 -1
- package/MainNavigation.js.map +1 -1
- package/MainSearchField.js.map +1 -1
- package/MapItem.js +1 -1
- package/MapItem.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/DownloadItem.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DownloadItem=e())}(self,(()=>(()=>{var t={9474:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([t.id,"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,SAAA,CAIA,cAAA,CEFA,0BFPJ,8CAOQ,aAAA,CAAA,CAGJ,mDACI,aAAA,CAEJ,uDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,uDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,8DACI,YAAA,CAIJ,iEACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,iEAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,sDACI,iBAAA,CACA,oFItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,oFAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,oFAgBQ,YAAA,CAAA,CAEJ,yFKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,uGACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,6GACI,yBAAA,CACA,aG7EA,CHgFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCGxGL,CH0GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\n.download-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n cursor: pointer;\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .download-icon {\n svg {\n width: 45px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 52px;\n height: 37px;\n }\n }\n }\n }\n .download-item-list-wrapper {\n position: absolute;\n .download-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\n}\n',"\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n","@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: $screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: $screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: $screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: $screen-phablet) {\n @content;\n }\n }\n}\n","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n","@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n"],sourceRoot:""}]);const s=a},1942:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="download-items-container">\n <button id="download-toggle-button" class="icon-toggle-button">\n <span id="download-toggle-button-counter" class="counter"></span>\n <span id="download-toggle-button-icon" class="download-icon"></span>\n </button>\n <div class="download-item-list-wrapper">\n <div id="download-item-list-container" class="download-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var d=this[s][0];null!=d&&(a[d]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);o&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},4663:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{d(o.next(t))}catch(t){r(t)}}function s(t){try{d(o.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}d((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),d=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,d),d}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1397),e),i(n(985),e),i(n(265),e),i(n(5969),e),i(n(5773),e),i(n(4271),e),i(n(9766),e),i(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5195:t=>{t.exports='<svg viewBox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__176tcrb__downloads__cloud "><path d="M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z" id="Shape"></path></g></g></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},3075:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadItems=void 0;const d=n(406),l=s(n(5195)),c=s(n(2374)),u=n(9399),p=n(1406);let g=class extends d.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderDownloadItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.name;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=c.default,n.dataset.downloadItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.name} from downloads`:`Fjern ${t.name} fra kurv`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyDownloadItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`),n.innerText="en"===this.language?"Go to download":"Til nedlasting",n.classList.add("page-link-element"),this.downloadItemListContainer.innerHTML=`<ul>${e}</ul>`,this.downloadItemListContainer.prepend(n)},this.clickOutsideDownloadItemsContainer=this.clickOutsideDownloadItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedDownloadItems=this.getUpdatedDownloadItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.downloadButton=(0,d.getShadowRootElement)(this,"#download-toggle-button"),this.downloadIcon=(0,d.getShadowRootElement)(this,"#download-toggle-button-icon"),this.downloadIconCounter=(0,d.getShadowRootElement)(this,"#download-toggle-button-counter"),this.downloadItemListContainer=(0,d.getShadowRootElement)(this,"#download-item-list-container"),this.getUpdatedDownloadItems(),this.downloadIcon.innerHTML=l.default,this.renderDownloadItemsCounter(),document.addEventListener("click",this.clickOutsideDownloadItemsContainer),document.addEventListener("downloadItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter()}getUpdatedDownloadItems(){const t=(0,u.getDownloadItems)();this.downloadItems=t.map((t=>(0,u.getDownloadItemMetadata)(t))).filter((t=>t))}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideDownloadItemsContainer)}clickOutsideDownloadItemsContainer(t){const e=t.composedPath()[0];e.closest("#download-item-list-container")||e.closest("#download-toggle-button")||this.hideListContainer()}renderDownloadItemsCounter(){const t=(0,u.getDownloadItemsCount)();t?(this.downloadIconCounter.innerHTML=t.toString(),this.downloadIconCounter.classList.remove("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Show download item list":"Vis liste med elementer til nedlasting")):(this.downloadIconCounter.innerHTML="",this.downloadIconCounter.classList.add("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Go to download page":"Gå til nedlastingsside"))}buttonClicked(t){this.downloadItems&&this.downloadItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyDownloadItemsList.emit():window.location.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`)}removeDownloadItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.downloadItem?JSON.parse(n.dataset.downloadItem):null;e&&(t.stopPropagation(),(0,u.removeDownloadItem)(e),this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter(),this.downloadItems&&this.downloadItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open")}downloadItemsChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}languageChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}preventRedirectChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}static setup(t,e){const n=(0,d.getElement)(t);e.active&&(n.showList=e.active)}};g.elementSelector="download-items",r([(0,d.Prop)()],g.prototype,"id",void 0),r([(0,d.Prop)()],g.prototype,"environment",void 0),r([(0,d.Prop)()],g.prototype,"language",void 0),r([(0,d.Toggle)()],g.prototype,"showList",void 0),r([(0,d.Toggle)()],g.prototype,"preventRedirect",void 0),r([(0,d.Dispatch)("onOpenEmptyDownloadItemsList")],g.prototype,"onOpenEmptyDownloadItemsList",void 0),r([(0,d.Listen)("click","#download-toggle-button")],g.prototype,"buttonClicked",null),r([(0,d.Listen)("click","#download-item-list-container")],g.prototype,"removeDownloadItemClicked",null),r([(0,d.Watch)("showlist")],g.prototype,"showMenuChanged",null),r([(0,d.Watch)("downloadItems")],g.prototype,"downloadItemsChanged",null),r([(0,d.Watch)("language")],g.prototype,"languageChanged",null),r([(0,d.Watch)("preventredirect")],g.prototype,"preventRedirectChanged",null),g=r([(0,d.Component)({tag:"download-items",template:Promise.resolve().then((()=>a(n(1942)))),style:Promise.resolve().then((()=>a(n(9474))))})],g),e.DownloadItems=g},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var o=0;o<n.length;o++){let t=n[o];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);const i=`expires=${o.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${i};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},9399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDownloadItem=e.getDownloadItemMetadata=e.getDownloadItemsCount=e.getDownloadItems=void 0;const o=n(4724);e.getDownloadItems=()=>localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems).filter((t=>t)):[],e.getDownloadItemsCount=()=>{if(-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"))return(0,e.getDownloadItems)().length;{const t=parseInt((0,o.getCookie)("orderItems"));return t&&!isNaN(t)?t:0}},e.getDownloadItemMetadata=t=>localStorage[t+".metadata"]?JSON.parse(localStorage[t+".metadata"]):null,e.removeDownloadItem=t=>{let e=localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems):[];localStorage.orderItems=JSON.stringify(e.filter((e=>e!==t.uuid))),localStorage.removeItem(t.uuid+".metadata")}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,a)=>"articles"===n?`<a onClick="${o(i,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(3075)})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DownloadItem=e())}(self,(()=>(()=>{var t={9474:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([t.id,"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,SAAA,CAIA,cAAA,CEFA,0BFPJ,8CAOQ,aAAA,CAAA,CAGJ,mDACI,aAAA,CAEJ,uDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,uDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,8DACI,YAAA,CAIJ,iEACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,iEAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,sDACI,iBAAA,CACA,oFItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,oFAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,oFAgBQ,YAAA,CAAA,CAEJ,yFKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,uGACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,6GACI,yBAAA,CACA,aG7EA,CHgFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCGxGL,CH0GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\n.download-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n cursor: pointer;\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .download-icon {\n svg {\n width: 45px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 52px;\n height: 37px;\n }\n }\n }\n }\n .download-item-list-wrapper {\n position: absolute;\n .download-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\n}\n',"\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n","@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: $screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: $screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: $screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: $screen-phablet) {\n @content;\n }\n }\n}\n","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n","@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n"],sourceRoot:""}]);const s=a},1942:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="download-items-container">\n <button id="download-toggle-button" class="icon-toggle-button">\n <span id="download-toggle-button-counter" class="counter"></span>\n <span id="download-toggle-button-icon" class="download-icon"></span>\n </button>\n <div class="download-item-list-wrapper">\n <div id="download-item-list-container" class="download-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var d=this[s][0];null!=d&&(a[d]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);o&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},4663:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{d(o.next(t))}catch(t){r(t)}}function s(t){try{d(o.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}d((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),d=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,d),d}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1397),e),i(n(985),e),i(n(265),e),i(n(5969),e),i(n(5773),e),i(n(4271),e),i(n(9766),e),i(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5195:t=>{t.exports='<svg viewBox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__176tcrb__downloads__cloud "><path d="M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z" id="Shape"></path></g></g></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},3075:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadItems=void 0;const d=n(406),l=s(n(5195)),c=s(n(2374)),u=n(9399),p=n(1406);let g=class extends d.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderDownloadItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.name;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=c.default,n.dataset.downloadItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.name} from downloads`:`Fjern ${t.name} fra kurv`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyDownloadItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`),n.innerText="en"===this.language?"Go to download":"Til nedlasting",n.classList.add("page-link-element"),this.downloadItemListContainer.innerHTML=`<ul>${e}</ul>`,this.downloadItemListContainer.prepend(n)},this.clickOutsideDownloadItemsContainer=this.clickOutsideDownloadItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedDownloadItems=this.getUpdatedDownloadItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.downloadButton=(0,d.getShadowRootElement)(this,"#download-toggle-button"),this.downloadIcon=(0,d.getShadowRootElement)(this,"#download-toggle-button-icon"),this.downloadIconCounter=(0,d.getShadowRootElement)(this,"#download-toggle-button-counter"),this.downloadItemListContainer=(0,d.getShadowRootElement)(this,"#download-item-list-container"),this.getUpdatedDownloadItems(),this.downloadIcon.innerHTML=l.default,this.renderDownloadItemsCounter(),document.addEventListener("click",this.clickOutsideDownloadItemsContainer),document.addEventListener("downloadItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter()}getUpdatedDownloadItems(){const t=(0,u.getDownloadItems)();this.downloadItems=t.map((t=>(0,u.getDownloadItemMetadata)(t))).filter((t=>t))}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideDownloadItemsContainer)}clickOutsideDownloadItemsContainer(t){const e=t.composedPath()[0];e.closest("#download-item-list-container")||e.closest("#download-toggle-button")||this.hideListContainer()}renderDownloadItemsCounter(){const t=(0,u.getDownloadItemsCount)();t?(this.downloadIconCounter.innerHTML=t.toString(),this.downloadIconCounter.classList.remove("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Show download item list":"Vis liste med elementer til nedlasting")):(this.downloadIconCounter.innerHTML="",this.downloadIconCounter.classList.add("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Go to download page":"Gå til nedlastingsside"))}buttonClicked(t){this.downloadItems&&this.downloadItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyDownloadItemsList.emit():window.location.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`)}removeDownloadItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.downloadItem?JSON.parse(n.dataset.downloadItem):null;e&&(t.stopPropagation(),(0,u.removeDownloadItem)(e),this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter(),this.downloadItems&&this.downloadItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open")}downloadItemsChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}languageChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}preventRedirectChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}static setup(t,e){const n=(0,d.getElement)(t);e.active&&(n.showList=e.active)}};g.elementSelector="download-items",r([(0,d.Prop)()],g.prototype,"id",void 0),r([(0,d.Prop)()],g.prototype,"environment",void 0),r([(0,d.Prop)()],g.prototype,"language",void 0),r([(0,d.Toggle)()],g.prototype,"showList",void 0),r([(0,d.Toggle)()],g.prototype,"preventRedirect",void 0),r([(0,d.Dispatch)("onOpenEmptyDownloadItemsList")],g.prototype,"onOpenEmptyDownloadItemsList",void 0),r([(0,d.Listen)("click","#download-toggle-button")],g.prototype,"buttonClicked",null),r([(0,d.Listen)("click","#download-item-list-container")],g.prototype,"removeDownloadItemClicked",null),r([(0,d.Watch)("showlist")],g.prototype,"showMenuChanged",null),r([(0,d.Watch)("downloadItems")],g.prototype,"downloadItemsChanged",null),r([(0,d.Watch)("language")],g.prototype,"languageChanged",null),r([(0,d.Watch)("preventredirect")],g.prototype,"preventRedirectChanged",null),g=r([(0,d.Component)({tag:"download-items",template:Promise.resolve().then((()=>a(n(1942)))),style:Promise.resolve().then((()=>a(n(9474))))})],g),e.DownloadItems=g},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var o=0;o<n.length;o++){let t=n[o];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);const i=`expires=${o.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${i};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},9399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDownloadItem=e.getDownloadItemMetadata=e.getDownloadItemsCount=e.getDownloadItems=void 0;const o=n(4724);e.getDownloadItems=()=>localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems).filter((t=>t)):[],e.getDownloadItemsCount=()=>{const t=-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"),n=window.sessionStorage.isLocalKartkatalogEnvironment;if(t||n)return(0,e.getDownloadItems)().length;{const t=parseInt((0,o.getCookie)("orderItems"));return t&&!isNaN(t)?t:0}},e.getDownloadItemMetadata=t=>localStorage[t+".metadata"]?JSON.parse(localStorage[t+".metadata"]):null,e.removeDownloadItem=t=>{let e=localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems):[];localStorage.orderItems=JSON.stringify(e.filter((e=>e!==t.uuid))),localStorage.removeItem(t.uuid+".metadata")}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,a)=>"articles"===n?`<a onClick="${o(i,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(3075)})()));
|
|
2
2
|
//# sourceMappingURL=DownloadItem.js.map
|
package/DownloadItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadItem.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,GAAIA,EAAe,SAAgB,aAAIC,KARhF,CASGK,MAAM,I,wGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,25GAA45G,GAAG,CAAC,QAAU,EAAE,QAAU,C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yB,IAAAkF,sBAAqBO,EAAaG,UAAUH,EAAaI,SAASJ,EAAaG,cCrEjNE,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB3P,IAAjB4P,EACH,OAAOA,EAAarR,QAGrB,IAAIC,EAASiR,EAAyBE,GAAY,CACjD7Q,GAAI6Q,EAEJpR,QAAS,IAOV,OAHAsR,EAAoBF,GAAU5J,KAAKvH,EAAOD,QAASC,EAAQA,EAAOD,QAASmR,GAGpElR,EAAOD,Q,OCpBfmR,EAAoBI,EAAKtR,IACxB,IAAIuR,EAASvR,GAAUA,EAAOwR,WAC7B,IAAOxR,EAAiB,QACxB,IAAM,EAEP,OADAkR,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRL,EAAoBO,EAAI,CAAC1R,EAAS4R,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAE9R,EAAS6R,IAC5ElO,OAAOgE,eAAe3H,EAAS6R,EAAK,CAAEE,YAAY,EAAM1L,IAAKuL,EAAWC,MCJ3EV,EAAoBW,EAAI,CAACE,EAAKtJ,IAAU/E,OAAOZ,UAAUkP,eAAezK,KAAKwK,EAAKtJ,GCClFyI,EAAoBe,EAAKlS,IACH,oBAAXmS,QAA0BA,OAAOC,aAC1CzO,OAAOgE,eAAe3H,EAASmS,OAAOC,YAAa,CAAE9J,MAAO,WAE7D3E,OAAOgE,eAAe3H,EAAS,aAAc,CAAEsI,OAAO,KCF7B6I,EAAoB,O","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.scss","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/download-icon.svg","webpack://geonorge/./assets/svg/trash-icon.svg","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.ts","webpack://geonorge/./functions/cookieHelpers.ts","webpack://geonorge/./functions/downloadItemHelpers.ts","webpack://geonorge/./functions/urlHelpers.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"DownloadItem\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./custom-elements/main-navigation/download-items/download-items.scss\",\"webpack://./style/mixins/_transition.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/variables/_colors.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_box-shadow.scss\"],\"names\":[],\"mappings\":\"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,SAAA,CAIA,cAAA,CEFA,0BFPJ,8CAOQ,aAAA,CAAA,CAGJ,mDACI,aAAA,CAEJ,uDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,uDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,8DACI,YAAA,CAIJ,iEACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,iEAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,sDACI,iBAAA,CACA,oFItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,oFAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,oFAgBQ,YAAA,CAAA,CAEJ,yFKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,uGACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,6GACI,yBAAA,CACA,aG7EA,CHgFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCGxGL,CH0GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aGrFd,CHsFc,UAAA\",\"sourcesContent\":[\"@import \\\"../../../style/all\\\";\\n\\n* {\\n box-sizing: border-box;\\n}\\n\\n.download-items-container {\\n .icon-toggle-button {\\n @include transition(all 0.1s ease-in-out);\\n border: none;\\n background: transparent;\\n color: #7d746d;\\n padding: 0;\\n @include breakpoint(phablet) {\\n padding: 0 4px;\\n }\\n cursor: pointer;\\n &.open {\\n color: #414042;\\n }\\n .counter {\\n background-color: $primary-brand;\\n border-radius: 50%;\\n color: #fff;\\n margin-top: -0.25em;\\n margin-left: -0.2em;\\n position: absolute;\\n text-align: center;\\n width: 1.4em;\\n line-height: 1.4;\\n height: 1.4em;\\n font-size: 0.9em;\\n @include breakpoint(phablet) {\\n height: 1.5em;\\n width: 1.5em;\\n line-height: 1.5;\\n font-size: 1em;\\n }\\n &.hidden {\\n display: none;\\n }\\n }\\n .download-icon {\\n svg {\\n width: 45px;\\n height: 32px;\\n @include breakpoint(phablet) {\\n width: 52px;\\n height: 37px;\\n }\\n }\\n }\\n }\\n .download-item-list-wrapper {\\n position: absolute;\\n .download-item-list-container {\\n @include border-radius(0 0 3px 3px);\\n @include transition(all 0.1s ease-in-out);\\n box-sizing: border-box;\\n overflow: hidden;\\n max-height: 0;\\n position: relative;\\n top: 10px;\\n background-color: #fbfcfd;\\n right: 205px;\\n width: 260px;\\n @include breakpoint(phablet) {\\n right: 245px;\\n width: 300px;\\n }\\n @media print {\\n display: none;\\n }\\n &.open {\\n @include box-shadow(\\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\\n );\\n height: auto;\\n max-height: 300px;\\n overflow: auto;\\n }\\n .page-link-element {\\n display: block;\\n text-align: center;\\n padding: 8px 16px;\\n color: $primary-text;\\n text-decoration: none;\\n cursor: pointer;\\n &:hover {\\n text-decoration: underline;\\n color: $primary-text-hover;\\n }\\n }\\n ul {\\n list-style: none;\\n padding: 0;\\n margin: 0;\\n li {\\n @include transition(all 0.15s ease-in-out);\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 8px 16px;\\n &:hover {\\n background-color: $hover-background;\\n }\\n .list-icon {\\n margin-left: 8px;\\n cursor: pointer;\\n background: none;\\n border: none;\\n svg {\\n color: $danger-text;\\n width: 20px;\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n\",\"@mixin transition($transition...) {\\n -moz-transition: $transition;\\n -o-transition: $transition;\\n -webkit-transition: $transition;\\n transition: $transition;\\n}\\n\\n@mixin transition-property($property...) {\\n -moz-transition-property: $property;\\n -o-transition-property: $property;\\n -webkit-transition-property: $property;\\n transition-property: $property;\\n}\\n\\n@mixin transition-duration($duration...) {\\n -moz-transition-property: $duration;\\n -o-transition-property: $duration;\\n -webkit-transition-property: $duration;\\n transition-property: $duration;\\n}\\n\\n@mixin transition-timing-function($timing...) {\\n -moz-transition-timing-function: $timing;\\n -o-transition-timing-function: $timing;\\n -webkit-transition-timing-function: $timing;\\n transition-timing-function: $timing;\\n}\\n\\n@mixin transition-delay($delay...) {\\n -moz-transition-delay: $delay;\\n -o-transition-delay: $delay;\\n -webkit-transition-delay: $delay;\\n transition-delay: $delay;\\n}\\n\",\"@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: $screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: $screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: $screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: $screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"$body-background: #ffffff;\\n$navigation-bar-background: #f7f7f7;\\n$hover-background: rgba(0,0,0,.05);\\n$default-border: #d8d8d8;\\n\\n$default-background: #eee;\\n$default-background-hover: #ddd;\\n$default-text:#2F3940;\\n\\n$primary-brand: #FE5000;\\n$secondary-brand: #7da1c4;\\n\\n$primary-background: #7DA1C4;\\n$primary-background-hover: #FE5000;\\n$primary-text: #3767C7;\\n$primary-text-hover:#0056b3;\\n\\n\\n$success-background: #06A755;\\n$success-background-hover: #009745;\\n$success-text: #06A755;\\n\\n\\n$warning-background: #C38621;\\n$warning-background-hover: #B37611;\\n$warning-text: #C38621;\\n\\n$danger-background: #E00d0D;\\n$danger-background-hover: #D00000;\\n$danger-text: #E00d0D;\\n\\n$disabled-background: #ffffff;\\n$disabled-text: #d8d8d8;\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <div class=\\\"download-items-container\\\">\\n <button id=\\\"download-toggle-button\\\" class=\\\"icon-toggle-button\\\">\\n <span id=\\\"download-toggle-button-counter\\\" class=\\\"counter\\\"></span>\\n <span id=\\\"download-toggle-button-icon\\\" class=\\\"download-icon\\\"></span>\\n </button>\\n <div class=\\\"download-item-list-wrapper\\\">\\n <div id=\\\"download-item-list-container\\\" class=\\\"download-item-list-container\\\"></div>\\n </div>\\n </div>\\n</template>\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg viewBox=\\\"0 0 48 32\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\"><g transform=\\\"translate(-1.000000, -9.000000)\\\" fill=\\\"currentColor\\\" class=\\\"__176tcrb__downloads__cloud \\\"><path d=\\\"M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z\\\" id=\\\"Shape\\\"></path></g></g></svg>\"","module.exports = \"<svg aria-hidden=\\\"true\\\" focusable=\\\"false\\\" data-prefix=\\\"far\\\" data-icon=\\\"trash\\\" class=\\\"__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ \\\" role=\\\"img\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path fill=\\\"currentColor\\\" d=\\\"M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z\\\"></path></svg>\"","// Dependencies\nimport {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\n// Assets\nimport DownloadIcon from 'assets/svg/download-icon.svg';\nimport TrashIcon from 'assets/svg/trash-icon.svg';\n\n// Functions\nimport { getDownloadItems, getDownloadItemsCount, getDownloadItemMetadata, removeDownloadItem } from 'functions/downloadItemHelpers';\nimport { getKartkatalogUrl } from 'functions/urlHelpers';\n\n\ninterface DownloadItem extends Object {\n name: string,\n organizationName: string,\n uuid: string\n}\n\ninterface DownloadItemsOptions extends CustomElementOptions {\n active?: boolean\n}\n\n@Component({\n tag: 'download-items',\n template: import('./download-items.html'),\n style: import('./download-items.scss')\n})\n\nexport class DownloadItems extends CustomElement {\n private static readonly elementSelector = 'download-items';\n private downloadButton: HTMLButtonElement;\n private downloadIcon: HTMLElement;\n private downloadIconCounter: HTMLSpanElement;\n private downloadItemListContainer: HTMLDivElement;\n private downloadItems: Array<DownloadItem>;\n\n @Prop() id: string;\n @Prop() environment: string;\n @Prop() language: string;\n @Toggle() showList: boolean;\n @Toggle() preventRedirect: boolean;\n @Dispatch('onOpenEmptyDownloadItemsList') onOpenEmptyDownloadItemsList: DispatchEmitter;\n\n constructor() {\n super();\n this.clickOutsideDownloadItemsContainer = this.clickOutsideDownloadItemsContainer.bind(this);\n this.updateDomElements = this.updateDomElements.bind(this);\n this.getUpdatedDownloadItems = this.getUpdatedDownloadItems.bind(this);\n }\n\n setup(options?: DownloadItemsOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.downloadButton = getShadowRootElement(this, '#download-toggle-button');\n this.downloadIcon = getShadowRootElement(this, '#download-toggle-button-icon');\n this.downloadIconCounter = getShadowRootElement(this, '#download-toggle-button-counter');\n this.downloadItemListContainer = getShadowRootElement(this, '#download-item-list-container');\n\n this.getUpdatedDownloadItems();\n this.downloadIcon.innerHTML = DownloadIcon;\n this.renderDownloadItemsCounter();\n\n document.addEventListener('click', this.clickOutsideDownloadItemsContainer);\n document.addEventListener('downloadItemsChanged', this.updateDomElements);\n }\n\n updateDomElements() {\n this.getUpdatedDownloadItems();\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n\n getUpdatedDownloadItems() {\n const downloadItemUuids = getDownloadItems();\n this.downloadItems = downloadItemUuids.map(uuid => {\n return getDownloadItemMetadata(uuid);\n }).filter(downloadItem => { return downloadItem });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.clickOutsideDownloadItemsContainer);\n }\n\n hideListContainer = () => {\n this.showList = false;\n }\n\n clickOutsideDownloadItemsContainer(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n if (targetElement.closest('#download-item-list-container') || targetElement.closest('#download-toggle-button')) return\n this.hideListContainer();\n }\n\n renderDownloadItemsCounter() {\n const downloadItemsCount = getDownloadItemsCount();\n if (downloadItemsCount) {\n this.downloadIconCounter.innerHTML = downloadItemsCount.toString();\n this.downloadIconCounter.classList.remove('hidden');\n this.downloadButton.setAttribute('aria-label', this.language === 'en' ? 'Show download item list' : 'Vis liste med elementer til nedlasting');\n } else {\n this.downloadIconCounter.innerHTML = '';\n this.downloadIconCounter.classList.add('hidden');\n this.downloadButton.setAttribute('aria-label', this.language === 'en' ? 'Go to download page' : 'Gå til nedlastingsside');\n }\n }\n\n renderDownloadItems = (downloadItems: Array<DownloadItem>) => {\n const downloadItemsListElement = downloadItems.map((downloadItem: DownloadItem) => {\n if (downloadItem) {\n const downloadItemElement = document.createElement('span');\n downloadItemElement.innerText = downloadItem.name;\n\n const removeDownloadItemElement = document.createElement('button');\n removeDownloadItemElement.classList.add('list-icon');\n removeDownloadItemElement.innerHTML = TrashIcon;\n removeDownloadItemElement.dataset['downloadItem'] = JSON.stringify(downloadItem);\n removeDownloadItemElement.setAttribute('aria-label', this.language === 'en' ? `Remove ${downloadItem.name} from downloads` : `Fjern ${downloadItem.name} fra kurv`);\n downloadItemElement.appendChild(removeDownloadItemElement);\n\n return `<li>${downloadItemElement.innerHTML}</li>`;\n } else return null;\n }).filter(downloadItem => { return downloadItem }).join('');\n\n let downloadItemLinkElement;\n if (this.preventRedirect) {\n downloadItemLinkElement = document.createElement('span');\n downloadItemLinkElement.addEventListener(\"click\", () => {\n this.onOpenEmptyDownloadItemsList.emit();\n });\n } else {\n downloadItemLinkElement = document.createElement('a');\n downloadItemLinkElement.href = `${getKartkatalogUrl(this.environment)}/nedlasting`;\n }\n downloadItemLinkElement.innerText = this.language === 'en' ? 'Go to download' : 'Til nedlasting';\n downloadItemLinkElement.classList.add('page-link-element');\n this.downloadItemListContainer.innerHTML = `<ul>${downloadItemsListElement}</ul>`;\n this.downloadItemListContainer.prepend(downloadItemLinkElement);\n }\n\n @Listen('click', '#download-toggle-button')\n buttonClicked(event: MouseEvent) {\n if (this.downloadItems && this.downloadItems.length) {\n this.showList = !this.showList;\n } else {\n this.showList = false;\n if (this.preventRedirect) {\n this.onOpenEmptyDownloadItemsList.emit();\n } else {\n window.location.href = `${getKartkatalogUrl(this.environment)}/nedlasting`\n }\n }\n }\n\n @Listen('click', '#download-item-list-container')\n removeDownloadItemClicked(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n targetElement.closest('#menu-container');\n const removeDownloadItemButtonElement = targetElement.closest('button');\n\n if (removeDownloadItemButtonElement) {\n const downloadItem = removeDownloadItemButtonElement.dataset && removeDownloadItemButtonElement.dataset.downloadItem ? JSON.parse(removeDownloadItemButtonElement.dataset.downloadItem) : null;\n if (downloadItem) {\n event.stopPropagation();\n removeDownloadItem(downloadItem);\n this.getUpdatedDownloadItems();\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n if (!this.downloadItems || !this.downloadItems.length) {\n this.showList = false;\n }\n }\n }\n }\n\n @Watch('showlist')\n showMenuChanged() {\n this.showList ? this.downloadItemListContainer.classList.add('open') : this.downloadItemListContainer.classList.remove('open');\n this.showList ? this.downloadButton.classList.add('open') : this.downloadButton.classList.remove('open');\n }\n\n @Watch('downloadItems')\n downloadItemsChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n @Watch('language')\n languageChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n @Watch('preventredirect')\n preventRedirectChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n public static setup(selector: string, options: DownloadItemsOptions) {\n const element = getElement<DownloadItems>(selector);\n if (options.active) {\n element.showList = options.active;\n }\n }\n}\n","export const getCookie = (cname: string) => {\n const name = `${cname}=`;\n const decodedCookie = decodeURIComponent(document.cookie);\n const ca = decodedCookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n}\n\nexport const setCookie = (cname: string, cvalue: string, exdays: number) => {\n let expireDate = new Date();\n expireDate.setTime(expireDate.getTime() + (exdays * 24 * 60 * 60 * 1000));\n const expires = `expires=${expireDate.toUTCString()}`;\n const domain = window.location.hostname === 'localhost' ? '' : 'domain=-geonorge.no';\n document.cookie = `${cname}=${cvalue};${expires};path=/;${domain}`;\n}\n\nexport const getLanguage = () => {\n return getCookie('_culture');\n}\n\nexport const setLanguage = (language: string) => {\n setCookie('_culture', language, 7);\n}\n","// Functions\nimport { getCookie } from 'functions/cookieHelpers';\n\nexport const getDownloadItems = () => {\n return localStorage.orderItems && Array.isArray(JSON.parse(localStorage.orderItems))\n ? JSON.parse(localStorage.orderItems).filter(mapItem => {return mapItem})\n : [];\n}\n\nexport const getDownloadItemsCount = () => {\n const isKartkatalog = window.location.hostname.toLowerCase().indexOf('kartkatalog') !== -1;\n if (isKartkatalog) {\n return getDownloadItems().length;\n } else {\n const downloadItemsCount = parseInt(getCookie('orderItems'));\n return downloadItemsCount && !isNaN(downloadItemsCount) ? downloadItemsCount : 0;\n }\n}\n\nexport const getDownloadItemMetadata = (itemUuid: string) => {\n return localStorage[itemUuid + '.metadata']\n ? JSON.parse(localStorage[itemUuid + '.metadata'])\n : null;\n}\n\nexport const removeDownloadItem = (itemToRemove) => {\n let selectedItems = localStorage.orderItems && Array.isArray(JSON.parse(localStorage.orderItems))\n ? JSON.parse(localStorage.orderItems)\n : [];\n localStorage.orderItems = JSON.stringify(selectedItems.filter(itemToKeep => itemToKeep !== itemToRemove.uuid));\n localStorage.removeItem(itemToRemove.uuid + \".metadata\")\n\n\n /*const tagData = {\n name: itemToRemove.name,\n uuid: itemToRemove.uuid,\n accessIsOpendata: itemToRemove.accessIsOpendata,\n accessIsRestricted: itemToRemove.accessIsRestricted,\n organizationName: itemToRemove.organizationName,\n theme: itemToRemove.theme\n };*/\n}\n","// Interfaces\nimport { SearchResultsForType } from 'interfaces/search';\n\nexport const getKartkatalogUrl = (environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? environment + '.' : '';\n return `https://kartkatalog.${environmentSlug}geonorge.no`;\n};\n\nexport const getGeonorgeUrl = (language: string, environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? 'test.' : '';\n const selectedLanguageSlug = language === 'en' ? 'en/' : '';\n return `https://www.${environmentSlug}geonorge.no/${selectedLanguageSlug}`;\n};\n\nexport const getGeonorgeNedlastingUrl = (environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? 'test.' : '';\n return `https://nedlasting.${environmentSlug}geonorge.no`;\n};\n\n\n\nconst replaceAndAddSpace = (text: string, replace: string, replaceWith: string) => {\n text = text.replace(new RegExp(`([^s])([${replace}])([^s])`, 'ig'), `$1 ${replaceWith} $3`); // Character right before and after\n text = text.replace(new RegExp(`([^s])([${replace}])`, 'ig'), `$1 ${replaceWith}`); // Character right before\n text = text.replace(new RegExp(`([${replace}])([^s])`, 'ig'), `${replaceWith} $2`); // Character right after\n text = text.replace(new RegExp(`[${replace}]`, 'ig'), replaceWith); // No character right before or after\n \n return text;\n }\n\nexport const convertTextToUrlSlug = (text: string = '') => {\n // To lower case\n text = text.toLowerCase();\n\n // Character replace\n text = replaceAndAddSpace(text, \"&\", \"and\");\n text = replaceAndAddSpace(text, \"+\", \"plus\");\n text = text.replace(\"æ\", \"ae\");\n text = text.replace(\"ä\", \"ae\");\n text = text.replace(\"ø\", \"oe\");\n text = text.replace(\"ö\", \"oe\");\n text = text.replace(\"å\", \"aa\");\n\n // Whitespace replace\n text = text.replace(/( - )/g, \"-\");\n text = text.replace(/[\\s]+/g, \"-\");\n\n // Unwated character replace\n text = text.replace(/[^a-z0-9-]+/ig, \"\");\n\n // Remove any character before first and after last A-Z or 0-9\n text = text.replace(/^[^A-Z0-9]*|[^a-z0-9]*$/ig, \"\");\n\n return text;\n}\n\nconst handleSearchResultsClick = (searchString: string, pushToDataLayer?: Function) => {\n if (pushToDataLayer) {\n pushToDataLayer({\n event: 'updateSearchString',\n category: 'metadataSearch',\n activity: 'dropDownResultsClick',\n searchString: searchString\n });\n } else return false;\n}\n\nexport const renderDropdownResultLink = (searchResult: SearchResultsForType, resultType: string, searchString: string, environment: string, pushToDataLayer?: Function) => {\n return resultType === 'articles'\n ? `<a onClick=\"${handleSearchResultsClick(searchString, pushToDataLayer)}\" href=\"${searchResult.ShowDetailsUrl ? searchResult.ShowDetailsUrl : '#'}\">${searchResult.Title}</a>`\n : `<a onClick=\"${handleSearchResultsClick(searchString, pushToDataLayer)}\" href=\"${getKartkatalogUrl(environment)}/metadata/${convertTextToUrlSlug(searchResult.Title)}/${searchResult.Uuid}\">${searchResult.Title}</a>`\n\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3075);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","DownloadItems","hideListContainer","showList","renderDownloadItems","downloadItems","downloadItemsListElement","downloadItem","downloadItemElement","innerText","removeDownloadItemElement","classList","add","dataset","language","filter","downloadItemLinkElement","preventRedirect","onOpenEmptyDownloadItemsList","href","getKartkatalogUrl","environment","downloadItemListContainer","prepend","clickOutsideDownloadItemsContainer","bind","updateDomElements","getUpdatedDownloadItems","setup","container","downloadButton","downloadIcon","downloadIconCounter","renderDownloadItemsCounter","downloadItemUuids","getDownloadItems","uuid","getDownloadItemMetadata","disconnectedCallback","removeEventListener","event","targetElement","composedPath","closest","downloadItemsCount","getDownloadItemsCount","remove","buttonClicked","window","location","removeDownloadItemClicked","removeDownloadItemButtonElement","parse","stopPropagation","removeDownloadItem","showMenuChanged","downloadItemsChanged","languageChanged","preventRedirectChanged","static","element","active","elementSelector","getCookie","cname","ca","decodeURIComponent","cookie","split","c","charAt","substring","indexOf","setCookie","cvalue","exdays","expireDate","Date","setTime","getTime","expires","toUTCString","domain","hostname","getLanguage","setLanguage","localStorage","orderItems","Array","isArray","mapItem","isNaN","itemUuid","itemToRemove","selectedItems","itemToKeep","removeItem","getGeonorgeUrl","getGeonorgeNedlastingUrl","replaceAndAddSpace","text","replaceWith","RegExp","convertTextToUrlSlug","handleSearchResultsClick","searchString","pushToDataLayer","category","activity","renderDropdownResultLink","searchResult","resultType","ShowDetailsUrl","Title","Uuid","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":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oBe,EAAKrS,IACH,oBAAXsS,QAA0BA,OAAOC,aAC1C5O,OAAOgE,eAAe3H,EAASsS,OAAOC,YAAa,CAAEjK,MAAO,WAE7D3E,OAAOgE,eAAe3H,EAAS,aAAc,CAAEsI,OAAO,KCF7BgJ,EAAoB,O","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.scss","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/download-icon.svg","webpack://geonorge/./assets/svg/trash-icon.svg","webpack://geonorge/./custom-elements/main-navigation/download-items/download-items.ts","webpack://geonorge/./functions/cookieHelpers.ts","webpack://geonorge/./functions/downloadItemHelpers.ts","webpack://geonorge/./functions/urlHelpers.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"DownloadItem\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./custom-elements/main-navigation/download-items/download-items.scss\",\"webpack://./style/mixins/_transition.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/variables/_colors.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_box-shadow.scss\"],\"names\":[],\"mappings\":\"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,C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\\n* {\\n box-sizing: border-box;\\n}\\n\\n.download-items-container {\\n .icon-toggle-button {\\n @include transition(all 0.1s ease-in-out);\\n border: none;\\n background: transparent;\\n color: #7d746d;\\n padding: 0;\\n @include breakpoint(phablet) {\\n padding: 0 4px;\\n }\\n cursor: pointer;\\n &.open {\\n color: #414042;\\n }\\n .counter {\\n background-color: $primary-brand;\\n border-radius: 50%;\\n color: #fff;\\n margin-top: -0.25em;\\n margin-left: -0.2em;\\n position: absolute;\\n text-align: center;\\n width: 1.4em;\\n line-height: 1.4;\\n height: 1.4em;\\n font-size: 0.9em;\\n @include breakpoint(phablet) {\\n height: 1.5em;\\n width: 1.5em;\\n line-height: 1.5;\\n font-size: 1em;\\n }\\n &.hidden {\\n display: none;\\n }\\n }\\n .download-icon {\\n svg {\\n width: 45px;\\n height: 32px;\\n @include breakpoint(phablet) {\\n width: 52px;\\n height: 37px;\\n }\\n }\\n }\\n }\\n .download-item-list-wrapper {\\n position: absolute;\\n .download-item-list-container {\\n @include border-radius(0 0 3px 3px);\\n @include transition(all 0.1s ease-in-out);\\n box-sizing: border-box;\\n overflow: hidden;\\n max-height: 0;\\n position: relative;\\n top: 10px;\\n background-color: #fbfcfd;\\n right: 205px;\\n width: 260px;\\n @include breakpoint(phablet) {\\n right: 245px;\\n width: 300px;\\n }\\n @media print {\\n display: none;\\n }\\n &.open {\\n @include box-shadow(\\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\\n );\\n height: auto;\\n max-height: 300px;\\n overflow: auto;\\n }\\n .page-link-element {\\n display: block;\\n text-align: center;\\n padding: 8px 16px;\\n color: $primary-text;\\n text-decoration: none;\\n cursor: pointer;\\n &:hover {\\n text-decoration: underline;\\n color: $primary-text-hover;\\n }\\n }\\n ul {\\n list-style: none;\\n padding: 0;\\n margin: 0;\\n li {\\n @include transition(all 0.15s ease-in-out);\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 8px 16px;\\n &:hover {\\n background-color: $hover-background;\\n }\\n .list-icon {\\n margin-left: 8px;\\n cursor: pointer;\\n background: none;\\n border: none;\\n svg {\\n color: $danger-text;\\n width: 20px;\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n\",\"@mixin transition($transition...) {\\n -moz-transition: $transition;\\n -o-transition: $transition;\\n -webkit-transition: $transition;\\n transition: $transition;\\n}\\n\\n@mixin transition-property($property...) {\\n -moz-transition-property: $property;\\n -o-transition-property: $property;\\n -webkit-transition-property: $property;\\n transition-property: $property;\\n}\\n\\n@mixin transition-duration($duration...) {\\n -moz-transition-property: $duration;\\n -o-transition-property: $duration;\\n -webkit-transition-property: $duration;\\n transition-property: $duration;\\n}\\n\\n@mixin transition-timing-function($timing...) {\\n -moz-transition-timing-function: $timing;\\n -o-transition-timing-function: $timing;\\n -webkit-transition-timing-function: $timing;\\n transition-timing-function: $timing;\\n}\\n\\n@mixin transition-delay($delay...) {\\n -moz-transition-delay: $delay;\\n -o-transition-delay: $delay;\\n -webkit-transition-delay: $delay;\\n transition-delay: $delay;\\n}\\n\",\"@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: $screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: $screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: $screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: $screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"$body-background: #ffffff;\\n$navigation-bar-background: #f7f7f7;\\n$hover-background: rgba(0,0,0,.05);\\n$default-border: #d8d8d8;\\n\\n$default-background: #eee;\\n$default-background-hover: #ddd;\\n$default-text:#2F3940;\\n\\n$primary-brand: #FE5000;\\n$secondary-brand: #7da1c4;\\n\\n$primary-background: #7DA1C4;\\n$primary-background-hover: #FE5000;\\n$primary-text: #3767C7;\\n$primary-text-hover:#0056b3;\\n\\n\\n$success-background: #06A755;\\n$success-background-hover: #009745;\\n$success-text: #06A755;\\n\\n\\n$warning-background: #C38621;\\n$warning-background-hover: #B37611;\\n$warning-text: #C38621;\\n\\n$danger-background: #E00d0D;\\n$danger-background-hover: #D00000;\\n$danger-text: #E00d0D;\\n\\n$disabled-background: #ffffff;\\n$disabled-text: #d8d8d8;\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <div class=\\\"download-items-container\\\">\\n <button id=\\\"download-toggle-button\\\" class=\\\"icon-toggle-button\\\">\\n <span id=\\\"download-toggle-button-counter\\\" class=\\\"counter\\\"></span>\\n <span id=\\\"download-toggle-button-icon\\\" class=\\\"download-icon\\\"></span>\\n </button>\\n <div class=\\\"download-item-list-wrapper\\\">\\n <div id=\\\"download-item-list-container\\\" class=\\\"download-item-list-container\\\"></div>\\n </div>\\n </div>\\n</template>\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg viewBox=\\\"0 0 48 32\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\"><g transform=\\\"translate(-1.000000, -9.000000)\\\" fill=\\\"currentColor\\\" class=\\\"__176tcrb__downloads__cloud \\\"><path d=\\\"M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z\\\" id=\\\"Shape\\\"></path></g></g></svg>\"","module.exports = \"<svg aria-hidden=\\\"true\\\" focusable=\\\"false\\\" data-prefix=\\\"far\\\" data-icon=\\\"trash\\\" class=\\\"__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ \\\" role=\\\"img\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path fill=\\\"currentColor\\\" d=\\\"M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z\\\"></path></svg>\"","// Dependencies\nimport {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\n// Assets\nimport DownloadIcon from 'assets/svg/download-icon.svg';\nimport TrashIcon from 'assets/svg/trash-icon.svg';\n\n// Functions\nimport { getDownloadItems, getDownloadItemsCount, getDownloadItemMetadata, removeDownloadItem } from 'functions/downloadItemHelpers';\nimport { getKartkatalogUrl } from 'functions/urlHelpers';\n\n\ninterface DownloadItem extends Object {\n name: string,\n organizationName: string,\n uuid: string\n}\n\ninterface DownloadItemsOptions extends CustomElementOptions {\n active?: boolean\n}\n\n@Component({\n tag: 'download-items',\n template: import('./download-items.html'),\n style: import('./download-items.scss')\n})\n\nexport class DownloadItems extends CustomElement {\n private static readonly elementSelector = 'download-items';\n private downloadButton: HTMLButtonElement;\n private downloadIcon: HTMLElement;\n private downloadIconCounter: HTMLSpanElement;\n private downloadItemListContainer: HTMLDivElement;\n private downloadItems: Array<DownloadItem>;\n\n @Prop() id: string;\n @Prop() environment: string;\n @Prop() language: string;\n @Toggle() showList: boolean;\n @Toggle() preventRedirect: boolean;\n @Dispatch('onOpenEmptyDownloadItemsList') onOpenEmptyDownloadItemsList: DispatchEmitter;\n\n constructor() {\n super();\n this.clickOutsideDownloadItemsContainer = this.clickOutsideDownloadItemsContainer.bind(this);\n this.updateDomElements = this.updateDomElements.bind(this);\n this.getUpdatedDownloadItems = this.getUpdatedDownloadItems.bind(this);\n }\n\n setup(options?: DownloadItemsOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.downloadButton = getShadowRootElement(this, '#download-toggle-button');\n this.downloadIcon = getShadowRootElement(this, '#download-toggle-button-icon');\n this.downloadIconCounter = getShadowRootElement(this, '#download-toggle-button-counter');\n this.downloadItemListContainer = getShadowRootElement(this, '#download-item-list-container');\n\n this.getUpdatedDownloadItems();\n this.downloadIcon.innerHTML = DownloadIcon;\n this.renderDownloadItemsCounter();\n\n document.addEventListener('click', this.clickOutsideDownloadItemsContainer);\n document.addEventListener('downloadItemsChanged', this.updateDomElements);\n }\n\n updateDomElements() {\n this.getUpdatedDownloadItems();\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n\n getUpdatedDownloadItems() {\n const downloadItemUuids = getDownloadItems();\n this.downloadItems = downloadItemUuids.map(uuid => {\n return getDownloadItemMetadata(uuid);\n }).filter(downloadItem => { return downloadItem });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.clickOutsideDownloadItemsContainer);\n }\n\n hideListContainer = () => {\n this.showList = false;\n }\n\n clickOutsideDownloadItemsContainer(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n if (targetElement.closest('#download-item-list-container') || targetElement.closest('#download-toggle-button')) return\n this.hideListContainer();\n }\n\n renderDownloadItemsCounter() {\n const downloadItemsCount = getDownloadItemsCount();\n if (downloadItemsCount) {\n this.downloadIconCounter.innerHTML = downloadItemsCount.toString();\n this.downloadIconCounter.classList.remove('hidden');\n this.downloadButton.setAttribute('aria-label', this.language === 'en' ? 'Show download item list' : 'Vis liste med elementer til nedlasting');\n } else {\n this.downloadIconCounter.innerHTML = '';\n this.downloadIconCounter.classList.add('hidden');\n this.downloadButton.setAttribute('aria-label', this.language === 'en' ? 'Go to download page' : 'Gå til nedlastingsside');\n }\n }\n\n renderDownloadItems = (downloadItems: Array<DownloadItem>) => {\n const downloadItemsListElement = downloadItems.map((downloadItem: DownloadItem) => {\n if (downloadItem) {\n const downloadItemElement = document.createElement('span');\n downloadItemElement.innerText = downloadItem.name;\n\n const removeDownloadItemElement = document.createElement('button');\n removeDownloadItemElement.classList.add('list-icon');\n removeDownloadItemElement.innerHTML = TrashIcon;\n removeDownloadItemElement.dataset['downloadItem'] = JSON.stringify(downloadItem);\n removeDownloadItemElement.setAttribute('aria-label', this.language === 'en' ? `Remove ${downloadItem.name} from downloads` : `Fjern ${downloadItem.name} fra kurv`);\n downloadItemElement.appendChild(removeDownloadItemElement);\n\n return `<li>${downloadItemElement.innerHTML}</li>`;\n } else return null;\n }).filter(downloadItem => { return downloadItem }).join('');\n\n let downloadItemLinkElement;\n if (this.preventRedirect) {\n downloadItemLinkElement = document.createElement('span');\n downloadItemLinkElement.addEventListener(\"click\", () => {\n this.onOpenEmptyDownloadItemsList.emit();\n });\n } else {\n downloadItemLinkElement = document.createElement('a');\n downloadItemLinkElement.href = `${getKartkatalogUrl(this.environment)}/nedlasting`;\n }\n downloadItemLinkElement.innerText = this.language === 'en' ? 'Go to download' : 'Til nedlasting';\n downloadItemLinkElement.classList.add('page-link-element');\n this.downloadItemListContainer.innerHTML = `<ul>${downloadItemsListElement}</ul>`;\n this.downloadItemListContainer.prepend(downloadItemLinkElement);\n }\n\n @Listen('click', '#download-toggle-button')\n buttonClicked(event: MouseEvent) {\n if (this.downloadItems && this.downloadItems.length) {\n this.showList = !this.showList;\n } else {\n this.showList = false;\n if (this.preventRedirect) {\n this.onOpenEmptyDownloadItemsList.emit();\n } else {\n window.location.href = `${getKartkatalogUrl(this.environment)}/nedlasting`\n }\n }\n }\n\n @Listen('click', '#download-item-list-container')\n removeDownloadItemClicked(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n targetElement.closest('#menu-container');\n const removeDownloadItemButtonElement = targetElement.closest('button');\n\n if (removeDownloadItemButtonElement) {\n const downloadItem = removeDownloadItemButtonElement.dataset && removeDownloadItemButtonElement.dataset.downloadItem ? JSON.parse(removeDownloadItemButtonElement.dataset.downloadItem) : null;\n if (downloadItem) {\n event.stopPropagation();\n removeDownloadItem(downloadItem);\n this.getUpdatedDownloadItems();\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n if (!this.downloadItems || !this.downloadItems.length) {\n this.showList = false;\n }\n }\n }\n }\n\n @Watch('showlist')\n showMenuChanged() {\n this.showList ? this.downloadItemListContainer.classList.add('open') : this.downloadItemListContainer.classList.remove('open');\n this.showList ? this.downloadButton.classList.add('open') : this.downloadButton.classList.remove('open');\n }\n\n @Watch('downloadItems')\n downloadItemsChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n @Watch('language')\n languageChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n @Watch('preventredirect')\n preventRedirectChanged() {\n if (this.downloadItems && this.downloadItems.length) {\n this.renderDownloadItems(this.downloadItems);\n this.renderDownloadItemsCounter();\n }\n }\n\n public static setup(selector: string, options: DownloadItemsOptions) {\n const element = getElement<DownloadItems>(selector);\n if (options.active) {\n element.showList = options.active;\n }\n }\n}\n","export const getCookie = (cname: string) => {\n const name = `${cname}=`;\n const decodedCookie = decodeURIComponent(document.cookie);\n const ca = decodedCookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n}\n\nexport const setCookie = (cname: string, cvalue: string, exdays: number) => {\n let expireDate = new Date();\n expireDate.setTime(expireDate.getTime() + (exdays * 24 * 60 * 60 * 1000));\n const expires = `expires=${expireDate.toUTCString()}`;\n const domain = window.location.hostname === 'localhost' ? '' : 'domain=-geonorge.no';\n document.cookie = `${cname}=${cvalue};${expires};path=/;${domain}`;\n}\n\nexport const getLanguage = () => {\n return getCookie('_culture');\n}\n\nexport const setLanguage = (language: string) => {\n setCookie('_culture', language, 7);\n}\n","// Functions\nimport { getCookie } from 'functions/cookieHelpers';\n\nexport const getDownloadItems = () => {\n return localStorage.orderItems && Array.isArray(JSON.parse(localStorage.orderItems))\n ? JSON.parse(localStorage.orderItems).filter(mapItem => {return mapItem})\n : [];\n}\n\nexport const getDownloadItemsCount = () => {\n const isKartkatalog = window.location.hostname.toLowerCase().indexOf('kartkatalog') !== -1;\n const isLocalKartkatalogEnvironment = window.sessionStorage.isLocalKartkatalogEnvironment;\n if (isKartkatalog || isLocalKartkatalogEnvironment) {\n return getDownloadItems().length;\n } else {\n const downloadItemsCount = parseInt(getCookie('orderItems'));\n return downloadItemsCount && !isNaN(downloadItemsCount) ? downloadItemsCount : 0;\n }\n}\n\nexport const getDownloadItemMetadata = (itemUuid: string) => {\n return localStorage[itemUuid + '.metadata']\n ? JSON.parse(localStorage[itemUuid + '.metadata'])\n : null;\n}\n\nexport const removeDownloadItem = (itemToRemove) => {\n let selectedItems = localStorage.orderItems && Array.isArray(JSON.parse(localStorage.orderItems))\n ? JSON.parse(localStorage.orderItems)\n : [];\n localStorage.orderItems = JSON.stringify(selectedItems.filter(itemToKeep => itemToKeep !== itemToRemove.uuid));\n localStorage.removeItem(itemToRemove.uuid + \".metadata\")\n}\n","// Interfaces\nimport { SearchResultsForType } from 'interfaces/search';\n\nexport const getKartkatalogUrl = (environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? environment + '.' : '';\n return `https://kartkatalog.${environmentSlug}geonorge.no`;\n};\n\nexport const getGeonorgeUrl = (language: string, environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? 'test.' : '';\n const selectedLanguageSlug = language === 'en' ? 'en/' : '';\n return `https://www.${environmentSlug}geonorge.no/${selectedLanguageSlug}`;\n};\n\nexport const getGeonorgeNedlastingUrl = (environment: string) => {\n const environmentSlug = environment === 'dev' || environment === 'test' ? 'test.' : '';\n return `https://nedlasting.${environmentSlug}geonorge.no`;\n};\n\n\n\nconst replaceAndAddSpace = (text: string, replace: string, replaceWith: string) => {\n text = text.replace(new RegExp(`([^s])([${replace}])([^s])`, 'ig'), `$1 ${replaceWith} $3`); // Character right before and after\n text = text.replace(new RegExp(`([^s])([${replace}])`, 'ig'), `$1 ${replaceWith}`); // Character right before\n text = text.replace(new RegExp(`([${replace}])([^s])`, 'ig'), `${replaceWith} $2`); // Character right after\n text = text.replace(new RegExp(`[${replace}]`, 'ig'), replaceWith); // No character right before or after\n \n return text;\n }\n\nexport const convertTextToUrlSlug = (text: string = '') => {\n // To lower case\n text = text.toLowerCase();\n\n // Character replace\n text = replaceAndAddSpace(text, \"&\", \"and\");\n text = replaceAndAddSpace(text, \"+\", \"plus\");\n text = text.replace(\"æ\", \"ae\");\n text = text.replace(\"ä\", \"ae\");\n text = text.replace(\"ø\", \"oe\");\n text = text.replace(\"ö\", \"oe\");\n text = text.replace(\"å\", \"aa\");\n\n // Whitespace replace\n text = text.replace(/( - )/g, \"-\");\n text = text.replace(/[\\s]+/g, \"-\");\n\n // Unwated character replace\n text = text.replace(/[^a-z0-9-]+/ig, \"\");\n\n // Remove any character before first and after last A-Z or 0-9\n text = text.replace(/^[^A-Z0-9]*|[^a-z0-9]*$/ig, \"\");\n\n return text;\n}\n\nconst handleSearchResultsClick = (searchString: string, pushToDataLayer?: Function) => {\n if (pushToDataLayer) {\n pushToDataLayer({\n event: 'updateSearchString',\n category: 'metadataSearch',\n activity: 'dropDownResultsClick',\n searchString: searchString\n });\n } else return false;\n}\n\nexport const renderDropdownResultLink = (searchResult: SearchResultsForType, resultType: string, searchString: string, environment: string, pushToDataLayer?: Function) => {\n return resultType === 'articles'\n ? `<a onClick=\"${handleSearchResultsClick(searchString, pushToDataLayer)}\" href=\"${searchResult.ShowDetailsUrl ? searchResult.ShowDetailsUrl : '#'}\">${searchResult.Title}</a>`\n : `<a onClick=\"${handleSearchResultsClick(searchString, pushToDataLayer)}\" href=\"${getKartkatalogUrl(environment)}/metadata/${convertTextToUrlSlug(searchResult.Title)}/${searchResult.Uuid}\">${searchResult.Title}</a>`\n\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3075);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","DownloadItems","hideListContainer","showList","renderDownloadItems","downloadItems","downloadItemsListElement","downloadItem","downloadItemElement","innerText","removeDownloadItemElement","classList","add","dataset","language","filter","downloadItemLinkElement","preventRedirect","onOpenEmptyDownloadItemsList","href","getKartkatalogUrl","environment","downloadItemListContainer","prepend","clickOutsideDownloadItemsContainer","bind","updateDomElements","getUpdatedDownloadItems","setup","container","downloadButton","downloadIcon","downloadIconCounter","renderDownloadItemsCounter","downloadItemUuids","getDownloadItems","uuid","getDownloadItemMetadata","disconnectedCallback","removeEventListener","event","targetElement","composedPath","closest","downloadItemsCount","getDownloadItemsCount","remove","buttonClicked","window","location","removeDownloadItemClicked","removeDownloadItemButtonElement","parse","stopPropagation","removeDownloadItem","showMenuChanged","downloadItemsChanged","languageChanged","preventRedirectChanged","static","element","active","elementSelector","getCookie","cname","ca","decodeURIComponent","cookie","split","c","charAt","substring","indexOf","setCookie","cvalue","exdays","expireDate","Date","setTime","getTime","expires","toUTCString","domain","hostname","getLanguage","setLanguage","localStorage","orderItems","Array","isArray","mapItem","isKartkatalog","isLocalKartkatalogEnvironment","sessionStorage","isNaN","itemUuid","itemToRemove","selectedItems","itemToKeep","removeItem","getGeonorgeUrl","getGeonorgeNedlastingUrl","replaceAndAddSpace","text","replaceWith","RegExp","convertTextToUrlSlug","handleSearchResultsClick","searchString","pushToDataLayer","category","activity","renderDropdownResultLink","searchResult","resultType","ShowDetailsUrl","Title","Uuid","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|