PageSourceSearch

https://www.broraonline.com/cdn/shop/t/7/assets/drawer-coordinator.js?v=173132392761917629881787646210

js broraonline.com collected 2026-09-28 08:31:38 UTC 4,098 bytes, 2 lines download raw bytes

1(function(){"use strict";var host=document.querySelector("[data-drawers-host]");if(!host)return;var SWITCH_MS=300,mqDesktop=window.matchMedia("(min-width: 1024px)"),headerEl=document.querySelector("[data-header]"),bagRoot=document.querySelector("[data-mini-bag]"),wishRoot=document.querySelector("[data-wishlist-drawer]"),searchRoot=document.querySelector("[data-search-drawer]"),roots={bag:{el:bagRoot,attr:"data-mini-bag-open",trigger:"[data-mini-bag-trigger]",api:function(){return window.miniBag||null}},wishlist:{el:wishRoot,attr:"data-wishlist-drawer-open",trigger:"[data-wishlist-drawer-trigger]",api:function(){return window.broraWishlistDrawer||null}},search:{el:searchRoot,attr:"data-search-drawer-open",trigger:"[data-search-drawer-trigger]",api:function(){return window.broraSearchDrawer||null}},menu:{el:headerEl,attr:"data-menu-open",trigger:"[data-menu-toggle]",api:function(){return window.broraMenuDrawer||null}}},PARTICIPANTS={bag:!0,wishlist:!0,search:!0,menu:!0},switchToken=0,headerGroup=document.querySelector("[data-header-group]");function syncHeaderReveal(active){headerGroup&&active==="bag"&&headerGroup.dataset.headerSticky==="hidden"&&(headerGroup.dataset.headerSticky="visible")}function setBackgroundInert(active){var on=active!=="none";[document.querySelector("[data-announcement-bar]"),document.querySelector("main"),document.querySelector("[data-footer]")].forEach(function(el){el&&el.toggleAttribute("inert",on)})}function setActive(name){host.setAttribute("data-drawers-active",name),document.documentElement.setAttribute("data-drawers-active",name),setBackgroundInert(name),syncHeaderReveal(name)}function setSwitching(v){host.setAttribute("data-drawers-switching",v),document.documentElement.setAttribute("data-drawers-switching",v)}function reconcileActive(){if(host.getAttribute("data-drawers-switching")!=="true"){var active="none";["search","menu","wishlist","bag"].forEach(function(name){var r=roots[name];active==="none"&&r.el&&r.el.getAttribute(r.attr)==="true"&&(active=name)}),setActive(active)}}function focusIncoming(target){var sel={bag:'[data-drawers-panel="bag"] [data-mini-bag-close]',wishlist:'[data-drawers-panel="wishlist"] [data-wishlist-drawer-close]',search:'[data-drawers-panel="search"] [data-search-drawer-input]',menu:'[data-drawers-panel="menu"] [data-menu-toggle], [data-drawers-panel="menu"] a, [data-drawers-panel="menu"] button'}[target];if(sel){var el=document.querySelector(sel);!el||typeof el.focus!="function"||el.focus()}}function switchTo(target){if(host.getAttribute("data-drawers-active")!==target){var current=host.getAttribute("data-drawers-active"),token=++switchToken;setSwitching("true"),setActive(target),window.setTimeout(function(){if(token===switchToken){var out=current&&roots[current]?roots[current].api():null;out&&typeof out.close=="function"&&out.close({tabSwitch:!0});var inc=roots[target].api();inc&&typeof inc.open=="function"&&inc.open(null,{tabSwitch:!0}),focusIncoming(target)}},SWITCH_MS),window.setTimeout(function(){token===switchToken&&(setSwitching("false"),reconcileActive())},SWITCH_MS*2)}}host.addEventListener("click",function(e){var tab=e.target.closest("[data-mini-bag-tab]");if(!(!tab||!host.contains(tab))){var to=tab.getAttribute("data-mini-bag-tab");to!=="bag"&&to!=="wishlist"||(e.preventDefault(),e.stopPropagation(),switchTo(to))}}),window.addEventListener("click",function(e){if(!mqDesktop.matches){var target=null;for(var name in roots)if(roots.hasOwnProperty(name)&&e.target.closest(roots[name].trigger)){target=name;break}if(target){var active=host.getAttribute("data-drawers-active");active==="none"||active===target||target!=="menu"&&(!PARTICIPANTS[active]||!PARTICIPANTS[target]||(e.preventDefault(),e.stopImmediatePropagation(),switchTo(target)))}}},!0);var observer=new MutationObserver(reconcileActive);["bag","wishlist","search","menu"].forEach(function(name){var r=roots[name];r.el&&observer.observe(r.el,{attributes:!0,attributeFilter:[r.attr]})}),reconcileActive()})();
2//# sourceMappingURL=/cdn/shop/t/7/assets/drawer-coordinator.js.map?v=173132392761917629881787646210

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.