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AOoB,EAChD,CAnDJ,IAAoBP,EAAa9P,CAoD/B,EAiBGgQ,eAAejL,IAAIkK,IACtBe,eAAeC,OAAOhB,EAAKO,E","sources":["webpack://levende-stillbilde/webpack/runtime/create fake namespace object","webpack://levende-stillbilde/webpack/runtime/import chunk loading","webpack://levende-stillbilde/./node_modules/@nrk/dh-server-libs/base-element.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-server-libs/get-element-tag.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-server-libs/src/base-element.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-server-libs/src/get-context-id.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-server-libs/src/get-element-tag.js","webpack://levende-stillbilde/webpack/bootstrap","webpack://levende-stillbilde/webpack/runtime/define property getters","webpack://levende-stillbilde/webpack/runtime/ensure chunk","webpack://levende-stillbilde/webpack/runtime/get javascript chunk filename","webpack://levende-stillbilde/webpack/runtime/get mini-css chunk filename","webpack://levende-stillbilde/webpack/runtime/hasOwnProperty shorthand","webpack://levende-stillbilde/webpack/runtime/make namespace object","webpack://levende-stillbilde/webpack/runtime/publicPath","webpack://levende-stillbilde/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://levende-stillbilde/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://levende-stillbilde/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://levende-stillbilde/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-basis-common/dh-basis-common.esm.js","webpack://levende-stillbilde/./node_modules/@nrk/dh-basis-levende-stillbilde/dh-basis-levende-stillbilde.esm.js","webpack://levende-stillbilde/./src/article/client.js"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t697: 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} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no external install chunk\n\n// no on chunks loaded","module.exports = require('./src/base-element.js')\n","module.exports = require('./src/get-element-tag')\n","const { getContextId } = require('./get-context-id')\n\nlet _coreAnalyticsPromise = undefined\nfunction getCoreAnalytics() {\n if (!_coreAnalyticsPromise) {\n if ('coreAnalytics' in window) {\n _coreAnalyticsPromise = Promise.resolve(window['coreAnalytics'])\n } else {\n _coreAnalyticsPromise = import('@nrk/core-analytics' /* webpackChunkName: \"ca\" */).then(\n (m) => m.default\n )\n }\n }\n return _coreAnalyticsPromise\n}\n\nclass BaseElement extends HTMLElement {\n constructor() {\n super()\n this.sendError = this.sendError.bind(this)\n this.sendGaEvent = this.sendGaEvent.bind(this)\n }\n connectedCallback() {\n if (!this.name) throw Error('Name not provided')\n this.setupTracker()\n if (typeof this.render === 'function') this.render()\n }\n\n setupTracker() {\n this.coreAnalyticsTracker = new Promise((resolve) => {\n getCoreAnalytics().then((coreAnalytics) => {\n const tracker = coreAnalytics.create()\n\n tracker('initialize', {\n container: this,\n parentId: this.metadata.parentId || getContextId(window.location.href),\n ga: this.dataset.gaPropertyId,\n })\n\n tracker('context', {\n title: this.metadata.title,\n contentId: this.metadata.selfId,\n publishDate: this.metadata.published,\n })\n\n resolve(tracker)\n })\n })\n }\n\n async sendError(message) {\n // error reporter has been removed\n }\n\n async sendGaEvent(event) {\n const tracker = await this.coreAnalyticsTracker\n tracker('event', {\n ga: {\n eventCategory: `dh-modul-${this.name}`,\n ...event,\n },\n })\n }\n\n get metadata() {\n return this.dataset.metadata ? JSON.parse(this.dataset.metadata) : {}\n }\n\n get preloadedState() {\n return this.dataset.preloadedState ? JSON.parse(this.dataset.preloadedState) : null\n }\n\n get errorTracking() {\n return {\n url: '',\n enabled: false,\n }\n }\n}\n\nmodule.exports.BaseElement = BaseElement\n","const POLOPOLY_ID_REGEX = /[1-9]{1,2}\\.\\d+/g\n\nfunction extractPolopolyIdFromString(str) {\n const matches = str.match(POLOPOLY_ID_REGEX)\n if (matches && matches.length) {\n return matches[0]\n }\n return null\n}\n\nfunction getContextId(url) {\n return extractPolopolyIdFromString(url)\n}\n\nmodule.exports.getContextId = getContextId\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","// 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\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\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","// 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 \"\" + \"ca\" + \"-chunk-\" + \"7f46a9303f533c62a4a1\" + \".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 undefined;\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__.p = \"https://static.nrk.no/dh/module/levende-stillbilde/static/\";","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","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 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(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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\n _defineProperty(this, \"elements\", void 0);\n\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\n disconnect() {\n // Unregister trigger elements\n this.elements.forEach(elm => this.intersectionObserver.unobserve(elm)); // Disconnect intersection observer\n\n this.intersectionObserver.disconnect();\n }\n\n}\n\nfunction toggleAttribute(el, name, boolValue) {\n if (!el) {\n return;\n }\n\n var nextValue;\n\n if (typeof boolValue !== 'undefined') {\n nextValue = !!boolValue;\n } else {\n nextValue = el.hasAttribute(name);\n }\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\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\n if (proto.closest) {\n return (el, css) => el.closest(css);\n } else {\n return (el, css) => {\n for (; el; el = el.parentElement) {\n if (match.call(el, css)) return el;\n }\n\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; // 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 } // IE reports incorrect event.defaultPrevented\n // but correct return value on element.dispatchEvent\n\n\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}\n\nclass VerticalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n\n this.container = container;\n }\n\n cancel() {\n this._cancelled = true;\n }\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\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n\n if (!startTime) {\n startTime = currentTime - 1;\n }\n\n var timeElapsed = currentTime - startTime;\n\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 window.requestAnimationFrame(loop);\n }\n\n}\nclass HorizontalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n\n this.container = container;\n }\n\n cancel() {\n this._cancelled = true;\n }\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\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n\n if (!startTime) {\n startTime = currentTime - 1;\n }\n\n var timeElapsed = currentTime - startTime;\n\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 window.requestAnimationFrame(loop);\n }\n\n}\n\nfunction testReducedMotion() {\n if (typeof window !== 'undefined') {\n return !!window.matchMedia && window.matchMedia('(prefers-reduced-motion)').matches;\n }\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}\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 * */\n\nfunction loadImage(image) {\n if (image.loading === 'lazy') {\n image.loading = 'eager';\n }\n}\n\nfunction connectScrollContainerLazyLoad(container, images) {\n var containerIntersecting = false;\n var deferredImages = []; // eslint-disable-next-line compat/compat\n\n var containerObserver = new IntersectionObserver(entries => {\n containerIntersecting = entries === null || entries === void 0 ? void 0 : entries[0].isIntersecting;\n\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); // eslint-disable-next-line compat/compat\n\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\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\n for (var image of images) {\n imageObserver.observe(image);\n }\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\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=dh-basis-common.esm.js.map\n","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { dispatchEvent, testReducedMotion, toArray, toggleAttribute } from '@nrk/dh-basis-common';\n\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_ATTR = 'data-viewport-position';\nvar DISABLE_FORCED_ATTRIBUTES_ATTR = 'disable-forced-attributes';\nvar IS_PAUSED = 'is-paused';\nvar AUTOPLAY_BLOCKED = 'autoplay-blocked';\nvar READY_STATE = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4 // Can play through\n\n};\n\nvar isVisible = child => !!child.offsetParent;\n\nclass LevendeStillbilde extends HTMLElement {\n constructor() {\n super(...arguments);\n\n _defineProperty(this, \"_disconnecting\", false);\n\n _defineProperty(this, \"_visibleVideoElement\", void 0);\n\n _defineProperty(this, \"_handlePlayChange\", e => {\n if (e.type === 'play') {\n dispatchEvent(this, 'dh-basis-autoplay-succeeded');\n }\n\n if (e.target === this._visibleVideoElement) {\n this.isPaused = this._visibleVideoElement.paused;\n }\n });\n\n _defineProperty(this, \"_updatePlayState\", () => {\n if (!this._visibleVideoElement) {\n return;\n }\n\n if (this._shouldPlay()) {\n this._playVideo();\n } else {\n this._pauseVideo();\n }\n });\n\n _defineProperty(this, \"_handleResize\", () => {\n this._updateVisibleVideoElement();\n });\n }\n\n static get observedAttributes() {\n return [STATE_ATTR, DISABLE_FORCED_ATTRIBUTES_ATTR, VIEWPORT_POSITION_ATTR];\n }\n\n connectedCallback() {\n this._setVideoAttributes();\n\n this._setEventListeners();\n\n this._updateVisibleVideoElement();\n }\n\n disconnectedCallback() {\n this._disconnecting = true;\n\n this._removeEventListeners();\n }\n\n attributeChangedCallback(name, prevValue, newValue) {\n var valueChanged = prevValue !== newValue;\n\n if (name === STATE_ATTR || name === VIEWPORT_POSITION_ATTR) {\n if (valueChanged) {\n this._updateVisibleVideoElement();\n\n this._updatePlayState();\n\n if (name === VIEWPORT_POSITION_ATTR && newValue === 'IN-VIEWPORT') {\n this._preload();\n }\n }\n }\n }\n\n _setEventListeners() {\n window.addEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.addEventListener('pause', this._handlePlayChange);\n el.addEventListener('play', this._handlePlayChange);\n el.addEventListener('canplaythrough', this._updatePlayState);\n });\n }\n\n _removeEventListeners() {\n window.removeEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.removeEventListener('pause', this._handlePlayChange);\n el.removeEventListener('play', this._handlePlayChange);\n el.removeEventListener('canplaythrough', this._updatePlayState);\n });\n }\n\n _updateVisibleVideoElement() {\n requestAnimationFrame(() => {\n var nextVisibleVideo = this.videoElements.find(isVisible);\n\n if (nextVisibleVideo !== this._visibleVideoElement) {\n // Pause previous video\n this._pauseVideo();\n\n this._visibleVideoElement = nextVisibleVideo;\n\n if (this._shouldPreload()) {\n this._preload();\n }\n\n this._updatePlayState();\n }\n });\n }\n\n _setVideoAttributes() {\n if (!this.disableForcedAttributes) {\n this.videoElements.forEach(el => {\n el.setAttribute('playsInline', '');\n el.setAttribute('loop', '');\n el.setAttribute('disableRemotePlayback', '');\n el.setAttribute('x-webkit-airplay', 'deny');\n });\n }\n }\n\n _shouldPlay() {\n var _this$_visibleVideoEl;\n\n /*\n * Safari 14-15.5 hides poster on play, leaving a transparent element until enough data is available to play through.\n * We have to wait for the canplaythrough event and readystate = READY_STATE.HAVE_ENOUGH_DATA before calling `.play()`\n * */\n return ((_this$_visibleVideoEl = this._visibleVideoElement) === null || _this$_visibleVideoEl === void 0 ? void 0 : _this$_visibleVideoEl.readyState) >= READY_STATE.HAVE_ENOUGH_DATA && this.state === 'ACTIVE' && this.viewportPosition === 'IN-VIEWPORT';\n }\n\n _shouldPreload() {\n return this.viewportPosition === 'IN-VIEWPORT';\n }\n\n _preload() {\n var _this$_visibleVideoEl2;\n\n if (((_this$_visibleVideoEl2 = this._visibleVideoElement) === null || _this$_visibleVideoEl2 === void 0 ? void 0 : _this$_visibleVideoEl2.readyState) < READY_STATE.HAVE_ENOUGH_DATA) {\n var _this$_visibleVideoEl3;\n\n (_this$_visibleVideoEl3 = this._visibleVideoElement) === null || _this$_visibleVideoEl3 === void 0 ? void 0 : _this$_visibleVideoEl3.load();\n }\n }\n\n _playVideo() {\n dispatchEvent(this, 'dh-basis-autoplay-attempted');\n var reducedMotion = testReducedMotion();\n var videoElement = this._visibleVideoElement;\n\n if (videoElement.paused && !reducedMotion && !this.autoplayBlocked) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.catch(e => {\n console.error(e);\n this.autoplayBlocked = true;\n });\n }\n }\n\n _pauseVideo() {\n var videoElement = this._visibleVideoElement;\n\n if (videoElement && !videoElement.paused) {\n videoElement.pause();\n }\n }\n\n get videoElements() {\n return toArray(this.querySelectorAll('video'));\n }\n\n get disableForcedAttributes() {\n return this.hasAttribute(DISABLE_FORCED_ATTRIBUTES_ATTR);\n }\n\n get state() {\n return this.getAttribute(STATE_ATTR);\n }\n\n set state(val) {\n this.setAttribute(STATE_ATTR, val);\n }\n\n get isPaused() {\n return this.getAttribute(IS_PAUSED);\n }\n\n set isPaused(val) {\n if (val) {\n this.setAttribute(IS_PAUSED, '');\n } else {\n this.removeAttribute(IS_PAUSED);\n }\n }\n\n get autoplayBlocked() {\n return this.hasAttribute(AUTOPLAY_BLOCKED) || false;\n }\n\n set autoplayBlocked(val) {\n toggleAttribute(this, AUTOPLAY_BLOCKED, val);\n }\n\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n\n set viewportPosition(val) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, val);\n }\n\n}\n\nexport { LevendeStillbilde as default };\n//# sourceMappingURL=dh-basis-levende-stillbilde.esm.js.map\n","import { BaseElement } from '@nrk/dh-server-libs/base-element'\nimport { getElementTag } from '@nrk/dh-server-libs/get-element-tag'\n\nimport levendeStillbilde from '@nrk/dh-basis-levende-stillbilde'\nimport { ElementIntersectionObserver } from '@nrk/dh-basis-common'\nimport './components/VideoLoop.module.css'\nimport './components/Byline.module.css'\nimport './client.module.css'\n\nconst tag = getElementTag(__APP_NAME__, __APP_VERSION__)\n\nfunction safeDefine(elementName, constructor) {\n if (typeof customElements.get(elementName) === 'undefined') {\n customElements.define(elementName, constructor)\n }\n}\n\nconst VIEWPORT_POSITION_ATTR = 'data-viewport-position'\n\nclass AppElement extends BaseElement {\n name = tag\n #logStatus = {\n playAttempted: false,\n playSucceeded: false,\n }\n\n connectedCallback() {\n super.connectedCallback()\n this.addEventListener('dh-basis-autoplay-attempted', this.#logPlayAttempted)\n this.addEventListener('dh-basis-autoplay-succeeded', this.#logPlaySucceeded)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback?.()\n this.removeEventListener('dh-basis-autoplay-attempted', this.#logPlayAttempted)\n this.removeEventListener('dh-basis-autoplay-succeeded', this.#logPlaySucceeded)\n }\n\n render() {\n try {\n safeDefine('dh-lvs-basis-levende-stillbilde', levendeStillbilde)\n this.sendGaEvent({ eventAction: `MOUNT:${tag}` })\n\n const videoWrapperElement = this.querySelector('.dh-video-wrapper')\n\n // eslint-disable-next-line no-unused-vars\n const elementObserver = new ElementIntersectionObserver(\n [videoWrapperElement],\n (intersections) => {\n const element = intersections[0]\n const elementViewportPosition = videoWrapperElement.getAttribute(VIEWPORT_POSITION_ATTR)\n if (element.isIntersecting && elementViewportPosition === 'OUT-OF-VIEWPORT') {\n videoWrapperElement.setAttribute(VIEWPORT_POSITION_ATTR, 'IN-VIEWPORT')\n }\n if (!element.isIntersecting && elementViewportPosition === 'IN-VIEWPORT') {\n videoWrapperElement.setAttribute(VIEWPORT_POSITION_ATTR, 'OUT-OF-VIEWPORT')\n }\n }\n )\n } catch (err) {\n // fail silently\n console.error(`Error while rendering ${tag}`, err)\n }\n }\n\n #logPlayAttempted = () => {\n if (!this.#logStatus.playAttempted) {\n this.#logStatus.playAttempted = true\n this.sendGaEvent({ eventAction: `PLAY_ATTEMPTED` })\n }\n }\n\n #logPlaySucceeded = () => {\n if (!this.#logStatus.playSucceeded) {\n this.#logStatus.playSucceeded = true\n this.sendGaEvent({ eventAction: `PLAY_SUCCEEDED` })\n }\n }\n}\n\nif (!customElements.get(tag)) {\n customElements.define(tag, AppElement)\n}\n"],"names":["leafPrototypes","getProto","installedChunks","installChunk","module","exports","getContextId","_coreAnalyticsPromise","BaseElement","HTMLElement","constructor","super","this","sendError","bind","sendGaEvent","connectedCallback","name","Error","setupTracker","render","coreAnalyticsTracker","Promise","resolve","window","then","m","default","coreAnalytics","tracker","create","container","parentId","metadata","location","href","ga","dataset","gaPropertyId","title","contentId","selfId","publishDate","published","async","message","event","eventCategory","JSON","parse","preloadedState","errorTracking","url","enabled","POLOPOLY_ID_REGEX","str","matches","match","length","extractPolopolyIdFromString","getElementTag","version","split","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","Object","getPrototypeOf","obj","t","value","mode","__esModule","ns","r","def","current","indexOf","getOwnPropertyNames","forEach","key","d","definition","o","defineProperty","enumerable","get","f","e","chunkId","all","keys","reduce","promises","u","miniCssF","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","p","data","ids","modules","runtime","i","j","installedChunkData","push","promise","import","race","_typeof","iterator","_toPropertyKey","arg","input","hint","prim","toPrimitive","res","TypeError","String","Number","configurable","writable","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","apply","_objectSpread","target","arguments","source","getOwnPropertyDescriptors","defineProperties","defaultConfig","rootMargin","threshold","root","ElementIntersectionObserver","elements","onChange","config","slice","intersections","map","isIntersecting","ratio","intersectionObserver","IntersectionObserver","entries","entry","idx","splice","intersectionRatio","elm","observe","disconnect","unobserve","proto","Element","msMatchesSelector","webkitMatchesSelector","closest","dispatchEvent","element","detail","ignore","concat","CustomEvent","bubbles","cancelable","document","createEvent","initCustomEvent","result","STATE_ATTR","VIEWPORT_POSITION_ATTR","DISABLE_FORCED_ATTRIBUTES_ATTR","IS_PAUSED","AUTOPLAY_BLOCKED","READY_STATE","isVisible","child","offsetParent","LevendeStillbilde","type","_visibleVideoElement","isPaused","paused","_shouldPlay","_playVideo","_pauseVideo","_updateVisibleVideoElement","observedAttributes","_setVideoAttributes","_setEventListeners","disconnectedCallback","_disconnecting","_removeEventListeners","attributeChangedCallback","prevValue","newValue","_updatePlayState","_preload","addEventListener","_handleResize","videoElements","el","_handlePlayChange","removeEventListener","requestAnimationFrame","nextVisibleVideo","find","_shouldPreload","disableForcedAttributes","setAttribute","_this$_visibleVideoEl","readyState","state","viewportPosition","_this$_visibleVideoEl2","_this$_visibleVideoEl3","load","reducedMotion","matchMedia","videoElement","autoplayBlocked","play","catch","console","error","pause","nodeList","querySelectorAll","hasAttribute","getAttribute","val","removeAttribute","boolValue","tag","__APP_NAME__","__APP_VERSION__","_logStatus","_classPrivateFieldLooseKey","_logPlayAttempted","_logPlaySucceeded","AppElement","args","playAttempted","playSucceeded","_classPrivateFieldLooseBase","eventAction","elementName","levendeStillbilde","customElements","define","videoWrapperElement","querySelector","elementViewportPosition","err"],"sourceRoot":""}