PageSourceSearch

https://allergyresearchgroup.com/cdn/shop/t/53/assets/proteus-utils.js?v=123674682297214663681790029381

js allergyresearchgroup.com collected 2026-10-02 11:41:36 UTC 6,142 bytes, 2 lines download raw bytes

1window.proteus=window.proteus||{},proteus.cartAttributes_queue=[],proteus.cartAttributes_timer=null,proteus.cartAttributes_debounce_ms=2500,proteus.add_cartAttributes=attrs_array=>{!Array.isArray(attrs_array)||!attrs_array.length||(proteus.cartAttributes_queue.push(...attrs_array),clearTimeout(proteus.cartAttributes_timer),proteus.cartAttributes_timer=setTimeout(()=>{proteus.flush_cartAttributes()},proteus.cartAttributes_debounce_ms))},proteus.flush_cartAttributes=()=>{if(!proteus.cartAttributes_queue.length)return;const deduped={};proteus.cartAttributes_queue.forEach(pair=>{const[key]=pair.split("=");deduped[key]=pair});const body=Object.values(deduped).join("&");proteus.cartAttributes_queue=[],proteus.cartAttributes_timer=null,fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body}).then(res=>{if(!res.ok)throw new Error("Network response was not ok");return res.json()}).then(data=>{console.log("Cart attributes flushed:",data),window.cart_attributes_updated=!0}).catch(err=>{console.error("Failed to update cart:",err)})},proteus.add_cartAttribute=(attr_name,attr_val,multiple_attr_array=[])=>{if(proteus.cartAttributes_queue.push(`attributes[${attr_name}]=${attr_val}`),typeof attr_name=="string"&&attr_name.length){const value=attr_val==null?"":String(attr_val);proteus.cartAttributes_queue.push(`attributes[${encodeURIComponent(attr_name)}]=${encodeURIComponent(value)}`)}multiple_attr_array.length>0&&proteus.cartAttributes_queue.push(...multiple_attr_array),proteus.add_cartAttributes(proteus.cartAttributes_queue)},proteus.prep_cartAttributes_from_dl=(dl_event_partial="",dl_key="",dl_val="",attr_name_prefix="proteus-experimentation")=>{if(!(dl_event_partial==""||dl_key==""||dl_val=="")&&!(!Array.isArray(window.dataLayer)||window.dataLayer.length===0)){for(let i=0;i<window.dataLayer.length;i++){const dl_entry=window.dataLayer[i];if(!dl_entry?.event?.includes(dl_event_partial))continue;let attr_name=dl_entry[dl_key],attr_val=dl_entry[dl_val];attr_name_prefix!=""&&(attr_name=`${attr_name_prefix}-${dl_entry[dl_key].toLowerCase()}`,attr_val=`[${dl_entry[dl_key]}]${dl_entry[dl_val]}`),proteus.cartAttributes_queue.push(`attributes[${attr_name}]=${attr_val}`)}proteus.add_cartAttributes(proteus.cartAttributes_queue)}},proteus.get_cookie=name=>{try{var value="; "+document.cookie,parts=value.split("; "+name+"=");return parts.length==2?parts.pop().split(";").shift():null}catch(e){return console.error("Error in get_cookie:",e.message),"v0"}},proteus.set_cookie=(name,value,days)=>{try{var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);var expires="expires="+date.toUTCString();document.cookie=name+"="+value+";"+expires+";path=/;domain=.{{*Base URL}}"}catch(e){console.error("Error in set_cookie:",e.message)}},proteus.get_param=(name,optSearch)=>{"use strict";optSearch=optSearch||location.search,name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regex=new RegExp("[\\?&]"+name+"=([^&#]*)"),results=regex.exec(optSearch);return results===null?"":decodeURIComponent(results[1].replace(/\+/g," "))},proteus.wait_for_element=selector=>new Promise(function(resolve,reject){var element=document.querySelector(selector);if(element){resolve(element);return}var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){for(var nodes=Array.from(mutation.addedNodes),_i=0,_nodes=nodes;_i<_nodes.length;_i++){var node=_nodes[_i];if(node.matches&&node.matches(selector)){observer.disconnect(),resolve(node);return}}})});observer.observe(document.documentElement,{childList:!0,subtree:!0})}),proteus.request_anim_frame=window.requestAnimationFrame?window.requestAnimationFrame.bind(window):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame.bind(window):window.mozRequestAnimationFrame?window.mozRequestAnimationFrame.bind(window):function(callback){return window.setTimeout(callback,1e3/60)},proteus.wait_until=test=>new Promise(resolve=>{const poll=()=>{if(test())return resolve();window.proteus.request_anim_frame(poll)};poll()}),proteus.observe_selector=(selector,callback,options={timeout:null,once:!1,onTimeout:null,document:window.document})=>{var processed=new Map;
1(options.timeout||options.onTimeout)&&(console.log("------------------------------------------------------------------------------------------------------------------------------"),console.log("WARNING: observeSelector options timeout and onTimeout are not yet implemented."),console.log("------------------------------------------------------------------------------------------------------------------------------"));var obs,isDone=!1,done=function(){return obs||console.warn("observeSelector failed to run done()"),obs&&obs.disconnect(),processed=void 0,obs=void 0,isDone=!0},processElement=function(el){if(processed&&!processed.has(el)&&(processed.set(el,!0),callback(el),options.once))return done(),!0},lookForSelector=function(){var el=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(el.matches&&el.matches(selector)&&processElement(el))return!0;if(el.querySelectorAll){var elements=el.querySelectorAll(selector);if(elements.length)for(var i=0;i<elements.length;i++){var _el=elements[i];if(processElement(_el))return!0}}};return lookForSelector(),isDone||(obs=new MutationObserver(function(mutationsList){mutationsList.forEach(function(record){if(record&&record.addedNodes&&record.addedNodes.length)for(var i=0;i<record.addedNodes.length;i++){var el=record.addedNodes[i].parentElement;if(el&&lookForSelector(el))return!0}})}),obs.observe(options.document||document,{attributes:!1,childList:!0,subtree:!0})),function(){done()}},window.gtm_add_cartAttribute=proteus.add_cartAttribute,window.setCookie=proteus.set_cookie,window.getCookie=proteus.get_cookie,window.getParam=proteus.get_param,window.waitForElement=proteus.wait_for_element,window.requestAnimFrame=function(cb){return proteus.request_anim_frame(cb)},window.waitUntil=proteus.wait_until,window.observeSelector=proteus.observe_selector;
2//# sourceMappingURL=/cdn/shop/t/53/assets/proteus-utils.js.map?v=123674682297214663681790029381

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.