PageSourceSearch

https://www.mozilla.org/media/js/m24-ui.54a2e7c5dc9d.js

js mozilla.org collected 2026-09-30 17:35:59 UTC 15,597 bytes, 1 lines download raw bytes

1!function(){var e={390:function(){!function(){"use strict";"undefined"!=typeof Mozilla.Utils&&Mozilla.Utils.onDocumentReady(function(){var e=Mozilla.Utils;e.initMobileDownloadLinks(),e.attributeDownloadThanksButton()}),window.addEventListener("load",function(){document.getElementsByTagName("html")[0].classList.add("loaded")},!1)}()},7817:function(){!function(){"use strict";var e=".c-sub-navigation .c-sub-navigation-mobile-toggle";function t(t){t.matches?window.MzpDetails.init(e):window.MzpDetails.destroy(e)}if("undefined"!=typeof window.MzpSupports&&"undefined"!=typeof window.MzpDetails&&window.MzpSupports.matchMedia){var n=matchMedia("(max-width: 767px)");n.matches&&window.MzpDetails.init(e),window.matchMedia("all").addEventListener?n.addEventListener("change",t,!1):window.matchMedia("all").addListener&&n.addListener(t)}}()},2709:function(e){var t;self,t=function(){return function(){var e={876:function(e){var t={},n=0;t.isSupported=function(){return"undefined"!=typeof window.MzpSupports&&"undefined"!=typeof window.MzpUtils&&window.MzpSupports.classList},t.open=function(e,t){var n=document.querySelector("[aria-controls=".concat(e,"]")),i=document.getElementById(e);n.setAttribute("aria-expanded",!0),i.setAttribute("aria-hidden",!1),i.classList.remove("is-closed"),"function"==typeof t.onDetailsOpen&&t.onDetailsOpen(i)},t.close=function(e,t){var n=document.querySelector("[aria-controls=".concat(e,"]")),i=document.getElementById(e);n.setAttribute("aria-expanded",!1),i.setAttribute("aria-hidden",!0),i.classList.add("is-closed"),"function"==typeof t.onDetailsClose&&t.onDetailsClose(i)},t.toggle=function(e,n){"true"===document.getElementById(e).getAttribute("aria-hidden")?t.open(e,n):t.close(e,n)},t.handleControlActivation=function(e,n){var i=e.target.getAttribute("aria-controls");t.toggle(i,n)},t.initItem=function(e,i,o){var r,s=e,a=document.createElement("button"),c=s.parentNode;if(0===s.querySelectorAll("button").length){var l=window.MzpUtils.nextUntil(s,i);if(1===l.length)r=l[0];else{if(!(l.length>1))return;r=document.createElement("div"),l.forEach(function(e){r.appendChild(e)}),s.parentNode.insertBefore(r,s.nextSibling)}if(c.classList.add("is-details"),r.classList.add("mzp-js-details-wrapper"),!r.id){var u=i.replace(/[^a-zA-Z]+/g,"");r.id="expand-"+u+"-"+n,n+=1}r.setAttribute("aria-hidden",!0),r.classList.add("is-closed"),a.setAttribute("type","button"),a.setAttribute("aria-controls",r.id),a.setAttribute("aria-expanded",!1),a.addEventListener("click",function(e){t.handleControlActivation(e,o)},!1),Array.prototype.slice.call(s.childNodes).forEach(function(e){a.appendChild(e)}),s.appendChild(a),s.classList.add("is-summary")}},t.destroyItem=function(e){var t=e,n=t.parentNode,i=t.nextElementSibling,o=t.querySelector("button");0!==t.querySelectorAll("button").length&&(n.classList.remove("is-details"),i.removeAttribute("aria-hidden"),i.classList.remove("is-closed"),Array.prototype.slice.call(o.childNodes).forEach(function(e){t.appendChild(e)}),t.removeChild(o),t.classList.remove("is-summary"))},t.init=function(e,n){if(t.isSupported()){void 0===n&&(n={});for(var i=document.querySelectorAll(e),o=0;o<i.length;o++)t.initItem(i[o],e,n)}},t.destroy=function(e,n){for(var i=document.querySelectorAll(e,n),o=0;o<i.length;o++)t.destroyItem(i[o],e,n)},e.exports=t}},t={},n=function i(n){var o=t[n];if(o!==undefined)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}(876);return n}()},e.exports=t()},5475:function(e){var t;self,t=function(){return function(){var e={154:function(e){var t={switchPath:function(e,t){var n=e.pathname.slice(1).split("/"),i="/"+n[0]+"/";return!!/^(\/\w{2}-\w{2}\/|\/\w{2,3}\/)/.test(i)&&"/"+t+"/"+n.slice(1).join("/")+e.search},doRedirect:function(e){e&&(window.location.href=e)},init:function(e){for(var n=document.querySelectorAll(".mzp-js-language-switcher-select"),i=0;i<n.length;i++)n[i].setAttribute("data-previous-language",n[i].value),n[i].addEventListener("change",function(n){var i=n.target.value,o=n.target.getAttribute("data-previous-language");"function"==typeof e&&e(o,i),t.doRedirect(t.switchPath(window.location,i))},!1)}};e.exports=t}},t={},n=function i(n){var o=t[n];if(o!==undefined)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}(154);return n}()},e.exports=t()},8199:function(){"use strict";var e,t="moz-consent-pref";var n={},i="moz-banner-pencil";n.consentsToCookies=function(){var e=function(){try{return JSON.parse(window.Mozilla.Cookies.getItem(t))}catch(e){return!1}}();return!e||e.preference},n.setCookie=function(){if(n.consentsToCookies()){var e=new Date;e.setTime(e.getTime()+6048e5),window.Mozilla.Cookies.setItem(i,!0,e.toUTCString(),"/",undefined,
1!1,"lax")}},n.hasBeenClosed=function(){return"true"===document.documentElement.getAttribute("data-pencil-banner-closed")},n.close=function(){document.documentElement.setAttribute("data-pencil-banner-closed","true"),n.setCookie(),window.dataLayer.push({event:"widget_action",type:"banner",action:"dismiss",name:i})},n.bindEvents=function(){e.querySelector(".m24-pencil-banner-close").addEventListener("click",n.close,!1),window.dataLayer.push({event:"widget_action",type:"banner",action:"display",name:i,non_interaction:!0})},n.init=function(){var t="undefined"!=typeof window.Mozilla.Cookies&&window.Mozilla.Cookies.enabled();if(!(e=document.querySelector(".m24-pencil-banner")))return!1;t&&!n.hasBeenClosed()&&n.bindEvents()},n.init()},4218:function(e,t,n){"use strict";var i=n(2709),o=n.n(i);window.MzpDetails=o(),"undefined"!=typeof window.MzpSupports&&(window.MzpSupports.details||window.MzpDetails.init("summary")),window.MzpDetails.init(".mzp-c-details > h2"),window.MzpDetails.init(".mzp-c-details > h3"),window.MzpDetails.init(".mzp-c-details > h4"),window.MzpDetails.init(".mzp-c-details > h5"),window.MzpDetails.init(".mzp-c-details > h6")},9323:function(e,t,n){"use strict";var i=n(5475);n.n(i)().init(function(e,t){window.dataLayer.push({event:"widget_action",type:"language selector",action:"change to: "+t})})},2090:function(e,t,n){"use strict";var i=n(9595),o=n(9408);window.MzpMenu=o.A,window.MzpNavigation=i.A,o.A.init(),i.A.init()},9408:function(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i,o,r={},s=!1,a={onMenuOpen:null,onMenuClose:null,onMenuButtonClose:null};r.open=function(e,t){t&&e.classList.add("mzp-is-animated"),e.classList.add("mzp-is-selected"),s=!0,e.querySelector(".m24-c-menu-title").setAttribute("aria-expanded",!0),"function"==typeof a.onMenuOpen&&a.onMenuOpen(e),"undefined"!=typeof window.MzpNavigation&&"function"==typeof window.MzpNavigation.setFocusList&&window.MzpNavigation.setFocusList(".m24-c-navigation-logo-link, .m24-c-navigation-menu-button, .mzp-is-selected a")},r.close=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-is-selected"),t=0;t<e.length;t++)e[t].classList.remove("mzp-is-selected"),e[t].classList.remove("mzp-is-animated"),e[t].querySelector(".m24-c-menu-title").setAttribute("aria-expanded",!1);return s=!1,"function"==typeof a.onMenuClose&&e.length>0&&a.onMenuClose(),window.MzpNavigation.resetFocusListFunction(),e.length>0},r.onDocumentKeyUp=function(e){27===e.keyCode&&s&&r.close()},r.onCloseButtonClick=function(e){e.preventDefault(),"function"==typeof a.onMenuButtonClose&&a.onMenuButtonClose(),r.close()},r.toggle=function(e){!!e.classList.contains("mzp-is-selected")?(e.classList.remove("mzp-is-selected"),e.classList.remove("mzp-is-animated"),e.querySelector(".m24-c-menu-title").setAttribute("aria-expanded",!1),"function"==typeof a.onMenuClose&&a.onMenuClose(),window.MzpNavigation.resetFocusListFunction()):r.open(e)},r.onMouseEnter=function(e){clearTimeout(i),i=setTimeout(function(){var t=!r.close();r.open(e.target,t)},150)},r.onMouseLeave=function(){clearTimeout(i),i=setTimeout(function(){r.close()},150)},r.onFocusOut=function(){var e=this;setTimeout(function(){!e.contains(document.activeElement)&&e.classList.contains("mzp-is-selected")&&r.close()},0)},r.onClickWide=function(e){e.preventDefault(),r.close(),r.open(e.target.parentNode)},r.onClickSmall=function(e){e.preventDefault(),r.toggle(e.target.parentNode)},r.isWideViewport=function(){return o.matches},r.handleState=function(){function e(e){r.close(),e.matches?(r.unbindEventsSmall(),r.bindEventsWide()):(r.unbindEventsWide(),r.bindEventsSmall())}o=matchMedia("(min-width: 768px)"),window.matchMedia("all").addEventListener?o.addEventListener("change",e,!1):window.matchMedia("all").addListener&&o.addListener(e),r.isWideViewport()?r.bindEventsWide():r.bindEventsSmall()},r.bindEventsWide=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-js-expandable"),t=0;t<e.length;t++)e[t].addEventListener("mouseenter",r.onMouseEnter,!1),e[t].addEventListener("mouseleave",r.onMouseLeave,!1),e[t].addEventListener("focusout",r.onFocusOut,!1),e[t].querySelector(".m24-c-menu-title").addEventListener("click",r.onClickWide,!1),e[t].querySelector(".m24-c-menu-button-close").addEventListener("click",r.onCloseButtonClick,!1);document.addEventListener("keyup",r.onDocumentKeyUp,!1)},r.unbindEventsWide=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-js-expandable"),t=0;t<e.length;t++)e[t].removeEventListener("mouseenter",r.onMouseEnter,!1),e[t].removeEventListener("mouseleave",r.onMouseLeave,!1),e[t].removeEventListener("focusout",r.onFocusOut,!1),e[t].querySelector(".m24-c-menu-title").removeEventListener("click",r.onClickWide,!1),e[t].querySelector(".m24-c-menu-button-close").removeEventListener("click",r.onCloseButtonClick,!1);document.removeEventListener("keyup",r.onDocumentKeyUp,!1)},r.bindEventsSmall=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-js-expandable .m24-c-menu-title"),t=0;t<e.length;t++)e[t].addEventListener("click",r.onClickSmall,!1)},r.unbindEventsSmall=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-js-expandable .m24-c-menu-title"),t=0;t<e.length;t++)e[t].removeEventListener("click",r.onClickSmall,!1)},r.setAria=function(){for(var e=document.querySelectorAll(".m24-c-menu-category.mzp-js-expandable .m24-c-menu-title"),t=0;t<e.length;t++)e[t].setAttribute("aria-expanded",!1)},r.enhanceJS=function(){for(var e=document.querySelectorAll(".m24-c-menu"),t=0;t<e.length;t++)e[t].classList.remove("m24-mzp-is-basic"),e[t].classList.add("m24-mzp-is-enhanced")},r.isSupported=function(){return"undefined"!=typeof window.MzpSupports&&(window.MzpSupports.matchMedia&&window.MzpSupports.classList)},r.init=function(e){if("object"===n(e))for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t]);r.isSupported()&&(r.handleState(),r.setAria(),r.enhanceJS())},t.A=r},9595:function(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(t,{A:function(){return w}});var o,r,s,a={},c={onNavOpen:null,onNavClose:null},l=!1,u=0,d=null,p=document.getElementsByTagName("html")[0],m=null,f=".m24-c-navigation-logo-link, .m24-c-navigation-menu-button, .m24-c-menu-title",v=f;a.setFocusList=function(e){v=e},a.resetFocusListFunction=function(){v=f},a.isLargeViewport=function(){return s.matches},a.supportsSticky=function(){return"undefined"!=typeof window.MzpSupports&&(window.MzpSupports.matchMedia&&window.MzpSupports.classList&&window.MzpSupports.requestAnimationFrame&&window.MzpSupports.cssFeatureQueries&&CSS.supports("position","sticky"))},a.onScroll=function(){l||(d=window.requestAnimationFrame(a.checkScrollPosition),l=!0)},a.createSticky=function(){p.classList.add("mzp-has-sticky-navigation"),d=window.requestAnimationFrame(a.checkScrollPosition),window.addEventListener("scroll",a.onScroll,!1)},a.destroySticky=function(){p.classList.remove("mzp-has-sticky-navigation"),o.classList.remove("mzp-is-scrolling"),o.classList.remove("mzp-is-hidden"),u=0,d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",a.onScroll,!1)},a.initSticky=function(){function e(e){e.matches?a.createSticky():a.destroySticky()}s=matchMedia("(min-width: ".concat("768px",") and (min-height: ").concat("600px",")")),window.matchMedia("all").addEventListener?s.addEventListener("change",e,!1):window.matchMedia("all").addListener&&s.addListener(e),a.isLargeViewport()&&a.createSticky()},a.checkScrollPosition=function(){window.scrollY>0&&o.getBoundingClientRect().top<1?o.classList.add("mzp-is-scrolling"):o.classList.remove("mzp-is-scrolling"),window.scrollY>u?window.scrollY>300&&("undefined"!=typeof window.MzpMenu&&window.MzpMenu.close(),o.classList.add("mzp-is-hidden")):o.classList.remove("mzp-is-hidden"),u=window.scrollY,l=!1},a.onClick=function(e){var t=e.target.parentNode.querySelector(".m24-c-navigation-items");e.preventDefault(),e.target.classList.toggle("mzp-is-active"),t.classList.toggle("mzp-is-open");var n,i,o,r,s=!!t.classList.contains("mzp-is-open");e.target.setAttribute("aria-expanded",s),s?("function"==typeof c.onNavOpen&&c.onNavOpen(t),n=function(){return!a.isLargeViewport()},i=document.querySelector(".m24-navigation-refresh"),o=function(){return v},r=function(e){if(n()&&("Tab"===e.key||9===e.keyCode)){var t=i.querySelectorAll(
1o()),r=t[0],s=t[t.length-1];e.shiftKey?document.activeElement===r&&(s.focus(),e.preventDefault()):document.activeElement===s&&(r.focus(),e.preventDefault())}},i.addEventListener("keydown",r),m=function(){return i.removeEventListener("keydown",r)}):("function"==typeof c.onNavClose&&c.onNavClose(t),null!==m&&(m(),m=null))},a.menuButtonVisible=function(e){if("undefined"!=typeof window.MzpSupports&&window.MzpSupports.intersectionObserver)for(var t=new IntersectionObserver(function(t){for(var n=0;n<t.length;n++){var i=t[n];e(i.intersectionRatio>0,i.target)}},{root:document.documentElement}),n=0;n<r.length;n++){var i=r[n];t.observe(i)}},a.setAria=function(){if("undefined"!=typeof window.MzpSupports&&window.MzpSupports.intersectionObserver)a.menuButtonVisible(function(e,t){if(e){var n=!!t.classList.contains("mzp-is-active");t.setAttribute("aria-expanded",n)}else t.removeAttribute("aria-expanded")});else for(var e=0;e<r.length;e++){var t=r[e],n=t.classList.contains("mzp-is-active")&&"none"!==getComputedStyle(t).display;t.setAttribute("aria-expanded",n)}},a.bindEvents=function(){if(document.querySelectorAll(".m24-c-navigation-items").length>0){r=document.querySelectorAll(".m24-c-navigation-menu-button");for(var e=0;e<r.length;e++){r[e].addEventListener("click",a.onClick,!1)}a.setAria()}},a.init=function(e){if("object"===i(e))for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(c[t]=e[t]);a.bindEvents();var n=(o=document.querySelector(".enable-main-nav-sticky"))&&o.classList.contains("m24-mzp-is-sticky")&&a.supportsSticky();n&&matchMedia("(prefers-reduced-motion)").matches?o.classList.remove("m24-mzp-is-sticky"):n&&a.initSticky()};var w=a}},t={};function n(i){var o=t[i];if(o!==undefined)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(8199),n(4218),n(9323),n(7817),n(390),n(9408),n(9595);n(2090)}();

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.