(function(){var v=340,r=document.createElement("script");if(r.src="https://config.gorgias.chat/gorgias-chat-bundle.js?rev=cfb74724&appKey=01GYCBQ52T74PY25QQYKA2DRQV",r.id="gorgias-chat-bundle",r.setAttribute("data-ot-ignore",""),window.GorgiasChat){console.warn("[GORGIAS-CHAT] Another chat was detected. Check that you did not add Gorgias chat snippet twice.",{chatSkipped:{appKey:"01GYCBQ52T74PY25QQYKA2DRQV",applicationId:"340"}});return}var l={get(e,o){if(o!="init"&&o!="resolve"&&o!="constructor"&&typeof o!="symbol")throw new Error('You are trying to use the Gorgias Chat API before its initialization (property or function "'+o+'")! Please use `GorgiasChat.init()`. Refer to our documentation https://docs.gorgias.com/gorgias-chat/advanced-customization-new-chat for more info.');let t=e[o];return typeof t=="function"?t.bind(e):t}};window.GorgiasChat=new Proxy({},l);var c=new Promise(function(e,o){window.GorgiasChat.resolve=e});window.GorgiasChat.init=function(){return c},console.log("[GORGIAS-CHAT] Loading chat 01GYCBQ52T74PY25QQYKA2DRQV..."),window.gorgiasChatPendingEvents=[];function d(){document.body.appendChild(r)}function h(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d):d()}try{var g={method:"hide-on-specific-pages",conditions:[{id:"36af90e4-de5d-4f5a-8857-2c27f065ed1b",value:"products/non-slip-ultralight-stretch-pillow",operator:"contain"}],matchConditions:"some"},u=function(o){var t,n,a;const i=o.startsWith("http"),s=new URL(i?o:"https://"+o);return((t=window.location.hostname)===null||t===void 0?void 0:t.toLowerCase().replace("//www.","//"))===s.hostname&&((n=window.location.pathname)===null||n===void 0?void 0:n.toLowerCase())===s.pathname&&((a=window.location.search)===null||a===void 0?void 0:a.toLowerCase())===s.search&&(!i||window.location.protocol===s.protocol)},w=function(o){var t,n;const a=(t=o.value)===null||t===void 0?void 0:t.toLowerCase().replace("//www.","//"),i=(n=window.location.href)===null||n===void 0?void 0:n.toLowerCase().replace("//www.","//");switch(o.operator){case"equal":return u(a);case"not-equal":return!u(a);case"contain":return i.includes(a);case"not-contain":return!i.includes(a)}},f=function(o){var t;if(!o||Object.keys(o).length===0||(o==null?void 0:o.method)==="show-on-every-page"||!((t=window.location.hostname)===null||t===void 0)&&t.includes("shopify-checkout"))return!0;if(!o.conditions||!o.matchConditions)return console.warn("Gorgias Chat visibility settings are invalid:",o),!0;const n=o.conditions[o.matchConditions](w);return o.method==="hide-on-specific-pages"?!n:n},p=f(g);p?h():console.warn("Gorgias Chat is not shown on this page because of the visibility settings.")}catch(e){console.warn("Gorgias Chat visibility settings are invalid.",e),h()}var C={get(e,o){if(o!="init")throw new Error("You are using the legacy `gorgiasChat` Chat API! Please use `GorgiasChat` instead. Refer to our documentation https://docs.gorgias.com/gorgias-chat/advanced-customization-new-chat for more info.");let t=e[o];return typeof t=="function"?t.bind(e):t}};window.gorgiasChat=new Proxy({},C),window.gorgiasChat.init=function(){return console.warn("You are using the legacy `gorgiasChat.init()` function, please use the new `GorgiasChat` chat API (`GorgiasChat.init()`). Refer to our documentation https://docs.gorgias.com/gorgias-chat/advanced-customization-new-chat for more info."),c}})();
