1/*! For license information please see application-redesign-452e4a5081b58c482bd2.js.LICENSE.txt */ 2(globalThis.webpackChunk||=[]).push([[8641],{7095(){const t="hiddenAnnouncements";function e(){return(localStorage.getItem(t)||"").split(",")}function n(n){!function(n){const i=e();i.includes(n)||localStorage.setItem(t,[...i,n].filter(Boolean).join(","))}(n),function(t){const e=document.getElementById("notice_"+t);e&&e.parentNode?e.parentNode.removeChild(e):console.error("Valid announcement not found! ID:",t)}(n)}!function(){const t=document.getElementById("js-announcements");if(!t)return;const i=new XMLHttpRequest;i.open("GET","/.announcements?v=2"),i.onload=function(){try{const r=JSON.parse(i.responseText),s=function(t){if(!t)return"";const n=e();return t.filter(t=>!n.includes(String(t.id))).map(t=>t.html).join("")}(r&&r.announcements);if(s.length<1)return;t.innerHTML=s,function(t){t.querySelectorAll(".js-announcement-close").forEach(t=>{t.addEventListener("click",function(){const e=t.dataset.announcementId;e&&n(e)})})}(t)}catch(t){console.error(t)}},i.send()}()},8185(t,e,n){"use strict";var i=n(4025),r=n.n(i);function s(t){return function(e){var n=e.value.title,i=e.value.excerpt,r=e.value.encyclopedia,s=document.createElement("li");s.className=`${t}__autocomplete-item`;var a=document.createElement("strong");if(a.className=`${t}__autocomplete-title`,a.textContent=n,s.appendChild(a),r){var o=document.createElement("span");o.className=`${t}__autocomplete-encyclopedia`,o.textContent=" ("+r+")",s.appendChild(o)}if(i){var l=document.createElement("p");l.className=`${t}__autocomplete-excerpt`,l.innerHTML=i,s.appendChild(l)}return s}}var a={minChars:1,filter:function(){return!0},sort:!1,data:function(t){return{label:t.title,value:t}},translations:{promptPositive:window.Strings.autocompletePromptPositive,promptZero:window.Strings.autocompletePromptZero,resultsFound:function(t){return t+window.Strings.autocompleteResultsFound},resultItem:window.Strings.autocompleteResultItem}};function o(t){const e=t.dataset.autocompleteBaseClass,n={...a,item:s(e)},i=new(r())(t,n),o=(l=function(){!function(t,e){if(t.value){var n=t.dataset.autocompleteBaseUrl,i=new XMLHttpRequest;i.open("GET",n+encodeURIComponent(t.value)),i.onload=function(){try{var t=JSON.parse(i.responseText);e.list=t}catch(t){console.log(t),e.list=[]}},i.send()}else e.list=[]}(t,i)},c=250,u=t,function(){var t=arguments,e=()=>{l.apply(this,t)};clearTimeout(d),u.value.length<10?e():d=setTimeout(e,c)});var l,c,u,d;const p=t.dataset.autocompleteOutput&&document.getElementById(t.dataset.autocompleteOutput);t.addEventListener("input",o);let h=!0;t.addEventListener("input",function(){h&&(document.dispatchEvent(new Event("search bar interaction",{bubbles:!0})),h=!1)}),t.addEventListener("awesomplete-select",e=>function(t,e,n,i){t.preventDefault();var r=t.text;if(i){i.value=r.value.id;let t=r.value.title;r.value.encyclopedia&&(t+=` (${r.value.encyclopedia})`),n.value=t,e.close()}else window.location=r.value.article_url}(e,i,t,p)),i.list=[]}for(const t of document.querySelectorAll(".js-autocomplete"))o(t);const l=o;n.d(e,["A",0,l])},4025(t){!function(){var e=function(t,n){var i=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var i in e){var r=e[i],s=t.input.getAttribute("data-"+i.toLowerCase());t[i]="number"==typeof r?parseInt(s):!1===r?null!==s:r instanceof Function?null:s,t[i]||0===t[i]||(t[i]=i in n?n[i]:r)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,translations:e.TRANSLATIONS},n),this.index=-1,this.container=this.container(t),this.ul=r.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?this.translations.promptPositive.replace("{count}",this.minChars):this.translations.promptZero}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select(void 0,void 0,t)):9===e&&i.selected&&i.tabSelect?i.select(void 0,void 0,t):27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target,t))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];
vendor: 4,687 bytes, line 2
2i.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),i=t.value||n,r=t.label||n;""!==i&&e.push({label:r,value:i})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){if(r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=this.translations.resultItem.replace("{label}",e[t].textContent).replace("{index}",t+1).replace("{total}",e.length),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var i=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:i,origin:e||t,originalEvent:n})&&(this.replace(i),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:i,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(i){return new n(t.data(i,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,i){t.ul.appendChild(t.item(n,e,i))}),0===this.ul.children.length?(this.status.textContent=this.translations.resultsFound(0),this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.translations.resultsFound(this.ul.children.length))):(this.close({reason:"nomatches"}),this.status.textContent=this.translations.resultsFound(0))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return r.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var i=""===e.trim()?t:t.replace(RegExp(r.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return r.create("li",{innerHTML:i,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},e.TRANSLATIONS={promptPositive:"Type {count} or more characters for results.",promptZero:"Begin typing for results.",resultsFound:function(t){return 0===t?"No results found":1===t?"1 result found":t+" results found"},resultItem:"{label}, list item {index} of {total}"},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var i=Array.prototype.slice;function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function s(t,e){return i.call((e||document).querySelectorAll(t))}function a(){s("input.awesomplete").forEach(function(t){new e(t)})}r.create=function(t,e){var n=document.createElement(t);for(var i in e){var s=e[i];if("inside"===i)r(s).appendChild(n);else if("around"===i){var a=r(s);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else i in n?n[i]=s:n.setAttribute(i,s)}return n},r.bind=function(t,e){if(t)for(var n in e){var i=e[n];
2n.split(/\s+/).forEach(function(e){t.addEventListener(e,i)})}},r.unbind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}},r.fire=function(t,e,n){var i=document.createEvent("HTMLEvents");for(var r in i.initEvent(e,!0,!0),n)i[r]=n[r];return t.dispatchEvent(i)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=r,e.$$=s,t.exports&&(t.exports=e)}()},1480(){document.querySelectorAll(".js-back").forEach(t=>{t.addEventListener("click",()=>window.history.back()),t.hidden=!1})},8145(){var t;t=document.querySelectorAll(".js-comment-thread"),[].forEach.call(t,function(t){var e=t.getAttribute("data-reply-form"),n=document.getElementById(e);if(n){var i=t.querySelectorAll(".js-reply-toggle"),r=!1;[].forEach.call(i,function(t){t.setAttribute("aria-controls",e),t.removeAttribute("hidden"),t.addEventListener("click",a)}),s()}function s(){r?n.removeAttribute("hidden"):n.setAttribute("hidden",""),n.setAttribute("aria-hidden",r?"false":"true"),[].forEach.call(i,function(t){t.setAttribute("aria-expanded",r?"true":"false"),t.parentNode.classList[r?"add":"remove"]("is-showing")}),r&&n.removeAttribute("hidden")}function a(){r=!r,s()}})},154(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".js-conditionally-required-source").forEach(t=>{const e=t.closest("form").querySelector(".js-conditionally-required-target");if(!e)return;const n=e.classList.contains("js-conditionally-required-if-blank"),i=()=>{e.required=n?""===t.value:""!==t.value};i(),t.addEventListener("change",i)})})},7513(){var t;t=document.querySelectorAll("[data-confirm]"),[].forEach.call(t,function(t){var e=t.dataset.confirm;t.addEventListener("click",function(t){window.confirm(e)||(t.preventDefault(),t.stopPropagation())})})},981(){!function(){for(var t=document.querySelectorAll(".js-current-date"),e=(new Date).toLocaleString(document.documentElement.dataset.locale,{day:"numeric",month:"long",year:"numeric"}),n=0;n<t.length;n++)t[n].textContent=e}()},7472(){!function(){for(var t=document.querySelectorAll(".js-current-year"),e=(new Date).getFullYear(),n=0;n<t.length;n++)t[n].textContent=e}()},6558(){if("undefined"!=typeof dataLayer){window.addEventListener("afterprint",function(){window.dataLayer.push({event:"Print Intent"})}),window.addEventListener("copy",function(){window.dataLayer.push({event:"Copy Intent"})}),window.addEventListener("dictionary event",function(){window.dataLayer.push({event:"Den Danske Ordbog"})}),window.addEventListener("search bar interaction",function(){window.dataLayer.push({event:"search_start"})});var t=document.getElementsByClassName("toc__link");[].forEach.call(t,function(t){t.addEventListener("click",function(){window.dataLayer.push({event:"click",type:"anchor_link",link_text:t.innerText})})});var e=document.getElementsByClassName("crossref");[].forEach.call(e,function(t){t.addEventListener("click",function(){window.dataLayer.push({event:"click",type:"deep_link",link_text:t.innerText})})});var n=document.getElementsByClassName("article-contributions__item");[].forEach.call(n,function(t){t.addEventListener("click",function(){window.dataLayer.push({event:"click",type:"contribution_link",link_text:t.innerText})})})}},2046(){document.querySelectorAll(".js-file-input").forEach(function(t){const e=t.querySelector("input[type=file]"),n=document.getElementById(t.dataset.fileInputValue);let i=t.dataset.fileInputPreview&&document.getElementById(t.dataset.fileInputPreview),r=null;function s(){r&&URL.revokeObjectURL(r);const t=e.files[0];r=t?URL.createObjectURL(t):null,i.src=r,function(t){if("TEMPLATE"==i.tagName){const t=i.content.cloneNode(!0).querySelector("img");i.after(t),i=t}i.src=t}(r)}e.addEventListener("change",function(){n.textContent=e.value.replace("C:\\fakepath\\",""),i&&s()}),t.classList.add("is-scripted")})},7157(){var t;(t=document.querySelector(".js-login-button"))&&window.localStorage&&"true"===window.localStorage.getItem("hasLoggedIn")&&(t.hidden=!1)},6416(){function t(t,e){const n=t.content.cloneNode(!0).querySelector("tr"),i=e.tBodies[0];!function(t,e){const n=t.id.replace("INDEX",e);t.id=n,[].forEach.call(t.querySelectorAll("input[name]"),t=>{t.name=t.name.replace("INDEX",e)});const i=t.querySelector("input[type=hidden]");i.value=i.value.replace("INDEX",e);t.querySelector(".js-tabular-fields-delete").setAttribute("aria-controls",n)}(n,function(t){const e=[].reduce.call(t.rows,(t,e)=>{const n=e.querySelector("input[type=hidden]");return n?Math.max(t,n.value):t},-1);return Math.max(e+1,t.rows.length)}(i)),i.appendChild(n)}const e=document.querySelectorAll(".js-tabular-fields");[].forEach.call(e,e=>{const n=e.querySelector("table"),i=e.querySelector("template");e.addEventListener("click",e=>
2{const r=e.target.closest(".js-tabular-fields-delete");if(r)return void function(t){const e=document.getElementById(t.getAttribute("aria-controls"));e&&(matchMedia("(prefers-reduced-motion)").matches?e.remove():(e.addEventListener("transitionend",t=>{e.remove()}),e.classList.add("is-deleting")))}(r);e.target.closest(".js-tabular-fields-add")&&t(i,n)})})},602(){var t,e,n,i,r,s;e=(t="toggle-state__button")+"--unset",n=t+"--pending",i=t+"--approved",r=t+"--denied",s=document.querySelectorAll(".js-toggle-state"),[].forEach.call(s,function(s){if(FormData){var a=s.querySelector("."+t);s.addEventListener("submit",function(o){o.preventDefault();var l=new FormData(s),c=new XMLHttpRequest;c.addEventListener("load",function(){try{var s=JSON.parse(this.responseText).data.attributes;!function(s,a){s.classList.remove(e),s.classList.remove(n),s.classList.remove(i),s.classList.remove(r),s.classList.add(t+"--"+a.state),s.textContent=a.label,s.title=a.title,s.setAttribute("aria-label",a.title)}(a,s)}catch(t){alert(t)}}),c.open(s.method,s.action),c.send(l)})}})},162(){!function(){var t="is-truncated",e=document.querySelectorAll(".js-truncatable");function n(){var e=document.querySelectorAll("[data-truncatable-to]:not([data-truncatable-off])");[].forEach.call(e,function(e){var n=parseInt(e.getAttribute("data-truncatable-to"),10);e.scrollHeight>n?e.classList.add(t):e.classList.remove(t)})}[].forEach.call(e,function(e){var n=e.getAttribute("data-truncatable-target"),i=document.getElementById(n);e.addEventListener("click",function(){i.setAttribute("data-truncatable-off","true"),i.classList.remove(t),e.setAttribute("aria-expanded","true")}),e.setAttribute("aria-controls",n),e.setAttribute("aria-expanded","false"),e.hidden=!1}),n(),window.addEventListener("resize",n)}()},4e3(){!function(){let t=document.querySelector("#toggleMachineVersions");if(t){let n=t.checked;function e(){n=!n;let t=document.querySelectorAll(".js-version-machinemade");n?t.forEach(t=>{t.setAttribute("hidden","hidden")}):t.forEach(t=>{t.removeAttribute("hidden")})}t.addEventListener("click",e),e()}}()},926(){var t,e;t="is-zoomed",e=document.querySelectorAll("[data-zoomable]"),[].forEach.call(e,function(e){var n=e.getAttribute("data-zoomable"),i=e.getAttribute("data-zoomable-class");n&&i&&(e.addEventListener("click",function(){var r=document.getElementById(n);if(r&&"object"==typeof r.classList){e.classList.contains(t)?(r.classList.remove(i),e.classList.remove(t)):(r.classList.add(i),e.classList.add(t));var s=r.querySelector("img[data-alt-url]");if(s&&s.src){var a=s.getAttribute("data-alt-url"),o=s.src;if(!a||a===o)return;s.src=a,s.setAttribute("data-alt-url",o)}}}),e.setAttribute("aria-controls",n))})},3286(t,e,n){"use strict";n(7095),n(4025),n(8185),n(1480),n(8145),n(154),n(7513),n(981),n(7472),n(2046);function i(t){t.querySelectorAll(".simple_form").forEach(t=>{const e=t.id;e&&t.querySelectorAll("fieldset").forEach((t,n)=>{const i=t.querySelector("legend");if(!i)return;const r=i.id||`${e}-legend-${n}`,s=function(t){const e=document.createElement("div");return e.replaceChildren(...Array.from(t.childNodes)),[...Array.from(t.attributes)].forEach(({name:t,value:n})=>{e.setAttribute(t,n)}),e}(i);s.id=r,i.replaceWith(s),t.setAttribute("aria-labelledby",r)})})}document.addEventListener("DOMContentLoaded",()=>i(document.body));n(7157),n(6416);var r=function(){function t(t,e,n){var i;t.classList?t.classList[n?"add":"remove"](e):n?t.className+=" "+e:((i=t.className.split(/\s+/)).splice(i.indexOf(e)),t.className=i.join(" "))}function e(e,n,i,r,s,a,o){i?(n.removeAttribute("hidden"),t(o,a,!0)):(n.setAttribute("hidden","hidden"),t(o,a,!1)),n.setAttribute("aria-hidden",i?"false":"true"),e.setAttribute("aria-expanded",i?"true":"false"),null!==r&&null!==s&&(e.textContent=i?r:s)}var n={setup:function(t,n,i,r,s,a){var o=document.querySelectorAll(t);[].forEach.call(o,function(t){var o=t.getAttribute("data-target"),l=document.getElementById(o),c=n,u=null,d=null,p=t.getAttribute("data-class-target"),h=p?document.getElementById(p):l;t.hasAttribute("data-hidetext")&&(u=t.textContent,d=t.getAttribute("data-hidetext")),t.addEventListener(s,function(){var n=!l.hasAttribute("hidden");e(t,l,c=!n||r,d,u,i,h),a&&c&&l.scrollIntoView&&l.scrollIntoView()}),t.setAttribute("aria-controls",o),t.removeAttribute("hidden"),e(t,l,c,d,u,i,h)})}};return n}();r.setup(".js-toggle-comments","#create-comment"===location.hash||"#article-comments"===location.hash,"is-expanded",!1,"click"),r.setup(".js-qa-toggle",!1,"is-expanded",!1,"click"),r.setup(".js-chart-toggle",!1,"is-expanded",!1,"click");n(602),n(162),n(4e3),n(926),n(6558);n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p}},t=>{t(3286)}]); 3//# sourceMappingURL=application-redesign-452e4a5081b58c482bd2.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.