1import{c as j,r as y,j as e,u as T,a as W,d as H,g as B,i as D,b as A,L as E,F as P,X as G}from"./index-BH2WGL7k.js";import{H as I,F as z}from"./Footer-DpGOUQej.js";import{R as O,a as U}from"./Reviews-C8CAgCwX.js";import{u as q}from"./useCartSync-DgfuTQ5c.js";import{u as Y}from"./cartStore-DOWc1sQh.js";import"./logo-BAsKjnUy.js";const V=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],X=j("chevron-down",V);const J=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],F=j("chevron-left",J);const K=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],M=j("chevron-right",K);const Z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Q=j("info",Z);const ee=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],te=j("shield-check",ee);const ae=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
1],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],se=j("sparkles",ae),ne=["Magic Mirror Affirmation Chart","Mindchild","Why You'll Love It This","Why You'll Love It","Why You Love It","Why Families Love It","What You Get","What's Inside","What's Included","How It Works","How To Use","How to Use","The Magic Inside","Perfect For Families","Perfect For","Safety & Care","Our Mission","A Note for Grown-Ups","A Note for Parents","Enchanting Affirmations","Interactive and Joyful","Daily Affirmations","Interactive Family Ritual"],ie=["Small Parts Warning","Inspect Regularly","Material Safety","Care Instructions","Shipping","Disclaimer","Ages"],re="Ignite|Spark|Create|Grow|Inspire|Build|Builds|Helps|Strengthens|Encourages|Develops|Promotes|Use|Place|Hang|Add|Designed|Made|Crafted|Educators|Parents|Caregivers|Teachers|Gift|Gifts|Families|Kids|Children|One|Two|Three|Each|Every|All|Both";function L(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/['\u2018\u2019]/g,"[''ââ]")}function oe(r){let t=r.replace(/\r\n/g,` 2`).replace(/\s+/g," ").trim();t=t.replace(/\s*â¨\s*/g," ⨠");const h=ie.filter(n=>n!=="Ages").map(L).join("|"),o=ne.map(L).join("|"),u=new RegExp(`(?:\\u2728\\s*)?\\b(?:(${o})|(${h})\\s*:?\\s*|Ages\\s+(\\d+\\+?))\\b`,"g");t=t.replace(u,(n,p,m,f)=>p?` 3@@H:${p}@@ `:f?` 4@@N:Ages|${f}@@ `:` 5@@N:${m}|@@ `),t=t.replace(/\u2728/g," ").replace(/[ \t]+/g," ");const v=[],k=/@@([HN]):([^@]+)@@/g;let c=0,s="",l=null;const b=n=>{if(n=n.trim(),!l){s+=" "+n;return}l.body=n,v.push(l),l=null};let d;for(;d=k.exec(t);){const n=t.slice(c,d.index);if(b(n),c=d.index+d[0].length,d[1]==="H")l={kind:"heading",value:d[2].trim(),body:""};else{const[p,m]=d[2].split("|");l={kind:"note",label:p.trim(),value:(m||"").trim(),body:""}}}b(t.slice(c));const w=[];if(s=s.trim(),s){const n=s.match(/[^.!?]+[.!?]+/g)||[s],p=n[0].trim();w.push({kind:"lead",text:p});const m=n.slice(1).join(" ").trim();m&&$(m,w)}for(const n of v)if(n.kind==="heading"){const p=/Enchanting Affirmations|Interactive and Joyful|Daily Affirmations|Interactive Family Ritual/.test(n.value);if(w.push({kind:"heading",text:n.value,tone:p?"sub":"section"}),/What You Get|What's Inside|What's Included|Perfect For|The Magic Inside|Why Families Love It/i.test(n.value)){const f=le(n.body);if(f.length>=2){w.push({kind:"list",items:f});continue}}n.body&&$(n.body,w)}else if(n.kind==="note"){const p=n.value?`${n.label} ${n.value}`:n.label;w.push({kind:"note",label:p,text:n.body})}return w}function $(r,t){const h=r.match(/[^.!?]+[.!?]+/g)||[r];for(let o=0;o<h.length;o+=3){const u=h.slice(o,o+3).join(" ").trim();u&&t.push({kind:"para",text:u})}}function le(r){let t=r.trim();t=t.replace(/\s*[â¢ââªï¸]\s+/g,` 6`).replace(/(?:^|\s)\*\s+/g,` 7`),t=t.replace(/\s+(?=\d+\s+[A-Z])/g,` 8`),t=t.replace(new RegExp(`([a-z][a-z]+)\\s+(?=(?:${re})\\s+[a-z])`,"g"),`$1 9`),t=t.replace(/([a-z])\s+(?=(?:One|Each|Every|All|Both)\s+[a-z])/g,`$1 10`);const h=t.split(` 11`).map(o=>o.trim().replace(/^[-â¢*ââªï¸]\s*/,"")).filter(Boolean);return h.length<2?r.split(new RegExp("(?<=[.!?])\\s+(?=[A-Z])")).map(o=>o.trim()).filter(Boolean):h}function ce({description:r}){const[t,h]=y.useState(!1),o=oe(r),u=o.findIndex(s=>s.kind==="lead"),v=u>=0?o[u]:void 0,k=o.filter((s,l)=>l!==u),c=(s,l)=>s.kind==="lead"?null:s.kind==="heading"?s.tone==="sub"?e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx("span",{className:"inline-block h-1 w-1 rounded-full bg-periwinkle"}),e.jsx("h4",{className:"font-sans text-xs uppercase tracking-eyebrow text-periwinkle",children:s.text})]},l):e.jsx("h3",{className:"font-serif text-xl md:text-2xl text-espresso mt-3 tracking-tight",children:s.text},l):s.kind==="para"?e.jsx("p",{className:"text-charcoal/80 leading-relaxed font-light",children:s.text},l):s.kind==="note"?e.jsxs("div",{className:"flex gap-3 rounded-lg border border-sand bg-sand/30 p-3",children:[e.jsx("span",{className:"mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-periwinkle/15 text-periwinkle",children:/Warning|Safety|Inspect|Disclaimer/i.test(s.label)?e.jsx(te,{className:"h-3.5 w-3.5"}):e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsxs("p",{className:"text-xs text-charcoal/80 leading-relaxed",children:[e.jsx("span",{className:"font-medium text-espresso",children:s.label}),s.text?e.jsxs("span",{className:"text-charcoal/70",children:[" â ",s.text]}):null]})]},l):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:s.items.map((b,d)=>e.jsx("div",{className:"group relative overflow-hidden rounded-lg border border-sand bg-cream/60 backdrop-blur-sm p-4 hover:border-periwinkle/60 hover:bg-cream transition-all",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-periwinkle/15 text-periwinkle",children:e.jsx(se,{className:"h-3 w-3"})}),e.jsx("p",{className:"text-sm text-charcoal/85 leading-relaxed font-light",children:b})]})},d))},l);return e.jsxs("div",{className:"space-y-5",children:[v&&e.jsx("div",{className:"relative pl-5 border-l-2 border-periwinkle/70",children:e.jsx("p",{className:"font-serif text-lg md:text-xl text-espresso leading-snug italic",children:v.kind==="lead"?v.text:""})}),k.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>h(s=>!s),"aria-expanded":t,className:"flex items-center gap-2 tracking-eyebrow uppercase text-xs text-espresso hover:text-periwinkle transition-colors",children:[t?"Hide details":"Read full details",e.jsx(X,{className:`h-4 w-4 transition-transform ${t?"rotate-180":""}`})]}),t&&e.jsx("div",{className:"space-y-5 pt-1",children:k.map(c)})]})]})}function de(r){if(!r)return"";const t=r.match(/(\d+)\s*$/);return t?t[1]:r}function xe(){q();const{handle:r}=T({from:"/product/$handle"}),[t,h]=y.useState(null),[o,u]=y.useState(!0),[v,k]=y.useState(0),[c,s]=y.useState(0),[l,b]=y.useState(!1),d=y.useRef(null),{addItem:w,isLoading:n,getCheckoutUrl:p}=Y();y.useEffect(()=>{u(!0),s(0),W(r).then(a=>h(a)).finally(()=>u(!1))},[r]),y.useEffect(()=>{if(!t)return;const a=t.priceRange.minVariantPrice;if(H("ViewContent",{content_type:"product",content_ids:[t.id],content_name:t.title,value:parseFloat(a.amount),currency:a.currencyCode}),B("view_item",{currency:a.currencyCode,value:parseFloat(a.amount),items:[{item_id:t.id,item_name:t.title,price:parseFloat(a.amount)}]}),D()){const i=window;i.fera&&i.fera.push("setProduct",{id:de(t.id),name:t.title})}},[t]);const m=t?.images.edges.length??0,f=()=>s(a=>(a+1)%Math.max(m,1)),N=()=>s(a=>(a-1+Math.max(m,1))%Math.max(m,1));if(y.useEffect(()=>{const a=i=>{m<2||(i.key==="ArrowRight"&&f(),i.key==="ArrowLeft"&&N(),i.key==="Escape"&&b(!1))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[m]),o)return e.jsxs("div",{className:"min-h-screen bg-cream",children:[e.jsx(I,{}),e.jsx("div",{className:"flex items-center justify-center py-40",children:e.jsx(A,{className:"h-6 w-6 animate-spin text-camel"})})]});if(!t)return e.jsxs("div",{className:"min-h-screen bg-cream",children:[e.jsx(I,{}),e.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-40 text-center",children:[e.jsx("p",{className:"font-serif text-3xl text-espresso italic",children:"Not found"}),e.jsx(E,{to:"/",className:"mt-6 inline-block text-sm underline decoration-camel",children:"Return home"})]})]});const x=t.variants.edges[v]?.node,g=t.images.edges,_={node:t},C=t.handle===P,R=async()=>
11{if(!x)return;await w({product:_,variantId:x.id,variantTitle:x.title,price:x.price,quantity:1,selectedOptions:x.selectedOptions});const a=p();a&&(window.location.href=a)};return e.jsxs("div",{className:"min-h-screen bg-cream",children:[e.jsx(I,{}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 lg:px-12 py-12 lg:py-20",children:[e.jsx(E,{to:"/",className:"text-xs tracking-eyebrow uppercase text-charcoal/60 hover:text-periwinkle",children:"â All products"}),e.jsxs("div",{className:"grid lg:grid-cols-12 gap-10 lg:gap-16 mt-8",children:[e.jsxs("div",{className:"lg:col-span-7 space-y-4",children:[e.jsxs("div",{className:"group relative aspect-[4/5] bg-oat overflow-hidden select-none",onClick:()=>b(!0),onTouchStart:a=>d.current=a.touches[0].clientX,onTouchEnd:a=>{if(d.current==null)return;const i=a.changedTouches[0].clientX-d.current;Math.abs(i)>40&&(i<0?f:N)(),d.current=null},children:[g.map((a,i)=>e.jsx("img",{src:a.node.url,alt:a.node.altText??t.title,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-700 ease-out ${i===c?"opacity-100":"opacity-0 pointer-events-none"}`},i)),g.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:a=>{a.stopPropagation(),N()},"aria-label":"Previous image",className:"absolute left-3 top-1/2 -translate-y-1/2 h-10 w-10 grid place-items-center bg-cream/80 backdrop-blur-sm text-espresso opacity-0 group-hover:opacity-100 hover:bg-cream transition-all duration-300 rounded-full",children:e.jsx(F,{className:"h-5 w-5"})}),e.jsx("button",{onClick:a=>{a.stopPropagation(),f()},"aria-label":"Next image",className:"absolute right-3 top-1/2 -translate-y-1/2 h-10 w-10 grid place-items-center bg-cream/80 backdrop-blur-sm text-espresso opacity-0 group-hover:opacity-100 hover:bg-cream transition-all duration-300 rounded-full",children:e.jsx(M,{className:"h-5 w-5"})}),e.jsxs("div",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 px-3 py-1 rounded-full bg-espresso/70 text-cream text-[10px] tracking-eyebrow uppercase opacity-0 group-hover:opacity-100 transition-opacity",children:[c+1," / ",g.length]})]})]}),g.length>1&&e.jsx("div",{className:"grid grid-cols-5 gap-3",children:g.map((a,i)=>e.jsx("button",{onClick:()=>s(i),onMouseEnter:()=>s(i),className:`aspect-square overflow-hidden border-2 transition-all duration-300 ${i===c?"border-periwinkle opacity-100":"border-transparent opacity-60 hover:opacity-100"}`,children:e.jsx("img",{src:a.node.url,alt:"",className:"w-full h-full object-cover"})},i))})]}),e.jsxs("div",{className:"lg:col-span-5 lg:sticky lg:top-28 lg:self-start space-y-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"tracking-eyebrow uppercase text-xs text-terracotta mb-3",children:"Mindchild"}),e.jsx("h1",{className:"font-serif text-4xl md:text-5xl text-espresso leading-tight",children:t.title}),x&&e.jsxs("p",{className:"mt-4 text-lg text-charcoal font-sans",children:[x.price.currencyCode," ",parseFloat(x.price.amount).toFixed(2)]}),e.jsx(O,{})]}),t.description&&e.jsx(ce,{description:t.handle==="magic-mirror-affirmation-chart"?`Magic Mirror Affirmation Chart 12 13Itâs a powerful portal to a world where kids believe in themselves fiercely, speak kindly to their hearts, and glow with unstoppable confidence. Designed to fit seamlessly into your familyâs everyday life, itâs the secret spark that makes mirror time their favorite time. 14 15What You Get 16* 30 Multi-sensory affirmation tags 17* 30 visual and communication- prompting caregiver cards filled with education and empowerment. 18* Neuroscience- backed comprehensive user-guide. 19 20How It Works 21⨠Enchanting Affirmations 22Bold, beautiful, and bursting with positivity, each affirmation invites your child to step into their power. 23From âI am braveâ to âI am enough,â these words become the magical spells that rewrite their inner storyâday after day. 24⨠Interactive and Joyful 25With colorful affirmation tags and whimsical caregiver cards, this tapestry transforms self-talk into a joyful, shared adventure. Perfect for morning rituals, bedtime calm, or anytime your child needs a confidence boost. The Magic Inside Ignite unstoppable self
25-confidence and courage Spark calm and emotional balance on even the busiest days Create treasured moments of connection between parent and child Grow resilience, kindness, and a growth mindset through daily enchantment Inspire gratitude and self-love that lasts a lifetime 26 27⨠A Note for Grown-Ups ⨠Ages 3+`:t.handle==="the-mindset-tapestry"?`Mindchild 28 29What's Included 30* Large affirmation tapestry designed for daily family rituals 31* 30 interactive affirmation tags for hands on learning 32* 30 caregiver connection cards with prompts and guidance 33* Comprehensive user guide rooted in neuroscience 34 35How It Works 36⨠Daily Affirmations 37Simple, powerful affirmations help children build confidence, emotional awareness, and self belief through repetition and routine. 38⨠Interactive Family Ritual 39Children choose affirmation tags, practice mirror talk, and connect through guided caregiver prompts designed to spark meaningful conversations. Perfect for mornings, bedtime, emotional regulation moments, and everyday connection. 40 41Why Families Love It 42* Builds confidence and emotional resilience 43* Encourages calm, connection, and positive self talk 44* Creates meaningful parent child moments 45* Supports emotional development through play and repetition 46* Helps children develop gratitude, kindness, and self awareness 47 48Perfect For 49* Families raising emotionally resilient kids 50* Classrooms and therapy spaces focused on social emotional learning 51* Meaningful gifts that support confidence and connection 52 53Safety & Care 54Adult supervision encouraged. Contains small parts. Made with non toxic materials. Ages 3+ 55 56Our Mission 57Raising emotionally resilient humans through daily rituals rooted in neuroscience and designed for the modern family.`:t.description}),t.variants.edges.length>1&&e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsx("p",{className:"tracking-eyebrow uppercase text-[10px] text-charcoal/60",children:"Options"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.variants.edges.map((a,i)=>{const S=!a.node.availableForSale&&t.handle!==P;return e.jsx("button",{onClick:()=>k(i),disabled:S,className:`px-4 py-2 text-xs tracking-wide border transition-colors ${i===v?"border-periwinkle bg-periwinkle text-cream":"border-sand text-espresso hover:border-periwinkle hover:text-periwinkle"} ${S?"opacity-40 line-through":""}`,children:a.node.title},a.node.id)})})]}),e.jsx("button",{onClick:R,disabled:n||!x?.availableForSale&&!C,className:"w-full bg-espresso text-cream h-14 mt-6 text-xs tracking-eyebrow uppercase hover:bg-periwinkle transition-colors disabled:opacity-50 flex items-center justify-center",children:n?e.jsx(A,{className:"h-4 w-4 animate-spin"}):!x?.availableForSale&&!C?"Sold out":"Add to cart"}),e.jsx("div",{className:"pt-6 border-t border-sand/50 space-y-2 text-xs text-charcoal/70",children:e.jsx("p",{children:"· Made with intention, shipped with care."})})]})]}),e.jsxs("section",{className:"mt-20 lg:mt-28 border-t border-sand/50 pt-12 lg:pt-16",children:[e.jsxs("div",{className:"heading-accent mb-8",children:[e.jsx("p",{className:"tracking-eyebrow uppercase text-xs text-terracotta mb-4",children:"Loved by families"}),e.jsx("h2",{className:"font-serif text-3xl md:text-4xl text-espresso leading-tight",children:"Reviews"})]}),e.jsx(U,{initialCount:6})]})]}),e.jsx(z,{}),l&&g[c]&&e.jsxs("div",{className:"fixed inset-0 z-[100] bg-espresso/95 backdrop-blur-sm flex items-center justify-center p-4 animate-fade-in",onClick:()=>b(!1),children:[e.jsx("button",{onClick:a=>{a.stopPropagation(),b(!1)},"aria-label":"Close",className:"absolute top-5 right-5 h-11 w-11 grid place-items-center bg-cream/10 hover:bg-cream/20 text-cream rounded-full transition-colors",children:e.jsx(G,{className:"h-5 w-5"})}),g.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:a=>{a.stopPropagation(),N()},"aria-label":"Previous",className:"absolute left-5 top-1/2 -translate-y-1/2 h-12 w-12 grid place-items-center bg-cream/10 hover:bg-cream/20 text-cream rounded-full transition-colors",children:e.jsx(F,{className:"h-6 w-6"})}),e.jsx("button",{onClick:a=>{a.stopPropagation(),f()},"aria-label":"Next",className:"absolute right-5 top-1/2 -translate-y-1/2 h-12 w-12 grid place-items-center bg-cream/10 hover:bg-cream/20 text-cream rounded-full transition-colors",children:e.jsx(M,{className:"h-6 w-6"})})]}),e.jsx("img",{src:g[c].node.url,alt:g[c].node.altText??t.title,onClick:a=>a.stopPropagation(),className:"max-h-[90vh] max-w-[90vw] object-contain animate-scale-in"},c),g.length>1&&e.jsxs("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 text-cream/80 text-xs tracking-eyebrow uppercase",children:[c+1," / ",g.length]})]})]})}export{xe as component};
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.