1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3515,6249],{56249:function(){},71245:function(e,t,r){"use strict";r.d(t,{Ho:function(){return h},aC:function(){return f}});var n,i,o=r(57437),a=r(2265),l=r(28724),_=r(26357),u=r(49360),s=r(64131);r(15566);var d=r(77727),E=r(52246),c=r(78724),S=r(16050);(n=i||(i={})).SIGN_IN="signIn",n.SIGN_OUT="signOut";let T=()=>(0,d.$)("user"),p=e=>e?{attributes:{...e.attributes,loveveryId:e.attributes["custom:account_manager_id"]}}:null,I=(0,a.createContext)({}),f=()=>(0,a.useContext)(I),h=e=>{let{children:t}=e,[r,n]=(0,a.useState)(T),[i,f]=(0,a.useState)(!0),[h,R]=(0,S._)("le-user-jwt",null),A=e=>{(0,d.setLocalStorage)("user",e),n(e)},O=()=>{let e="lovevery.com";s.Z.remove(E.Pc,{path:"/",domain:e}),s.Z.remove(c.a,{path:"/",domain:e})},N=(0,a.useCallback)(e=>{A(p(e))},[]),m=(0,a.useCallback)(()=>{var e;A(null),O(),null===(e=window.adaEmbed)||void 0===e||e.deleteHistory(),localStorage.removeItem("ada-embed_is-drawer-open")},[]),v=(0,a.useCallback)(e=>{let{event:t,data:r}=e;switch(t){default:return;case"signIn":N(r);return;case"signOut":m();return}},[N,m]),U=(0,a.useCallback)(async()=>{try{var e,t;let r=await l.g.currentAuthenticatedUser();if("custom:account_manager_id"in(null==r?void 0:null===(t=r.signInUserSession)||void 0===t?void 0:null===(e=t.idToken)||void 0===e?void 0:e.payload)||(await r.refreshSession(r.signInUserSession.refreshToken),r=await l.g.currentAuthenticatedUser({bypassCache:!0})),r&&r.signInUserSession&&r.signInUserSession.idToken)return r}catch(e){return null}},[]),D=(0,a.useCallback)(async()=>{try{let e=await U(),t=p(e);return A(t),f(!1),{error:null}}catch(e){return A(null),f(!1),{error:e}}},[]),L=async(e,t,r)=>{let n={email:e,...r},i=(0,u.Z)();try{return await l.g.signUp({username:i,password:t,attributes:n,clientMetadata:{auto_confirm:"true",store_domain:"lovevery.com"}}),!0}catch(e){return console.error(e),!1}},y=async(e,t)=>{try{return await l.g.signIn(e,t),!0}catch(e){return console.error(e),!1}},b=async()=>{try{return await l.g.signOut(),A(null),{error:null}}catch(e){return console.error(e),{error:e}}},C=async()=>{try{let e=await l.g.currentSession();if(!e)return null;let{idToken:{jwtToken:t}}=e;return fetch("/api/save-user-jwt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userJwt:t})}),e.idToken.jwtToken}catch(e){return null}};return(0,a.useEffect)(()=>{_.X.listen("auth",e=>v(e.payload)),D()},[v,D]),(0,a.useEffect)(()=>{(async()=>{let e=await C();e&&R(e)})()},[]),(0,o.jsx)(I.Provider,{value:{user:r,authLoading:i,signUp:L,signIn:y,signOut:b,getAndCheckCognitoUser:U},children:t})};t.ZP=f},26059:function(e,t,r){"use strict";r.d(t,{GN:function(){return T}});var n=r(57437),i=r(63861),o=r(2265),a=r(17956),l=r(17922),_=r(70023),u=r(42586),s=r(23913),d=r(21909),E=r(68355),c=r(63353);let S=(0,o.createContext)({}),T=e=>{var t;let{children:r}=e,{data:T,isLoading:p,mutate:I,error:f}=(0,i.ZP)("/cart",()=>fetch("/api/cart",{cache:"no-cache"}).then(e=>e.json())),[h,R]=(0,o.useState)(!1),[A,O]=(0,o.useState)(null),N=(0,u.useLocale)(),{isReShopifyEnabled:m,isReady:v}=(0,c.J)();(0,o.useEffect)(()=>{(0,l.xT)(null!=T?T:null,p)},[T,p]);let U=null==T?void 0:null===(t=T.lines)||void 0===t?void 0:t.edges;(0,o.useEffect)(()=>{(null==U?void 0:U.length)&&Promise.resolve((0,_.DA)(U,N)).then(e=>{e&&(0,l.oI)(e)}).catch(e=>{console.error("[CartContext] Failed to sync Contentful enrichment for analytics",e)})},[U,N]),(0,o.useEffect)(()=>{if(!v||!(null==U?void 0:U.length)||h)return;let e=Array.from(new Set(m?[...(0,s.KI)(U),...(0,s.ac)(U)]:[...(0,s.Ee)(U),...(0,s.Lw)(U)]));if(0===e.length)return;let t=new AbortController;return(0,a.h2)(e,{},t.signal).then(e=>{e.ok?I(e.data,{revalidate:!1}):console.error("[CartContext] Failed to remove incompatible subscription items after ReShopify flag change")}).catch(e=>{e instanceof Error&&"AbortError"===e.name||console.error("[CartContext] Error removing incompatible subscription items after ReShopify flag change",e)}),()=>{t.abort()}},[m,v,U,h,I]);let D=(0,o.useRef)(null),L=(0,o.useRef)(null),y=(0,o.useCallback)(async(e,t)=>{var r,n,i,o,l;if(!(null==T?void 0:T.id))return;let u=e.id,s=null===(r=T.lines.edges.find(e=>
1e.node.id===u))||void 0===r?void 0:r.node;if(!s)return;D.current&&D.current.abort(),D.current=new AbortController;let c=D.current.signal;R(!0);let S=T.lines.edges.map(e=>e.node.id===u?(0,_.Tb)(e,t):e),p={...T,lines:{edges:S},totalQuantity:(0,_.lE)(S)};try{let r=await I((0,a.xu)([{id:u,quantity:t}],{},c).then(async e=>{if(!e.ok)throw Error(e.errorMessage||"Failed to update cart");return e.data}),{optimisticData:p,rollbackOnError:!0,revalidate:!1});(0,E.C)(null!==(n=null==r?void 0:r.id)&&void 0!==n?n:T.id),(0,d.x2)({item:e,oldQuantity:s.quantity,newQuantity:t}),O(null)}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw O("Item quantity couldnât be changed. Please try again."),console.error("[Cart Error] Update quantity failed:",{lineId:u,itemTitle:null===(o=s.merchandise)||void 0===o?void 0:null===(i=o.product)||void 0===i?void 0:i.title,newQuantity:t,error:e}),null===(l=window)||void 0===l||l.scrollTo({top:0,behavior:"smooth"}),e}finally{R(!1),D.current=null}},[T,I]),b=(0,o.useCallback)(async e=>{var t,r,n;if(!(null==T?void 0:T.id)||0===e.length)return;D.current&&D.current.abort(),D.current=new AbortController;let i=D.current.signal;R(!0);let o=new Map(e.map(e=>{let{item:t,quantity:r}=e;return[t.id,r]})),l=T.lines.edges.map(e=>{let t=o.get(e.node.id);return void 0!==t?(0,_.Tb)(e,t):e}),u={...T,lines:{edges:l},totalQuantity:(0,_.lE)(l)};try{let n=e.map(e=>{let{item:t,quantity:r}=e;return{id:t.id,quantity:r}}),o=await I((0,a.xu)(n,{},i).then(async e=>{if(!e.ok)throw Error(e.errorMessage||"Failed to update cart");return e.data}),{optimisticData:u,rollbackOnError:!0,revalidate:!1});for(let{item:n,quantity:i}of((0,E.C)(null!==(t=null==o?void 0:o.id)&&void 0!==t?t:T.id),e)){let e=null===(r=T.lines.edges.find(e=>e.node.id===n.id))||void 0===r?void 0:r.node;e&&(0,d.x2)({item:n,oldQuantity:e.quantity,newQuantity:i})}O(null)}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw O("Item quantity couldnât be changed. Please try again."),null===(n=window)||void 0===n||n.scrollTo({top:0,behavior:"smooth"}),e}finally{R(!1),D.current=null}},[T,I]),C=(0,o.useCallback)(async e=>{var t,r;let{itemsToRemove:n,swap:i}=e;if(!(null==T?void 0:T.id))return;R(!0);let o=new Set(n.map(e=>e.id)),l=T.lines.edges.filter(e=>!o.has(e.node.id)).map(e=>{if(e.node.id!==i.item.id||!i.optimisticMerchandise)return e;let{product:t,...r}=i.optimisticMerchandise,n=e.node.merchandise.product;
1return{...e,node:{...e.node,merchandise:{...e.node.merchandise,...r,product:n&&t?{...n,...t}:n}}}}),u={...T,lines:{edges:l},totalQuantity:(0,_.lE)(l)};try{let e=[...n.map(e=>({id:e.id,quantity:0})),{id:i.item.id,quantity:i.item.quantity,merchandiseId:i.merchandiseId}],r=await I((0,a.xu)(e,{}).then(async e=>{if(!e.ok)throw Error(e.errorMessage||"Failed to update cart");return e.data}),{optimisticData:u,rollbackOnError:!0,revalidate:!1});(0,E.C)(null!==(t=null==r?void 0:r.id)&&void 0!==t?t:T.id),n.forEach(e=>(0,d.CL)({item:e})),O(null)}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw O("Item couldnât be removed. Please try again."),null===(r=window)||void 0===r||r.scrollTo({top:0,behavior:"smooth"}),e}finally{R(!1)}},[T,I]),P=(0,o.useCallback)(async e=>{var t,r,n,i,o;if(!(null==T?void 0:T.id))return;let l=e.id,u=null===(t=T.lines.edges.find(e=>e.node.id===l))||void 0===t?void 0:t.node;if(!u)return;L.current&&L.current.abort(),L.current=new AbortController;let c=L.current.signal;R(!0);let S=(0,s.Dw)(l,T.lines.edges),p=S.length>0,f=p?S:[l],h=new Set(f),A=T.lines.edges.filter(e=>!h.has(e.node.id)),N={...T,lines:{edges:A},totalQuantity:(0,_.lE)(A)};try{let t=(0,a.h2)(f,{},c).then(async e=>{if(!e.ok)throw Error(e.errorMessage||(p?"Failed to remove subscription and its addons from cart":"Failed to remove item from cart"));return e.data}),n=await I(t,{optimisticData:N,rollbackOnError:!0,revalidate:!1});(0,E.C)(null!==(r=null==n?void 0:n.id)&&void 0!==r?r:T.id),(0,d.CL)({item:e}),O(null)}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw O("Item wasnât removed. Please try again."),console.error("[Cart Error] Remove item failed:",{lineId:l,itemTitle:null===(i=u.merchandise)||void 0===i?void 0:null===(n=i.product)||void 0===n?void 0:n.title,error:e}),null===(o=window)||void 0===o||o.scrollTo({top:0,behavior:"smooth"}),e}finally{R(!1),L.current=null}},[T,I]),g=(0,o.useCallback)(async e=>{var t,r;if(!(null==T?void 0:T.id)||0===e.length)return;L.current&&L.current.abort(),L.current=new AbortController;let n=L.current.signal;R(!0);let i=new Set(e.map(e=>e.id)),o=T.lines.edges.filter(e=>!i.has(e.node.id)),l={...T,lines:{edges:o},totalQuantity:(0,_.lE)(o)};try{let r=await I((0,a.h2)([...i],{},n).then(async e=>{if(!e.ok)throw Error(e.errorMessage||"Failed to remove items from cart");return e.data}),{optimisticData:l,rollbackOnError:!0,revalidate:!1});for(let n of((0,E.C)(null!==(t=null==r?void 0:r.id)&&void 0!==t?t:T.id),e))(0,d.CL)({item:n});O(null)}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw O("Item wasnât removed. Please try again."),null===(r=window)||void 0===r||r.scrollTo({top:0,behavior:"smooth"}),e}finally{R(!1),L.current=null}},[T,I]),M=(0,o.useCallback)(()=>{O(null)},[]),B=(0,o.useCallback)(async(e,t,r,n,i,o)=>{if(null==T?void 0:T.id){R(!0);try{let l=await (0,a.Xq)(e,t,{noredirect:1});if(!l.ok){let e=Error(l.errorMessage||"Failed to add item to cart");throw console.error("[Cart] Failed to add item to cart:",e),e}let _=l.data;await I(_,{rollbackOnError:!0,revalidate:!0}),(0,E.C)(_.id),(0,d.Kc)({item:r,quantity:t,selectedVariantIndex:n,component:i,analyticsProps:o})}catch(e){if(e instanceof Error&&"AbortError"!==e.name)throw console.error("[Cart] Failed to add item to cart:",e),e}finally{R(!1)}}},[T,I]),w=(0,o.useCallback)(async()=>{T&&await (0,_.S7)(T,a.xu,I,R,O)},[T,I]);return(0,n.jsx)(S.Provider,{value:{cart:T||null,isLoading:p,error:f,cartError:A,updateQuantity:y,batchUpdateQuantities:b,removeItem:P,removeItems:g,swapCartLines:C,addToCart:B,convertCartItemsToHidden:w,isMutating:h,clearCartError:M,setCartError:O},children:r})};t.ZP=()=>{let e=(0,o.useContext)(S);if(!e)throw Error("useCartContext must be used within a CartContextProvider");return e}},52246:function(e,t,r){"use strict";r.d(t,{Pc:function(){return u},qR:function(){return d}});var n=r(57437),i=r(2265),o=r(64131),a=r(99376),l=r(71245),_=r(10094);let u="lovevery_user_subscriptions",s=(0,i.createContext)({}),d=e=>{var t;let{children:r}=e,{user:d}=(0,l.ZP)(),E=(0,a.usePathname)(),[c,S]=(0,i.useState)(),T=null==d?void 0:null===(t=d.attributes)||void 0===t?void 0:t.loveveryId;(0,i.useEffect)(()=>{let e=o.Z.get(u);S(e?JSON.parse(e):void 0)},[E]);let p=T&&void 0===c,{data:I,loading:f,error:h}=(0,_.k)(p?T:null);(0,i.useEffect)(()=>
1{if(void 0===I)return;let e={isActiveSubscriber:I.active,isAgedOutSubscriber:I.aged_out,summary:I.summary_status};S(e);let t="localhost"===window.location.hostname;o.Z.set(u,JSON.stringify(e),{path:"/",domain:t?"localhost":"lovevery.com",sameSite:"Strict",secure:!t})},[I]);let R=(0,i.useMemo)(()=>({data:c,loading:f,error:null!=h?h:void 0}),[c,f,h]);return(0,n.jsx)(s.Provider,{value:R,children:r})};t.ZP=()=>(0,i.useContext)(s)},21467:function(e,t,r){"use strict";var n,i;r.d(t,{T:function(){return n}}),(i=n||(n={})).ENABLE_BFCM="enable-bfcm",i.COMMIT_AVATAX_TRANSACTIONS="commit-avatax-transactions",i.SUBFLOW_V2_BOOKS_ADDON_MVP_ENABLED="subflow_v2_books_addon_mvp_enabled",i.SUBFLOW_V2_BOOKS_ADDON_SUPPORTED_LANGUAGES="subflow_v2_books_addon_supported_languages",i.SUBFLOW_V2_ENABLE_PREVIOUS_PLAY_ADD_ONS="subflow_v2_enable_previous_play_add_ons",i.SUBFLOW_V2_ENABLE_4YO_SCHEDULE="subflow_v2_enable_4yo_schedule",i.SUBFLOW_V2_ENABLE_3YO_SCHEDULE="subflow_v2_enable_3yo_schedule",i.SUBFLOW_V2_IS_INTL_STORE="subflow_v2_is_intl_store",i.UPDATED_CHECKOUT_COPY="updated-checkout-copy",i.RETENTION_TEMPORARY_ENABLE_FUND_KIT="retention_temporary_enable-fund-kit",i.SRS_TEMPORARY_DISABLE_SHOPIFY_ORDERS="srs_temporary_disable-shopify-orders",i.MONEY_USER_REFERRAL_CREDIT="money-user-referral-credit",i.MUTUALLY_EXCLUSIVE_SUB_FLOW_EXPERIMENT_PREREQ="mutually-exclusive-sub-flow-experiment-prereq",i.RETENTION_PERMANENT_ENABLE_EASYPOST_TRACKING="retention_permanent-enable-easypost-tracking",i.RETENTION_PERMANENT_ENABLE_ADDRESS_HOLDS="retention_permanent-enable-address-holds",i.RETENTION_PERMANENT_EXPIRED_HOLDS_CRON_SCHEDULE="retention_permanent-expired-holds-cron-schedule",i.RETENTION_TEMPORARY_ALLOW_UNVERIFIED_ADDRESS_FULFILLMENT="retention_temporary-allow-unverified-address-fulfillment",i.READING_SKILL_SET="reading-skill-set",i.RETENTION_PERMANENT_ADDRESS_VERIFICATION="retention_permanent-address-verification",i.RETENTION_ENABLE_SMS_MESSAGING="retention-enable-sms-messaging",i.GROWTH__ENABLE_CHECKOUT_REWRITE="growth__enable-checkout-rewrite",i.RETENTION_ENABLE_EMAILS_AND_PUSH_NOTIFICATIONS="retention-enable-emails-and-push-notifications",i.GROWTH_ENABLE_WHATS_APP_WIDGET="growth_enable-whats-app-widget",i.GROWTH_CHECKOUT_DISCOUNT_CODE_FIELD_DEFAULT_STATE="growth_checkout-discount-code-field-default-state",i.GROWTH_ENABLE_FORGET_SOMETHING_BANNER="growth-enable-forget-something-banner",i.GROWTH_ENABLED_PICK_UP_WHERE_YOU_LEFT_OFF_BANNER="growth-enabled-pick-up-where-you-left-off-banner",i.MONEY_ENABLE_BFCM_2024="money_enable-bfcm-2024",i.RETENTION_ENABLE_SUBSCRIPTION_V_2_PAGE="retention-enable-subscription-v-2-page",i.RETENTION_ENABLE_EXTENSION_REACTIVATION_V_2="retention_enable-extension-reactivation-v-2",i.GROWTH_ENABLE_CHAT_WIDGET="growth_enable-chat-widget",i.SAMPLE_FEATURE="sample-feature",i.GROWTH_SERVER_SIDE_CHECKOUT_ANALYTICS="growth-server-side-checkout-analytics",i.RETENTION_ENABLE_POWERED_BY_PG_LOGO="retention-enable-powered-by-pg-logo",i.GROWTH_CHECKOUT_AUTO_APPLY_CODE="growth_checkout-auto-apply-code",i.RETENTION_ENABLE_INTERMEDIATE_CART_UPSELL_PAGE="retention_enable-intermediate-cart-upsell-page",i.MONEY="money",i.MONEY_ENABLE_BFCM_2024_HOMEPAGE="money-enable-bfcm-2024-homepage",i.RETENTION_ENABLE_ADA="retention-enable-ada",i.RETENTION_ENABLE_WHATS_APP_WIDGET="retention-enable-whats-app-widget",i.MONEY_ENABLE_BACKORDER_MESSAGE_THE_MUSIC_SET="money_enable-backorder-message-the-music-set",i.GROWTH_PDP_FLEXIBILITY="growth_pdp-flexibility",i.RETENTION_ENABLE_ADA_GREETING="retention-enable-ada-greeting",i.GROWTH_20241211_A_A="growth_20241211-A-A",i.GROWTH_ENABLE_LINK_PAYMENT="growth_enable-link-payment",i.GROWTH_CHECKOUT_EXPERIMENT_V4_LIVE="growth_checkout-experiment-v4-live",i.GROWTH_CHECKOUT_EXPERIMENT_V5_LIVE="growth_checkout-experiment-v5-live",i.SUB_SQUAD_ADA_ENVIRONMENT="sub-squad-ada-environment",i.SUB_SQUAD_ENABLE_THE_READING_CLUB_LP="sub-squad-enable-the-reading-club-lp",i.MONEY_CONTENTFUL_DRAFT_MODE="money_contentful-draft-mode",i.SUB_SQUAD_ENABLE_SHOP_ALL_NAVIGATION_DROPDOWN="sub-squad-enable-shop-all-navigation-dropdown",i.SRS_ALLOW_0_DISCOUNT_CODE="srs-allow-0-discount-code",i.SUB_SQUAD_ENABLE_TABS_ON_RSS_PDP="sub-squad-enable-tabs-on-rss-pdp",i.MONEY_SUBCA_MVP="money_subca_mvp",i.MONEY_ENABLE_FULFILLABLE_LINE_ITEMS="money_enable-fulfillable-line-items",i.SUB_SQUAD_ENABLE_TARIFF="sub-squad-enable-tariff",i.MONEY_1699_FLAGGED_FREE_COURSES="money-1699-flagged-free-courses",i.MONEY_ENABLE_SUBSCRIBE_AND_SAVE="money_enable-subscribe-and-save",i.SUB_SQUAD_ENABLE_BABYLIST_SHIPPING_ADJUSTMENT="sub-squad-enable-babylist-shipping-adjustment",i.MONEY_ENABLE_INDIVIDUAL_PLAYTHINGS="money_enable-individual-playthings",i.MONEY_1895_PLAY_KIT_SUBSCRIBER_STATUS_UPDATE="MONEY-1895-play-kit-subscriber-status-update",i.SUB_SQUAD_COMPONENT_LIBRARY="sub-squad-component-library",i.TEMPORARY_MONEY_BATH_SET_LAUNCH="temporary_money-bath-set-launch",i.MONEY_1927_SUB_ENGINE_SUBSCRIBER_STATUS_UPDATE="MONEY-1927-sub-engine-subscriber-status-update",i.MONEY_BATH_SET_PDP="money_bath-set-pdp",i.TEMPORARY_MONEY_LIST_SEGMENT_POC="temporary_money-list-segment-poc",i.MONEY_RESALE_VALUE_ON_PLK_PDP="money_resale-value-on-
1plk-pdp",i.HIDE_URL_PRODUCTS_BATH_SET_WITH_FEATURE_FLAG="HIDE_URL_products-bath-set-with-feature-flag",i.HIDE_URL_PRODUCTS_THE_BATH_SET="HIDE_URL_products-the-bath-set",i.SUB_SQUAD_ENABLE_ERC_PAUSE_STATE="sub-squad-enable-erc-pause-state",i.MONEY_RESALE_VALUE_ON_PLK_PDP_V2="money_resale-value-on-plk-pdp-v2",i.MONEY_BFCM_MODE="money_bfcm-mode",i.SUB_SQUAD_ENABLE_DISCOUNT_DOLLAR_SAVINGS="sub-squad-enable-discount-dollar-savings",i.SUB_SQUAD_NO_DOB_ABC="sub-squad-no-dob-abc",i.MONEY_ACCEPT_CLUTCH_GIFTCARDS_IN_PLAYGENIUS="money-accept-clutch-giftcards-in-playgenius",i.SUB_SQUAD_NO_DOB_2187="sub-squad-no-dob-2187",i.SUB_SQUAD_ERC_CTA_2146="sub-squad-erc-cta-2146",i.SUB_SQUAD_PUF_PRICING_2193="sub-squad-puf-pricing-2193",i.MONEY_2178_UI_ENABLE_MULTIPLE_GIFT_CARDS="money-2178-ui-enable-multiple-gift-cards",i.HIDE_URL_PRODUCTS_MINI_KITS="HIDE_URL_products-mini-kits",i.HIDE_URL_PRODUCTS_TODDLER_FOOD_PREP_MINI_KIT="HIDE_URL_products-toddler-food-prep-mini-kit",i.HIDE_URL_PRODUCTS_TODDLER_ROUTINES_MINI_KIT="HIDE_URL_products-toddler-routines-mini-kit",i.HIDE_URL_PRODUCTS_TODDLER_EMOTIONS_MINI_KIT="HIDE_URL_products-toddler-emotions-mini-kit",i.HIDE_URL_PRODUCTS_TODDLER_SEQUENCING_MINI_KIT="HIDE_URL_products-toddler-sequencing-mini-kit",i.HIDE_URL_PRODUCTS_TODDLER_SORT_MATCH_MINI_KIT="HIDE_URL_products-toddler-sort-match-mini-kit",i.HIDE_URL_PRODUCTS_TODDLER_MOVEMENT_MINI_KIT="HIDE_URL_products-toddler-movement-mini-kit",i.HIDE_URL_PRODUCTS_BABY_CAUSE_EFFECT_MINI_KIT="HIDE_URL_products-baby-cause-effect-mini-kit",i.HIDE_URL_PRODUCTS_BABY_MOVEMENT_MINI_KIT="HIDE_URL_products-baby-movement-mini-kit",i.HIDE_URL_PRODUCTS_BABY_SENSORY_MINI_KIT="HIDE_URL_products-baby-sensory-mini-kit",i.MONEY_2209_DISCOUNT_STACKING_PREVENTION="money-2209-discount-stacking-prevention",i.HIDE_URL_PRODUCTS_THE_NEWBORN_GIFT_SET="HIDE_URL_products-the-newborn-gift-set",i.HIDE_URL_PRODUCTS_THE_PLAY_SPACE_COVER="HIDE_URL_products-the-play-space-cover",i.SUB_SQUAD_NAVIGATION_REDESIGN_2353="sub-squad-navigation-redesign-2353",i.MONEY_BFCM_DISCOUNT_PLAY_KIT_PDP="money_bfcm_discount_play_kit_pdp",i.MONEY_EARLY_DEC_SUB_CAMPAIGN="money_early-dec-sub-campaign",i.MONEY_BFCM_DISCOUNT_PLAY_KIT_PDP_LARGE="money_bfcm_discount_play_kit_pdp_large",i.MONEY_PUF_DISCOUNT_PLAY_KIT_PDP="money-puf-discount-play-kit-pdp",i.MONEY_PROMOTION_CAMPAIGN="money_promotion_campaign",i.SUB_SQUAD_BOOKS_OPT_OUT="sub-squad-books-opt-out",i.SUB_SQUAD_ERC_LP_HIDE_VALUE_PROP="sub-squad-erc-lp-hide-value-prop",i.SUB_SQUAD_SUBFLOW_KIT_SELECTION_EXPERIMENT="sub-squad-subflow-kit-selection-experiment",i.MONEY_HIDE_BOOK_BUNDLE_ADDON="money_hide-book-bundle-addon",i.SUB_SQUAD_BFCM_PROMO_CREDITS_BANNER="sub-squad-bfcm-promo-credits-banner",i.HIDE_URL_PRODUCTS_THE_PLAY_KITS_THE_CONNECTOR="HIDE_URL_products-the-play-kits-the-connector",i.HIDE_URL_PRODUCTS_THE_PLAY_KITS_THE_EXAMINER="HIDE_URL_products-the-play-kits-the-examiner",i.HIDE_URL_PRODUCTS_THE_PLAY_KITS_THE_PERSISTER="HIDE_URL_products-the-play-kits-the-persister",i.HIDE_URL_PRODUCTS_THE_PLAY_KITS_THE_PLANNER="HIDE_URL_products-the-play-kits-the-planner",i.MONEY_2694_ALLOW_FRONT_END_OVERRIDE="MONEY-2694-allow-front-end-override",i.MONEY_2693_SHOPIFY_SYNC_GRAPHQL="money-2693-shopify-sync-graphql",i.EVERGREEN_DISCOUNT_MESSAGING="evergreen-discount-messaging",i.SUB_SQUAD_PLAYGENIUS_CHECKOUT_AB_TEST="sub-squad-playgenius-checkout-ab-test",i.MONEY_2776_LARGE_PUF_UPDATE="money-2776-large-puf-update",i.MONEY_2813_UPSELL_RECOMMENDATION_SOURCE="money-2813-upsell-recommendation-source",i.MONEY_2870_UPSELL_RECOMMENDATION_SOURCE="money-2870-upsell-recommendation-source",i.MONEY_SQUAD_SITE_WIDE_GIFTING="money-squad-site-wide-gifting",i.SUB_SQUAD_HOMEPAGE_PLAY_KIT_GRID="sub-squad-homepage-play-kit-grid",i.HIDE_URL_PRODUCTS_ORGANIC_VEGGIE_BITES="HIDE_URL_products-organic-veggie-bites",i.HIDE_URL_PRODUCTS_THE_MATH_SKILL_SET="HIDE_URL_products-the-math-skill-set",i.HIDE_URL_PRODUCTS_PART_1_HANDS_ON_MATH="HIDE_URL_products-part-1-hands-on-math",i.HIDE_URL_PRODUCTS_PART_2_REAL_WORLD_MATH="HIDE_URL_products-part-2-real-world-math",i.HIDE_URL_PRODUCTS_OVB="HIDE_URL_products-ovb",i.SUB_SQUAD_KLARNA_PAYMENT_METHOD="sub-squad_klarna-payment-method",i.SUB_SQUAD_KLARNA_MESSAGING="sub-squad_klarna-messaging",i.MONEY_2937_FREE_SHIPPING_THRESHOLD="money-2937-free-shipping-threshold",i.EVERGREEN_DISCOUNT_MESSAGING_V2="evergreen-discount-messaging-v2",i.SUB_SQUAD_HOMEPAGE_KIT_SELECTION="sub-squad-homepage-kit-selection",i.SUB_SQUAD_ENABLE_YOTPO_CUTOVER="sub-squad-enable-yotpo-cutover",i.MONEY_SQUAD_MATH_SKILL_SETS="money-squad-math-skill-sets",i.SUB_SQUAD_TIERED_PLAY_KITS_PDP="sub-squad-tiered-play-kits-pdp",i.SUB_SQUAD_FREE_BOOK_BUNDLE="sub-squad-free-book-bundle",i.HIDE_URL_PRODUCTS_MSS_PART_1="hide-url-products-mss-part-1",i.HIDE_URL_PRODUCTS_MSS_PART_2="hide-url-products-mss-part-2",i.HIDE_URL_PAGES_MSS_LP="hide-url-pages-mss-lp",i.HIDE_URL_PRODUCTS_MSS_LP="hide-url-products-mss-lp",i.PROFILE_SYNC="profile_sync",i.ACCOUNT_MANAGER_ENABLE_PROFILE_SYNC="account-manager_enable-profile-sync",i.COMMUNITY_ACTIVITIES_V2_MATH_ENABLED="community_activities-v2-math-enabled",i.E_GIFT_CARD_REDEMPTIONS="e-gift-card-redemptions",i.E_GIFT_CARD_PURCHASES="e-gift-card-purchases",i.SUB_SQUAD_PK_IMAGES="sub-squad-pk-images",i.SUB_SQUAD_ORDER_REVIEW_IN_CART_EXPERIMENT="sub-squad-order-review-in-cart-experiment",i.MONEY_3152_MEMORY_INSTRUMENTATION="money-3152-memory-instrumentation",i.SUB_SQUAD_SUBDOMAIN_EXPERIMENT_ROUTING="sub-squad-subdomain-experiment-routing",i.MONEY_SQUAD_BUNDLE_DEFAULT_PDP="money-squad-bundle-default-pdp",i.MONEY_CONTENTFUL_TIMELINE_RELEASES="money-contentful-timeline-releases",i.SUB_SQUAD_SHOW_EDIT_AND_SHIP_KIT_NOW="sub-squad-show-edit-and-ship-kit-now",i.SUB_SQUAD_CUSTOMER_PORTAL_REDESIGN="sub-squad-customer-portal-redesign",i.MONEY_NECTAR_UGC="money_nectar_ugc",i.MONEY_MSS_SINGLE_PART_DEFAULT_PDP="money_mss-single-part-default-pdp",i.MONEY_MSS_PART_2_STANDALONE="money-mss-part-2-standalone",i.MONEY_IMPROVED_PDP_UPSELL="money-improved-pdp-upsell",i.SUB_SQUAD_PREPAY_SAVE_MIGRATION="sub-squad-prepay-save-migration",i.SUB_SQUAD_RE_SHOPIFY="sub-squad-re-shopify",i.MONEY_SHOPIFY_REFERRAL_MIGRATION="money-shopify-referral-migration",i.SUB_SQUAD_RE_SHOPIFY_HIDE_UNMIGRATED_ACTIONS="sub-squad-re-shopify-hide-unmigrated-actions"},63353:function(e,t,r){"use strict";r.d(t,{J:function(){return _}});
1var n=r(2265),i=r(97849),o=r(21467),a=r(48249),l=r(37416);let _=()=>{let e=(0,a.Z)(o.T.SUB_SQUAD_RE_SHOPIFY,"off"),t=(0,i.mC)(),[r,_]=(0,n.useState)(!1);(0,n.useEffect)(()=>{t&&t.waitForInitialization().then(()=>_(!0)).catch(()=>_(!0))},[t]);let u="b"===e;return(0,l.Z)("Sub Squad ReShopify",e,!1,!0),{isReShopifyEnabled:u,isReady:r}}},37416:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var n,i,o=r(2265),a=r(97849),l=r(17894);(n=i||(i={})).NO_CONTENT="no_content",n.NOT_APPLICABLE="not_applicable",n.OFF="off";let _=new Set;t.Z=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(0,a.mC)(),[u,s]=(0,o.useState)(!1);(0,o.useEffect)(()=>{i&&i.waitForInitialization().then(()=>s(!0)).catch(()=>s(!0))},[i]);let d=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!u||d.current===t)return;let i="".concat(e,":").concat(t);if(n&&_.has(i)){d.current=t;return}d.current=t,n&&_.add(i);let o=r||t;(0,l.j)("Experience Viewed",{name:e,evaluatedVersion:t,displayedVersion:o})},[u,e,t,r,n])}},48249:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n={};r.r(n),r.d(n,{name:function(){return _},useRule:function(){return u}});var i=r(97849);class o{getRule(e){return this.rules[e]||null}constructor(e){this.rules={},e.forEach(e=>{this.rules[e.name]=e.useRule})}}var a=r(71245),l=r(10094);let _="money_bfcm-mode";function u(e){var t;let{user:r}=(0,a.ZP)(),n=null==r?void 0:null===(t=r.attributes)||void 0===t?void 0:t["custom:account_manager_id"],i="presale"===e&&!!n,{data:o,error:_}=(0,l.k)(i?n:null);if("off"===e)return!1;if("all"===e)return!0;if("presale"===e){if(!n)return!1;if(_)return console.error("Error checking subscriber status:",_),!1;if(!o)return!1;let{aged_out:e,active:t}=o;return e||t}return!1}var s=new o([n]);function d(e,t){var r;let n=null===(r=(0,i.mC)())||void 0===r?void 0:r.getContext(),o=(0,i.Vb)()[e],a=void 0===o?t:o,l=s.getRule(e);return"function"==typeof l?l(a,n):a}},10094:function(e,t,r){"use strict";r.d(t,{k:function(){return l}});var n=r(63861),i=r(64277),o=r(25078);let a=async e=>{let t=await (0,i.vJ)(),r=await fetch(e,{method:"GET",headers:{Authorization:t}});if(!r.ok)throw Error(await (0,o.O1)(r)||"Failed to fetch subscriber statuses: ".concat(r.status," ").concat(r.statusText));return(0,o.R3)(r)};function l(e){let t=e?"".concat(o.Y9.SUBSCRIPTION_MANAGER_PROXY,"/subscriber_statuses/").concat(e):null,{data:r,error:i,isLoading:l,mutate:_}=(0,n.ZP)(t,a,{revalidateOnFocus:!0,shouldRetryOnError:!1,dedupingInterval:3e5});return{data:r,loading:l,error:null!=i?i:null,refetch:()=>_()}}},21909:function(e,t,r){"use strict";r.d(t,{CL:function(){return _},IG:function(){return s},Kc:function(){return l},ru:function(){return u},x2:function(){return a}});var n=r(47887);r(64277);var i=r(17894),o=r(70023);function a(e){var t;let{item:r,oldQuantity:o,newQuantity:a}=e,l=a-o;if(0===l)return;let _=d(r),u=_.variants[0],s=Math.abs(l);(0,n.AB)(l>0?"addToCart":"removeFromCart",{qtyVal:s,shopifyProduct:_,variant:u}),(0,i.n4)(l>0?i.I4.PRODUCT_ADDED:i.I4.PRODUCT_REMOVED,{url:window.location.pathname,productId:_.id,sku:u.sku,category:_.productType,name:_.title,price:(0,n.f1)(null===(t=u.price)||void 0===t?void 0:t.amount),quantity:s,component:i.Bk.QUANTITY_SELECTOR,pageType:i.yN.CART})}function l(e){var t;let{item:r,quantity:o,selectedVariantIndex:a,component:l,analyticsProps:_}=e,u=d(r),s=u.variants[a];(0,n.AB)("addToCart",{qtyVal:o,shopifyProduct:u,variant:u.variants[a]}),(0,i.n4)(i.I4.PRODUCT_ADDED,{url:window.location.pathname,productId:u.id,sku:s.sku,category:u.productType,name:u.title,price:(0,n.f1)(null===(t=s.price)||void 0===t?void 0:t.amount),quantity:o,component:l,pageType:i.yN.CART,..._})}function _(e){var t;let{item:r}=e,o=d(r),a=o.variants[0];(0,n.AB)("removeFromCart",{qtyVal:r.quantity,shopifyProduct:o,variant:o.variants[0]}),(0,i.n4)(i.I4.PRODUCT_REMOVED,{url:window.location.pathname,productId:o.id,sku:a.sku,category:o.productType,name:o.title,price:(0,n.f1)(null===(t=a.price)||void 0===t?void 0:t.amount),quantity:r.quantity,component:i.Bk.PRODUCT_CARD,pageType:i.yN.CART})}function u(e){let{url:t,cta:r}=e;(0,i.__)({url:t,type:i.Po.BUTTON,pageLocation:i.g8.CART,cta:r})}function s(e){let{items:t}=e,r={event:"continueToCheckout",cartTotal:(0,o.cz)(t),ecommerce:{currencyCode:t[0].currency,checkout:{actionField:{step:1},products:t.map(E)}}},{event:a,...l}=r;(0,n.y_)(r),(0,i.j)(a,l)}function d(e){return{id:e.variantId,title:e.title,handle:e.handle,productType:e.productType,tags:e.tags,variants:e.variants}}function E(e){var t,r;return{name:e.title,id:e.sku,productId:null===(t=e.id)||void 0===t?void 0:t.toString(),variantId:null===(r=e.variantId)||void 0===r?void 0:r.toString(),price:e.price,brand:"Lovevery",variant:e.variantTitle,quantity:e.quantity,category:e.productType}}},65186:function(e,t,r){"use strict";r.d(t,{At:function(){return u},Es:function(){return c},Nu:function(){return s},Sp:function(){return p},UU:function(){return a},Zt:function(){return l},l7:function(){return E},lU:function(){return S},nD:function(){return T},tS:function(){return _}});var n=r(90724),i=r(72990),o=r(57059);function a(e,t,r){return(0,o.bL)(t,e.attributes)===r}function l(e){return!!e&&(_(e)||u(e))}function _(e){return e===i.Z7.EARLY_READER_CLUB}function u(e){return!!e&&e===i.Z7.EARLY_READER_CLUB_RESHOPIFY}function s(e){if(!e)return!1;let t=(0,o.bL)(n.bp.ProductType,e);return!!t&&l(t)}
1function d(e){return a(e,n.bp.IsReShopifyBookBundleAddon,"true")}function E(e){return a(e,n.bp.IsPlayKitSubscriptionBookBundleAddon,"true")||d(e)}function c(e){return a(e,n.bp.IsReShopifyPlayKitSubscription,"true")}function S(e){return!!(0,o.bL)(n.bp.SubscriptionUuid,e.attributes)}function T(e){return c(e)||d(e)}function p(e){var t,r;return e?null===(r=e.lines)||void 0===r?void 0:null===(t=r.edges)||void 0===t?void 0:t.find(e=>{var t;return!!(t=null==e?void 0:e.node)&&("true"===(0,o.bL)(n.bp.IsPlaygeniusSubscription,t.attributes)||c(t))}):null}},23913:function(e,t,r){"use strict";r.d(t,{Dw:function(){return S},ac:function(){return s},KI:function(){return u},Lw:function(){return E},Ee:function(){return d},FI:function(){return c}});var n=r(70023),i=r(65186),o=r(17956),a=r(64277),l=r(67637);let _=new Set(["the-play-kits-the-looker","the-play-kits-the-charmer","the-play-kits-the-senser","the-play-kits-the-inspector","the-play-kits-the-explorer","the-play-kits-the-thinker","the-play-kits-the-babbler","the-play-kits-the-adventurer","the-play-kits-the-realist","the-play-kits-the-companion","the-play-kits-the-helper","the-play-kits-the-enthusiast","the-play-kits-the-researcher","the-play-kits-the-free-spirit","the-play-kits-the-observer","the-play-kits-the-storyteller","the-play-kits-the-problem-solver","the-play-kits-the-analyst","the-play-kits-the-connector","the-play-kits-the-examiner","the-play-kits-the-persister","the-play-kits-the-planner"]);function u(e){let t=e.filter(e=>{var t;let{node:r}=e;return(null===(t=r.merchandise.product)||void 0===t?void 0:t.handle)===l.m5.LOVEVERY_SUBSCRIPTION&&!(0,i.lU)(r)}),r=new Set;return t.forEach(t=>{let{node:n}=t;S(n.id,e).forEach(e=>r.add(e))}),e.forEach(e=>{var t;let{node:n}=e,i=null===(t=n.merchandise.product)||void 0===t?void 0:t.handle;i&&_.has(i)&&r.add(n.id)}),Array.from(r)}function s(e){return e.filter(e=>{var t;let{node:r}=e;return(0,i.tS)(null===(t=r.merchandise.product)||void 0===t?void 0:t.productType)}).map(e=>{let{node:t}=e;return t.id})}function d(e){return e.filter(e=>{let{node:t}=e;return(0,i.nD)(t)}).map(e=>{let{node:t}=e;return t.id})}function E(e){return e.filter(e=>{var t;let{node:r}=e;return(0,i.At)(null===(t=r.merchandise.product)||void 0===t?void 0:t.productType)}).map(e=>{let{node:t}=e;return t.id})}async function c(e){let t=function(e){if(!(e.filter(e=>{var t;let{node:r}=e;return(null===(t=r.merchandise.product)||void 0===t?void 0:t.handle)===l.m5.LOVEVERY_SUBSCRIPTION}).length>1))return[];let t=e.filter(e=>{var t;let{node:r}=e;return(null===(t=r.merchandise.product)||void 0===t?void 0:t.handle)===l.m5.LOVEVERY_SUBSCRIPTION}).slice(0,-1),r=new Set;return t.forEach(t=>{let{node:n}=t;S(n.id,e).forEach(e=>r.add(e))}),Array.from(r)}(e),r=e.some(e=>{var t,r;let{node:n}=e;return(null===(t=n.merchandise.product)||void 0===t?void 0:t.handle)&&("reading-skill-set"===(r=n.merchandise.product.handle)||"the-complete-reading-skill-set"===r)})?e.filter(e=>{var t,r,n,i;let{node:o}=e;return(null===(t=o.merchandise.product)||void 0===t?void 0:t.handle)&&null!==(i=null==(r=o.merchandise.product.handle)?void 0:null===(n=r.startsWith)||void 0===n?void 0:n.call(r,"reading-skill-set-part-"))&&void 0!==i&&i}).map(e=>{let{node:t}=e;return t.id}):[],_=Array.from(new Set([...t,...r,...function(e){let t=[];return e.filter(e=>{var t;let{node:r}=e;return(null===(t=r.merchandise.product)||void 0===t?void 0:t.handle)===l.m5.LOVEVERY_SUBSCRIPTION}).forEach(r=>{let{node:i}=r,o=function(e,t){var r,i;let o=null===(r=t.find(t=>{let{node:r}=t;return r.id===e}))||void 0===r?void 0:r.node;if(!o||(null===(i=o.merchandise.product)||void 0===i?void 0:i.handle)!==l.m5.LOVEVERY_SUBSCRIPTION)return[];let a=[];return t.forEach(e=>{let{node:t}=e;(0,n.Z4)(t,o)&&a.push(t.id)}),a}(i.id,e);if(o.length>1){let e=o.slice(1);t.push(...e)}}),t}(e),...function(e){if(0===e.length)return[];let t=new Map,r=new Map;e.forEach(e=>{let{node:i}=e,o=(0,n.TF)(i.attributes||[]);t.set(i.id,o),r.set(i.id,(0,n.tV)(o))});let i=new Map,o=new Map;if(e.forEach(e=>{var t;let{node:n}=e;if((null===(t=n.merchandise.product)||void 0===t?void 0:t.handle)!==l.m5.LOVEVERY_SUBSCRIPTION)return;let a=r.get(n.id);if(!a)return;let _=a("subscriptionsPayload");if(!_)return;let u=function(e){let t;let r=[],n=/"variantId"\s*=>\s*"(\d+)"/g;for(;null!==(t=n.exec(e));)r.push(t[1]);return r}(_);u.length>0&&(i.set(n.id,new Set(u)),o.set(n.id,n))}),0===i.size)return[];let _=[],u=new Set;
1return e.forEach(e=>{let{node:t}=e;if(u.has(t.id))return;let l=r.get(t.id);if(!l||"true"!==l("is_book_bundle"))return;let s=(0,a.Vv)(t.merchandise.id);s&&o.forEach((e,r)=>{if((0,n.Z4)(t,e)){let e=i.get(r);e&&!e.has(s)&&(_.push(t.id),u.add(t.id))}})}),_}(e),...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=Math.max(0,t),n=e.filter(e=>{let{node:t}=e;return(0,i.Nu)(t.attributes)}),o=n.reduce((e,t)=>{var r;let{node:n}=t;return e+(null!==(r=n.quantity)&&void 0!==r?r:1)},0),a=[];for(let{node:e}of n){var l;if(o<=r)break;a.push(e.id),o-=null!==(l=e.quantity)&&void 0!==l?l:1}return a}(e)]));if(_.length>0)try{let t=await (0,o.h2)(_);if(t.ok&&"data"in t)return t.data.lines.edges;{console.error("Failed to remove incompatible items from cart");let t=new Set(_);return e.filter(e=>{let{node:r}=e;return!t.has(r.id)})}}catch(r){console.error("Error removing incompatible items from cart:",r);let t=new Set(_);return e.filter(e=>{let{node:r}=e;return!t.has(r.id)})}return e}function S(e,t){var r,o;let a=null===(r=t.find(t=>{let{node:r}=t;return r.id===e}))||void 0===r?void 0:r.node;if(!a)return[];if((0,i.Es)(a))return[e,...t.filter(t=>{let{node:r}=t;return r.id!==e&&(0,n.NF)(r,a)}).map(e=>{let{node:t}=e;return t.id})];if((null===(o=a.merchandise.product)||void 0===o?void 0:o.handle)!==l.m5.LOVEVERY_SUBSCRIPTION)return[];let _=new Set;return _.add(e),t.forEach(e=>{let{node:t}=e;(0,n.Z4)(t,a)&&_.add(t.id)}),Array.from(_)}},77727:function(e,t,r){"use strict";r.d(t,{$:function(){return n},setLocalStorage:function(){return i}});let n=e=>{let t=localStorage.getItem(e);if(null!==t)try{return JSON.parse(t)}catch(e){return t}return null},i=function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t;t&&r&&(n=JSON.stringify(t)),localStorage.setItem(e,n)}},78724:function(e,t,r){"use strict";r.d(t,{a:function(){return i},g:function(){return o}});var n=r(64131);let i="lovevery_return_url",o=e=>{let t=e.target.closest("a");if(!(null==t?void 0:t.href.includes("/account/login")))return;let{hostname:r,href:o}=window.location;n.Z.set(i,encodeURIComponent(o),{domain:"localhost"!==r?"lovevery.com":void 0,path:"/",sameSite:"Strict",secure:!0})}}}]);
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.