PageSourceSearch

https://allergyresearchgroup.com/cdn/shop/t/53/assets/floating-widgets.js?v=96925251333548840541790029381

js allergyresearchgroup.com collected 2026-10-02 11:41:49 UTC 10,545 bytes, 2 lines download raw bytes

1(function(){"use strict";if(window.__argFloatingWidgets)return;window.__argFloatingWidgets=!0;var rt_aligned=!0;rt_aligned=!1;var DRAWER_ID="header-sidebar-menu",DESKTOP_MQ="(min-width: 1150px)",DT_INSET=20,DT_BASE=20,G_ICON_PAD=8,M_SIDE=16,M_BOTTOM=84,GAP=14,DT_ACSB_GAP_RIGHT=8,DT_ACSB_RIGHT=103,DT_ACSB_BOTTOM=40,DT_SHIELD_RIGHT=162,DT_SHIELD_BOTTOM=35,mqDesktop=window.matchMedia(DESKTOP_MQ),cache={},scheduled=!1,writeCount=0,hotTicks=0,pauseUntil=0,lastGw=84,lastGh=84,ducked=!1;function schedule(){if(scheduled)return;scheduled=!0;var fired=!1,raf=requestAnimationFrame(go),tmo=setTimeout(go,80);function go(){fired||(fired=!0,cancelAnimationFrame(raf),clearTimeout(tmo),scheduled=!1,run())}}function watchStyle(el){el.__ptObs||(el.__ptObs=!0,new MutationObserver(schedule).observe(el,{attributes:!0,attributeFilter:["style"]}))}function watchClassStyle(el){el.__ptObs||(el.__ptObs=!0,new MutationObserver(schedule).observe(el,{attributes:!0,attributeFilter:["class","style"]}))}function live(key,find){var el=cache[key];if(el&&el.isConnected)return el;if(el=find()||null,cache[key]=el,el&&key==="g"&&watchStyle(el),el&&key==="a"&&watchClassStyle(el),el&&key==="s"){var root=el.getRootNode();root&&!root.__ptObs&&(root.__ptObs=!0,new MutationObserver(schedule).observe(root,{childList:!0,subtree:!0}))}return el}function google(){return live("g",function(){return document.getElementById("google-merchantwidget-iframe-wrapper")})}function shield(){return live("s",function(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return null;for(var t=h.shadowRoot.querySelector('[class*="reopen"]');t&&getComputedStyle(t).position!=="fixed";)t=t.parentElement;return t})}function acsb(){return live("a",function(){for(var hosts=document.querySelectorAll("access-widget-ui"),i=0;i<hosts.length;i++)if(hosts[i].shadowRoot){var b=hosts[i].shadowRoot.querySelector('button[class*="trigger-button"]');if(b)return patchAcsbShadow(hosts[i]),b}return null})}function patchAcsbShadow(host){if(!(!host.shadowRoot||host.shadowRoot.getElementById("arg17-acsb-fix"))){var st=document.createElement("style");st.id="arg17-acsb-fix",st.textContent=['.trigger-button,[class*="trigger-button"]{transition:transform .15s!important;}',".icon svg{visibility:inherit!important;}"].join(""),host.shadowRoot.appendChild(st)}}function drawer(){return document.getElementById(DRAWER_ID)}function menuOpen(){var d=drawer();return!!(d&&d.hasAttribute("open")&&d.offsetWidth>0)}var WIDGET_HOSTS='access-widget-ui, csm-cookie-consent, [id*="merchantwidget"]';function isWidgetNode(node){return!!(node&&node.closest&&node.closest(WIDGET_HOSTS))}function eventHitsWidget(event){var deep=event.composedPath&&event.composedPath()[0]||null;return isWidgetNode(deep)||isWidgetNode(event.target)}function protectDrawer(){var d=drawer();if(!(!d||d.__arg17Protected)){d.__arg17Protected=!0;var native=Node.prototype.contains;d.contains=function(node){return native.call(this,node)?!0:isWidgetNode(node)};var origTouch=d._allowOutsideClickTouch,origMouse=d._allowOutsideClickMouse;d._allowOutsideClickTouch=function(event){return eventHitsWidget(event)?!0:origTouch.call(this,event)},d._allowOutsideClickMouse=function(event){return eventHitsWidget(event)?!0:origMouse.call(this,event)}}}function setImp(el,prop,val){el.style.getPropertyValue(prop)!==val&&(writeCount++,el.style.setProperty(prop,val,"important"))}function clearProp(el,prop){el.style.getPropertyValue(prop)!==""&&(writeCount++,el.style.removeProperty(prop))}function show(el){clearProp(el,"visibility"),clearProp(el,"pointer-events")}function hide(el){setImp(el,"visibility","hidden"),setImp(el,"pointer-events","none")}var CSM_UNPOP_MAX=20,csmUnpopCount=0,csmUnpopped=!1;function shieldStacking(host,belowZ){if(csmPanelVisible()){if(clearProp(host,"z-index"),typeof host.showPopover=="function"&&!host.matches(":popover-open"))try{host.showPopover()}catch(e){}csmUnpopped=!1;return}if(setImp(host,"z-index",belowZ),!(csmUnpopCount>=CSM_UNPOP_MAX)&&typeof host.hidePopover=="function")try{host.matches(":popover-open")&&(host.hidePopover(),csmUnpopped=!0,csmUnpopCount++)}catch(e){csmUnpopCount=CSM_UNPOP_MAX}}function shieldIcon(s){if(!s)return null;var i=s.querySelector('[class*="reopen"]');return i&&i!==s?i:null}function acsbInterfaceOpen(){var a=cache.a;
1if(a&&a.isConnected&&/trigger-button--visible/.test(String(a.className)))return!1;var el=cache.ai;if(!(el&&el.isConnected)){el=null;for(var hosts=document.querySelectorAll("access-widget-ui"),i=0;i<hosts.length&&!el;i++){var sr=hosts[i].shadowRoot;if(sr)for(var all=sr.querySelectorAll("*"),j=0;j<all.length;j++){var r=all[j].getBoundingClientRect();if(r.width>250&&r.height>400){el=all[j];break}}}cache.ai=el,el&&watchClassStyle(el)}if(!el)return!1;var cs=getComputedStyle(el),rr=el.getBoundingClientRect();return cs.visibility!=="hidden"&&cs.display!=="none"&&rr.width>250&&rr.height>400}function csmScan(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return null;var best=null;return h.shadowRoot.querySelectorAll("div").forEach(function(el){var cs=getComputedStyle(el),r=el.getBoundingClientRect(),vis=cs.visibility!=="hidden"&&cs.display!=="none"&&r.width>0,isBig=r.width>200&&r.height>150;el.__ptDlg&&(!vis||!isBig)&&(el.style.removeProperty("left"),el.__ptDlg=!1),vis&&isBig&&r.width<window.innerWidth*.9&&(!best||r.width*r.height>best.r.width*best.r.height)&&(best={el:el,r:r})}),best}function csmPanelVisible(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return!1;var found=!1;return h.shadowRoot.querySelectorAll("div").forEach(function(el){var cs=getComputedStyle(el);if(!(cs.visibility==="hidden"||cs.display==="none")){var r=el.getBoundingClientRect(),panel=r.width>200&&r.height>150,bar=r.width>window.innerWidth*.6&&r.height>60;(panel||bar)&&(found=!0)}}),found}function steerCsmPanel(best){if(best){var vw=window.innerWidth,want=Math.max(4,Math.round(vw-best.r.width-20)),delta=Math.round(best.r.left-want);if(Math.abs(delta)>2){var base=parseFloat(best.el.style.getPropertyValue("left"));isNaN(base)&&(base=parseFloat(getComputedStyle(best.el).left)),isNaN(base)&&(base=0),setImp(best.el,"left",Math.round(base-delta)+"px"),best.el.__ptDlg=!0}}}function sync(){var g=google(),s=shield(),a=acsb(),desktop=mqDesktop.matches;if(protectDrawer(),!desktop&&!menuOpen()){ducked=!1;var panelUp=csmPanelVisible();if(g&&setImp(g,"display","none"),s){var icon=shieldIcon(s);icon?(setImp(icon,"visibility","hidden"),setImp(icon,"pointer-events","none"),clearProp(s,"visibility"),panelUp?clearProp(s,"pointer-events"):setImp(s,"pointer-events","none")):panelUp?show(s):hide(s)}a&&hide(a),steerCsmPanel(csmScan());return}if(ducked=acsbInterfaceOpen(),ducked){if(g&&setImp(g,"display","none"),s){var ic3=shieldIcon(s);ic3?(setImp(ic3,"visibility","hidden"),setImp(ic3,"pointer-events","none")):hide(s)}steerCsmPanel(csmScan());return}var cRight,inset,base;if(desktop)cRight=window.innerWidth,inset=DT_INSET,base=DT_BASE;else{var d=drawer(),pn=d.querySelector(".panel-list__wrapper")||d,r=pn.getBoundingClientRect();cRight=r.right,inset=M_SIDE,base=Math.round(Math.max(0,window.innerHeight-r.bottom))+M_BOTTOM}if(s){var icon2=shieldIcon(s);icon2&&(clearProp(icon2,"visibility"),clearProp(icon2,"pointer-events")),show(s)}a&&show(a),g&&setImp(g,"display","block");var gw=g&&g.offsetWidth||84,gh=g&&g.offsetHeight||84,sw=s&&s.offsetWidth||55,sh=s&&s.offsetHeight||55,aw=a&&a.offsetWidth||45,ah=a&&a.offsetHeight||45,expanded=gh>150;!expanded&&g&&(lastGw=gw,lastGh=gh);var ghNom=expanded?lastGh:gh,gwNom=expanded?lastGw:gw,gVis=Math.min(gwNom,ghNom),rowH=Math.max(sh,ah,gVis,1),gRightWanted=Math.round(window.innerWidth-cRight+inset),gRight=gRightWanted;if(window.innerWidth-gRight-gw<8&&(gRight=Math.max(4,window.innerWidth-gw-8)),g){var gBottom;if(!expanded)gBottom=Math.round(base+(rowH-gh)/2);else{var anchor=Math.round(base+(rowH-ghNom)/2);gBottom=Math.min(anchor,window.innerHeight-gh-8)}gBottom<4&&(gBottom=4),setImp(g,"top","auto"),setImp(g,rt_aligned?"left":"right","auto"),setImp(g,rt_aligned?"right":"left",gRight+"px"),setImp(g,"bottom",gBottom+"px")}var gNomLeft=window.innerWidth-gRight-gVis,aLeft=gNomLeft+G_ICON_PAD-GAP-aw-(desktop?DT_ACSB_GAP_RIGHT:0),sLeft=aLeft-GAP-sw,gZ=g&&parseInt(getComputedStyle(g).zIndex,10)||2147483647,stackBelowG=String(Math.max(0,gZ-1));if(a){if(desktop){var cw=document.documentElement.clientWidth;setImp(a,"top","auto"),setImp(a,rt_aligned?"right":"left","auto"),setImp(a,rt_aligned?"left":"right",Math.round(cw-DT_ACSB_RIGHT-aw)+"px"),setImp(a,"bottom",DT_ACSB_BOTTOM+"px")}else setImp(a,"top","auto"),setImp(a,rt_aligned?"right":"left","auto"),setImp(a,rt_aligned?"left":"right",Math.round(aLeft)+"px"),setImp(a,"bottom",Math.round(base+(rowH-ah)/2)+"px");setImp(a,"z-index",stackBelowG)}if(s){if(desktop){var cwS=document.documentElement.clientWidth;setImp(s,"top","auto"),setImp(s,rt_aligned?"right":"left","auto"),setImp(s,rt_aligned?"left":"right",Math.round(cwS-DT_SHIELD_RIGHT-sw)+"px"),setImp(s,"bottom",DT_SHIELD_BOTTOM+"px")}else setImp(s,"top","auto"),setImp(s,rt_aligned?"right":"left","auto"),setImp(s,rt_aligned?"left":"right",Math.round(sLeft)+"px"),setImp(s,"bottom",Math.round(base+(rowH-sh)/2)+"px");setImp(s,"z-index",stackBelowG),s.__arg17Placed=!0}var csmHost=document.querySelector("csm-cookie-consent");csmHost&&shieldStacking(csmHost,stackBelowG),steerCsmPanel(csmScan())}function shieldNeedsPlacement(){var el=shield();return!!(el&&!el.__arg17Placed)}function run(){if(!(Date.now()<pauseUntil&&!shieldNeedsPlacement())){var w0=writeCount;try{sync()}catch(e){}if(hotTicks=writeCount>w0?hotTicks+1:0,hotTicks>60){hotTicks=0,pauseUntil=Date.now()+3e3;return}var d=drawer();(!mqDesktop.matches&&d&&d.hasAttribute("open")||ducked)&&schedule()}}
1function init(){var d=drawer();d&&new MutationObserver(schedule).observe(d,{attributes:!0,attributeFilter:["open"]}),mqDesktop.addEventListener?mqDesktop.addEventListener("change",schedule):mqDesktop.addListener(schedule),window.addEventListener("resize",schedule),document.addEventListener("visibilitychange",schedule),setInterval(schedule,1200);var mo=new MutationObserver(function(){var ok=cache.g&&cache.g.isConnected&&cache.s&&cache.s.isConnected&&cache.a&&cache.a.isConnected;ok||schedule()});mo.observe(document.documentElement,{childList:!0,subtree:!0}),schedule()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/53/assets/floating-widgets.js.map?v=96925251333548840541790029381

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.