| 1 {"version":3,"sources":["main.js"],"names":["document","addEventListener","toggl
eNavbarCollapse","navbarCollapseEls","this","parentElement","getElementsByClassN
ame","i","length","classList","toggle","CustomSelect","select","close","_onClick
","bind","_onFocusOut","Accordion","accordion","accordionButtons","setAttribute"
,"getElementById","getAttribute","_onKeyDown","BrowserSelect","apply","BROWSER_S
TORAGE_KEY","BROWSER_AUTODETECTED_STORAGE_KEY","SUPPORTED_BROWSERS","DEFAULT_BRO
WSER","_onClickOrKeyDown","storedBrowser","localStorage","getItem","selectOption
","detectBrowser","documentElement","className","toggleNavbarCollapseEls","proto
type","setTimeout","newFocus","activeElement","contains","event","target","query
Selector","open","removeAttribute","toggleSection","clickedButton","expandedButt
on","focusNextSection","currentFocus","nextheading","nextElementSibling","firstE
lementChild","focus","focusPrevSection","prevAccordionBody","previousElementSibl
ing","lastElementChild","key","keyCode","productTopicsAccordion","Object","creat
e","constructor","supportedBrowser","bowser","setItem","browser","bodyClassList"
,"Array","slice","call","body","indexOf","remove","add","selectedItem","selected
Option","innerHTML","handleNoContentForBrowser","section","createElement","inser
tAdjacentElement","option","closest","IS_ENTER_KEY","removeItem","browserSelect"
],"mappings":";;;;;;;;;;;;;;;;;CAiBC,WAECA,SAASC,iBAAiB,mBAAoB,WAc5C,QAASC,KAGP,
IAAK,GADDC,GAAoBC,KAAKC,cAAcC,uBAAuB,mBACzDC,EAAI,EAAGA,EAAIJ,EAAkBK,OAAQD,IAE5C
J,EAAkBI,GACfE,UAAUC,OAAO,QAexB,QAASC,GAAaC,GAEpBR,KAAKQ,OAASA,EACdR,KAAKS,QACLT
,KAAKQ,OACAX,iBAAiB,QAASG,KAAKU,SAASC,KAAKX,OAAO,GACzDA,KAAKQ,OACAX,iBAAiB,WAAYG
,KAAKY,YAAYD,KAAKX,OAAO,GAuEjE,QAASa,GAAUC,GAEjBd,KAAKc,UAAYA,CAGjB,KAAK,GADDC,G
AAmBf,KAAKc,UAAUZ,uBAAuB,2BACpDC,EAAI,EAAGA,EA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zCnE,KAAK+E,0BAA0BZ,IAInC/C,EAAce,UAA
U4C,0BAA4B,SAASZ,GAE3D,GAAIa,GAAUpF,SAASqF,cAAc,UACrCD,GAAQ3E,UAAUsE,IAAI,YAAcR,
GACpCa,EAAQF,UAAYlF,SACGqB,eAAe,mCACf6D,UAEvBlF,SACG8C,cAAc,iBACdwC,sBAAsB,aAAcF
,IAGzC5D,EAAce,UAAUT,kBAAoB,SAASc,GAEnD,GAAI2C,GAAS3C,EAAMC,OAAO2C,QAAQ,wBAClC,I
AAKD,EAAL,CAEA,GAAIE,GAA4B,SAAb7C,EAAMkB,KAAmC,IAAjBlB,EAAMmB,OAC7CnB,GAAMmB,UAA
Y0B,IAEtBzD,aAAa0D,WAAWtF,KAAKuB,kCAG7BvB,KAAKQ,OACAkC,cAAc,yBACd1B,aAAa,eAAgB,S
AElChB,KAAK8B,aAAaqD,EAAOjE,aAAa,eAEtClB,KAAKS,UAGP,IAAI8E,GAAgB3F,SAASqB,eAAe,i
BACxCsE,IAEF,GAAInE,GAAcmE,KAGnB","file":"main.min.js","sourcesContent":["/*!\n
* This file is part of help.eyeo.com.\n * Copyright (C) 2017-present eyeo GmbH\n
*\n * help.eyeo.com is free software: you can redistribute it and/or modify\n *
it under the terms of the GNU General Public License as published by\n * the Fr
ee Software Foundation, either version 3 of the License, or\n * (at your option)
any later version.\n *\n * help.eyeo.com is distributed in the hope that it wil
l be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\
n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Genera
l Public License for more details.\n *\n * You should have received a copy of th
e GNU General Public License\n * along with help.eyeo.com. If not, see <http://
www.gnu.org/licenses/>.\n */\n(function()\n{\n document.addEventListener(\"DOMC
ontentLoaded\", function()\n {\n\n /****************************************
**********************************\n * General\n ***********************
***************************************************/\n\n // Change html class
name from \"no-js\" to \"js\"\n document.documentElement.className = \"js\";
\n\n /***********************************************************************
***\n * Navbar\n *******************************************************
*******************/\n\n function toggleNavbarCollapse()\n {\n var na
vbarCollapseEls = this.parentElement.getElementsByClassName(\"navbar-collapse\")
;\n for (var i = 0; i < navbarCollapseEls.length; i++)\n {\n na
vbarCollapseEls[i]\n .classList.toggle(\"open\")\n }\n }\n\n
var toggleNavbarCollapseEls = document.getElementsByClassName(\"toggle-navbar-c
ollapse\");\n for (var i = 0; i < toggleNavbarCollapseEls.length; i++)\n {
\n toggleNavbarCollapseEls[i]\n .addEventListener(\"click\", toggleN
avbarCollapse, false);\n }\n\n /******************************************
********************************\n * CustomSelect\n ********************
******************************************************/\n\n function CustomSe
lect(select)\n {\n this.select = select;\n this.close();\n thi
s.select\n .addEventListener(\"click\", this._onClick.bind(this), false
);\n this.select\n .addEventListener(\"focusout\", this._onFocusOu
t.bind(this), false);\n }\n\n CustomSelect.prototype._onFocusOut = functio
n()\n {\n // setTimeout to allow document.activeElement \n // to mo
ve to newly focused element\n setTimeout(function()\n {\n var n
ewFocus = document.activeElement;\n \n if (newFocus\n
.classList.contains(\"custom-select-selected\") ||\n newFocus\n
.classList.contains(\"custom-select-option\") ||\n newFocus\
n .parentElement\n .classList.contains(\"custom-select
-option\"))\n {\n return;\n }\n\n this.close();\n
\n }.bind(this), 1);\n }\n\n CustomSelect.prototype._onClick =
function(event)\n {\n if (event.target.classList.contains(\"custom-sele
ct-selected\"))\n {\n var options = this.select.querySelector(\".cus
tom-select-options\");\n if (options.getAttribute(\"aria-hidden\") == \"t
rue\")\n {\n this.open();\n }\n else\n {\n
this.close();\n }\n }\n }\n\n CustomSelect.prototype.
open = function()\n {\n this.select\n .querySelector(\".custom-se
lect-selected\")\n .setAttribute(\"aria-expanded\", \"true\");\n\n t
his.select\n .querySelector(\".custom-select-options\")\n .removeA
ttribute(\"aria-hidden\");\n }\n\n CustomSelect.prototype.close = function
()\n {\n this.select\n .querySelector(\".custom-select-selected\"
)\n .setAttribute(\"aria-expanded\", \"false\");\n\n this.select\n
.querySelector(\".custom-select-options\")\n .setAttribute(\"aria-hid
den\", \"true\");\n }\n \n new CustomSelect(document.getElementById(\"l
anguage-select\"));\n\n /****************************************************
**********************\n * Accordion\n *********************************
*****************************************/\n\n function Accordion(accordion)\
n {\n this.accordion = accordion;\n \n var accordionButtons =
this.accordion.getElementsByClassName('accordion-toggle-button');\n for (va
r i = 0; i < accordionButtons.length; i++)\n {\n // Close all sectio
ns except the first\n if (i !== 0)\n {\n accordionButtons
[i].setAttribute(\"aria-expanded\", \"false\");\n document\n
.getElementById( accordionButtons[i].getAttribute(\"aria-controls\") )\n
.setAttribute(\"hidden\", \"true\");\n }\n }\n\n this.acco
rdion\n .addEventListener(\"click\", this._onClick.bind(this), false);\n
this.accordion\n .addEventListener(\"keydown\", this._onKeyDown.bind
(this), false);\n }\n\n Accordion.prototype.toggleSection = function(click
edButton)\n {\n // Hide currently expanded section\n var expandedBu
tton = this.accordion.querySelector(\"button[aria-expanded='true']\");\n if
(expandedButton)\n {\n expandedButton.setAttribute(\"aria-expanded\
", \"false\");\n document\n .getElementById( expandedButton.getA
ttribute(\"aria-controls\") )\n .setAttribute(\"hidden\", \"true\");\n
}\n\n // If currently expanded section is clicked\n if (expandedB
utton === clickedButton) return;\n\n // Expand new section\n clickedBu
tton.setAttribute(\"aria-expanded\", \"true\");\n document\n .getEle
mentById( clickedButton.getAttribute(\"aria-controls\") )\n .removeAttrib
ute(\"hidden\");\n }\n\n Accordion.prototype.focusNextSection = function()
\n {\n var currentFocus = document.activeElement;\n var nextheading
= currentFocus.parentElement.nextElementSibling.nextElementSibling;\n\n if
(nextheading)\n {\n nextheading // .accordion-heading\n .f
irstElementChild // .accordion-toggle-button\n .focus();\n }\n
else\n {\n this.accordion\n .firstElementChild // .accord
ion-heading\n .firstElementChild // .accordion-toggle-button\n
.focus();\n }\n }\n\n Accordion.prototype.focusPrevSection = functio
n()\n {\n var currentFocus = document.activeElement;\n var prevAcco
rdionBody = currentFocus.parentElement.previousElementSibling;\n\n if (prev
AccordionBody)\n {\n prevAccordionBody // .accordion-body\n
.previousElementSibling // .accordion-heading\n .firstElementChild //
.accordion-toggle-button\n .focus();\n }\n else\n {\n
this.accordion\n .lastElementChild // .accordion-body\n .
previousElementSibling // .accordion-heading\n .firstElementChild // .a
ccordion-toggle-button\n .focus();\n }\n }\n\n Accordion.pro
totype._onKeyDown = function(event)\n {\n if (!event.target.classList.co
ntains(\"accordion-toggle-button\")) return;\n\n if (event.key == \"ArrowUp
\" || event.keyCode == 38)\n {\n this.focusPrevSection();\n }\n
else if (event.key == \"ArrowDown\" || event.keyCode == 40)\n {\n
this.focusNextSection();\n }\n }\n\n Accordion.prototype._onClick
= function(event)\n {\n if (!event.target.classList.contains(\"accordio
n-toggle-button\")) return;\n \n this.toggleSection(event.target);\n
}\n\n var productTopicsAccordion = document.getElementById('product-topics-
accordion');\n if (productTopicsAccordion)\n {\n new Accordion(produc
tTopicsAccordion);\n }\n\n /**********************************************
****************************\n * BrowserSelect\n ***********************
***************************************************/\n\n function BrowserSele
ct(select)\n {\n this.select = select;\n CustomSelect.apply(this, [
this.select]);\n \n this.BROWSER_STORAGE_KEY = \"BROWSER\";\n thi
s.BROWSER_AUTODETECTED_STORAGE_KEY = \"BROWSER_AUTODETECTED\";\n this.SUPPO
RTED_BROWSERS = [\"chrome\", \"opera\", \"samsungBrowser\", \n
\"yandexbrowser\", \"maxthon\", \"msie\", \n
\"msedge\", \"firefox\", \"ios\", \"safari\"];\n this.DEFAULT_B
ROWSER = \"chrome\";\n \n this.select\n .addEventListener(\"cli
ck\", this._onClickOrKeyDown.bind(this), false);\n \n this.select\n
.addEventListener(\"keydown\", this._onClickOrKeyDown.bind(this), false);\n
\n var storedBrowser = localStorage.getItem(this.BROWSER_STORAGE_KEY);\n
if (storedBrowser) this.selectOption(storedBrowser);\n else this.detectB
rowser();\n }\n\n BrowserSelect.prototype = Object.create(CustomSelect.pro
totype);\n BrowserSelect.prototype.constructor = BrowserSelect;\n\n Browse
rSelect.prototype.detectBrowser = function()\n {\n for (var i = 0; i < t
his.SUPPORTED_BROWSERS.length; i++)\n {\n var supportedBrowser = thi
s.SUPPORTED_BROWSERS[i];\n if (bowser[supportedBrowser])\n {\n
localStorage.setItem(this.BROWSER_AUTODETECTED_STORAGE_KEY, \"true\");\n
return this.selectOption(supportedBrowser);\n }\n }\n\n
this.selectOption(this.DEFAULT_BROWSER); \n };\n\n BrowserSelect.prototy
pe.selectOption = function(browser)\n {\n localStorage.setItem(this.BROW
SER_STORAGE_KEY, browser);\n\n // Change body class\n var bodyClassLis
t = Array.prototype.slice.call(document.body.classList);\n for (var i = 0;
i < bodyClassList.length; i++)\n {\n if (bodyClassList[i].indexOf(\"
ua-\") > -1)\n {\n document.body.classList.remove(bodyClassList[
i]);\n }\n }\n document.body.classList.add(\"ua-\" + browser);\
n\n // Check selected option\n var selectedItem = this.select\n
.querySelector(\"[data-value='\" + browser + \"']\");\n
selectedItem.setAttribute(\"aria-checked\", \"true\");\n\n // Set select
ed option\n var selectedOption = selectedItem.innerHTML;\n\n if (local
Storage.getItem(this.BROWSER_AUTODETECTED_STORAGE_KEY))\n {\n var au
todetected = document\n .getElementById(\"browser-s
elect-autodetected\")\n .innerHTML;\n select
edOption += \"<span class='muted'>(\" + autodetected + \")</span>\";\n }\n\
n this.select\n .querySelector(\".custom-select-selected\")\n
.innerHTML = selectedOption;\n \n if (!document.querySelector(\".
platform-\" + browser))\n {\n this.handleNoContentForBrowser(browser
);\n }\n };\n\n BrowserSelect.prototype.handleNoContentForBrowser = f
unction(browser)\n {\n var section = document.createElement(\"section\")
;\n section.classList.add(\"platform-\" + browser);\n section.innerHTM
L = document\n .getElementById(\"no-content-for-platf
orm-message\")\n .innerHTML;\n\n document\n
.querySelector(\".article-body\")\n .insertAdjacentElement(\"afterbegi
n\", section);\n }\n\n BrowserSelect.prototype._onClickOrKeyDown = functio
n(event)\n {\n var option = event.target.closest(\".custom-select-option
\");\n if (!option) return;\n\n var IS_ENTER_KEY = event.key == \"Ente
r\" || event.keyCode == 13;\n if (event.keyCode && !IS_ENTER_KEY) return;\n
\n localStorage.removeItem(this.BROWSER_AUTODETECTED_STORAGE_KEY);\n\n
// Uncheck previously checked option\n this.select\n .querySelect
or(\"[aria-checked='true']\")\n .setAttribute(\"aria-checked\", \"false
\");\n\n this.selectOption(option.getAttribute(\"data-value\"));\n\n t
his.close();\n };\n\n var browserSelect = document.getElementById(\"browse
r-select\");\n if (browserSelect)\n {\n new BrowserSelect(browserSele
ct);\n }\n\n }, false);\n}());\n//# sourceMappingURL=main.js.map\n\n//# sour
ceMappingURL=main-debug.js.map\n\n//# sourceMappingURL=main.js.map\n"]} |