(function() {
const { useState, useEffect, useReducer, useRef, createElement: e, Fragment } = React;/* --- DATA --- */
const LS_KEY = "duo_lg1_v1";
const uid = () => Math.random().toString(36).slice(2,10);
const safeParse = (j,fb) => { try{const v=JSON.parse(j);return v!=null?v:fb;}catch{return fb;} };
const DEFAULT = { tab: "read", readPct: 0, wins: 0, level: 1, practices: {}, conceptNotes: {}, tools: { missionAudit: { answers:{}, done:false, score:null, result:null }, weStory: { value1:"", value2:"", impact:"", future:"", generated:false, script:"" } }, victoryLog: [] };const POST = { id:"lg1", name:"Legacy & Shared Meaning", category:{name:"Foundation"}, readTime:"12 min" };
const SYMPTOMS = [
{id:"s1",label:"We achieve our goals, but life just feels like a giant to-do list.",tab:"tools",tool:"missionAudit"},
{id:"s2",label:"I feel like we are just successful roommates raising kids.",tab:"read",shift:1},
{id:"s3",label:"We rarely talk about the future beyond next year's vacation.",tab:"tools",tool:"weStory"},
{id:"s4",label:"When the kids leave, I'm genuinely worried about what we'll have in common.",tab:"read",shift:2},
{id:"s5",label:"We are busy, but something feels deeply unfulfilling about our marriage.",tab:"tools",tool:"missionAudit"},
];const CONCEPTS = [
{
n:1, name:"The Maintenance Trap", subtitle:"Surviving vs. Building", color:"#8B1A2E", one:"Managing a household successfully is not the same thing as managing a marriage successfully.",
body:"Mark and Elena had the house in the coveted school district... [Full content included]",
quote:{text:"You don't feel like you're dying because you're failing. You feel like you're dying because you're finished.",ch:"Ch. 4"},
hard:"Admitting that your highly efficient, perfectly scheduled, successful life is actually hollowing out your soul.",
practice:"You must deliberately separate 'Household Meetings' from 'Marriage Meetings'.",
script:'"We are really good at managing our life, but we haven\'t talked about *why* we are doing all this in months."',
today:["Use the Mission Auditor tool to see if you are stuck in the Maintenance Trap."],
week:["Go on a date where talking about kids/house/jobs is forbidden."],
month:["Commit to one shared activity with zero logistical ROI."],
mistake:"Believing that because the bills are paid, the marriage is healthy.",
solo:{ goal:"Reintroduce meaning into your routine.", can:["Pursue a meaningful project outside work.","Stop treating spouse like a co-manager."], avoid:["Don't act morally superior."], boundary:`"I need us to find something else to care about besides just maintaining it."`}
},
{
n:2, name:"The Horizon Line", subtitle:"Lovers vs. Friends", color:"#A04020", one:"Couples who only look at each other eventually get bored. Couples who look outward together last.",
body:"C.S. Lewis famously described the difference between lovers and friends... [Full content included]",
quote:{text:"The paradox of intimacy: couples who focus exclusively on each other often suffocate.",ch:"Ch. 4"},
hard:"Realizing that fixing your marriage might require you to stop focusing on the marriage and start focusing on the world.",
practice:"Find the Arrow. What breaks both of your hearts?",
script:'"If time and money were no object, what problem would we solve together?"',
today:["Identify one external cause you both value."],
week:["Do one small thing to serve someone outside your family."],
month:["Shift weekend planning from 'How do we relax?' to 'Who can we invite in?'"],
mistake:"Making children your ultimate horizon.",
solo:{ goal:"Find your own horizon and invite them.", can:["Start volunteering on your own.","Share joy without demanding they join."], avoid:["No guilt tripping."], boundary:`"This project gives me life. I'd love you to join, but I'm pursuing it either way."`}
},
{
n:3, name:"The 'We Story'", subtitle:"Authoring the Legacy", color:"#5B3E9C", one:"Gottman's highest level of the Sound Relationship House is 'Create Shared Meaning.'",
body:"Every family tells a story about itself. Master couples explicitly write their story.",
quote:{text:"If you haven't deliberately authored a legacy, you will default to whatever narrative your anxiety hands you.",ch:"Ch. 4"},
hard:"Sitting down to do philosophical work when you are already exhausted.",
practice:"Write the 'We Story.' What is the emotional anchor of your home?",
script:'"When our kids are grown, what do we want them to say our house felt like?"',
today:["Use the 'We Story' Architect tool to draft a statement."],
week:["Create one new micro-ritual."],
month:["Make calendar decisions based on legacy, not convenience."],
mistake:"Believing legacy happens by accident.",
solo:{ goal:"Live out the legacy alone for now.", can:["Create positive traditions for kids.","Define your personal legacy."], avoid:["Don't wait for spouse to initiate."], boundary:`"I'm going to start building this atmosphere today."`}
}
];const PRACTICES = [
{id:"p1",n:1,name:"The Non-Logistical Date",time:"Monthly",text:"Go on a date where kids, budget, and house maintenance are strictly forbidden."},
{id:"p2",n:2,name:"The Empty Nest Drill",time:"Yearly",text:"Ask: 'If the kids moved out tomorrow, what would we do for the next 10 years?'"},
{id:"p3",n:3,name:"The Legacy Ritual",time:"Weekly",text:"Create one sacred weekly tradition that belongs only to the two of you."},
{id:"p4",n:4,name:"The Open Table",time:"Monthly",text:"Host someone at your table who can do nothing for you socially or financially."}
];const STUDIES = [
{title:"Create Shared Meaning",type:"Clinical",sci:"The top tier of Gottman's 'Sound Relationship House' is dedicated to 'Creating Shared Meaning.'",pivot:"A lack of fighting does not equal a meaningful marriage.",application:"Build the attic of the house: rituals and legacy."},
{title:"Logotherapy & Meaning",type:"Psychology",sci:"Viktor Frankl posits that humanity's primary force is the search for meaning.",pivot:"Petty fights might be symptoms of an existential vacuum.",application:"Treat boredom as a lack of meaning. Find the arrow."},
{title:"Generational Narrative Psychology",type:"Research",sci:"Children who know their family's story have higher self-esteem and resilience.",pivot:"Writing your 'We Story' is psychological armor for your kids.",application:"Tell your kids the story of how you met and survived hard times."}
];const RELATED = [
{id:"va1",name:"Values Alignment",url:"https://duo.bz/va1",desc:"How to make sure shared meaning aligns with core values.",module:"Foundations",readTime:"11 min"},
{id:"cv1",name:"The Consumer vs. The Covenant",url:"https://duo.bz/cv1",desc:"Why a consumer mindset prevents building a lasting legacy.",module:"Foundations",readTime:"14 min"},
];const REFERENCE_LINKS = ["https://duo.bz/fb11", "https://duo.bz/ml", "https://duo.bz/ls1", "https://duo.bz/household", "https://duo.bz/compass", "https://duo.bz/28days"];/* --- COMPONENTS --- */
const Pill = ({children,color="#8B1A2E",solid=false}) => e('span', {
style: { display:"inline-flex",alignItems:"center",padding:"4px 12px",borderRadius:20,fontSize:12,fontWeight:700,background:solid?color:color+"18",color:solid?"#fff":color,border:`1px solid ${color}30`}
}, children);const SymptomFinder = ({dispatch, setActiveShift}) => {
const [selected, setSelected] = useState(null);
const go = s => {
setSelected(s.id);
if(s.tab==="read" && s.shift) setActiveShift(s.shift);
dispatch({type:"SET_TAB",tab:s.tab});
setTimeout(()=>{
const el=document.getElementById(s.tool?`tool-${s.tool}`:`shift-${s.shift}`);
if(el) el.scrollIntoView({behavior:"smooth",block:"start"});
},200);
};
return e('div', {className:"p1-card p1-fade", style:{marginBottom:24}},
e('div', {style:{display:"flex",justifyContent:"space-between",marginBottom:16}},
e('div', null,
e('div', {className:"p1-serif", style:{fontSize:18,fontWeight:700}}, "Why does it feel like you're just roommates?"),
e('div', {style:{fontSize:14,color:"#9A5060"}}, "Pick the symptom that describes your current season.")
),
e(Pill, {color:"#8B1A2E", solid:true}, "Start here")
),
e('div', {style:{display:"grid",gridTemplateColumns:"repeat(auto-fill,minmax(280px,1fr))",gap:12}},
SYMPTOMS.map(s => e('button', {
key:s.id, onClick:()=>go(s),
style:{textAlign:"left",padding:"14px 18px",borderRadius:12,border:`1.5px solid ${selected===s.id?"#8B1A2E":"#EDE0DC"}`,background:selected===s.id?"#FEF0F2":"#fff",cursor:"pointer"}
}, e('div', {style:{fontWeight:600,fontSize:14}}, s.label)))
)
);
};const ToolMissionAudit = ({state, dispatch, addWin}) => {
const t = state.tools.missionAudit;
const setT = v => dispatch({type:"UPDATE_TOOL",tool:"missionAudit",payload:{...t,...v}});
const questions = [
{id:"q1",text:"When you have free time to talk, what is the topic?", opts:[{v:"M",l:"Schedules, kids, bills (Maintenance)"}, {v:"V",l:"Ideas, future, dreams (Vision)"}]},
{id:"q2",text:"'What does your family stand for?'", opts:[{v:"M",l:"Not really sure (Maintenance)"}, {v:"V",l:"Yes, we know our values (Vision)"}]},
{id:"q3",text:"Energy directed outside the family?", opts:[{v:"M",l:"Almost zero (Maintenance)"}, {v:"V",l:"Significant amount (Vision)"}]},
{id:"q4",text:"Marriage after kids leave?", opts:[{v:"M",l:"Anxious or blank (Maintenance)"}, {v:"V",l:"Excited (Vision)"}]},
];
const calc = () => {
const mCount = Object.values(t.answers).filter(v=>v==="M").length;
let res = mCount >= 3 ? {color:"#8B1A2E",bg:"#FEF0F2",title:"The Maintenance Trap",desc:"You are surviving, but lost your horizon."} : {color:"#065F46",bg:"#ECFDF5",title:"Living on Mission",desc:"You have an outward gaze."};
setT({done:true, score:mCount, result:res});
addWin("Mission Audit Completed.");
};
if(t.done) return e('div', {id:"tool-missionAudit"}, e('div', {style:{background:t.result.bg, padding:20, borderRadius:12}}, e('div', {style:{color:t.result.color, fontWeight:700}}, t.result.title), e('div', null, t.result.desc)));
return e('div', null, questions.map(q => e('div', {key:q.id, style:{marginBottom:15}}, e('div', {style:{fontWeight:700, marginBottom:8}}, q.text), q.opts.map(o => e('button', {key:o.v, onClick:()=>setT({answers:{...t.answers,[q.id]:o.v}}), style:{display:"block", width:"100%", textAlign:"left", padding:10, marginBottom:5, border:"1px solid #ddd", background:t.answers[q.id]===o.v?"#FEF0F2":"#fff"}}, o.l)))), e('button', {className:"p1-btn p1-btn-primary", onClick:calc, disabled:Object.keys(t.answers).length<4}, "Complete Audit"));
};/* --- MAIN APP --- */
function Main() {
const [state, dispatch] = useReducer((s, a) => {
if(a.type==="SET_TAB") return {...s, tab:a.tab};
if(a.type==="UPDATE_TOOL") return {...s, tools:{...s.tools,[a.tool]:a.payload}};
if(a.type==="ADD_WIN") return {...s, wins:s.wins+1};
return s;
}, DEFAULT);
const [activeShift, setActiveShift] = useState(1);return e('div', {style:{maxWidth:1000, margin:"0 auto", padding:20}},
e('div', {style:{textAlign:"center", padding:"40px 0"}},
e(Pill, {solid:true}, "Chapter 4"),
e('h1', {className:"p1-serif", style:{fontSize:40, fontWeight:800, margin:"10px 0"}}, POST.name),
e('p', {style:{color:"#7A5060"}}, "Escape the maintenance trap and build shared purpose.")
),
e(SymptomFinder, {dispatch, setActiveShift}),
e('div', {style:{display:"flex", gap:10, marginBottom:20}}, ["read","tools","science","practice"].map(t => e('button', {key:t, className:`p1-tab ${state.tab===t?"active":""}`, onClick:()=>dispatch({type:"SET_TAB",tab:t})}, t.toUpperCase()))),
state.tab==="read" && e('div', null, CONCEPTS.map(c => e('div', {key:c.n, className:"p1-card", style:{marginBottom:10}}, e('h3', {style:{fontWeight:700}}, c.name), e('p', null, c.one)))),
state.tab==="tools" && e(ToolMissionAudit, {state, dispatch, addWin:(m)=>dispatch({type:"ADD_WIN",msg:m})}),
state.tab==="science" && e('div', null, STUDIES.map((s,i)=> e('div', {key:i, className:"p1-card", style:{marginBottom:10}}, e('div', {style:{fontWeight:800, color:"#8B1A2E"}}, s.title), e('p', null, s.sci)))),
state.tab==="practice" && e('div', {className:"p1-twm"}, PRACTICES.map(p => e('div', {key:p.id, className:"p1-card"}, e('div', {style:{fontWeight:700}}, p.name), e('p', {style:{fontSize:13}}, p.text)))),
e('div', {style:{marginTop:40, padding:20, borderTop:"1px solid #ddd"}}, e('h4', null, "References"), REFERENCE_LINKS.map(l => e('a', {key:l, href:l, style:{display:"block", fontSize:12, color:"#8B1A2E"}}, l)))
);
}const root = ReactDOM.createRoot(document.getElementById("duo-lg1-root"));
root.render(e(Main));
})();
document.addEventListener('DOMContentLoaded', function() {
var buttons = document.querySelectorAll('.conversion-btn a, .conversion-btn');
buttons.forEach(function(btn) {
btn.addEventListener('click', function(e) {
e.preventDefault();
var url = this.getAttribute('href');
gtag_report_conversion(url);
});
});
});
(function () {
var c = document.body.className;
c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
document.body.className = c;
})();
var woocommerce_params = {"ajax_url":"/wp-admin/admin-ajax.php","wc_ajax_url":"/?wc-ajax=%%endpoint%%","i18n_password_show":"Show password","i18n_password_hide":"Hide password"};
//# sourceURL=woocommerce-js-extra