PageSourceSearch

https://slumberkins.com/cdn/shop/t/170/assets/patrol-modules.js?v=73390251117316908211789438579

js slumberkins.com collected 2026-09-24 11:20:43 UTC 9,749 bytes, 1 lines download raw bytes

1!function(){"use strict";function t(){const t=window;return function(t){if(!t)throw new Error("Invariant failed")}(t.Shopify),t.Shopify}function e(){const t=window;if(t.__patrolConsentRequested)return;if(function(){const t=new URLSearchParams(window.location.search).get("patrolConsent")||sessionStorage.getItem("patrol_consent");return"false"===t?(sessionStorage.setItem("patrol_consent","false"),!0):("true"===t&&sessionStorage.setItem("patrol_consent","true"),!1)}())return;const e=function(){const t=new URLSearchParams(window.location.search).get("devEmail");return t?(sessionStorage.setItem("dev_email",t),t):sessionStorage.getItem("dev_email")}(),n="true"===new URLSearchParams(window.location.search).get("patrolConsentPreview")?(sessionStorage.setItem("patrol_consent_preview","true"),!0):"true"===sessionStorage.getItem("patrol_consent_preview"),o=!0===window.__patrolConsentPopupActive;(e||n||o)&&(!o||e||n||void 0!==window.__patrolCipa)&&(t.__patrolConsentRequested=!0,function(t){t&&(window.__patrolDevEmail=t);const e=document.createElement("script");e.src="/apps/patrol/serveConsentPopupScript"+(t?`?devEmail=${encodeURIComponent(t)}`:""),e.async=!0,e.onerror=()=>{window.__patrolConsentRequested=!1},document.head.appendChild(e)}(e))}function n(){(function(){const t=new URLSearchParams(window.location.search).get("patrolPreview")||sessionStorage.getItem("patrol_preview");return"false"===t?(sessionStorage.setItem("patrol_preview","false"),!1):"true"===t&&(sessionStorage.setItem("patrol_preview","true"),!0)})()&&function(){const t=new URLSearchParams(window.location.search).get("devEmail")||sessionStorage.getItem("dev_email"),e=document.createElement("script");e.src="/apps/patrol/servePreviewWindowScript"+(t?"?devEmail="+t:""),e.async=!0,e.onerror=t=>{},e.onload=()=>{},document.head.appendChild(e)}()}function o(){const t=document.querySelectorAll("a[href^='#data-patrol-id-']");for(const e of t){const t=(e.getAttribute("href")||"").match(/^#data-patrol-id-(.+)$/);if(!t)continue;const n=t[1],o=e.parentElement;if(!o)continue;const r=[o,...o.querySelectorAll("*")];for(const e of r)e instanceof HTMLElement&&(e.dataset.patrolId=n);e.remove()}}const r=/data-patrol-id(?:=(?:"[^"]*"|'[^']*'|[^\s>%]*))\s?/g;function a(){!function(){const t=document.querySelectorAll("style");for(const e of t){const t=e.textContent;t&&t.includes("data-patrol-id")&&(e.textContent=t.replace(r,""))}}(),function(){for(const t of document.styleSheets){if(!t.href)continue;let e;try{e=t.cssRules}catch{continue}for(let n=0;n<e.length;n++){const o=e[n];if(!o.cssText.includes("data-patrol-id"))continue;const a=o.cssText.replace(r,"");try{t.deleteRule(n),t.insertRule(a,n)}catch{}}}}(),new MutationObserver(t=>{for(const e of t){if("childList"===e.type){e.target instanceof HTMLStyleElement&&i(e.target);for(const t of e.addedNodes)if(t instanceof HTMLStyleElement&&i(t),t instanceof HTMLLinkElement&&"stylesheet"===t.rel&&t.addEventListener("load",()=>{s(t)}),t instanceof HTMLElement){for(const e of t.querySelectorAll("style"))i(e);for(const e of t.querySelectorAll("link[rel='stylesheet']"))e.addEventListener("load",()=>{s(e)})}}"characterData"===e.type&&e.target.parentElement instanceof HTMLStyleElement&&i(e.target.parentElement),"attributes"===e.type&&e.target instanceof HTMLLinkElement&&e.target.relList.contains("stylesheet")&&(e.target.sheet?s(e.target):e.target.addEventListener("load",()=>{s(e.target)},{once:!0}))}}).observe(document.documentElement,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["href","rel"]})}function i(t){const e=t.textContent;e&&e.includes("data-patrol-id")&&(t.textContent=e.replace(r,""))}function s(t){const e=t.sheet;if(!e)return;let n;try{n=e.cssRules}catch{return}for(let o=0;o<n.length;o++){const t=n[o];if(!t.cssText.includes("data-patrol-id"))continue;const a=t.cssText.replace(r,"");try{e.deleteRule(o),e.insertRule(a,o)}catch{}}}const c=[{attribute:"data-patrol-product-id",gidPrefix:"gid://shopify/Product/"},{attribute:"data-patrol-page-id",gidPrefix:"gid://shopify/Page/"},{attribute:"data-patrol-article-id",gidPrefix:"gid://shopify/Article/"}],l=c.map(({attribute:t})=>`[${t}]:not(script)`).join(", "),d=c.map(({attribute:t})=>t);function u(){let t=!1;const e=new Set;return async function(){if(t)return;const n=window.location.pathname,o=function(){const t=document.querySelectorAll(l),e=new Map;for(const n of t)for(const{attribute:t,gidPrefix:o}of c){const r=n.getAttribute(t);if(r){e.set(o+r,n);break}}return e}();try{t=!0;
1const r=new URLSearchParams(window.location.search).get("devEmail"),a=await fetch("/apps/patrol/getPreviewContent?"+(r?"devEmail="+r:""),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pathname:n})});if(!a.ok)throw new Error("Failed to fetch preview content");const i=await a.json();if(i.newContent&&i.contentId){const t=i.contentId.split("/").pop(),n=o.get(i.contentId);if(n&&!e.has(n)){const o=function(){const t=window;return t.patrolContentUpdates??(t.patrolContentUpdates={}),t.patrolContentUpdates}();t&&(o[t]=i),n.innerHTML=i.newContent,e.add(n)}}}catch(r){}finally{t=!1}}}function p(t){let e=null;new MutationObserver(n=>{e&&clearTimeout(e),function(t){return t.some(t=>{if("attributes"===t.type){const e=t.attributeName;return null!==e&&d.includes(e)}return"childList"===t.type&&Array.from(t.addedNodes).some(t=>t instanceof HTMLElement&&d.some(e=>t.hasAttribute(e)))})}(n)&&(e=setTimeout(t,500))}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[...d]})}function f(){if("false"===new URLSearchParams(window.location.search).get("previewContentFixes"))return;const t=u();"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{t()}):t(),p(()=>{t()})}function m(t){const e=(t.className||"").split(/\s+/).filter(t=>t),n=e.find(t=>/^data-patrol-id-[a-f0-9]+-\d+$/.test(t));if(!n)return;const o=n.replace(/^data-patrol-id-/,"");t.dataset.patrolId=o;const r=e.filter(t=>t!==n);r.length>0?t.className=r.join(" "):t.removeAttribute("class")}function h(t){for(const e of t){if("childList"===e.type)for(const t of e.addedNodes){if(!(t instanceof HTMLElement))continue;t instanceof HTMLImageElement&&t.className&&t.className.includes("data-patrol-id-")&&m(t);const e=t.querySelectorAll("img[class*='data-patrol-id-']");for(const t of e)m(t)}if("attributes"===e.type&&e.target instanceof HTMLImageElement&&"class"===e.attributeName){const t=e.target;t.className&&t.className.includes("data-patrol-id-")&&m(t)}}}function w(){const t=document.querySelectorAll("img[class*='data-patrol-id-']");for(const e of t)m(e);new MutationObserver(h).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}const g=["data-patrol-article-id","data-patrol-product-id","data-patrol-page-id"],b=g.map(t=>`[${t}]`).join(", ");function y(t){const e={};for(const o of g){const n=t.getAttribute(o);n&&(e[o]=n)}if(0===Object.keys(e).length)return;const n=t.querySelectorAll("*");for(const o of n)for(const[t,n]of Object.entries(e))o.hasAttribute(t)||o.setAttribute(t,n)}function v(t){let e=t;for(;e&&e!==document.body;){if(g.some(t=>e.hasAttribute(t)))return e;e=e.parentElement}return null}function S(t,e){const n={};for(const r of g){const e=t.getAttribute(r);e&&(n[r]=e)}const o=[e,...e.querySelectorAll("*")];for(const r of o)for(const[t,e]of Object.entries(n))r.hasAttribute(t)||r.setAttribute(t,e)}function L(t){for(const e of t){if("childList"===e.type)for(const t of e.addedNodes){if(!(t instanceof HTMLElement))continue;const e=v(t);e&&S(e,t),g.some(e=>t.hasAttribute(e))&&y(t)}if("attributes"===e.type&&e.target instanceof HTMLElement){const t=e.attributeName;t&&g.includes(t)&&y(e.target)}}}function E(){!function(){const t=document.querySelectorAll(b);for(const e of t)y(e)}();new MutationObserver(L).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[...g]})}!async function(){e();const r=function(){const t=window;return t.$patrol??(t.$patrol={injected:!1}),t.$patrol}();if(r.injected)return;r.injected=!0,function(t){if(document.querySelector(`link[href$="${t}"]`))return;const e=document.createElement("style");e.textContent='/* @patrol-core-begin — DO NOT EDIT: All changes in this block will be overwritten by Patrol */\n.patrol-sr-only {\n  position: absolute;\n  left: 0;\n  top: 0;\n  margin: -1px;\n  border: 0;\n  padding: 0;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n.patrol-unstyled-list {\n  list-style: inherit;\n  padding: 0;\n  margin: 0;\n}\na:not([target="_blank"]) > span.patrol-blank-target {\n  /* Hide New Window Span when applied incorrectly */\n  display: none;\n}\nstrong.patrol-semantic-bold {\n  font-weight: inherit;\n}\n.patrol-skip-link {\n  position: absolute !important;\n  left: -1000px !important;\n  width: 1px !important;\n  height: 1px !important;\n  overflow: hidden !important;\n}\n.patrol-skip-link:focus {\n  left: 0 !important;\n  top: 0 !important;\n  width: fit-content !important;\n  background: #ffffff !important;\n  color: #111111 !important;\n  padding: 5px !important;\n  height: auto !important;\n  overflow: visible !important;\n  z-index: 2147483647 !important;\n  border: 2px solid blue !important;\n  border-radius: 10px !important;\n}\n/* @patrol-core-end */\n/* Richtext-scoping wrapper injected around render/include bodies whose parent\n   is not an element; must not affect layout, so it generates no box. */\n[data-patrol-temp-element] {\n  display: contents;\n}\n',document.head.appendChild(e)}("patrol-styles.css");const{theme:i}=t();"unpublished"===i.role&&i.name.includes("Patrol Preview Theme")&&(a(),f(),n(),setTimeout(w,1e3),setTimeout(o,1e3),setTimeout(E,500))}()}();

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.