{"version":3,"sources":["webpack:///./Scripts/Components/Vanilla/HandleStickyMenu.js"],"names":["icon","document","getElementById","header","shadowElement","searchBar","midPageMenu","offsetTop","classList","remove","body","clientWidth","add","window","addEventListener","documentElement","scrollTop","contains","pageYOffset"],"mappings":"4EAAA,IAAMA,EAAOC,SAASC,eAAe,qBAC/BC,EAASF,SAASC,eAAe,UACjCE,EAAgBH,SAASC,eAAe,uBACxCG,EAAYJ,SAASC,eAAe,0BACpCI,EAAcL,SAASC,eAAe,mCAIxCC,IACIA,EAAOI,UAAY,GACnBP,EAAKQ,UAAUC,OAAO,cAClBR,SAASS,KAAKC,aAAe,MAC7BP,EAAcI,UAAUI,IAAI,gBAGhCP,EAAUG,UAAUC,OAAO,aAC3BL,EAAcI,UAAUC,OAAO,eAEnCI,OAAOC,iBAAiB,UAAU,WAC1BX,EAAOI,WAAa,GACpBH,EAAcI,UAAUC,OAAO,cAE/BR,SAASS,KAAKC,aAAe,MAEzBV,SAASc,gBAAgBC,UAAY,KACrCX,EAAUG,UAAUS,SAAS,eAE7BZ,EAAUG,UAAUC,OAAO,aACvBH,GACAA,EAAYE,UAAUC,OAAO,qBAG7BJ,EAAUG,UAAUS,SAAS,cAC7BZ,EAAUG,UAAUC,OAAO,cAG9BJ,EAAUG,UAAUS,SAAS,eAC1BJ,OAAOK,YA/Bd,IAgCOb,EAAUG,UAAUI,IAAI,aACxBZ,EAAKQ,UAAUC,OAAO,gBAEtBJ,EAAUG,UAAUC,OAAO,aAC3BT,EAAKQ,UAAUI,IAAI,gBAGtBN,IACGO,OAAOK,YAxCd,GAyCOd,EAAcI,UAAUI,IAAI,cAE5BR,EAAcI,UAAUC,OAAO,gBAIlCH,IACGO,OAAOK,YAhDd,GAiDOd,EAAcI,UAAUI,IAAI,cAE5BR,EAAcI,UAAUC,OAAO,mBAO/CT,GACAA,EAAKc,iBAAiB,SAAS,WACvBT,EAAUG,UAAUS,SAAS,cAC7BZ,EAAUG,UAAUI,IAAI,aACxBP,EAAUG,UAAUC,OAAO,aACvBH,GACAA,EAAYE,UAAUI,IAAI,uBAG9BP,EAAUG,UAAUI,IAAI,aACxBP,EAAUG,UAAUC,OAAO,aACvBH,GACAA,EAAYE,UAAUC,OAAO","file":"19.26d3030cc002ca77790a.js","sourcesContent":["const icon = document.getElementById(\"quick-search-icon\");\r\nconst header = document.getElementById(\"header\");\r\nconst shadowElement = document.getElementById(\"header__top-section\");\r\nconst searchBar = document.getElementById(\"quick-search-component\");\r\nconst midPageMenu = document.getElementById(\"product-content__menu-container\");\r\n\r\nlet sticky = 56;\r\n\r\nif (header) {\r\n if (header.offsetTop > 0) {\r\n icon.classList.remove(\"no-opacity\");\r\n if (document.body.clientWidth >= 1023 - 17) {\r\n shadowElement.classList.add(\"box-shadow\");\r\n }\r\n } else {\r\n searchBar.classList.remove(\"no-height\");\r\n shadowElement.classList.remove(\"box-shadow\");\r\n }\r\n window.addEventListener(\"scroll\", function () {\r\n if (header.offsetTop <= 0) {\r\n shadowElement.classList.remove(\"box-shadow\");\r\n }\r\n if (document.body.clientWidth <= 1023 - 17) {\r\n if (\r\n document.documentElement.scrollTop < 160 &&\r\n searchBar.classList.contains(\"no-scroll\")\r\n ) {\r\n searchBar.classList.remove(\"no-scroll\");\r\n if (midPageMenu) {\r\n midPageMenu.classList.remove(\"sticky--menu-open\");\r\n }\r\n\r\n if (searchBar.classList.contains(\"no-height\")) {\r\n searchBar.classList.remove(\"no-height\");\r\n }\r\n }\r\n if (!searchBar.classList.contains(\"no-scroll\")) {\r\n if (window.pageYOffset > sticky) {\r\n searchBar.classList.add(\"no-height\");\r\n icon.classList.remove(\"no-opacity\");\r\n } else {\r\n searchBar.classList.remove(\"no-height\");\r\n icon.classList.add(\"no-opacity\");\r\n }\r\n }\r\n if (!midPageMenu) {\r\n if (window.pageYOffset > sticky) {\r\n shadowElement.classList.add(\"box-shadow\");\r\n } else {\r\n shadowElement.classList.remove(\"box-shadow\");\r\n }\r\n }\r\n } else {\r\n if (!midPageMenu) {\r\n if (window.pageYOffset > sticky) {\r\n shadowElement.classList.add(\"box-shadow\");\r\n } else {\r\n shadowElement.classList.remove(\"box-shadow\");\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nif (icon) {\r\n icon.addEventListener(\"click\", function () {\r\n if (searchBar.classList.contains(\"no-height\")) {\r\n searchBar.classList.add(\"no-scroll\");\r\n searchBar.classList.remove(\"no-height\");\r\n if (midPageMenu) {\r\n midPageMenu.classList.add(\"sticky--menu-open\");\r\n }\r\n } else {\r\n searchBar.classList.add(\"no-height\");\r\n searchBar.classList.remove(\"no-scroll\");\r\n if (midPageMenu) {\r\n midPageMenu.classList.remove(\"sticky--menu-open\");\r\n }\r\n }\r\n });\r\n}\r\n"],"sourceRoot":""}