PageSourceSearch

https://www.ghostbed.com/_next/static/chunks/0necmy0c9f9jr.js?dpl=dpl_GjXp6HAn3aGr7ynRfYm3Wk9ReYKm

js ghostbed.com collected 2026-10-01 10:42:04 UTC 33,454 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,483029,e=>{"use strict";e.s(["addDataIf",0,function(e,t){return"object"!=typeof e?{}:(Object.entries(e).forEach(([e,r])=>{r&&(t[e]=r)}),t)},"errorIfServer",0,function(e){return"u"<typeof document&&(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0)},"parseGid",0,function(e){let t={id:"",resource:null,resourceId:null,search:"",searchParams:new URLSearchParams,hash:""};if("string"!=typeof e)return t;try{let{search:r,searchParams:n,pathname:i,hash:a}=new URL(e),o=i.split("/"),c=o[o.length-1],d=o[o.length-2];if(!c||!d)return t;return{id:`${c}${r}${a}`||"",resource:d??null,resourceId:c||null,search:r,searchParams:n,hash:a}}catch{return t}},"schemaWrapper",0,function(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}])},934336,264261,431277,574227,73871,948337,e=>{"use strict";e.i(247167);var t=e.i(483029);function r(e){return e.attributes.some(e=>"_autoAdded"===e.key&&"true"===e.value)}e.s(["isAutoAdded",0,r],264261);let n="bundle=";function i(e){return e.attributes.some(e=>"_warranty_offer_id"===e.key&&""!==e.value)}function a(e){let t=e.attributes.find(e=>"_variantId"===e.key);return t?.value?(t.value.startsWith(n)?t.value.slice(n.length):t.value).split(",").map(e=>e.trim()).filter(e=>e.length>0):[]}function o(e){return(0,t.parseGid)(e).id}function c(e,t){return{...e,quantity:t}}function d(e){let t=e.filter(e=>!r(e));return 0===t.length?null:t.find(e=>!i(e))??t[0]}e.s(["cartLineVariantId",0,function(e){return o(e.merchandise.id)},"isMulberryPlanLine",0,i,"mulberryCoveredVariantIds",0,function(e){let t=new Set;for(let r of e)if(i(r))for(let e of a(r))t.add(e);return t},"mulberryPlanLinesByParentLineId",0,function(e){let t=new Map,n=e.filter(e=>!i(e)&&e.quantity>0);for(let c of e){if(!i(c))continue;let e=a(c).find(e=>n.some(t=>o(t.merchandise.id)===e));if(void 0===e)continue;let d=n.filter(t=>o(t.merchandise.id)===e),s=d.find(e=>!r(e))??d[0],l=t.get(s.id);l?l.push(c):t.set(s.id,[c])}return t},"mulberryPlanParentTitles",0,function(e,t){let r=a(e);if(0===r.length)return[];let n=t.filter(e=>!i(e)&&e.quantity>0),c=[],d=new Set;for(let e of r){let t=n.find(t=>o(t.merchandise.id)===e);!t||d.has(t.merchandise.product.title)||(d.add(t.merchandise.product.title),c.push(t.merchandise.product.title))}return c},"parseMulberryPlanParentIds",0,a],431277),e.s(["diffCarts",0,function(e,t){let r=[],n=[],i=new Map((e?.lines??[]).map(e=>[e.id,e])),a=new Set(t.lines.map(e=>e.id));for(let e of t.lines){let t=i.get(e.id);if(!t){r.push(e);continue}let a=e.quantity-t.quantity;a>0?r.push(c(e,a)):a<0&&n.push(c(e,-a))}for(let t of e?.lines??[])a.has(t.id)||n.push(t);return{added:r,removed:n}},"primaryCustomerAddedLine",0,d],574227);var s=e.i(175379);let l="https://www.ghostbed.com";function u(e,t){if(window.klaviyo)try{if("function"==typeof window.klaviyo.track)return void window.klaviyo.track(e,t);window._klOnsite?.push(["track",e,t])}catch{}}function p(e){let r=Number(e.merchandise.price.amount);return{ProductID:Number((0,t.parseGid)(e.merchandise.product.id).id),SKU:e.merchandise.sku??"",ProductName:e.merchandise.product.title,Quantity:e.quantity,ItemPrice:r,RowTotal:r*e.quantity,ProductURL:`${l}/products/${e.merchandise.product.handle}`,ImageURL:e.merchandise.product.featuredImage?.url??""}}function m(e){if(window.klaviyo)try{if("function"==typeof window.klaviyo.identify)return void window.klaviyo.identify(e);window._klOnsite?.push(["identify",e])}catch{}}async function f(e,t){if(!t){if(window.klaviyo&&"function"==typeof window.klaviyo.identify)return void window.klaviyo.identify({email:e});throw Error("Klaviyo not loaded on this page")}let r=await fetch("https://a.klaviyo.com/client/subscriptions/?company_id=K8eYQ2",{method:"POST",headers:{"Content-Type":"application/json",revision:"2024-02-15"},body:JSON.stringify({data:{type:"subscription",attributes:{custom_source:"Website Signup Form",profile:{data:{type:"profile",attributes:{email:e}}}},relationships:{list:{data:{type:"list",id:t}}}}})});if(!r.ok&&202!==r.status){let e="Subscription failed";try{let t=await r.json();e=t?.errors?.[0]?.detail||e}catch{}throw Error(e)}}e.s(["SITE_URL",0,l],73871),e.s(["KLAVIYO_NEWSLETTER_LIST_IDS",0,{US:"HrKRGA",CA:"LjVpkL"},"klaviyoAddedToCart",0,function(e,r){let n=d(e);n&&u("Added to Cart",{$value:Number(r.cost.totalAmount.amount),AddedItemProductName:n.merchandise.product.title,AddedItemProductID:Number((0,t.parseGid)(n.merchandise.product.id).id),AddedItemSKU:n.merchandise.sku??"",AddedItemImageURL:n.merchandise.product.featuredImage?.url??"",AddedItemURL:`${l}/products/${n.merchandise.product.handle}`,AddedItemPrice:Number(n.merchandise.price.amount),AddedItemQuantity:n.quantity,ItemNames:r.lines.map(e=>e.merchandise.product.title),CheckoutURL:r.checkoutUrl,Items:r.lines.map(p)})},"klaviyoQuizCompleted",0,function(e,t){t&&m({$email:t.email,$first_name:t.name,...{"Quiz: Recommended Mattress":e.recommendedMattress,"Quiz: Recommended URL":e.recommendedUrl,"Quiz: Purchase Timing":e.purchaseTiming,"Quiz: Budget":e.budget,"Quiz: Sleep Temperature":e.sleepTemperature,"Quiz: Firmness Preference":e.firmnessPreference,"Quiz: Mattress Type":e.mattressType,"Quiz: Sleeper Type":e.sleeperType,"Quiz: Most Important Feature":e.mostImportant,"Quiz: Challenges":e.sleepIssues,"Quiz: Is Complete":e.isComplete}}),u("Quiz - Completed",{...e})},"klaviyoQuizEnteredEmail",0,function(e,t){m({$email:t,$first_name:e}),u("Quiz - Entered Email",{name:e,email:t})},"klaviyoSubscribe",0,f,"klaviyoTrackViewedItem",0,function(e,r){let n=r.compareAtPrice??r.price;if(!window.klaviyo)return;let i={Title:e.title,ItemId:Number((0,t.parseGid)(e.id).id),Categories:e.collectionTitles,ImageUrl:e.images[0]?.url??r.image?.url??"",Url:`${l}/products/${e.handle}`,Metadata:{Brand:"GhostBed",Price:(0,s.formatMoneyExact)(r.price),CompareAtPrice:(0,s.formatMoneyExact)(n)}};try{if("function"==typeof window.klaviyo.trackViewedItem)return void window.klaviyo.trackViewedItem(i);window._klOnsite?.push(["trackViewedItem",i])}catch{}},"klaviyoViewedProduct",0,function(e,r){let n=r.compareAtPrice??r.price;u("Viewed Product",{Name:e.title,ProductID:Number((0,t.parseGid)(e.id).id),Categories:e.collectionTitles,ImageURL:e.images[0]?.url??r.image?.url??"",URL:`${l}/products/${e.handle}`,Brand:"GhostBed",Price:(0,s.formatMoneyExact)(r.price),CompareAtPrice:(0,s.formatMoneyExact)(n)})},"loadKlaviyo",0,function(e){if(!e)return;window.klaviyo||(window._klOnsite=window._klOnsite??[],window.klaviyo=new Proxy({},{get:(e,t)=>(...e)=>{window._klOnsite?.push([t,...e])}}));let t=`https://static.klaviyo.com/onsite/js/${e}/klaviyo.js`;if(document.querySelector(`script[src="${t}"]`))return;let r=document.createElement("script");r.src=t,r.async=!0,document.head.appendChild(r)}],934336);let h="triple-pixel-loader";function y(e,t){let r=window.TriplePixel;if("function"==typeof r)try{r(e,t)}catch{}}function w(e){e&&y("Contact",{email:e})}let g=!1;e.s(["loadTriplePixel",0,function(e){if(!e||document.getElementById(h))return;let t=document.createElement("script");t.id=h,t.text=`window.TriplePixelData={TripleName:"${e}",ver:"2.17",plat:"SHOPIFY",isHeadless:true},function(W,H,A,L,E,_,B,N){function O(U,T,P,H,R){void 0===R&&(R=!1),H=new XMLHttpRequest,P?(H.open("POST",U,!0),H.setRequestHeader("Content-Type","text/plain")):H.open("GET",U,!0),H.send(JSON.stringify(P||{})),H.onreadystatechange=function(){4===H.readyState&&200===H.status?(R=H.responseText,U.includes("/first")?eval(R):P||(N[B]=R)):(299<H.status||H.status<200)&&T&&!R&&(R=!0,O(U,T-1,P))}}if(N=window,!N[H+"sn"]){N[H+"sn"]=1,L=function(){return Date.now().toString(36)+"_"+Math.random().toString(36)};try{A.setItem(H,1+(0|A.getItem(H)||0)),(E=JSON.parse(A.getItem(H+"U")||"[]")).push({u:location.href,r:document.referrer,t:Date.now(),id:L()}),A.setItem(H+"U",JSON.stringify(E))}catch(e){}var i,m,p;A.getItem('"!nC\`')||(_=A,A=N,A[H]||(E=A[H]=function(t,e,a){return void 0===a&&(a=[]),"State"==t?E.s:(W=L(),(E._q=E._q||[]).push([W,t,e].concat(a)),W)},E.s="Installed",E._q=[],E.ch=W,B="configSecurityConfModel",N[B]=1,O("https://conf.config-security.com/model",5),i=L(),m=A[atob("c2NyZWVu")],_.setItem("di_pmt_wt",i),p={id:i,action:"profile",avatar:_.getItem("auth-security_rand_salt_"),time:m[atob("d2lkdGg=")]+":"+m[atob("aGVpZ2h0")],host:A.TriplePixelData.TripleName,plat:A.TriplePixelData.plat,url:window.location.href.slice(0,500),ref:document.referrer,ver:A.TriplePixelData.ver},O("https://api.config-security.com/event",5,p),O("https://api.config-security.com/first?host=${e}&plat=SHOPIFY",5)))}}("","TriplePixel",localStorage);`,document.head.appendChild(t),g||(g=!0,window.addEventListener("klaviyoForms",e=>{let t=e.detail;if(!t||"submit"!==t.type&&"stepSubmit"!==t.type)return;let r=t.metaData?.$email;"string"==typeof r&&w(r)}))},"triplePixelAddToCart",0,function(e,n){let i=(n.id.split("/").pop()??"").split("?")[0]??"";for(let n of e)r(n)||y("AddToCart",{item:(0,t.parseGid)(n.merchandise.product.id).id,q:n.quantity,v:(0,t.parseGid)(n.merchandise.id).id,...i?{token:i}:{}})},"triplePixelContact",0,w],948337)}
1,260742,415307,487468,538182,921739,392854,76982,e=>{"use strict";var t=e.i(843476),r=e.i(500932),n=e.i(271645),i="_shopify_y",a="_shopify_s",o={current:null};function c(){let e;if("u">typeof window&&void 0!==window.performance)try{let t,r=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/,n=performance.getEntriesByType("resource");for(let e=n.length-1;e>=0;e--){let i=n[e];if("fetch"!==i.initiatorType)continue;let a=window.location.host,o=i.name.match(r);if(!o)continue;let[,c,s]=o;if(c===a||s&&c?.endsWith(`.${a}`)){let e=d(i);if(e){t=e;break}}}if(t&&(e=t),e?o.current=e:o.current&&(e=o.current),!e){let t=performance.getEntriesByType("navigation")[0];e=d(t,!1)}}catch{}if(!e){let t="string"==typeof arguments[0]?arguments[0]:"u">typeof document?document.cookie:"";e={uniqueToken:t.match(/\b_shopify_y=([^;]+)/)?.[1]||"",visitToken:t.match(/\b_shopify_s=([^;]+)/)?.[1]||"",consent:t.match(/\b_tracking_consent=([^;]+)/)?.[1]||""}}return e}function d(e,t=!0){let r="",n="",i="",a=e.serverTiming;if(a&&a.length>=3)for(let e=a.length-1;e>=0;e--){let{name:t,description:o}=a[e];if(t&&o&&("_y"===t?r=o:"_s"===t?n=o:"_cmp"===t&&(i=o),r&&n&&i))break}return r&&n&&(!t||i)?{uniqueToken:r,visitToken:n,consent:i}:void 0}var s="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function l(){let e="";try{let t=window.crypto,r=new Uint16Array(31);t.getRandomValues(r);let n=0;e=s.replace(/[x]/g,e=>{let t=r[n]%16;return n++,("x"===e?t:3&t|8).toString(16)}).toUpperCase()}catch(t){e=s.replace(/[x]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}).toUpperCase()}return`${function(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch(e){t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}()}-${e}`}function u(e,t,r,n){document.cookie=function(e,t,r={}){let n=e+"="+encodeURIComponent(t);return r.expires&&(n+="; Expires="+new Date(r.expires).toUTCString()),null!=r.maxage&&r.maxage>=0&&(n+="; Max-Age="+(0|r.maxage)),r.domain&&(n+="; Domain="+r.domain),r.path&&(n+="; Path="+r.path),r.samesite&&(n+="; SameSite="+r.samesite),(r.secure||"None"===r.samesite)&&(n+="; Secure"),r.httponly&&(n+="; HttpOnly"),n}(e,t,{maxage:r,domain:n,samesite:"Lax",path:"/"})}async function p(e,t=""){let{uniqueToken:r,visitToken:n}=c(),i=await fetch(`${t.replace(/\/+$/,"")}/api/unstable/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json",...e&&{"X-Shopify-Storefront-Access-Token":e},...n||r?{"X-Shopify-VisitToken":n,"X-Shopify-UniqueToken":r}:void 0},body:JSON.stringify({query:"query ensureCookies { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }"})});if(!i.ok)throw Error(`Failed to fetch consent from browser: ${i.status} ${i.statusText}`);await i.json(),c()}let m="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.1/consent-tracking-api.js";function f(){let e=window.Shopify?.customerPrivacy;return e?{analyticsAllowed:e.analyticsProcessingAllowed?.()??!0,marketingAllowed:e.marketingAllowed?.()??!0,saleOfDataAllowed:e.saleOfDataAllowed?.()??!0}:{analyticsAllowed:!0,marketingAllowed:!0,saleOfDataAllowed:!0}}var h="ADD_TO_CART",y="PAGE_VIEW_2",w="COLLECTION_VIEW",g="PRODUCT_VIEW",v="SEARCH_VIEW",_="collection",k="product",I="search",b="headless",T={hydrogen:"6167201",headless:"12875497473"},E=e.i(483029);function S(e){var t;let{id:r,resource:n}=(0,E.parseGid)(e.resourceId),i=n?n.toLowerCase():void 0;return[(0,E.schemaWrapper)("trekkie_storefront_page_view/1.4",(0,E.addDataIf)({pageType:e.pageType,customerId:parseInt((0,E.parseGid)(e.customerId).id||"0"),resourceType:i,resourceId:parseInt(r)},{appClientId:(t=e).shopifySalesChannel?T[t.shopifySalesChannel]:T.headless,isMerchantRequest:function(e){if("string"!=typeof e)return!1;let t=new URL(e).hostname;return -1!==t.indexOf("myshopify.dev")||"localhost"===t}(t.url),hydrogenSubchannelId:t.storefrontId||t.hydrogenSubchannelId||"0",isPersistentCookie:t.hasUserConsent,uniqToken:t.uniqueToken,visitToken:t.visitToken,microSessionId:l(),microSessionCount:1,url:t.url,path:t.path,search:t.search,referrer:t.referrer,title:t.title,shopId:parseInt((0,E.parseGid)(t.shopId).id),currency:t.currency,contentLanguage:t.acceptedLanguage||"en"}))]}var A="custom_storefront_customer_tracking/1.2",C="page_rendered",P="collection_page_rendered",x="product_page_rendered",q="search_submitted";function N(e){return{canonical_url:e.canonicalUrl||e.url,customer_id:parseInt((0,E.parseGid)(e.customerId).id||"0")}}function U(e){return{source:e.shopifySalesChannel||b,asset_version_id:e.assetVersionId||"2026.4.3",hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",is_persistent_c
1ookie:e.hasUserConsent,deprecated_visit_token:e.visitToken,unique_token:e.uniqueToken,event_time:Date.now(),event_id:l(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt((0,E.parseGid)(e.shopId).id),currency:e.currency,ccpa_enforced:e.ccpaEnforced||!1,gdpr_enforced:e.gdprEnforced||!1,gdpr_enforced_as_string:e.gdprEnforced?"true":"false",analytics_allowed:e.analyticsAllowed||!1,marketing_allowed:e.marketingAllowed||!1,sale_of_data_allowed:e.saleOfDataAllowed||!1}}function G(e){return e?e.map(e=>JSON.stringify((0,E.addDataIf)({variant_gid:e.variantGid,category:e.category,sku:e.sku,product_id:parseInt((0,E.parseGid)(e.productGid).id),variant_id:parseInt((0,E.parseGid)(e.variantGid).id)},{product_gid:e.productGid,name:e.name,variant:e.variantName||"",brand:e.brand,price:parseFloat(e.price),quantity:Number(e.quantity||0)}))):[]}function L(e,t){let{eventName:r,payload:n}=e;if(!n.hasUserConsent)return Promise.resolve();let i=[];if("PAGE_VIEW"===r)i=i.concat(S(n),function(e){let t=N(e),r=e.pageType,n=[];switch(n.push((0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:C,...t},U(e)))),r){case _:n.push((0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:P,...t,collection_name:e.collectionHandle,collection_id:parseInt((0,E.parseGid)(e.collectionId).id)},U(e))));break;case k:n.push((0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:x,...t,products:G(e.products),total_value:e.totalValue},U(e))));break;case I:n.push((0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:q,...t,search_string:e.searchString},U(e))))}return n}(n));else if(r===h){let e;i=i.concat((e=(0,E.parseGid)(n.cartId),[(0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:"product_added_to_cart",customerId:n.customerId,cart_token:e?.id?`${e.id}`:null,total_value:n.totalValue,products:G(n.products),customer_id:parseInt((0,E.parseGid)(n.customerId).id||"0")},U(n)))]))}else r===y?i=i.concat(S(n),[(0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:C,...N(n)},U(n)))]):r===w?i=i.concat([(0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:P,...N(n),collection_name:n.collectionHandle,collection_id:parseInt((0,E.parseGid)(n.collectionId).id)},U(n)))]):r===g?i=i.concat([(0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:x,...N(n),products:G(n.products),total_value:n.totalValue},U(n)))]):r===v&&(i=i.concat([(0,E.schemaWrapper)(A,(0,E.addDataIf)({event_name:q,...N(n),search_string:n.searchString},U(n)))]));return i.length?function(e,t){if(!("u"<typeof window)&&window.navigator&&/Chrome-Lighthouse/.test(window.navigator.userAgent))return Promise.resolve();let r={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(r)}).then(e=>{if(!e.ok)throw Error("Response failed");return e.text()}).then(e=>{e&&JSON.parse(e).result.forEach(e=>{200!==e.status&&console.error($,"\n\n",e.message)})}).catch(e=>{console.error($,e)})}catch(e){return Promise.resolve()}}(i,t):Promise.resolve()}var $="sendShopifyAnalytics request is unsuccessful";function R(e){let t=f();return{...function(){if((0,E.errorIfServer)("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};let[e,t]=function(){try{let e="PerformanceNavigationTiming",t=function(){try{let e=performance?.getEntriesByType&&performance?.getEntriesByType("navigation");if(e&&e[0]){let e=window.performance.getEntriesByType("navigation")[0].type;return e&&e.toString()}}catch(e){}}();if(t||(t=function(){try{if(PerformanceNavigation&&performance?.navigation?.type!==null&&performance?.navigation?.type!==void 0){let e=performance.navigation.type;switch(e){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${e}`}}}catch(e){}}(),e="performance.navigation"),t)return[t,e];return["unknown","unknown"]}catch(e){}return["error","error"]}(),r=c();return{uniqueToken:r.uniqueToken,visitToken:r.visitToken,url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}(),hasUserConsent:t.analyticsAllowed,analyticsAllowed:t.analyticsAllowed,marketingAllowed:t.marketingAllowed,saleOfDataAllowed:t.saleOfDataAllowed,shopId:e.shopId,currency:e.currency,shopifySalesChannel:b,acceptedLanguage:"EN"}}function D(e){return e.checkoutDomain||void 0}let O="sendShopifyAnalytics request is unsuccessful",V=new Set;function W(e,t){V.has(e)||(V.add(e),console.debug(`shopify analytics ${e} beacon not sent (network-blocked: ad blocker, offline, or dev) — further occurrences suppressed`,t))}function H(e){return t=>{t instanceof TypeError||t instanceof Error&&t.message===O?W(e,t):console.error(`shopify analytics ${e} failed`,t)}}let B=!1,M=[{prefix:O,label:"monorail (library-internal)"},{prefix:"[MulberryJS]:: Customer located outside of covered jurisdictions",label:"mulberry (geo-block, documented account config)"},{prefix:"GET /claimed-rewards/",label:"alia (origin-gated off-domain, resolves at cutover)"},{prefix:"The configuration for accessWidget is being loaded from the dashboard",label:"accessibe (dashboard settings override the inline init config, documented)"}];function j(){if(B)return;B=!0;let e=e=>(...t)=>{let r=t[0];if("string"==typeof r){let e=M.find(e=>r.startsWith(e.prefix));if(e)return void W(e.label,t.length>1?t[1]:r)}e(...t)};console.error=e(console.error.bind(console)),console.warn=e(console.warn.bind(console)),window.addEventListener("unhandledrejection",e=>{let t=function(e){let t=e instanceof Error?e.stack:void 0;if(t)return K.find(e=>t.includes(e.host))}(e.reason);t&&(e.preventDefault(),W(t.label,e.reason))})}let K=[{host:"backend.alia-prod.com",label:"alia (origin-gated off-domain, unhandled rejection)"}];e.s(["installMonorailConsoleFilter",0,j,"trackAddToCart",0,function(e,t,r=[]){L({eventName:h,payload:{...R(e),cartId:t,...r.length>0&&{products:r,totalValue:r.reduce((e,t)=>
1e+Number(t.price)*(t.quantity??1),0)}}},D(e)).catch(H("add to cart"))},"trackCollectionView",0,function(e,t){L({eventName:w,payload:{...R(e),pageType:_,collectionHandle:t.collectionHandle,collectionId:t.collectionId,resourceId:t.collectionId}},D(e)).catch(H("collection view"))},"trackPageView",0,function(e,t={}){var r;let n={...R(e),pageType:"/"===(r=t.pathOverride??window.location.pathname)?"index":r.startsWith("/products/")?k:r.startsWith("/collections/")?_:"/collections"===r?"list-collections":r.startsWith("/search")?I:(r.startsWith("/pages/"),"page")};if(t.pathOverride){n.path=t.pathOverride;try{let e=new URL(n.url);e.pathname=t.pathOverride,n.url=e.toString()}catch{n.url=t.pathOverride}}L({eventName:y,payload:n},D(e)).catch(H("page view"))},"trackProductView",0,function(e,t){L({eventName:g,payload:{...R(e),products:t,totalValue:t.reduce((e,t)=>e+Number(t.price)*(t.quantity??1),0)}},D(e)).catch(H("product view"))},"trackSearchView",0,function(e,t){L({eventName:v,payload:{...R(e),pageType:I,searchString:t}},D(e)).catch(H("search view"))}],415307);var Q=e.i(934336),z=e.i(574227),F=e.i(175379),J=e.i(64114),Y=e.i(73871);let X=["page","suppress","track","doNotTrack","shopify_vp","shopify_atc","shopify_checkout_started","shopify_order"];function Z(e){if(!e)return;!function(){if(window.geq)return;let e=[];for(let t of(e.methods=[...X],X))e[t]=(...r)=>(e.push([t,...r]),e);window.geq=e}();let t=`https://s3-us-west-2.amazonaws.com/jsstore/a/${e}/re_utils.js`;document.querySelector(`script[src="${t}"]`)||(0,J.whenIdle)(()=>{if(document.querySelector(`script[src="${t}"]`))return;let e=document.createElement("script");e.src=t,e.async=!0,document.head.appendChild(e)})}function ee(e,...t){let r=window.geq;if(!r)return;let n=r[e];if("function"==typeof n)try{n.apply(r,t)}catch{}}function et(e){return"function"==typeof window.geq?.[e]}e.s(["loadRetention",0,Z,"retentionAddedToCart",0,function(e){let t=(0,z.primaryCustomerAddedLine)(e);if(!t)return;let r=t.merchandise.product.featuredImage?.url??"";et("shopify_atc")?ee("shopify_atc",{customData:{data:{cartLine:{merchandise:{id:(0,E.parseGid)(t.merchandise.id).id,title:t.merchandise.title,price:{amount:Number(t.merchandise.price.amount),currencyCode:t.merchandise.price.currencyCode},...r?{image:{src:r}}:{},product:{id:(0,E.parseGid)(t.merchandise.product.id).id,title:t.merchandise.product.title,url:`/products/${t.merchandise.product.handle}`}},quantity:t.quantity}}},context:{window:{location:{href:window.location.href}}}}):ee("addToCart",{Name:t.merchandise.product.title,Price:(0,F.formatMoneyExact)(t.merchandise.price),ProductID:Number((0,E.parseGid)(t.merchandise.product.id).id),Categories:[],ImageURL:r,URL:`${Y.SITE_URL}/products/${t.merchandise.product.handle}`,Brand:"GhostBed"})},"retentionCheckoutStarted",0,function(e){let t=(e.id.split("/").pop()??"").split("?")[0]??"",r=e.cost.totalAmount.currencyCode;if(et("shopify_checkout_started")){let n=e.lines.map(e=>{let t=e.merchandise.product.featuredImage?.url??"",r={id:(0,E.parseGid)(e.merchandise.id).id,title:e.merchandise.title,price:{amount:Number(e.merchandise.price.amount),currencyCode:e.merchandise.price.currencyCode},...t?{image:{src:t}}:{},product:{id:(0,E.parseGid)(e.merchandise.product.id).id,title:e.merchandise.product.title,url:`/products/${e.merchandise.product.handle}`}};return{quantity:e.quantity,variant:r}});ee("shopify_checkout_started",{data:{checkout:{token:t,totalPrice:{amount:Number(e.cost.totalAmount.amount),currencyCode:r},lineItems:n}},context:{document:{location:{href:e.checkoutUrl}}}});return}ee("event","Checkout Started Reclaim",{cart_id:t,cart_amount:e.cost.totalAmount.amount,currency:r,extra:{line_items:e.lines.map(e=>{let t,n,i,a,o,c;return n=(t=Number(e.merchandise.price.amount))*e.quantity,i={},e.quantity&&(i.quantity=e.quantity),n&&(i.line_price=n),a={},e.merchandise.product.title&&(a.title=e.merchandise.product.title),(o=Number((0,E.parseGid)(e.merchandise.product.id).id))&&(a.id=o),a.url=`${Y.SITE_URL}/products/${e.merchandise.product.handle}`,t&&(a.price={amount:t,currencyCode:r}),e.merchandise.sku&&(a.sku=e.merchandise.sku),(c=e.merchandise.product.featuredImage?.url)&&(a.image={src:c}),Object.keys(a).length>0&&(i.product=a),i}),checkout_url:e.checkoutUrl}}
1)},"retentionPage",0,function(){ee("page")},"retentionViewedProduct",0,function(e,t){let r=e.images[0]?.url??t.image?.url??"";et("shopify_vp")?ee("shopify_vp",{data:{productVariant:{id:(0,E.parseGid)(t.id).id,title:t.title,price:{amount:Number(t.price.amount),currencyCode:t.price.currencyCode},...r?{image:{src:r}}:{},product:{id:(0,E.parseGid)(e.id).id,title:e.title,...e.productType?{type:e.productType}:{},url:`/products/${e.handle}`}}},context:{window:{location:{href:window.location.href}}}}):ee("event","Viewed Product Reclaim",{Name:e.title,Price:(0,F.formatMoneyExact)(t.price),ProductID:Number((0,E.parseGid)(e.id).id),Categories:e.collectionTitles,ImageURL:r,URL:`${Y.SITE_URL}/products/${e.handle}`,Brand:"GhostBed"})}],487468);var er=e.i(948337),en=e.i(264261);let ei=["https://s.axon.ai/pixel.js","https://res4.applovin.com/p/l/loader.iife.js"];function ea(e){if(!e||window.axon)return;let t=function(...e){t.performOperation?t.performOperation(...e):t.operationQueue.push(e)};for(let r of(t.operationQueue=[],t.ts=Date.now(),t.eventKey=e,window.axon=t,ei)){let e=document.createElement("script");e.async=!0,e.src=r,document.head.appendChild(e)}eo("init")}function eo(...e){let t=window.axon;if("function"==typeof t)try{t(...e)}catch{}}function ec(e){let t=e.merchandise.product.featuredImage?.url;return{item_id:(0,E.parseGid)(e.merchandise.product.id).id,item_name:e.merchandise.product.title,item_variant_id:(0,E.parseGid)(e.merchandise.id).id,item_brand:"GhostBed",price:Number(e.merchandise.price.amount),quantity:e.quantity,...t?{image_url:t}:{}}}function ed(e){return e.reduce((e,t)=>e+t.price*t.quantity,0)}function es(){if(window.tdl?.invoked)return;let e=window.tdl=window.tdl??[];e.invoked=!0,e.methods=["init","identify","convert"];let t=t=>(...r)=>(e.push([t,...r]),e);e.identify=t("identify"),e.convert=t("convert"),e.init=t=>{let r=document.createElement("script");r.async=!0,r.src="https://js.go2sdk.com/v2/tune.js",document.head.appendChild(r),e.domain=t},e.init("https://ghostbed.go2cloud.org")}e.s(["axonAddToCart",0,function(e){let t=e.filter(e=>!(0,en.isAutoAdded)(e)).map(ec);0!==t.length&&eo("track","add_to_cart",{currency:e[0].merchandise.price.currencyCode,value:ed(t),items:t})},"axonBeginCheckout",0,function(e){if(0===e.lines.length)return;let t=e.lines.map(ec);eo("track","begin_checkout",{currency:e.cost.totalAmount.currencyCode,value:ed(t),items:t})},"axonPageView",0,function(){eo("track","page_view")},"axonViewItem",0,function(e,t){let r=e.images[0]?.url??t.image?.url,n={item_id:(0,E.parseGid)(e.id).id,item_name:e.title,item_variant_id:(0,E.parseGid)(t.id).id,item_brand:"GhostBed",price:Number(t.price.amount),quantity:1,...r?{image_url:r}:{}};eo("track","view_item",{currency:t.price.currencyCode,value:ed([n]),items:[n]})},"loadAppLovin",0,ea],538182),e.i(247167),e.s(["loadTune",0,es,"tuneIdentify",0,function(){let e=window.tdl;if(e&&"function"==typeof e.identify)try{e.identify()}catch{}}],921739);let el="https://bat.bing.com/bat.js",eu=null,ep=!1;function em(){document.querySelector(`script[src="${el}"]`)||(eu=window.location.pathname,ep=!1,(window.uetq=window.uetq??[]).push("consent","update",{ad_storage:f().marketingAllowed?"granted":"denied"}),(0,J.whenIdle)(()=>{if(document.querySelector(`script[src="${el}"]`))return;let e=document.createElement("script");e.src=el,e.async=!0,e.onload=()=>{let e=window.UET;if(!e)return;let t=window.uetq;window.uetq=new e({ti:"5103427",q:t,enableAutoSpaTracking:!1}),window.uetq.push("pageLoad")},document.head.appendChild(e)}))}e.s(["bingPageView",0,function(e){let t=window.uetq;if(t&&"function"==typeof t.push){if(!ep&&e===eu){ep=!0;return}try{t.push("event","page_view",{page_path:e})}catch{}}},"loadBingUet",0,em],392854);let ef="https://cdn.mgln.ai/pixel.min.js";function eh(){if(window.MAI)return;let e={emit:(...t)=>{(e.q=e.q??[]).push(t)}};window.MAI=e,e.emit("conf","01a0b0d4f1de7ebeb72cbeb28c884154"),(0,J.whenIdle)(()=>{if(document.querySelector(`script[src="${ef}"]`))return;let e=document.createElement("script");e.async=!0,e.src=ef,document.head.appendChild(e)})}e.s(["loadMagellan",0,eh,"magellanView",0,function(){let e=window.MAI;if(e&&"function"==typeof e.emit)try{Promise.resolve(e.emit("view")).catch(()=>{})}catch{}}],76982);let ey=(0,n.createContext)(null);function ew(){j(),(0,J.whenIdle)(eg)}function eg(){if(document.querySelector(`script[src="${m}"]`))return;let e=document.createElement("script");e.src=m,e.async=!0,document.head.appendChild(e)}e.s(["AnalyticsProvider",0,function(e){let o,d,s,m,f,h,y,w,g,v,_,k,I,b,T,E,S=(0,r.c)(28),{config:A,children:C}=e,P=A.checkoutDomain||void 0;S[0]!==P?(o={hasUserConsent:!0,checkoutDomain:P,fetchTrackingValues:!0}
1,S[0]=P,S[1]=o):o=S[1];let x=function(e){let{hasUserConsent:t,domain:r="",checkoutDomain:o="",storefrontAccessToken:d,fetchTrackingValues:s,ignoreDeprecatedCookies:m=!1}=e||{},f=function({checkoutDomain:e,storefrontAccessToken:t,fetchTrackingValues:r=!1}){let[i,a]=(0,n.useState)(!r),o=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{r?o.current||(o.current=!0,p(t).catch(r=>e?p(t,e):Promise.reject(r)).catch(e=>{console.warn("[h2:warn:useShopifyCookies] Failed to fetch tracking values from browser: "+(e instanceof Error?e.message:String(e)))}).finally(()=>{a(!0)})):a(!0)},[e,r,t]),i}({storefrontAccessToken:d,fetchTrackingValues:s,checkoutDomain:o});return(0,n.useEffect)(()=>{if(m||!f)return;let e=r||window.location.host;if(o){let t=o.split(".").reverse(),r=e.split(".").reverse(),n=[];t.forEach((e,t)=>{e===r[t]&&n.push(e)}),e=n.reverse().join(".")}/^localhost/.test(e)&&(e="");let n=e?/^\./.test(e)?e:`.${e}`:"";if(t){let e=c();if((e.uniqueToken||e.visitToken||"").startsWith("00000000-"))return;u(i,e.uniqueToken||l(),31104e3,n),u(a,e.visitToken||l(),1800,n)}else u(i,"",0,n),u(a,"",0,n)},[f,t,r,o,m]),f}(o);S[2]===Symbol.for("react.memo_cache_sentinel")?(d=[],S[2]=d):d=S[2],(0,n.useEffect)(ew,d),S[3]!==A.klaviyoCompanyId?(s=()=>{A.klaviyoCompanyId&&(0,J.whenIdle)(()=>(0,Q.loadKlaviyo)(A.klaviyoCompanyId))},m=[A.klaviyoCompanyId],S[3]=A.klaviyoCompanyId,S[4]=s,S[5]=m):(s=S[4],m=S[5]),(0,n.useEffect)(s,m),S[6]!==A.retentionSiteKey?(f=()=>{A.retentionSiteKey&&Z(A.retentionSiteKey)},h=[A.retentionSiteKey],S[6]=A.retentionSiteKey,S[7]=f,S[8]=h):(f=S[7],h=S[8]),(0,n.useEffect)(f,h),S[9]!==A.tripleWhaleShop?(y=()=>{A.tripleWhaleShop&&(0,J.whenIdle)(()=>(0,er.loadTriplePixel)(A.tripleWhaleShop))},w=[A.tripleWhaleShop],S[9]=A.tripleWhaleShop,S[10]=y,S[11]=w):(y=S[10],w=S[11]),(0,n.useEffect)(y,w),S[12]!==A.applovinEventKey?(g=()=>{A.applovinEventKey&&(0,J.whenIdle)(()=>ea(A.applovinEventKey))},v=[A.applovinEventKey],S[12]=A.applovinEventKey,S[13]=g,S[14]=v):(g=S[13],v=S[14]),(0,n.useEffect)(g,v),S[15]!==A.bingUetEnabled||S[16]!==A.tuneEnabled?(_=()=>{A.tuneEnabled&&es(),A.bingUetEnabled&&em()},k=[A.tuneEnabled,A.bingUetEnabled],S[15]=A.bingUetEnabled,S[16]=A.tuneEnabled,S[17]=_,S[18]=k):(_=S[17],k=S[18]),(0,n.useEffect)(_,k),S[19]!==A.magellanEnabled?(I=()=>{A.magellanEnabled&&eh()},b=[A.magellanEnabled],S[19]=A.magellanEnabled,S[20]=I,S[21]=b):(I=S[20],b=S[21]),(0,n.useEffect)(I,b),S[22]!==A||S[23]!==x?(T={config:A,ready:x},S[22]=A,S[23]=x,S[24]=T):T=S[24];let q=T;return S[25]!==C||S[26]!==q?(E=(0,t.jsx)(ey.Provider,{value:q,children:C}),S[25]=C,S[26]=q,S[27]=E):E=S[27],E},"useAnalytics",0,function(){let e=(0,n.useContext)(ey);if(!e)throw Error("useAnalytics must be used within AnalyticsProvider");return e}],260742)},91175,e=>{"use strict";var t=e.i(483029);function r(e){let t=window;t.dataLayer=t.dataLayer??[],t.dataLayer.push(e)}e.s(["collectionViewEvent",0,function(e,r,n){return{event:"collectionView",ecommerce:{currencyCode:n,actionField:{list:"Collection Page"},impressions:r.slice(0,36).map((r,n)=>{let i=(0,t.parseGid)(r.id).id;return{name:r.title,id:"",productId:i,variantId:"",shopifyId:`shopify_US_${i}_`,price:Number(r.price.amount),brand:r.vendor,position:n,category:e,list:"Collection Page",handle:r.handle}})}}},"productDetailViewEvent",0,function(e,r,n){let i=(0,t.parseGid)(e.id).id,a=(0,t.parseGid)(r.id).id;return{event:"productDetailView",ecommerce:{currencyCode:n,detail:{products:[{name:e.title,id:r.sku||"",productId:i,variantId:a,shopifyId:`shopify_US_${i}_${a}`,price:Number(r.price.amount),brand:"GhostBed",variant:r.title}]}}}},"pushPageType",0,function(e){r({pageType:"/"===e?"home":e.startsWith("/products/")?"product":e.startsWith("/collections/")?"category":"/cart"===e?"cart":"/search"===e?"searchresults":"other"})},"pushToDataLayer",0,r,"searchResultsEvent",0,function(e,r){return{event:"searchResults",ecommerce:{currencyCode:r,actionField:{list:"Search Results"},impressions:e.filter(e=>"product"===e.kind).slice(0,36).map((e,r)=>{let n=e.productGid?(0,t.parseGid)(e.productGid).id:"",i=e.minPrice?Number(e.minPrice.amount):0;return{name:e.title,id:"",productId:n,variantId:"",shopifyId:n?`shopify_US_${n}_`:"shopify_US__",price:i,brand:e.vendor??"GhostBed",position:r,list:"Search Results",handle:e.url.replace(/^\/products\//,"")}})}}},"searchViewEvent",0,function(e){return{event:"SearchView",SearchTerms:e}}])}]);

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.