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AAQC,GAAYwB,cACpB1Y,KAAM,CACJ2Y,KAAMC,GAAkBC,SAE1B,GACD,CAAC,GAEJ/M,GAAAnjB,KAAI4tB,IAAAA,IAAiB,IAAIrd,sBACtBC,IAAY,IAAA2f,EAAAC,EAAAC,EACI,OAAXF,EAAC3f,EAAQ,KAAR2f,EAAY/f,iBAGb,OAAJggB,EAAAjN,GAAAnjB,KAAI4tB,IAAAA,MAAJwC,EAAoBrf,aAChB,OAAJsf,EAAAlN,GAAAnjB,KAAI0tB,IAAAA,MAAJ2C,EAAetD,yBAAyB,CACtCuB,OAAQC,GAAYwB,cACpB1Y,KAAM,CACJ2Y,KAAMC,GAAkBK,QAE1B,GAEJ,CACEjoB,UAAW,CAAC,GAGZuH,WAAY,0BAIhBuT,GAAAnjB,KAAI2tB,IAAAA,IAAgB7c,QAAQ9Q,MAC9B,CAAC,SAAAkuB,KAYqB,IAAAqC,EAAAC,EAChB,OAAJD,EAAApN,GAAAnjB,KAAI2tB,IAAAA,MAAJ4C,EAAqBxf,aACjB,OAAJyf,EAAArN,GAAAnjB,KAAI4tB,IAAAA,MAAJ4C,EAAoBzf,YACtB,CAWFuc,GAAWzX,GAAKoY,G","sources":["webpack://dh-introscroll/webpack/runtime/import chunk loading","webpack://dh-introscroll/./node_modules/balance-text/balancetext.js","webpack://dh-introscroll/./node_modules/cuid/index.js","webpack://dh-introscroll/./node_modules/cuid/lib/fingerprint.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/getRandomValue.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/pad.js","webpack://dh-introscroll/./node_modules/debounce/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/html.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/html-tagged-template-literal.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-common/dist/index.esm.js","webpack://dh-introscroll/webpack/bootstrap","webpack://dh-introscroll/webpack/runtime/amd options","webpack://dh-introscroll/webpack/runtime/compat get default export","webpack://dh-introscroll/webpack/runtime/define property getters","webpack://dh-introscroll/webpack/runtime/ensure chunk","webpack://dh-introscroll/webpack/runtime/get javascript chunk filename","webpack://dh-introscroll/webpack/runtime/get mini-css chunk filename","webpack://dh-introscroll/webpack/runtime/hasOwnProperty shorthand","webpack://dh-introscroll/webpack/runtime/make namespace object","webpack://dh-introscroll/webpack/runtime/node module decorator","webpack://dh-introscroll/webpack/runtime/publicPath","webpack://dh-introscroll/webpack/runtime/css loading","webpack://dh-introscroll/./node_modules/@nrk/dh-vh/dist/index.mjs","webpack://dh-introscroll/./src/polyfills.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-mixins/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-scrollhistorie/dist/index.esm.js","webpack://dh-introscroll/./src/lib/balance-text-wrapper.js","webpack://dh-introscroll/./src/components/article-info.ts","webpack://dh-introscroll/./src/components/introscroll.module.css?4b5f","webpack://dh-introscroll/./src/components/introscroll.js","webpack://dh-introscroll/./src/components/background.module.css?5643","webpack://dh-introscroll/./src/components/cards/cards.module.css?fefa","webpack://dh-introscroll/./src/components/media/spesialmodul.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-stegvis-video/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-levende-stillbilde/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/build-npm/nrkno-snowplow.package.mjs","webpack://dh-introscroll/./node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/index.mjs","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/shared/dh-snowplow.1ee613bf.mjs","webpack://dh-introscroll/./src/client.js"],"sourcesContent":["// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\nvar installChunk = (data) => {\n\tvar {ids, modules, runtime} = data;\n\t// add \"modules\" to the modules object,\n\t// then flag all \"ids\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tfor(moduleId in modules) {\n\t\tif(__webpack_require__.o(modules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = modules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(;i < ids.length; i++) {\n\t\tchunkId = ids[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[ids[i]] = 0;\n\t}\n\n}\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// import() chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[1]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = import(\"./\" + __webpack_require__.u(chunkId)).then(installChunk, (e) => {\n\t\t\t\t\t\tif(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t});\n\t\t\t\t\tvar promise = Promise.race([promise, new Promise((resolve) => (installedChunkData = installedChunks[chunkId] = [resolve]))])\n\t\t\t\t\tpromises.push(installedChunkData[1] = promise);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no external install chunk\n\n// no on chunks loaded","/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License. *\n */\n/**\n * balancetext.js\n *\n * Author: Randy Edmunds\n */\n\n/* global define, module */\n\n/*\n * Copyright (c) 2007-2009 unscriptable.com and John M. Hann\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the “Software”), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n * Except as contained in this notice, the name(s) of the above\n * copyright holders (unscriptable.com and John M. Hann) shall not be\n * used in advertising or otherwise to promote the sale, use or other\n * dealings in this Software without prior written authorization.\n *\n * http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/\n *\n * Tested to work on (lowest browser):\n * - Sarari 4\n * - Chrome 16\n * - Firefox 10\n * - IE 9\n * - Edge 13\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.balanceText = factory();\n }\n}(this, () => {\n /**\n * Line breaking global vars\n */\n let breakMatches, wsnwMatches, wsnwOffset;\n\n /**\n * Selectors and elements to watch;\n * calling $.balanceText(elements) adds \"elements\" to this list.\n */\n const watching = {\n sel: [], // default class to watch\n el: [],\n };\n\n /**\n * Have handlers been initialized?\n */\n let handlersInitialized = false;\n\n /**\n * Is this a polyfill?\n */\n let polyfilled = false;\n\n\n /**\n * Do nothing\n */\n function noop() { }\n\n /**\n * Loop that works with array-likes\n * @param {Array-like} elements - List of elements to run a function on\n * @param {Function} callback - The function to call on each supplied element\n */\n function forEach(elements, callback) {\n Array.prototype.forEach.call(elements, callback);\n }\n\n /**\n * Polyfill for $(document).ready()\n *\n * @param {Function} fn - The function to execute when the document is ready\n */\n function ready(fn) {\n if (document.readyState !== \"loading\") {\n fn();\n } else if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", fn);\n } else {\n document.attachEvent(\"onreadystatechange\", () => {\n if (document.readyState !== \"loading\") {\n fn();\n }\n });\n }\n }\n\n /**\n * Debounces a function over a threshold\n *\n * @param {Function} func - The function to debounce\n * @param {number} threshold - time in ms\n * @param {boolean} execAsap - when true, execute immediately\n * @param args\n * @return {Function} Debounced function\n */\n function debounce(func, threshold, execAsap, ...args) {\n let timeout;\n\n return function () {\n const obj = this;\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args);\n }\n timeout = null;\n }\n\n if (timeout) {\n clearTimeout(timeout);\n } else if (execAsap) {\n func.apply(obj, args);\n }\n timeout = setTimeout(delayed, threshold || 100);\n };\n }\n\n /**\n * Determine whether the document supports TextWrap\n * @return {boolean}\n */\n function hasTextWrap() {\n if (typeof window === \"undefined\") {\n return false;\n }\n const { style } = document.documentElement;\n return style.textWrap || style.WebkitTextWrap || style.MozTextWrap || style.MsTextWrap;\n }\n\n /**\n * Object for tracking next whitespace params\n */\n // eslint-disable-next-line camelcase\n function NextWS_params() {\n this.reset();\n }\n\n NextWS_params.prototype.reset = function () {\n this.index = 0;\n this.width = 0;\n };\n\n /**\n * Check if index is contained in previously calculated list of white-space:nowrap ranges\n *\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isWhiteSpaceNoWrap(index) {\n // Is index inside 1 of the ranges?\n // start and end are breakable, but not inside range\n return wsnwMatches.some(range => (range.start < index && index < range.end));\n }\n\n /**\n * Recursively calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {boolean} includeTag - include length of tag itself\n */\n function recursiveCalcNoWrapOffsetsForLine(el, includeTag) {\n if (el.nodeType === el.ELEMENT_NODE) {\n // Found an embedded tag\n const style = window.getComputedStyle(el);\n if (style.whiteSpace === \"nowrap\") {\n // Tag with white-space:nowrap - add match, skip children\n const len = el.outerHTML.length;\n wsnwMatches.push({ start: wsnwOffset, end: wsnwOffset + len });\n wsnwOffset += len;\n } else {\n // Tag without white-space:nowrap - recursively check children of tag\n forEach(el.childNodes, (child) => {\n recursiveCalcNoWrapOffsetsForLine(child, true);\n });\n if (includeTag) {\n // Length of opening tag, attributes, and closing tag\n wsnwOffset += (el.outerHTML.length - el.innerHTML.length);\n }\n }\n } else if (el.nodeType === el.COMMENT_NODE) {\n wsnwOffset += el.length + 7; // delimiter: \n } else if (el.nodeType === el.PROCESSING_INSTRUCTION_NODE) {\n wsnwOffset += el.length + 2; // delimiter: < >\n } else {\n // Text node: add length\n wsnwOffset += el.length;\n }\n }\n\n /**\n * Calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {string} oldWS - \"old\" whitespace setting for temporarily resetting\n * @param {number} lineCharOffset - char offset of current line from start of text\n */\n function calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset) {\n // For first line (lineCharOffset === 0), calculate start and end offsets for each\n // white-space:nowrap element in the line.\n if (lineCharOffset === 0) {\n // Reset whiteSpace setting when breakMatches is being calculated\n // so white-space:nowrap can be detected in text\n el.style.whiteSpace = oldWS;\n\n wsnwOffset = 0;\n wsnwMatches = [];\n recursiveCalcNoWrapOffsetsForLine(el, false);\n\n // Restore temporary whitespace setting to recalc width\n el.style.whiteSpace = \"nowrap\";\n } else {\n // For all other lines, update the offsets for current line\n // 1. Ignore matches less than offset\n // 2. Subtract offset from remaining matches\n const newMatches = [];\n wsnwMatches.forEach((match) => {\n if (match.start > lineCharOffset) {\n newMatches.push({ start: match.start - lineCharOffset, end: match.end - lineCharOffset });\n }\n });\n wsnwMatches = newMatches;\n }\n }\n\n /**\n * Strip balance-text tags from an element inserted in previous run\n *\n * @param {Node} el - the element to act on\n */\n function removeTags(el) {\n // Remove soft-hyphen breaks\n let brs = el.querySelectorAll('br[data-owner=\"balance-text-hyphen\"]');\n forEach(brs, (br) => {\n br.outerHTML = \"\";\n });\n\n // Replace other breaks with whitespace\n brs = el.querySelectorAll('br[data-owner=\"balance-text\"]');\n forEach(brs, (br) => {\n br.outerHTML = \" \";\n });\n\n // Restore hyphens inserted for soft-hyphens\n let spans = el.querySelectorAll('span[data-owner=\"balance-text-softhyphen\"]');\n if (spans.length > 0) {\n forEach(spans, (span) => {\n const textNode = document.createTextNode(\"\\u00ad\");\n span.parentNode.insertBefore(textNode, span);\n span.parentNode.removeChild(span);\n });\n }\n\n // Remove spans inserted for justified text\n spans = el.querySelectorAll('span[data-owner=\"balance-text-justify\"]');\n if (spans.length > 0) {\n let txt = \"\";\n forEach(spans, (span) => {\n txt += span.textContent;\n span.parentNode.removeChild(span);\n });\n el.innerHTML = txt;\n }\n }\n\n /**\n * Checks to see if we should justify the balanced text with the\n * element based on the textAlign property in the computed CSS\n *\n * @param {Node} el - element to check\n * @return {boolean}\n */\n const isJustified = function (el) {\n const style = el.currentStyle || window.getComputedStyle(el, null);\n return (style.textAlign === \"justify\");\n };\n\n /**\n * Add whitespace after words in text to justify the string to\n * the specified size.\n * @param {Node} el - the element to justify\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @return {string} Justified text\n */\n function justify(el, txt, conWidth) {\n txt = txt.trim();\n const words = txt.split(\" \").length;\n txt = `${txt} `;\n\n // if we don't have at least 2 words, no need to justify.\n if (words < 2) {\n return txt;\n }\n\n // Find width of text in the DOM\n const tmp = document.createElement(\"span\");\n tmp.innerHTML = txt;\n el.appendChild(tmp);\n const size = tmp.offsetWidth;\n tmp.parentNode.removeChild(tmp);\n\n // Figure out our word spacing and return the element\n const wordSpacing = Math.floor((conWidth - size) / (words - 1));\n tmp.style.wordSpacing = `${wordSpacing}px`;\n tmp.setAttribute(\"data-owner\", \"balance-text-justify\");\n\n const div = document.createElement(\"div\");\n div.appendChild(tmp);\n return div.innerHTML;\n }\n\n /**\n * Returns true iff char at index is a break char outside of HTML < > tags.\n * Break char can be: whitespace (except non-breaking-space: u00a0),\n * hypen, emdash (u2014), endash (u2013), or soft-hyphen (u00ad).\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isBreakChar(txt, index) {\n const re = /([^\\S\\u00a0]|-|\\u2014|\\u2013|\\u00ad)(?![^<]*>)/g;\n let match;\n\n if (!breakMatches) {\n // Only calc break matches once per line\n breakMatches = [];\n match = re.exec(txt);\n while (match !== null) {\n if (!isWhiteSpaceNoWrap(match.index)) {\n breakMatches.push(match.index);\n }\n match = re.exec(txt);\n }\n }\n\n return breakMatches.indexOf(index) !== -1;\n }\n\n /**\n * In the current implementation, an index is a break\n * opportunity in txt iff it is:\n * - 0 or txt.length\n * - index of a non-whitespace char immediately preceded by a\n * whitespace, hyphen, soft-hyphen, em-dash, or en-dash char.\n *\n * Thus, it doesn't honour \"white-space\" or any other Unicode\n * line-breaking classes.)\n *\n * @precondition 0 <= index && index <= txt.length\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index to check\n * @return {boolean}\n */\n function isBreakOpportunity(txt, index) {\n return ((index === 0) || (index === txt.length) ||\n (isBreakChar(txt, index - 1) && !isBreakChar(txt, index)));\n }\n\n /**\n * Finds the first break opportunity (@see isBreakOpportunity)\n * in txt that's both after-or-equal-to index c in the direction dir\n * and resulting in line width equal to or past clamp(desWidth,\n * 0, conWidth) in direction dir. Sets ret.index and ret.width\n * to the corresponding index and line width (from the start of\n * txt to ret.index).\n *\n * @param {Node} el - element\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @param {number} desWidth - desired width\n * @param {number} dir - direction (-1 or +1)\n * @param {number} c - char index (0 <= c && c <= txt.length)\n * @param {Object} ret - return {index: {number}, width: {number}} of previous/next break\n */\n function findBreakOpportunity(el, txt, conWidth, desWidth, dir, c, ret) {\n let w;\n\n if (txt && typeof txt === \"string\") {\n for (;;) {\n while (!isBreakOpportunity(txt, c)) {\n c += dir;\n }\n\n el.innerHTML = txt.substr(0, c);\n w = el.offsetWidth;\n\n if (dir < 0) {\n if ((w <= desWidth) || (w <= 0) || (c === 0)) {\n break;\n }\n } else if ((desWidth <= w) || (conWidth <= w) || (c === txt.length)) {\n break;\n }\n\n c += dir;\n }\n }\n ret.index = c;\n ret.width = w;\n }\n\n /**\n * Detects the width of a non-breaking space character, given the height of\n * the element with no-wrap applied.\n *\n * @param {Node} el - element\n * @param {number} h - height\n * @return {number}\n */\n function getSpaceWidth(el, h) {\n const container = document.createElement(\"div\");\n\n container.style.display = \"block\";\n container.style.position = \"absolute\";\n container.style.bottom = 0;\n container.style.right = 0;\n container.style.width = 0;\n container.style.height = 0;\n container.style.margin = 0;\n container.style.padding = 0;\n container.style.visibility = \"hidden\";\n container.style.overflow = \"hidden\";\n\n const space = document.createElement(\"span\");\n\n space.style.fontSize = \"2000px\";\n space.innerHTML = \" \";\n\n container.appendChild(space);\n\n el.appendChild(container);\n\n const dims = space.getBoundingClientRect();\n container.parentNode.removeChild(container);\n\n const spaceRatio = dims.height / dims.width;\n\n return (h / spaceRatio);\n }\n\n /**\n * Get a list of elements regardless of input\n *\n * @param {string|Node|Array-like} elements - The selector to query, one or more elements\n * @return {Array<{Node}>}\n */\n function getElementsList(elements) {\n if (!elements) {\n return [];\n }\n\n // is selector\n if (typeof elements === \"string\") {\n return document.querySelectorAll(elements);\n }\n\n // is single element\n if (elements.tagName && elements.querySelectorAll) {\n return [elements];\n }\n\n return elements;\n }\n\n /**\n * When a browser has native support for the text-wrap property,\n * the text balanceText plugin will let the browser handle it natively,\n * otherwise it will apply its own text balancing code.\n *\n * @param {string|Node|Array-like} elements - the list of elements to balance\n */\n function balanceText(elements) {\n forEach(getElementsList(elements), (el) => {\n // In a lower level language, this algorithm takes time\n // comparable to normal text layout other than the fact\n // that we do two passes instead of one, so we should\n // be able to do without this limit.\n const maxTextWidth = 5000;\n\n // strip balance-text generated tags\n removeTags(el);\n\n // save settings\n const oldWS = el.style.whiteSpace;\n const oldFloat = el.style.float;\n const oldDisplay = el.style.display;\n const oldPosition = el.style.position;\n const oldLH = el.style.lineHeight;\n\n // remove line height before measuring container size\n el.style.lineHeight = \"normal\";\n\n const containerWidth = el.offsetWidth;\n const containerHeight = el.offsetHeight;\n\n // temporary settings\n el.style.whiteSpace = \"nowrap\";\n el.style.float = \"none\";\n el.style.display = \"inline\";\n el.style.position = \"static\";\n\n let nowrapWidth = el.offsetWidth;\n const nowrapHeight = el.offsetHeight;\n\n // An estimate of the average line width reduction due\n // to trimming trailing space that we expect over all\n // lines other than the last.\n const spaceWidth = ((oldWS === \"pre-wrap\") ? 0 : getSpaceWidth(el, nowrapHeight));\n\n if (containerWidth > 0 && // prevent divide by zero\n nowrapWidth > containerWidth && // text is more than 1 line\n nowrapWidth < maxTextWidth) { // text is less than arbitrary limit (make this a param?)\n let remainingText = el.innerHTML;\n let newText = \"\";\n let lineText = \"\";\n const shouldJustify = isJustified(el);\n const totLines = Math.round(containerHeight / nowrapHeight);\n let remLines = totLines;\n let lineCharOffset = 0;\n\n // loop vars\n let desiredWidth, guessIndex, le, ge, splitIndex, isHyphen, isSoftHyphen;\n\n // Determine where to break:\n while (remLines > 1) {\n // clear whitespace match cache for each line\n breakMatches = null;\n\n // Must calc white-space:nowrap offsets before first call to findBreakOpportunity()\n calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset);\n\n desiredWidth = Math.round((nowrapWidth + spaceWidth) / remLines - spaceWidth);\n\n // Guessed char index\n guessIndex = Math.round((remainingText.length + 1) / remLines) - 1;\n\n le = new NextWS_params();\n\n // Find a breaking space somewhere before (or equal to) desired width,\n // not necessarily the closest to the desired width.\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find first breaking char after (or equal to) desired width.\n ge = new NextWS_params();\n guessIndex = le.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, +1, guessIndex, ge);\n\n // Find first breaking char before (or equal to) desired width.\n le.reset();\n guessIndex = ge.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find closest string to desired length\n if (le.index === 0) {\n splitIndex = ge.index;\n } else if ((containerWidth < ge.width) || (le.index === ge.index)) {\n splitIndex = le.index;\n } else {\n splitIndex = ((Math.abs(desiredWidth - le.width) < Math.abs(ge.width - desiredWidth))\n ? le.index\n : ge.index);\n }\n\n // Break string\n lineText = remainingText.substr(0, splitIndex).replace(/\\s$/, \"\");\n\n isSoftHyphen = Boolean(lineText.match(/\\u00ad$/));\n if (isSoftHyphen) {\n // Replace soft-hyphen causing break with explicit hyphen\n lineText = lineText.replace(/\\u00ad$/, '-');\n }\n\n if (shouldJustify) {\n newText += justify(el, lineText, containerWidth);\n } else {\n newText += lineText;\n isHyphen = isSoftHyphen || Boolean(lineText.match(/(-|\\u2014|\\u2013)$/));\n newText += isHyphen ? '
'\n : '
';\n }\n remainingText = remainingText.substr(splitIndex);\n lineCharOffset = splitIndex;\n\n // update counters\n remLines--;\n el.innerHTML = remainingText;\n nowrapWidth = el.offsetWidth;\n }\n\n if (shouldJustify) {\n el.innerHTML = newText + justify(el, remainingText, containerWidth);\n } else {\n el.innerHTML = newText + remainingText;\n }\n }\n\n // restore settings\n el.style.whiteSpace = oldWS;\n el.style.float = oldFloat;\n el.style.display = oldDisplay;\n el.style.position = oldPosition;\n el.style.lineHeight = oldLH;\n });\n }\n\n /**\n * Call the balanceText plugin on elements that it's watching.\n */\n function updateWatched() {\n const selectors = watching.sel.join(\",\");\n const selectedElements = getElementsList(selectors);\n const elements = Array.prototype.concat.apply(watching.el, selectedElements);\n balanceText(elements);\n }\n\n /**\n * Initialize the events for which to re-apply BalanceText. They are:\n * - Document ready\n * - Document full load\n * - Window resize\n */\n function initHandlers() {\n if (handlersInitialized) {\n return;\n }\n\n // Apply on DOM ready\n ready(updateWatched);\n\n // Reapply on full load\n window.addEventListener(\"load\", updateWatched);\n\n // Reapply on resize\n window.addEventListener(\"resize\", debounce(updateWatched));\n\n handlersInitialized = true;\n }\n\n /**\n * Apply the BalanceText routine on the document and watch the list\n * of elements. On window resize, re-apply BalanceText to the given elements\n *\n * @param {string|Node|Array-like} elements - the elements to watch after applying BalanceText\n */\n function balanceTextAndWatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel.push(elements);\n } else {\n forEach(getElementsList(elements), (el) => {\n watching.el.push(el);\n });\n }\n\n initHandlers();\n updateWatched();\n }\n\n /**\n * Stop watching elements\n *\n * @param {string|Node|Array-like} elements\n */\n function unwatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel = watching.sel.filter(el => el !== elements);\n } else {\n elements = getElementsList(elements);\n watching.el = watching.el.filter(el => elements.indexOf(el) === -1);\n }\n }\n\n /**\n * Treat this app as a polyfill. Watch for changes to the .balance-text selector\n */\n function polyfill() {\n if (polyfilled) {\n return;\n }\n\n watching.sel.push(\".balance-text\");\n initHandlers();\n polyfilled = true;\n }\n\n /**\n * Public interface\n *\n * @param {string|Node|Array-like} elements - elements to balance\n * @param {Object} options - processing options\n * - {boolean} watch - watch elements for resize\n */\n function publicInterface(elements, options) {\n if (!elements) {\n // empty call means polyfill (watch for changes)\n polyfill();\n } else if (options && options.watch === true) {\n balanceTextAndWatch(elements);\n } else if (options && options.watch === false) {\n unwatch(elements);\n } else {\n balanceText(elements);\n }\n }\n\n publicInterface.updateWatched = updateWatched;\n\n if (hasTextWrap()) {\n noop.updateWatched = noop;\n return noop;\n }\n return publicInterface;\n}));\n","/**\n * cuid.js\n * Collision-resistant UID generator for browsers and node.\n * Sequential for fast db lookups and recency sorting.\n * Safe for element IDs and server-side lookups.\n *\n * Extracted from CLCTR\n *\n * Copyright (c) Eric Elliott 2012\n * MIT License\n */\n\nvar fingerprint = require('./lib/fingerprint.js');\nvar pad = require('./lib/pad.js');\nvar getRandomValue = require('./lib/getRandomValue.js');\n\nvar c = 0,\n blockSize = 4,\n base = 36,\n discreteValues = Math.pow(base, blockSize);\n\nfunction randomBlock () {\n return pad((getRandomValue() *\n discreteValues << 0)\n .toString(base), blockSize);\n}\n\nfunction safeCounter () {\n c = c < discreteValues ? c : 0;\n c++; // this is not subliminal\n return c - 1;\n}\n\nfunction cuid () {\n // Starting with a lowercase letter makes\n // it HTML element ID friendly.\n var letter = 'c', // hard-coded allows for sequential access\n\n // timestamp\n // warning: this exposes the exact date and time\n // that the uid was created.\n timestamp = (new Date().getTime()).toString(base),\n\n // Prevent same-machine collisions.\n counter = pad(safeCounter().toString(base), blockSize),\n\n // A few chars to generate distinct ids for different\n // clients (so different computers are far less\n // likely to generate the same id)\n print = fingerprint(),\n\n // Grab some more chars from Math.random()\n random = randomBlock() + randomBlock();\n\n return letter + timestamp + counter + print + random;\n}\n\ncuid.slug = function slug () {\n var date = new Date().getTime().toString(36),\n counter = safeCounter().toString(36).slice(-4),\n print = fingerprint().slice(0, 1) +\n fingerprint().slice(-1),\n random = randomBlock().slice(-2);\n\n return date.slice(-2) +\n counter + print + random;\n};\n\ncuid.isCuid = function isCuid (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n if (stringToCheck.startsWith('c')) return true;\n return false;\n};\n\ncuid.isSlug = function isSlug (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n var stringLength = stringToCheck.length;\n if (stringLength >= 7 && stringLength <= 10) return true;\n return false;\n};\n\ncuid.fingerprint = fingerprint;\n\nmodule.exports = cuid;\n","var pad = require('./pad.js');\n\nvar env = typeof window === 'object' ? window : self;\nvar globalCount = Object.keys(env).length;\nvar mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0;\nvar clientId = pad((mimeTypesLength +\n navigator.userAgent.length).toString(36) +\n globalCount.toString(36), 4);\n\nmodule.exports = function fingerprint () {\n return clientId;\n};\n","\nvar getRandomValue;\n\nvar crypto = typeof window !== 'undefined' &&\n (window.crypto || window.msCrypto) ||\n typeof self !== 'undefined' &&\n self.crypto;\n\nif (crypto) {\n var lim = Math.pow(2, 32) - 1;\n getRandomValue = function () {\n return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim);\n };\n} else {\n getRandomValue = Math.random;\n}\n\nmodule.exports = getRandomValue;\n","module.exports = function pad (num, size) {\n var s = '000000000' + num;\n return s.substr(s.length - size);\n};\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","module.exports = require('./src/get-element-tag')\n","module.exports = require('./src/html-tagged-template-literal.js')\n","/**\n * Creates a valid custom element name that is versioned (major)\n */\nfunction getElementTag(name, version) {\n const formattedVersion = version ? `-v${version.split('.')[0]}` : ''\n return name + formattedVersion\n}\n\nmodule.exports.getElementTag = getElementTag\n","/**\n * Concats a template literal and interpolates values correctly, as well as removes formatting whitespace and HTML comments\n */\nfunction html(strings, ...interpolations) {\n let str = strings[0]\n for (let i = 0; i < interpolations.length; i++) {\n str += interpolations[i]\n str += strings[i + 1]\n }\n\n return str.replace(/>\\s+<')\n}\n\nmodule.exports.html = html\n","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldGet(e, t) {\n var r = classPrivateFieldGet2(t, e);\n return classApplyDescriptorGet(e, r);\n}\nexport { _classPrivateFieldGet as default };","function _classApplyDescriptorGet(e, t) {\n return t.get ? t.get.call(e) : t.value;\n}\nexport { _classApplyDescriptorGet as default };","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}\nexport { _classPrivateFieldGet2 as default };","function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}\nexport { _assertClassBrand as default };","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldSet(e, t, r) {\n var s = classPrivateFieldGet2(t, e);\n return classApplyDescriptorSet(e, s, r), r;\n}\nexport { _classPrivateFieldSet as default };","function _classApplyDescriptorSet(e, t, l) {\n if (t.set) t.set.call(e, l);else {\n if (!t.writable) throw new TypeError(\"attempted to set read only private field\");\n t.value = l;\n }\n}\nexport { _classApplyDescriptorSet as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _defineProperty from '@babel/runtime/helpers/defineProperty';\n\n/* eslint-disable compat/compat */\nfunction getDefaultRoot() {\n /*\n Use document if supported\n IntersectionObserver will otherwise default to top level document,\n and IntersectionObserver will not work as expected in an iframe.\n https://github.com/w3c/IntersectionObserver/issues/372\n */\n\n /*\n Safari does not throw error on root: document, but does not trigger events as expected\n returning null for now until better feature detection is possible\n */\n return null;\n\n /*\n try {\n // eslint-disable-next-line no-new\n new IntersectionObserver(() => {}, { root: document })\n return document\n } catch (e) {\n return null\n }\n */\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar defaultConfig = {\n rootMargin: '0px 0px 0px 0px',\n threshold: [0, 0.5, 1],\n root: getDefaultRoot()\n};\nclass ElementIntersectionObserver {\n constructor(elements, onChange, config) {\n _defineProperty(this, \"intersections\", void 0);\n _defineProperty(this, \"elements\", void 0);\n this.elements = elements.slice(0);\n this.intersections = elements.map(target => ({\n target,\n isIntersecting: false,\n ratio: null\n }));\n this.intersectionObserver = new IntersectionObserver(entries => {\n var intersections = this.intersections.slice(0);\n entries.forEach(entry => {\n var idx = elements.indexOf(entry.target);\n intersections.splice(idx, 1, {\n target: entry.target,\n isIntersecting: entry.isIntersecting,\n ratio: entry.intersectionRatio\n });\n });\n this.intersections = intersections;\n onChange(this.intersections);\n }, _objectSpread(_objectSpread({}, defaultConfig), config));\n elements.forEach(elm => this.intersectionObserver.observe(elm));\n }\n disconnect() {\n // Unregister trigger elements\n this.elements.forEach(elm => this.intersectionObserver.unobserve(elm));\n\n // Disconnect intersection observer\n this.intersectionObserver.disconnect();\n }\n}\n\nfunction toggleAttribute(el, name, boolValue) {\n if (!el) {\n return;\n }\n var nextValue;\n if (typeof boolValue !== 'undefined') {\n nextValue = !!boolValue;\n } else {\n nextValue = el.hasAttribute(name);\n }\n if (nextValue) {\n el.setAttribute(name, '');\n } else {\n el.removeAttribute(name);\n }\n}\nfunction setAttribute(el, name, nextValue) {\n if (!el) {\n return;\n }\n if (nextValue) {\n el.setAttribute(name, nextValue);\n } else {\n el.removeAttribute(name);\n }\n}\nvar closest = (() => {\n var proto = typeof window === 'undefined' ? {} : window.Element.prototype;\n var match = proto.matches || proto.msMatchesSelector || proto.webkitMatchesSelector;\n if (proto.closest) {\n return (el, css) => el.closest(css);\n } else {\n return (el, css) => {\n for (; el; el = el.parentElement) if (match.call(el, css)) return el;\n return null;\n };\n }\n})();\nfunction addStyle(nodeName, css) {\n var key = \"style-\".concat(nodeName.toLowerCase());\n var min = css.replace(/\\/\\*[^!][^*]*\\*\\//g, '').replace(/\\s*(^|[:;,{}]|$)\\s*/g, '$1');\n document.getElementById(key) || document.head.insertAdjacentHTML('afterbegin', \"\"));\n}\nfunction toArray(nodeList) {\n return [].slice.call(nodeList);\n}\nfunction dispatchEvent(element, name) {\n var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var ignore = \"prevent_recursive_dispatch_maximum_callstack\".concat(name);\n var event;\n if (element[ignore]) return true;\n // We are already processing this event, so skip sending a new one\n else element[ignore] = true; // Add name to dispatching ignore\n\n if (typeof window.CustomEvent === 'function') {\n event = new window.CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail\n });\n } else {\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(name, true, true, detail);\n }\n // IE reports incorrect event.defaultPrevented\n // but correct return value on element.dispatchEvent\n var result = element.dispatchEvent(event);\n element[ignore] = null; // Remove name from dispatching ignore\n\n return result; // Follow W3C standard for return value\n}\n\nfunction easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n}\nclass VerticalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(top) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollTop;\n var distance = top - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollTop = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollTop = top;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\nclass HorizontalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(left) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollLeft;\n var distance = left - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollLeft = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollLeft = left;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\n\nfunction testReducedMotion() {\n if (typeof window !== 'undefined') {\n return !!window.matchMedia && window.matchMedia('(prefers-reduced-motion)').matches;\n }\n return false;\n}\n\nvar MAX_SAFE_INTEGER = 9007199254740991;\nfunction withinRange(current) {\n var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var stop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : MAX_SAFE_INTEGER;\n return current >= start && current <= stop;\n}\nfunction withinStops(currentTime, stops, targetStop) {\n var nrOfStops = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n var uniqueStops = stops.filter(unique);\n var targetTime = stops[targetStop];\n var prevTime = uniqueStops[uniqueStops.indexOf(targetTime) - nrOfStops];\n var nextTime = uniqueStops[uniqueStops.indexOf(targetTime) + nrOfStops];\n return withinRange(currentTime, prevTime, nextTime);\n}\nfunction unique(value, index, self) {\n return self.indexOf(value) === index;\n}\n\n/*\n * 'loading=\"lazy\"' is defined in terms of IntersectionObserver and the initial root.\n * As a result images with 'loading=\"lazy\"' inside a scroll container will not load\n * until they at least have one pixel visible in the viewport.\n *\n * This will hopefully fixed in a future version of the spec:\n * https://github.com/w3c/IntersectionObserver/issues/431\n *\n * scroll-container-lazy-load observes images and a scroll container.\n * Once images are close to intersecting it will change 'loading=\"lazy\"' to 'loading=\"eager\"'.\n * */\nfunction loadImage(image) {\n if (image.loading === 'lazy') {\n image.loading = 'eager';\n }\n}\nfunction connectScrollContainerLazyLoad(container, images) {\n var containerIntersecting = false;\n var deferredImages = [];\n\n // eslint-disable-next-line compat/compat\n var containerObserver = new IntersectionObserver(entries => {\n containerIntersecting = entries === null || entries === void 0 ? void 0 : entries[0].isIntersecting;\n if (containerIntersecting) {\n deferredImages.forEach(image => loadImage(image));\n deferredImages = [];\n }\n }, {\n root: getDefaultRoot(),\n threshold: [0.0]\n });\n containerObserver.observe(container);\n\n // eslint-disable-next-line compat/compat\n var imageObserver = new IntersectionObserver(entries => {\n for (var entry of entries) {\n if (entry.isIntersecting) {\n var image = entry.target;\n imageObserver.unobserve(image);\n if (containerIntersecting) {\n loadImage(image);\n } else {\n /* Defer loading of if the container is not intersecting the viewport */\n deferredImages.push(image);\n }\n }\n }\n }, {\n root: container,\n rootMargin: '300px',\n threshold: 0.0\n });\n for (var image of images) {\n imageObserver.observe(image);\n }\n return () => {\n containerObserver.disconnect();\n imageObserver.disconnect();\n };\n}\n\nfunction debounce(fn, delay) {\n var timeout;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n };\n}\n\nexport { ElementIntersectionObserver, HorizontalScroll, VerticalScroll, addStyle, closest, connectScrollContainerLazyLoad, debounce, dispatchEvent, setAttribute, testReducedMotion, toArray, toggleAttribute, withinRange, withinStops };\n//# sourceMappingURL=index.esm.js.map\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\tloaded: false,\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// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// 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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"199\":\"dh-karthistorie\",\"667\":\"dh-stegvis-lottie\"}[chunkId] || chunkId) + \"-chunk-\" + {\"199\":\"0813fb78909452efc7fd\",\"529\":\"9662709929211e80902a\",\"667\":\"ccdaee2133a10bfc5b0e\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + \"a829592c9123ececa37f\" + \".css\";\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};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"https://static.nrk.no/dh/module/introscroll/static/\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tif (__webpack_require__.nc) {\n\t\tlinkTag.nonce = __webpack_require__.nc;\n\t}\n\tvar onLinkComplete = (event) => {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && event.type;\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + errorType + \": \" + realHref + \")\");\n\t\t\terr.name = \"ChunkLoadError\";\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = (href, fullhref) => {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = (chunkId) => {\n\treturn new Promise((resolve, reject) => {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"529\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, (e) => {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr\n\n// no prefetching\n\n// no preloaded","function t(){var t,e=navigator.userAgent||navigator.vendor||window.opera,i=e.toLowerCase();return!!e&&(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)&&(t=/fban|fbav|instagram|firefox|opera|fxios/),t&&t.test(i))}var e={ssrOrientation:null,mode:\"max\"},i=function(t){var i,n,o;void 0===t&&(t={}),this.destroyed=!1,this.mounted=!1,this.listeners=[],this.value={portrait:0,landscape:0},this.opts=Object.assign({},e,t),this.orientation=this.getOrientation(),this.update(),this.handleUpdate=this.handleUpdate.bind(this),this.throttledUpdate=(i=this.handleUpdate,function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=this;o?(clearTimeout(n),n=setTimeout(function(){Date.now()-o>=100&&(i.apply(r,t),o=Date.now())},100-(Date.now()-o))):(i.apply(r,t),o=Date.now())})};function n(){var t=new i;return t.listen(function(t){try{document.getElementsByTagName(\"html\")[0].style.setProperty(\"--dh-vh\",t+\"px\")}catch(t){console.error(t)}}),t}function o(){return\"Dh Vh\"}i.prototype.mount=function(){\"undefined\"!=typeof window&&(window.addEventListener(\"resize\",this.throttledUpdate),window.addEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!0},i.prototype.destroy=function(){\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this.throttledUpdate),window.removeEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!1},i.prototype.getOrientation=function(){return\"undefined\"!=typeof window?window.innerHeight>window.innerWidth?\"portrait\":\"landscape\":this.opts.ssrOrientation},i.prototype.handleUpdate=function(){this.update()},i.prototype.listen=function(t){var e=this;return this.listeners.push(t),!1===this.mounted&&this.mount(),function(){e.listeners=e.listeners.filter(function(e){return e!==t})}},i.prototype.emit=function(){var t=this,e=this.getVh(),i=this.getHeight();this.listeners.forEach(function(n){return n(e,i,t.orientation)})},i.prototype.getHeight=function(){return this.orientation?this.value[this.orientation]:0},i.prototype.getVh=function(){return this.orientation?this.value[this.orientation]/100:0},i.prototype.update=function(){var t=this.orientation;if(this.orientation=this.getOrientation(),this.orientation){var e=this.value[this.orientation],i=window.innerHeight;t!==this.orientation?(i>e&&(this.value[this.orientation]=i),this.emit()):i>e&&(this.value[this.orientation]=i,this.emit())}};export{o as test,t as checkHasVhBug,n as fixVhBug};\n//# sourceMappingURL=index.mjs.map\n","import { checkHasVhBug, fixVhBug } from '@nrk/dh-vh'\n\nif (checkHasVhBug()) {\n fixVhBug()\n}\n","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport _defineProperty from '@babel/runtime/helpers/defineProperty';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar dedupeId = 0;\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {(base: BaseClass) => BaseClass} mixin\n */\nfunction dedupeMixin(mixin) {\n var mixinId = dedupeId++;\n return base => {\n var _base$_appliedMixins, _base$_appliedMixins2;\n if ((_base$_appliedMixins = base._appliedMixins) !== null && _base$_appliedMixins !== void 0 && _base$_appliedMixins[mixinId]) {\n return base;\n }\n var extended = mixin(base);\n extended._appliedMixins = _objectSpread({}, (_base$_appliedMixins2 = base._appliedMixins) !== null && _base$_appliedMixins2 !== void 0 ? _base$_appliedMixins2 : {});\n extended._appliedMixins[mixinId] = true;\n return extended;\n };\n}\n\nfunction _classPrivateMethodInitSpec$1(obj, privateSet) { _checkPrivateRedeclaration$1(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration$1(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration$1(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet$1(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nvar VIEWPORT_POSITION_ATTR = 'viewport-position';\nvar VIEWPORT_POSITIONS = {\n aboveViewport: 'ABOVE-VIEWPORT',\n inViewport: 'IN-VIEWPORT',\n belowViewport: 'BELOW-VIEWPORT'\n};\n\n/**\n * Check if element represents the browser viewport\n *\n * @param viewportContainer Element to check\n * @returns {boolean} True if element represents the browser viewport and not a scroll container\n */\nfunction isViewport(viewportContainer) {\n return (\n // eslint-disable-next-line compat/compat\n viewportContainer === document.scrollingElement || viewportContainer === document.documentElement\n );\n}\n\n/**\n * Custom Element mixin.\n *\n * Updates the `viewport-position` attribute according to whether the element is in the viewport or not.\n * Possible values for the attribute is `IN-VIEWPORT`, `ABOVE-VIEWPORT` and `BELOW-VIEWPORT`\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _ViewportPositionMixin(Base) {\n var _observer, _createIntersectionObserver, _disconnectIntersectionObserver, _handleIntersectionChange;\n return _observer = /*#__PURE__*/new WeakMap(), _createIntersectionObserver = /*#__PURE__*/new WeakSet(), _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet(), _handleIntersectionChange = /*#__PURE__*/new WeakMap(), class extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec$1(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec$1(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleIntersectionChange, {\n writable: true,\n value: _ref => {\n var [intersection] = _ref;\n if (intersection.isIntersecting) {\n if (this.viewportPosition !== VIEWPORT_POSITIONS.inViewport) {\n this.viewportPosition = VIEWPORT_POSITIONS.inViewport;\n }\n } else {\n if (!this.viewportPosition || this.viewportPosition === VIEWPORT_POSITIONS.inViewport) {\n var {\n top,\n bottom\n } = this.getBoundingClientRect();\n\n // The latest chrome reports bcr.bottom to be 0.5\n // Instead of checking that the bottom is outside the viewport\n // we check that the top of the element is above the viewport,\n // and that the bottom of the element is above the bottom of the viewport\n var isAbove = top <= 0 && bottom <= window.innerHeight;\n this.viewportPosition = isAbove ? VIEWPORT_POSITIONS.aboveViewport : VIEWPORT_POSITIONS.belowViewport;\n }\n }\n }\n });\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n var _super$connectedCallb;\n (_super$connectedCallb = super.connectedCallback) === null || _super$connectedCallb === void 0 || _super$connectedCallb.call(this);\n _classPrivateMethodGet$1(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n var _super$disconnectedCa;\n (_super$disconnectedCa = super.disconnectedCallback) === null || _super$disconnectedCa === void 0 || _super$disconnectedCa.call(this);\n _classPrivateMethodGet$1(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n /**\n * Get the viewport or the scroll container element that is used as a replacement for the viewport.\n *\n * @returns {Element|HTMLElement} viewportContainer\n */\n get viewportContainer() {\n var _document$scrollingEl;\n /*\n * Using root/document.scrollingElement to represent the viewport,\n * as this presents a unified API for scrolling for both the viewport and scrolling elements.\n * (scrollTop, scrollLeft, scrollTo)\n *\n * Some API's such as IntersectionObserver use different values for the viewport\n * (such as null and document), so take care.\n */\n\n // eslint-disable-next-line compat/compat\n return (_document$scrollingEl = document.scrollingElement) !== null && _document$scrollingEl !== void 0 ? _document$scrollingEl : document.documentElement;\n }\n\n /**\n * Get the intersection root\n * @returns {null|Element|HTMLElement|Document}\n */\n get viewportIntersectionRoot() {\n var viewportContainer = this.viewportContainer;\n if (isViewport(viewportContainer)) {\n var _navigator, _navigator$includes;\n var isIFrame = window.location !== window.parent.location;\n var isChrome = (_navigator = navigator) === null || _navigator === void 0 || (_navigator = _navigator.userAgent) === null || _navigator === void 0 || (_navigator$includes = _navigator.includes) === null || _navigator$includes === void 0 ? void 0 : _navigator$includes.call(_navigator, 'Chrome');\n // Chrome has a bug when using document in as IntersectionObserver root: https://bugs.chromium.org/p/chromium/issues/detail?id=1420155\n if (isIFrame && !isChrome) {\n /* Use document as intersection root in iframes */\n return document;\n } else {\n return null;\n }\n } else {\n return viewportContainer;\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n set viewportPosition(value) {\n var currentValue = this.getAttribute(VIEWPORT_POSITION_ATTR);\n if (value !== currentValue) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, value);\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n };\n function _createIntersectionObserver2() {\n // eslint-disable-next-line compat/compat\n _classPrivateFieldSet(this, _observer, new IntersectionObserver(_classPrivateFieldGet(this, _handleIntersectionChange), {\n threshold: [0],\n // Intersection observer uses null or document for regular viewport\n root: this.viewportIntersectionRoot,\n // Scroll snapping elements trigger intersection when they are perfectly aligned with the screen,\n // both above and below the viewport. Using -1px as root margin to prevent intersection.\n rootMargin: '-1px 0px -1px 0px'\n }));\n _classPrivateFieldGet(this, _observer).observe(this);\n }\n function _disconnectIntersectionObserver2() {\n var _classPrivateFieldGet2, _classPrivateFieldGet3;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet2 === void 0 || _classPrivateFieldGet2.unobserve(this);\n (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.disconnect();\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base */\nvar ViewportPositionMixin = dedupeMixin(_ViewportPositionMixin);\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nfunction _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classCheckPrivateStaticFieldDescriptor(descriptor, action) { if (descriptor === undefined) { throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\"); } }\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError(\"Private static access of wrong provenance\"); } }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n/**\n * @typedef BoundAttributeConfig\n * @property {string} attribute – name of attribute to bind, or name of source and target attributes separated with a semicolon\n * @property {string | function } targets – selector string or function that takes element as argument and returns list of target elements\n */\n\n/**\n * Custom element mixin that creates a one way binding between an attribute on\n * the custom element and a given attribute on it's children.\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _AttributeBindingMixin(Base) {\n var _class, _getTargetElements, _boundAttributes;\n return _getTargetElements = /*#__PURE__*/new WeakSet(), (_class = class AttributeBindingMixinDef extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getTargetElements);\n }\n /**\n * Configure the bound attributes.\n *\n * @returns {BoundAttributeConfig[]}\n */\n static get boundAttributes() {\n return [];\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n var boundAttributes = {};\n\n // Parse and store configuration for faster lookup\n for (var {\n attribute,\n targets\n } of this.boundAttributes) {\n if (typeof attribute !== 'string') {\n throw Error('Bound attribute configuration must have `attribute` property of string type');\n }\n var [sourceAttribute, targetAttribute = sourceAttribute] = attribute.split(':');\n boundAttributes[sourceAttribute] = {\n sourceAttributeName: sourceAttribute,\n targetAttributeName: targetAttribute,\n targets\n };\n }\n _classStaticPrivateFieldSpecSet(AttributeBindingMixinDef, _class, _boundAttributes, boundAttributes);\n\n // Observe bound attributes\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), ...Object.keys(boundAttributes)];\n }\n attributeChangedCallback(name, oldValue, newValue) {\n var _super$attributeChang;\n (_super$attributeChang = super.attributeChangedCallback) === null || _super$attributeChang === void 0 || _super$attributeChang.call(this, name, oldValue, newValue);\n if (newValue === oldValue) {\n return;\n }\n var boundAttributes = _classStaticPrivateFieldSpecGet(AttributeBindingMixinDef, _class, _boundAttributes);\n if (name in boundAttributes) {\n var configuration = boundAttributes[name];\n var targets = configuration.targets;\n var targetElements = _classPrivateMethodGet(this, _getTargetElements, _getTargetElements2).call(this, targets);\n for (var element of targetElements) {\n if (newValue !== null) {\n element.setAttribute(configuration.targetAttributeName, newValue);\n } else {\n element.removeAttribute(configuration.targetAttributeName);\n }\n }\n }\n }\n }, _boundAttributes = {\n writable: true,\n value: void 0\n }, _class);\n function _getTargetElements2(targets) {\n if (typeof targets === 'function') {\n return targets(this);\n } else if (typeof targets === 'string') {\n return Array.from(this.querySelectorAll(targets));\n } else {\n throw new Error(\"Unsupported targets type: \".concat(typeof targets));\n }\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nvar AttributeBindingMixin = dedupeMixin(_AttributeBindingMixin);\n\nexport { AttributeBindingMixin, VIEWPORT_POSITIONS, VIEWPORT_POSITION_ATTR, ViewportPositionMixin };\n//# sourceMappingURL=index.esm.js.map\n","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport { toArray, setAttribute, dispatchEvent, ElementIntersectionObserver } from '@nrk/dh-basis-common';\nimport { ViewportPositionMixin, AttributeBindingMixin, VIEWPORT_POSITION_ATTR, VIEWPORT_POSITIONS } from '@nrk/dh-basis-mixins';\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n\n/* Attributes */\n// VIEWPORT_POSITION_ATTR – Added by ViewportPositionMixin\nvar ACTIVE_BACKGROUND_ATTR = 'active-background-id';\nvar ROOT_MARGIN_ATTR = 'root-margin';\n\n/* Child attributes */\nvar BG_ID_ATTR = 'data-background-id';\nvar SHOW_BACKGROUND_ATTR = 'data-show-background';\nvar ATTRIBUTE_NAME = 'data-attribute-name';\nvar ATTRIBUTE_VALUE = 'data-attribute-value';\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_DATA_ATTR = 'data-viewport-position';\n\n/* Events */\nvar TRIGGER_ACTIVATED_EVENT = 'dh-basis-scrollhistorie-trigger-activated';\nfunction isTrigger(elm) {\n return elm.hasAttribute(SHOW_BACKGROUND_ATTR);\n}\nfunction isBackground(elm) {\n return elm.hasAttribute(BG_ID_ATTR);\n}\n\n/**\n * Custom element that manages a set of background and trigger elements.\n *\n * Background elements are annotated with a `data-background-id` attribute.\n *\n * Trigger elements are annotated with a `data-show-background` attribute,\n * `data-attribute-name` and `data-attribute-value` attributes.\n *\n *\n * When a trigger element comes into view it will set the `data-state` attribute\n * of the corresponding background to `ACTIVE`.\n * The previous and next background will get `data-state`=`PREV` and `NEXT`.\n */\nvar _activeTriggerIndex = /*#__PURE__*/new WeakMap();\nvar _observer = /*#__PURE__*/new WeakMap();\nvar _createIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _handleTriggerChange = /*#__PURE__*/new WeakMap();\nvar _prepareBackgrounds = /*#__PURE__*/new WeakSet();\nvar _updateBackgrounds = /*#__PURE__*/new WeakSet();\nvar _getBackgroundId = /*#__PURE__*/new WeakSet();\nclass Scrollhistorie extends ViewportPositionMixin(AttributeBindingMixin(HTMLElement)) {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getBackgroundId);\n _classPrivateMethodInitSpec(this, _updateBackgrounds);\n _classPrivateMethodInitSpec(this, _prepareBackgrounds);\n _classPrivateMethodInitSpec(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _activeTriggerIndex, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleTriggerChange, {\n writable: true,\n value: intersections => {\n var activeIntersection = intersections.filter(i => i.isIntersecting).pop();\n if (!activeIntersection || !activeIntersection.target) {\n _classPrivateFieldSet(this, _activeTriggerIndex, null);\n return;\n }\n var triggerElement = activeIntersection.target;\n\n // Set active background\n this.activeBackgroundId = triggerElement.getAttribute(SHOW_BACKGROUND_ATTR);\n\n // Update attribute on active background\n var attributeName = triggerElement.getAttribute(ATTRIBUTE_NAME);\n var attributeValue = triggerElement.getAttribute(ATTRIBUTE_VALUE);\n if (attributeName) {\n var _this$activeBackgroun;\n (_this$activeBackgroun = this.activeBackground) === null || _this$activeBackgroun === void 0 || _this$activeBackgroun.setAttribute(attributeName, attributeValue);\n }\n this.triggerElements.forEach(elm => setAttribute(elm, STATE_ATTR, elm === triggerElement ? 'ACTIVE' : undefined));\n var triggerIndex = this.triggerElements.indexOf(triggerElement);\n if (triggerIndex !== _classPrivateFieldGet(this, _activeTriggerIndex)) {\n _classPrivateFieldSet(this, _activeTriggerIndex, triggerIndex);\n dispatchEvent(this, TRIGGER_ACTIVATED_EVENT, {\n triggerIndex,\n backgroundId: this.activeBackgroundId,\n attributeName,\n attributeValue\n });\n }\n }\n });\n }\n static get observedAttributes() {\n return [...super.observedAttributes, ROOT_MARGIN_ATTR, ACTIVE_BACKGROUND_ATTR];\n }\n\n // Binding VIEWPORT-POSITION attribute to background DATA-VIEWPORT-POSITION attribute\n static get boundAttributes() {\n return [{\n attribute: \"\".concat(VIEWPORT_POSITION_ATTR, \":\").concat(VIEWPORT_POSITION_DATA_ATTR),\n targets: instance => instance.backgrounds\n }];\n }\n connectedCallback() {\n super.connectedCallback();\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === ROOT_MARGIN_ATTR) {\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n } else if (name === VIEWPORT_POSITION_ATTR) {\n _classPrivateMethodGet(this, _prepareBackgrounds, _prepareBackgrounds2).call(this);\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n } else if (name === ACTIVE_BACKGROUND_ATTR) {\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n }\n }\n get triggerElements() {\n return toArray(this.children).filter(isTrigger);\n }\n get backgrounds() {\n return toArray(this.children).filter(isBackground);\n }\n\n /* Mirrored attributes: */\n\n get rootMargin() {\n return this.getAttribute(ROOT_MARGIN_ATTR) || '0px 0px 0px 0px';\n }\n set rootMargin(val) {\n this.setAttribute(ROOT_MARGIN_ATTR, val || '0px 0px 0px 0px');\n }\n set activeBackgroundId(value) {\n if (value !== this.activeBackgroundId) {\n this.setAttribute(ACTIVE_BACKGROUND_ATTR, value);\n }\n }\n get activeBackgroundId() {\n return this.getAttribute(ACTIVE_BACKGROUND_ATTR);\n }\n get activeBackground() {\n return this.querySelector(\"[\".concat(BG_ID_ATTR, \"=\\\"\").concat(this.activeBackgroundId, \"\\\"]\"));\n }\n}\nfunction _createIntersectionObserver2() {\n _classPrivateFieldSet(this, _observer, new ElementIntersectionObserver(this.triggerElements, _classPrivateFieldGet(this, _handleTriggerChange), {\n root: this.viewportIntersectionRoot,\n rootMargin: this.rootMargin\n }));\n}\nfunction _disconnectIntersectionObserver2() {\n if (_classPrivateFieldGet(this, _observer)) {\n _classPrivateFieldGet(this, _observer).disconnect();\n }\n}\nfunction _prepareBackgrounds2() {\n var viewportPosition = this.viewportPosition;\n if (viewportPosition === VIEWPORT_POSITIONS.aboveViewport || viewportPosition === VIEWPORT_POSITIONS.belowViewport) {\n var triggerElements = this.triggerElements;\n if (triggerElements.length > 0) {\n var triggerIndex = viewportPosition === VIEWPORT_POSITIONS.aboveViewport ? triggerElements.length - 1 : 0;\n this.activeBackgroundId = triggerElements[triggerIndex].getAttribute(SHOW_BACKGROUND_ATTR);\n }\n }\n}\nfunction _updateBackgrounds2() {\n var activeBackgroundId = this.activeBackgroundId;\n var backgrounds = this.backgrounds;\n backgrounds.forEach((background, idx) => {\n var backgroundId = background.getAttribute(BG_ID_ATTR);\n var isActive = backgroundId === activeBackgroundId;\n var nextActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx + 1) === activeBackgroundId;\n var prevActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx - 1) === activeBackgroundId;\n var state;\n if (isActive) {\n state = 'ACTIVE';\n } else if (nextActive) {\n state = 'PREV';\n } else if (prevActive) {\n state = 'NEXT';\n }\n var currentState = background.getAttribute(STATE_ATTR);\n if (state !== currentState) {\n setAttribute(background, STATE_ATTR, state);\n }\n });\n}\nfunction _getBackgroundId2(backgrounds, index) {\n if (backgrounds[index]) {\n return backgrounds[index].getAttribute(BG_ID_ATTR);\n }\n}\n\nexport { Scrollhistorie as default };\n//# sourceMappingURL=index.esm.js.map\n","import balanceText from 'balance-text'\n\nconst watching = []\nlet handlersInitialized = false\n\nfunction debounce(func, threshold, execAsap, ...args) {\n let timeout\n\n return function () {\n const obj = this\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args)\n }\n timeout = null\n }\n\n if (timeout) {\n clearTimeout(timeout)\n } else if (execAsap) {\n func.apply(obj, args)\n }\n timeout = setTimeout(delayed, threshold || 100)\n }\n}\n\nfunction ready(fn) {\n if (document.readyState !== 'loading') {\n fn()\n } else if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', fn)\n } else {\n document.attachEvent('onreadystatechange', () => {\n if (document.readyState !== 'loading') {\n fn()\n }\n })\n }\n}\n\nfunction updateWatched() {\n watching.forEach((element) => {\n const padding = window.getComputedStyle(element).padding\n const oldDisplay = element.style.display\n const oldMargin = element.style.margin\n const oldPadding = element.style.padding\n /*\n Display span as block when balancing text.\n Padding is moved to margin so that width is calculated correctly\n */\n element.style.display = 'block'\n element.style.margin = padding\n element.style.padding = 0\n balanceText(element)\n element.style.display = oldDisplay\n element.style.margin = oldMargin\n element.style.padding = oldPadding\n })\n}\n\nfunction initializeHandlers() {\n if (handlersInitialized) {\n return\n }\n\n // Apply on DOM ready\n ready(updateWatched)\n\n // Reapply on full load\n window.addEventListener('load', updateWatched)\n\n // Reapply on resize\n window.addEventListener('resize', debounce(updateWatched))\n\n handlersInitialized = true\n}\n\nexport function balanceAndWatch(elements) {\n watching.push(...elements)\n initializeHandlers()\n updateWatched()\n}\n","export function getArticleInfo() {\n return {\n authors: getXLAuthors(),\n publishedString: getXLPublishedString(),\n }\n}\n\nfunction getXLAuthors() {\n return Array.from(document.querySelectorAll('.author__body')).map((authorElm) => {\n const authNameElm = authorElm.querySelector('.author__name') as HTMLAnchorElement\n const authRoleElm = authorElm.querySelector('.author__role')\n return {\n name: Array.from(authNameElm.childNodes ?? [])\n .filter((n) => n.nodeName === '#text')\n .map((n) => n.textContent)\n .join('')\n .trim(),\n href: authNameElm.href,\n role: authRoleElm.textContent,\n }\n })\n}\n\nfunction getXLPublishedString() {\n const publishDateElm = document.querySelector('.article-dateline__full')\n const publishDate = publishDateElm ? publishDateElm.textContent : ''\n\n const annotationElm = document.querySelector('.article-dateline-annotation')\n const publishAnnotation = annotationElm ? annotationElm.textContent : ''\n\n return `${publishAnnotation} ${publishDate}`\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"logo-wrapper\":\"dhis__logo-wrapper--db0f8\",\"logoWrapper\":\"dhis__logo-wrapper--db0f8\",\"nrklogo\":\"dhis__nrklogo--d16ef\",\"introscroll\":\"dhis__introscroll--c059f\",\"introscroll__error\":\"dhis__introscroll__error--c25da\",\"introscrollError\":\"dhis__introscroll__error--c25da\"};","import { html } from '@nrk/dh-server-libs/html'\nimport Scrollhistorie from '@nrk/dh-basis-scrollhistorie'\nimport { closest } from '@nrk/dh-basis-common'\nimport { balanceAndWatch } from '../lib/balance-text-wrapper.js'\nimport { debounce } from 'debounce'\nimport { getArticleInfo } from './article-info.ts'\n\n/* styles */\nimport styles from './introscroll.module.css'\nimport backgroundStyles from './background.module.css'\nimport cardStyles from './cards/cards.module.css'\n\nconst s = { ...styles, ...backgroundStyles, ...cardStyles }\n\nexport default class Introscroll extends Scrollhistorie {\n static get observedAttributes() {\n return ['background-color', ...super.observedAttributes]\n }\n\n #updating = false\n #viewport = { height: 0, width: 0 }\n #currentPercentage\n #debouncedUpdateSizes\n\n connectedCallback() {\n super.connectedCallback()\n this.#updateSizes()\n this.#debouncedUpdateSizes = debounce(this.#updateSizes, 500)\n window.addEventListener('resize', this.#debouncedUpdateSizes)\n // eslint-disable-next-line compat/compat\n if (document?.fonts?.ready?.then) {\n // eslint-disable-next-line promise/catch-or-return\n document.fonts.ready.then(this.#updateTitle)\n }\n\n this.#updateByline()\n\n // Date in byline is calculated on the client. Update byline to include new date.\n setTimeout(() => this.#updateByline(), 100)\n setTimeout(() => this.#updateByline(), 5000)\n\n /*\n Make media elements focusable so that we can adjust the scroll\n when a background image is focused (i.e. with a screen reader)\n */\n for (const elm of this.querySelectorAll('img, video, [role=img]')) {\n elm.tabIndex = '-1'\n }\n this.addEventListener('focus', this.#handleFocus, true)\n\n /*\n Polyfill text-wrap: balance.\n TODO: remove once Safari fully supports text-wrap: balance\n (There's currently a bug in Safari that disables text-wrap balance when used with box-decoration)\n https://bugs.webkit.org/show_bug.cgi?id=274145\n */\n if (!CSS.supports('text-wrap', 'balance') || navigator?.userAgent?.includes?.('Safari')) {\n requestAnimationFrame(() => {\n balanceAndWatch(this.querySelectorAll('.balance-text'))\n })\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.removeEventListener('focus', this.#handleFocus, true)\n window.removeEventListener('resize', this.#debouncedUpdateSizes)\n }\n\n attributeChangedCallback(name, prevValue, newValue) {\n super.attributeChangedCallback(name, prevValue, newValue)\n\n if (name === 'background-color' && typeof newValue === 'string') {\n this.style.setProperty('--introscroll-background-color', newValue)\n } else if (name === 'viewport-position') {\n /* TODO: remove once Safari supports scroll-driven animations */\n if (!CSS.supports('animation-timeline', 'view()')) {\n this.#updateVisiblePercentage()\n }\n }\n }\n\n /**\n * When a background image is focused:\n * - Adjust the scroll position to ensure that the background is visible.\n */\n #handleFocus = (e) => {\n const backgroundElement = e.target && closest(e.target, '[data-background-id]')\n if (!backgroundElement) {\n return\n }\n\n const backgroundId = backgroundElement.getAttribute('data-background-id')\n if (this.activeBackgroundId !== backgroundId) {\n const triggerElement = this.triggerElements.find(\n (elm) => elm.getAttribute('data-show-background') === backgroundId,\n )\n if (triggerElement) {\n window.scrollTo(0, triggerElement.offsetTop - window.innerHeight / 2)\n }\n }\n }\n\n /**\n * Update how many percent of the screen is filled with introscroll.\n * Used to fade out and translate up the last card for browsers that doesn't support scroll-driven animations.\n *\n * TODO: Remove once Safari supports scroll-driven animations\n *\n * @private\n */\n #updateVisiblePercentage() {\n if (this.#updating) {\n return\n }\n this.#updating = true\n\n const loop = () => {\n if (this.viewportPosition !== 'IN-VIEWPORT') {\n this.#updating = false\n } else {\n const bottom = Math.min(\n Math.max(this.offsetHeight - window.scrollY, 0),\n this.#viewport.height,\n )\n const percentage = bottom / this.#viewport.height\n if (percentage !== this.#currentPercentage) {\n this.style.setProperty('--introscroll-percentage', percentage.toFixed(3))\n this.#currentPercentage = percentage\n }\n requestAnimationFrame(loop)\n }\n }\n requestAnimationFrame(loop)\n }\n\n #updateByline() {\n const { authors, publishedString } = getArticleInfo()\n\n const container = this.querySelector(`.${s.byline}`)\n const expandable = authors.length > 3\n\n const authorHTML = authors.map((author) => {\n return html`\n