PageSourceSearch

https://www.prettylitter.com/_nuxt/useGetStarted.afe9b8ba.js

js prettylitter.com collected 2026-10-02 03:56:15 UTC 7,915 bytes, 1 lines download raw bytes

1import{a4 as ke,o as J,c as X,a,l as s,s as g,W as Z,y as xe,t as Fe,i as ee,V as te,k as c,a8 as Le,a5 as Me,a9 as Ge,T as L,x as Oe,G as Pe,n as Re,A as Ue,aa as Ie}from"./entry.4fe30dff.js";import{u as ae,a as qe}from"./useCart.35a498d7.js";import{u as Ne}from"./useCustomerLocation.92165fd9.js";import{G as _,C as Ae}from"./constants.779694c3.js";const Be={class:"w-[500px] max-w-full mx-auto text-grey-500","aria-label":"Progress Steps"},Ve={"aria-label":"Progress Steps",class:"flex justify-center w-full text-sm uppercase text-center py-2 lg:py-3"},Qe={class:"w-1/3"},De=["aria-current"],je=a("span",null,"1",-1),Ke=[je],Ye=a("span",{"aria-hidden":"true"},"Quantity",-1),He={class:"w-1/3"},$e=["aria-current"],ze=a("span",null,"2",-1),We=[ze],Je=a("span",{"aria-hidden":"true"},"Choose Plan",-1),Xe={class:"w-1/3"},Ze=["aria-current","aria-label"],et=a("span",{class:"bg-white rounded-full border-2 border-grey-500 h-6 w-6 flex justify-center mx-auto mb-1.5","aria-hidden":"true"},[a("span",null,"3")],-1),tt={"aria-hidden":"true"},at={__name:"GetStartedStepper",props:{isGiftFlow:{type:Boolean,default:!1}},setup(E){const{step:t,showMultiMonthUpsell:h,changeStep:S,STEPS:m}=ke("getStarted"),y=E,b=f=>{console.debug("Changing step from stepper..."),S(f),h.value=!1};return(f,p)=>(J(),X("nav",Be,[a("ul",Ve,[a("li",Qe,[s(t)>=1?(J(),X("a",{key:0,class:g(["relative block",{"text-black":s(t)>=1}]),onClick:p[0]||(p[0]=()=>b(s(m)[0])),style:Z({cursor:s(t)>1?"pointer":"default"}),"aria-current":s(t)===1?"step":null,"aria-label":"Quantity, step 1 of 3",href:"#","data-testid":"reset-getstarted"},[a("span",{class:g(["rounded-full border-2 h-6 w-6 flex justify-center mx-auto mb-1.5",s(t)>=1?"bg-primary-800 border-primary-800 text-white":"border-grey-500 bg-white"]),"aria-hidden":"true"},Ke,2),a("div",{class:g(["absolute h-0.5 left-[calc(50%+0.75rem)] w-full top-3",s(t)>1?"bg-primary-500":"bg-grey-500"]),"aria-hidden":"true"},[a("div",{class:g(["track",{"text-black":s(t)>=2}])},null,2)],2),Ye],14,De)):xe("",!0)]),a("li",He,[a("a",{class:g(["relative block",{"text-black":s(t)>=2}]),style:Z({cursor:s(t)>2||s(h)?"pointer":"default"}),onClick:p[1]||(p[1]=()=>s(t)>=2?b(s(m)[1]):""),"aria-current":s(t)===2?"step":null,"aria-label":"Choose Plan, step 2 of 3",href:"#"},[a("span",{class:g(["rounded-full border-2 h-6 w-6 flex justify-center mx-auto mb-1.5",s(t)>=2?"bg-primary-800 border-primary-800 text-white":"border-grey-500 bg-white"]),"aria-hidden":"true"},We,2),a("div",{class:g(["absolute h-0.5 left-[calc(50%+12.5px)] w-full top-[12.5px]",s(t)>2?"bg-primary-500":"bg-grey-500"]),"aria-hidden":"true"},[a("div",{class:g(["track",{"text-black":s(t)>=3}])},null,2)],2),Je],14,$e)]),a("li",Xe,[a("a",{class:"relative block","aria-current":s(t)===3?"step":null,"aria-label":`${y.isGiftFlow?"Choose Gift":"Checkout"}, step 3 of 3`,href:"#"},[et,a("span",tt,Fe(y.isGiftFlow?"Choose Gift":"Checkout"),1)],8,Ze)])])]))}},Tt=at,st=()=>{const{isContiguousStates:E,isCanada:t,isUSA:h,isMexico:S}=Ne(),{gsClumpLT:m,isSuperFastFlowTest:y,aloeGetStartedTest:b}=ae(),f=ee(),p=te();let o="fallback";E.value&&h.value?o="us":h.value?o="nonContiguousStates":t.value?o="ca":S.value&&(o="mx");const k=f.path;function M(i){const d=i.includes("/products/"),C=i.includes("/multi-cat")||i.includes("/multi-cat-scented-cat-litter");return!d&&!C}if(M(k))for(const i in p.cart)["linneaBundle","litterMat"].includes(i)&&(o="accessoryBundle");return f.path.includes("/get-started-bundle")?o="bundle":["/get-started-clumping","/products/one-bag-of-clumping-prettylitter","/products/two-bags-of-clumping-prettylitter","/products/three-bags-of-clumping-prettylitter"].includes(f.path)?o="clumping":f.path.includes("/get-started-aloe")?o="aloe":f.path.includes("/get-started-bogo")&&(o="bogo"),m.value==="variation_1"&&(o="gsCLT"),y.value&&(o="superFastFlowTest"),b.value==="variation_1"&&(o="aloe"),console.debug(`Using Get Started Flow ${o}`),o},gt=({defaultLitterType:E="unscented",defaultOrderType:t="multi",defaultBags:h=1,defaultStep:S="CAT_SELECTOR",defaultFrequency:m=4,isStepTestStep:y=!1,showScentedControlsInFrequencyStep:b=!0,showTakeMeToOriginalUnscented:f=!1,productToAddOnLoad:p=null,fireInitialDataLayer:o=!0,isBogo:k=!1,isFreeGift:M=!1})=>{const i=ee(),d=c(1),C=c(E),v=c(t),n=c(h),T=c(m),se=c(!1),le=c(!1),oe=c(!1),re=c(!1),ie=c(!1),ne=c(!0),ue=c(!1),l=c(i.path==="/get-started-clumping"?_.clumping:_.fallback),{isStepTest:I,gsClumpLT:lt,isPodcastMultiMonthTest:ce,twoMonthTest:de,twoVSThreeMonthTest:fe,ppTrialTest:x,iamsTest:G,freeGiftTest:O}=ae(),{dlAddToCart:ot,dlGetStarted:pe,dlBagSelection:q,dlPlanOption:N,dlPlanSelection:ve,dlVie
1wItem:A}=Le(),{elevarViewItem:B}=Me(),Te=Ge(),{getLitterSku:ge,addItemBySku:P,lineItems:R,reset:he,isFreeToysForLifeOffer:Se,doCheckout:V,multiMonthUpsellTaken:Q,cartTotal:D,saveStepState:_e,loadStepState:me,setDiscount:rt,addLitter:ye,isCheckoutLoading:be}=qe({isBogo:k,isStepTest:y}),j=te();L([n,T,v,C,D],([e,u,r,U,it],[we,nt,Ee,ut,ct])=>{F(),e!==we&&q(),r!==Ee&&N()});const F=()=>{Te.updateStore({bags:n.value,frequency:T.value,plan:v.value==="multi"?"quarterly":"monthly",litterSku:w.value,cartTotal:D.value})};Oe(()=>{window!==void 0&&window.convert!==void 0&&window.convert.installed===!0&&(console.debug("Clearing convert and running again"),window.convert.installed=!1,window.convert.run()),(de.value==="variation_1"||fe.value==="variation_1")&&(v.value="twoMonth"),l.value=_[st()],K(),Y(),H(),S!=="CAT_SELECTOR"&&S!=="CAT_SELECTOR_CLUMPING"&&$(S,!0)});const K=()=>{console.debug("PP TRIAL TEST",x.value),x.value==="variation_1"?l.value=_.ppTrialTestV1:x.value==="variation_2"&&(l.value=_.ppTrialTestV2)},Y=()=>{console.debug("IAMS TEST",G.value),G.value==="variation_1"&&(l.value=_.iamsTest)},H=()=>{if(console.debug("FREE GIFT TEST",O.value),O.value==="variation_1"||i.path==="/get-started-gift"||i.path==="/get-started-gift-home")l.value=_.freeGiftTest;else if(M&&!l.value.includes("FREE_GIFT_TEST")){const e=l.value.indexOf("CHECKOUT");if(e!==-1){const u=[...l.value];u.splice(e,0,"FREE_GIFT_TEST"),l.value=u}}};L([x,G,O],()=>{K(),Y(),H()}),Pe(()=>{"lotus"in(i.query||{})&&(C.value="scented"),p!==null&&P({sku:p,frequency:T.value,isSubscription:!0}),i.query.cats&&(n.value=Number(i.query.cats)),i.query.step&&(d.value=Number(i.query.step)),F(),o?(pe(n.value),q(n.value)):(ve(),N())});const $=(e=null,u=!1)=>{let r=d.value+1;typeof e=="number"?r=e:e&&(r=l.value.indexOf(e)+1,r===0&&(r=l.value.indexOf("CHECKOUT")+1)),r-1>=l.value.indexOf("CHECKOUT")?V():I.value&&!u?(_e(d.value),j.cats=n.value,Re(`/get-started/${r}`)):(I.value&&(n.value=j.cats,me(r)),d.value=r),[1,2].includes(r)&&(he(),Q.value=!1),z()},w=Ue(()=>{let e=n.value,u=v.value==="multi",r=v.value==="twoMonth";return d.value,ge({bags:e,type:C.value,isQuarterly:u,isTwoMonth:r})});L(w,(e,u)=>{(d.value-1===l.value.indexOf("FREQUENCY_SELECTOR")||d.value-1===l.value.indexOf("FREQUENCY_SELECTOR_CLUMPING"))&&(A(e,n.value,T.value),B(e,n.value,T.value))}),L(d,(e,u)=>{(e-1===l.value.indexOf("FREQUENCY_SELECTOR")||e-1===l.value.indexOf("FREQUENCY_SELECTOR_CLUMPING"))&&(A(w.value,n.value,T.value),B(w.value,n.value,T.value))});const Ce=(e=!0)=>{let u=T.value;v.value==="multi"?u=12:v.value==="twoMonth"&&(u=8);let r=w.value;ye(r,u,e,n.value),F(),Se.value&&(R.value=R.value.filter(U=>U.sku.toLowerCase()!=="ftfl"),P({sku:"FTFL",frequency:u,isSubscription:!0}))},z=()=>{window.scrollTo(0,0)},W={STEPS:l,CAT_OPTIONS:Ae,step:d,litterType:C,bags:n,orderType:v,changeStep:$,showMultiMonthUpsell:se,scrollTop:z,isBonusBag:le,foodAvailable:oe,multiMonthUpsellTaken:Q,isBFCM:ie,isPodcastMultiMonthTest:ce,useMultiMonthToys:re,freeShipping:ne,foodCardTest:ue,addItemBySku:P,addLitterGetStarted:Ce,lineItems:R,doCheckout:V,showScentedControlsInFrequencyStep:b,showTakeMeToOriginalUnscented:f,currentLitterSku:w,setDataLayerStore:F,isBogo:k,isCheckoutLoading:be};return Ie("getStarted",W),W};export{Tt as _,st as a,gt as u};

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.