const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["19f1617a45/carousel_grid.frwKpE5x.js","19f1617a45/products.BA6pCSGd.js","19f1617a45/utils.bLXN32yI.js","19f1617a45/lazyload.CT0wWOA7.js","19f1617a45/shared.CDdbAnrq.js","19f1617a45/icons.CgGsGtgs.js","19f1617a45/icons.BHkI3RV1.css","19f1617a45/content.module.DTaEG7BX.js","19f1617a45/content.D4ACTNZJ.css","19f1617a45/shared.DB04zNFG.css","19f1617a45/widget.module.8y8ZFeMU.js","19f1617a45/widget.DYnj9QEo.css","19f1617a45/translations.U7MZepG5.js","19f1617a45/carousel_grid.DbETXPCd.css","19f1617a45/index.Dx8Te6F2.js","19f1617a45/index.BL3EjL2C.css","19f1617a45/stories.D9IKTZK3.js","19f1617a45/embla-carousel.esm.CMPFBS9o.js","19f1617a45/bullets.BiJ6uOjW.js","19f1617a45/bullets.CTIhywoB.css","19f1617a45/stories.CpPa8qrS.css","19f1617a45/carousel.7khqWhvl.js","19f1617a45/hooks.module.-oX09MMm.js","19f1617a45/cart.IzBp1byT.js","19f1617a45/spotlight.rMAIppVL.js","19f1617a45/spotlight.pZqyB-UQ.css","19f1617a45/grid.BzSEI2gs.js","19f1617a45/grid.C3ZL18Oa.css","19f1617a45/post_text.Ly2MH7As.js","19f1617a45/post_text.BFTBiETN.css","19f1617a45/slider.DcmJAtwT.js","19f1617a45/slider.DWi5Ay3v.css","19f1617a45/highlights.DnqoECc0.js","19f1617a45/highlights.D_L98MKz.css","19f1617a45/index.D_Ouok2S.js","19f1617a45/index.Bpx3tU3_.css","19f1617a45/iframe_player.D6dKDbNM.js","19f1617a45/iframe_player.IcOB_ZU0.css","19f1617a45/player.DDJfLVFo.js","19f1617a45/player.1Lz9eamK.css"])))=>i.map(i=>d[i]); (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const n of d.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&a(n)}).observe(document,{childList:!0,subtree:!0});function s(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(o){if(o.ep)return;o.ep=!0;const d=s(o);fetch(o.href,d)}})();const K=void 0,Q="https://api.storista.io/worker/v3/widgets/",ue="https://images.storista.io",pe="https://player.storista.io",b=e=>{const r=e.bypass?K:Q;return fetch(r+"?"+new URLSearchParams(e),{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",redirect:"follow",referrer:"no-referrer"}).then(s=>s.json())},fe=()=>(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))!==null,Z="modulepreload",X=function(e){return"https://widget.storista.io/"+e},T={},y=function(r,s,a){let o=Promise.resolve();if(s&&s.length>0){let l=function(u){return Promise.all(u.map(h=>Promise.resolve(h).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),c=n?.nonce||n?.getAttribute("nonce");o=l(s.map(u=>{if(u=X(u),u in T)return;T[u]=!0;const h=u.endsWith(".css"),w=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${w}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Z,h||(g.as="script"),g.crossOrigin="",g.href=u,c&&g.setAttribute("nonce",c),document.head.appendChild(g),h)return new Promise((O,C)=>{g.addEventListener("load",O),g.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${u}`)))})}))}function d(n){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=n,window.dispatchEvent(c),!c.defaultPrevented)throw n}return o.then(n=>{for(const c of n||[])c.status==="rejected"&&d(c.reason);return r().catch(d)})};var p=[];for(var D=0;D<256;++D)p.push((D+256).toString(16).slice(1));function ee(e,r=0){return(p[e[r+0]]+p[e[r+1]]+p[e[r+2]]+p[e[r+3]]+"-"+p[e[r+4]]+p[e[r+5]]+"-"+p[e[r+6]]+p[e[r+7]]+"-"+p[e[r+8]]+p[e[r+9]]+"-"+p[e[r+10]]+p[e[r+11]]+p[e[r+12]]+p[e[r+13]]+p[e[r+14]]+p[e[r+15]]).toLowerCase()}var P,te=new Uint8Array(16);function oe(){if(!P&&(P=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!P))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(te)}var re=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const V={randomUUID:re};function ne(e,r,s){if(V.randomUUID&&!e)return V.randomUUID();e=e||{};var a=e.random||(e.rng||oe)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,ee(a)}/*! js-cookie v3.0.5 | MIT */function I(e){for(var r=1;r"u")){n=I({},r,n),typeof n.expires=="number"&&(n.expires=new Date(Date.now()+n.expires*864e5)),n.expires&&(n.expires=n.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var l in n)n[l]&&(c+="; "+l,n[l]!==!0&&(c+="="+n[l].split(";")[0]));return document.cookie=o+"="+e.write(d,o)+c}}function a(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var d=document.cookie?document.cookie.split("; "):[],n={},c=0;c{});const ae=async(e,r)=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0}),j=async(e,r,s,a={})=>{if(W&&(!window.Shopify.customerPrivacy||window.Shopify.customerPrivacy.userCanBeTracked()?L=!0:L=!1),!L)return new Promise(()=>{});E||(E=ne(),$.set(N,E,{expires:1825}));const o={event:{type:e,widget_id:s,team_id:r,sent_at:new Date().toISOString(),...a},user:{id:E},event_ctx:{ua:navigator.userAgent,referer:document.referrer,url:window.location.href,page_title:document.title,doc_path:document.location.pathname,doc_host:document.location.hostname,doc_search:window.location.search,screen_resolution:screen.width+"x"+screen.height,version:2}};await ae(ie,JSON.stringify([o]))},de=()=>{let e=JSON.parse(window.localStorage.getItem(v));e||(e={first_visit:new Date().toISOString(),visits:0}),e.last_visit=new Date().toISOString(),e.visits+=1,window.localStorage.setItem(v,JSON.stringify(e))},ye=(e,r,s)=>{let a=JSON.parse(window.localStorage.getItem(`${v}_impressions`));a||(a={impressions:0}),a.last_impression=new Date().toISOString(),a.impressions+=1,a.last_widget=r,a.last_post_id=s.post_id,window.localStorage.setItem(`${v}_impressions`,JSON.stringify(a)),j("impression",e,r,s)},he=e=>{let r=JSON.parse(window.localStorage.getItem(`${v}_cart`));r||(r={widgets:{}});const{widget_id:s,post_id:a,product_id:o}=e;s in r.widgets?Array.isArray(r.widgets[s])||(r.widgets[s]=[]):r.widgets[s]=[],r.widgets[s].push({post_id:a,product_id:o,added:new Date().toISOString()}),r.last_added=new Date().toISOString(),window.localStorage.setItem(`${v}_cart`,JSON.stringify(r))},k="storista",ce=(e,r)=>{let s,a=!1,o,d=!1,n=null,c=!1;const l=r,u=t=>{o=t,s=t.id,de(),window.Shopify&&`${k}_widget_${s}`in window&&(a=window[`${k}_widget_${s}`]);let i=!1;if(t.id==="P50HQ7I7NDC7zwE"?(i=!0,B().then()):t.team_id===3237&&document.location.pathname.startsWith("/products/")?(i=!0,w().then()):t.type==="popup"?(i=!0,F().then()):t.type==="carousel"&&t.style.layout==="spotlight"||t.type==="spotlight"?(i=!0,C().then()):t.type==="carousel"&&t.style.layout==="stories"||t.type==="stories"?(i=!0,g().then()):t.type==="carousel"&&t.style.layout==="carousel"||t.type==="carousel"?(i=!0,O().then()):t.type==="feed"&&t.style.layout==="grid"||t.type==="grid"?q().then():t.type==="feed"&&t.style.layout==="slider"||t.type==="slider"?M().then():t.type==="video_grid"?(i=!0,h().then()):t.type==="highlights"?J().then():console.log("Unsupported type"),i&&G(),window.addEventListener("scroll",()=>{document.documentElement.style.setProperty("--scroll-y",`${window.scrollY}px`)}),o.style&&o.style.css){const f=document.createElement("style");f.textContent=o.style.css,document.head.appendChild(f)}if(o.team&&o.team.style&&!document.head.querySelector("style[data-kind=vc]")){const f=document.createElement("style");f.dataset.kind="vc",f.textContent=o.team.style,document.head.appendChild(f)}},h=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/carousel_grid.frwKpE5x.js");return{default:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(({default:t})=>{t(e,o,a,i=>{m(i)})})},w=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/index.Dx8Te6F2.js");return{default:t}},__vite__mapDeps([14,5,6,15])).then(({default:t})=>{t(e,o,i=>{m(i)})})},g=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/stories.D9IKTZK3.js");return{default:t}},__vite__mapDeps([16,2,3,17,18,19,7,8,10,11,20])).then(({default:t})=>{t(e,o,i=>{m(i)})})},O=async()=>{await y(()=>import("./19f1617a45/translations.U7MZepG5.js"),[]),y(async()=>{const{default:t}=await import("./19f1617a45/carousel.7khqWhvl.js");return{default:t}},__vite__mapDeps([21,22,1,2,5,6,3,17,18,19,4,7,8,9,10,11,12,23])).then(({default:t})=>{t(e,o,a,i=>{m(i)})})},C=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/spotlight.rMAIppVL.js");return{default:t}},__vite__mapDeps([24,1,2,5,6,7,8,10,11,4,9,17,12,25])).then(({default:t})=>{t(e,o,a,i=>{m(i)})})},q=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/grid.BzSEI2gs.js");return{default:t}},__vite__mapDeps([26,2,10,11,27])).then(({default:t})=>{t(e,o,i=>{m(i)})})},B=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/post_text.Ly2MH7As.js");return{default:t}},__vite__mapDeps([28,3,7,8,10,11,29])).then(({default:t})=>{t(e,o,i=>{m(i)})})},M=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/slider.DcmJAtwT.js");return{default:t}},__vite__mapDeps([30,2,3,10,11,7,8,17,31])).then(({default:t})=>{t(e,o,i=>{m(i)})})},J=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/highlights.DnqoECc0.js");return{default:t}},__vite__mapDeps([32,10,11,2,17,33])).then(({default:t})=>{t(e,o,i=>{m(i)})})},F=async()=>{y(async()=>{const{default:t}=await import("./19f1617a45/index.D_Ouok2S.js");return{default:t}},__vite__mapDeps([34,2,5,6,35])).then(({default:t})=>{t(e,o,i=>{m(i)})})},H=()=>{n.style.display="none",o.team_id!==2410&&(window.location.hash="#_");const t=document.body,i=t.style.top;t.style.position="",t.style.top="",window.scrollTo(0,parseInt(i||"0")*-1),t.style.removeProperty("overflow")},G=async()=>{if(c)return!1;c=!0;const t=await y(()=>import("./19f1617a45/iframe_player.D6dKDbNM.js"),__vite__mapDeps([36,23,1,2,37])),i=()=>{const _=new URLSearchParams(window.location.search);if(_.get("openPlayer")&&_.get("widget")===s){const S=_.get("video"),x=o.data[0].stories.findIndex(Y=>Y.id===parseInt(S));x>=0&&m({widget_type:"carousel",currentProgress:x,muted:!0})}},f=()=>{n=t.default(H,i)};document.readyState!=="loading"?f():document.addEventListener("DOMContentLoaded",()=>{f()})},z=(t,i)=>{const f=document.documentElement.style.getPropertyValue("--scroll-y"),_=document.body;_.style.position="fixed",_.style.top=`-${f}`,_.style.width="100%",_.style.overflow="hidden";let S={event:"storista:start",widget_id:t.id,index:i};if(l.automated&&(S={...S,...l}),n.contentWindow.postMessage(S,"*"),n.style.display="block",t.team_id!==2410){window.location.hash="#player";const A=()=>{window.location.hash===""&&(n.contentWindow.postMessage({event:"storista:request_to_close"},"*"),window.removeEventListener("popstate",A))};window.addEventListener("popstate",A)}},m=t=>{t.widget_type==="carousel"?z(o,t.currentProgress):y(async()=>{const{default:i}=await import("./19f1617a45/player.DDJfLVFo.js");return{default:i}},__vite__mapDeps([38,22,1,2,12,39])).then(({default:i})=>{const f=i(o,a);f.init(),f.play({...t,isVolumeMuted:d})})};return{show:u}},le="storista",R=e=>{document.querySelectorAll(`div[data-type='${le}']`).forEach(async s=>{if(s.dataset.proceceed)return;s.dataset.proceceed=!0;const a=s.dataset.widget,o=s.dataset.page,d=s.dataset.pageId;let n={},c={};a&&a.length>0?(n={widget_id:a},s.dataset.automated==="true"&&o==="product"&&d&&(n={...n,id:d,page_type:o},c=n,c.automated=!0)):(c.automated=!1,o&&o.length&&(o==="product"||o==="collection")&&d&&o.length&&(n={id:d,page_type:o}),e.Shopify&&(n.shop=e.Shopify.shop),n.url=e.location.href);let l=await b(n);if(l.error)if(e.Shopify&&e.Shopify.shop==="pamperpetals.myshopify.com"&&l.error==="Widget not found")l=await b({...n,widget_id:"Bb5AHEfKjtZH6lT"});else{const u=".storista-header";document.querySelector(u)&&e.Shopify.shop!=="sisterly-labs.myshopify.com"&&document.querySelector(u).remove()}l.error||(ce(s,c).show(l),j("load",l.team_id,l.id))}),console.log("%c Shoppable videos powered by Storista https://storista.io ","color: white;background-color: #37016C;padding-top: 8px;padding-bottom:8px;")};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{R(window)}):R(window);window["storista-handler"]=R;export{y as _,ue as a,he as b,fe as i,pe as p,j as s,ye as t};