{"version":3,"file":"OnboardingFieldPersister.nMFaIrZp.mjs","names":["__esmMin","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","init_npm_react_18_3_1","addPropertyControls","init_framer_BpuvUAiZ","ControlType","labelOf","el","cardLabelOf","raw","m","slug","s","OnboardingFieldPersister","props","prefix","keyPrefix","KEY_ALIASES","normalizeKey","name","lower","save","value","remove","handleFormEvent","target","event","inputName","file","isBgCheck","bgCheckInputName","isPhoto","photoInputName","\"__c4c_onboarding_bg_check\"","\"__c4c_onboarding_photo\"","checkedValues","p","warnedFallbackKey","warnOnce","w","key","msg","findGroup","cur","btn","groupContainer","groupSize","count","selector","members","scan","hidden","next","fallback","snapshotPressedGroup","group","pressed","joined","allowRemove","snapshotTabGroup","selected","selectedLabel","VARIANT_SELECTOR","snapshotVariantGroup","card","cards","named","observer","mutations","node","sweepSubtree","nv","v","hydrateFromStorage","saved","proto","setter","simulateTap","rect","base","restorePressedGroup","wanted","member","restoreTabGroup","wantedLabel","injectRestoreBanner","bannerId","banner","labels","cleanup","container","restoreVariantGroup","wantedList","alreadySelected","l","els","root","pressedButtons","seenGroups","tabButtons","seenTabGroups","variantCards","seenVariantContainers","parent","initialTimer","style","init_OnboardingFieldPersister"],"sources":["https:/framerusercontent.com/modules/h6PzZwNqtEywyai64fxL/cABwY8VDTXejwe5q8JHR/OnboardingFieldPersister.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Read a button's user-facing label for sessionStorage.\nfunction labelOf(el){const raw=(el.textContent||\"\").replace(/\\s+/g,\" \").trim();return raw.slice(0,120);}// Extract the CARD label (heading only, no description) from a Framer\n// variant-swap card whose textContent concatenates heading + description.\n// Splits at the first <lowercase><UPPERCASE> boundary — e.g.\n// \"Errands & OutingsHelp with shopping...\" → \"Errands & Outings\",\n// \"Post-hospital recoverySupport ...\"      → \"Post-hospital recovery\".\n// Falls back to first 40 chars if the pattern doesn't match.\nfunction cardLabelOf(el){const raw=(el.textContent||\"\").replace(/\\s+/g,\" \").trim();const m=raw.match(/^(.+?[a-z0-9)&'.-])([A-Z])/);return(m?m[1]:raw.slice(0,40)).trim();}// Slugify a label for the fallback group key.\nfunction slug(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,40);}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function OnboardingFieldPersister(props){const{keyPrefix,photoInputName,bgCheckInputName,style}=props;React.useEffect(()=>{if(typeof window===\"undefined\")return;const prefix=(keyPrefix||\"c4c-onboarding\").replace(/[^a-zA-Z0-9_-]/g,\"\");// Reconciliation map for designer layer names that diverge from\n// the schema keys StepGatekeeper + OnboardingSubmit read. When\n// the pill-group walk-up resolves to one of these names, we\n// normalize to the StepGatekeeper key before writing to\n// sessionStorage, so renames in Framer don't silently break the\n// Continue gate.\n//\n// Current entries all map to \"specialty-conditions\" (Step 3\n// pill group). The desktop Step 3 wires its ButtonGroupPro with\n// the schema key directly via a hidden input, so only the phone\n// breakpoint hits the walk-up and would otherwise write to the\n// wrong key. The phone layer name has drifted — originally\n// \"Specialty Choices\" (task #76 2026-11-01), still broken on\n// 2026-11-01 re-test with one pill visibly selected but\n// gatekeeper rejecting. Widening the map + adding a\n// case-insensitive \"specialt\" fuzzy fallback so any Framer\n// layer name the designer picks for this container writes to\n// the schema key.\nconst KEY_ALIASES={\"Specialty Choices\":\"specialty-conditions\",\"Specialty choices\":\"specialty-conditions\",\"specialty-choices\":\"specialty-conditions\",Specialties:\"specialty-conditions\",specialties:\"specialty-conditions\",Specialty:\"specialty-conditions\",specialty:\"specialty-conditions\",\"Specialty Pills\":\"specialty-conditions\",\"Specialty Chips\":\"specialty-conditions\",\"Specialty Conditions\":\"specialty-conditions\"};const normalizeKey=name=>{if(KEY_ALIASES[name])return KEY_ALIASES[name];// Fuzzy fallbacks for the three fields that the caregiver\n// DB confirms are repeatedly empty across signups (Task #91,\n// 2026-11-02 — spoken_languages / specialties /\n// years_experience landing as [] / [] / null even when all\n// other sessionStorage-captured fields persist cleanly).\n// Each matches on a case-insensitive stem that is narrow\n// enough to avoid colliding with any other field in the\n// flow but wide enough to catch whatever layer wording the\n// designer picks (\"Specialty Choices\", \"Spoken Languages\",\n// \"Years of Experience\", \"Experience Level\", etc.).\nconst lower=name.toLowerCase();if(lower.includes(\"specialt\")&&name!==\"specialty-conditions\"){return\"specialty-conditions\";}if((lower.includes(\"languag\")||lower.includes(\"spoken\"))&&name!==\"spoken-languages\"){return\"spoken-languages\";}if((lower.includes(\"year\")||lower.includes(\"experienc\"))&&name!==\"years-of-experience\"){return\"years-of-experience\";}return name;};const save=(name,value)=>{try{window.sessionStorage.setItem(`${prefix}.${normalizeKey(name)}`,value);}catch{// sessionStorage may be blocked (private mode edge\n// cases). Fail silently.\n}};const remove=name=>{try{window.sessionStorage.removeItem(`${prefix}.${normalizeKey(name)}`);}catch{// ignore\n}};// ---------- form-field handler (Steps 1, 2, parts of 4, 5) ----------\nconst handleFormEvent=event=>{const target=event.target;if(!target)return;if(target instanceof HTMLInputElement&&target.type===\"file\"){const inputName=(target.name||\"\").toLowerCase();const file=target.files?.[0];if(!file)return;// Classify: is this the profile photo, the BG check\n// PDF, or something else? Match by name first so\n// named inputs are unambiguous; fall back to the\n// photo path for unnamed inputs (there is exactly one\n// unnamed file input on Step 1 today).\nconst isBgCheck=inputName===bgCheckInputName||inputName.includes(\"bg-check\")||inputName.includes(\"background\");const isPhoto=!inputName||inputName===photoInputName||inputName.includes(\"photo\")||inputName.includes(\"avatar\");if(isBgCheck){window[\"__c4c_onboarding_bg_check\"]=file;save(bgCheckInputName||\"bg_check_filename\",file.name);return;}if(isPhoto){window[\"__c4c_onboarding_photo\"]=file;save(photoInputName||\"photo_filename\",file.name);return;}// Unknown file input — ignore rather than clobber a slot.\nreturn;}if(!(target instanceof HTMLInputElement||target instanceof HTMLTextAreaElement||target instanceof HTMLSelectElement))return;const name=target.name;if(!name)return;if(target instanceof HTMLInputElement&&target.type===\"radio\"){if(target.checked)save(name,target.value);return;}if(target instanceof HTMLInputElement&&target.type===\"checkbox\"){const peers=Array.from(document.querySelectorAll(`input[type=\"checkbox\"][name=\"${CSS.escape(name)}\"]`));const checkedValues=peers.filter(p=>p.checked).map(p=>p.value);if(checkedValues.length===0){remove(name);}else{save(name,checkedValues.join(\",\"));}return;}save(name,target.value);};document.addEventListener(\"input\",handleFormEvent,true);document.addEventListener(\"change\",handleFormEvent,true);// ---------- pill / tab handler (Step 3, Step 4 days-of-week) ----------\n// Given a button that just changed state, find its group and\n// a stable sessionStorage key.\n//\n// Two-phase walk:\n//   Phase A — find the group container: the closest ancestor\n//   whose subtree contains ≥ 2 matches of the same selector.\n//   This is the pill layout div (the div that immediately\n//   holds the pills, e.g. ButtonGroupPro's inner pill row).\n//\n//   Phase B — from that container, walk UP looking for either\n//   a hidden <input name=X> in the subtree OR a\n//   `data-framer-name` on the ancestor itself. Whichever\n//   we hit first wins. Stop before entering a strictly larger\n//   group (that means we crossed into an unrelated\n//   pill group on the same step).\n//\n// Why the walk-up matters: the designer's ButtonGroupPro code\n// component renders as `<div>[pill row][hidden input]</div>`.\n// The pill row (Phase A container) does NOT contain the\n// hidden input; the ButtonGroupPro wrapper one level up does.\n// We need to reach that wrapper to pick up the hidden input's\n// name (e.g. \"specialty-conditions\"), instead of falling\n// through to the step wrapper (\"Step 3\") which would collide\n// across every group on the step.\nconst warnedFallbackKey=\"__c4c_pillgroup_warned\";const warnOnce=(key,msg)=>{const w=window;if(!w[warnedFallbackKey])w[warnedFallbackKey]=new Set;if(w[warnedFallbackKey].has(key))return;w[warnedFallbackKey].add(key);// eslint-disable-next-line no-console\nconsole.warn(msg);};const findGroup=(btn,selector)=>{// Phase A: locate the immediate pill container.\nlet cur=btn.parentElement;let groupContainer=null;let groupSize=0;while(cur&&cur!==document.body){const count=cur.querySelectorAll(selector).length;if(count>=2){groupContainer=cur;groupSize=count;break;}cur=cur.parentElement;}if(!groupContainer)return null;const members=Array.from(groupContainer.querySelectorAll(selector));// Phase B: walk up from groupContainer.\nlet scan=groupContainer;while(scan&&scan!==document.body){const hidden=scan.querySelector('input[type=\"hidden\"][name]');if(hidden&&hidden.name){return{name:hidden.name,members,hiddenInput:hidden};}if(scan.getAttribute(\"data-framer-name\")){return{name:scan.getAttribute(\"data-framer-name\"),members};}const next=scan.parentElement;if(!next)break;// Stop if walking up would enter a strictly larger\n// group — that means we're crossing into an unrelated\n// pill group on the same step.\nif(next.querySelectorAll(selector).length>groupSize){warnOnce(`bigger-group-${groupSize}`,`[OnboardingFieldPersister] Pill group has no key source (no hidden input, no data-framer-name) before its ancestor entered a larger group. Give the container a Framer layer name.`);break;}scan=next;}// Fallback: slug of the first button label.\nconst fallback=`pillgroup-${slug(labelOf(members[0]))}`;warnOnce(fallback,`[OnboardingFieldPersister] Pill group has no key source; using fallback \"${fallback}\". Give the container a Framer layer name.`);return{name:fallback,members};};// Snapshot a multi-select (aria-pressed) group.\n//\n// `allowRemove` gates the \"no pills pressed → wipe sessionStorage\"\n// branch. True (the default) is what the attribute mutation\n// observer wants: a user just deselected the last pill and we\n// should reflect that. False is what sweepSubtree passes: a\n// step just re-mounted with pristine state, so any \"nothing\n// pressed\" snapshot is a mount artifact, not a user removal,\n// and wiping sessionStorage would clobber the value the user\n// set on the previous visit to this step (D-073 Back-button\n// data loss).\nconst snapshotPressedGroup=(btn,allowRemove=true)=>{const group=findGroup(btn,\"[aria-pressed]\");if(!group)return;const pressed=group.members.filter(m=>m.getAttribute(\"aria-pressed\")===\"true\").map(labelOf).filter(Boolean);const joined=pressed.join(\",\");// D-084 defense: some code components (e.g. DateRangePicker)\n// put aria-pressed on children whose text labels are the\n// wrong serialization for the hidden input — in that case\n// the day button labels (\"8\") would clobber the ISO date\n// (\"2026-10-08\") the component wrote into the hidden input.\n// Detect that by comparing the aggregated pill labels to\n// the hidden input's current value; if they disagree, the\n// component owns that input (the value-attr observer below\n// writes the correct value) and we must NOT overwrite with\n// the aggregated labels. If they agree it's a plain pill\n// group (ButtonGroupPro-style) and either path produces the\n// same string, so saving is a harmless no-op.\nif(group.hiddenInput&&group.hiddenInput.value&&group.hiddenInput.value!==joined){return;}if(pressed.length===0){if(allowRemove)remove(group.name);}else{save(group.name,joined);}};// Snapshot a single-select (role=\"tab\") group.\n// `allowRemove` — same rationale as snapshotPressedGroup above.\nconst snapshotTabGroup=(btn,allowRemove=true)=>{const group=findGroup(btn,'[role=\"tab\"]');if(!group)return;const selected=group.members.find(m=>m.getAttribute(\"aria-selected\")===\"true\");const selectedLabel=selected?labelOf(selected):\"\";// D-084 defense: same reasoning as snapshotPressedGroup.\nif(group.hiddenInput&&group.hiddenInput.value&&group.hiddenInput.value!==selectedLabel){return;}if(!selected){if(allowRemove)remove(group.name);}else{save(group.name,selectedLabel);}};// Snapshot a Framer variant-swap group (multi-select cards where\n// clicks flip a card's own root data-framer-name from\n// \"Unselected\" to \"Selected\"). Group discovery: walk up from\n// the changed card to the first ancestor whose subtree contains\n// ≥ 2 elements with data-framer-name in {Selected, Unselected}.\n// Use that ancestor's own data-framer-name (or the nearest\n// named ancestor whose name isn't Selected/Unselected) as the\n// sessionStorage key.\nconst VARIANT_SELECTOR='[data-framer-name=\"Selected\"], [data-framer-name=\"Unselected\"]';// `allowRemove` — same rationale as snapshotPressedGroup above.\nconst snapshotVariantGroup=(card,allowRemove=true)=>{let cur=card.parentElement;while(cur&&cur!==document.body){const cards=Array.from(cur.querySelectorAll(VARIANT_SELECTOR));if(cards.length>=2){let named=cur;while(named&&(!named.getAttribute(\"data-framer-name\")||named.getAttribute(\"data-framer-name\")===\"Selected\"||named.getAttribute(\"data-framer-name\")===\"Unselected\")){named=named.parentElement;}const key=named?.getAttribute(\"data-framer-name\")||`variantgroup-${slug(cardLabelOf(cards[0]))}`;const selected=cards.filter(c=>c.getAttribute(\"data-framer-name\")===\"Selected\");if(selected.length===0){if(allowRemove)remove(key);}else{save(key,selected.map(cardLabelOf).filter(Boolean).join(\",\"));}return;}cur=cur.parentElement;}};// Attribute + childList observer — catches state flips\n// regardless of what triggered them (React re-render, direct\n// click, keyboard) AND catches late-mounting steps whose\n// initial pre-selected state (default radio, pre-highlighted\n// tab, etc.) would otherwise never reach sessionStorage.\nconst observer=new MutationObserver(mutations=>{for(const m of mutations){if(m.type===\"childList\"){// Framer just mounted a new subtree (typically a\n// step advance). Sweep the added nodes so their\n// pre-selected defaults land in sessionStorage\n// without waiting for a user interaction.\nfor(const node of m.addedNodes){if(node instanceof Element)sweepSubtree(node);}continue;}if(m.type!==\"attributes\")continue;const target=m.target;if(m.attributeName===\"aria-pressed\"){snapshotPressedGroup(target);}else if(m.attributeName===\"aria-selected\"){// role=\"tab\" tabs are the case we care about; other\n// aria-selected uses (comboboxes, listboxes) don't\n// appear in this form today. Guard just in case.\nif(target.getAttribute(\"role\")===\"tab\"||target.closest('[role=\"tablist\"]')){snapshotTabGroup(target);}}else if(m.attributeName===\"data-framer-name\"){// Framer variant-swap card: Care Options flip\n// between Unselected/Selected on click.\nconst nv=target.getAttribute(\"data-framer-name\");if(nv===\"Selected\"||nv===\"Unselected\"){snapshotVariantGroup(target);}}else if(m.attributeName===\"value\"){// the designer's custom code components (AvailabilityPicker,\n// future hourly-rate, etc.) mirror React state into\n// <input type=\"hidden\" name=X value={state}>. React\n// 18+ syncs both the `.value` property AND the `value`\n// HTML attribute, so this observer catches the update\n// even though no `input`/`change` DOM event fires on\n// programmatic property assignment. Only act on\n// hidden inputs — visible inputs are already handled\n// by the input/change listener.\nif(target instanceof HTMLInputElement&&target.type===\"hidden\"&&target.name){const v=target.getAttribute(\"value\")||\"\";if(v){save(target.name,v);}else{remove(target.name);}}}}});observer.observe(document.body,{subtree:true,childList:true,attributes:true,attributeFilter:[\"aria-pressed\",\"aria-selected\",\"data-framer-name\",\"value\"]});// ---------- initial sweep (defaults & pre-selected pills) ----------\n//\n// Sweep a subtree looking for state to capture. Called once on\n// mount for the whole document, and again per added subtree\n// whenever Framer swaps to a new step and mounts the new step's\n// DOM.\n//\n// This is what catches PRE-SELECTED defaults on late-mounting\n// steps (e.g. Step 5's <input type=hidden name=\"bg-check-choice\"\n// value=\"form\"> or Step 3's \"Under 1 Year\" tab). Without this,\n// the caregiver has to interact with each control at least once\n// for its state to reach sessionStorage — leaving-a-default-\n// alone silently drops the field.\n// Hydrate a freshly-mounted named text/textarea/select input\n// from sessionStorage if the DOM is empty AND a previous visit\n// to this step saved a value. Skips file inputs (blobs can't\n// live in sessionStorage) and skips inputs that already have a\n// value (the designer may have set a default in the design; her\n// default wins over stale sessionStorage on first mount).\n//\n// Uses the React-friendly value setter so onChange handlers on\n// controlled inputs actually see the update. Dispatches an\n// `input` event so any React state hooks re-sync.\nconst hydrateFromStorage=el=>{if(el.value)return;const saved=window.sessionStorage.getItem(`${prefix}.${el.name}`);if(!saved)return;const proto=el instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:el instanceof HTMLSelectElement?HTMLSelectElement.prototype:HTMLInputElement.prototype;const setter=Object.getOwnPropertyDescriptor(proto,\"value\")?.set;try{setter?.call(el,saved);el.dispatchEvent(new Event(\"input\",{bubbles:true}));el.dispatchEvent(new Event(\"change\",{bubbles:true}));}catch{// Some hidden inputs (the designer's code components) are\n// React-controlled and setting `.value` externally has\n// no effect. Not worth crashing over — code-component-\n// owned hidden inputs restore via their own useState\n// initializer reading sessionStorage (see\n// AvailabilityPicker for the pattern).\n}};// Trigger a tap on an element in a way that reaches both plain\n// React onClick handlers (ButtonGroupPro and friends) AND\n// Framer motion's onTap (which binds to pointer events on\n// touch-capable devices). `.click()` alone is enough for\n// ButtonGroupPro, but Framer's variant-swap cards never flip\n// on touch devices from a bare `.click()` (reported mobile\n// 2026-11-01: Help at Home didn't restore on Back-nav). Fire a\n// pointerdown + pointerup + click sequence synthesized at the\n// element's center. Framer may still gate on isTrusted — if a\n// future variant pattern insists on trusted events, the fallback\n// is a MutationObserver-driven overlay prompting the caregiver\n// to re-tap.\nconst simulateTap=el=>{try{const rect=el.getBoundingClientRect();const x=rect.left+rect.width/2;const y=rect.top+rect.height/2;const base={bubbles:true,cancelable:true,composed:true,clientX:x,clientY:y,pointerType:\"touch\",isPrimary:true,pointerId:1};try{el.dispatchEvent(new PointerEvent(\"pointerdown\",base));el.dispatchEvent(new PointerEvent(\"pointerup\",base));}catch{// Older WebKit without PointerEvent constructor.\n}try{el.dispatchEvent(new MouseEvent(\"mousedown\",base));el.dispatchEvent(new MouseEvent(\"mouseup\",base));}catch{// ignore\n}el.click();}catch{// Last-ditch: just call .click(). If that also throws,\n// nothing more we can safely do.\ntry{el.click();}catch{// ignore\n}}};// ---------- restore (visually re-apply saved state after Back nav) ----------\n//\n// D-073 companion: snapshotPressedGroup / snapshotTabGroup /\n// snapshotVariantGroup with allowRemove=false already stop a\n// step re-mount from WIPING saved sessionStorage. But the\n// visual pill state is still default-unselected on re-mount,\n// so a caregiver returning via Back sees empty pills while\n// sessionStorage still carries their choice — the StepGatekeeper\n// lets them past Continue even though nothing LOOKS selected.\n// Confusing to the point of being a bug (reported 2026-11-01,\n// task #76 re-test).\n//\n// Restore reads what sessionStorage says, then fires a trusted\n// DOM `click()` on each matching pill so the designer's\n// ButtonGroupPro / Tabs / variant-swap component flips its own\n// internal state through its normal click handler. The follow-up\n// mutation observer re-snapshots the same value — idempotent.\n// Guarded against clicking already-selected pills so we never\n// toggle a pill back off.\n//\n// Applies to EVERY pill group across the whole flow (desktop +\n// phone), both ButtonGroupPro-style and variant-swap-style, and\n// single-select tabs. No per-breakpoint wiring.\nconst restorePressedGroup=btn=>{const group=findGroup(btn,\"[aria-pressed]\");if(!group)return;const key=normalizeKey(group.name);let saved=null;try{saved=window.sessionStorage.getItem(`${prefix}.${key}`);}catch{return;}if(!saved)return;const wanted=new Set(saved.split(\",\").map(s=>s.trim()).filter(Boolean));if(wanted.size===0)return;for(const member of group.members){if(!wanted.has(labelOf(member)))continue;if(member.getAttribute(\"aria-pressed\")===\"true\")continue;simulateTap(member);}};const restoreTabGroup=btn=>{const group=findGroup(btn,'[role=\"tab\"]');if(!group)return;const key=normalizeKey(group.name);let saved=null;try{saved=window.sessionStorage.getItem(`${prefix}.${key}`);}catch{return;}if(!saved)return;const wantedLabel=saved.trim();if(!wantedLabel)return;for(const member of group.members){if(labelOf(member)!==wantedLabel)continue;if(member.getAttribute(\"aria-selected\")===\"true\")return;simulateTap(member);return;}};// Inject a one-time info toast at the TOP OF THE VIEWPORT (fixed-\n// positioned, not inline) to make the gatekeeper's held state\n// visible to the caregiver after Back nav. Used only when\n// programmatic tap can't flip the component — Framer motion's\n// variant-swap gates on `event.isTrusted` which userland JS\n// can't fake. Rather than lie by leaving the UI empty while\n// sessionStorage secretly carries their selection, tell them\n// what's held and nudge them to confirm/change.\n//\n// Position: FIXED (not inline). An inline banner inserted into\n// the Framer-controlled subtree squeezed the Care Type cards\n// out of their grid cells on 2026-11-01 (reported mobile) —\n// cards didn't render at all. Fixed positioning never touches\n// page flow.\n//\n// Toast auto-removes on the first click/pointerdown anywhere in\n// the originating group (user interacted → state will reconcile\n// naturally through the normal snapshot path).\nconst injectRestoreBanner=(container,key,labels)=>{const bannerId=`c4c-restore-banner-${key.replace(/[^a-z0-9-]/gi,\"-\")}`;if(document.getElementById(bannerId))return;const banner=document.createElement(\"div\");banner.id=bannerId;banner.setAttribute(\"data-c4c-restore-banner\",key);banner.textContent=`You previously picked: ${labels.join(\", \")}. Tap below to keep or change.`;Object.assign(banner.style,{position:\"fixed\",top:\"12px\",left:\"12px\",right:\"12px\",maxWidth:\"min(560px, calc(100vw - 24px))\",marginLeft:\"auto\",marginRight:\"auto\",zIndex:\"10000\",padding:\"10px 14px\",background:\"rgb(21, 82, 89)\",color:\"rgb(255, 255, 255)\",borderRadius:\"8px\",font:\"500 14px/1.4 Manrope, sans-serif\",boxShadow:\"0 6px 20px rgba(0, 0, 0, 0.2)\",boxSizing:\"border-box\",pointerEvents:\"none\"});try{document.body.appendChild(banner);}catch{return;}const cleanup=()=>{try{banner.remove();}catch{// ignore\n}};container.addEventListener(\"click\",cleanup,{once:true});container.addEventListener(\"pointerdown\",cleanup,{once:true});// Also auto-dismiss after 10s so a lingering toast doesn't\n// obscure the header indefinitely.\nwindow.setTimeout(cleanup,1e4);};const restoreVariantGroup=card=>{// Mirror the group-walk from snapshotVariantGroup so we land\n// on the same key.\nlet cur=card.parentElement;while(cur&&cur!==document.body){const cards=Array.from(cur.querySelectorAll(VARIANT_SELECTOR));if(cards.length>=2){let named=cur;while(named&&(!named.getAttribute(\"data-framer-name\")||named.getAttribute(\"data-framer-name\")===\"Selected\"||named.getAttribute(\"data-framer-name\")===\"Unselected\")){named=named.parentElement;}const key=normalizeKey(named?.getAttribute(\"data-framer-name\")||`variantgroup-${slug(cardLabelOf(cards[0]))}`);let saved=null;try{saved=window.sessionStorage.getItem(`${prefix}.${key}`);}catch{return;}if(!saved)return;const wantedList=saved.split(\",\").map(s=>s.trim()).filter(Boolean);if(wantedList.length===0)return;const wanted=new Set(wantedList);// Short-circuit if the UI already matches (e.g. a\n// follow-up sweep after the user manually re-tapped).\nconst alreadySelected=cards.filter(c=>c.getAttribute(\"data-framer-name\")===\"Selected\").map(c=>cardLabelOf(c));if(alreadySelected.length===wanted.size&&alreadySelected.every(l=>wanted.has(l))){return;}// Framer motion's variant-swap handler verifies\n// event.isTrusted on tap, so a synthetic\n// pointerdown/pointerup/click sequence won't flip\n// the card. Rather than silently diverge UI from\n// sessionStorage, inject a banner above the group\n// telling the caregiver what we're holding.\ninjectRestoreBanner(cur,key,wantedList);return;}cur=cur.parentElement;}};const sweepSubtree=root=>{// Named inputs / textareas / selects, including hidden inputs.\nconst els=Array.from(root.querySelectorAll(\"input[name], textarea[name], select[name]\"));for(const el of els){if(el instanceof HTMLInputElement&&el.type===\"file\")continue;if(el instanceof HTMLInputElement&&(el.type===\"radio\"||el.type===\"checkbox\")){if(el.checked)save(el.name,el.value);continue;}if(el.value){save(el.name,el.value);}else{// D-073: DOM is empty on this mount. If a previous\n// visit to this step (Back-button round-trip)\n// saved a value, restore it into the input rather\n// than leaving the caregiver staring at an empty\n// field for content they already typed.\nhydrateFromStorage(el);}}// Pill groups (aria-pressed). Pass allowRemove=false so a\n// step re-mount with all pills defaulted-unpressed doesn't\n// wipe the caregiver's previously-saved selection. Actual\n// deselection is captured by the aria-pressed attribute\n// observer on user clicks, which still passes the default\n// allowRemove=true.\nconst pressedButtons=Array.from(root.querySelectorAll(\"[aria-pressed]\"));const seenGroups=new Set;for(const btn of pressedButtons){const group=findGroup(btn,\"[aria-pressed]\");if(!group||seenGroups.has(group.name))continue;seenGroups.add(group.name);snapshotPressedGroup(btn,false);// D-073 part 2: restore visual pills from sessionStorage\n// so Back-nav doesn't leave the caregiver staring at\n// empty pills while the gatekeeper internally knows\n// their value.\nrestorePressedGroup(btn);}// Tab groups (role=\"tab\" + aria-selected). Same allowRemove\n// rationale as pill groups above.\nconst tabButtons=Array.from(root.querySelectorAll('[role=\"tab\"]'));const seenTabGroups=new Set;for(const btn of tabButtons){const group=findGroup(btn,'[role=\"tab\"]');if(!group||seenTabGroups.has(group.name))continue;seenTabGroups.add(group.name);snapshotTabGroup(btn,false);restoreTabGroup(btn);}// Framer variant-swap card groups. Same allowRemove rationale.\nconst variantCards=Array.from(root.querySelectorAll(VARIANT_SELECTOR));const seenVariantContainers=new Set;for(const card of variantCards){const parent=card.parentElement;if(!parent||seenVariantContainers.has(parent))continue;seenVariantContainers.add(parent);snapshotVariantGroup(card,false);restoreVariantGroup(card);}};const initialSweep=()=>{sweepSubtree(document);};const initialTimer=window.setTimeout(initialSweep,500);return()=>{document.removeEventListener(\"input\",handleFormEvent,true);document.removeEventListener(\"change\",handleFormEvent,true);observer.disconnect();window.clearTimeout(initialTimer);};},[keyPrefix,photoInputName,bgCheckInputName]);return /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1,overflow:\"hidden\",pointerEvents:\"none\",...style},\"aria-hidden\":\"true\"});}addPropertyControls(OnboardingFieldPersister,{keyPrefix:{type:ControlType.String,title:\"Key Prefix\",defaultValue:\"c4c-onboarding\",description:\"sessionStorage keys are `<prefix>.<field name>`. Change only if it collides with something else.\"},photoInputName:{type:ControlType.String,title:\"Photo Field Name\",defaultValue:\"photo\",description:\"Name attribute of the profile-photo file input on Step 1. The actual File object is stashed on window.__c4c_onboarding_photo for the submit component to pick up.\"},bgCheckInputName:{type:ControlType.String,title:\"BG Check Field Name\",defaultValue:\"bg-check\",description:\"Name attribute of the background-check PDF file input on Step 5. The actual File object is stashed on window.__c4c_onboarding_bg_check for the submit component. Must be distinct from Photo Field Name.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"OnboardingFieldPersister\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OnboardingFieldPersister.map"],"mappings":"A,wLACA,SAASU,EAAQ,EAAG,CAA2D,OAA/CC,EAAG,aAAa,GAAA,CAAI,QAAQ,OAAO,GAAG,CAAC,CAAC,KAAgB,CAAC,CAAC,MAAM,EAAE,GAAG,CAAE,CAMvG,SAASC,EAAY,EAAG,CAAC,IAAMC,GAAKF,EAAG,aAAa,GAAA,CAAI,QAAQ,OAAO,GAAG,CAAC,CAAC,KAAK,EAAQG,EAAED,EAAI,MAAM,4BAA4B,EAAE,OAAOC,EAAEA,EAAE,GAAGD,EAAI,MAAM,EAAE,EAAE,EAAA,CAAG,KAAK,CAAE,CACzK,SAASE,EAAK,EAAE,CAAC,OAAOC,EAAE,YAAY,CAAC,CAAC,QAAQ,cAAc,GAAG,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,CAGnG,SAAwBC,EAAyB,EAAM,CAAC,GAAK,CAAC,YAAU,iBAAe,mBAAiB,SAAOC,EAuPmiB,O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